go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxSimilarityTransform.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 __elxSimilarityTransform_H__
00016 #define __elxSimilarityTransform_H__
00017 
00018 #include "itkSimilarityTransform.h"
00019 #include "itkCenteredTransformInitializer.h"
00020 #include "elxIncludes.h"
00021 
00022 namespace elastix
00023 {
00024 using namespace itk;
00025 
00072   template < class TElastix >
00073     class SimilarityTransformElastix:
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 SimilarityTransformElastix                          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 SimilarityTransform<
00093       typename elx::TransformBase< TElastix >::CoordRepType,
00094       elx::TransformBase< TElastix >::FixedImageDimension >     SimilarityTransformType;
00095 
00097     itkNewMacro( Self );
00098 
00100     itkTypeMacro( SimilarityTransformElastix, AdvancedCombinationTransform );
00101 
00106     elxClassNameMacro( "SimilarityTransform" );
00107 
00109     itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00110 
00114     typedef typename Superclass1::ScalarType                  ScalarType;
00115     typedef typename Superclass1::ParametersType              ParametersType;
00116     typedef typename Superclass1::JacobianType                JacobianType;
00117 
00118     typedef typename Superclass1::InputPointType              InputPointType;
00119     typedef typename Superclass1::OutputPointType             OutputPointType;
00120     typedef typename Superclass1::InputVectorType             InputVectorType;
00121     typedef typename Superclass1::OutputVectorType            OutputVectorType;
00122     typedef typename Superclass1::InputCovariantVectorType    InputCovariantVectorType;
00123     typedef typename Superclass1::OutputCovariantVectorType   OutputCovariantVectorType;
00124     typedef typename Superclass1::InputVnlVectorType          InputVnlVectorType;
00125     typedef typename Superclass1::OutputVnlVectorType         OutputVnlVectorType;
00126 
00128     typedef typename SimilarityTransformType::Pointer         SimilarityTransformPointer;
00129     typedef typename SimilarityTransformType::OffsetType      OffsetType;
00130 
00132     typedef typename Superclass2::ElastixType               ElastixType;
00133     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00134     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00135     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00136     typedef typename Superclass2::RegistrationType          RegistrationType;
00137     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00138     typedef typename Superclass2::CoordRepType              CoordRepType;
00139     typedef typename Superclass2::FixedImageType            FixedImageType;
00140     typedef typename Superclass2::MovingImageType           MovingImageType;
00141     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00142     typedef typename Superclass2::CombinationTransformType  CombinationTransformType;
00143 
00145     typedef typename FixedImageType::IndexType              IndexType;
00146     typedef typename IndexType::IndexValueType              IndexValueType;
00147     typedef typename FixedImageType::SizeType               SizeType;
00148     typedef typename FixedImageType::PointType              PointType;
00149     typedef typename FixedImageType::SpacingType            SpacingType;
00150     typedef typename FixedImageType::RegionType             RegionType;
00151     typedef typename FixedImageType::DirectionType          DirectionType;
00152 
00153     typedef CenteredTransformInitializer<
00154       SimilarityTransformType, FixedImageType, MovingImageType> TransformInitializerType;
00155     typedef typename TransformInitializerType::Pointer      TransformInitializerPointer;
00156 
00158     typedef typename Superclass2::ScalesType                ScalesType;
00159 
00164     virtual void BeforeRegistration( void );
00165 
00181     virtual void InitializeTransform( void );
00182 
00190     virtual void SetScales( void );
00191 
00196     virtual void ReadFromFile( void );
00197 
00201     virtual void WriteToFile( const ParametersType & param ) const;
00202 
00203   protected:
00204 
00206     SimilarityTransformElastix();
00208     virtual ~SimilarityTransformElastix() {};
00209 
00215     virtual bool ReadCenterOfRotationIndex( InputPointType & rotationPoint ) const;
00216 
00222     virtual bool ReadCenterOfRotationPoint( InputPointType & rotationPoint ) const;
00223 
00224   private:
00225 
00227     SimilarityTransformElastix( const Self& );  // purposely not implemented
00229     void operator=( const Self& );        // purposely not implemented
00230 
00231     SimilarityTransformPointer        m_SimilarityTransform;
00232 
00233   }; // end class SimilarityTransformElastix
00234 
00235 
00236 } // end namespace elastix
00237 
00238 #ifndef ITK_MANUAL_INSTANTIATION
00239 #include "elxSimilarityTransform.hxx"
00240 #endif
00241 
00242 #endif // end #ifndef __elxSimilarityTransform_H__
00243 


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