1 #ifndef __clitkGenericVectorInterpolator_txx
2 #define __clitkGenericVectorInterpolator_txx
4 #include "clitkGenericVectorInterpolator.h"
10 //=========================================================================================================================
12 template <class args_info_type, class ImageType, class TCoordRep>
13 GenericVectorInterpolator<args_info_type, ImageType, TCoordRep>::GenericVectorInterpolator()
20 //=========================================================================================================================
22 template <class args_info_type, class ImageType, class TCoordRep>
23 typename GenericVectorInterpolator<args_info_type, ImageType, TCoordRep>::InterpolatorPointer
24 GenericVectorInterpolator<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.interpVF_arg )
35 interpolator= itk::VectorNearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
36 if (m_Verbose) std::cout<<"Using nearestneighbor interpolation..."<<std::endl;
41 interpolator = itk::VectorLinearInterpolateImageFunction< ImageType,TCoordRep >::New();
42 if (m_Verbose) std::cout<<"Using linear interpolation..."<<std::endl;
47 typename clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::Pointer m =clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::New();
48 m->SetSplineOrder(m_ArgsInfo.interpVFOrder_arg);
50 if (m_Verbose) std::cout<<"Using Bspline interpolation..."<<std::endl;
56 typename clitk::VectorBSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::Pointer m =clitk::VectorBSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::New();
57 m->SetSplineOrder(m_ArgsInfo.interpVFOrder_arg);
58 m->SetLUTSamplingFactor(m_ArgsInfo.interpVFSF_arg);
60 if (m_Verbose) std::cout<<"Using BLUT interpolation..."<<std::endl;
67 //============================================================================