Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __itkAffineDTI3DTransform_h
00032 #define __itkAffineDTI3DTransform_h
00033
00034 #include <iostream>
00035 #include "itkAdvancedMatrixOffsetTransformBase.h"
00036
00037 namespace itk
00038 {
00039
00074 template < class TScalarType=double >
00075 class ITK_EXPORT AffineDTI3DTransform :
00076 public AdvancedMatrixOffsetTransformBase< TScalarType,3,3 >
00077 {
00078 public:
00080 typedef AffineDTI3DTransform Self;
00081 typedef AdvancedMatrixOffsetTransformBase< TScalarType,3,3 > Superclass;
00082 typedef SmartPointer<Self> Pointer;
00083 typedef SmartPointer<const Self> ConstPointer;
00084
00086 itkNewMacro( Self );
00087
00089 itkTypeMacro( AffineDTI3DTransform, AdvancedMatrixOffsetTransformBase );
00090
00092 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00093 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00094 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00095 itkStaticConstMacro(ParametersDimension, unsigned int, 12);
00096
00097 typedef typename Superclass::ParametersType ParametersType;
00098 typedef typename Superclass::JacobianType JacobianType;
00099 typedef typename Superclass::ScalarType ScalarType;
00100 typedef typename Superclass::InputVectorType InputVectorType;
00101 typedef typename Superclass::OutputVectorType OutputVectorType;
00102 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
00103 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00104 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00105 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00106 typedef typename Superclass::InputPointType InputPointType;
00107 typedef typename Superclass::OutputPointType OutputPointType;
00108 typedef typename Superclass::MatrixType MatrixType;
00109 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00110 typedef typename Superclass::CenterType CenterType;
00111 typedef typename Superclass::TranslationType TranslationType;
00112 typedef typename Superclass::OffsetType OffsetType;
00113 typedef typename Superclass::ScalarType AngleType;
00114
00115 typedef typename Superclass
00116 ::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
00117 typedef typename Superclass::SpatialJacobianType SpatialJacobianType;
00118 typedef typename Superclass
00119 ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType;
00120 typedef typename Superclass::SpatialHessianType SpatialHessianType;
00121 typedef typename Superclass
00122 ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType;
00123 typedef typename Superclass::InternalMatrixType InternalMatrixType;
00124
00125 typedef FixedArray< ScalarType > ScalarArrayType;
00126
00132 void SetParameters( const ParametersType & parameters );
00133 const ParametersType & GetParameters(void) const;
00134
00136 virtual void GetJacobian(
00137 const InputPointType &,
00138 JacobianType &,
00139 NonZeroJacobianIndicesType & ) const;
00140
00141 virtual void SetIdentity(void);
00142
00143 protected:
00144 AffineDTI3DTransform();
00145 AffineDTI3DTransform(const MatrixType & matrix,
00146 const OutputPointType & offset);
00147 AffineDTI3DTransform(unsigned int outputSpaceDims,
00148 unsigned int paramsSpaceDims);
00149
00150 ~AffineDTI3DTransform(){};
00151
00152 void PrintSelf(std::ostream &os, Indent indent) const;
00153
00155 void SetVarAngleScaleShear(
00156 ScalarArrayType angle,
00157 ScalarArrayType shear,
00158 ScalarArrayType scale );
00159
00161 void ComputeMatrix(void);
00162 void ComputeMatrixParameters(void);
00163
00165 virtual void PrecomputeJacobianOfSpatialJacobian(void);
00166
00167 private:
00168 AffineDTI3DTransform(const Self&);
00169 void operator=(const Self&);
00170
00171 ScalarArrayType m_Angle;
00172 ScalarArrayType m_Shear;
00173 ScalarArrayType m_Scale;
00174
00175 };
00176
00177
00178 }
00179
00180
00181 #define ITK_TEMPLATE_AffineDTI3DTransform(_, EXPORT, x, y) namespace itk { \
00182 _(1(class EXPORT AffineDTI3DTransform< ITK_TEMPLATE_1 x >)) \
00183 namespace Templates { typedef AffineDTI3DTransform< ITK_TEMPLATE_1 x > \
00184 AffineDTI3DTransform##y; } \
00185 }
00186
00187 #if ITK_TEMPLATE_EXPLICIT
00188 # include "Templates/itkAffineDTI3DTransform+-.h"
00189 #endif
00190
00191 #if ITK_TEMPLATE_TXX
00192 # include "itkAffineDTI3DTransform.txx"
00193 #endif
00194
00195 #endif