00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkFixedCenterOfRotationAffineTransform_h
00019 #define __itkFixedCenterOfRotationAffineTransform_h
00020
00021 #include "itkAffineTransform.h"
00022
00023 namespace itk
00024 {
00025
00026
00038 template <
00039 class TScalarType=double,
00040 unsigned int NDimensions=3>
00041 class ITK_EXPORT FixedCenterOfRotationAffineTransform
00042 : public AffineTransform< TScalarType, NDimensions >
00043 {
00044 public:
00046 typedef FixedCenterOfRotationAffineTransform Self;
00047 typedef AffineTransform< TScalarType, NDimensions > Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkTypeMacro( FixedCenterOfRotationAffineTransform, AffineTransform );
00053
00055 itkNewMacro( Self );
00056
00058 itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
00059 itkStaticConstMacro(ParametersDimension, unsigned int,
00060 NDimensions*(NDimensions+1));
00061
00062
00064 typedef typename Superclass::ParametersType ParametersType;
00065 typedef typename Superclass::JacobianType JacobianType;
00066 typedef typename Superclass::ScalarType ScalarType;
00067 typedef typename Superclass::InputVectorType InputVectorType;
00068 typedef typename Superclass::OutputVectorType OutputVectorType;
00069 typedef typename Superclass::InputCovariantVectorType
00070 InputCovariantVectorType;
00071 typedef typename Superclass::OutputCovariantVectorType
00072 OutputCovariantVectorType;
00073 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00074 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00075 typedef typename Superclass::InputPointType InputPointType;
00076 typedef typename Superclass::OutputPointType OutputPointType;
00077 typedef typename Superclass::MatrixType MatrixType;
00078 typedef typename Superclass::OffsetType OffsetType;
00079
00083 void SetIdentity( void );
00084
00086 void PrintSelf(std::ostream &s, Indent indent) const;
00087
00089 void SetCenterOfRotationComponent(const InputPointType &cor);
00090 itkGetConstReferenceMacro( CenterOfRotationComponent, InputPointType );
00091
00093 virtual void SetScaleComponent( const double scale[NDimensions] );
00095 virtual const double* GetScaleComponent() const {return m_ScaleComponent;};
00096
00099 void SetMatrixComponent(const MatrixType &matrix);
00101 const MatrixType & GetMatrixComponent() const { return m_MatrixComponent; }
00102
00104 void SetOffsetComponent(const OffsetType &offset);
00105
00107 const OffsetType & GetOffsetComponent(void) const
00108 { return m_OffsetComponent; }
00109
00113 void SetMatrix(const MatrixType &matrix);
00114
00118 void SetOffset(const OffsetType &offset);
00119
00123 void SetParameters( const ParametersType & parameters );
00124
00126 const ParametersType& GetParameters(void) const;
00127
00128 protected:
00130 FixedCenterOfRotationAffineTransform();
00131
00133 virtual ~FixedCenterOfRotationAffineTransform();
00134
00135 private:
00136
00137 FixedCenterOfRotationAffineTransform(const Self & other);
00138 const Self & operator=( const Self & );
00139
00140 InputPointType m_CenterOfRotationComponent;
00141 double m_ScaleComponent[NDimensions];
00142 MatrixType m_MatrixComponent;
00143 MatrixType m_ScaleMatrixComponent;
00144 OffsetType m_OffsetComponent;
00145
00146 void RecomputeMatrix();
00147 void RecomputeOffset();
00148
00149
00150 };
00151
00152 }
00153
00154
00155 #ifndef ITK_MANUAL_INSTANTIATION
00156 #include "itkFixedCenterOfRotationAffineTransform.txx"
00157 #endif
00158
00159 #endif
00160
00161
00162
00163
00164