1 #ifndef __clitkGenericInterpolator_txx
2 #define __clitkGenericInterpolator_txx
3 #include "clitkGenericInterpolator.h"
9 //=========================================================================================================================
11 template <class args_info_type, class ImageType, class TCoordRep>
12 GenericInterpolator<args_info_type, ImageType, TCoordRep>::GenericInterpolator()
19 //=========================================================================================================================
21 template <class args_info_type, class ImageType, class TCoordRep>
22 typename GenericInterpolator<args_info_type, ImageType, TCoordRep>::InterpolatorPointer
23 GenericInterpolator<args_info_type, ImageType, TCoordRep>::GetInterpolatorPointer()
25 //============================================================================
26 // We retrieve the type of interpolation from the command line
27 //============================================================================
28 typename InterpolatorType::Pointer interpolator;
30 switch ( m_ArgsInfo.interp_arg )
34 interpolator= itk::NearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
35 if (m_Verbose) std::cout<<"Using nearestneighbor interpolation..."<<std::endl;
40 interpolator = itk::LinearInterpolateImageFunction< ImageType,TCoordRep >::New();
41 if (m_Verbose) std::cout<<"Using linear interpolation..."<<std::endl;
46 typename itk::BSplineInterpolateImageFunction< ImageType,TCoordRep >::Pointer m =itk::BSplineInterpolateImageFunction< ImageType,TCoordRep >::New();
47 m->SetSplineOrder(m_ArgsInfo.interpOrder_arg);
49 if (m_Verbose) std::cout<<"Using Bspline interpolation..."<<std::endl;
55 typename itk::BSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::Pointer m =itk::BSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::New();
56 m->SetSplineOrder(m_ArgsInfo.interpOrder_arg);
57 m->SetLUTSamplingFactor(m_ArgsInfo.interpSF_arg);
59 if (m_Verbose) std::cout<<"Using BLUT interpolation..."<<std::endl;
67 //============================================================================