Commit ff879a25 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 #46054 failed with stages
in 1 minute and 18 seconds
Showing with 12 additions and 0 deletions
+12 -0
......@@ -192,6 +192,18 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma
<< " and the number of input tensors names is " << m_InputPlaceholders.size());
}
// 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 (m_InputNodataValues.size() == 0 && m_InputHasNodata.size() == 0)
{
m_InputHasNodata = BoolListType(nbInputs, false);
m_InputNodataValues = ValueListType(nbInputs, 0.0);
}
if (nbInputs != m_InputNodataValues.size() || nbInputs != m_InputNodataValues.size())
{
itkExceptionMacro("Number of input images is " << nbInputs << " but the number of no-data values is not consistent");
}
//////////////////////////////////////////////////////////////////////////////////////////
// Get tensors information
//////////////////////////////////////////////////////////////////////////////////////////
......
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