cornerstone3D icon indicating copy to clipboard operation
cornerstone3D copied to clipboard

[Bug] dicomParser.readFixedString: attempt to read past end of buffer and CORNERSTONE_IMAGE_VOLUME_LOADING_COMPLETED RangeError: Invalid typed array length: 65536

Open atrusch opened this issue 1 year ago • 4 comments

Describe the Bug

Sometimes after calling decodeImageFrame in createImage.ts the pixelData are cleared (array buffer empty). My current workaround is to copy the buffer before to call decodeImageFrame :

  const decodePromise = decodeImageFrame(
    imageFrame,
    transferSyntax,
    pixelData.slice(0),
    canvas,
    options,
    decodeConfig
  );

Steps to Reproduce

Download https://keycloak.e-media.fr/keys/dicom/index.ts Replace tutorial/index.ts by the downloaded file Run tutorial (yarn example tutorial) A stack is displayed, when all images are loaded we try to create a volume for a MPR Errors are triggered

  • 'dicomParser.readFixedString: attempt to read past end of buffer'
  • error in event listener of type: CORNERSTONE_IMAGE_VOLUME_LOADING_COMPLETED RangeError: Invalid typed array length: 65536

The current behavior

Errors triggered

The expected behavior

No errors

OS

Windows 11

Node version

20.9.0

Browser

Chrome Version 121.0.6167.161 (64 bits)

atrusch avatar Feb 09 '24 14:02 atrusch

+1 for this issue Снимок экрана 2024-03-22 в 15 25 32

this Снимок экрана 2024-03-22 в 15 25 56

dima9911 avatar Mar 22 '24 10:03 dima9911

+1 for this issue

JonathanGilyadov avatar May 15 '24 15:05 JonathanGilyadov

+1 for this issue It happend when i render 3 viewports for MPR and the first viewport throw this error.

AmrGablla avatar Jul 30 '24 13:07 AmrGablla

+1

woaihengniu avatar Oct 04 '24 08:10 woaihengniu

can you try latest ?
Can you check the latest OHIF viewer, which now includes Cornerstone 3D 2.0?

Here are the migration guides:

Try OHIF locally: https://viewer-dev.ohif.org/localbasic
Try Cornerstone3D 2.0 locally: https://www.cornerstonejs.org/live-examples/local.html

https://docs.ohif.org/migration-guide/3p8-to-3p9/

sedghi avatar Nov 14 '24 21:11 sedghi

can you try latest ?Can you check the latest OHIF viewer, which now includes Cornerstone 3D 2.0?

Here are the migration guides:

Try OHIF locally: https://viewer-dev.ohif.org/localbasicTry Cornerstone3D 2.0 locally: https://www.cornerstonejs.org/live-examples/local.html

https://docs.ohif.org/migration-guide/3p8-to-3p9/

The latest version is ready to render successfully

woaihengniu avatar Nov 15 '24 01:11 woaihengniu