Slicer  4.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkOrientedImageData.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16  and was supported through the Applied Cancer Research Unit program of Cancer Care
17  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18 
19 ==============================================================================*/
20 
21 #ifndef __vtkOrientedImageData_h
22 #define __vtkOrientedImageData_h
23 
24 // Segmentation includes
25 #include "vtkSegmentationCoreConfigure.h"
26 
27 #include "vtkImageData.h"
28 
29 class vtkMatrix4x4;
30 
36 class vtkSegmentationCore_EXPORT vtkOrientedImageData : public vtkImageData
37 {
38 public:
39  static vtkOrientedImageData *New();
40  vtkTypeMacro(vtkOrientedImageData,vtkImageData);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44  void ShallowCopy(vtkDataObject *src) override;
46  void DeepCopy(vtkDataObject *src) override;
48  virtual void CopyDirections(vtkDataObject *src);
49 
50 public:
52  void SetDirections(double dirs[3][3]);
54  void SetDirections(double ir, double ia, double is,
55  double jr, double ja, double js,
56  double kr, double ka, double ks);
57 
58  void GetDirections(double dirs[3][3]);
59 
61  double GetMinSpacing();
62 
64  double GetMaxSpacing();
65 
67 #if VTK_MAJOR_VERSION >= 9 || (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION > 2)
68  using vtkImageData::GetDirectionMatrix;
69 #endif
70  void GetDirectionMatrix(vtkMatrix4x4* mat);
71 
73 #if VTK_MAJOR_VERSION >= 9 || (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION > 2)
74  using vtkImageData::SetDirectionMatrix;
75 #endif
76  void SetDirectionMatrix(vtkMatrix4x4* mat);
77 
79  void GetImageToWorldMatrix(vtkMatrix4x4* mat);
81  void SetImageToWorldMatrix(vtkMatrix4x4* mat);
83  void SetGeometryFromImageToWorldMatrix(vtkMatrix4x4* mat);
84 
86  void ComputeBounds() override;
87 
89  void GetWorldToImageMatrix(vtkMatrix4x4* mat);
90 
92  bool IsEmpty();
93 
94 protected:
96  ~vtkOrientedImageData() override;
97 
98 protected:
101  double Directions[3][3];
102 
103 private:
105  void operator=(const vtkOrientedImageData&) = delete;
106 };
107 
108 #endif
Image data containing orientation information.