go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxAdvancedAffineTransform.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
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 
00072   template < class TElastix >
00073     class AdvancedAffineTransformElastix :
00074       public AdvancedCombinationTransform<
00075           ITK_TYPENAME elx::TransformBase<TElastix>::CoordRepType,
00076           elx::TransformBase<TElastix>::FixedImageDimension > ,
00077       public elx::TransformBase<TElastix>
00078   {
00079   public:
00080 
00082     typedef AdvancedAffineTransformElastix                    Self;
00083     typedef AdvancedCombinationTransform<
00084       typename elx::TransformBase<TElastix>::CoordRepType,
00085       elx::TransformBase<TElastix>::FixedImageDimension >     Superclass1;
00086     typedef elx::TransformBase<TElastix>                      Superclass2;
00087     typedef SmartPointer<Self>                                Pointer;
00088     typedef SmartPointer<const Self>                          ConstPointer;
00089 
00092     typedef AdvancedMatrixOffsetTransformBase<
00093       typename elx::TransformBase<TElastix>::CoordRepType,
00094       elx::TransformBase<TElastix>::FixedImageDimension,
00095       elx::TransformBase<TElastix>::MovingImageDimension >     AffineTransformType;
00096 
00098     itkNewMacro( Self );
00099 
00101     itkTypeMacro( AdvancedAffineTransformElastix, AdvancedCombinationTransform );
00102 
00107     elxClassNameMacro( "AffineTransform" );
00108 
00110     itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00111 
00113     typedef typename Superclass1::ScalarType                ScalarType;
00114     typedef typename Superclass1::ParametersType            ParametersType;
00115     typedef typename Superclass1::JacobianType              JacobianType;
00116     typedef typename Superclass1::InputVectorType           InputVectorType;
00117     typedef typename Superclass1::OutputVectorType          OutputVectorType;
00118     typedef typename Superclass1::InputCovariantVectorType  InputCovariantVectorType;
00119     typedef typename Superclass1::OutputCovariantVectorType OutputCovariantVectorType;
00120     typedef typename Superclass1::InputVnlVectorType        InputVnlVectorType;
00121     typedef typename Superclass1::OutputVnlVectorType       OutputVnlVectorType;
00122     typedef typename Superclass1::InputPointType            InputPointType;
00123     typedef typename Superclass1::OutputPointType           OutputPointType;
00124 
00126     typedef typename Superclass2::ElastixType               ElastixType;
00127     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00128     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00129     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00130     typedef typename Superclass2::RegistrationType          RegistrationType;
00131     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00132     typedef typename Superclass2::CoordRepType              CoordRepType;
00133     typedef typename Superclass2::FixedImageType            FixedImageType;
00134     typedef typename Superclass2::MovingImageType           MovingImageType;
00135     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00136     typedef typename Superclass2::CombinationTransformType  CombinationTransformType;
00137 
00139     typedef typename FixedImageType::IndexType              IndexType;
00140     typedef typename IndexType::IndexValueType              IndexValueType;
00141     typedef typename FixedImageType::SizeType               SizeType;
00142     typedef typename FixedImageType::PointType              PointType;
00143     typedef typename FixedImageType::SpacingType            SpacingType;
00144     typedef typename FixedImageType::RegionType             RegionType;
00145     typedef typename FixedImageType::DirectionType          DirectionType;
00146 
00147     //typedef CenteredTransformInitializer<
00148     typedef CenteredTransformInitializer2<
00149       AffineTransformType, FixedImageType, MovingImageType> TransformInitializerType;
00150     typedef typename TransformInitializerType::Pointer      TransformInitializerPointer;
00151     typedef typename AffineTransformType::Pointer           AffineTransformPointer;
00152 
00154     typedef typename Superclass2::ScalesType                ScalesType;
00155 
00160     virtual void BeforeRegistration( void );
00161 
00177     virtual void InitializeTransform( void );
00178 
00186     virtual void SetScales( void );
00187 
00192     virtual void ReadFromFile( void );
00193 
00197     virtual void WriteToFile( const ParametersType & param ) const;
00198 
00199   protected:
00200 
00202     AdvancedAffineTransformElastix();
00204     virtual ~AdvancedAffineTransformElastix() {};
00205 
00211     virtual bool ReadCenterOfRotationIndex( InputPointType & rotationPoint ) const;
00212 
00218     virtual bool ReadCenterOfRotationPoint( InputPointType & rotationPoint ) const;
00219 
00220   private:
00221 
00223     AdvancedAffineTransformElastix( const Self& );  // purposely not implemented
00225     void operator=( const Self& );          // purposely not implemented
00226 
00227     AffineTransformPointer m_AffineTransform;
00228 
00229   }; // end class AdvancedAffineTransformElastix
00230 
00231 
00232 } // end namespace elastix
00233 
00234 #ifndef ITK_MANUAL_INSTANTIATION
00235 #include "elxAdvancedAffineTransform.hxx"
00236 #endif
00237 
00238 #endif // end #ifndef __elxAdvancedAffineTransform_H_


Generated on 11-05-2011 for elastix by doxygen 1.7.4 elastix logo