pydicom

Read, write, anonymize, and convert DICOM medical imaging files with pydicom and NumPy/Pillow support.

74|5|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/dralkh/seerai --skill pydicom-dralkh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/dralkh/seerai/tree/main/skills/pydicom
Command: npx skills add https://github.com/dralkh/seerai --skill pydicom-dralkh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It removes the manual friction of reading, editing, anonymizing, and converting DICOM medical imaging files, so you can work with clinical image data more efficiently and safely.

Core Features & Use Cases

  • Read and inspect DICOM datasets: Open files, browse patient, study, series, and image metadata, and inspect file meta information.
  • Process pixel data: Extract image arrays, handle grayscale and color images, apply windowing, and work with multi-frame studies.
  • Anonymize and modify records: Replace or remove protected health information before sharing data for research or collaboration.
  • Convert and compress images: Save DICOM images to common formats or manage transfer syntaxes and compression workflows.
  • Use case: A radiology researcher can batch anonymize a CT series, inspect key tags, and export selected frames as PNGs for analysis.

Quick Start

Use the pydicom skill to read the attached DICOM file, extract its metadata, and summarize the most important imaging fields.

Frequently Asked Questions about pydicom

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

FAQPage Schema
How do I extract pixel data from a DICOM file?

You can extract DICOM pixel data using pydicom alongside numpy and pillow to handle image arrays, apply windowing, and process grayscale or color images for CT, MRI, and X-ray files.

What is the best way to anonymize DICOM metadata for research?

Anonymizing DICOM metadata involves replacing or removing protected health information from patient, study, and series tags before sharing files for research or collaboration.

Does pydicom support multi-frame CT and MRI series?

Yes, pydicom supports processing multi-frame CT and MRI series, allowing you to extract image arrays, apply windowing, and browse metadata across complex medical imaging studies.

Can I convert DICOM images to PNG for analysis?

You can convert DICOM images to common formats like PNG by extracting pixel data with pydicom, processing arrays with numpy, and saving the selected frames using pillow.

Why does reading compressed DICOM files require additional handlers?

Reading compressed DICOM files requires optional compression handlers like pylibjpeg or python-gdcm because specific transfer syntaxes need dedicated decoders to unpack and process the embedded pixel data reliably.