Open favadi opened 3 years ago
Hey! This may be a duplicate of #85. The tl;dr is that for JPEG LS, yes there's a special processing that's needed since Go std lib doesn't support it.
That said, if it's jpeg ls data that should be encapsulated pixel data, so not sure why it's dispatching to readNativeFrames. Are you sure this is a JPEG-LS image?
I have a DICOM file, that embed JPEG 2000 (Lossless only) image, could not be parsed by
suyashkumar/dicom
but can be view as normal by Horos.It can be reproducible with following codes:
The error:
Examining the file with
dcmdump
command:Debugging shows that the error happens when parser try to read the pixel data in https://github.com/suyashkumar/dicom/blob/afbab016d495fe23b0b85099acdc5bfcf591e50b/read.go#L164.
The parser expects that there is 32768 bytes of pixel data, as according to the header.
The error happens when the parser ignores the VL of PixelData (10132) and tries to read 32768 bytes of pixel data.
Questions: