Skip to content

Add JPEG 2000 decoding support #425

Merged
Enet4 merged 1 commit intomasterfrom
imp/ts/openjpeg
Oct 30, 2023
Merged

Add JPEG 2000 decoding support #425
Enet4 merged 1 commit intomasterfrom
imp/ts/openjpeg

Conversation

@Enet4
Copy link
Copy Markdown
Owner

@Enet4 Enet4 commented Oct 29, 2023

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

  • [ts-registry] add features openjp2 and openjpeg-sys
    • they map to the backend impl of JPEG 2000 via jpeg2k
  • [ts-registry] add JPEG 2000 pixel data adapter with decoding support
  • [pixeldata] expose more transfer-syntax-registry features, so that specific image decoding implementations can be selected
  • [pixeldata] adjust jpeg decoding test cases according to support
  • [toimage] relocate dicom-pixeldata/native to default features, so that native implementations can be disabled at will

@Enet4 Enet4 added A-lib Area: library A-tool Area: tooling C-pixeldata Crate: dicom-pixeldata C-transfer-syntax Crate: dicom-transfer-syntax-registry C-toimage Crate: dicom-toimage labels Oct 29, 2023
- [ts-registry] add features openjp2 and openjpeg-sys
   - map to the backend impl of JPEG 2000 via jpeg2k
- [ts-registry] add JPEG 2000 pixel data adapter with decoding support
- [pixeldata] expose more transfer-syntax-registry features
- [pixeldata] adjust jpeg decoding test cases according to support
- [toimage] relocate dicom-pixeldata/native to default features
  so that native implementations can be disabled at will
@Enet4 Enet4 merged commit 42441fd into master Oct 30, 2023
@Enet4 Enet4 deleted the imp/ts/openjpeg branch October 30, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library A-tool Area: tooling C-pixeldata Crate: dicom-pixeldata C-toimage Crate: dicom-toimage C-transfer-syntax Crate: dicom-transfer-syntax-registry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant