Skip to main content

fastdicom

fastdicom is a Rust-backed Python extension module for high-throughput DICOM reads in ML and data processing pipelines.

It is built with PyO3 + maturin and uses dicom-rs for metadata parsing and pixel decoding.

Quickstart

python3 -m maturin develop
import fastdicom

ds = fastdicom.dcmread("study.dcm")

rows = ds.Rows
cols = ds[(0x0028, 0x0011)]
spacing = ds.get("PixelSpacing", None)
ts_uid = ds.file_meta.TransferSyntaxUID
pixels = ds.pixel_array

Implemented API surface

  • fastdicom.dcmread(path, *, stop_before_pixels=False) -> Dataset
  • Dataset access patterns:
    • ds.Rows
    • ds[(0x0028, 0x0010)]
    • ds["Rows"]
  • Dict-like operations:
    • get, in, iteration, keys, values, items
  • Properties:
    • pixel_array
    • file_meta
    • file_path
  • Exception classes:
    • DicomError
    • DicomReadError
    • TagNotFoundError
    • PixelDataError
    • UnsupportedTransferSyntaxError

Compatibility notes

  • Tag access returns direct values, not pydicom DataElement wrappers.
  • Date/time VR values remain strings (no automatic datetime conversion).
  • PixelData is not directly exposed through tag lookup; use .pixel_array.

Explicit non-goals (v1)

  • No write/mutation APIs (save_as, Dataset mutation)
  • No DICOMDIR support
  • No file-like object input (path-only read)
  • No DIMSE/DICOMweb networking APIs
  • No deferred reads / lazy file handles
  • No overlay/curve/waveform features

Development checks

cargo check
python3 -m maturin develop
pytest -q

Metadata

Release files for fastdicom 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastdicom 0.1.0
File Size Uploaded Provenance
fastdicom-0.1.0.tar.gz 1.2 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fastdicom 0.1.0
File Interpreter ABI Platform
fastdicom-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details

Total release size: 2.4 MB

Release files / fastdicom-0.1.0.tar.gz

Download URL fastdicom-0.1.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
0788f2370108a949b013a1ddd288dbdb6c1ce424fd23ced028d26cdd00676607
BLAKE2b-256 checksum
How to use checksums
07ad4289bf55240e5e5e4cec7c31e8e69fb7b1a0bc256b97dae7871e5bde4c21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Release files / fastdicom-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fastdicom-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b7b35a2a5da8d5f0a599ff03840878b6bd4839c22794db22c07963a0dbcb8143
BLAKE2b-256 checksum
How to use checksums
44e15580fbb43c93007cc8e5855652055728801fdd846f089837b0df5b15c409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Security for fastdicom 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fastdicom-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page