Mercurial > hg > orthanc
changeset 3816:09f091b6b569
/rendered route: fix automatic windowing of files without windowing tags and RescaleSlope != 1
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 08 Apr 2020 14:49:54 +0200 |
parents | 38b0f51781aa |
children | 37e20bbf25f5 |
files | OrthancServer/OrthancRestApi/OrthancRestResources.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Wed Apr 01 11:08:43 2020 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Wed Apr 08 14:49:54 2020 +0200 @@ -694,8 +694,8 @@ dicom.ParseFloat(rescaleIntercept, Orthanc::DICOM_TAG_RESCALE_INTERCEPT); } - windowWidth = static_cast<float>(1 << info.GetBitsStored()); - windowCenter = windowWidth / 2.0f; + windowWidth = static_cast<float>(1 << info.GetBitsStored()) * rescaleSlope; + windowCenter = windowWidth / 2.0f + rescaleIntercept; if (dicom.HasTag(Orthanc::DICOM_TAG_WINDOW_CENTER) && dicom.HasTag(Orthanc::DICOM_TAG_WINDOW_WIDTH))