questions
questions > RE: Error: OpenJPEG j2k_to_image failed to decode
Jun 7, 2017 12:06 PM | Chris Rorden
RE: Error: OpenJPEG j2k_to_image failed to decode
Jack
Thanks for bringing this to our attention. Clearly the JPEG2000 libraries are not always statically linked when the software is built with our new build system. I have sent you an executable that resolves this. Since this problem is specific to MacOS, you can also use the version of dcm2niix that is built-into MRIcro (Import menu)- this software is included with the NITRC MRIcroGL download.
While dcm2niix can (will) be able to decode lossless JPEG2000 DICOM images, I strongly suggest that you do not use this format for storage. This encoding is not well supported, and the benefits are minimal compared to general file (zip/gz) or disk based compression. Using any rare format is problematic, and in this specific case one of the two popular open-source JPEG-2000 libraries does not handle the 16-bit images seen in medical imaging (https://en.wikipedia.org/wiki/JPEG_2000). This format also blocks you from using the fantastic and free dcmtk tools (http://dicom.offis.de/dcmjp2k.php.en "This module is not freely available and must be licensed separately"). My personal opinion is that JPEG2000 has little future: it marginal benefit over the older, simpler, wildly popular classic JPEG. On the other hand, the modern HEIF format outperforms JPEG2000 and has seen widespread adoption in software and hardware allowing for little developer/computational cost for a better result (https://en.wikipedia.org/wiki/High_Effic...). While I am not sure if DICOM will adopt HEIF, I think the popularity of HEIF will hinder the development and support of JPEG2000.
Thanks for bringing this to our attention. Clearly the JPEG2000 libraries are not always statically linked when the software is built with our new build system. I have sent you an executable that resolves this. Since this problem is specific to MacOS, you can also use the version of dcm2niix that is built-into MRIcro (Import menu)- this software is included with the NITRC MRIcroGL download.
While dcm2niix can (will) be able to decode lossless JPEG2000 DICOM images, I strongly suggest that you do not use this format for storage. This encoding is not well supported, and the benefits are minimal compared to general file (zip/gz) or disk based compression. Using any rare format is problematic, and in this specific case one of the two popular open-source JPEG-2000 libraries does not handle the 16-bit images seen in medical imaging (https://en.wikipedia.org/wiki/JPEG_2000). This format also blocks you from using the fantastic and free dcmtk tools (http://dicom.offis.de/dcmjp2k.php.en "This module is not freely available and must be licensed separately"). My personal opinion is that JPEG2000 has little future: it marginal benefit over the older, simpler, wildly popular classic JPEG. On the other hand, the modern HEIF format outperforms JPEG2000 and has seen widespread adoption in software and hardware allowing for little developer/computational cost for a better result (https://en.wikipedia.org/wiki/High_Effic...). While I am not sure if DICOM will adopt HEIF, I think the popularity of HEIF will hinder the development and support of JPEG2000.
Threaded View
Title | Author | Date |
---|---|---|
jack gspm | Jun 4, 2017 | |
nora mila | Dec 30, 2023 | |
Chris Rorden | Dec 31, 2023 | |
Chris Rorden | Jun 9, 2017 | |
Chris Rorden | Jun 7, 2017 | |