Commit c5465c2f authored by remi cresson's avatar remi cresson

ENH: no-data value can be chose

parent 05db7f05
......@@ -87,6 +87,10 @@ public:
"is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts.");
SetDefaultParameterInt ("interpolator.bco.radius", 2);
// No-data
AddParameter(ParameterType_Float, "nodata", "No-data value");
SetDefaultParameterFloat ("nodata", 0.0);
// Output
AddParameter(ParameterType_OutputImage, "out", "output classification map");
SetDefaultOutputPixelType("out", ImagePixelType_uint8);
......@@ -132,6 +136,15 @@ public:
{
m_ArgmaxMosaicFilter->PushBackInput(inputArray->GetNthElement(i) );
}
// Set nodata
FloatVectorImageType::PixelType nodatapix;
m_ArgmaxMosaicFilter->UpdateOutputInformation();
nodatapix.SetSize(filter->GetOutput()->GetNumberOfComponentsPerPixel());
nodatapix.Fill(GetParameterFloat("nodata"));
m_ArgmaxMosaicFilter->SetNoDataInputPixel(nodatapix);
m_ArgmaxMosaicFilter->SetNoDataOutputPixel(nodatapix);
SelectInterpolator<ArgmaxFilterType>(m_ArgmaxMosaicFilter);
}
......
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