Commit a808f96c authored by remicres's avatar remicres
Browse files

ENH: output label starts from 1

Showing with 2 additions and 1 deletion
+2 -1
......@@ -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)
{
......
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