VTK  9.3.0
vtkImageActorPointPlacer.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
17 #ifndef vtkImageActorPointPlacer_h
18 #define vtkImageActorPointPlacer_h
19 
20 #include "vtkInteractionWidgetsModule.h" // For export macro
21 #include "vtkPointPlacer.h"
22 
23 VTK_ABI_NAMESPACE_BEGIN
25 class vtkImageActor;
26 class vtkRenderer;
27 
28 class VTKINTERACTIONWIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
29 {
30 public:
35 
37 
41  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
53  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
54 
60  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[2],
61  double worldPos[3], double worldOrient[9]) override;
62 
69  int ValidateWorldPosition(double worldPos[3]) override;
70 
75  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
76 
83  int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]) override;
84 
93  int UpdateInternalState() override;
94 
96 
103  vtkGetObjectMacro(ImageActor, vtkImageActor);
105 
107 
113  vtkSetVector6Macro(Bounds, double);
114  vtkGetVector6Macro(Bounds, double);
116 
121  void SetWorldTolerance(double tol) override;
122 
123 protected:
126 
127  // The reference image actor. Must be configured before this placer
128  // is used.
130 
131  // The internal placer.
133 
134  // Used to keep track of whether the bounds of the
135  // input image have changed
136  double SavedBounds[6];
137 
138  // See the SetBounds method
139  double Bounds[6];
140 
141 private:
143  void operator=(const vtkImageActorPointPlacer&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #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.
static vtkImageActorPointPlacer * New()
Instantiate this class.
void SetImageActor(vtkImageActor *)
Set / get the reference vtkImageActor used to place the points.
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
Definition: vtkImageActor.h:38
a simple class to control print indentation
Definition: vtkIndent.h:29
Abstract interface to translate 2D display positions to world coordinates.
abstract specification for renderers
Definition: vtkRenderer.h:62