Enet4 / dicom-rs

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

Add JPEG 2000 decoding support #425

Closed Enet4 closed 8 months ago

Enet4 commented 8 months ago

This adds direct support for decoding pixel data in JPEG 2000, via jpeg2k. jpeg2k lets us pick between linking the reference implementation of OpenJPEG (Cargo feature openjpeg-sys) or a Rust port (Cargo feature openjp2).

A few more changes were made to the Cargo feature set so that downstream crates can be more specific about which via dicom-pixeldata. For instance, doing cargo install --path toimage would include the Rust port of openjp2, but with the command below, you can build dicom-toimage statically linked with the OpenJPEG reference software.

cargo install --path toimage --no-default-features \
    --features=dicom-pixeldata/jpeg,dicom-pixeldata/rle,dicom-pixeldata/openjpeg-sys

Summary