VTK  9.2.6
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 =========================================================================*/
35 #ifndef vtkResliceCursor_h
36 #define vtkResliceCursor_h
37 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
39 #include "vtkObject.h"
40 
41 class vtkImageData;
42 class vtkPolyData;
43 class vtkPlane;
44 class vtkPlaneCollection;
45 
46 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursor : public vtkObject
47 {
48 public:
49  vtkTypeMacro(vtkResliceCursor, vtkObject);
50 
51  static vtkResliceCursor* New();
52 
54 
57  virtual void SetImage(vtkImageData*);
58  vtkGetObjectMacro(Image, vtkImageData);
60 
62 
65  virtual void SetCenter(double, double, double);
66  virtual void SetCenter(double center[3]);
67  vtkGetVector3Macro(Center, double);
69 
71 
74  vtkSetVector3Macro(Thickness, double);
75  vtkGetVector3Macro(Thickness, double);
77 
79 
82  vtkSetMacro(ThickMode, vtkTypeBool);
83  vtkGetMacro(ThickMode, vtkTypeBool);
84  vtkBooleanMacro(ThickMode, vtkTypeBool);
86 
91 
96 
100  void PrintSelf(ostream& os, vtkIndent indent) override;
101 
107  virtual vtkPlane* GetPlane(int n);
108 
112  virtual void Update();
113 
115 
118  vtkGetVector3Macro(XAxis, double);
119  vtkGetVector3Macro(YAxis, double);
120  vtkGetVector3Macro(ZAxis, double);
121  vtkSetVector3Macro(XAxis, double);
122  vtkSetVector3Macro(YAxis, double);
123  vtkSetVector3Macro(ZAxis, double);
124  virtual double* GetAxis(int i);
126 
130  vtkGetVector3Macro(XViewUp, double);
131  vtkGetVector3Macro(YViewUp, double);
132  vtkGetVector3Macro(ZViewUp, double);
133  vtkSetVector3Macro(XViewUp, double);
134  vtkSetVector3Macro(YViewUp, double);
135  vtkSetVector3Macro(ZViewUp, double);
136  double* GetViewUp(int i);
137 
139 
143  vtkSetMacro(Hole, int);
144  vtkGetMacro(Hole, int);
146 
148 
151  vtkSetMacro(HoleWidth, double);
152  vtkGetMacro(HoleWidth, double);
154 
156 
160  vtkSetMacro(HoleWidthInPixels, double);
161  vtkGetMacro(HoleWidthInPixels, double);
163 
167  vtkMTimeType GetMTime() override;
168 
174  virtual void Reset();
175 
176 protected:
178  ~vtkResliceCursor() override;
179 
180  virtual void BuildCursorGeometry();
181  virtual void BuildPolyData();
182  virtual void BuildCursorTopology();
187  virtual void ComputeAxes();
188 
190  int Hole;
191  double HoleWidth;
193  double Thickness[3];
194  double Center[3];
195  double XAxis[3];
196  double YAxis[3];
197  double ZAxis[3];
198  double XViewUp[3];
199  double YViewUp[3];
200  double ZViewUp[3];
203 
204  vtkPolyData* CenterlineAxis[3];
205 
208 
209 private:
210  vtkResliceCursor(const vtkResliceCursor&) = delete;
211  void operator=(const vtkResliceCursor&) = delete;
212 };
213 
214 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:82
maintain a list of planes
perform various plane computations
Definition: vtkPlane.h:146
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
Geometry for a reslice cursor.
virtual double * GetAxis(int i)
Get the computed axes directions.
~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])
Set/Get the cente of the reslice cursor.
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.
double * GetViewUp(int i)
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:55
@ center
Definition: vtkX3D.h:236
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287