VTK  9.1.20211115
vtkResliceCursorLineRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceCursorLineRepresentation.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 vtkResliceCursorLineRepresentation_h
33 #define vtkResliceCursorLineRepresentation_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
37 
38 class vtkPolyData;
42 class vtkResliceCursor;
43 
44 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorLineRepresentation
46 {
47 public:
52 
54 
58  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
65  void BuildRepresentation() override;
66  int ComputeInteractionState(int X, int Y, int modify = 0) override;
67  void StartWidgetInteraction(double startEventPos[2]) override;
68  void WidgetInteraction(double e[2]) override;
69  void Highlight(int highlightOn) override;
71 
73 
77  int RenderOverlay(vtkViewport* viewport) override;
78  int RenderOpaqueGeometry(vtkViewport* viewport) override;
82 
87  double* GetBounds() override;
88 
90 
94  vtkGetObjectMacro(ResliceCursorActor, vtkResliceCursorActor);
96 
101 
105  virtual void SetUserMatrix(vtkMatrix4x4* matrix);
106 
107 protected:
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 
126 
127  double StartPickPosition[3];
128  double StartCenterPosition[3];
129 
130  // Transformation matrices. These have no offset. Offset is recomputed
131  // based on the cursor, so that the center of the cursor has the same
132  // location in transformed space as it does in physical space.
136 
137 private:
139  void operator=(const vtkResliceCursorLineRepresentation&) = delete;
140 };
141 
142 #endif
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:194
Represent a reslice cursor.
static vtkResliceCursorLineRepresentation * New()
Instantiate the class.
double TranslateAxis(double evenPos[2], int axis)
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)
vtkResliceCursor * GetResliceCursor() override
Get the reslice cursor.
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.
vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm() override
Get the underlying cursor source.
double * GetBounds() override
Get the bounds of this prop.
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.
virtual void SetUserMatrix(vtkMatrix4x4 *matrix)
Set the user matrix on all the internal actors.
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.
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:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69