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);
66 
68 
71  virtual void BuildRepresentation();
72  virtual int ComputeInteractionState(int X, int Y, int modify=0);
73  virtual void StartWidgetInteraction(double startEventPos[2]);
74  virtual void WidgetInteraction(double e[2]);
75  virtual void Highlight(int highlightOn);
77 
79 
82  virtual void ReleaseGraphicsResources(vtkWindow *w);
83  virtual int RenderOverlay(vtkViewport *viewport);
84  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
85  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
86  virtual int HasTranslucentPolygonalGeometry();
88 
93  virtual double * GetBounds();
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] );
127  int DisplayToReslicePlaneIntersection(
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&) VTK_DELETE_FUNCTION;
146 };
147 
148 #endif
vtkWidgetRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
Definition: vtkWidgetRepresentation.h:130
vtkResliceCursorLineRepresentation::Picker
vtkResliceCursorPicker * Picker
Definition: vtkResliceCursorLineRepresentation.h:131
vtkResliceCursorRepresentation::BuildRepresentation
virtual void BuildRepresentation()
These are methods that satisfy vtkWidgetRepresentation's API.
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:46
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkWidgetRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:186
vtkWidgetRepresentation::GetBounds
virtual double * GetBounds()
Methods to make this class behave as a vtkProp.
Definition: vtkWidgetRepresentation.h:181
vtkResliceCursorLineRepresentation::MatrixReslicedView
vtkMatrix4x4 * MatrixReslicedView
Definition: vtkResliceCursorLineRepresentation.h:141
vtkWidgetRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkWidgetRepresentation.h:191
vtkResliceCursorRepresentation::GetCursorAlgorithm
virtual vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm()=0
Get the underlying cursor source.
vtkWidgetRepresentation::WidgetInteraction
virtual void WidgetInteraction(double newEventPos[2])
Definition: vtkWidgetRepresentation.h:131
vtkResliceCursorLineRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorLineRepresentation.h:51
vtkResliceCursorPolyDataAlgorithm
generates a 2D reslice cursor polydata
Definition: vtkResliceCursorPolyDataAlgorithm.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
vtkWidgetRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
Definition: vtkWidgetRepresentation.h:188
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkResliceCursorActor
Represent a reslice cursor.
Definition: vtkResliceCursorActor.h:40
vtkResliceCursorLineRepresentation::MatrixReslice
vtkMatrix4x4 * MatrixReslice
Definition: vtkResliceCursorLineRepresentation.h:139
vtkResliceCursorRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))
Definition: vtkWidgetRepresentation.h:189
vtkResliceCursorPicker
ray-cast cell picker for the reslice cursor
Definition: vtkResliceCursorPicker.h:42
vtkResliceCursorLineRepresentation::ResliceCursorActor
vtkResliceCursorActor * ResliceCursorActor
Definition: vtkResliceCursorLineRepresentation.h:130
vtkResliceCursorRepresentation.h
vtkWidgetRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
Definition: vtkWidgetRepresentation.h:187
vtkResliceCursorLineRepresentation::MatrixView
vtkMatrix4x4 * MatrixView
Definition: vtkResliceCursorLineRepresentation.h:140
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition: vtkResliceCursorRepresentation.h:51
vtkWidgetRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkWidgetRepresentation::Highlight
virtual void Highlight(int vtkNotUsed(highlightOn))
Definition: vtkWidgetRepresentation.h:136