cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.06k stars 598 forks source link

LoadImage fails randomly with a specific dicom #447

Open thibnes opened 4 years ago

thibnes commented 4 years ago

Hello there,

I'm facing an issue with a specific dicom. When calling cornerstone.loadImage it throws the following error: offset is out of bounds. However, note that it works sometimes when going step by step using the chrome devTools.

Here is the jsFiddle that reproduces the error: https://jsfiddle.net/thibnes/f8mpvbr5/1/

I'm using

Here is attached also the dicom just in case. dicom31.4_anon.dcm.zip

Could anyone help me with that issue, please?

dannyrb commented 4 years ago

A dicom-parser dump of the uploaded file: https://rawgit.com/cornerstonejs/dicomParser/master/examples/dumpWithDataDictionary/index.html

My best guess is that this is an image decoding issue cause by the old codecs in cornerstone-wado-image-loader:

TransferSyntaxUID(x00020010) : "1.2.840.10008.1.2.4.90" [ JPEG 2000 Image Compression (Lossless Only) ]

That's just a quick guess. Unfortunately, I don't have much availability to dig in to this issue.

thibnes commented 4 years ago

Thank you @dannyrb. You might be right, would you know a workaround in that case?

amrita-syn commented 2 years ago

@thibnes did you ever find a solution to this?

thibnes commented 2 years ago

No, I did not find a solution @amrita-syn .