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 =========================================================================*/
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 
45 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorLineRepresentation : public vtkResliceCursorRepresentation
46 {
47 public:
52 
54 
58  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60 
62 
65  void BuildRepresentation() VTK_OVERRIDE;
66  int ComputeInteractionState(int X, int Y, int modify=0) VTK_OVERRIDE;
67  void StartWidgetInteraction(double startEventPos[2]) VTK_OVERRIDE;
68  void WidgetInteraction(double e[2]) VTK_OVERRIDE;
69  void Highlight(int highlightOn) VTK_OVERRIDE;
71 
73 
76  void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
77  int RenderOverlay(vtkViewport *viewport) VTK_OVERRIDE;
78  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
79  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
80  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
82 
87  double * GetBounds() VTK_OVERRIDE;
88 
90 
94  vtkGetObjectMacro( ResliceCursorActor, vtkResliceCursorActor );
96 
100  vtkResliceCursor * GetResliceCursor() VTK_OVERRIDE;
101 
105  virtual void SetUserMatrix( vtkMatrix4x4 *matrix);
106 
107 protected:
109  ~vtkResliceCursorLineRepresentation() VTK_OVERRIDE;
110 
111  vtkResliceCursorPolyDataAlgorithm * GetCursorAlgorithm() VTK_OVERRIDE;
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(
122  double displayPos[2], double intersectionPos[3] );
123 
124  vtkResliceCursorActor * ResliceCursorActor;
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.
133  vtkMatrix4x4 * MatrixReslice;
134  vtkMatrix4x4 * MatrixView;
135  vtkMatrix4x4 * MatrixReslicedView;
136 
137 private:
138  vtkResliceCursorLineRepresentation(const vtkResliceCursorLineRepresentation&) VTK_DELETE_FUNCTION;
139  void operator=(const vtkResliceCursorLineRepresentation&) VTK_DELETE_FUNCTION;
140 };
141 
142 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
abstract specification for Viewports
Definition: vtkViewport.h:44
generates a 2D reslice cursor polydata
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
represent the vtkResliceCursorWidget
Represent a reslice cursor.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
ray-cast cell picker for the reslice cursor
represent the vtkResliceCursorWidget
Geometry for a reslice cursor.