]> Creatis software - clitk.git/blobdiff - registration/clitkGenericVectorInterpolator.txx
With ITKv5, change VectorResample and VectorCast Image Filter to Resample and Cast...
[clitk.git] / registration / clitkGenericVectorInterpolator.txx
old mode 100755 (executable)
new mode 100644 (file)
index 9fd6892..cd9c0f7
@@ -3,7 +3,7 @@
 
   Authors belong to: 
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 #ifndef __clitkGenericVectorInterpolator_txx   
 #define __clitkGenericVectorInterpolator_txx
 #include "clitkGenericVectorInterpolator.h"
@@ -48,17 +48,25 @@ namespace clitk
       {
       case 0: 
 
+#if ( ITK_VERSION_MAJOR < 5 )
        interpolator= itk::VectorNearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
+#else
+       interpolator= itk::NearestNeighborInterpolateImageFunction< ImageType,TCoordRep >::New();
+#endif
        if (m_Verbose) std::cout<<"Using nearestneighbor interpolation..."<<std::endl;
        break;
  
       case 1:
 
+#if ( ITK_VERSION_MAJOR < 5 )
        interpolator = itk::VectorLinearInterpolateImageFunction< ImageType,TCoordRep >::New();
+#else
+       interpolator = itk::LinearInterpolateImageFunction< ImageType,TCoordRep >::New();
+#endif
        if (m_Verbose) std::cout<<"Using linear interpolation..."<<std::endl;
        break;  
       
-      case 2:
+/*      case 2:
        {
          typename clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::Pointer m =clitk::VectorBSplineInterpolateImageFunction< ImageType,TCoordRep >::New();
          m->SetSplineOrder(m_ArgsInfo.interpVFOrder_arg);
@@ -76,7 +84,7 @@ namespace clitk
          if (m_Verbose) std::cout<<"Using BLUT interpolation..."<<std::endl;
          break;
        } 
-
+*/
       }//end of switch