X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkVFResampleGenericFilter.cxx;fp=tools%2FclitkVFResampleGenericFilter.cxx;h=d60b8d0d9ae145a2effb3bf908eb998ae366a96d;hb=998ca9ca987553dc71578e5584e881f6bd537d91;hp=d287fec36e0b4047b64c7c5490b59536afcdb810;hpb=a9a144f59b821751d19a41bd7b8e5bc6d6ff7a01;p=clitk.git diff --git a/tools/clitkVFResampleGenericFilter.cxx b/tools/clitkVFResampleGenericFilter.cxx index d287fec..d60b8d0 100644 --- a/tools/clitkVFResampleGenericFilter.cxx +++ b/tools/clitkVFResampleGenericFilter.cxx @@ -111,7 +111,11 @@ clitk::VFResampleGenericFilter::ComputeImage(typename ImageType::Pointer inputIm typedef typename ImageType::PointType PointType; // Create Image Filter +#if ( ITK_VERSION_MAJOR < 5 ) typedef itk::VectorResampleImageFilter FilterType; +#else + typedef itk::ResampleImageFilter FilterType; +#endif typename FilterType::Pointer filter = FilterType::New(); // Instance of the transform object to be passed to the resample @@ -137,12 +141,20 @@ clitk::VFResampleGenericFilter::ComputeImage(typename ImageType::Pointer inputIm // Select interpolator if (mInterpolatorName == "nn") { +#if ( ITK_VERSION_MAJOR < 5 ) typedef itk::VectorNearestNeighborInterpolateImageFunction InterpolatorType; +#else + typedef itk::NearestNeighborInterpolateImageFunction InterpolatorType; +#endif typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); filter->SetInterpolator(interpolator); } else { if (mInterpolatorName == "linear") { +#if ( ITK_VERSION_MAJOR < 5 ) typedef itk::VectorLinearInterpolateImageFunction InterpolatorType; +#else + typedef itk::LinearInterpolateImageFunction InterpolatorType; +#endif typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); filter->SetInterpolator(interpolator); } else {