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 =========================================================================*/
29 #ifndef vtkImageActorPointPlacer_h
30 #define vtkImageActorPointPlacer_h
31 
32 #include "vtkInteractionWidgetsModule.h" // For export macro
33 #include "vtkPointPlacer.h"
34 
36 class vtkImageActor;
37 class vtkRenderer;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
40 {
41 public:
46 
48 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
64  double displayPos[2],
65  double worldPos[3],
66  double worldOrient[9] ) override;
67 
74  double displayPos[2],
75  double refWorldPos[2],
76  double worldPos[3],
77  double worldOrient[9] ) override;
78 
85  int ValidateWorldPosition( double worldPos[3] ) override;
86 
91  int ValidateWorldPosition( double worldPos[3],
92  double worldOrient[9]) override;
93 
94 
102  double worldPos[3],
103  double worldOrient[9]) override;
104 
113  int UpdateInternalState() override;
114 
116 
123  vtkGetObjectMacro( ImageActor, vtkImageActor );
125 
127 
133  vtkSetVector6Macro( Bounds, double );
134  vtkGetVector6Macro( Bounds, double );
136 
141  void SetWorldTolerance( double s ) override;
142 
143 protected:
146 
147 
148  // The reference image actor. Must be configured before this placer
149  // is used.
151 
152  // The internal placer.
154 
155  // Used to keep track of whether the bounds of the
156  // input image have changed
157  double SavedBounds[6];
158 
159  // See the SetBounds method
160  double Bounds[6];
161 
162 private:
164  void operator=(const vtkImageActorPointPlacer&) = delete;
165 };
166 
167 #endif
vtkImageActorPointPlacer::ComputeWorldPosition
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...
vtkImageActorPointPlacer::~vtkImageActorPointPlacer
~vtkImageActorPointPlacer() override
vtkImageActorPointPlacer::SetWorldTolerance
void SetWorldTolerance(double s) override
Set the world tolerance.
vtkBoundedPlanePointPlacer
a placer that constrains a handle to a finite plane
Definition: vtkBoundedPlanePointPlacer.h:42
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:50
vtkImageActorPointPlacer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageActorPointPlacer::UpdateInternalState
int UpdateInternalState() override
A method for configuring the internal placer according to the constraints of the image actor.
vtkImageActorPointPlacer::SetImageActor
void SetImageActor(vtkImageActor *)
Set / get the reference vtkImageActor used to place the points.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageActorPointPlacer::UpdateWorldPosition
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.
vtkImageActorPointPlacer::ValidateWorldPosition
int ValidateWorldPosition(double worldPos[3]) override
This method validates a world position by checking to see if the world position is valid according to...
vtkImageActorPointPlacer::Placer
vtkBoundedPlanePointPlacer * Placer
Definition: vtkImageActorPointPlacer.h:153
vtkImageActorPointPlacer::New
static vtkImageActorPointPlacer * New()
Instantiate this class.
vtkImageActorPointPlacer::ImageActor
vtkImageActor * ImageActor
Definition: vtkImageActorPointPlacer.h:150
vtkImageActorPointPlacer::vtkImageActorPointPlacer
vtkImageActorPointPlacer()
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:50
vtkImageActorPointPlacer
Converts 2D display positions to world positions such that they lie on an ImageActor.
Definition: vtkImageActorPointPlacer.h:40
vtkPointPlacer.h
vtkImageActorPointPlacer::ValidateWorldPosition
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.
vtkImageActorPointPlacer::ComputeWorldPosition
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.