VTK
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 
33 class vtkImageActor;
34 class vtkRenderer;
35 
36 class VTKINTERACTIONWIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
37 {
38 public:
42  static vtkImageActorPointPlacer *New();
43 
45 
49  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
51 
61  double displayPos[2],
62  double worldPos[3],
63  double worldOrient[9] ) VTK_OVERRIDE;
64 
71  double displayPos[2],
72  double refWorldPos[2],
73  double worldPos[3],
74  double worldOrient[9] ) VTK_OVERRIDE;
75 
82  int ValidateWorldPosition( double worldPos[3] ) VTK_OVERRIDE;
83 
88  int ValidateWorldPosition( double worldPos[3],
89  double worldOrient[9]) VTK_OVERRIDE;
90 
91 
99  double worldPos[3],
100  double worldOrient[9]) VTK_OVERRIDE;
101 
110  int UpdateInternalState() VTK_OVERRIDE;
111 
113 
119  void SetImageActor( vtkImageActor * );
120  vtkGetObjectMacro( ImageActor, vtkImageActor );
122 
124 
130  vtkSetVector6Macro( Bounds, double );
131  vtkGetVector6Macro( Bounds, double );
133 
138  void SetWorldTolerance( double s ) VTK_OVERRIDE;
139 
140 protected:
142  ~vtkImageActorPointPlacer() VTK_OVERRIDE;
143 
144 
145  // The reference image actor. Must be configured before this placer
146  // is used.
147  vtkImageActor *ImageActor;
148 
149  // The internal placer.
151 
152  // Used to keep track of whether the bounds of the
153  // input image have changed
154  double SavedBounds[6];
155 
156  // See the SetBounds method
157  double Bounds[6];
158 
159 private:
160  vtkImageActorPointPlacer(const vtkImageActorPointPlacer&) VTK_DELETE_FUNCTION;
161  void operator=(const vtkImageActorPointPlacer&) VTK_DELETE_FUNCTION;
162 };
163 
164 #endif
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
Given a renderer and a display position in pixel coordinates, compute the world position and orientat...
Converts 2D display positions to world positions such that they lie on an ImageActor.
abstract specification for renderers
Definition: vtkRenderer.h:57
a placer that constrains a handle to a finite plane
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:43
a simple class to control print indentation
Definition: vtkIndent.h:33
Abstract interface to translate 2D display positions to world coordinates.
virtual int UpdateWorldPosition(vtkRenderer *ren, double worldPos[3], double worldOrient[9])
Given a current renderer, world position and orientation, update them according to the constraints of...
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
static vtkPointPlacer * New()
Instantiate this class.
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.