Skip to content
Snippets Groups Projects
Commit 3d0e953d authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : correct boundaries computation in MeanShift filter (missing start index)

parent faa9f2b8
No related branches found
No related tags found
No related merge requests found
......@@ -396,7 +396,7 @@ MeanShiftImageFilter<TInputImage,TOutputImage,TLabeledOutput,TBufferConverter>
for (int i = 0; i<regionList->GetRegionCount(static_cast<int>(label)); ++i)
{
boundIndex[0]= regionIndeces[i] % clusterBoudariesOutputPtr->GetRequestedRegion().GetSize()[0];
boundIndex[1]= regionIndeces[i] / clusterBoudariesOutputPtr->GetRequestedRegion().GetSize()[0];
boundIndex[1]= (regionIndeces[i] / clusterBoudariesOutputPtr->GetRequestedRegion().GetSize()[0])+clusterBoudariesOutputPtr->GetRequestedRegion().GetIndex()[1];
if (clusterBoudariesOutputPtr->GetBufferedRegion().IsInside(boundIndex))
{
clusterBoudariesOutputPtr->SetPixel(boundIndex,1);
......
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