VTK
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 
87  virtual vtkPolyData * GetPolyData();
88 
92  virtual vtkPolyData * GetCenterlineAxisPolyData( int axis );
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();
169  virtual void BuildCursorTopologyWithHole();
170  virtual void BuildCursorTopologyWithoutHole();
171  virtual void BuildCursorGeometryWithoutHole();
172  virtual void BuildCursorGeometryWithHole();
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
abstract base class for most VTK objects
Definition: vtkObject.h:53
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
record modification and/or execution time
Definition: vtkTimeStamp.h:32
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:69
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:31
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.