VTK  9.3.20240328
vtkResliceCursorPolyDataAlgorithm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkResliceCursorPolyDataAlgorithm_h
21 #define vtkResliceCursorPolyDataAlgorithm_h
22 
23 #include "vtkInteractionWidgetsModule.h" // For export macro
24 #include "vtkPolyDataAlgorithm.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkCutter;
28 class vtkResliceCursor;
29 class vtkPlane;
30 class vtkBox;
31 class vtkClipPolyData;
33 
34 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorPolyDataAlgorithm : public vtkPolyDataAlgorithm
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
43 
46  vtkSetMacro(ReslicePlaneNormal, int);
47  vtkGetMacro(ReslicePlaneNormal, int);
49 
50  enum
51  {
52  XAxis = 0,
54  ZAxis
55  };
56 
60  void SetReslicePlaneNormalToXAxis() { this->SetReslicePlaneNormal(XAxis); }
61  void SetReslicePlaneNormalToYAxis() { this->SetReslicePlaneNormal(YAxis); }
62  void SetReslicePlaneNormalToZAxis() { this->SetReslicePlaneNormal(ZAxis); }
63 
65 
69  vtkGetObjectMacro(ResliceCursor, vtkResliceCursor);
71 
73 
77  vtkSetVector6Macro(SliceBounds, double);
78  vtkGetVector6Macro(SliceBounds, double);
80 
82 
92 
94 
97  virtual int GetAxis1();
98  virtual int GetAxis2();
99  virtual int GetPlaneAxis1();
100  virtual int GetPlaneAxis2();
102 
108 
113  vtkMTimeType GetMTime() override;
114 
115 protected:
118 
120 
121  void GetSlabPolyData(int axis, int planeAxis, vtkPolyData* pd);
122 
123  virtual void CutAndClip(vtkPolyData* in, vtkPolyData* out);
124 
125  // Build the reslice slab axis
127 
134  double SliceBounds[6];
135  bool Extrude;
138  vtkPolyData* ThickAxes[2];
139 
140 private:
142  void operator=(const vtkResliceCursorPolyDataAlgorithm&) = delete;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #endif
implicit function for a bounding box
Definition: vtkBox.h:110
clip polygonal data with user-specified implicit function or input scalar data
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:161
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices
perform various plane computations
Definition: vtkPlane.h:135
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
generates a 2D reslice cursor polydata
virtual int GetPlaneAxis2()
Get the index of the axes and the planes that they represent.
static vtkResliceCursorPolyDataAlgorithm * New()
int GetOtherPlaneForAxis(int p)
Convenience method that, given one plane, returns the other plane that this class represents.
virtual vtkPolyData * GetCenterlineAxis2()
Get either one of the axes that this object produces.
void GetSlabPolyData(int axis, int planeAxis, vtkPolyData *pd)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetPlaneAxis1()
Get the index of the axes and the planes that they represent.
virtual vtkPolyData * GetThickSlabAxis2()
Get either one of the axes that this object produces.
virtual vtkPolyData * GetThickSlabAxis1()
Get either one of the axes that this object produces.
virtual void CutAndClip(vtkPolyData *in, vtkPolyData *out)
vtkMTimeType GetMTime() override
Get the MTime.
virtual int GetAxis2()
Get the index of the axes and the planes that they represent.
virtual vtkPolyData * GetCenterlineAxis1()
Get either one of the axes that this object produces.
virtual int GetAxis1()
Get the index of the axes and the planes that they represent.
virtual void SetResliceCursor(vtkResliceCursor *)
Set the Reslice cursor from which to generate the polydata representation.
void SetReslicePlaneNormalToXAxis()
Set the planes that correspond to the reslice axes.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
Geometry for a reslice cursor.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270