diff --git a/include/otbStreamingGraphToImageFilter.txx b/include/otbStreamingGraphToImageFilter.txx index 0332f547bf63ae56813caca4989eb8f0da2d955c..431f7d94a444861d65ab024a0472cfe1c536edeb 100644 --- a/include/otbStreamingGraphToImageFilter.txx +++ b/include/otbStreamingGraphToImageFilter.txx @@ -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;