# What library is being used to import dicom?

**URL:** <https://discourse.slicer.org/t/what-library-is-being-used-to-import-dicom/3262>\
**Category:** Development\
**Tags:** dicom\
**Created:** [June 21, 2018, 9:48pm UTC](https://discourse.slicer.org/t/what-library-is-being-used-to-import-dicom/3262 "2018-06-21T21:48:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayarre](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kayarre/32/3606_2.png) [@kayarre](https://discourse.slicer.org/u/kayarre)\
**Post date:** [June 21, 2018, 9:48pm UTC](https://discourse.slicer.org/t/what-library-is-being-used-to-import-dicom/3262/1 "2018-06-21T21:48:42Z")

</div>

What library is being used on the backend to import dicom images?

The other libraries out there (gdcm, pydicom) don’t consistently work with jpg2000 formats.

What does 3D Slicer use?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 21, 2018, 10:29pm UTC](https://discourse.slicer.org/t/what-library-is-being-used-to-import-dicom/3262/2 "2018-06-21T22:29:05Z")

</div>

Because DICOM is complex and not all types are supported by various libraries we actually include three main implementations. ITK adds the jpeg2000 library for GDCM. Through ITK we can use either GDCM or DCMTK (there’s an option to select that I realized was not [on the wiki so I added it here](https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#Advanced_options)). Some DICOM objects are read with pydicom.

There’s also a VTK DICOM reader that we don’t use bundled with VTK and another [implementation by David Gobbi](https://github.com/dgobbi/vtk-dicom) that we don’t currently bundle but easily could if it solves any problems not addressed by the others.
