VTK
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 =========================================================================*/
38 #ifndef vtkResliceCursorLineRepresentation_h
39 #define vtkResliceCursorLineRepresentation_h
40 
41 #include "vtkInteractionWidgetsModule.h" // For export macro
43 
44 class vtkPolyData;
48 class vtkResliceCursor;
49 
50 
51 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorLineRepresentation : public vtkResliceCursorRepresentation
52 {
53 public:
58 
60 
64  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
68 
71  void BuildRepresentation() override;
72  int ComputeInteractionState(int X, int Y, int modify=0) override;
73  void StartWidgetInteraction(double startEventPos[2]) override;
74  void WidgetInteraction(double e[2]) override;
75  void Highlight(int highlightOn) override;
77 
79 
83  int RenderOverlay(vtkViewport *viewport) override;
84  int RenderOpaqueGeometry(vtkViewport *viewport) override;
88 
93  double * GetBounds() override;
94 
96 
100  vtkGetObjectMacro( ResliceCursorActor, vtkResliceCursorActor );
102 
107 
111  virtual void SetUserMatrix( vtkMatrix4x4 *matrix);
112 
113 protected:
116 
118 
119  double RotateAxis( double evenPos[2], int axis );
120 
121  void RotateAxis( int axis, double angle );
122 
123  void RotateVectorAboutVector( double vectorToBeRotated[3],
124  double axis[3], // vector about which we rotate
125  double angle, // angle in radians
126  double o[3] );
128  double displayPos[2], double intersectionPos[3] );
129 
132 
133  double StartPickPosition[3];
134  double StartCenterPosition[3];
135 
136  // Transformation matrices. These have no offset. Offset is recomputed
137  // based on the cursor, so that the center of the cursor has the same
138  // location in transformed space as it does in physical space.
142 
143 private:
145  void operator=(const vtkResliceCursorLineRepresentation&) = delete;
146 };
147 
148 #endif
vtkResliceCursorLineRepresentation::RotateAxis
void RotateAxis(int axis, double angle)
vtkResliceCursorLineRepresentation::Picker
vtkResliceCursorPicker * Picker
Definition: vtkResliceCursorLineRepresentation.h:131
vtkResliceCursorLineRepresentation::WidgetInteraction
void WidgetInteraction(double e[2]) override
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:47
vtkResliceCursorLineRepresentation::Highlight
void Highlight(int highlightOn) override
vtkResliceCursorLineRepresentation::GetCursorAlgorithm
vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm() override
Get the underlying cursor source.
vtkResliceCursorLineRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkResliceCursorLineRepresentation::MatrixReslicedView
vtkMatrix4x4 * MatrixReslicedView
Definition: vtkResliceCursorLineRepresentation.h:141
vtkResliceCursorLineRepresentation::SetUserMatrix
virtual void SetUserMatrix(vtkMatrix4x4 *matrix)
Set the user matrix on all the internal actors.
vtkResliceCursorLineRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorLineRepresentation.h:52
vtkResliceCursorPolyDataAlgorithm
generates a 2D reslice cursor polydata
Definition: vtkResliceCursorPolyDataAlgorithm.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
vtkResliceCursorLineRepresentation::GetResliceCursor
vtkResliceCursor * GetResliceCursor() override
Get the reslice cursor.
vtkResliceCursorLineRepresentation::New
static vtkResliceCursorLineRepresentation * New()
Instantiate the class.
vtkResliceCursorLineRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkResliceCursorLineRepresentation::RotateVectorAboutVector
void RotateVectorAboutVector(double vectorToBeRotated[3], double axis[3], double angle, double o[3])
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkResliceCursorLineRepresentation::RotateAxis
double RotateAxis(double evenPos[2], int axis)
vtkResliceCursorLineRepresentation::BuildRepresentation
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkResliceCursorLineRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
vtkResliceCursorActor
Represent a reslice cursor.
Definition: vtkResliceCursorActor.h:41
vtkResliceCursorLineRepresentation::MatrixReslice
vtkMatrix4x4 * MatrixReslice
Definition: vtkResliceCursorLineRepresentation.h:139
vtkResliceCursorLineRepresentation::vtkResliceCursorLineRepresentation
vtkResliceCursorLineRepresentation()
vtkResliceCursorLineRepresentation::DisplayToReslicePlaneIntersection
int DisplayToReslicePlaneIntersection(double displayPos[2], double intersectionPos[3])
vtkResliceCursorLineRepresentation::ComputeInteractionState
int ComputeInteractionState(int X, int Y, int modify=0) override
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkResliceCursorLineRepresentation::~vtkResliceCursorLineRepresentation
~vtkResliceCursorLineRepresentation() override
vtkResliceCursorPicker
ray-cast cell picker for the reslice cursor
Definition: vtkResliceCursorPicker.h:43
vtkResliceCursorLineRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
vtkResliceCursorLineRepresentation::ResliceCursorActor
vtkResliceCursorActor * ResliceCursorActor
Definition: vtkResliceCursorLineRepresentation.h:130
vtkResliceCursorLineRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceCursorRepresentation.h
vtkResliceCursorLineRepresentation::StartWidgetInteraction
void StartWidgetInteraction(double startEventPos[2]) override
vtkResliceCursorLineRepresentation::GetBounds
double * GetBounds() override
Get the bounds of this prop.
vtkResliceCursorLineRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *viewport) override
vtkResliceCursorLineRepresentation::MatrixView
vtkMatrix4x4 * MatrixView
Definition: vtkResliceCursorLineRepresentation.h:140
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorRepresentation.h:55
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69