VTK
vtkResliceCursorPicker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPicker.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 vtkResliceCursorPicker_h
33 #define vtkResliceCursorPicker_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 #include "vtkPicker.h"
37 
38 class vtkPolyData;
39 class vtkGenericCell;
41 class vtkIdList;
42 class vtkMatrix4x4;
43 class vtkPlane;
44 
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
57  virtual int Pick(double selectionX, double selectionY, double selectionZ,
58  vtkRenderer *renderer);
60 
62 
63  vtkGetMacro( PickedAxis1, int );
64  vtkGetMacro( PickedAxis2, int );
65  vtkGetMacro( PickedCenter, int );
67 
69 
72  vtkGetObjectMacro( ResliceCursorAlgorithm,
75 
76  virtual void SetTransformMatrix( vtkMatrix4x4 * );
77 
79 
82  void Pick(
83  double displayPos[2], double world[3], vtkRenderer *ren );
85 
86 protected:
89 
91  double p1[3], double p2[3], vtkPolyData *, double tol );
93  double p1[3], double p2[3], double X[3], double tol );
94 
96  void TransformPoint( double pIn[4], double pOut[4] );
97  void InverseTransformPoint( double pIn[4], double pOut[4] );
98 
99 private:
100 
101  vtkGenericCell *Cell; //used to accelerate picking
102  vtkResliceCursorPolyDataAlgorithm * ResliceCursorAlgorithm;
103 
104  int PickedAxis1;
105  int PickedAxis2;
106  int PickedCenter;
107  vtkIdList *PointIds;
108  vtkMatrix4x4 * TransformMatrix;
109  vtkPlane * Plane;
110 
111 private:
112  vtkResliceCursorPicker(const vtkResliceCursorPicker&); // Not implemented.
113  void operator=(const vtkResliceCursorPicker&); // Not implemented.
114 };
115 
116 #endif
vtkResliceCursorPicker::TransformPoint
void TransformPoint(double pIn[4], double pOut[4])
vtkPlane
perform various plane computations
Definition: vtkPlane.h:37
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkResliceCursorPicker::IntersectPointWithLine
virtual int IntersectPointWithLine(double p1[3], double p2[3], double X[3], double tol)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkResliceCursorPicker::Pick
virtual int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer)
vtkInteractionWidgetsModule.h
vtkResliceCursorPicker::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPicker
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:60
vtkResliceCursorPicker::~vtkResliceCursorPicker
~vtkResliceCursorPicker()
vtkResliceCursorPicker::vtkResliceCursorPicker
vtkResliceCursorPicker()
vtkResliceCursorPicker::TransformPlane
void TransformPlane()
vtkResliceCursorPicker::SetResliceCursorAlgorithm
virtual void SetResliceCursorAlgorithm(vtkResliceCursorPolyDataAlgorithm *)
vtkResliceCursorPicker::New
static vtkResliceCursorPicker * New()
vtkResliceCursorPolyDataAlgorithm
generates a 2D reslice cursor polydata
Definition: vtkResliceCursorPolyDataAlgorithm.h:45
vtkResliceCursorPicker::InverseTransformPoint
void InverseTransformPoint(double pIn[4], double pOut[4])
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:39
vtkResliceCursorPicker::SetTransformMatrix
virtual void SetTransformMatrix(vtkMatrix4x4 *)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkPicker.h
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:42
vtkResliceCursorPicker
ray-cast cell picker for the reslice cursor
Definition: vtkResliceCursorPicker.h:46
vtkResliceCursorPicker::IntersectPolyDataWithLine
virtual int IntersectPolyDataWithLine(double p1[3], double p2[3], vtkPolyData *, double tol)
vtkResliceCursorPicker::Pick
void Pick(double displayPos[2], double world[3], vtkRenderer *ren)