Commit c628c0f8 authored by Cresson Remi's avatar Cresson Remi

ENH: fix bug with nodata

parent 9af35434
......@@ -198,33 +198,14 @@ TensorflowSampler<TInputImage, TVectorData>
{
PixelType pix = it.Get();
for (unsigned int band = 0 ; band < pix.Size() ; band++)
{
if (pix[band] == m_NodataValue)
{
hasBeenSampled = false;
}
}
}
}
} // Next input
if (hasBeenSampled)
{
// TODO: delete this
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 (unsigned int band = 0; band < pix.Size(); band++)
if (pix[band] == m_NodataValue)
std::cout << "BIG 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