# JPEG 2000 Part 2 and Multicomponent images

**URL:** <https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994>\
**Category:** Beginner Questions\
**Created:** [March 30, 2021, 9:09pm UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994 "2021-03-30T21:09:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![agirault](https://discourse.itk.org/user_avatar/discourse.itk.org/agirault/32/979_2.png) [@agirault](https://discourse.itk.org/u/agirault)\
**Post date:** [March 30, 2021, 9:09pm UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994/1 "2021-03-30T21:09:17Z")

</div>

I’m attempting to generate test DICOM data in all the supported transfer syntaxes that PACS systems could send to a service consuming DICOM:

[http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect\_8.7.3.html](http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.7.3.html)

Two of them are the Lossless and Lossy versions of the **JPEG 2000 Part 2 Multicomponent Image Compression** :

- 1.2.840.10008.1.2.4.92
- 1.2.840.10008.1.2.4.93

I’m using [gdcmconv](http://gdcm.sourceforge.net/html/gdcmconv.html) to convert datasets from one syntax to the next. Those transfer syntaxes are not listed in GDCM’s conformance summary (not even under the _Unsupported_ section, I don’t know if this page is official or up to date):

[https://www.creatis.insa-lyon.fr/software/public/Gdcm/ConformanceSummary.html](https://www.creatis.insa-lyon.fr/software/public/Gdcm/ConformanceSummary.html)

I can see that the `JPEG2000Codec` [has references to Part 2 transfer syntax](https://github.com/malaterre/GDCM/blob/ba05b91/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx#L1606-L1612), though it’s not going to go far [with this implementation](https://github.com/malaterre/GDCM/blob/master/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx#L1603-L1604)! 😁

Even if GDCM does not support JPEG Part 2 Multicomponent, I’d like to understand that format better. This is what came up with some Googling around:

- [This wiki page](http://gdcm.sourceforge.net/wiki/index.php/GDCM_Summer_of_Code_0X) from GDCM mentions its support as a potential Summer of Code project
- [Those slides](https://www.dclunie.com/papers/compressionJ2Kand3D.pdf) seem to associate Part 2 multicomponent with multi-frame / 3d images
- [.jpx](https://en.wikipedia.org/wiki/JPEG_2000) would be the extension for the Part 2 specifications
- it’s associated with [ISO/IEC 15444-2](https://www.iso.org/standard/33160.html)

> defines a set of lossless (bit-preserving) and lossy compression methods for coding continuous-tone, bi-level, grey-scale, colour digital still images, or multi-component images.

**In conclusion** : does anyone have experience with JPEG 2000 Part 2 encoding, and could clarify its use? What does it mean by multicomponent, and could it be used for single frame as well as multi frames images/dicom objects?

Thank you

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [March 31, 2021, 12:34am UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994/2 "2021-03-31T00:34:41Z")

</div>

I assume that multi-component means RGB(A) or other vector pixels (motion velocity vector? complex amplitude+phase MRIs? something else?).

I have not dealt with such low-level DICOM stuff as transfer syntaxes. I know that GDCM does not support JPEG2000, at least not fully.

---

<div class="post-metadata">

**Author:** ![mihail.isakov](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)\
**Post date:** [March 31, 2021, 3:37pm UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994/3 "2021-03-31T15:37:52Z")

</div>

_Part 2_ are extensions, GDCM claims to support for [decode/code](https://github.com/InsightSoftwareConsortium/ITK/blob/9c14fb27e9c60a7581283b6c7f1707b72b2d2fc5/Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmJPEG2000Codec.cxx#L484), not sure, files with these transfer syntax are rare. CC @mathieu.malaterre  
Also s. related post [comp.protocols.dicom](https://groups.google.com/g/comp.protocols.dicom/c/g-7hkvlEVYA/m/hOwqIHg8BAAJ)

---

<div class="post-metadata">

**Author:** ![mathieu.malaterre](https://discourse.itk.org/user_avatar/discourse.itk.org/mathieu.malaterre/32/205_2.png) [@mathieu.malaterre](https://discourse.itk.org/u/mathieu.malaterre)\
**Post date:** [April 1, 2021, 8:32am UTC](https://discourse.itk.org/t/jpeg-2000-part-2-and-multicomponent-images/3994/4 "2021-04-01T08:32:07Z")

</div>

GDCM support all of JP2/Part1, and a subset of Part2 (basically MCT), thanks to OpenJPEG.

Original thread for reference:

> Yes OpenJPEG (since ~1.5.x) do support MCT. Pay attention that most of Part 2 is not implemented in OpenJPEG so I would generate an MCT dataset using OpenJPEG just to be sure (Kakadu may use some other stuff from Part 2).
