- else {
- if (interp == "linear") {
- filter->SetInterpolationType(ResampleImageFilterType::Linear);
- }
- else {
- if (interp == "bspline") {
- filter->SetInterpolationType(ResampleImageFilterType::BSpline);
- }
- else {
- 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;
+ filter->SetGaussianSigma(g);
+ }
+
+ // Set Interpolation
+ std::string interp = std::string(mArgsInfo.interp_arg);
+ if (interp == "nn") {
+ filter->SetInterpolationType(ResampleImageFilterType::NearestNeighbor);
+ } else {
+ if (interp == "linear") {
+ filter->SetInterpolationType(ResampleImageFilterType::Linear);
+ } else {
+ if (interp == "bspline") {
+ filter->SetInterpolationType(ResampleImageFilterType::BSpline);
+ } else {
+ if (interp == "blut") {
+ filter->SetInterpolationType(ResampleImageFilterType::B_LUT);
+ } else {
+ 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;