Skip to content

Commit

Permalink
fix(color volume): take into account number of components for the vol…
Browse files Browse the repository at this point in the history
…ume length
  • Loading branch information
sedghi committed Jul 13, 2023
1 parent 138c202 commit b2d203c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ function cornerstoneStreamingImageVolumeLoader(
'8 Bit signed images are not yet supported by this plugin.'
);
}
sizeInBytes = length;
sizeInBytes = length * numComponents;
handleCache(sizeInBytes);
scalarData = useSharedArrayBuffer
? createUint8SharedArray(length)
: new Uint8Array(length);
? createUint8SharedArray(length * numComponents)
: new Uint8Array(length * numComponents);
break;

case 16:
Expand Down

0 comments on commit b2d203c

Please sign in to comment.