Skip to content

Commit

Permalink
fix: incorrect check for validating pixel data array type (#1830)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkumarsingh-qure authored Feb 18, 2025
1 parent 81d2c1c commit f9d5b79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/dicomImageLoader/src/decodeImageFrameWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ function postProcessDecodedPixels(imageFrame, options, start, decodeConfig) {
options.preScale.scalingParameters;
const minAfterScale = rescaleSlope * minBeforeScale + rescaleIntercept;
const maxAfterScale = rescaleSlope * maxBeforeScale + rescaleIntercept;
invalidType = !validatePixelDataType(minAfterScale, maxAfterScale, type);
invalidType = !validatePixelDataType(
minAfterScale,
maxAfterScale,
typedArrayConstructors[type]
);
}

if (type && !invalidType) {
Expand Down

0 comments on commit f9d5b79

Please sign in to comment.