From 7fb41950fedcfab836d0f5df90fdbe309e42887b Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@inrae.fr>
Date: Thu, 6 Apr 2023 09:02:28 +0200
Subject: [PATCH] ADD: no-data values check

---
 include/otbTensorflowMultisourceModelBase.hxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/otbTensorflowMultisourceModelBase.hxx b/include/otbTensorflowMultisourceModelBase.hxx
index b67d922..d9d6d7c 100644
--- a/include/otbTensorflowMultisourceModelBase.hxx
+++ b/include/otbTensorflowMultisourceModelBase.hxx
@@ -194,12 +194,12 @@ TensorflowMultisourceModelBase<TInputImage, TOutputImage>::GenerateOutputInforma
 
   // 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)
+  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);
   }
-  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");
   }
-- 
GitLab