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
00035 template < class TScalarType=double >
00036 class ITK_EXPORT Rigid3DTransform :
00037 public MatrixOffsetTransformBase< TScalarType, 3, 3>
00038 {
00039 public:
00041 typedef Rigid3DTransform Self;
00042 typedef MatrixOffsetTransformBase< TScalarType, 3, 3 > Superclass;
00043 typedef SmartPointer<Self> Pointer;
00044 typedef SmartPointer<const Self> ConstPointer;
00045
00047 itkTypeMacro( Rigid3DTransform, MatrixOffsetTransformBase );
00048
00050 itkNewMacro( Self );
00051
00053 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00054 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00055 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00056 itkStaticConstMacro(ParametersDimension, unsigned int, 12);
00057
00058 typedef typename Superclass::ParametersType ParametersType;
00059 typedef typename Superclass::JacobianType JacobianType;
00060 typedef typename Superclass::ScalarType ScalarType;
00061 typedef typename Superclass::InputVectorType InputVectorType;
00062 typedef typename Superclass::OutputVectorType OutputVectorType;
00063 typedef typename Superclass::InputCovariantVectorType
00064 InputCovariantVectorType;
00065 typedef typename Superclass::OutputCovariantVectorType
00066 OutputCovariantVectorType;
00067 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00068 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00069 typedef typename Superclass::InputPointType InputPointType;
00070 typedef typename Superclass::OutputPointType OutputPointType;
00071 typedef typename Superclass::MatrixType MatrixType;
00072 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00073 typedef typename Superclass::CenterType CenterType;
00074 typedef typename Superclass::TranslationType TranslationType;
00075 typedef typename Superclass::OffsetType OffsetType;
00076
00085 const MatrixType & GetRotationMatrix()
00086 { return this->GetMatrix(); }
00087
00098 virtual void SetRotationMatrix(const MatrixType & matrix)
00099 { this->SetMatrix(matrix); }
00100
00108 void Translate(const OffsetType & offset, bool pre=false);
00109
00116 OutputCovariantVectorType TransformCovariantVector(
00117 const InputCovariantVectorType &vector) const;
00118
00130 inline InputPointType BackTransform(const OutputPointType
00131 &point ) const;
00132 inline InputVectorType BackTransform(const OutputVectorType
00133 &vector) const;
00134 inline InputVnlVectorType BackTransform( const OutputVnlVectorType
00135 &vector) const;
00136 inline InputCovariantVectorType BackTransform(const OutputCovariantVectorType
00137 &vector) const;
00138
00139 protected:
00140 Rigid3DTransform(unsigned int spaceDim,
00141 unsigned int paramDim);
00142 Rigid3DTransform(const MatrixType & matrix,
00143 const OutputVectorType & offset);
00144 Rigid3DTransform();
00145 ~Rigid3DTransform();
00146
00150 void PrintSelf(std::ostream &os, Indent indent) const;
00151
00152 private:
00153 Rigid3DTransform(const Self&);
00154 void operator=(const Self&);
00155
00156 };
00157
00158
00159 }
00160
00161
00162 #ifndef ITK_MANUAL_INSTANTIATION
00163 #include "itkRigid3DTransform.txx"
00164 #endif
00165
00166 #endif