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 =========================================================================*/
28 #ifndef vtkImageActorPointPlacer_h
29 #define vtkImageActorPointPlacer_h
30 
31 #include "vtkInteractionWidgetsModule.h" // For export macro
32 #include "vtkPointPlacer.h"
33 
35 class vtkImageActor;
36 class vtkRenderer;
37 
39 {
40 public:
42  static vtkImageActorPointPlacer *New();
43 
45 
47  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
58  double displayPos[2],
59  double worldPos[3],
60  double worldOrient[9] );
62 
64 
67  double displayPos[2],
68  double refWorldPos[2],
69  double worldPos[3],
70  double worldOrient[9] );
72 
76  int ValidateWorldPosition( double worldPos[3] );
77 
79 
81  int ValidateWorldPosition( double worldPos[3],
82  double worldOrient[9]);
84 
85 
87 
91  double worldPos[3],
92  double worldOrient[9]);
94 
100  int UpdateInternalState();
101 
103 
107  void SetImageActor( vtkImageActor * );
108  vtkGetObjectMacro( ImageActor, vtkImageActor );
110 
112 
117  vtkSetVector6Macro( Bounds, double );
118  vtkGetVector6Macro( Bounds, double );
120 
123  virtual void SetWorldTolerance( double s );
124 
125 protected:
128 
129 
130  // The reference image actor. Must be configured before this placer
131  // is used.
133 
134  // The internal placer.
136 
137  // Used to keep track of whether the bounds of the
138  // input image have changed
139  double SavedBounds[6];
140 
141  // See the SetBounds method
142  double Bounds[6];
143 
144 private:
145  vtkImageActorPointPlacer(const vtkImageActorPointPlacer&); //Not implemented
146  void operator=(const vtkImageActorPointPlacer&); //Not implemented
147 };
148 
149 #endif
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
Converts 2D display positions to world positions such that they lie on an ImageActor.
abstract specification for renderers
Definition: vtkRenderer.h:63
void PrintSelf(ostream &os, vtkIndent indent)
a placer that constrains a handle to a finite plane
#define VTKINTERACTIONWIDGETS_EXPORT
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:48
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkBoundedPlanePointPlacer * Placer
Abstract interface to translate 2D display positions to world coordinates.
virtual int UpdateWorldPosition(vtkRenderer *ren, double worldPos[3], double worldOrient[9])
virtual void SetWorldTolerance(double)
virtual int ValidateWorldPosition(double worldPos[3])
static vtkPointPlacer * New()
virtual int UpdateInternalState()