Fix: issue #4759 Enable proper DICOM image rendering when Rescale parameters are set to null (#5003)

This commit is contained in:
Tang Cheng 2025-05-01 00:24:06 +08:00 committed by GitHub
parent b21ee9bc5b
commit 0bb9b17636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,10 @@ class MetadataProvider {
break;
case WADO_IMAGE_LOADER_TAGS.MODALITY_LUT_MODULE:
const { RescaleIntercept, RescaleSlope } = instance;
if (RescaleIntercept === undefined || RescaleSlope === undefined) {
// Early return if RescaleIntercept or RescaleSlope are not
// present (undefined) or explicitly set to null. We use loose
// equality in this case to check for *null* or *undefined*.
if (RescaleIntercept == null || RescaleSlope == null) {
return;
}