Python libraries covering DICOM

The following Python libraries have been discussed in thread Discourse category for DICOM discussions:

I wasn’t able to attend the recent Zoom meeting, I’m wondering why pydicom does not appear in this list.

Thanks for reminding - the list was meant to be for neuroimaging DICOM libraries specifically - I think all those libraries use pydicom as a base layer. But yes, pydicom also worth bearing in mind.

It has fairly different aims and so it is mostly tangentially related, but there is also my dcm package. It is mostly aimed at the networking side, but can also be used to sort files into a hierarchical directory structure based on Parient/Study/Series which is often the recommended first step before converting to Nifti or other formats. It also has some ability to dump meta data (including as JSON) but it deliberately does as little meta data wrangling as possible. It is built on pydicom and pynetdicom.

I would also include dicom2nifti, it includes a lot of logic for handling manufacturer-specific meta data. Like the others mentioned, it uses the MIT License.

1 Like

I also thinking this is a relevant project. The broad scope of this project is to help convert PET images (which typically come in ECAT or DICOM) to BIDS/NIfTI. The BIDS PET specification BEP009 expects a lot of meta-data that is not stored in the ECAT and DICOM data, so conversion needs to be able to add in additional information.

The current code focuses on ECAT. However, presumably this will be extended for DICOM. A lot of the logic and interface seem relevant, and could perhaps be integrated in a universal solution:

While designed for a specific purpose, dcm_convert_phillips leverages pydicom and nibabel to convert DICOM images to NIfTI.