DICOM.jl icon indicating copy to clipboard operation
DICOM.jl copied to clipboard

Not writing JPEG encoded pixel data correctly

Open davidssmith opened this issue 5 years ago • 4 comments

When I try to use DCMTK to dump a lossless-JPEG encoded DICOM that I wrote with this package, I get this error:

E: Found explicit length Pixel Data in top level dataset with transfer syntax JPEG Lossless, Non-hierarchical, 1st Order
Prediction: Only undefined length permitted
E: dcmdump: Pixel data in top level dataset in compressed Transfer Syntax uses explicit length: reading file: out.dcm

I think it is referring to the fact that this particular Transfer Syntax (1.2.840.10008.1.2.4.70) is encoded with sequence start/end elements instead of an explicit length value. So the pixel data is written with an explicit length (derived from the Julia arrays?), but also encoded with sequence start/end values, making DCMTK complain.

Is there an easy way to fix this?

davidssmith avatar Apr 11 '19 03:04 davidssmith