VTK  9.1.0
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
38class vtkImageData;
39class vtkPolyData;
40class vtkPlane;
42
43class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursor : public vtkObject
44{
45public:
47
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
127 vtkGetVector3Macro(XViewUp, double);
128 vtkGetVector3Macro(YViewUp, double);
129 vtkGetVector3Macro(ZViewUp, double);
130 vtkSetVector3Macro(XViewUp, double);
131 vtkSetVector3Macro(YViewUp, double);
132 vtkSetVector3Macro(ZViewUp, double);
133 double* GetViewUp(int i);
134
136
140 vtkSetMacro(Hole, int);
141 vtkGetMacro(Hole, int);
143
145
148 vtkSetMacro(HoleWidth, double);
149 vtkGetMacro(HoleWidth, double);
151
153
157 vtkSetMacro(HoleWidthInPixels, double);
158 vtkGetMacro(HoleWidthInPixels, double);
160
165
171 virtual void Reset();
172
173protected:
176
177 virtual void BuildCursorGeometry();
178 virtual void BuildPolyData();
179 virtual void BuildCursorTopology();
184 virtual void ComputeAxes();
185
187 int Hole;
188 double HoleWidth;
190 double Thickness[3];
191 double Center[3];
192 double XAxis[3];
193 double YAxis[3];
194 double ZAxis[3];
195 double XViewUp[3];
196 double YViewUp[3];
197 double ZViewUp[3];
200
201 vtkPolyData* CenterlineAxis[3];
202
205
206private:
207 vtkResliceCursor(const vtkResliceCursor&) = delete;
208 void operator=(const vtkResliceCursor&) = delete;
209};
210
211#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
maintain a list of planes
perform various plane computations
Definition: vtkPlane.h:143
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
Geometry for a reslice cursor.
double * GetViewUp(int i)
~vtkResliceCursor() override
virtual void SetImage(vtkImageData *)
Set the image (3D) that we are slicing.
virtual double * GetAxis(int i)
Get the computed axes directions.
virtual void SetCenter(double center[3])
Set/Get the cente of the reslice cursor.
virtual void BuildCursorTopology()
static vtkResliceCursor * New()
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.
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 vtkPolyData * GetPolyData()
Get the 3D PolyData representation.
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:52
@ center
Definition: vtkX3D.h:236
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287