-
Notifications
You must be signed in to change notification settings - Fork 515
Description
Thumbnail generation fails for images with TransferSyntax="JPEG 2000 (Lossless only)". Probably this is because DCMTK implements support for decoding such images in a commercial module (see https://dicom.offis.de/dcmjp2k.php.en). This made sense 10-20 years ago, when this transfer syntax was new, but not anymore, especially since its main competitor, pydicom, and other DICOM toolkits, such as GDCM support it for free.
I've generated an implementation using Claude Opus 4.5 - it required only a few prompts, now it works well!
Implementation in DCMTK: https://github.com/lassoan/DCMTK/tree/add-dcmjp2k
What remains to be done is to build OpenJPEG (https://github.com/uclouvain/openjpeg.git) as part of Slicer superbuild and pass it to CTK and Slicer builds. See testing code here (hardcoded paths should be replaced by path from the superbuild):
lassoan@943ae91
lassoan/Slicer@bde26d0
There is also a free free implementation, but the chatbot-generated code looks cleaner (and it is integrated into DCMTK).