Enet4 / dicom-rs

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

Encoding to JPEG transfer syntaxes #286

Open Enet4 opened 1 year ago

Enet4 commented 1 year ago

Decoding JPEG-based transfer syntaxes is already supported, but support for encoding a native DICOM object to JPEG would be good to have.

In a first phase, this amounts to implementing the encode method of the PixelRWAdapter implementation for JPEGAdapter.

Almeida-a commented 1 year ago

I think I can take this issue.

Is there a way to test this new implementation after it is finished?

Enet4 commented 1 year ago

Great!

Is there a way to test this new implementation after it is finished?

By lack of a proper transcoding module (efforts are ongoing!), we can test the adapter in isolation by encoding one of the test files, reading the output as a JPEG file using the decoder and checking whether some meta-properties are correct (width, height...). Pixel data check could be done too, but we would need to allow an error margin to account for loss.