lib-pydicom

Read, write, and manipulate DICOM medical imaging files with pydicom.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/biomaps-infra/blender-opencode --skill lib-pydicom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lib-pydicom
Source: https://github.com/biomaps-infra/blender-opencode/tree/main/.opencode/skills/lib-pydicom
Command: npx skills add https://github.com/biomaps-infra/blender-opencode --skill lib-pydicom

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, enabling efficient manipulation and analysis of medical imaging data.

Core Features & Use Cases

  • Read/Write DICOM: Load, modify, and save DICOM files.
  • Pixel Data Handling: Extract, process, and visualize image data.
  • Metadata Management: Access, modify, and anonymize DICOM tags.
  • Conversion: Convert DICOM to standard image formats.
  • Use Case: A researcher needs to extract patient demographics and image metadata from a large dataset of CT scans for a study, then anonymize the data before analysis.

Quick Start

Use the lib-pydicom skill to read the DICOM file 'patient_scan.dcm' and print its patient name and study date.

Frequently Asked Questions about lib-pydicom

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

FAQPage Schema
How do I read and extract pixel data from a DICOM file in Python?

To extract DICOM pixel data in Python, you can use the pydicom library to load the file and process the PixelData attribute. This Skill provides tools to handle pixel data extraction and visualize medical images using numpy and matplotlib.

What is the best way to anonymize patient metadata in DICOM files?

Anonymizing DICOM metadata involves modifying specific tags like patient name and ID. This Skill enables efficient metadata management, allowing you to access, modify, and anonymize DICOM tags to protect patient privacy before data analysis.

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

Yes, you can convert DICOM files to standard image formats. This Skill supports conversion using pydicom alongside Pillow and pylibjpeg, allowing you to transform medical imaging data into widely compatible image files.

Does pydicom work with compressed DICOM pixel data for CT scans?

Pydicom handles compressed DICOM pixel data by utilizing installed decoders like pylibjpeg-libjpeg and pylibjpeg-openjpeg. This Skill integrates these dependencies to ensure you can extract and process compressed CT scan images effectively.

How do I modify and save DICOM metadata for healthcare imaging applications?

Modifying and saving DICOM metadata requires loading the file, updating the necessary attributes, and writing the changes back to the file system. This Skill provides the tools to read, write, and manipulate DICOM tags for healthcare imaging applications.