Commit cd141dd8 authored by Cresson Remi's avatar Cresson Remi
Browse files

ENH: fix bug with nodata

parent bf4e7c7b
...@@ -200,11 +200,15 @@ TensorflowSampler<TInputImage, TVectorData> ...@@ -200,11 +200,15 @@ TensorflowSampler<TInputImage, TVectorData>
for (int i; i<pix.Size(); i++) for (int i; i<pix.Size(); i++)
if (pix[i] == m_NodataValue) if (pix[i] == m_NodataValue)
{ {
std::cout << "[0]: pix[" << i << "]=" << pix[i] << std::endl;
std::cout << "break" << std::endl;
hasBeenSampled = false; hasBeenSampled = false;
std::cout << "no actually break" << std::endl;
break; break;
} }
if (!hasBeenSampled) if (!hasBeenSampled)
{ {
std::cout << "BREAKED" << std::endl;
break; break;
} }
} }
...@@ -213,22 +217,6 @@ TensorflowSampler<TInputImage, TVectorData> ...@@ -213,22 +217,6 @@ TensorflowSampler<TInputImage, TVectorData>
} // Next input } // Next input
if (hasBeenSampled) if (hasBeenSampled)
{ {
// TODO: delete
IndexType outIndex;
outIndex[0] = 0;
outIndex[1] = count * m_PatchSizes[0][1];
RegionType region(outIndex, m_PatchSizes[0]);
IteratorType it(m_OutputPatchImages[0], region);
for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{
PixelType pix = it.Get();
for (int i; i<pix.Size(); i++)
if (pix[i] == m_NodataValue)
{
std::cout << "PROBLEM" << std::endl;
}
}
// Fill label // Fill label
labelIndex[1] = count; labelIndex[1] = count;
m_OutputLabelImage->SetPixel(labelIndex, labelPix); m_OutputLabelImage->SetPixel(labelIndex, labelPix);
......
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