1 #ifndef __clitkGenericInterpolator_txx
2 #define __clitkGenericInterpolator_txx
4 #include "clitkGenericInterpolator.h"
10 //=========================================================================================================================
12 template <class args_info_type, class ImageType, class TCoordRep>
13 GenericInterpolator<args_info_type, ImageType, TCoordRep>::GenericInterpolator()
20 //=========================================================================================================================
22 template <class args_info_type, class ImageType, class TCoordRep>
23 typename GenericInterpolator<args_info_type, ImageType, TCoordRep>::InterpolatorPointer
24 GenericInterpolator<args_info_type, ImageType, TCoordRep>::GetInterpolatorPointer()
26 //============================================================================
27 // We retrieve the type of interpolation from the command line
28 //============================================================================
29 typename InterpolatorType::Pointer interpolator;
31 switch ( m_ArgsInfo.interp_arg )
35 interpolator= itk::NearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
36 if (m_Verbose) std::cout<<"Using nearestneighbor interpolation..."<<std::endl;
41 interpolator = itk::LinearInterpolateImageFunction< ImageType,TCoordRep >::New();
42 if (m_Verbose) std::cout<<"Using linear interpolation..."<<std::endl;
47 typename itk::BSplineInterpolateImageFunction< ImageType,TCoordRep >::Pointer m =itk::BSplineInterpolateImageFunction< ImageType,TCoordRep >::New();
48 m->SetSplineOrder(m_ArgsInfo.interpOrder_arg);
50 if (m_Verbose) std::cout<<"Using Bspline interpolation..."<<std::endl;
56 typename itk::BSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::Pointer m =itk::BSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::New();
57 m->SetSplineOrder(m_ArgsInfo.interpOrder_arg);
58 m->SetLUTSamplingFactor(m_ArgsInfo.interpSF_arg);
60 if (m_Verbose) std::cout<<"Using BLUT interpolation..."<<std::endl;
68 //============================================================================