From d52a1cbdf62914b25682b4455ffc461b871ef3e0 Mon Sep 17 00:00:00 2001 From: Bill Wallace Date: Thu, 6 Oct 2022 08:20:12 -0400 Subject: [PATCH] fix(colourImages):Somehow the dereference for the byte length was done twice (#232) --- packages/core/src/RenderingEngine/StackViewport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/RenderingEngine/StackViewport.ts b/packages/core/src/RenderingEngine/StackViewport.ts index 5b9f6af0e..83cb569b3 100644 --- a/packages/core/src/RenderingEngine/StackViewport.ts +++ b/packages/core/src/RenderingEngine/StackViewport.ts @@ -1345,7 +1345,7 @@ class StackViewport extends Viewport implements IStackViewport { const scalars = this._imageData.getPointData().getScalars(); const scalarData = scalars.getData() as Uint8Array | Float32Array; - if (image.rgba || isRgbaSourceRgbDest(pixelData, scalarData.byteLength)) { + if (image.rgba || isRgbaSourceRgbDest(pixelData, scalarData)) { if (!image.rgba) { console.warn('rgba not specified but data looks rgba ish', image); }