changeset 3817:37e20bbf25f5

merge
author Alain Mazy <alain@mazy.be>
date Wed, 08 Apr 2020 14:50:06 +0200
parents 09f091b6b569 (diff) c81ac6ff232b (current diff)
children 4570c57668a8
files Resources/Patches/openssl-1.1.1d-conf.h.in
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Wed Apr 08 14:01:37 2020 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Wed Apr 08 14:50:06 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))