pydicom

Read, write, and manipulate DICOM files with pydicom.

Updated May 8, 2026
One-click install
npx skills add https://github.com/Zeyuyang-0420/bio-ai-research-skills --skill pydicom-zeyuyang-0420
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydicom
Source: https://github.com/Zeyuyang-0420/bio-ai-research-skills/tree/main/categories/clinical-biomedical-ai/pydicom
Command: npx skills add https://github.com/Zeyuyang-0420/bio-ai-research-skills --skill pydicom-zeyuyang-0420

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive support for working with DICOM files, enabling the reading, writing, and manipulation of medical imaging data with ease.

Core Features & Use Cases

  • DICOM File Handling: Read, write, and modify DICOM files.
  • Pixel Data Manipulation: Extract and manipulate image data.
  • Metadata Management: Work with DICOM metadata and tags.
  • Format Conversion: Convert DICOM files to other image formats.
  • Use Case: For a radiologist analyzing medical images, this Skill can handle tasks such as reading patient data, displaying images, anonymizing data, and saving files in alternative formats.

Quick Start

Use the pydicom skill to read the metadata from the DICOM file 'patient_scan.dcm'.

Frequently Asked Questions about pydicom

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

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

To extract DICOM metadata, you can read the .dcm file to access patient data, tags, and pixel data. This allows you to handle medical image analysis, manipulate metadata, and work within PACS systems and radiology workflows.

Can I convert DICOM files to standard image formats like PNG or JPEG?

Yes, you can convert DICOM files to other image formats. By extracting the pixel data from the medical imaging files, you can save the output in alternative formats for easier viewing and sharing outside of radiology workflows.

How do I anonymize patient data in a DICOM file?

You can anonymize DICOM patient data by reading the file, modifying the specific metadata tags containing sensitive information, and writing the updated file. This ensures compliance when handling medical imaging data.

Does pydicom support various DICOM compression formats?

Yes, reading and writing DICOM files supports various compression formats. It utilizes pylibjpeg and python-gdcm dependencies to access and decompress pixel data, ensuring seamless medical image analysis and manipulation.

What is the best way to display DICOM medical images using Python?

The best way to display DICOM medical images is to extract the pixel data and render it using matplotlib. This allows you to visualize the medical imaging data directly within your Python environment for analysis.

How do I manipulate pixel data for medical image processing?

You can manipulate pixel data by reading the DICOM file and using numpy to alter the array values. This enables advanced medical image processing, allowing you to adjust image data before saving or converting the files.