microsoft / microsoft/markitdown
Add DICOM (.dcm) Support via Plugin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
Add DICOM (.dcm) Support via Plugin
Summary
I would like to propose adding support for DICOM (.dcm) files through the plugin system.
DICOM is a widely used format not only in medical imaging but also in industrial radiography, non-destructive testing (NDT), CT inspection, aerospace inspection, and manufacturing quality assurance workflows.
MarkItDown's goal is to convert diverse file formats into LLM-friendly Markdown. DICOM files contain a large amount of structured metadata that maps naturally to Markdown and could be valuable for indexing, search, retrieval, and RAG workflows.
Why This Fits MarkItDown
MarkItDown already handles formats that contain both metadata and binary content (e.g. images, audio, and documents) by prioritizing textual representations that are useful for LLMs.
DICOM follows the same pattern:
- Structured metadata (study information, acquisition parameters, equipment information, descriptions, timestamps, etc.)
- Binary pixel data
A DICOM converter could focus on extracting and organizing metadata into Markdown, similar to how other converters transform format-specific information into text.
Potential Output
Example output could include:
- Study information
- Series information
- Acquisition parameters
- Equipment metadata
- Image properties (dimensions, bit depth, modality, photometric interpretation, etc.)
- Relevant textual tags such as descriptions and comments
This would make DICOM datasets searchable and usable in RAG pipelines without requiring users to manually parse DICOM headers.
Scope
For an initial implementation, I suggest limiting support to:
- Metadata extraction
- Image/property metadata
- Structured Markdown generation
Out of scope:
- Pixel-level image analysis
- Medical interpretation
- Defect detection
- Vision-based captioning of scans
The pixel array itself would not be converted into text or embedded in Markdown. Instead, the converter would extract basic image characteristics such as dimensions, modality, photometric interpretation, bit depth, and related metadata.
Implementation Direction
I propose contributing this as a new plugin package (e.g. markitdown-dicom) within the packages/ directory of the monorepo, similar to existing plugin packages. This would keep the pydicom dependency isolated from the core library while allowing users who work with DICOM files to install the functionality when needed.
The implementation would likely be built on top of pydicom, which is the standard Python library for DICOM handling.
Testing
To ensure compatibility across different DICOM variants, I would plan to test against publicly available DICOM datasets and sample files covering different modalities and metadata structures.
Contribution
I would be interested in contributing this if the maintainers feel it aligns with the project's goals.
I'd also be happy to implement it either as an in-tree plugin package within the repository or as a community-maintained plugin, depending on the maintainers' preference.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing plugin packages under packages/ and the repository's plugin system to determine whether this belongs in-tree or as a community plugin. Review pydicom's support for the proposed metadata and image-property fields, then test against public DICOM samples; done means an agreed scope, package location, and compatibility expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100