ImagingDataCommons / highdicom

High-level DICOM abstractions for the Python programming language
https://highdicom.readthedocs.io
MIT License
179 stars 37 forks source link

Remove JP2 wrapper from JPEG 2000 encoding #280

Closed CPBridge closed 7 months ago

CPBridge commented 8 months ago

Fix for #275

@erikogabrielsson

CPBridge commented 8 months ago

Tagging @hackermd for some help here.

hackermd commented 7 months ago

I think @erikogabrielsson is right and the content should be encoded as J2K (raw codestream) rather JP2 (file format). The no_jp2 flag appears to achieve that goal.

hackermd commented 7 months ago

@CPBridge I think we need to update the unit test and check for the magic number of the JPEG2000 raw codestream (b"\xFF\x4F\xFF\x51") instead:

https://github.com/ImagingDataCommons/highdicom/blob/v0.22.0/tests/test_frame.py#L174

CPBridge commented 7 months ago

Thanks both, I will put out a minor release relatively soon with this fix