pydicom

Read, write, and anonymize DICOM medical imaging datasets.

1|1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/youyinnn/skills-collection --skill pydicom-youyinnn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/youyinnn/skills-collection/tree/main/plugins/data-preparation-and-processing/skills/pydicom
Command: npx skills add https://github.com/youyinnn/skills-collection --skill pydicom-youyinnn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies the complex task of working with DICOM (Digital Imaging and Communications in Medicine) files, the standard for medical imaging data, enabling efficient processing and analysis of CT, MRI, X-ray, and other medical scans.

Core Features & Use Cases

  • Read & Write DICOM: Easily load, inspect, and save DICOM files and datasets.
  • Pixel Data Handling: Extract, manipulate, and visualize image data from medical scans.
  • Metadata Management: Access, modify, and anonymize DICOM tags and attributes.
  • Use Case: A researcher needs to extract pixel data from a series of CT scans, anonymize patient information, and convert the images to PNG format for a presentation. This Skill provides the tools to perform all these steps programmatically.

Quick Start

Use the pydicom skill to read the DICOM file located at '/path/to/your/scan.dcm' and print its patient name.

Frequently Asked Questions about pydicom

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

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

To extract pixel data from DICOM files, this Skill processes CT, MRI, and X-ray datasets by parsing the medical imaging data and preparing it for visualization using libraries like numpy and matplotlib.

What is the best way to anonymize patient metadata in medical imaging datasets?

Anonymizing patient metadata in medical imaging datasets involves accessing and modifying specific DICOM tags. This Skill provides programmatic tools to alter attributes within CT and MRI scans to protect patient information.

Can I convert DICOM images to PNG format for presentations?

Yes, you can convert DICOM images to PNG format. This Skill extracts the medical imaging pixel data and utilizes the pillow library to save the scans as standard image files for presentations.

Does pydicom support reading and writing DICOM files for CT and MRI scans?

Yes, pydicom supports reading and writing DICOM files. This Skill leverages the library to load, inspect, and save medical imaging datasets, handling standard formats like CT, MRI, and X-ray scans.

How do I access and modify DICOM tags and attributes programmatically?

To access and modify DICOM tags programmatically, this Skill parses the medical imaging datasets to retrieve, alter, and manage metadata attributes associated with CT, MRI, and X-ray files.

What dependencies do I need to handle compressed DICOM pixel data?

To handle compressed DICOM pixel data, you need dependencies like pylibjpeg, pylibjpeg-libjpeg, pylibjpeg-openjpeg, and python-gdcm, which this Skill uses to decode and process medical imaging datasets.