itkRigid3DTransform.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkRigid3DTransform_h
00018 #define __itkRigid3DTransform_h
00019
00020 #include <iostream>
00021 #include "itkMatrixOffsetTransformBase.h"
00022 #include "itkExceptionObject.h"
00023 #include "itkMatrix.h"
00024 #include "itkVersor.h"
00025
00026 namespace itk
00027 {
00028
00048 template < class TScalarType=double >
00049 class ITK_EXPORT Rigid3DTransform :
00050 public MatrixOffsetTransformBase< TScalarType, 3, 3>
00051 {
00052 public:
00054 typedef Rigid3DTransform Self;
00055 typedef MatrixOffsetTransformBase< TScalarType, 3, 3 > Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkTypeMacro( Rigid3DTransform, MatrixOffsetTransformBase );
00061
00063 itkNewMacro( Self );
00064
00066 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00067 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00068 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00069 itkStaticConstMacro(ParametersDimension, unsigned int, 12);
00071
00072 typedef typename Superclass::ParametersType ParametersType;
00073 typedef typename Superclass::JacobianType JacobianType;
00074 typedef typename Superclass::ScalarType ScalarType;
00075 typedef typename Superclass::InputVectorType InputVectorType;
00076 typedef typename Superclass::OutputVectorType OutputVectorType;
00077 typedef typename Superclass::InputCovariantVectorType
00078 InputCovariantVectorType;
00079 typedef typename Superclass::OutputCovariantVectorType
00080 OutputCovariantVectorType;
00081 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00082 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00083 typedef typename Superclass::InputPointType InputPointType;
00084 typedef typename Superclass::OutputPointType OutputPointType;
00085 typedef typename Superclass::MatrixType MatrixType;
00086 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00087 typedef typename Superclass::CenterType CenterType;
00088 typedef typename Superclass::TranslationType TranslationType;
00089 typedef typename Superclass::OffsetType OffsetType;
00090
00101 virtual void SetParameters( const ParametersType & parameters );
00102
00108 virtual void SetMatrix(const MatrixType &matrix);
00109
00118 const MatrixType & GetRotationMatrix()
00119 { return this->GetMatrix(); }
00120
00131 virtual void SetRotationMatrix(const MatrixType & matrix)
00132 { this->SetMatrix(matrix); }
00133
00141 void Translate(const OffsetType & offset, bool pre=false);
00142
00154 InputPointType BackTransform(const OutputPointType
00155 &point ) const;
00156 InputVectorType BackTransform(const OutputVectorType
00157 &vector) const;
00158 InputVnlVectorType BackTransform( const OutputVnlVectorType
00159 &vector) const;
00160 InputCovariantVectorType BackTransform(const OutputCovariantVectorType
00161 &vector) const;
00163
00168 bool MatrixIsOrthogonal( const MatrixType & matrix, double tol = 1e-10 );
00169
00170 protected:
00171 Rigid3DTransform(unsigned int spaceDim,
00172 unsigned int paramDim);
00173 Rigid3DTransform(const MatrixType & matrix,
00174 const OutputVectorType & offset);
00175 Rigid3DTransform();
00176 ~Rigid3DTransform();
00177
00181 void PrintSelf(std::ostream &os, Indent indent) const;
00182
00183 private:
00184 Rigid3DTransform(const Self&);
00185 void operator=(const Self&);
00186
00187 };
00188
00189
00190 }
00191
00192
00193 #define ITK_TEMPLATE_Rigid3DTransform(_, EXPORT, x, y) namespace itk { \
00194 _(1(class EXPORT Rigid3DTransform< ITK_TEMPLATE_1 x >)) \
00195 namespace Templates { typedef Rigid3DTransform< ITK_TEMPLATE_1 x > Rigid3DTransform##y; } \
00196 }
00197
00198 #if ITK_TEMPLATE_EXPLICIT
00199 # include "Templates/itkRigid3DTransform+-.h"
00200 #endif
00201
00202 #if ITK_TEMPLATE_TXX
00203 # include "itkRigid3DTransform.txx"
00204 #endif
00205
00206 #endif
00207