Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
29class vtkMatrix4x4;
30
35class vtkSegmentationCore_EXPORT vtkOrientedImageData : public vtkImageData
36{
37public:
39 vtkTypeMacro(vtkOrientedImageData,vtkImageData);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43 void ShallowCopy(vtkDataObject *src) override;
45 void DeepCopy(vtkDataObject *src) override;
47 virtual void CopyDirections(vtkDataObject *src);
48
49public:
51 void SetDirections(double dirs[3][3]);
53 void SetDirections(double ir, double ia, double is,
54 double jr, double ja, double js,
55 double kr, double ka, double ks);
56
57 void GetDirections(double dirs[3][3]);
58
60 double GetMinSpacing();
61
63 double GetMaxSpacing();
64
66 using vtkImageData::GetDirectionMatrix;
67 void GetDirectionMatrix(vtkMatrix4x4* mat);
68
70 using vtkImageData::SetDirectionMatrix;
71 void SetDirectionMatrix(vtkMatrix4x4* mat);
72
74 void GetImageToWorldMatrix(vtkMatrix4x4* mat);
76 void SetImageToWorldMatrix(vtkMatrix4x4* mat);
78 void SetGeometryFromImageToWorldMatrix(vtkMatrix4x4* mat);
79
81 void ComputeBounds() override;
82
84 void GetWorldToImageMatrix(vtkMatrix4x4* mat);
85
87 bool IsEmpty();
88
89protected:
92
93protected:
96 double Directions[3][3];
97
98private:
100 void operator=(const vtkOrientedImageData&) = delete;
101};
102
103#endif
void ComputeBounds() override
Compute image bounds (xmin,xmax, ymin,ymax, zmin,zmax).
double GetMinSpacing()
Utility function that returns the min spacing between the 3 orientations.
void PrintSelf(ostream &os, vtkIndent indent) override
void SetDirections(double dirs[3][3])
Set directions only.
void SetDirections(double ir, double ia, double is, double jr, double ja, double js, double kr, double ka, double ks)
Set directions only.
double GetMaxSpacing()
Utility function that returns the max spacing between the 3 orientations.
void ShallowCopy(vtkDataObject *src) override
Shallow copy.
virtual void CopyDirections(vtkDataObject *src)
Copy orientation information only.
void GetImageToWorldMatrix(vtkMatrix4x4 *mat)
Get the geometry matrix that includes the spacing and origin information.
void DeepCopy(vtkDataObject *src) override
Deep copy.
bool IsEmpty()
Determines whether the image data is empty (if the extent has 0 voxels then it is)
void SetDirectionMatrix(vtkMatrix4x4 *mat)
~vtkOrientedImageData() override
void GetWorldToImageMatrix(vtkMatrix4x4 *mat)
Get the inverse of the geometry matrix.
void GetDirections(double dirs[3][3])
void SetGeometryFromImageToWorldMatrix(vtkMatrix4x4 *mat)
Same as SetImageToWorldMatrix. Kept for backward compatibility.
void SetImageToWorldMatrix(vtkMatrix4x4 *mat)
Convenience method to set the directions, spacing, and origin from a matrix.
static vtkOrientedImageData * New()
void GetDirectionMatrix(vtkMatrix4x4 *mat)