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