Commit 86e331b2 authored by Cresson Remi's avatar Cresson Remi
Browse files

ENH: fix bug with nodata

Showing with 13 additions and 13 deletions
+13 -13
...@@ -215,19 +215,19 @@ TensorflowSampler<TInputImage, TVectorData> ...@@ -215,19 +215,19 @@ TensorflowSampler<TInputImage, TVectorData>
} // Next input } // Next input
if (hasBeenSampled) if (hasBeenSampled)
{ {
// TODO: delete this // // TODO: delete this
IndexType outIndex; // IndexType outIndex;
outIndex[0] = 0; // outIndex[0] = 0;
outIndex[1] = count * m_PatchSizes[0][1]; // outIndex[1] = count * m_PatchSizes[0][1];
RegionType region(outIndex, m_PatchSizes[0]); // RegionType region(outIndex, m_PatchSizes[0]);
IteratorType it(m_OutputPatchImages[0], region); // IteratorType it(m_OutputPatchImages[0], region);
for (it.GoToBegin(); !it.IsAtEnd(); ++it) // for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{ // {
PixelType pix = it.Get(); // PixelType pix = it.Get();
for (unsigned int band; band < pix.Size(); band++) // for (unsigned int band; band < pix.Size(); band++)
if (pix[band] == m_NodataValue) // if (pix[band] == m_NodataValue)
std::cout << band << std::endl; // std::cout << band << std::endl;
} // }
// Fill label // Fill label
labelIndex[1] = count; labelIndex[1] = count;
......
Supports Markdown
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