Python-GDCM
Unofficial GDCM packages for Python 3 on Linux, Windows and MacOS (both Intel and Apple Silicon).
Grassroots DiCoM is a C++ library for DICOM medical files that can be wrapped for Python using SWIG. It supports datasets encoded using native, JPEG, JPEG 2000, JPEG-LS, RLE and deflated transfer syntaxes. It also comes with Parts 3, 6 & 7 of the DICOM Standard as XML files.
Installation
Using pip
pip install -U python-gdcm
From source
Install dependencies
- Compiler for you platform (GCC, Clang, MSVC)
- CMake
- SWIG
- patchelf will also be needed on Linux
- Git to get the source code
Setup environment
If the cmake or swig executables aren't in $PATH, either add them or create CMAKE_EXE and SWIG_EXE envars:
export CMAKE_EXE="path/to/cmake/executable"
export SWIG_EXE="path/to/swig/executable"
Clone source
git clone --recurse-submodules https://github.com/tfmoraes/python-gdcm
Build and install
# Note the trailing slash!
pip install python-gdcm/
Test installed package
python -c "import gdcm; print(gdcm.GDCM_VERSION)"
If you get a ModuleNotFoundError: No module named '_gdcm.gdcmswig' error then make sure your current working directory doesn't contain a _gdcm folder.
Usage
Reading a DICOM image file
import gdcm
reader = gdcm.ImageReader()
reader.SetFileName("dicom_image_file.dcm")
ret = reader.Read()
if not ret:
print("It was not possible to read your DICOM file")
Other Examples
See here https://github.com/malaterre/GDCM/tree/master/Examples/Python
Release files for python-gdcm 3.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_gdcm-3.2.6.tar.gz | 3.4 MB | Details |
Built distributions (wheels)
Total release size: 413.5 MB
Release files / python_gdcm-3.2.6.tar.gz
| Download URL | python_gdcm-3.2.6.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f16eaea7a8c736279492f829d7f95002237a7fb2ea9c3ae85175498e1cd3dad
|
|
BLAKE2b-256 checksum How to use checksums |
c19983550191a6bd7278c13c623270d69b0ee99b8b998e81e10f6924dce130c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp314-cp314-win_amd64.whl
| Download URL | python_gdcm-3.2.6-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9ea4e0d723137ae1af1d5283301b609c00087844906ef75efcfacaafe98f90e7
|
|
BLAKE2b-256 checksum How to use checksums |
e547a5d1495584b7e849de777185a45cdc38454fb2a9b656cbc465dfe8a32838
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
aea109691afe754ae317909b9776a7547859bdb4340e512e5733eec16bf8b0ba
|
|
BLAKE2b-256 checksum How to use checksums |
a48660798cdb1d5aa7e9ac886ab273b10eff2c1f187b64b5c948f427451614a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | python_gdcm-3.2.6-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f44cf5ea4acdaacb465dede71842096c0ede26718f4fd8ceae8efb64a94c2d75
|
|
BLAKE2b-256 checksum How to use checksums |
105884c9dc52bdc9f4abd96f6cf2548299afafc52507d5fa01f6cd885d778055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | python_gdcm-3.2.6-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d514d840028c30786e729ba0946470612eee3854e1faf2ae767f6ee83c19aa6e
|
|
BLAKE2b-256 checksum How to use checksums |
11cdc1d3aed4c28d476116f80057c77b2fabd9217e48e2b88bdafd24973b3b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp314-cp314-macosx_10_15_x86_64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
c0525c26c5ab59d4e93119d097ea44cb045af339bbd4ef4ee4a5edee260bf424
|
|
BLAKE2b-256 checksum How to use checksums |
6900b1ddc555a0b9e7e03620393dc425c3844403b0acc5993526688e81094aa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp313-cp313-win_amd64.whl
| Download URL | python_gdcm-3.2.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b2025a8a06a4363f25e4a8ebec8741d8ddf0376dc78f87b7b88b83f625a5f22f
|
|
BLAKE2b-256 checksum How to use checksums |
879b6c13656b9ff9f460ea707b447739ed404f3e4a12ac1dfc14f1011a75ad54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
69c987d3f1b3a2a9936288f312f1ea2192e39fa6c0be28159b06a1906b8d56ed
|
|
BLAKE2b-256 checksum How to use checksums |
30ba52fa278ff973ae2932ffdde98e9bdeaa248abda39c1c74e39caa969d543e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | python_gdcm-3.2.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
aaf96a75beb20403e7d1b66a6cbc307327fcbf6b0bd848a6290e2b7968e49598
|
|
BLAKE2b-256 checksum How to use checksums |
b3b720047a8e8d5fb4ef6b22ec705ae567538b2f01ae0d6f6f62b5000c627092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | python_gdcm-3.2.6-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ec2912f4cf10e2a415141351d16c96a288a227450d4bc92fa89aef1c633c998e
|
|
BLAKE2b-256 checksum How to use checksums |
b7f0c3aa78ccdf50cc7d2351e6cf86aa68133608e4674b1df29efaaecaf8ee08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
43517d1a7615319e5140c73b412ee903a612d90e91f9ead379b0ede15dc69a31
|
|
BLAKE2b-256 checksum How to use checksums |
d037b332cb2d9aa20d8c12b175b167caa813fa5ba894a2d09a95e135e794fbdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp312-cp312-win_amd64.whl
| Download URL | python_gdcm-3.2.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3ad86fffde082e068a9ebef940be21079c5d80dae30787eaaccf822ecaac964d
|
|
BLAKE2b-256 checksum How to use checksums |
7cde4ee4d1022fcf6519471d84aa662beadcc2e3b656f28a566a8688a727f4d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
512d0d903e12c5ad389939a257817bf182ce288431b3d474d62cb0c0833b8b56
|
|
BLAKE2b-256 checksum How to use checksums |
c75675f9518a0a8401295a55a11220700e4e6a36d01d65a12be71aa306ecf959
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | python_gdcm-3.2.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7623ef789b1ba5bff0d3dfa5486e1afa27b9a33d9a81d15b4bb05c01a2570db0
|
|
BLAKE2b-256 checksum How to use checksums |
11925b0de49b2d18ec7c5a055aa9535c976cee965294847e2edb06a704ed23b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | python_gdcm-3.2.6-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ec91dd1a7bab0c235d3dcdfe0c7a4703a684a1e16cd8b092e609c4269565c76a
|
|
BLAKE2b-256 checksum How to use checksums |
71a194e89d94d2d679c09db17425bb0b690bcf18adb387ac063c7a35f54806c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 11.4 MB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
cd32d810ff1500fde0554ef06a2f46c6bcfcbf05fdb673c62dfd40eaf611fef4
|
|
BLAKE2b-256 checksum How to use checksums |
07a8b97fb0dd5e44232f2f2ca1800a0ded0c05ae9c00bddf968c1c9e1bd689d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp311-cp311-win_amd64.whl
| Download URL | python_gdcm-3.2.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c752d94d92239c6bda313a514edd8bd5a17167c751d4ab1bdad82c6b559c5213
|
|
BLAKE2b-256 checksum How to use checksums |
952387bf04e52112e6eb3ef6e95417cb508bea77332c3312197d3a9a59574ac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
716e8a20de03e6a90035ee4575b19bb4b204e219a428509b686c1c28ef6de2d9
|
|
BLAKE2b-256 checksum How to use checksums |
2c33b925a15ac7597ff24f1601830a0cd8dd8f488348bdf208cf613fe2bc2fe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | python_gdcm-3.2.6-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7d6033cc01b62e96b928eb8e35b520f2f7a640919f3a569b043c1e64010de0c7
|
|
BLAKE2b-256 checksum How to use checksums |
d139d512c0aec6379eea36f17e8ae4f0d2877bfaae32efe0a47d610c20f04036
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | python_gdcm-3.2.6-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a68bb0f582294cf21297b45856e0a20c7742fdedfa5ba4d313d226b6b5e6c36a
|
|
BLAKE2b-256 checksum How to use checksums |
68588b5cc3c650555ed6ac4f8bcb540f31fecf077832a521f7df142196bef320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
b22521413ee0b61acdf7f8ea7fe3d51ba7173d4754eb1f62d29b782059877ac6
|
|
BLAKE2b-256 checksum How to use checksums |
700d4dea3029176dc0d1cc2a7229668c92a0ee391e3736c028498b55af45d5c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp310-cp310-win_amd64.whl
| Download URL | python_gdcm-3.2.6-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 34.2 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0f11b5938d96a6866ead9547fdeffcbf254301dbbf35173923ada72d2e348907
|
|
BLAKE2b-256 checksum How to use checksums |
b09dfa7100fc25a51f6c2022270ec18b830866a37d15773accc0112107681bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c335886556712b6d1965f1d22f253962ce8ee020511917ee8908f07ae7291252
|
|
BLAKE2b-256 checksum How to use checksums |
1578ec6737f529cf324e25d663d19a813e4413441d89520c939b530cd3741c2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | python_gdcm-3.2.6-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
2d5733a7efd21911b844a0d437547717af05f082b69235619efb3cc7691274ee
|
|
BLAKE2b-256 checksum How to use checksums |
9d985ed2a5c7dd453a71e486701fd10e977d900e6a7562c966745b1971028a9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | python_gdcm-3.2.6-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8f42c4edcfeeb3c9627d6960754cbc20defa19303d490274d446444146998a22
|
|
BLAKE2b-256 checksum How to use checksums |
0e3c793c6c25c91cfe0d05e4c11b27726163e989a531cede338608390e1507ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / python_gdcm-3.2.6-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | python_gdcm-3.2.6-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
36589fdbea8585769a86a248cd7463e71963ce46f281d95441fe8be9062f3009
|
|
BLAKE2b-256 checksum How to use checksums |
b7e4c5103cff93c7ffe3797cd0e0e8ebabe3731a51a6a7e46cef9393bf4f83bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|