Commit c711e7f8 authored by Cresson Remi's avatar Cresson Remi
Browse files

ENH: add paddingin SuperSuperimpose application

parent b50e5a4a
......@@ -73,7 +73,11 @@ private:
AddParameter(ParameterType_OutputImage, "out", "Output image");
SetParameterDescription("out", "Output reprojected image.");
AddParameter(ParameterType_Float, "ratio", "Output image pixel spacing ratio");
AddParameter(ParameterType_Float, "ratio", "Ratio between input image pixel spacing and output image pixel spacing");
SetDefaultParameterFloat ("ratio", 1.0);
AddParameter(ParameterType_Int, "padding", "Padding radius (in pixels of the reprojected image)");
SetDefaultParameterInt ("padding", 0);
AddParameter(ParameterType_Float, "fv", "Fill Value");
SetParameterDescription("fv","Fill value for area outside the reprojected image");
......@@ -156,7 +160,8 @@ private:
spacing[i] *= GetParameterFloat("ratio");
size[i] /= GetParameterFloat("ratio");
origin[i] += 0.5*(spacing[i] - refImage->GetSignedSpacing()[i]);
size[i] += GetParameterInt("padding") * 2;
origin[i] += 0.5*(spacing[i] - refImage->GetSignedSpacing()[i]) - GetParameterInt("padding") * spacing[i];
FloatVectorImageType::PixelType defaultValue;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment