go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxEulerTransform.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 __elxEulerTransform_H__
00016 #define __elxEulerTransform_H__
00017 
00018 #include "itkAdvancedCombinationTransform.h"
00019 #include "itkEulerTransform.h"
00020 #include "itkCenteredTransformInitializer.h"
00021 #include "elxIncludes.h"
00022 
00023 namespace elastix
00024 {
00025 using namespace itk;
00026 
00071   template < class TElastix >
00072     class EulerTransformElastix:
00073       public AdvancedCombinationTransform<
00074         ITK_TYPENAME elx::TransformBase< TElastix >::CoordRepType,
00075         elx::TransformBase< TElastix >::FixedImageDimension >,
00076       public elx::TransformBase< TElastix >
00077   {
00078   public:
00079 
00081     typedef EulerTransformElastix                               Self;
00082 
00083     typedef AdvancedCombinationTransform<
00084       typename elx::TransformBase< TElastix >::CoordRepType,
00085       elx::TransformBase< TElastix >::FixedImageDimension >     Superclass1;
00086 
00087     typedef elx::TransformBase< TElastix >                      Superclass2;
00088 
00091     typedef EulerTransform<
00092       typename elx::TransformBase< TElastix >::CoordRepType,
00093       elx::TransformBase< TElastix >::FixedImageDimension >     EulerTransformType;
00094 
00095     typedef SmartPointer<Self>                                  Pointer;
00096     typedef SmartPointer<const Self>                            ConstPointer;
00097 
00099     itkNewMacro( Self );
00100 
00102     //itkTypeMacro( EulerTransformElastix, EulerTransform );
00103     itkTypeMacro( EulerTransformElastix, AdvancedCombinationTransform );
00104 
00109     elxClassNameMacro( "EulerTransform" );
00110 
00112     itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00113 
00117     typedef typename Superclass1::ScalarType                  ScalarType;
00118     typedef typename Superclass1::ParametersType              ParametersType;
00119     typedef typename Superclass1::JacobianType                JacobianType;
00120 
00121     typedef typename Superclass1::InputPointType              InputPointType;
00122     typedef typename Superclass1::OutputPointType             OutputPointType;
00123     typedef typename Superclass1::InputVectorType             InputVectorType;
00124     typedef typename Superclass1::OutputVectorType            OutputVectorType;
00125     typedef typename Superclass1::InputCovariantVectorType    InputCovariantVectorType;
00126     typedef typename Superclass1::OutputCovariantVectorType   OutputCovariantVectorType;
00127     typedef typename Superclass1::InputVnlVectorType          InputVnlVectorType;
00128     typedef typename Superclass1::OutputVnlVectorType         OutputVnlVectorType;
00129 
00130     typedef typename EulerTransformType::Pointer              EulerTransformPointer;
00131     typedef typename EulerTransformType::OffsetType           OffsetType;
00132 
00134     typedef typename Superclass2::ElastixType               ElastixType;
00135     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00136     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00137     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00138     typedef typename Superclass2::RegistrationType          RegistrationType;
00139     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00140     typedef typename Superclass2::CoordRepType              CoordRepType;
00141     typedef typename Superclass2::FixedImageType            FixedImageType;
00142     typedef typename Superclass2::MovingImageType           MovingImageType;
00143     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00144     typedef typename Superclass2::CombinationTransformType  CombinationTransformType;
00145 
00147     typedef typename FixedImageType::IndexType              IndexType;
00148     typedef typename IndexType::IndexValueType              IndexValueType;
00149     typedef typename FixedImageType::SizeType               SizeType;
00150     typedef typename FixedImageType::PointType              PointType;
00151     typedef typename FixedImageType::SpacingType            SpacingType;
00152     typedef typename FixedImageType::RegionType             RegionType;
00153     typedef typename FixedImageType::DirectionType          DirectionType;
00154 
00155     typedef CenteredTransformInitializer<
00156       EulerTransformType, FixedImageType, MovingImageType>  TransformInitializerType;
00157     typedef typename TransformInitializerType::Pointer      TransformInitializerPointer;
00158 
00160     typedef typename Superclass2::ScalesType                ScalesType;
00161 
00166     virtual void BeforeRegistration(void);
00167 
00183     virtual void InitializeTransform(void);
00184 
00192     virtual void SetScales(void);
00193 
00198     virtual void ReadFromFile(void);
00199 
00203     virtual void WriteToFile( const ParametersType & param ) const;
00204 
00205   protected:
00206 
00208     EulerTransformElastix();
00210     virtual ~EulerTransformElastix() {};
00211 
00217     virtual bool ReadCenterOfRotationIndex( InputPointType & rotationPoint ) const;
00218 
00224     virtual bool ReadCenterOfRotationPoint( InputPointType & rotationPoint ) const;
00225 
00226   private:
00227 
00229     EulerTransformElastix( const Self& ); // purposely not implemented
00231     void operator=( const Self& );        // purposely not implemented
00232 
00233     EulerTransformPointer       m_EulerTransform;
00234 
00235   }; // end class EulerTransformElastix
00236 
00237 
00238 } // end namespace elastix
00239 
00240 #ifndef ITK_MANUAL_INSTANTIATION
00241 #include "elxEulerTransform.hxx"
00242 #endif
00243 
00244 #endif // end #ifndef __elxEulerTransform_H__
00245 


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo