VTK
dox/Widgets/vtkImageOrthoPlanes.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageOrthoPlanes.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 =========================================================================*/
00030 #ifndef __vtkImageOrthoPlanes_h
00031 #define __vtkImageOrthoPlanes_h
00032 
00033 #include "vtkObject.h"
00034 
00035 class vtkImagePlaneWidget;
00036 class vtkTransform;
00037 class vtkMatrix4x4;
00038 
00039 class VTK_WIDGETS_EXPORT vtkImageOrthoPlanes : public vtkObject
00040 {
00041 public:
00042   static vtkImageOrthoPlanes *New();
00043   vtkTypeMacro(vtkImageOrthoPlanes,vtkObject);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045   
00047 
00048   void SetPlane(int i, vtkImagePlaneWidget *imagePlaneWidget);
00049   vtkImagePlaneWidget* GetPlane(int i);
00051 
00053   void ResetPlanes();
00054 
00056   vtkTransform *GetTransform() { return this->Transform; };
00057 
00059   void HandlePlaneEvent(vtkImagePlaneWidget *imagePlaneWidget);
00060 
00061 protected:
00062   vtkImageOrthoPlanes();
00063   ~vtkImageOrthoPlanes();
00064 
00065   void HandlePlaneRotation(vtkImagePlaneWidget *imagePlaneWidget,
00066                            int indexOfModifiedPlane);
00067   void HandlePlanePush(vtkImagePlaneWidget *imagePlaneWidget,
00068                        int indexOfModifiedPlane);
00069   void HandlePlaneTranslate(vtkImagePlaneWidget *imagePlaneWidget,
00070                             int indexOfModifiedPlane);
00071   void HandlePlaneScale(vtkImagePlaneWidget *imagePlaneWidget,
00072                        int indexOfModifiedPlane);
00073 
00074   void SetTransformMatrix(vtkMatrix4x4 *matrix,
00075                           vtkImagePlaneWidget *currentImagePlane,
00076                           int indexOfModifiedPlane);
00077   
00078   void GetBounds(double bounds[3]);
00079 
00080   // The plane definitions prior to any rotations or scales
00081   double Origin[3][3];
00082   double Point1[3][3];
00083   double Point2[3][3];
00084   
00085   // The current position and orientation of the bounding box with
00086   // respect to the origin.
00087   vtkTransform *Transform;
00088 
00089   // An array to hold the planes
00090   vtkImagePlaneWidget** Planes;
00091  
00092   // The number of planes.
00093   int NumberOfPlanes;
00094 
00095   // The observer tags for these planes
00096   long *ObserverTags;
00097 
00098 private:
00099   vtkImageOrthoPlanes(const vtkImageOrthoPlanes&);  // Not implemented.
00100   void operator=(const vtkImageOrthoPlanes&);  // Not implemented.
00101 };
00102 
00103 #endif
00104 
00105