Commit c5465c2f authored by remi cresson's avatar remi cresson
Browse files

ENH: no-data value can be chose

parent 05db7f05
No related merge requests found
Showing with 13 additions and 0 deletions
+13 -0
...@@ -87,6 +87,10 @@ public: ...@@ -87,6 +87,10 @@ public:
"is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts."); "is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts.");
SetDefaultParameterInt ("interpolator.bco.radius", 2); SetDefaultParameterInt ("interpolator.bco.radius", 2);
// No-data
AddParameter(ParameterType_Float, "nodata", "No-data value");
SetDefaultParameterFloat ("nodata", 0.0);
// Output // Output
AddParameter(ParameterType_OutputImage, "out", "output classification map"); AddParameter(ParameterType_OutputImage, "out", "output classification map");
SetDefaultOutputPixelType("out", ImagePixelType_uint8); SetDefaultOutputPixelType("out", ImagePixelType_uint8);
...@@ -132,6 +136,15 @@ public: ...@@ -132,6 +136,15 @@ public:
{ {
m_ArgmaxMosaicFilter->PushBackInput(inputArray->GetNthElement(i) ); 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); SelectInterpolator<ArgmaxFilterType>(m_ArgmaxMosaicFilter);
} }
......
Supports Markdown
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