Skip to content
Snippets Groups Projects
Commit d6d6d689 authored by Sebastien Harasse's avatar Sebastien Harasse
Browse files

BUG: Mean shift. label map was incorrect when max iteration number is too low

parent 4ef3b43d
No related branches found
No related tags found
No related merge requests found
......@@ -747,9 +747,9 @@ MeanShiftImageFilter2<TInputImage, TOutputImage, TKernel, TNorm, TOutputMetricIm
// Update the mode table now that the current pixel has been assigned
modeTableIt.Set(1); // m_ModeTable->SetPixel(currentIndex, 1);
// If the loop exited with hasConverged, then we have a new mode
// If the loop exited with hasConverged or too many iterations, then we have a new mode
LabelType label;
if (hasConverged)
if (hasConverged || iteration == m_MaxIterationNumber)
{
m_NumLabels[threadId]++;
label = m_NumLabels[threadId];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment