X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkWarpImageGenericFilter.txx;h=c3f58b37d225dc41181009664831ea7f1f093808;hb=998ca9ca987553dc71578e5584e881f6bd537d91;hp=84bfbaaec7148cc5f133180c3b5290ca608eb491;hpb=a9a144f59b821751d19a41bd7b8e5bc6d6ff7a01;p=clitk.git diff --git a/tools/clitkWarpImageGenericFilter.txx b/tools/clitkWarpImageGenericFilter.txx index 84bfbaa..c3f58b3 100644 --- a/tools/clitkWarpImageGenericFilter.txx +++ b/tools/clitkWarpImageGenericFilter.txx @@ -27,7 +27,11 @@ * ===================================================*/ +#if ( ITK_VERSION_MAJOR < 5 ) #include "itkVectorResampleImageFilter.h" +#else +#include "itkResampleImageFilter.h" +#endif #include "clitkConvertBLUTCoeffsToVFFilter.h" namespace clitk @@ -128,8 +132,13 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() genericInterpolator->SetArgsInfo(m_ArgsInfo); // Resample to match the extent of the input +#if ( ITK_VERSION_MAJOR < 5 ) typename itk::VectorResampleImageFilter::Pointer resampler =itk::VectorResampleImageFilter::New(); +#else + typename itk::ResampleImageFilter::Pointer + resampler =itk::ResampleImageFilter::New(); +#endif resampler->SetInput(deformationField); resampler->SetOutputSpacing(deformationField->GetSpacing()); resampler->SetOutputDirection(deformationField->GetDirection()); @@ -160,8 +169,13 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() newSize[i]=input->GetLargestPossibleRegion().GetSize()[i]; // Resample to match the extent of the input +#if ( ITK_VERSION_MAJOR < 5 ) typename itk::VectorResampleImageFilter::Pointer resampler =itk::VectorResampleImageFilter::New(); +#else + typename itk::ResampleImageFilter::Pointer + resampler =itk::ResampleImageFilter::New(); +#endif resampler->SetInput(deformationField); resampler->SetOutputSpacing(input->GetSpacing()); resampler->SetOutputDirection(deformationField->GetDirection()); @@ -213,8 +227,13 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() backwardWarpFilter->SetOutputOrigin( input->GetOrigin() ); backwardWarpFilter->SetOutputSize( deformationField->GetLargestPossibleRegion().GetSize() ); backwardWarpFilter->SetOutputDirection( input->GetDirection() ); +#if ( ITK_VERSION_MAJOR < 5 ) typename itk::VectorResampleImageFilter::Pointer resampler =itk::VectorResampleImageFilter::New(); +#else + typename itk::ResampleImageFilter::Pointer + resampler =itk::ResampleImageFilter::New(); +#endif backwardWarpFilter->SetInterpolator(genericInterpolator->GetInterpolatorPointer()); warpFilter=backwardWarpFilter; }