VTK
vtkImageOrthoPlanes.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageOrthoPlanes.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 =========================================================================*/
30 #ifndef __vtkImageOrthoPlanes_h
31 #define __vtkImageOrthoPlanes_h
32 
33 #include "vtkObject.h"
34 
36 class vtkTransform;
37 class vtkMatrix4x4;
38 
40 {
41 public:
42  static vtkImageOrthoPlanes *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  void SetPlane(int i, vtkImagePlaneWidget *imagePlaneWidget);
49  vtkImagePlaneWidget* GetPlane(int i);
51 
53  void ResetPlanes();
54 
56  vtkTransform *GetTransform() { return this->Transform; };
57 
59  void HandlePlaneEvent(vtkImagePlaneWidget *imagePlaneWidget);
60 
61 protected:
64 
65  void HandlePlaneRotation(vtkImagePlaneWidget *imagePlaneWidget,
66  int indexOfModifiedPlane);
67  void HandlePlanePush(vtkImagePlaneWidget *imagePlaneWidget,
68  int indexOfModifiedPlane);
69  void HandlePlaneTranslate(vtkImagePlaneWidget *imagePlaneWidget,
70  int indexOfModifiedPlane);
71  void HandlePlaneScale(vtkImagePlaneWidget *imagePlaneWidget,
72  int indexOfModifiedPlane);
73 
74  void SetTransformMatrix(vtkMatrix4x4 *matrix,
75  vtkImagePlaneWidget *currentImagePlane,
76  int indexOfModifiedPlane);
77 
78  void GetBounds(double bounds[3]);
79 
80  // The plane definitions prior to any rotations or scales
81  double Origin[3][3];
82  double Point1[3][3];
83  double Point2[3][3];
84 
85  // The current position and orientation of the bounding box with
86  // respect to the origin.
88 
89  // An array to hold the planes
91 
92  // The number of planes.
94 
95  // The observer tags for these planes
96  long *ObserverTags;
97 
98 private:
99  vtkImageOrthoPlanes(const vtkImageOrthoPlanes&); // Not implemented.
100  void operator=(const vtkImageOrthoPlanes&); // Not implemented.
101 };
102 
103 #endif
104 
105