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 =========================================================================*/
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, int );
83  vtkGetMacro( ThickMode, int );
84  vtkBooleanMacro( ThickMode, int );
86 
90  virtual vtkPolyData * GetPolyData();
91 
95  virtual vtkPolyData * GetCenterlineAxisPolyData( int axis );
96 
100  void PrintSelf(ostream& os, vtkIndent indent) VTK_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 
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 
157 
163  virtual void Reset();
164 
165 protected:
168 
169  virtual void BuildCursorGeometry();
170  virtual void BuildPolyData();
171  virtual void BuildCursorTopology();
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];
189 
190  vtkPolyData *CenterlineAxis[3];
191 
194 
195 private:
196  vtkResliceCursor(const vtkResliceCursor&) VTK_DELETE_FUNCTION;
197  void operator=(const vtkResliceCursor&) VTK_DELETE_FUNCTION;
198 };
199 
200 #endif
vtkResliceCursor::PolyData
vtkPolyData * PolyData
Definition: vtkResliceCursor.h:188
vtkPlane
perform various plane computations
Definition: vtkPlane.h:38
vtkResliceCursor::BuildCursorTopology
virtual void BuildCursorTopology()
vtkResliceCursor::GetAxis
virtual double * GetAxis(int i)
vtkResliceCursor::New
static vtkResliceCursor * New()
vtkResliceCursor::ReslicePlanes
vtkPlaneCollection * ReslicePlanes
Definition: vtkResliceCursor.h:192
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:47
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
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:230
vtkResliceCursor::BuildCursorGeometryWithoutHole
virtual void BuildCursorGeometryWithoutHole()
vtkResliceCursor::GetPlane
virtual vtkPlane * GetPlane(int n)
Get the planes that represent normals along the X, Y and Z.
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkResliceCursor::Hole
int Hole
Definition: vtkResliceCursor.h:179
vtkResliceCursor::~vtkResliceCursor
~vtkResliceCursor()
vtkResliceCursor::HoleWidthInPixels
double HoleWidthInPixels
Definition: vtkResliceCursor.h:181
vtkResliceCursor::SetCenter
virtual void SetCenter(double center[3])
vtkResliceCursor::BuildCursorTopologyWithHole
virtual void BuildCursorTopologyWithHole()
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkResliceCursor::Image
vtkImageData * Image
Definition: vtkResliceCursor.h:187
vtkResliceCursor::PolyDataBuildTime
vtkTimeStamp PolyDataBuildTime
Definition: vtkResliceCursor.h:193
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::BuildCursorGeometry
virtual void BuildCursorGeometry()
vtkResliceCursor::ThickMode
int ThickMode
Definition: vtkResliceCursor.h:178
vtkResliceCursor::HoleWidth
double HoleWidth
Definition: vtkResliceCursor.h:180
vtkResliceCursor::vtkResliceCursor
vtkResliceCursor()
vtkObject.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkResliceCursor::ComputeAxes
virtual void ComputeAxes()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
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:86
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:37
vtkResliceCursor::GetMTime
virtual vtkMTimeType GetMTime()
Get the MTime.
vtkResliceCursor::BuildPolyData
virtual void BuildPolyData()