Commit da3dc57b authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding an optional default pixel value field

parent cf369d63
......@@ -154,6 +154,10 @@ private:
SetParameterDescription("outputs.isotropic", isotropOss.str());
EnableParameter("outputs.isotropic");
AddParameter(ParameterType_Float, "outputs.default", "Default pixel value");
SetParameterDescription("outputs.spacingy","Default value to write when outside of input image.");
SetDefaultParameterFloat("outputs.default",0.);
// Elevation
ElevationParametersHandler::AddElevationParameters(this, "elev");
......@@ -430,6 +434,13 @@ private:
ul[1] = GetParameterFloat("outputs.uly");
m_ResampleFilter->SetOutputOrigin(ul);
// Build the default pixel
FloatVectorImageType::PixelType defaultValue;
defaultValue.SetSize(inImage->GetNumberOfComponentsPerPixel());
defaultValue.Fill(GetParameterFloat("outputs.default"));
m_ResampleFilter->SetEdgePaddingValue(defaultValue);
// Deformation Field spacing
ResampleFilterType::SpacingType gridSpacing;
if (IsParameterEnabled("opt.gridspacing"))
......
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