pydicom

Read and manipulate DICOM imaging data with Python.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/Hung-3008/agusta --skill pydicom-hung-3008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/Hung-3008/agusta/tree/main/.agents/skills/pydicom
Command: npx skills add https://github.com/Hung-3008/agusta --skill pydicom-hung-3008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pydicom, numpy, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Pydicom enables Python-based reading, writing, and manipulation of DICOM medical imaging data, including pixel data and metadata, facilitating clinical and research workflows without proprietary software.

Core Features & Use Cases

  • Reading DICOM files with pydicom.dcmread(...)
  • Accessing and modifying metadata such as PatientName, StudyDate, and Modality
  • Pixel data extraction and image processing, anonymization, conversion to standard formats
  • Working with DICOM series and sequences for PACS workflows
  • Handling compressed DICOM data with various transfer syntaxes

Quick Start

Run a Python script to read a DICOM file and print its key metadata.

Frequently Asked Questions about pydicom

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

FAQPage Schema
How do I read and modify DICOM metadata in Python?

Use pydicom.dcmread to load the file, then directly access and edit DICOM metadata attributes like PatientName, StudyDate, and Modality through the dataset object for radiology workflows.

What is the best way to extract pixel data from a DICOM file for image processing?

Extract DICOM pixel data by accessing the PixelData attribute with pydicom, then convert it into a numpy array for image processing, anonymization, or conversion to standard image formats.

Can I use Python to anonymize patient information in medical imaging files?

Anonymize medical imaging files in Python by using pydicom to load the DICOM dataset and overwrite identifying metadata fields like PatientName before saving the modified file.

Does pydicom support handling compressed DICOM data with different transfer syntaxes?

Pydicom supports handling compressed DICOM data by reading and parsing files with various transfer syntaxes, allowing you to access pixel data and metadata from compressed medical images.

How do I convert DICOM files to standard image formats for research workflows?

Convert DICOM files to standard image formats by extracting pixel data with pydicom, processing the array with numpy, and saving it as a standard image using Pillow for research workflows.