go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxInterpolatorBase.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 __elxInterpolatorBase_h
00016 #define __elxInterpolatorBase_h
00017 
00019 #include "elxMacro.h"
00020 
00021 #include "elxBaseComponentSE.h"
00022 
00023 #include "itkInterpolateImageFunction.h"
00024 
00025 
00026 namespace elastix
00027 {
00028 using namespace itk;
00029 
00040   template <class TElastix>
00041     class InterpolatorBase : public BaseComponentSE<TElastix>
00042   {
00043   public:
00044 
00046     typedef InterpolatorBase            Self;
00047     typedef BaseComponentSE<TElastix>   Superclass;
00048 
00050     itkTypeMacro( InterpolatorBase, BaseComponentSE );
00051 
00053     typedef typename Superclass::ElastixType            ElastixType;
00054     typedef typename Superclass::ElastixPointer         ElastixPointer;
00055     typedef typename Superclass::ConfigurationType      ConfigurationType;
00056     typedef typename Superclass::ConfigurationPointer   ConfigurationPointer;
00057     typedef typename Superclass::RegistrationType       RegistrationType;
00058     typedef typename Superclass::RegistrationPointer    RegistrationPointer;
00059 
00061     typedef typename ElastixType::MovingImageType       InputImageType;
00062     typedef typename ElastixType::CoordRepType          CoordRepType;
00063 
00065     typedef InterpolateImageFunction<
00066       InputImageType, CoordRepType>                     ITKBaseType;
00067 
00069     virtual ITKBaseType * GetAsITKBaseType(void)
00070     {
00071       return dynamic_cast<ITKBaseType *>(this);
00072     }
00073 
00075     virtual const ITKBaseType * GetAsITKBaseType(void) const
00076     {
00077       return dynamic_cast<const ITKBaseType *>(this);
00078     }
00079 
00080   protected:
00081 
00083     InterpolatorBase() {}
00085     virtual ~InterpolatorBase() {}
00086 
00087   private:
00088 
00090     InterpolatorBase( const Self& );  // purposely not implemented
00092     void operator=( const Self& );    // purposely not implemented
00093 
00094   }; // end class InterpolatorBase
00095 
00096 
00097 } // end namespace elastix
00098 
00099 
00100 
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "elxInterpolatorBase.hxx"
00103 #endif
00104 
00105 #endif // end #ifndef __elxInterpolatorBase_h
00106 


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