Skip to content

Commit

Permalink
fix(suv display): fix scaling of non-SUV PT images (cornerstonejs#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwespi authored and dougyau committed Sep 29, 2023
1 parent fb7069a commit 28e7ab6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/shared/scaling/scaleArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 28e7ab6

Please sign in to comment.