diff --git a/Code/DisparityMap/otbStreamingWarpImageFilter.txx b/Code/DisparityMap/otbStreamingWarpImageFilter.txx index 9ce17120e29eaca0c1ae6c9b8ebb2ef2834a8100..8018205eeca0e7cd1a7132ecfb5db8250e987556 100644 --- a/Code/DisparityMap/otbStreamingWarpImageFilter.txx +++ b/Code/DisparityMap/otbStreamingWarpImageFilter.txx @@ -65,7 +65,7 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField> // Compute the margin due to the maximum deformation value and interpolator radius for(unsigned int i = 0; i<InputImageType::ImageDimension;++i) { - radius[i]=interpolatorRadius + static_cast<unsigned int>(vcl_ceil(m_MaximumDeformation[i]/spacing[i])); + radius[i]= interpolatorRadius + static_cast<unsigned int>(vcl_ceil(m_MaximumDeformation[i]/vcl_abs(spacing[i]))); } otbMsgDevMacro(<<"WarpImageFilter: MaximumDeformation: "<<m_MaximumDeformation<<", interpolator radius: "<<interpolatorRadius<<", total radius: "<<radius);