go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxRayCastResampleInterpolator.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 __elxRayCastResampleInterpolator_h
00016 #define __elxRayCastResampleInterpolator_h
00017 
00018 #include "itkAdvancedRayCastInterpolateImageFunction.h"
00019 #include "itkAdvancedCombinationTransform.h"
00020 #include "itkAdvancedTransform.h"
00021 #include "../Transforms/EulerTransform/itkEulerTransform.h"
00022 #include "elxIncludes.h"
00023 
00024 namespace elastix
00025 {
00026 using namespace itk;
00027 
00035 template < class TElastix >
00036 class RayCastResampleInterpolator: 
00037 public
00038   AdvancedRayCastInterpolateImageFunction<
00039     ITK_TYPENAME ResampleInterpolatorBase<TElastix>::InputImageType,
00040     ITK_TYPENAME ResampleInterpolatorBase<TElastix>::CoordRepType >,
00041 public ResampleInterpolatorBase<TElastix>
00042 {
00043 public:
00044 
00046   typedef RayCastResampleInterpolator                               Self;
00047   typedef AdvancedRayCastInterpolateImageFunction<
00048       typename ResampleInterpolatorBase<TElastix>::InputImageType,
00049       typename ResampleInterpolatorBase<TElastix>::CoordRepType>    Superclass1;
00050   typedef ResampleInterpolatorBase<TElastix>                        Superclass2;
00051   typedef SmartPointer<Self>                                        Pointer;
00052   typedef SmartPointer<const Self>                                  ConstPointer;
00053 
00055   itkNewMacro( Self );
00056 
00058   itkTypeMacro( RayCastResampleInterpolator, AdvancedRayCastInterpolateImageFunction );
00059 
00064   elxClassNameMacro( "FinalRayCastInterpolator" );
00065 
00067   itkStaticConstMacro( ImageDimension, unsigned int,Superclass1::ImageDimension );
00068 
00070   typedef typename Superclass1::OutputType                OutputType;
00071   typedef typename Superclass1::InputImageType            InputImageType;
00072   typedef typename Superclass1::IndexType                 IndexType;
00073   typedef typename Superclass1::ContinuousIndexType       ContinuousIndexType;
00074   typedef typename Superclass1::PointType                 PointType;
00075   typedef typename Superclass1::SizeType                  SizeType;
00076   typedef typename InputImageType::SpacingType            SpacingType;
00077 
00079   typedef typename Superclass2::ElastixType               ElastixType;
00080   typedef typename Superclass2::ElastixPointer            ElastixPointer;
00081   typedef typename Superclass2::ConfigurationType         ConfigurationType;
00082   typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00083   typedef typename Superclass2::RegistrationType          RegistrationType;
00084   typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00085   typedef typename Superclass2::ITKBaseType               ITKBaseType;
00086 
00088   typedef typename itk::EulerTransform<
00089     typename InterpolatorBase<TElastix>::CoordRepType,ImageDimension >                    
00090                                                           EulerTransformType;
00091   typedef typename EulerTransformType::ParametersType     TransformParametersType;
00092   typedef typename EulerTransformType::Pointer            EulerTransformPointer;
00093   typedef typename itk::AdvancedTransform<
00094     typename InterpolatorBase<TElastix>::CoordRepType,
00095     itkGetStaticConstMacro( ImageDimension ),
00096     itkGetStaticConstMacro( ImageDimension )>             AdvancedTransformType;
00097   typedef typename AdvancedTransformType::Pointer         AdvancedTransformPointer;
00098   typedef typename itk::AdvancedCombinationTransform<
00099     typename InterpolatorBase<TElastix>::CoordRepType,
00100     itkGetStaticConstMacro( ImageDimension ) >            CombinationTransformType;
00101   typedef typename CombinationTransformType::Pointer      CombinationTransformPointer;
00102 
00103   virtual int BeforeAll( void );
00104 
00105   virtual void BeforeRegistration( void );
00106 
00108   virtual void ReadFromFile( void );
00109 
00111   virtual void WriteToFile( void ) const;
00112 
00113 protected:
00114 
00116   RayCastResampleInterpolator() {}
00117   
00119   virtual ~RayCastResampleInterpolator() {}
00120 
00124   void InitializeRayCastInterpolator( void );
00125 
00126 private:
00127 
00129   RayCastResampleInterpolator( const Self& ); // purposely not implemented
00130   
00132   void operator=( const Self& );              // purposely not implemented
00133 
00134   EulerTransformPointer                     m_PreTransform;
00135   TransformParametersType                   m_PreParameters;
00136   CombinationTransformPointer               m_CombinationTransform;
00137 
00138 }; // end class RayCastResampleInterpolator
00139 
00140 
00141 } // end namespace elastix
00142 
00143 
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "elxRayCastResampleInterpolator.hxx"
00146 #endif
00147 
00148 
00149 #endif // end __elxRayCastResampleInterpolator_h


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