VTK  9.0.1
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
vtkResliceCursor::PolyData
vtkPolyData * PolyData
Definition: vtkResliceCursor.h:185
vtkPlane
perform various plane computations
Definition: vtkPlane.h:32
vtkResliceCursor::BuildCursorTopology
virtual void BuildCursorTopology()
vtkResliceCursor::GetAxis
virtual double * GetAxis(int i)
vtkResliceCursor::New
static vtkResliceCursor * New()
vtkResliceCursor::ReslicePlanes
vtkPlaneCollection * ReslicePlanes
Definition: vtkResliceCursor.h:189
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:44
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkResliceCursor::Reset
virtual void Reset()
Reset the cursor to the default position, ie with the axes, normal to each other and axis aligned and...
vtkResliceCursor::GetPolyData
virtual vtkPolyData * GetPolyData()
Get the 3D PolyData representation.
vtkX3D::center
@ center
Definition: vtkX3D.h:236
vtkResliceCursor::BuildCursorGeometryWithoutHole
virtual void BuildCursorGeometryWithoutHole()
vtkResliceCursor::GetPlane
virtual vtkPlane * GetPlane(int n)
Get the planes that represent normals along the X, Y and Z.
vtkResliceCursor::Hole
int Hole
Definition: vtkResliceCursor.h:176
vtkResliceCursor::HoleWidthInPixels
double HoleWidthInPixels
Definition: vtkResliceCursor.h:178
vtkResliceCursor::SetCenter
virtual void SetCenter(double center[3])
vtkResliceCursor::BuildCursorTopologyWithHole
virtual void BuildCursorTopologyWithHole()
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkResliceCursor::Image
vtkImageData * Image
Definition: vtkResliceCursor.h:184
vtkResliceCursor::PolyDataBuildTime
vtkTimeStamp PolyDataBuildTime
Definition: vtkResliceCursor.h:190
vtkResliceCursor::~vtkResliceCursor
~vtkResliceCursor() override
vtkResliceCursor::SetCenter
virtual void SetCenter(double, double, double)
Set/Get the cente of the reslice cursor.
vtkResliceCursor::SetImage
virtual void SetImage(vtkImageData *)
Set the image (3D) that we are slicing.
vtkResliceCursor::Update
virtual void Update()
Build the polydata.
vtkResliceCursor::ThickMode
vtkTypeBool ThickMode
Definition: vtkResliceCursor.h:175
vtkResliceCursor::BuildCursorGeometry
virtual void BuildCursorGeometry()
vtkResliceCursor::HoleWidth
double HoleWidth
Definition: vtkResliceCursor.h:177
vtkResliceCursor::vtkResliceCursor
vtkResliceCursor()
vtkObject.h
vtkResliceCursor::GetMTime
vtkMTimeType GetMTime() override
Get the MTime.
vtkResliceCursor::ComputeAxes
virtual void ComputeAxes()
vtkResliceCursor::BuildCursorTopologyWithoutHole
virtual void BuildCursorTopologyWithoutHole()
vtkResliceCursor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Printself method.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkResliceCursor::GetCenterlineAxisPolyData
virtual vtkPolyData * GetCenterlineAxisPolyData(int axis)
Get the slab and centerline polydata along an axis.
vtkResliceCursor::BuildCursorGeometryWithHole
virtual void BuildCursorGeometryWithHole()
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkResliceCursor::BuildPolyData
virtual void BuildPolyData()