VTK  9.0.3
vtkResliceCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceCursor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkResliceCursor_h
33 #define vtkResliceCursor_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 #include "vtkObject.h"
37 
38 class vtkImageData;
39 class vtkPolyData;
40 class vtkPlane;
41 class vtkPlaneCollection;
42 
43 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursor : public vtkObject
44 {
45 public:
46  vtkTypeMacro(vtkResliceCursor, vtkObject);
47 
48  static vtkResliceCursor* New();
49 
51 
54  virtual void SetImage(vtkImageData*);
55  vtkGetObjectMacro(Image, vtkImageData);
57 
59 
62  virtual void SetCenter(double, double, double);
63  virtual void SetCenter(double center[3]);
64  vtkGetVector3Macro(Center, double);
66 
68 
71  vtkSetVector3Macro(Thickness, double);
72  vtkGetVector3Macro(Thickness, double);
74 
76 
79  vtkSetMacro(ThickMode, vtkTypeBool);
80  vtkGetMacro(ThickMode, vtkTypeBool);
81  vtkBooleanMacro(ThickMode, vtkTypeBool);
83 
88 
93 
97  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
104  virtual vtkPlane* GetPlane(int n);
105 
109  virtual void Update();
110 
112 
115  vtkGetVector3Macro(XAxis, double);
116  vtkGetVector3Macro(YAxis, double);
117  vtkGetVector3Macro(ZAxis, double);
118  vtkSetVector3Macro(XAxis, double);
119  vtkSetVector3Macro(YAxis, double);
120  vtkSetVector3Macro(ZAxis, double);
121  virtual double* GetAxis(int i);
123 
125 
129  vtkSetMacro(Hole, int);
130  vtkGetMacro(Hole, int);
132 
134 
137  vtkSetMacro(HoleWidth, double);
138  vtkGetMacro(HoleWidth, double);
140 
142 
146  vtkSetMacro(HoleWidthInPixels, double);
147  vtkGetMacro(HoleWidthInPixels, double);
149 
153  vtkMTimeType GetMTime() override;
154 
160  virtual void Reset();
161 
162 protected:
164  ~vtkResliceCursor() override;
165 
166  virtual void BuildCursorGeometry();
167  virtual void BuildPolyData();
168  virtual void BuildCursorTopology();
173  virtual void ComputeAxes();
174 
176  int Hole;
177  double HoleWidth;
179  double Thickness[3];
180  double Center[3];
181  double XAxis[3];
182  double YAxis[3];
183  double ZAxis[3];
186 
187  vtkPolyData* CenterlineAxis[3];
188 
191 
192 private:
193  vtkResliceCursor(const vtkResliceCursor&) = delete;
194  void operator=(const vtkResliceCursor&) = delete;
195 };
196 
197 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
maintain a list of planes
perform various plane computations
Definition: vtkPlane.h:32
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
Geometry for a reslice cursor.
virtual double * GetAxis(int i)
~vtkResliceCursor() override
virtual void SetImage(vtkImageData *)
Set the image (3D) that we are slicing.
virtual vtkPolyData * GetPolyData()
Get the 3D PolyData representation.
virtual void SetCenter(double center[3])
virtual void BuildCursorTopology()
void PrintSelf(ostream &os, vtkIndent indent) override
Printself method.
vtkMTimeType GetMTime() override
Get the MTime.
virtual void ComputeAxes()
virtual void Reset()
Reset the cursor to the default position, ie with the axes, normal to each other and axis aligned and...
virtual void SetCenter(double, double, double)
Set/Get the cente of the reslice cursor.
static vtkResliceCursor * New()
vtkImageData * Image
vtkPolyData * PolyData
virtual void BuildCursorGeometry()
virtual void BuildCursorTopologyWithoutHole()
vtkPlaneCollection * ReslicePlanes
vtkTimeStamp PolyDataBuildTime
virtual void Update()
Build the polydata.
virtual vtkPolyData * GetCenterlineAxisPolyData(int axis)
Get the slab and centerline polydata along an axis.
virtual void BuildCursorTopologyWithHole()
virtual void BuildCursorGeometryWithHole()
virtual void BuildPolyData()
vtkTypeBool ThickMode
virtual void BuildCursorGeometryWithoutHole()
virtual vtkPlane * GetPlane(int n)
Get the planes that represent normals along the X, Y and Z.
record modification and/or execution time
Definition: vtkTimeStamp.h:33
@ center
Definition: vtkX3D.h:236
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293