pydicom

Anonymize PHI in DICOM files and extract essential metadata.

48|6|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pydicom-qinyan-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/qinyan-ai/qinyan-academic-skills/tree/main/skills/07-%E4%B8%B4%E5%BA%8A%E5%8C%BB%E5%AD%A6%E4%B8%8E%E7%B2%BE%E5%87%86%E5%8C%BB%E7%96%97/pydicom
Command: npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pydicom-qinyan-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps users safely handle medical imaging data by anonymizing PHI in DICOM files, extracting relevant metadata, and supporting pixel data workflows.

Core Features & Use Cases

  • PHI anonymization: Remove or replace patient and sensitive information in DICOM headers.
  • Metadata extraction: Retrieve and display essential study/series/image metadata for auditing and data discovery.
  • Pixel data handling: Convert or export pixel data to common image formats to facilitate visualization and sharing.

Quick Start

Run the anonymize_dicom.py script on an input DICOM file to produce an anonymized output file.

Frequently Asked Questions about pydicom

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

FAQPage Schema
How do I anonymize protected health information in DICOM files?

To extract essential study and series metadata from DICOM files, this Skill retrieves and displays header information for auditing and data discovery without exposing protected health information.

Can I export DICOM pixel data to common image formats for visualization?

Yes, you can export DICOM pixel data to common image formats for visualization. The Skill uses Pillow and numpy to handle pixel data workflows, facilitating the conversion and sharing of medical images.

Do I need numpy and Pillow to process medical imaging data with pydicom?

Yes, you need numpy and Pillow to process medical imaging data with pydicom. These dependencies are required alongside pydicom to perform header redaction, metadata extraction, and pixel data export workflows.

What is the best way to prepare clinical imaging datasets for PACS archives?

The best way to prepare clinical imaging datasets for PACS archives is to anonymize the DICOM headers and extract essential metadata, ensuring privacy and data discovery compliance before archiving the files.

Does this approach work for de-identifying research datasets containing DICOM images?

Yes, this approach works for de-identifying research datasets containing DICOM images by removing protected health information from headers and exporting pixel data, making it suitable for clinical research and data sharing.