VTK  9.5.20250716
vtkResliceCursor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
23#ifndef vtkResliceCursor_h
24#define vtkResliceCursor_h
25
26#include "vtkInteractionWidgetsModule.h" // For export macro
27#include "vtkNew.h" // For vtkNew
28#include "vtkObject.h"
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkImageData;
33class vtkPolyData;
34class vtkPlane;
36
37class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkResliceCursor : public vtkObject
38{
39public:
41
43
45
48 virtual void SetImage(vtkImageData*);
49 vtkGetObjectMacro(Image, vtkImageData);
51
53
56 virtual void SetCenter(double, double, double);
57 virtual void SetCenter(double center[3]);
58 vtkGetVector3Macro(Center, double);
60
62
65 vtkSetVector3Macro(Thickness, double);
66 vtkGetVector3Macro(Thickness, double);
68
70
73 vtkSetMacro(ThickMode, vtkTypeBool);
74 vtkGetMacro(ThickMode, vtkTypeBool);
75 vtkBooleanMacro(ThickMode, vtkTypeBool);
77
82
87
91 void PrintSelf(ostream& os, vtkIndent indent) override;
92
98 virtual vtkPlane* GetPlane(int n);
99
100 vtkGetObjectMacro(ReslicePlanes, vtkPlaneCollection);
101
105 virtual void Update();
106
108
111 vtkGetVector3Macro(XAxis, double);
112 vtkGetVector3Macro(YAxis, double);
113 vtkGetVector3Macro(ZAxis, double);
114 vtkSetVector3Macro(XAxis, double);
115 vtkSetVector3Macro(YAxis, double);
116 vtkSetVector3Macro(ZAxis, double);
117 virtual double* GetAxis(int i);
119
123 vtkGetVector3Macro(XViewUp, double);
124 vtkGetVector3Macro(YViewUp, double);
125 vtkGetVector3Macro(ZViewUp, double);
126 vtkSetVector3Macro(XViewUp, double);
127 vtkSetVector3Macro(YViewUp, double);
128 vtkSetVector3Macro(ZViewUp, double);
129 double* GetViewUp(int i);
130
132
136 vtkSetMacro(Hole, int);
137 vtkGetMacro(Hole, int);
139
141
144 vtkSetMacro(HoleWidth, double);
145 vtkGetMacro(HoleWidth, double);
147
149
153 vtkSetMacro(HoleWidthInPixels, double);
154 vtkGetMacro(HoleWidthInPixels, double);
156
161
167 virtual void Reset();
168
169protected:
172
173 virtual void BuildCursorGeometry();
174 virtual void BuildPolyData();
175 virtual void BuildCursorTopology();
180 virtual void ComputeAxes();
181
183 int Hole;
184 double HoleWidth;
186 double Thickness[3];
187 double Center[3];
188 double XAxis[3];
189 double YAxis[3];
190 double ZAxis[3];
191 double XViewUp[3];
192 double YViewUp[3];
193 double ZViewUp[3];
196
197 vtkPolyData* CenterlineAxis[3];
198
201
202private:
203 vtkResliceCursor(const vtkResliceCursor&) = delete;
204 void operator=(const vtkResliceCursor&) = delete;
205};
206
207VTK_ABI_NAMESPACE_END
208#endif
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
abstract base class for most VTK objects
Definition vtkObject.h:162
maintain a list of planes
perform various plane computations
Definition vtkPlane.h:141
concrete dataset represents vertices, lines, polygons, and triangle strips
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...
vtkNew< vtkPlaneCollection > ReslicePlanes
virtual void SetCenter(double, double, double)
Set/Get the cente of the reslice cursor.
vtkImageData * Image
vtkPolyData * PolyData
virtual void BuildCursorGeometry()
virtual void BuildCursorTopologyWithoutHole()
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()
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
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_MARSHALAUTO