Skip to content
Snippets Groups Projects
Commit 2d03357f authored by Julien Malik's avatar Julien Malik
Browse files

ENH: floor(x+0.5) is a round

parent e98b0e28
Branches
Tags
No related merge requests found
......@@ -516,8 +516,8 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel
// define region
itk::ImageRegion<2> imageRegion;
InputIndexType index;
index[0] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[0] + 0.5));
index[1] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[1] + 0.5));
index[0] = itk::Math::Round(latticePosition[0]);
index[1] = itk::Math::Round(latticePosition[1]);
InputIndexValueType xMin = index[0] - kernelSize[0] / 2;
InputIndexValueType xMax = xMin + kernelSize[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment