VTK  9.3.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 "vtkObject.h"
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkImageData;
31 class vtkPolyData;
32 class vtkPlane;
33 class vtkPlaneCollection;
34 
35 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursor : public vtkObject
36 {
37 public:
38  vtkTypeMacro(vtkResliceCursor, vtkObject);
39 
40  static vtkResliceCursor* New();
41 
43 
46  virtual void SetImage(vtkImageData*);
47  vtkGetObjectMacro(Image, vtkImageData);
49 
51 
54  virtual void SetCenter(double, double, double);
55  virtual void SetCenter(double center[3]);
56  vtkGetVector3Macro(Center, double);
58 
60 
63  vtkSetVector3Macro(Thickness, double);
64  vtkGetVector3Macro(Thickness, double);
66 
68 
71  vtkSetMacro(ThickMode, vtkTypeBool);
72  vtkGetMacro(ThickMode, vtkTypeBool);
73  vtkBooleanMacro(ThickMode, vtkTypeBool);
75 
79  virtual vtkPolyData* GetPolyData();
80 
84  virtual vtkPolyData* GetCenterlineAxisPolyData(int axis);
85 
89  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
96  virtual vtkPlane* GetPlane(int n);
97 
101  virtual void Update();
102 
104 
107  vtkGetVector3Macro(XAxis, double);
108  vtkGetVector3Macro(YAxis, double);
109  vtkGetVector3Macro(ZAxis, double);
110  vtkSetVector3Macro(XAxis, double);
111  vtkSetVector3Macro(YAxis, double);
112  vtkSetVector3Macro(ZAxis, double);
113  virtual double* GetAxis(int i);
115 
119  vtkGetVector3Macro(XViewUp, double);
120  vtkGetVector3Macro(YViewUp, double);
121  vtkGetVector3Macro(ZViewUp, double);
122  vtkSetVector3Macro(XViewUp, double);
123  vtkSetVector3Macro(YViewUp, double);
124  vtkSetVector3Macro(ZViewUp, double);
125  double* GetViewUp(int i);
126 
128 
132  vtkSetMacro(Hole, int);
133  vtkGetMacro(Hole, int);
135 
137 
140  vtkSetMacro(HoleWidth, double);
141  vtkGetMacro(HoleWidth, double);
143 
145 
149  vtkSetMacro(HoleWidthInPixels, double);
150  vtkGetMacro(HoleWidthInPixels, double);
152 
156  vtkMTimeType GetMTime() override;
157 
163  virtual void Reset();
164 
165 protected:
167  ~vtkResliceCursor() override;
168 
169  virtual void BuildCursorGeometry();
170  virtual void BuildPolyData();
171  virtual void BuildCursorTopology();
172  virtual void BuildCursorTopologyWithHole();
173  virtual void BuildCursorTopologyWithoutHole();
174  virtual void BuildCursorGeometryWithoutHole();
175  virtual void BuildCursorGeometryWithHole();
176  virtual void ComputeAxes();
177 
179  int Hole;
180  double HoleWidth;
182  double Thickness[3];
183  double Center[3];
184  double XAxis[3];
185  double YAxis[3];
186  double ZAxis[3];
187  double XViewUp[3];
188  double YViewUp[3];
189  double ZViewUp[3];
192 
193  vtkPolyData* CenterlineAxis[3];
194 
197 
198 private:
199  vtkResliceCursor(const vtkResliceCursor&) = delete;
200  void operator=(const vtkResliceCursor&) = delete;
201 };
202 
203 VTK_ABI_NAMESPACE_END
204 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
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:79
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:42
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:25
vtkPlaneCollection * ReslicePlanes
vtkPolyData * PolyData
vtkTypeBool ThickMode
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Geometry for a reslice cursor.