From fab3c4fcdc5e5ed688e70a27acb60004fc96fc36 Mon Sep 17 00:00:00 2001 From: Patrick Wespi Date: Fri, 14 Apr 2023 04:19:47 +0200 Subject: [PATCH] fix(suv display): fix scaling of non-SUV PT images (#526) --- src/shared/scaling/scaleArray.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shared/scaling/scaleArray.js b/src/shared/scaling/scaleArray.js index 545ef787..c32387b4 100644 --- a/src/shared/scaling/scaleArray.js +++ b/src/shared/scaling/scaleArray.js @@ -2,11 +2,7 @@ export default function scaleArray(array, scalingParameters) { const arrayLength = array.length; const { rescaleSlope, rescaleIntercept, suvbw } = scalingParameters; - if (scalingParameters.modality === 'PT') { - if (typeof suvbw !== 'number') { - return; - } - + if (scalingParameters.modality === 'PT' && typeof suvbw === 'number') { for (let i = 0; i < arrayLength; i++) { array[i] = suvbw * (array[i] * rescaleSlope + rescaleIntercept); }