Commit 5c096f44 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

Merge branch '2217-mosaic_out_size' into 'develop'

FIX: mosaic output image size fit best inputs extents

Closes #2217

See merge request !849
parents ade51c47 3f24e684
Pipeline #8526 passed with stage
in 9 minutes and 10 seconds
......@@ -240,8 +240,8 @@ void StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType>::C
}
// Set final size
m_OutputSize[0] = vcl_floor((extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0])) + 1;
m_OutputSize[1] = vcl_floor((extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1])) + 1;
m_OutputSize[0] = std::round((extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0]));
m_OutputSize[1] = std::round((extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1]));
// Set final origin (Coordinate of the upper left pixel center)
m_OutputOrigin[0] = extentInf[0];
......@@ -447,4 +447,4 @@ void StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType>::P
} // end namespace otb
#endif
\ No newline at end of file
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment