Le jeudi 20 février 2020, le service gitlab.irstea.fr sera inaccessible en raison d'une migration vers un nouveau centre de données. Merci de votre compréhension.

Commit c72e8f4f authored by Gaetano Raffaele's avatar Gaetano Raffaele

FIX: first object had label zero (now labeling starts from one)

parent ac5677f4
......@@ -135,7 +135,7 @@ StreamingGraphToImageFilter<TGraph, TLabelImage>
try {
index[0] = (unsigned int)(pix % (std::size_t)(m_OutputSize[0]));
index[1] = (unsigned int)(pix / (std::size_t)(m_OutputSize[0]));
labelImage->SetPixel(index, res.second);
labelImage->SetPixel(index, res.second + 1);
} catch (std::exception e) {
std::cout << "Pixel ID: " << pix << std::endl;
std::cout << "Derived index: " << index[0] << "," << index[1] << 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