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 "vtkInteractionWidgetsModule.h" // For export macro
34 #include "vtkObject.h"
35 
37 class vtkTransform;
38 class vtkMatrix4x4;
39 
41 {
42 public:
43  static vtkImageOrthoPlanes *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  void SetPlane(int i, vtkImagePlaneWidget *imagePlaneWidget);
50  vtkImagePlaneWidget* GetPlane(int i);
52 
54  void ResetPlanes();
55 
57  vtkTransform *GetTransform() { return this->Transform; };
58 
60  void HandlePlaneEvent(vtkImagePlaneWidget *imagePlaneWidget);
61 
62 protected:
65 
66  void HandlePlaneRotation(vtkImagePlaneWidget *imagePlaneWidget,
67  int indexOfModifiedPlane);
68  void HandlePlanePush(vtkImagePlaneWidget *imagePlaneWidget,
69  int indexOfModifiedPlane);
70  void HandlePlaneTranslate(vtkImagePlaneWidget *imagePlaneWidget,
71  int indexOfModifiedPlane);
72  void HandlePlaneScale(vtkImagePlaneWidget *imagePlaneWidget,
73  int indexOfModifiedPlane);
74 
75  void SetTransformMatrix(vtkMatrix4x4 *matrix,
76  vtkImagePlaneWidget *currentImagePlane,
77  int indexOfModifiedPlane);
78 
79  void GetBounds(double bounds[3]);
80 
81  // The plane definitions prior to any rotations or scales
82  double Origin[3][3];
83  double Point1[3][3];
84  double Point2[3][3];
85 
86  // The current position and orientation of the bounding box with
87  // respect to the origin.
89 
90  // An array to hold the planes
92 
93  // The number of planes.
95 
96  // The observer tags for these planes
97  long *ObserverTags;
98 
99 private:
100  vtkImageOrthoPlanes(const vtkImageOrthoPlanes&); // Not implemented.
101  void operator=(const vtkImageOrthoPlanes&); // Not implemented.
102 };
103 
104 #endif
105 
106 
abstract base class for most VTK objects
Definition: vtkObject.h:61
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
Connect three vtkImagePlaneWidgets together.
vtkTransform * Transform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
#define VTKINTERACTIONWIDGETS_EXPORT
vtkImagePlaneWidget ** Planes
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkTransform * GetTransform()
3D widget for reslicing image data
static vtkObject * New()