Commit 39f2cc9f authored by Cresson Remi's avatar Cresson Remi
Browse files

ENH: fix bug with nodata

parent 8e2b6f6a
...@@ -197,11 +197,10 @@ TensorflowSampler<TInputImage, TVectorData> ...@@ -197,11 +197,10 @@ TensorflowSampler<TInputImage, TVectorData>
for (it.GoToBegin(); !it.IsAtEnd(); ++it) for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{ {
PixelType pix = it.Get(); PixelType pix = it.Get();
for (unsigned int band = 0; band < pix.Size(); band++) for (unsigned int band = 0 ; band < pix.Size() ; band++)
{ {
if (pix[band] == m_NodataValue) if (pix[band] == m_NodataValue)
{ {
std::cout << "FOUNd NODATA" << std::endl;
hasBeenSampled = false; hasBeenSampled = false;
break; break;
} }
...@@ -227,7 +226,7 @@ TensorflowSampler<TInputImage, TVectorData> ...@@ -227,7 +226,7 @@ TensorflowSampler<TInputImage, TVectorData>
PixelType pix = it.Get(); PixelType pix = it.Get();
for (unsigned int band = 0; band < pix.Size(); band++) for (unsigned int band = 0; band < pix.Size(); band++)
if (pix[band] == m_NodataValue) if (pix[band] == m_NodataValue)
std::cout << band << std::endl; std::cout << "BIG PROBlEM" << std::endl;
} }
......
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