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

BUG: Mean shift. neighborhoodRegion definition was incorrect.

parent 3ceae713
Branches
Tags
No related merge requests found
...@@ -314,7 +314,7 @@ MeanShiftImageFilter2<TInputImage, TOutputImage, TKernel, TNorm, TOutputMetricIm ...@@ -314,7 +314,7 @@ MeanShiftImageFilter2<TInputImage, TOutputImage, TKernel, TNorm, TOutputMetricIm
regionIndex[comp] = vcl_max(static_cast<long int>(outputRegion.GetIndex().GetElement(comp)), static_cast<long int>(inputIndex[comp] - m_SpatialRadius[comp])); regionIndex[comp] = vcl_max(static_cast<long int>(outputRegion.GetIndex().GetElement(comp)), static_cast<long int>(inputIndex[comp] - m_SpatialRadius[comp]));
indexRight = vcl_min(static_cast<long int>(outputRegion.GetIndex().GetElement(comp) + outputRegion.GetSize().GetElement(comp) - 1), static_cast<long int>(inputIndex[comp] + m_SpatialRadius[comp])); indexRight = vcl_min(static_cast<long int>(outputRegion.GetIndex().GetElement(comp) + outputRegion.GetSize().GetElement(comp) - 1), static_cast<long int>(inputIndex[comp] + m_SpatialRadius[comp]));
regionSize[comp] = vcl_max(0l, indexRight - static_cast<long int>(regionIndex[comp] + 1)); regionSize[comp] = vcl_max(0l, indexRight - static_cast<long int>(regionIndex[comp]) + 1);
} }
neighborhoodRegion.SetIndex(regionIndex); // TODO Handle region borders neighborhoodRegion.SetIndex(regionIndex); // TODO Handle region borders
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment