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