VTK  9.3.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 
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 
68  virtual void SetResliceCursor(vtkResliceCursor*);
69  vtkGetObjectMacro(ResliceCursor, vtkResliceCursor);
71 
73 
77  vtkSetVector6Macro(SliceBounds, double);
78  vtkGetVector6Macro(SliceBounds, double);
80 
82 
87  virtual vtkPolyData* GetCenterlineAxis1();
88  virtual vtkPolyData* GetCenterlineAxis2();
89  virtual vtkPolyData* GetThickSlabAxis1();
90  virtual vtkPolyData* GetThickSlabAxis2();
92 
94 
97  virtual int GetAxis1();
98  virtual int GetAxis2();
99  virtual int GetPlaneAxis1();
100  virtual int GetPlaneAxis2();
102 
107  int GetOtherPlaneForAxis(int p);
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
126  void BuildResliceSlabAxisTopology();
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
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:60
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
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:79
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:25
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.
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.