Skip to content
Snippets Groups Projects
Commit c4d5d2f3 authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

ENH: add maximumIteration number for pruning filter.

parent bea2695f
Branches
Tags
No related merge requests found
......@@ -231,7 +231,7 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
minRegionCount++;
}
}
// std::cout<<minRegionCount<<" regions are too be fused"<<std::endl;
// std::cout<<minRegionCount<<" regions are too be fused"<<std::endl;
// Iterate over all regions
for(LabelType curLabel = 1; curLabel <= regionCount; ++curLabel)
......@@ -393,7 +393,7 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
++outputIt;
}
finishedPruning = !minRegionCount || regionCount == 1;
finishedPruning = !minRegionCount || regionCount == 1 || pruneIterations>=10;
// only one iteration for now
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment