Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __elxAdvancedAffineTransform_H_
00016 #define __elxAdvancedAffineTransform_H_
00017
00018 #include "itkAdvancedMatrixOffsetTransformBase.h"
00019 #include "itkAdvancedCombinationTransform.h"
00020
00021 #include "itkCenteredTransformInitializer2.h"
00022 #include "elxIncludes.h"
00023
00024 namespace elastix
00025 {
00026 using namespace itk;
00027
00075 template < class TElastix >
00076 class AdvancedAffineTransformElastix :
00077 public AdvancedCombinationTransform<
00078 ITK_TYPENAME elx::TransformBase<TElastix>::CoordRepType,
00079 elx::TransformBase<TElastix>::FixedImageDimension > ,
00080 public elx::TransformBase<TElastix>
00081 {
00082 public:
00083
00085 typedef AdvancedAffineTransformElastix Self;
00086 typedef AdvancedCombinationTransform<
00087 typename elx::TransformBase<TElastix>::CoordRepType,
00088 elx::TransformBase<TElastix>::FixedImageDimension > Superclass1;
00089 typedef elx::TransformBase<TElastix> Superclass2;
00090 typedef SmartPointer<Self> Pointer;
00091 typedef SmartPointer<const Self> ConstPointer;
00092
00095 typedef AdvancedMatrixOffsetTransformBase<
00096 typename elx::TransformBase<TElastix>::CoordRepType,
00097 elx::TransformBase<TElastix>::FixedImageDimension,
00098 elx::TransformBase<TElastix>::MovingImageDimension > AffineTransformType;
00099
00101 itkNewMacro( Self );
00102
00104 itkTypeMacro( AdvancedAffineTransformElastix, AdvancedCombinationTransform );
00105
00110 elxClassNameMacro( "AffineTransform" );
00111
00113 itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00114
00116 typedef typename Superclass1::ScalarType ScalarType;
00117 typedef typename Superclass1::ParametersType ParametersType;
00118 typedef typename Superclass1::JacobianType JacobianType;
00119 typedef typename Superclass1::InputVectorType InputVectorType;
00120 typedef typename Superclass1::OutputVectorType OutputVectorType;
00121 typedef typename Superclass1::InputCovariantVectorType InputCovariantVectorType;
00122 typedef typename Superclass1::OutputCovariantVectorType OutputCovariantVectorType;
00123 typedef typename Superclass1::InputVnlVectorType InputVnlVectorType;
00124 typedef typename Superclass1::OutputVnlVectorType OutputVnlVectorType;
00125 typedef typename Superclass1::InputPointType InputPointType;
00126 typedef typename Superclass1::OutputPointType OutputPointType;
00127
00129 typedef typename Superclass2::ElastixType ElastixType;
00130 typedef typename Superclass2::ElastixPointer ElastixPointer;
00131 typedef typename Superclass2::ConfigurationType ConfigurationType;
00132 typedef typename Superclass2::ConfigurationPointer ConfigurationPointer;
00133 typedef typename Superclass2::RegistrationType RegistrationType;
00134 typedef typename Superclass2::RegistrationPointer RegistrationPointer;
00135 typedef typename Superclass2::CoordRepType CoordRepType;
00136 typedef typename Superclass2::FixedImageType FixedImageType;
00137 typedef typename Superclass2::MovingImageType MovingImageType;
00138 typedef typename Superclass2::ITKBaseType ITKBaseType;
00139 typedef typename Superclass2::CombinationTransformType CombinationTransformType;
00140
00142 typedef typename FixedImageType::IndexType IndexType;
00143 typedef typename IndexType::IndexValueType IndexValueType;
00144 typedef typename FixedImageType::SizeType SizeType;
00145 typedef typename FixedImageType::PointType PointType;
00146 typedef typename FixedImageType::SpacingType SpacingType;
00147 typedef typename FixedImageType::RegionType RegionType;
00148 typedef typename FixedImageType::DirectionType DirectionType;
00149
00150
00151 typedef CenteredTransformInitializer2<
00152 AffineTransformType, FixedImageType, MovingImageType> TransformInitializerType;
00153 typedef typename TransformInitializerType::Pointer TransformInitializerPointer;
00154 typedef typename AffineTransformType::Pointer AffineTransformPointer;
00155
00157 typedef typename Superclass2::ScalesType ScalesType;
00158
00163 virtual void BeforeRegistration( void );
00164
00180 virtual void InitializeTransform( void );
00181
00189 virtual void SetScales( void );
00190
00195 virtual void ReadFromFile( void );
00196
00200 virtual void WriteToFile( const ParametersType & param ) const;
00201
00202 protected:
00203
00205 AdvancedAffineTransformElastix();
00207 virtual ~AdvancedAffineTransformElastix() {};
00208
00214 virtual bool ReadCenterOfRotationIndex( InputPointType & rotationPoint ) const;
00215
00221 virtual bool ReadCenterOfRotationPoint( InputPointType & rotationPoint ) const;
00222
00223 private:
00224
00226 AdvancedAffineTransformElastix( const Self& );
00228 void operator=( const Self& );
00229
00230 AffineTransformPointer m_AffineTransform;
00231
00232 };
00233
00234
00235 }
00236
00237 #ifndef ITK_MANUAL_INSTANTIATION
00238 #include "elxAdvancedAffineTransform.hxx"
00239 #endif
00240
00241 #endif // end #ifndef __elxAdvancedAffineTransform_H_