---
name: dicom-pipeline
description: "End-to-end DICOM workflow: parsing, anonymization/de-identification, conversion, structured reporting, PACS query/retrieve, and DICOMweb. Build automated medical imaging pipelines."
tags: [dicom, medical-imaging, anonymization, pacs, dicomweb, pipeline, zorai]
---
## Overview

End-to-end DICOM workflow: parsing, anonymization, conversion, structured reporting, PACS query/retrieve, and DICOMweb integration.

## Installation

```bash
uv pip install pydicom
```

## Read and Inspect

```python
import pydicom, numpy as np

ds = pydicom.dcmread("study.dcm")
print(f"Patient: {ds.PatientName}")
print(f"Modality: {ds.Modality}")
print(f"Study: {ds.StudyDescription}")
print(f"Size: {ds.Rows}x{ds.Columns}")

pixels = ds.pixel_array  # NumPy array
```

## Anonymization

```python
ds = pydicom.dcmread("input.dcm")
phi_tags = [(0x0010, 0x0010), (0x0010, 0x0030), (0x0008, 0x0080)]
for tag in phi_tags:
    if tag in ds:
        ds[tag].value = ""
ds.save_as("anon.dcm")
```

## DICOMweb

```python
import requests
resp = requests.get(
    "http://pacs:8080/dicom-web/studies",
    params={"PatientName": "Doe*"},
    headers={"Accept": "application/dicom+json"},
)
```

## Workflow

1. Parse DICOM with `pydicom.dcmread()`
2. Extract metadata: modality, anatomy, patient info
3. Anonymize per DICOM PS3.15 (clear PHI tags)
4. Convert to NIfTI via dcm2niix or manual pixel_array
5. Query PACS with DICOMweb QIDO-RS
6. Generate DICOM SR (Structured Reports) for AI findings


---
Source attribution: mkurman
Original project: https://github.com/mkurman/zorai/blob/d06ee7597049567dab92db22d41b2764cf89094a/skills/scientific-skills/dicom-pipeline/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 zorai contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: mkurman
Original project: https://github.com/mkurman/zorai/blob/d06ee7597049567dab92db22d41b2764cf89094a/skills/scientific-skills/dicom-pipeline/SKILL.md
Attribution basis: Source repository record

Fields of work: Healthcare & Life Sciences
Roles: Clinical Research, Health Informatics, Medical Writer
Specialties: API, Backend, Cross Platform
Tools: Pydicom, Requests
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 20fb55c8101e47eaf83d1104f6f15f4304dbf41329c477dfd8fea6e0b2d7aac6
