VTK  9.7.1
vtkResliceCursor.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
23 #ifndef vtkResliceCursor_h
24 #define vtkResliceCursor_h
25 
26 #include "vtkInteractionWidgetsModule.h" // For export macro
27 #include "vtkNew.h" // For vtkNew
28 #include "vtkObject.h"
29 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkImageData;
33 class vtkPolyData;
34 class vtkPlane;
35 class vtkPlaneCollection;
36 
37 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkResliceCursor : public vtkObject
38 {
39 public:
40  vtkTypeMacro(vtkResliceCursor, vtkObject);
41 
42  static vtkResliceCursor* New();
43 
45 
48  virtual void SetImage(vtkImageData*);
49  vtkGetObjectMacro(Image, vtkImageData);
51 
53 
56  virtual void SetCenter(double, double, double);
57  virtual void SetCenter(double center[3]);
58  vtkGetVector3Macro(Center, double);
60 
62 
65  vtkSetVector3Macro(Thickness, double);
66  vtkGetVector3Macro(Thickness, double);
68 
70 
73  vtkSetMacro(ThickMode, vtkTypeBool);
74  vtkGetMacro(ThickMode, vtkTypeBool);
75  vtkBooleanMacro(ThickMode, vtkTypeBool);
77 
81  virtual vtkPolyData* GetPolyData();
82 
86  virtual vtkPolyData* GetCenterlineAxisPolyData(int axis);
87 
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
98  virtual vtkPlane* GetPlane(int n);
99 
100  vtkGetObjectMacro(ReslicePlanes, vtkPlaneCollection);
101 
105  virtual void Update();
106 
108 
111  vtkGetVector3Macro(XAxis, double);
112  vtkGetVector3Macro(YAxis, double);
113  vtkGetVector3Macro(ZAxis, double);
114  vtkSetVector3Macro(XAxis, double);
115  vtkSetVector3Macro(YAxis, double);
116  vtkSetVector3Macro(ZAxis, double);
117  virtual double* GetAxis(int i);
119 
123  vtkGetVector3Macro(XViewUp, double);
124  vtkGetVector3Macro(YViewUp, double);
125  vtkGetVector3Macro(ZViewUp, double);
126  vtkSetVector3Macro(XViewUp, double);
127  vtkSetVector3Macro(YViewUp, double);
128  vtkSetVector3Macro(ZViewUp, double);
129  double* GetViewUp(int i);
130 
132 
136  vtkSetMacro(Hole, int);
137  vtkGetMacro(Hole, int);
139 
141 
144  vtkSetMacro(HoleWidth, double);
145  vtkGetMacro(HoleWidth, double);
147 
149 
153  vtkSetMacro(HoleWidthInPixels, double);
154  vtkGetMacro(HoleWidthInPixels, double);
156 
160  vtkMTimeType GetMTime() override;
161 
167  virtual void Reset();
168 
169 protected:
171  ~vtkResliceCursor() override;
172 
173  virtual void BuildCursorGeometry();
174  virtual void BuildPolyData();
175  virtual void BuildCursorTopology();
176  virtual void BuildCursorTopologyWithHole();
177  virtual void BuildCursorTopologyWithoutHole();
178  virtual void BuildCursorGeometryWithoutHole();
179  virtual void BuildCursorGeometryWithHole();
180  virtual void ComputeAxes();
181 
183  int Hole;
184  double HoleWidth;
186  double Thickness[3];
187  double Center[3];
188  double XAxis[3];
189  double YAxis[3];
190  double ZAxis[3];
191  double XViewUp[3];
192  double YViewUp[3];
193  double ZViewUp[3];
196 
197  vtkPolyData* CenterlineAxis[3];
198 
201 
202 private:
203  vtkResliceCursor(const vtkResliceCursor&) = delete;
204  void operator=(const vtkResliceCursor&) = delete;
205 };
206 
207 VTK_ABI_NAMESPACE_END
208 #endif
vtkNew< vtkPlaneCollection > ReslicePlanes
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
record modification and/or execution time
Definition: vtkTimeStamp.h:24
maintain a list of planes
vtkTimeStamp PolyDataBuildTime
vtkImageData * Image
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:31
vtkPolyData * PolyData
vtkTypeBool ThickMode
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Geometry for a reslice cursor.