VTK  9.2.6
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=========================================================================*/
28
29#ifndef vtkImageActorPointPlacer_h
30#define vtkImageActorPointPlacer_h
31
32#include "vtkInteractionWidgetsModule.h" // For export macro
33#include "vtkPointPlacer.h"
34
36class vtkImageActor;
37class vtkRenderer;
38
39class VTKINTERACTIONWIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
40{
41public:
46
48
52 void PrintSelf(ostream& os, vtkIndent indent) override;
54
64 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
65
71 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[2],
72 double worldPos[3], double worldOrient[9]) override;
73
80 int ValidateWorldPosition(double worldPos[3]) override;
81
86 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
87
94 int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]) override;
95
104 int UpdateInternalState() override;
105
107
114 vtkGetObjectMacro(ImageActor, vtkImageActor);
116
118
124 vtkSetVector6Macro(Bounds, double);
125 vtkGetVector6Macro(Bounds, double);
127
132 void SetWorldTolerance(double tol) override;
133
134protected:
137
138 // The reference image actor. Must be configured before this placer
139 // is used.
141
142 // The internal placer.
144
145 // Used to keep track of whether the bounds of the
146 // input image have changed
147 double SavedBounds[6];
148
149 // See the SetBounds method
150 double Bounds[6];
151
152private:
154 void operator=(const vtkImageActorPointPlacer&) = delete;
155};
156
157#endif
a placer that constrains a handle to a finite plane
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:40
abstract specification for renderers
Definition vtkRenderer.h:73