UsingNet / nvjpeg-python

nvjpeg for python
MIT License
93 stars 24 forks source link

nvJPEG2000 support? #16

Open blazespinnaker opened 1 year ago

blazespinnaker commented 1 year ago

Does this library support nvJPEG2000 https://developer.nvidia.com/nvjpeg?

In particular, I'm trying to decode

JPEG Lossless, Nonhierarchical, First- Order Prediction (Processes 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression / 1.2.840.10008.1.2.4.70

This is from a dicom file - https://www.dicomlibrary.com/dicom/transfer-syntax/

I was able to get 1.2.840.10008.1.2.4.90 / JPEG 2000 Image Compression (Lossless Only) to work, but that was through dali.

Wanted to be able to decode both standards, ideally via nvjpeg if possible.

It requires some hacking of the dicom file to extract the raw jpg, but it does work, at least for jpeg 2000. Hopefully I can do something similar for JPEG Lossless, but not yet sure how.