VTK  9.0.20201029
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 =========================================================================*/
28 #ifndef vtkImageOrthoPlanes_h
29 #define vtkImageOrthoPlanes_h
30 
31 #include "vtkInteractionWidgetsModule.h" // For export macro
32 #include "vtkObject.h"
33 
35 class vtkTransform;
36 class vtkMatrix4x4;
37 
38 class VTKINTERACTIONWIDGETS_EXPORT vtkImageOrthoPlanes : public vtkObject
39 {
40 public:
41  static vtkImageOrthoPlanes* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  void SetPlane(int i, vtkImagePlaneWidget* imagePlaneWidget);
50  vtkImagePlaneWidget* GetPlane(int i);
52 
56  void ResetPlanes();
57 
61  vtkTransform* GetTransform() { return this->Transform; }
62 
66  void HandlePlaneEvent(vtkImagePlaneWidget* imagePlaneWidget);
67 
68 protected:
70  ~vtkImageOrthoPlanes() override;
71 
72  void HandlePlaneRotation(vtkImagePlaneWidget* imagePlaneWidget, int indexOfModifiedPlane);
73  void HandlePlanePush(vtkImagePlaneWidget* imagePlaneWidget, int indexOfModifiedPlane);
74  void HandlePlaneTranslate(vtkImagePlaneWidget* imagePlaneWidget, int indexOfModifiedPlane);
75  void HandlePlaneScale(vtkImagePlaneWidget* imagePlaneWidget, int indexOfModifiedPlane);
76 
77  void SetTransformMatrix(
78  vtkMatrix4x4* matrix, vtkImagePlaneWidget* currentImagePlane, int indexOfModifiedPlane);
79 
80  void GetBounds(double bounds[3]);
81 
82  // The plane definitions prior to any rotations or scales
83  double Origin[3][3];
84  double Point1[3][3];
85  double Point2[3][3];
86 
87  // The current position and orientation of the bounding box with
88  // respect to the origin.
90 
91  // An array to hold the planes
93 
94  // The number of planes.
96 
97  // The observer tags for these planes
98  long* ObserverTags;
99 
100 private:
101  vtkImageOrthoPlanes(const vtkImageOrthoPlanes&) = delete;
102  void operator=(const vtkImageOrthoPlanes&) = delete;
103 };
104 
105 #endif
vtkImageOrthoPlanes::GetTransform
vtkTransform * GetTransform()
Get the transform for the planes.
Definition: vtkImageOrthoPlanes.h:61
vtkImageOrthoPlanes
Connect three vtkImagePlaneWidgets together.
Definition: vtkImageOrthoPlanes.h:38
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkImageOrthoPlanes::Planes
vtkImagePlaneWidget ** Planes
Definition: vtkImageOrthoPlanes.h:92
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
vtkX3D::Transform
Definition: vtkX3D.h:47
vtkBlockSortHelper::GetBounds
void GetBounds(T a, double bds[6])
Definition: vtkBlockSortHelper.h:37
vtkImageOrthoPlanes::Transform
vtkTransform * Transform
Definition: vtkImageOrthoPlanes.h:89
vtkImageOrthoPlanes::NumberOfPlanes
int NumberOfPlanes
Definition: vtkImageOrthoPlanes.h:95
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkImageOrthoPlanes::ObserverTags
long * ObserverTags
Definition: vtkImageOrthoPlanes.h:98
vtkImagePlaneWidget
3D widget for reslicing image data
Definition: vtkImagePlaneWidget.h:144