VTK  9.5.20250802
vtkResliceCursorLineRepresentation.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
26#ifndef vtkResliceCursorLineRepresentation_h
27#define vtkResliceCursorLineRepresentation_h
28
29#include "vtkInteractionWidgetsModule.h" // For export macro
31#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkPolyData;
39
40class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkResliceCursorLineRepresentation
42{
43public:
48
50
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
61 void BuildRepresentation() override;
62 int ComputeInteractionState(int X, int Y, int modify = 0) override;
63 void StartWidgetInteraction(double startEventPos[2]) override;
64 void WidgetInteraction(double e[2]) override;
65 void Highlight(int highlightOn) override;
67
69
73 int RenderOverlay(vtkViewport* viewport) override;
74 int RenderOpaqueGeometry(vtkViewport* viewport) override;
78
83 double* GetBounds() override;
84
86
90 vtkGetObjectMacro(ResliceCursorActor, vtkResliceCursorActor);
92
97 vtkResliceCursor* GetResliceCursor() override;
98
102 virtual void SetUserMatrix(vtkMatrix4x4* matrix);
103
107 void SetTolerance(int t) override;
108
109protected:
112
113 vtkResliceCursorPolyDataAlgorithm* GetCursorAlgorithm() override;
114
115 double RotateAxis(double evenPos[2], int axis);
116 double TranslateAxis(double evenPos[2], int axis);
117
118 void RotateAxis(int axis, double angle);
119
120 void RotateVectorAboutVector(double vectorToBeRotated[3],
121 double axis[3], // vector about which we rotate
122 double angle, // angle in radians
123 double o[3]);
124 int DisplayToReslicePlaneIntersection(double displayPos[2], double intersectionPos[3]);
125
126 void ApplyTolerance();
127
128 vtkNew<vtkResliceCursorActor> ResliceCursorActor;
130
131 double StartPickPosition[3];
132 double StartCenterPosition[3];
133
134 // Transformation matrices. These have no offset. Offset is recomputed
135 // based on the cursor, so that the center of the cursor has the same
136 // location in transformed space as it does in physical space.
137 vtkMatrix4x4* MatrixReslice;
138 vtkMatrix4x4* MatrixView;
139 vtkMatrix4x4* MatrixReslicedView;
140
141private:
143 void operator=(const vtkResliceCursorLineRepresentation&) = delete;
144};
145
146VTK_ABI_NAMESPACE_END
147#endif
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
Allocate and hold a VTK object.
Definition vtkNew.h:167
concrete dataset represents vertices, lines, polygons, and triangle strips
Represent a reslice cursor.
static vtkResliceCursorLineRepresentation * New()
Instantiate the class.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
void Highlight(int highlightOn) override
These are methods that satisfy vtkWidgetRepresentation's API.
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods required by vtkProp superclass.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
double * GetBounds() override
Get the bounds of this prop.
void StartWidgetInteraction(double startEventPos[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
int RenderOverlay(vtkViewport *viewport) override
Methods required by vtkProp superclass.
ray-cast cell picker for the reslice cursor
generates a 2D reslice cursor polydata
represent the vtkResliceCursorWidget
Geometry for a reslice cursor.
abstract specification for Viewports
Definition vtkViewport.h:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)