VTK  9.3.0
vtkResliceCursorPicker.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18#ifndef vtkResliceCursorPicker_h
19#define vtkResliceCursorPicker_h
20
21#include "vtkInteractionWidgetsModule.h" // For export macro
22#include "vtkPicker.h"
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkPolyData;
26class vtkGenericCell;
28class vtkMatrix4x4;
29class vtkPlane;
30
31class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorPicker : public vtkPicker
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
44 int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer* renderer) override;
45
47
50 vtkGetMacro(PickedAxis1, int);
51 vtkGetMacro(PickedAxis2, int);
52 vtkGetMacro(PickedCenter, int);
54
56
60 vtkGetObjectMacro(ResliceCursorAlgorithm, vtkResliceCursorPolyDataAlgorithm);
62
64
69 void Pick(double displayPos[2], double world[3], vtkRenderer* ren);
70
71protected:
74
75 virtual int IntersectPolyDataWithLine(double p1[3], double p2[3], vtkPolyData*, double tol);
76 virtual int IntersectPointWithLine(double p1[3], double p2[3], double X[3], double tol);
77
79 void TransformPoint(double pIn[4], double pOut[4]);
80 void InverseTransformPoint(double pIn[4], double pOut[4]);
81
82 // Helper members
83 vtkGenericCell* Cell; // used to accelerate picking
85
91
92private:
94 void operator=(const vtkResliceCursorPicker&) = delete;
95};
96
97VTK_ABI_NAMESPACE_END
98#endif
provides thread-safe access to cells
a simple class to control print indentation
Definition vtkIndent.h:29
represent and manipulate 4x4 transformation matrices
superclass for 3D geometric pickers (uses ray cast)
Definition vtkPicker.h:48
perform various plane computations
Definition vtkPlane.h:26
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
abstract specification for renderers
Definition vtkRenderer.h:59
ray-cast cell picker for the reslice cursor
void TransformPoint(double pIn[4], double pOut[4])
~vtkResliceCursorPicker() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceCursorPolyDataAlgorithm * ResliceCursorAlgorithm
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)
int Pick(double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer) override
Perform pick operation with selection point provided.
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