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=========================================================================*/
30#ifndef vtkResliceCursorPicker_h
31#define vtkResliceCursorPicker_h
32
33#include "vtkInteractionWidgetsModule.h" // For export macro
34#include "vtkPicker.h"
35
36class vtkPolyData;
37class vtkGenericCell;
39class vtkMatrix4x4;
40class vtkPlane;
41
42class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorPicker : public vtkPicker
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent);
48
55 virtual int Pick(double selectionX, double selectionY, double selectionZ,
56 vtkRenderer *renderer);
57
59
62 vtkGetMacro( PickedAxis1, int );
63 vtkGetMacro( PickedAxis2, int );
64 vtkGetMacro( PickedCenter, int );
66
68
73 vtkGetObjectMacro( ResliceCursorAlgorithm,
76
78
83 void Pick(
84 double displayPos[2], double world[3], vtkRenderer *ren );
85
86protected:
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
99private:
100
101 vtkGenericCell *Cell; //used to accelerate picking
102 vtkResliceCursorPolyDataAlgorithm * ResliceCursorAlgorithm;
103
104 int PickedAxis1;
105 int PickedAxis2;
106 int PickedCenter;
107 vtkMatrix4x4 * TransformMatrix;
108 vtkPlane * Plane;
109
110private:
111 vtkResliceCursorPicker(const vtkResliceCursorPicker&) VTK_DELETE_FUNCTION;
112 void operator=(const vtkResliceCursorPicker&) VTK_DELETE_FUNCTION;
113};
114
115#endif
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
superclass for 3D geometric pickers (uses ray cast)
Definition: vtkPicker.h:58
perform various plane computations
Definition: vtkPlane.h:38
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract specification for renderers
Definition: vtkRenderer.h:64
ray-cast cell picker for the reslice cursor
virtual int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer)
Perform pick operation with selection point provided.
void TransformPoint(double pIn[4], double pOut[4])
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void Pick(double displayPos[2], double world[3], vtkRenderer *ren)
Overloaded pick method that returns the picked coordinates of the current resliced plane in world coo...
virtual void SetResliceCursorAlgorithm(vtkResliceCursorPolyDataAlgorithm *)
Set the reslice cursor algorithm.
virtual void SetTransformMatrix(vtkMatrix4x4 *)
virtual int IntersectPointWithLine(double p1[3], double p2[3], double X[3], double tol)
virtual int IntersectPolyDataWithLine(double p1[3], double p2[3], vtkPolyData *, double tol)
void InverseTransformPoint(double pIn[4], double pOut[4])
static vtkResliceCursorPicker * New()
generates a 2D reslice cursor polydata