NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkRigidPCADeformationModelTransform.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 itkRigidPCADeformationModelTransform_h
16 #define itkRigidPCADeformationModelTransform_h
17 
18 #include <iostream>
19 #include <itkImage.h>
20 #include <itkTransform.h>
21 #include <itkExceptionObject.h>
22 #include <itkMatrix.h>
23 
24 #include <itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h>
25 
26 namespace itk
27 {
28 
65 template <
66  class TScalarType=float, // Type for coordinate representation type (float or double)
67  unsigned int NDimensions = 3 > // Number of dimensions
68  class ITK_EXPORT RigidPCADeformationModelTransform : public PCADeformationModelTransform< TScalarType, NDimensions>
69 {
70 public:
74  typedef SmartPointer<Self> Pointer;
75  typedef SmartPointer<const Self> ConstPointer;
76 
78  typedef typename Superclass::VectorPixelType VectorPixelType;
79  typedef typename Superclass::FieldType FieldType;
80  typedef typename Superclass::DisplacementType DisplacementType;
81 
83  typedef typename Superclass::FieldPointer FieldPointer;
84  typedef typename Superclass::FieldConstPointer FieldConstPointer;
85  typedef typename Superclass::FieldIterator FieldIterator;
86  typedef typename Superclass::FieldConstIterator FieldConstIterator;
87 
88  typedef typename Superclass::FieldConstPointerArray FieldConstPointerArray;
89 
90  typedef typename Superclass::FieldPointerArray FieldPointerArray;
91  typedef typename Superclass::FieldIteratorArray FieldIteratorArray;
92 
93  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
94 
95  typedef typename Superclass::FieldIndexType FieldIndexType;
96  typedef typename Superclass::FieldRegionType FieldRegionType;
97  typedef typename Superclass::FieldSizeType FieldSizeType;
98 
100  typedef typename Superclass::FieldInterpolatorType FieldInterpolatorType;
101  typedef typename Superclass::FieldInterpolatorPointer FieldInterpolatorPointer;
102  typedef typename Superclass::FieldInterpolatorPointerArray FieldInterpolatorPointerArray;
103  typedef itk::Matrix<double, NDimensions, NDimensions> MatrixType;
104 
106  itkNewMacro( Self );
107 
110 
112  virtual void SetNumberOfComponents(unsigned int numberOfComponents);
113 
115  virtual FieldPointer GetSingleDeformationField();
116 
118  itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
119 
121  typedef typename Superclass::ScalarType ScalarType;
122 
124  typedef typename Superclass::ParametersType ParametersType;
125 
128 
130  typedef typename Superclass::InputVectorType InputVectorType;
131  typedef typename Superclass::OutputVectorType OutputVectorType;
132 
134  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
135  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
136 
138  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
139  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
140 
144 
146  // Removed and to be filled in the future
147  //virtual const JacobianType & GetJacobian( const InputPointType & point ) const;
148 
151  virtual OutputPointType TransformPoint(const InputPointType &point ) const;
152 
155  virtual void Initialize() throw ( ExceptionObject );
156 
159  void SetParameters(const ParametersType & parameters);
160 
163  void SetCentre( InputPointType & );
164 
167  const InputPointType & GetCentre( void );
168 
169 protected:
172 
174  virtual ~RigidPCADeformationModelTransform();
175 
177  void PrintSelf(std::ostream &os, Indent indent) const;
178 
180  void ComputeMatrix(void);
181 
182  //Matrix<TScalarType,NDimensions+1,NDimensions+1> m_Matrix;
183  //Matrix<TScalarType,NDimensions+1,NDimensions+1> m_Rotations;
184  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_InPlateMatrix;
185  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_RotationsZ;
186  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_RollingMatrix;
187  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_RotationsY;
188  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_Translations;
189  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_TranslateToCentre;
190  Matrix<TScalarType,NDimensions+1,NDimensions+1> m_BackTranslateCentre;
191 
193  InputPointType m_centre;
194 
195 private:
196  RigidPCADeformationModelTransform(const Self & other); //purposely not implemented
197  const Self & operator=( const Self & ); //purposely not implemented
198 
199 }; //class RigidPCADeformationModelTransform
200 
201 } // namespace itk
202 
203 
204 #ifndef ITK_MANUAL_INSTANTIATION
205 #include "itkRigidPCADeformationModelTransform.txx"
206 #endif
207 
208 
209 #endif /* __itkRigidPCADeformationModelTransform_h */
SmartPointer< const Self > ConstPointer
Definition: itkRigidPCADeformationModelTransform.h:75
Superclass::FieldConstPointerArray FieldConstPointerArray
Definition: itkRigidPCADeformationModelTransform.h:88
Superclass::FieldType FieldType
Definition: itkRigidPCADeformationModelTransform.h:79
itk::Matrix< double, NDimensions, NDimensions > MatrixType
Definition: itkRigidPCADeformationModelTransform.h:103
Superclass::FieldInterpolatorPointerArray FieldInterpolatorPointerArray
Definition: itkRigidPCADeformationModelTransform.h:102
Superclass::FieldConstIterator FieldConstIterator
Definition: itkRigidPCADeformationModelTransform.h:86
Superclass::FieldSizeType FieldSizeType
Definition: itkRigidPCADeformationModelTransform.h:97
Definition: niftkMeshSmoother.cxx:19
Superclass::DisplacementType DisplacementType
Definition: itkRigidPCADeformationModelTransform.h:80
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkRigidPCADeformationModelTransform.h:138
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkRigidPCADeformationModelTransform.h:135
Superclass::ParametersType ParametersType
Definition: itkRigidPCADeformationModelTransform.h:124
Superclass::OutputVectorType OutputVectorType
Definition: itkRigidPCADeformationModelTransform.h:131
Superclass::VectorPixelType VectorPixelType
Definition: itkRigidPCADeformationModelTransform.h:78
Superclass::FieldPointerArray FieldPointerArray
Definition: itkRigidPCADeformationModelTransform.h:90
Superclass::InputPointType InputPointType
Definition: itkRigidPCADeformationModelTransform.h:142
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkRigidPCADeformationModelTransform.h:139
Superclass::FieldInterpolatorType FieldInterpolatorType
Definition: itkRigidPCADeformationModelTransform.h:100
Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkRigidPCADeformationModelTransform.h:93
Superclass::FieldIndexType FieldIndexType
Definition: itkRigidPCADeformationModelTransform.h:95
Superclass::ScalarType ScalarType
Definition: itkRigidPCADeformationModelTransform.h:121
Point< TScalarType, itkGetStaticConstMacro(SpaceDimension)> InputPointType
Definition: itkPCADeformationModelTransform.h:164
Superclass::FieldPointer FieldPointer
Definition: itkRigidPCADeformationModelTransform.h:83
Superclass::JacobianType JacobianType
Definition: itkRigidPCADeformationModelTransform.h:127
PCADeformationModelTransform< TScalarType, NDimensions > Superclass
Definition: itkRigidPCADeformationModelTransform.h:73
Superclass::FieldConstPointer FieldConstPointer
Definition: itkRigidPCADeformationModelTransform.h:84
Superclass::FieldInterpolatorPointer FieldInterpolatorPointer
Definition: itkRigidPCADeformationModelTransform.h:101
Superclass::FieldIteratorArray FieldIteratorArray
Definition: itkRigidPCADeformationModelTransform.h:91
Rigid-body + PCA deformation model transformation.
Definition: itkRigidPCADeformationModelTransform.h:68
SmartPointer< Self > Pointer
Definition: itkRigidPCADeformationModelTransform.h:74
Superclass::InputVectorType InputVectorType
Definition: itkRigidPCADeformationModelTransform.h:130
Superclass::OutputPointType OutputPointType
Definition: itkRigidPCADeformationModelTransform.h:143
PCA deformation model transformation.
Definition: itkPCADeformationModelTransform.h:71
Superclass::InputCovariantVectorType InputCovariantVectorType
Definition: itkRigidPCADeformationModelTransform.h:134
Superclass::FieldIterator FieldIterator
Definition: itkRigidPCADeformationModelTransform.h:85
itk::Point< double, 2 > OutputPointType
Definition: EulerAffine2DJacobianTest.cxx:35
RigidPCADeformationModelTransform Self
Definition: itkRigidPCADeformationModelTransform.h:72
Superclass::FieldRegionType FieldRegionType
Definition: itkRigidPCADeformationModelTransform.h:96
itk::Array2D< double > JacobianType
Definition: EulerAffine2DJacobianTest.cxx:28