Mercurial > hg > orthanc-stone
changeset 923:6b81c5453382
RadiographyScene: avoid exporting to width+1 image size due to numerical noise in GetSceneExtent()
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 22 Jul 2019 14:28:56 +0200 |
parents | d6c029d15aaa |
children | 9ba1e1198e73 |
files | Framework/Radiography/RadiographyScene.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyScene.cpp Fri Jul 19 15:15:13 2019 +0200 +++ b/Framework/Radiography/RadiographyScene.cpp Mon Jul 22 14:28:56 2019 +0200 @@ -606,8 +606,8 @@ Extent2D extent = GetSceneExtent(); - int w = static_cast<int>(std::ceil(extent.GetWidth() / pixelSpacingX)); - int h = static_cast<int>(std::ceil(extent.GetHeight() / pixelSpacingY)); + int w = static_cast<int>(std::round(extent.GetWidth() / pixelSpacingX)); + int h = static_cast<int>(std::round(extent.GetHeight() / pixelSpacingY)); if (w < 0 || h < 0) {