NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkProjectionGeometry.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef __itkProjectionGeometry_h
16 #define __itkProjectionGeometry_h
17 
18 #include "itkImage.h"
21 
22 namespace itk {
23 
28 template <class IntensityType = float>
29 class ITK_EXPORT ProjectionGeometry : public Object
30 {
31 public:
32 
35  typedef Object Superclass;
36  typedef SmartPointer<Self> Pointer;
37  typedef SmartPointer<const Self> ConstPointer;
38 
40  itkNewMacro(Self);
41 
43  itkTypeMacro(ProjectionGeometry, Object);
44 
46  typedef typename itk::Size<2> ProjectionSizeType;
47  typedef typename itk::Vector<double,2> ProjectionSpacingType;
48 
49  typedef typename itk::Size<3> VolumeSizeType;
50  typedef typename itk::Vector<double,3> VolumeSpacingType;
51 
54 
57 
58  typedef enum {
59  UNDEFINED_SIDE=0,
61  RIGHT_SIDE
62  } ProjectionSideType;
63 
65  void SetProjectionSide( ProjectionSideType side ) { m_FlagSide = side; }
66 
67  typedef enum {
68  UNDEFINED_VIEW=0,
70  MLO_VIEW
71  } ProjectionViewType;
72 
73 
75  void SetProjectionView( ProjectionViewType view ) { m_FlagView = view; }
76 
80  { niftkitkErrorMacro( "Subclasses should override this method" ); return 0; }
81 
85  { niftkitkErrorMacro( "Subclasses should override this method" ); return 0; }
86 
88  itkSetMacro(RotationInX, double);
90  itkSetMacro(RotationInY, double);
92  itkSetMacro(RotationInZ, double);
93 
95  itkGetMacro(RotationInX, double);
97  itkGetMacro(RotationInY, double);
99  itkGetMacro(RotationInZ, double);
100 
102  void SetProjectionSize(const ProjectionSizeType &r) {m_ProjectionSize = r; m_FlagInitialised = false;}
104  void SetProjectionSpacing(const ProjectionSpacingType &s) {m_ProjectionSpacing = s; m_FlagInitialised = false;}
105 
107  void SetVolumeSize(const VolumeSizeType &r) {m_VolumeSize = r; m_FlagInitialised = false;}
109  void SetVolumeSpacing(const VolumeSpacingType &s) {m_VolumeSpacing = s; m_FlagInitialised = false;}
110 
112  virtual unsigned int GetNumberOfProjections(void)
113  { niftkitkErrorMacro( "Subclasses should override this method" ); return 0;}
114 
115 
116 protected:
118  virtual ~ProjectionGeometry() {};
119 
120  void PrintSelf(std::ostream& os, Indent indent) const override;
121 
123  void Initialise(void);
124 
127 
130 
133 
140 
142  VolumeSizeType m_VolumeSize;
144  VolumeSpacingType m_VolumeSpacing;
145 
147  ProjectionSizeType m_ProjectionSize;
149  ProjectionSpacingType m_ProjectionSpacing;
150 
151 private:
152  ProjectionGeometry(const Self&); //purposely not implemented
153  void operator=(const Self&); //purposely not implemented
154 
155 };
156 
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkProjectionGeometry.txx"
161 #endif
162 
163 #endif
itk::Vector< double, 2 > ProjectionSpacingType
Definition: itkProjectionGeometry.h:47
virtual PerspectiveProjectionTransformType::Pointer GetPerspectiveTransform(int i)
Definition: itkProjectionGeometry.h:79
double m_RotationInZ
Rotation in 'z' to allow reorientation of the volume.
Definition: itkProjectionGeometry.h:139
ProjectionViewType
Definition: itkProjectionGeometry.h:67
SmartPointer< Self > Pointer
Definition: itkProjectionGeometry.h:36
Left side.
Definition: itkProjectionGeometry.h:60
itk::Vector< double, 3 > VolumeSpacingType
Definition: itkProjectionGeometry.h:50
Object Superclass
Definition: itkProjectionGeometry.h:35
bool m_FlagInitialised
Flag indicating whether the object has been initialised.
Definition: itkProjectionGeometry.h:126
Definition: niftkITKAffineResampleImage.cxx:74
itk::Size< 3 > VolumeSizeType
Definition: itkProjectionGeometry.h:49
itk::Size< 2 > ProjectionSizeType
Definition: itkProjectionGeometry.h:43
itk::EulerAffineTransform< double, 3, 3 > EulerAffineTransformType
Definition: itkProjectionGeometry.h:52
void SetVolumeSpacing(const VolumeSpacingType &s)
Set the volume spacing.
Definition: itkProjectionGeometry.h:109
PerspectiveProjectionTransform of a vector space (e.g. space coordinates)
Definition: itkPerspectiveProjectionTransform.h:39
VolumeSizeType m_VolumeSize
A pointer to the 3D volume size.
Definition: itkProjectionGeometry.h:142
void SetProjectionSpacing(const ProjectionSpacingType &s)
Set the projection spacing.
Definition: itkProjectionGeometry.h:104
Euler Affine transform.
Definition: itkEulerAffineTransform.h:38
ProjectionSizeType m_ProjectionSize
A pointer to the 3D projection size.
Definition: itkProjectionGeometry.h:147
Abstract class to calculate the geometry of a CT or tomo machine.
Definition: itkProjectionGeometry.h:29
itk::PerspectiveProjectionTransform< double > PerspectiveProjectionTransformType
Definition: itkProjectionGeometry.h:55
void SetProjectionSize(const ProjectionSizeType &r)
Set the projection size.
Definition: itkProjectionGeometry.h:102
PerspectiveProjectionTransformType::Pointer PerspectiveProjectionTransformPointerType
Definition: itkProjectionGeometry.h:56
SmartPointer< Self > Pointer
Definition: itkPerspectiveProjectionTransform.h:57
virtual unsigned int GetNumberOfProjections(void)
Return the number of projections for derived geometries.
Definition: itkProjectionGeometry.h:112
ProjectionGeometry Self
Definition: itkProjectionGeometry.h:34
ProjectionSideType
Definition: itkProjectionGeometry.h:58
ProjectionViewType m_FlagView
Flag indicating if view is CC or MLO.
Definition: itkProjectionGeometry.h:132
GLdouble GLdouble GLdouble r
Definition: glew.h:1390
void SetProjectionSide(ProjectionSideType side)
Set the projection side.
Definition: itkProjectionGeometry.h:65
ProjectionSideType m_FlagSide
Flag indicating if side is left or right.
Definition: itkProjectionGeometry.h:129
virtual EulerAffineTransformType::Pointer GetAffineTransform(int i)
Definition: itkProjectionGeometry.h:84
virtual ~ProjectionGeometry()
Definition: itkProjectionGeometry.h:118
ProjectionSpacingType m_ProjectionSpacing
A pointer to the 3D projection spacing.
Definition: itkProjectionGeometry.h:149
void SetProjectionView(ProjectionViewType view)
Set the projection view.
Definition: itkProjectionGeometry.h:75
#define niftkitkErrorMacro(x)
Definition: itkUCLMacro.h:49
void SetVolumeSize(const VolumeSizeType &r)
Set the volume size.
Definition: itkProjectionGeometry.h:107
double m_RotationInY
Rotation in 'y' to allow reorientation of the volume.
Definition: itkProjectionGeometry.h:137
EulerAffineTransformType::Pointer EulerAffineTransformPointerType
Definition: itkProjectionGeometry.h:53
double m_RotationInX
Rotation in 'x' to allow reorientation of the volume.
Definition: itkProjectionGeometry.h:135
CC view.
Definition: itkProjectionGeometry.h:69
GLdouble s
Definition: glew.h:1374
SmartPointer< const Self > ConstPointer
Definition: itkProjectionGeometry.h:37
SmartPointer< Self > Pointer
Definition: itkEulerAffineTransform.h:49
VolumeSpacingType m_VolumeSpacing
A pointer to the 3D volume spacing.
Definition: itkProjectionGeometry.h:144