if (interp == "blut") {
filter->SetInterpolationType(ResampleImageFilterType::B_LUT);
} else {
- std::cerr << "Error. I do not know interpolation '" << mArgsInfo.interp_arg
- << "'. Choose among: nn, linear, bspline, blut" << std::endl;
- exit(0);
+ if (interp == "windowed sinc") {
+ filter->SetInterpolationType(ResampleImageFilterType::WSINC);
+ } else {
+ std::cerr << "Error. I do not know interpolation '" << mArgsInfo.interp_arg
+ << "'. Choose among: nn, linear, bspline, blut, windowed sinc" << std::endl;
+ exit(0);
+ }
}
}
}
#include "itkResampleImageFilter.h"
#include "itkAffineTransform.h"
#include "itkNearestNeighborInterpolateImageFunction.h"
+#include "itkWindowedSincInterpolateImageFunction.h"
#include "itkLinearInterpolateImageFunction.h"
#include "itkBSplineInterpolateImageFunction.h"
#include "itkBSplineInterpolateImageFunctionWithLUT.h"
case Linear: std::cout << "Linear" << std::endl; break;
case BSpline: std::cout << "BSpline " << m_BSplineOrder << std::endl; break;
case B_LUT: std::cout << "B-LUT " << m_BSplineOrder << " " << m_BLUTSamplingFactor << std::endl; break;
+ case WSINC: std::cout << "Windowed Sinc" << std::endl; break;
}
std::cout << "Threads = " << this->GetNumberOfThreads() << std::endl;
std::cout << "LastDimIsTime = " << m_LastDimensionIsTime << std::endl;
filter->SetInterpolator(interpolator);
break;
}
+ case WSINC: {
+ typedef itk::WindowedSincInterpolateImageFunction<InputImageType, 4> InterpolatorType;
+ typename InterpolatorType::Pointer interpolator = InterpolatorType::New();
+ filter->SetInterpolator(interpolator);
+ break;
+ }
}
// Initial Gaussian blurring if needed