Skip to main content

MCD Stitcher

PyPI Python PyPI Downloads License: MIT DOI

MCD Stitcher turns raw Imaging Mass Cytometry (IMC) .mcd files from Standard BioTools instruments into ordinary image files you can open in QuPath, Napari, or Fiji.

It can:

  • Convert each region (ROI) in an .mcd file into its own OME-TIFF.
  • Stitch all regions back together into a single whole-slide OME-TIFF.
  • Tidy up OME-TIFFs afterwards — keep only the channels you want, shrink them for fast viewing, or re-compress them.

📄 Using MCD Stitcher in your research? Please cite the preprint.

🚀 Quick Start

MCD Stitcher needs Python 3.9 or newer:

pip install mcd_stitcher

Then point mcd_process at a single .mcd file (or a whole folder of them):

# Convert every region to its own OME-TIFF AND stitch them into one whole-slide OME-TIFF
mcd_process "path/to/file.mcd" --convert --stitch

Results land in a MCD_Processed/<file name>/ folder next to your input:

MCD_Processed/<file name>/
├── <region>.ome.tiff                       # one per region          --convert
├── <file name>_stitched.ome.tiff           # whole-slide mosaic      --stitch
├── <file name>_slide_0_pano_0.png          # panorama overview       -p
├── <file name>_slide_0_pano_0_overlay.png  # panorama + ROI outlines -p
└── <file name>_slide_0_pano_0_roi_map.txt  # region → panorama px     --roi_map

Post-processing adds <name>_filtered.ome.tiff (-f) and <name>_pyramid.ome.tiff (--pyramid) alongside the originals.

⚡ Commands

mcd_process is the one command you need — a .mcd file (or a folder of them) in, your OME-TIFFs out. Everything below is mcd_process; the single-purpose tools are optional.

I want to…

Goal Command
See what's in a file first mcd_process "file.mcd" -m
Get per-region OME-TIFFs mcd_process "file.mcd" --convert
Get one whole-slide image mcd_process "file.mcd" --stitch
Both, in one pass mcd_process "file.mcd" --convert --stitch
Overview PNGs with ROI outlines mcd_process "file.mcd" -p
A fast, zoomable whole slide mcd_process "file.mcd" --stitch --pyramid
Only a few regions mcd_process "file.mcd" --convert -r "0-5,7"
A whole folder at once mcd_process "path/to/folder" --convert

Every option

mcd_process <input_path> [<output_path>] [OPTIONS]
Option What it does
--convert Save each region as its own OME-TIFF.
--stitch Stitch regions into one whole-slide OME-TIFF.
-p, --panorama Export all panorama overviews (large ones get ROI outlines). On/off.
-m, --metadata Print a summary — writes nothing.
--roi_map IDX Region → panorama pixel map for panorama IDX (0, 1,3-5). Needs convert/stitch.
-f, --filter "LIST" Post-process: keep only these channels, e.g. "0-5,7". Needs convert/stitch.
--pyramid Post-process: also write a tiled, multi-resolution copy. Needs convert/stitch.
-r, --roi "LIST" Limit to specific regions, e.g. "0-5,7,10". Single file only.
-d, --output_type uint16 (default) / float32.
-c, --compression zstd (default) / LZW / None.

🔧 Single-purpose commands & Python API

Only need one step? mcd_stitch and mcd_convert do exactly that. tiff_subset works on existing OME-TIFFs (channels / pyramids / --list-channels).

mcd_stitch  <input_path> [<output_path>] [-d TYPE] [-c MODE] [-r "LIST"]
mcd_convert <input_path> [<output_path>] [-d TYPE] [-c MODE]
tiff_subset <input_path> [<output_path>] [-l | -f "LIST" | -p]

Single .mcd in for the first two (folders are batched by mcd_process). tiff_subset takes a .tiff or a directory; directory mode scans *.tiff recursively and logs per-file failures to ome_subset_errors.log.

from pathlib import Path
from mcd_stitcher import mcd_stitch, mcd_convert, mcd_process

mcd_process(input_path=Path("file.mcd"), convert=True, stitch=True, panorama="all")

from mcd_stitcher import __version__ returns the installed package version.

📄 Citation

If you use MCD Stitcher in your research, please cite:

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},
  url     = {https://doi.org/10.64898/2026.06.26.732348}
}

📜 License

Distributed under the MIT License. See LICENSE.

💬 Issues & Changelog

If you run into issues, have a feature suggestion, or want to share feedback, please open a ticket on the issue tracker. Release notes for every version are in the changelog.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcd_stitcher-2.3.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcd_stitcher-2.3.1-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file mcd_stitcher-2.3.1.tar.gz.

File metadata

  • Download URL: mcd_stitcher-2.3.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for mcd_stitcher-2.3.1.tar.gz
Algorithm Hash digest
SHA256 e4d180dec2dc64f4b70259c590ddd490e4cd5e8ce3c56e150cfce5d1d1f0b9f7
MD5 589c9c08397f4542719e71bb5e6925e5
BLAKE2b-256 66a11a887518c26c76671364554ff1f602d0b5a04e0b43580c1292630c7b6072

See more details on using hashes here.

File details

Details for the file mcd_stitcher-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: mcd_stitcher-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for mcd_stitcher-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11f2a9c015b7990e60073ebe9b51a7bc2c941ee8322cba1b5c6349013c8c3dad
MD5 91fbd0908c82e5a9e290571207f4dbb3
BLAKE2b-256 34acedeffcc9246cf9796af0a7dcc84c3f446bc81e9547eaca25689bbba32106

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.2

2 files

This release

2.3.1 This release

2 files

2.3.0

2 files

2.2.0

2 files

2.1.1.post1

2 files

2.1.0

2 files

2.0.0

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0.post1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.1.7.1

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page