Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Add support for encoding J2K #78

Merged
merged 16 commits into from
Jan 13, 2024

Conversation

scaramallion
Copy link
Member

@scaramallion scaramallion commented Jan 10, 2024

  • Adds support for encoding J2K lossy and lossless 🎉.

    • Lossy compression specified via layer compression ratios or signal-to-noise ratios
  • Supports encoding ndarrays with:

    • dtypes bool, u1, u2, i1, u2, ( + i4 and u4 up to 24-bit)
    • Bits Stored 1-24
    • Samples per Pixel: 1, 3 or 4 (bonus)
    • Photometric Interpretations: RGB, YBR_XXX, MONOCHROME1 + 2, PALETTE COLOR (lossless only)
    • Also supports CMYK
    • Supports MCT for RGB -> YBR_RCT, YBR_ICT
  • Closes Add encoding for JPEG 2000 Lossless transfer syntax #28 and Add encoding for JPEG 2000 transfer syntax #29

  • 2KLS/oj36.j2k is u1, (256, 256, 3) 196608 bytes uncompressed, 524 bytes as-is, 19844 with lossless and 7853 with lossy using [6, 4, 2, 1]. Is the as-is lossy compressed?

  • 2KLS/oj36.j2k is i2, (512, 512) 524288 bytes uncompressed, 105362 bytes as-is, 105389 with lossless and 93589 with lossy using [6, 4, 2, 1].

@scaramallion scaramallion changed the title [WIP] Add support for encoding J2K [MRG] Add support for encoding J2K Jan 13, 2024
@scaramallion scaramallion merged commit 419fcbc into pydicom:main Jan 13, 2024
20 checks passed
@scaramallion scaramallion deleted the dev-j2k-encode branch January 13, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add encoding for JPEG 2000 Lossless transfer syntax
1 participant