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>
for (int i; i<pix.Size(); i++)
if (pix[i] == m_NodataValue)
{
std::cout << "[0]: pix[" << i << "]=" << pix[i] << std::endl;
std::cout << "break" << std::endl;
hasBeenSampled = false;
std::cout << "no actually break" << std::endl;
break;
}
if (!hasBeenSampled)
{
std::cout << "BREAKED" << std::endl;
break;
}
}
......@@ -213,22 +217,6 @@ TensorflowSampler<TInputImage, TVectorData>
} // Next input
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
labelIndex[1] = count;
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