python-gdcm
Grassroots DICOM runtime libraries
What it is and what it does
python-gdcm is an unofficial Python binding for GDCM, a mature C++ library for working with DICOM (Digital Imaging and Communications in Medicine) files—the standard format for medical imaging data. It lets you read, write, and manipulate DICOM datasets programmatically, handling multiple compression and encoding schemes (JPEG, JPEG 2000, JPEG-LS, RLE, deflated) and providing access to the DICOM standard definitions as XML.
The package is distributed as pre-compiled wheels for Python 3.9–3.13 across Linux, macOS, and Windows, eliminating the need to build from source in most cases. It has no runtime dependencies beyond the Python standard library, making it straightforward to integrate into medical imaging pipelines, research workflows, or healthcare IT systems that need to parse or generate DICOM files.
Use it for:
- Read and extract pixel data and metadata from DICOM medical images in automated workflows.
- Convert DICOM files between different transfer syntaxes or compression formats for interoperability.
- Build medical imaging applications that need to validate or manipulate DICOM datasets programmatically.
- Integrate DICOM file handling into research or clinical data processing pipelines.
- Access DICOM standard definitions (Parts 3, 6, 7) as XML for validation or reference.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python wrapper for GDCM (Grassroots DICOM), a C++ library that reads, writes, and manipulates DICOM medical image files with support for multiple transfer syntaxes including JPEG, JPEG 2000, JPEG-LS, RLE, and deflated formats.
Yes. python-gdcm is actively maintained, has no security vulnerabilities, supports current Python versions (3.9–3.13), and offers pre-built wheels that minimize install friction. The Apache-2.0 license is permissive. Install it if you need to work with DICOM medical images in Python; the C++ bindings are mature and the library is production-stable.
Install
python-gdcm on PyPI
pip
pip install python-gdcmuv
uv add python-gdcmpoetry
poetry add python-gdcmInstalling python-gdcm
Before you install
Medium install friction due to compiled C++ bindings; pre-built wheels available for Python 3.9–3.13 on Linux (x86_64, aarch64), macOS (Intel and Apple Silicon), and Windows. Last release 95 days ago; repository actively maintained with recent commits.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install python-gdcm
import gdcm
reader = gdcm.ImageReader()
reader.SetFileName("dicom_image_file.dcm")
ret = reader.Read()
Requires Python 3.7 or later; building from source requires CMake, SWIG, a C++ compiler, and patchelf on Linux.
Verify before relying
- Performance characteristics and memory footprint for large DICOM datasets or batch processing workflows.
- Completeness of DICOM standard support beyond the stated transfer syntaxes and Parts 3, 6, 7.
- Stability and API compatibility across minor versions; changelog detail for recent updates.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 95 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 560,999/month — #6,000 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_gdcm-3.2.6-cp310-cp310-macosx_10_9_x86_64.whl; python_gdcm-3.2.6-cp310-cp310-macosx_11_0_arm64.whl; python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; python_gdcm-3.2.6-cp310-cp310-win_amd64.whl; python_gdcm-3.2.6-cp311-cp311-macosx_10_9_x86_64.whl; python_gdcm-3.2.6-cp311-cp311-macosx_11_0_arm64.whl; python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; python_gdcm-3.2.6-cp311-cp311-win_amd64.whl; python_gdcm-3.2.6-cp312-cp312-macosx_10_13_x86_64.whl; python_gdcm-3.2.6-cp312-cp312-macosx_11_0_arm64.whl; python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; python_gdcm-3.2.6-cp312-cp312-win_amd64.whl; python_gdcm-3.2.6-cp313-cp313-macosx_10_13_x86_64.whl; python_gdcm-3.2.6-cp313-cp313-macosx_11_0_arm64.whl; python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; python_gdcm-3.2.6-cp313-cp313-win_amd64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
pylibjpegDecodes and encodes JPEG, JPEG-LS, JPEG 2000,…
permissive · top 15,000 on PyPI
dicom2niftiConverts DICOM medical imaging files to NIfTI…
permissive · top 15,000 on PyPI
highdicomHighdicom provides a high-level Python API for…
permissive · top 15,000 on PyPI
pylibjpeg-libjpegDecodes JPEG and JPEG-LS images to NumPy…
copyleft · top 15,000 on PyPI
dicomweb-clientA Python client library for interacting with…
permissive · top 15,000 on PyPI
pylibjpeg-openjpegDecodes and encodes JPEG 2000 images to and…
permissive · top 15,000 on PyPI
itk-ioitk-io provides Python bindings for reading and…
permissive · top 15,000 on PyPI
ihmReads and writes mmCIF and BinaryCIF files…
permissive · top 15,000 on PyPI