From e98b0e289467188185b23b9afb9faa4c0c176f16 Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Sun, 11 Mar 2012 16:46:15 +0100 Subject: [PATCH] ENH: kernelSize is already integer --- Code/BasicFilters/otbMeanShiftImageFilter2.txx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/BasicFilters/otbMeanShiftImageFilter2.txx b/Code/BasicFilters/otbMeanShiftImageFilter2.txx index 722e9c42b4..a3cca830c5 100644 --- a/Code/BasicFilters/otbMeanShiftImageFilter2.txx +++ b/Code/BasicFilters/otbMeanShiftImageFilter2.txx @@ -519,9 +519,9 @@ void MeanShiftImageFilter2<TInputImage,TOutputMetricImage, TOutputImage, TKernel index[0] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[0] + 0.5)); index[1] = static_cast<InputIndexValueType>(vcl_floor(latticePosition[1] + 0.5)); - InputIndexValueType xMin = index[0] - static_cast<InputIndexValueType>(vcl_floor(kernelSize[0] / 2)); + InputIndexValueType xMin = index[0] - kernelSize[0] / 2; InputIndexValueType xMax = xMin + kernelSize[0]; - InputIndexValueType yMin = index[1] - static_cast<InputIndexValueType>(vcl_floor(kernelSize[1] / 2)); + InputIndexValueType yMin = index[1] - kernelSize[1] / 2; InputIndexValueType yMax = yMin + kernelSize[1]; InputIndexType minIndex; -- GitLab