VTK  9.1.0
vtkImageActorPointPlacer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageActorPointPlacer.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=========================================================================*/
26#ifndef vtkImageActorPointPlacer_h
27#define vtkImageActorPointPlacer_h
28
29#include "vtkInteractionWidgetsModule.h" // For export macro
30#include "vtkPointPlacer.h"
31
33class vtkImageActor;
34class vtkRenderer;
35
36class VTKINTERACTIONWIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
37{
38public:
43
45
49 void PrintSelf(ostream& os, vtkIndent indent) override;
51
61 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
62
68 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[2],
69 double worldPos[3], double worldOrient[9]) override;
70
77 int ValidateWorldPosition(double worldPos[3]) override;
78
83 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
84
91 int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]) override;
92
101 int UpdateInternalState() override;
102
104
111 vtkGetObjectMacro(ImageActor, vtkImageActor);
113
115
121 vtkSetVector6Macro(Bounds, double);
122 vtkGetVector6Macro(Bounds, double);
124
129 void SetWorldTolerance(double tol) override;
130
131protected:
134
135 // The reference image actor. Must be configured before this placer
136 // is used.
138
139 // The internal placer.
141
142 // Used to keep track of whether the bounds of the
143 // input image have changed
144 double SavedBounds[6];
145
146 // See the SetBounds method
147 double Bounds[6];
148
149private:
151 void operator=(const vtkImageActorPointPlacer&) = delete;
152};
153
154#endif
a placer that constrains a handle to a finite plane
Converts 2D display positions to world positions such that they lie on an ImageActor.
int UpdateWorldPosition(vtkRenderer *ren, double worldPos[3], double worldOrient[9]) override
Update the world position and orientation according the the current constraints of the placer.
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override
Given and renderer and a display position in pixels, find a world position and orientation.
void SetImageActor(vtkImageActor *)
Set / get the reference vtkImageActor used to place the points.
static vtkImageActorPointPlacer * New()
Instantiate this class.
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[2], double worldPos[3], double worldOrient[9]) override
This method is identical to the one above since the reference position is ignored by the bounded plan...
void SetWorldTolerance(double tol) override
Set the world tolerance.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override
This method is identical to the one above since the bounded plane point placer ignores orientation.
int ValidateWorldPosition(double worldPos[3]) override
This method validates a world position by checking to see if the world position is valid according to...
vtkBoundedPlanePointPlacer * Placer
int UpdateInternalState() override
A method for configuring the internal placer according to the constraints of the image actor.
~vtkImageActorPointPlacer() override
draw an image in a rendered 3D scene
a simple class to control print indentation
Definition: vtkIndent.h:113
Abstract interface to translate 2D display positions to world coordinates.
abstract specification for renderers
Definition: vtkRenderer.h:173