skillfed

python-gdcm

Grassroots DICOM runtime libraries

python-gdcm v3.2.6 561.0K downloads/30d#6,000 on PyPI22
Permissive license Apache-2.0 Active released

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-gdcm

uv

uv add python-gdcm

poetry

poetry add python-gdcm

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering

Tags

DICOM file reader pythonmedical image processing DICOMGDCM python wrapperDICOM transfer syntax supportmedical imaging library
medical-imagingdicomc-bindings

More Scientific/Engineering packages