imi-bigpicture / wsidicomizer

Python library for converting WSI files to DICOM
Apache License 2.0
55 stars 7 forks source link

Switched JPEG2000 encoder to J2K codestream and extract only RGB from OpenSlideImage #12

Closed GeertLitjens closed 2 years ago

GeertLitjens commented 2 years ago

This is a fix that switches the JPEG2000 encoder to J2K and extracts RGB from the RGBA OpenSlide image. I checked whether it was possible to specify the colorspace to the OpenJPEG Encoder, but they use the same colorspace enum for RGB and RGBA/ARGB, the nr of components determines the end result. This should resolve #10 and resolve #11

erikogabrielsson commented 2 years ago

Thanks for the merge request Geert. Unfortunately this breaks the jpeg8 encoder as it expects BGRA-input for performance reasons. I have created another pull request that should fix this, and some other problems I found with the converter for openslide. https://github.com/imi-bigpicture/wsidicomizer/pull/13

erikogabrielsson commented 2 years ago

Closing this as the issues have been fixed.