VTK  9.4.20241113
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
32VTK_ABI_NAMESPACE_BEGIN
33class vtkPolyData;
38
39class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorLineRepresentation
41{
42public:
47
49
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
60 void BuildRepresentation() override;
61 int ComputeInteractionState(int X, int Y, int modify = 0) override;
62 void StartWidgetInteraction(double startEventPos[2]) override;
63 void WidgetInteraction(double e[2]) override;
64 void Highlight(int highlightOn) override;
66
68
72 int RenderOverlay(vtkViewport* viewport) override;
73 int RenderOpaqueGeometry(vtkViewport* viewport) override;
77
82 double* GetBounds() override;
83
85
89 vtkGetObjectMacro(ResliceCursorActor, vtkResliceCursorActor);
91
96
100 virtual void SetUserMatrix(vtkMatrix4x4* matrix);
101
105 void SetTolerance(int t) override;
106
107protected:
110
112
113 double RotateAxis(double evenPos[2], int axis);
114 double TranslateAxis(double evenPos[2], int axis);
115
116 void RotateAxis(int axis, double angle);
117
118 void RotateVectorAboutVector(double vectorToBeRotated[3],
119 double axis[3], // vector about which we rotate
120 double angle, // angle in radians
121 double o[3]);
122 int DisplayToReslicePlaneIntersection(double displayPos[2], double intersectionPos[3]);
123
125
128
129 double StartPickPosition[3];
130 double StartCenterPosition[3];
131
132 // Transformation matrices. These have no offset. Offset is recomputed
133 // based on the cursor, so that the center of the cursor has the same
134 // location in transformed space as it does in physical space.
138
139private:
141 void operator=(const vtkResliceCursorLineRepresentation&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
concrete dataset represents vertices, lines, polygons, and triangle strips
Represent a reslice cursor.
static vtkResliceCursorLineRepresentation * New()
Instantiate the class.
double TranslateAxis(double evenPos[2], int axis)
vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm() override
Get the underlying cursor source.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
void Highlight(int highlightOn) override
These are methods that satisfy vtkWidgetRepresentation's API.
void RotateVectorAboutVector(double vectorToBeRotated[3], double axis[3], double angle, double o[3])
double RotateAxis(double evenPos[2], int axis)
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 SetTolerance(int t) override
Re-implemented to set the tolerance of the picker.
virtual void SetUserMatrix(vtkMatrix4x4 *matrix)
Set the user matrix on all the internal actors.
vtkResliceCursor * GetResliceCursor() override
Get the reslice cursor.
void RotateAxis(int axis, double angle)
int DisplayToReslicePlaneIntersection(double displayPos[2], double intersectionPos[3])
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:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64