1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef __clitkGenericVectorInterpolator_txx
19 #define __clitkGenericVectorInterpolator_txx
20 #include "clitkGenericVectorInterpolator.h"
26 //=========================================================================================================================
28 template <class args_info_type, class ImageType, class TCoordRep>
29 GenericVectorInterpolator<args_info_type, ImageType, TCoordRep>::GenericVectorInterpolator()
36 //=========================================================================================================================
38 template <class args_info_type, class ImageType, class TCoordRep>
39 typename GenericVectorInterpolator<args_info_type, ImageType, TCoordRep>::InterpolatorPointer
40 GenericVectorInterpolator<args_info_type, ImageType, TCoordRep>::GetInterpolatorPointer()
42 //============================================================================
43 // We retrieve the type of interpolation from the command line
44 //============================================================================
45 typename InterpolatorType::Pointer interpolator;
47 switch ( m_ArgsInfo.interpVF_arg )
51 interpolator= itk::VectorNearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
52 if (m_Verbose) std::cout<<"Using nearestneighbor interpolation..."<<std::endl;
57 interpolator = itk::VectorLinearInterpolateImageFunction< ImageType,TCoordRep >::New();
58 if (m_Verbose) std::cout<<"Using linear interpolation..."<<std::endl;
63 typename clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::Pointer m =clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::New();
64 m->SetSplineOrder(m_ArgsInfo.interpVFOrder_arg);
66 if (m_Verbose) std::cout<<"Using Bspline interpolation..."<<std::endl;
72 typename clitk::VectorBSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::Pointer m =clitk::VectorBSplineInterpolateImageFunctionWithLUT< ImageType,TCoordRep >::New();
73 m->SetSplineOrder(m_ArgsInfo.interpVFOrder_arg);
74 m->SetLUTSamplingFactor(m_ArgsInfo.interpVFSF_arg);
76 if (m_Verbose) std::cout<<"Using BLUT interpolation..."<<std::endl;
83 //============================================================================