VTK
dox/Widgets/vtkImageActorPointPlacer.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageActorPointPlacer.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef __vtkImageActorPointPlacer_h
00029 #define __vtkImageActorPointPlacer_h
00030 
00031 #include "vtkPointPlacer.h"
00032 
00033 class vtkBoundedPlanePointPlacer;
00034 class vtkImageActor;
00035 class vtkRenderer;
00036 
00037 class VTK_WIDGETS_EXPORT vtkImageActorPointPlacer : public vtkPointPlacer
00038 {
00039 public:
00041   static vtkImageActorPointPlacer *New();
00042 
00044 
00045   vtkTypeMacro(vtkImageActorPointPlacer,vtkPointPlacer);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00056   int ComputeWorldPosition( vtkRenderer *ren,
00057                             double displayPos[2], 
00058                             double worldPos[3],
00059                             double worldOrient[9] );
00061   
00063 
00065   int ComputeWorldPosition( vtkRenderer *ren,
00066                             double displayPos[2], 
00067                             double refWorldPos[2],
00068                             double worldPos[3],
00069                             double worldOrient[9] );
00071   
00075   int ValidateWorldPosition( double worldPos[3] );
00076   
00078 
00080   int ValidateWorldPosition( double worldPos[3],
00081                              double worldOrient[9]);
00083   
00084 
00086 
00089   int UpdateWorldPosition( vtkRenderer *ren,
00090                            double worldPos[3],
00091                            double worldOrient[9]);
00093 
00099   int UpdateInternalState();
00100 
00102 
00106   void SetImageActor( vtkImageActor * );
00107   vtkGetObjectMacro( ImageActor, vtkImageActor );
00109 
00111 
00116   vtkSetVector6Macro( Bounds, double );
00117   vtkGetVector6Macro( Bounds, double );
00119 
00122   virtual void SetWorldTolerance( double s );
00123     
00124 protected:
00125   vtkImageActorPointPlacer();
00126   ~vtkImageActorPointPlacer();
00127 
00128 
00129   // The reference image actor. Must be configured before this placer
00130   // is used.
00131   vtkImageActor *ImageActor;
00132   
00133   // The internal placer.
00134   vtkBoundedPlanePointPlacer *Placer;
00135   
00136   // Used to keep track of whether the bounds of the
00137   // input image have changed
00138   double SavedBounds[6];
00139 
00140   // See the SetBounds method
00141   double Bounds[6];
00142   
00143 private:
00144   vtkImageActorPointPlacer(const vtkImageActorPointPlacer&);  //Not implemented
00145   void operator=(const vtkImageActorPointPlacer&);  //Not implemented
00146 };
00147 
00148 #endif