Commit a808f96c authored by remicres's avatar remicres

ENH: output label starts from 1

parent e0fe8022
......@@ -101,7 +101,7 @@ MergeAllGraphsAndAchieveSegmentation(
using LabelImageIterator = itk::ImageRegionIterator<typename TSegmenter::LabelImageType>;
LabelImageIterator it(labelImage, labelImage->GetLargestPossibleRegion());
const typename TSegmenter::LabelImageType::InternalPixelType noDataLabel = 0;
typename TSegmenter::LabelImageType::InternalPixelType label = 1;
typename TSegmenter::LabelImageType::InternalPixelType label;
// Get the maximum label value
for(it.GoToBegin();!it.IsAtEnd(); ++it)
......@@ -109,6 +109,7 @@ MergeAllGraphsAndAchieveSegmentation(
label = it.Get();
// Compute LUT
label = 1;
vnl_vector<typename TSegmenter::LabelImageType::InternalPixelType> lut(label,noDataLabel);
for(it.GoToBegin();!it.IsAtEnd(); ++it)
{
......
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