Enet4 / dicom-rs

Rust implementation of the DICOM standard
https://dicom-rs.github.io
Apache License 2.0
404 stars 76 forks source link

Deflated Explicit VR Little Endian Case - "Could not read data set token" #350

Open PRadeckiDH opened 1 year ago

PRadeckiDH commented 1 year ago

My apologies if I am misunderstanding something, but whenever I try to use open_file() to create a dicom object (testing out Deflated Explicit VR Little Endian images - ex. the pydicom test file "image_dfl.dcm") I get an error "Could not read data set token". I see a somewhat related issue here but I'm still confused. Why this is occurring only with Deflated Explicit VR Little Endian transfer syntax in my case?

Enet4 commented 1 year ago

Hello @PRadeckiDH. The "Could not read data set token" message represents a DICOM parsing error, might may have multiple causes. In this case, the Deflated Explicit VR Little Endian is not supported yet.

There are a few constructs in place which I hope would make the implementation possible (Codec with the Dataset variant). If anyone would like to give it a try, it would be much appreciated.

PRadeckiDH commented 1 year ago

Hi @Enet4 thanks for the response! My apologies, I saw this implementation and assumed that Deflated Explicit VR Little Endian was already supported.

Enet4 commented 1 year ago

Hi @Enet4 thanks for the response! My apologies, I saw this implementation and assumed that Deflated Explicit VR Little Endian was already supported.

No worries, thank you for bringing this up (there should definitely be an issue to track this support, so here we have it!).

That definition is a stub, so that implementations can recognize it, but it still lacks a data set deflate implementation and the mechanisms at the parser to use it.