qmetrics.net

pydicom

Pythonic read, write, and edit for DICOM medical datasets

pydicom screenshot

pydicom is a pure Python library for creating, reading, modifying, and writing DICOM datasets and file-sets, with optional NumPy pixel support.

Overview

pydicom is a general-purpose Python package for working with DICOM files in a straightforward, Pythonic style. It focuses on dataset input and output rather than implementing every service-object class or networking detail of the DICOM standard.

Because it is pure Python, it runs wherever Python runs with no mandatory native dependencies. For pixel data work, NumPy is recommended so compressed and uncompressed pixel elements can be exposed as ndarrays through a dataset property. Additional Python packages may be required for specific compression formats when decompressing or encoding images.

The API supports reading and writing individual datasets, walking DICOMDIR file-sets, changing metadata fields such as patient identifiers, and saving modified files. Pixel handlers cover common transfer syntaxes including JPEG families, JPEG-LS, JPEG 2000, and RLE, with encoding guides for producers.

Other projects in the ecosystem build on pydicom for networking and anonymization, but this library stays centered on file-level dataset manipulation. Installation is available through pip and conda-forge, with user guides and API reference published online.

Key features

  • Read and write DICOM files
  • Pure Python implementation
  • DICOMDIR and file-set support
  • Pixel data as bytes or ndarray
  • Multiple compression handlers
  • Dataset metadata editing
  • pip and conda installs
  • Published user and API docs

Use cases

  • Medical imaging research scripts
  • DICOM metadata cleanup
  • Batch conversion pipelines
  • Teaching DICOM structure in Python
  • Preparing datasets for downstream tools

Tags

Similar software

MarkItDown

Python utility converting office and media files to Markdown

MarkItDown converts many file types into Markdown for LLM and text analysis pipelines. It aims to preserve headings, lists, tables, and links rather than perfect human layout.

★ 198.7k⟳ 21 days agoMIT

OpenBB

Open-source data integration platform for analysts, quants and AI agents

Open Data Platform (ODP) by OpenBB connects proprietary, licensed and public data sources once, then exposes them to Python, OpenBB Workspace, Excel, MCP servers for AI agents, and REST APIs.

★ 75.8k⟳ 9 days agoApache-2.0

Docling

Document parsing toolkit for generative AI pipelines

Docling ingests PDFs, office files, media, email, and many other formats into a unified document model. It targets downstream RAG and agent workflows with local execution options.

★ 71.1k⟳ yesterdayMIT

pandas

Python data structures for labeled analysis

pandas is a Python package for working with labeled, tabular, and time-series data. It provides Series and DataFrame objects with alignment, grouping, and rich import and export options.

★ 50.7k⟳ yesterdayBSD-3-Clause

RSSHub

Open RSS feed network with community-maintained routes

RSSHub aggregates content from many online sources into RSS feeds and is maintained as an open source project with a large network of deployed instances.

★ 47.4k⟳ yesterdayAGPL-3.0

jq

Portable command-line JSON processor

jq slices, filters, maps, and transforms JSON from the shell. It is a standalone C binary with no runtime dependencies, plus an online playground and optional Docker image.

★ 36.4k⟳ 26 days agoMIT · open core