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 
00076   template < class TElastix >
00077     class SimilarityTransformElastix:
00078       public AdvancedCombinationTransform<
00079         ITK_TYPENAME elx::TransformBase< TElastix >::CoordRepType,
00080         elx::TransformBase< TElastix >::FixedImageDimension >,
00081       public elx::TransformBase< TElastix >
00082   {
00083   public:
00084 
00086     typedef SimilarityTransformElastix                          Self;
00087     typedef AdvancedCombinationTransform<
00088       typename elx::TransformBase< TElastix >::CoordRepType,
00089       elx::TransformBase< TElastix >::FixedImageDimension >     Superclass1;
00090     typedef elx::TransformBase< TElastix >                      Superclass2;
00091     typedef SmartPointer<Self>                                  Pointer;
00092     typedef SmartPointer<const Self>                            ConstPointer;
00093 
00096     typedef SimilarityTransform<
00097       typename elx::TransformBase< TElastix >::CoordRepType,
00098       elx::TransformBase< TElastix >::FixedImageDimension >     SimilarityTransformType;
00099 
00101     itkNewMacro( Self );
00102 
00104     itkTypeMacro( SimilarityTransformElastix, AdvancedCombinationTransform );
00105 
00110     elxClassNameMacro( "SimilarityTransform" );
00111 
00113     itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00114 
00118     typedef typename Superclass1::ScalarType                  ScalarType;
00119     typedef typename Superclass1::ParametersType              ParametersType;
00120     typedef typename Superclass1::JacobianType                JacobianType;
00121 
00122     typedef typename Superclass1::InputPointType              InputPointType;
00123     typedef typename Superclass1::OutputPointType             OutputPointType;
00124     typedef typename Superclass1::InputVectorType             InputVectorType;
00125     typedef typename Superclass1::OutputVectorType            OutputVectorType;
00126     typedef typename Superclass1::InputCovariantVectorType    InputCovariantVectorType;
00127     typedef typename Superclass1::OutputCovariantVectorType   OutputCovariantVectorType;
00128     typedef typename Superclass1::InputVnlVectorType          InputVnlVectorType;
00129     typedef typename Superclass1::OutputVnlVectorType         OutputVnlVectorType;
00130 
00132     typedef typename SimilarityTransformType::Pointer         SimilarityTransformPointer;
00133     typedef typename SimilarityTransformType::OffsetType      OffsetType;
00134 
00136     typedef typename Superclass2::ElastixType               ElastixType;
00137     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00138     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00139     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00140     typedef typename Superclass2::RegistrationType          RegistrationType;
00141     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00142     typedef typename Superclass2::CoordRepType              CoordRepType;
00143     typedef typename Superclass2::FixedImageType            FixedImageType;
00144     typedef typename Superclass2::MovingImageType           MovingImageType;
00145     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00146     typedef typename Superclass2::CombinationTransformType  CombinationTransformType;
00147 
00149     typedef typename FixedImageType::IndexType              IndexType;
00150     typedef typename IndexType::IndexValueType              IndexValueType;
00151     typedef typename FixedImageType::SizeType               SizeType;
00152     typedef typename FixedImageType::PointType              PointType;
00153     typedef typename FixedImageType::SpacingType            SpacingType;
00154     typedef typename FixedImageType::RegionType             RegionType;
00155     typedef typename FixedImageType::DirectionType          DirectionType;
00156 
00157     typedef CenteredTransformInitializer<
00158       SimilarityTransformType, FixedImageType, MovingImageType> TransformInitializerType;
00159     typedef typename TransformInitializerType::Pointer      TransformInitializerPointer;
00160 
00162     typedef typename Superclass2::ScalesType                ScalesType;
00163 
00168     virtual void BeforeRegistration( void );
00169 
00185     virtual void InitializeTransform( void );
00186 
00194     virtual void SetScales( void );
00195 
00200     virtual void ReadFromFile( void );
00201 
00205     virtual void WriteToFile( const ParametersType & param ) const;
00206 
00207   protected:
00208 
00210     SimilarityTransformElastix();
00212     virtual ~SimilarityTransformElastix() {};
00213 
00219     virtual bool ReadCenterOfRotationIndex( InputPointType & rotationPoint ) const;
00220 
00226     virtual bool ReadCenterOfRotationPoint( InputPointType & rotationPoint ) const;
00227 
00228   private:
00229 
00231     SimilarityTransformElastix( const Self& );  // purposely not implemented
00233     void operator=( const Self& );        // purposely not implemented
00234 
00235     SimilarityTransformPointer        m_SimilarityTransform;
00236 
00237   }; // end class SimilarityTransformElastix
00238 
00239 
00240 } // end namespace elastix
00241 
00242 #ifndef ITK_MANUAL_INSTANTIATION
00243 #include "elxSimilarityTransform.hxx"
00244 #endif
00245 
00246 #endif // end #ifndef __elxSimilarityTransform_H__
00247 


Generated on 24-10-2011 for elastix by doxygen 1.7.4 elastix logo