pydicom

Read, write, and modify DICOM files and metadata in Python.

Updated May 17, 2026
One-click install
npx skills add https://github.com/galeep/plugin-place --skill pydicom-galeep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/galeep/plugin-place/tree/main/plugins/sci-medical-imaging/skills/pydicom
Command: npx skills add https://github.com/galeep/plugin-place --skill pydicom-galeep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, matplotlib, pillow, pylibjpeg, python-gdcm, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the process of working with DICOM files, providing a comprehensive Python library for reading, writing, and manipulating medical imaging data.

Core Features & Use Cases

  • DICOM File Operations: Read, write, and modify DICOM files.
  • Metadata Extraction: Extract and modify DICOM metadata and tags.
  • Image Processing: Extract pixel data, convert image formats, and handle compression.
  • Use Case: If you are working in radiology, PACS systems, or medical imaging applications and need to process DICOM files, this Skill offers essential tools to streamline your workflow.

Quick Start

Load a DICOM file and access its metadata using pydicom:

import pydicom
ds = pydicom.dcmread('path/to/file.dcm')
print(f"Patient Name: {ds.PatientName}")

Frequently Asked Questions about pydicom

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and extract metadata from a DICOM file in Python?

To read DICOM files and extract metadata in Python, load the file using the dcmread function and access tags like PatientName directly from the returned dataset object.

Can I use Python to modify and write DICOM tags for radiology workflows?

Yes, you can modify and write DICOM tags for radiology workflows by reading the dataset, updating the specific metadata attributes, and saving the modified file back to disk.

What Python libraries do I need for medical image processing and DICOM pixel data manipulation?

For DICOM pixel data manipulation and medical image processing, you need numpy for array operations, matplotlib for visualization, and pillow for general image format conversions.

How do I handle compressed DICOM image files and convert pixel data for visualization?

To handle compressed DICOM files and visualize pixel data, utilize pylibjpeg and python-gdcm for decompression, then process the extracted arrays with numpy and matplotlib.

What is the best way to integrate PACS systems with Python for medical imaging data handling?

The best way to integrate PACS systems for medical imaging data handling is using Python to read, manipulate, and write DICOM files, streamlining the extraction and processing of radiology images.