VTK  9.7.1
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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkCutter;
29 class vtkResliceCursor;
30 class vtkPlane;
31 class vtkBox;
32 class vtkClipPolyData;
34 
35 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkResliceCursorPolyDataAlgorithm
36  : public vtkPolyDataAlgorithm
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
45 
48  vtkSetMacro(ReslicePlaneNormal, int);
49  vtkGetMacro(ReslicePlaneNormal, int);
51 
52  enum
53  {
54  XAxis = 0,
56  ZAxis
57  };
58 
62  void SetReslicePlaneNormalToXAxis() { this->SetReslicePlaneNormal(XAxis); }
63  void SetReslicePlaneNormalToYAxis() { this->SetReslicePlaneNormal(YAxis); }
64  void SetReslicePlaneNormalToZAxis() { this->SetReslicePlaneNormal(ZAxis); }
65 
67 
70  virtual void SetResliceCursor(vtkResliceCursor*);
71  vtkGetObjectMacro(ResliceCursor, vtkResliceCursor);
73 
75 
79  vtkSetVector6Macro(SliceBounds, double);
80  vtkGetVector6Macro(SliceBounds, double);
82 
84 
89  virtual vtkPolyData* GetCenterlineAxis1();
90  virtual vtkPolyData* GetCenterlineAxis2();
91  virtual vtkPolyData* GetThickSlabAxis1();
92  virtual vtkPolyData* GetThickSlabAxis2();
94 
96 
99  virtual int GetAxis1();
100  virtual int GetAxis2();
101  virtual int GetPlaneAxis1();
102  virtual int GetPlaneAxis2();
104 
109  int GetOtherPlaneForAxis(int p);
110 
115  vtkMTimeType GetMTime() override;
116 
117 protected:
120 
122 
123  void GetSlabPolyData(int axis, int planeAxis, vtkPolyData* pd);
124 
125  virtual void CutAndClip(vtkPolyData* in, vtkPolyData* out);
126 
127  // Build the reslice slab axis
128  void BuildResliceSlabAxisTopology();
129 
136  double SliceBounds[6];
137  bool Extrude;
140  vtkPolyData* ThickAxes[2];
141 
142 private:
144  void operator=(const vtkResliceCursorPolyDataAlgorithm&) = delete;
145 };
146 
147 VTK_ABI_NAMESPACE_END
148 #endif
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:61
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
generates a 2D reslice cursor polydata
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:31
clip polygonal data with user-specified implicit function or input scalar data
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices ...
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void SetReslicePlaneNormalToXAxis()
Set the planes that correspond to the reslice axes.
implicit function for a bounding box
Definition: vtkBox.h:30
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Geometry for a reslice cursor.