go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxSplineKernelTransform.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 __elxSplineKernelTransform_H_
00016 #define __elxSplineKernelTransform_H_
00017 
00018 #include "itkKernelTransform2.h"
00019 #include "itkElasticBodySplineKernelTransform2.h"
00020 #include "itkElasticBodyReciprocalSplineKernelTransform2.h"
00021 #include "itkThinPlateSplineKernelTransform2.h"
00022 #include "itkThinPlateR2LogRSplineKernelTransform2.h"
00023 #include "itkVolumeSplineKernelTransform2.h"
00024 #include "elxIncludes.h"
00025 
00026 namespace elastix
00027 {
00028   using namespace itk;
00029 
00105 template < class TElastix >
00106 class SplineKernelTransform : public AdvancedCombinationTransform<
00107   ITK_TYPENAME elx::TransformBase<TElastix>::CoordRepType,
00108   elx::TransformBase<TElastix>::FixedImageDimension > ,
00109   public elx::TransformBase<TElastix>
00110 {
00111 public:
00112 
00114   typedef SplineKernelTransform                     Self;
00115   typedef AdvancedCombinationTransform<
00116     typename elx::TransformBase<TElastix>::CoordRepType,
00117     elx::TransformBase<TElastix>::FixedImageDimension >   Superclass1;
00118   typedef elx::TransformBase<TElastix>                    Superclass2;
00119 
00123   typedef KernelTransform2<
00124     typename elx::TransformBase<TElastix>::CoordRepType,
00125     elx::TransformBase<TElastix>::FixedImageDimension >   KernelTransformType;
00126   typedef SmartPointer<Self>                              Pointer;
00127   typedef SmartPointer<const Self>                        ConstPointer;
00128 
00130   itkNewMacro( Self );
00131 
00133   itkTypeMacro( SplineKernelTransform, AdvancedCombinationTransform );
00134 
00139   elxClassNameMacro( "SplineKernelTransform" );
00140 
00142   itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );
00143 
00145   typedef typename Superclass1::ScalarType                ScalarType;
00146   typedef typename Superclass1::ParametersType            ParametersType;
00147   typedef typename Superclass1::JacobianType              JacobianType;
00148   typedef typename Superclass1::InputVectorType           InputVectorType;
00149   typedef typename Superclass1::OutputVectorType          OutputVectorType;
00150   typedef typename Superclass1::InputCovariantVectorType  InputCovariantVectorType;
00151   typedef typename Superclass1::OutputCovariantVectorType OutputCovariantVectorType;
00152   typedef typename Superclass1::InputVnlVectorType        InputVnlVectorType;
00153   typedef typename Superclass1::OutputVnlVectorType       OutputVnlVectorType;
00154   typedef typename Superclass1::InputPointType            InputPointType;
00155   typedef typename Superclass1::OutputPointType           OutputPointType;
00156 
00158   typedef typename Superclass2::ElastixType               ElastixType;
00159   typedef typename Superclass2::ElastixPointer            ElastixPointer;
00160   typedef typename Superclass2::ConfigurationType         ConfigurationType;
00161   typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00162   typedef typename Superclass2::RegistrationType          RegistrationType;
00163   typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00164   typedef typename Superclass2::CoordRepType              CoordRepType;
00165   typedef typename Superclass2::FixedImageType            FixedImageType;
00166   typedef typename Superclass2::MovingImageType           MovingImageType;
00167   typedef typename Superclass2::ITKBaseType               ITKBaseType;
00168   typedef typename Superclass2::CombinationTransformType  CombinationTransformType;
00169 
00171   typedef typename KernelTransformType::Pointer      KernelTransformPointer;
00172 
00176   virtual int BeforeAll( void );
00177 
00183   virtual void BeforeRegistration( void );
00184 
00186   virtual void ReadFromFile( void );
00187 
00189   virtual void WriteToFile( const ParametersType & param ) const;
00190 
00191 protected:
00192 
00194   SplineKernelTransform();
00196   virtual ~SplineKernelTransform() {};
00197 
00198   typedef ThinPlateSplineKernelTransform2<
00199     CoordRepType, itkGetStaticConstMacro(SpaceDimension) >   TPKernelTransformType;
00200   typedef ThinPlateR2LogRSplineKernelTransform2<
00201     CoordRepType, itkGetStaticConstMacro(SpaceDimension) >   TPRKernelTransformType;
00202   typedef VolumeSplineKernelTransform2<
00203     CoordRepType, itkGetStaticConstMacro(SpaceDimension) >   VKernelTransformType;
00204   typedef ElasticBodySplineKernelTransform2<
00205     CoordRepType, itkGetStaticConstMacro(SpaceDimension) >   EBKernelTransformType;
00206   typedef ElasticBodyReciprocalSplineKernelTransform2<
00207     CoordRepType, itkGetStaticConstMacro(SpaceDimension) >   EBRKernelTransformType;
00208 
00212   virtual bool SetKernelType( const std::string & kernelType );
00213 
00219   virtual void DetermineSourceLandmarks( void );
00220 
00221   KernelTransformPointer m_KernelTransform;
00222 
00223 private:
00224 
00226   SplineKernelTransform( const Self& ); // purposely not implemented
00228   void operator=( const Self& );              // purposely not implemented
00229 
00230   std::string m_SplineKernelType;
00231 
00232 }; // end class SplineKernelTransform
00233 
00234 
00235 } // end namespace elastix
00236 
00237 #ifndef ITK_MANUAL_INSTANTIATION
00238 #include "elxSplineKernelTransform.hxx"
00239 #endif
00240 
00241 #endif // end #ifndef __elxSplineKernelTransform_H_


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