VTK  9.0.1
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 
76  void ReleaseGraphicsResources(vtkWindow* w) override;
77  int RenderOverlay(vtkViewport* viewport) override;
78  int RenderOpaqueGeometry(vtkViewport* viewport) override;
79  int RenderTranslucentPolygonalGeometry(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 
115  void RotateAxis(int axis, double angle);
116 
117  void RotateVectorAboutVector(double vectorToBeRotated[3],
118  double axis[3], // vector about which we rotate
119  double angle, // angle in radians
120  double o[3]);
121  int DisplayToReslicePlaneIntersection(double displayPos[2], double intersectionPos[3]);
122 
125 
126  double StartPickPosition[3];
127  double StartCenterPosition[3];
128 
129  // Transformation matrices. These have no offset. Offset is recomputed
130  // based on the cursor, so that the center of the cursor has the same
131  // location in transformed space as it does in physical space.
135 
136 private:
138  void operator=(const vtkResliceCursorLineRepresentation&) = delete;
139 };
140 
141 #endif
vtkWidgetRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
Definition: vtkWidgetRepresentation.h:135
vtkResliceCursorLineRepresentation::Picker
vtkResliceCursorPicker * Picker
Definition: vtkResliceCursorLineRepresentation.h:124
vtkResliceCursorRepresentation::GetResliceCursor
virtual vtkResliceCursor * GetResliceCursor()=0
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:43
vtkResliceCursorRepresentation::BuildRepresentation
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:216
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:213
vtkResliceCursorLineRepresentation::MatrixReslicedView
vtkMatrix4x4 * MatrixReslicedView
Definition: vtkResliceCursorLineRepresentation.h:134
vtkResliceCursorRepresentation::GetCursorAlgorithm
virtual vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm()=0
Get the underlying cursor source.
vtkWidgetRepresentation::WidgetInteraction
virtual void WidgetInteraction(double newEventPos[2])
Definition: vtkWidgetRepresentation.h:136
vtkWidgetRepresentation::GetBounds
double * GetBounds() override
Methods to make this class behave as a vtkProp.
Definition: vtkWidgetRepresentation.h:208
vtkResliceCursorLineRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorLineRepresentation.h:44
vtkResliceCursorPolyDataAlgorithm
generates a 2D reslice cursor polydata
Definition: vtkResliceCursorPolyDataAlgorithm.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkResliceCursorRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceCursorActor
Represent a reslice cursor.
Definition: vtkResliceCursorActor.h:40
vtkResliceCursorLineRepresentation::MatrixReslice
vtkMatrix4x4 * MatrixReslice
Definition: vtkResliceCursorLineRepresentation.h:132
vtkWidgetRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:214
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:215
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkResliceCursorPicker
ray-cast cell picker for the reslice cursor
Definition: vtkResliceCursorPicker.h:45
vtkResliceCursorLineRepresentation::ResliceCursorActor
vtkResliceCursorActor * ResliceCursorActor
Definition: vtkResliceCursorLineRepresentation.h:123
vtkResliceCursorRepresentation.h
vtkWidgetRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkWidgetRepresentation.h:218
vtkResliceCursorLineRepresentation::MatrixView
vtkMatrix4x4 * MatrixView
Definition: vtkResliceCursorLineRepresentation.h:133
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorRepresentation.h:54
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkWidgetRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkWidgetRepresentation::Highlight
virtual void Highlight(int vtkNotUsed(highlightOn))
Definition: vtkWidgetRepresentation.h:140