Reads Standard BioTools .mcd files and writes OME-TIFFs for QuPath, Napari and Fiji.
- Convert — each region (ROI) becomes its own multi-channel OME-TIFF.
- Stitch — all regions onto one canvas, placed by recorded stage coordinates.
- Post-process — channel subsets, pyramidal copies, re-compression.
🚀 Quick start
Requires Python 3.9+. Runs on Windows, macOS and Linux.
pip install mcd_stitcher
Convert each region to its own OME-TIFF:
mcd_process "path/to/file.mcd" --convert
Stitch all regions into a single image:
mcd_process "path/to/file.mcd" --stitch --pyramid
💡 Tip —
--pyramidadds tiled, multi-resolution copies that let large stitched files pan and zoom smoothly, especially on low-RAM systems.
Everything lands in MCD_Processed/<file name>/, next to your input.
🔬 What it does
Left: Ten regions from one .mcd file, shown to common scale. Right: the same ten placed on a single 7.0 × 4.6 mm canvas at 0.5 µm/px.
--convert writes each region to its own OME-TIFF and --stitch places them all on one canvas using the stage positions recorded in the file — no registration, no seam blending. Regions acquired at different step sizes are resampled onto the finest common grid.
Native resolution is preserved end to end
A 7.0 × 4.6 mm canvas at 0.5 µm/px still resolves single cells — stitching costs no detail. --pyramid adds the tiled copy that makes a canvas this size navigable.
⚡ Commands
mcd_process <input_path> [<output_path>] [OPTIONS] # a .mcd file, or a folder of them
mcd_process "file.mcd" -m # inspect: regions, panoramas, channel indices
mcd_process "file.mcd" --convert # one OME-TIFF per region
mcd_process "file.mcd" --stitch --pyramid # one zoomable stitched canvas
mcd_process "folder/" --convert --stitch # a whole batch, both outputs, single pass
🔧 All options, output layout and the Python API
| Option | What it does |
|---|---|
--convert |
One OME-TIFF per region. |
--stitch |
All regions onto one canvas. |
-p, --panorama |
Panorama overviews; large ones get region outlines. |
-m, --metadata |
Print regions, panoramas, indexed channels. Writes nothing. |
--roi_map IDX |
Region → panorama pixel map. Needs convert/stitch. |
-f, --filter "LIST" |
Keep only these channels, e.g. "0-5,7". Indices from -m. |
--pyramid |
Also write a tiled, multi-resolution copy. |
-r, --roi "LIST" |
Only these regions, e.g. "0-5,7". Indices from -m. |
-d, --output_type |
uint16 (default) / float32. |
-c, --compression |
zstd (default) / LZW / None. |
--max-memory SIZE |
Cap memory for image buffers, e.g. 8G. Detected automatically from the container/scheduler limit or free RAM; set this to override, or on a shared machine where you want a reproducible plan. Also read from $MCD_STITCHER_MAX_MEM. |
-f and --pyramid are post-processing steps and need --convert or --stitch.
MCD_Processed/<file name>/
├── <region>.ome.tiff --convert
├── <file name>_stitched.ome.tiff --stitch
├── <file name>_slide_0_pano_0.png -p (+ _overlay.png)
└── <file name>_slide_0_pano_0_roi_map.txt --roi_map
mcd_convert, mcd_stitch and tiff_subset each do one step; tiff_subset works on existing OME-TIFFs.
from mcd_stitcher import mcd_process
mcd_process(input_path="file.mcd", convert=True, stitch=True)
📄 Citation
Chaurasia, P. (2026). MCD Stitcher: An open-source tool for whole-slide stitching and conversion of Imaging Mass Cytometry data. bioRxiv. https://doi.org/10.64898/2026.06.26.732348
BibTeX
@article{chaurasia2026mcdstitcher,
title = {MCD Stitcher: An open-source tool for whole-slide stitching and conversion of Imaging Mass Cytometry data},
author = {Chaurasia, Pawan},
journal = {bioRxiv},
year = {2026},
doi = {10.64898/2026.06.26.732348}
}
📜 License, issues & changelog
MIT — see LICENSE. Report problems on the issue tracker; release notes are in the changelog.
Metadata
Release files for mcd-stitcher 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcd_stitcher-2.4.0.tar.gz | 29.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcd_stitcher-2.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.1 kB
Release files / mcd_stitcher-2.4.0.tar.gz
| Download URL | mcd_stitcher-2.4.0.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ee275b233db9a92d007c9168b377aeb3eba1b75ea8e8d42fe1c02a1444e9d65
|
|
BLAKE2b-256 checksum How to use checksums |
e6ae1a4cf50ebddc2b9530e290c809438afdff60a2dc4757822362dce7273cea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / mcd_stitcher-2.4.0-py3-none-any.whl
| Download URL | mcd_stitcher-2.4.0-py3-none-any.whl |
|---|---|
| Size | 33.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2291c295c8e76c2d5a9b7aa003a4bace4281ddd50dcf6299fcce783be51837a8
|
|
BLAKE2b-256 checksum How to use checksums |
8ef19f368e03d8b787b52644f65f8af84b47e9c3d6daef1ce9add03ac4452161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log