Commit 7fb41950 authored by Remi Cresson's avatar Remi Cresson
Browse files

ADD: no-data values check

2 merge requests!88Release v4.1.0,!83Tfmodelserve nodata
Pipeline #46056 passed with stages
in 18 minutes and 11 seconds
Showing with 3 additions and 3 deletions
+3 -3
...@@ -194,12 +194,12 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma ...@@ -194,12 +194,12 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma
// Check that no-data values size is consistent with the inputs // Check that no-data values size is consistent with the inputs
// If no value is specified, set a vector of the same size as the inputs // If no value is specified, set a vector of the same size as the inputs
if (m_InputNodataValues.size() == 0 && m_InputHasNodata.size() == 0) if (m_InputNodataValues.size() == 0 && m_InputUseNodata.size() == 0)
{ {
m_InputHasNodata = BoolListType(nbInputs, false); m_InputUseNodata = BoolListType(nbInputs, false);
m_InputNodataValues = ValueListType(nbInputs, 0.0); m_InputNodataValues = ValueListType(nbInputs, 0.0);
} }
if (nbInputs != m_InputNodataValues.size() || nbInputs != m_InputNodataValues.size()) if (nbInputs != m_InputNodataValues.size() || nbInputs != m_InputUseNodata.size())
{ {
itkExceptionMacro("Number of input images is " << nbInputs << " but the number of no-data values is not consistent"); itkExceptionMacro("Number of input images is " << nbInputs << " but the number of no-data values is not consistent");
} }
......
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