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.2.tar.gz (21.5 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.2-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcd_stitcher-2.3.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcd_stitcher-2.3.2.tar.gz
Algorithm Hash digest
SHA256 0cf13e438f5f9167f11ff5397258bd493b3d0d0d705594666a8c5e38ad90c1b7
MD5 0a38b48909b1daa83982228109bd1af2
BLAKE2b-256 d6064246ba0a4ab550c5333d2026c9e465dabf493992f3ef5dc14e805d7acfd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcd_stitcher-2.3.2.tar.gz:

Publisher: python-publish.yml on PawanChaurasia/mcd_stitcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: mcd_stitcher-2.3.2-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcd_stitcher-2.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1160ce4fe4c807c9b1f3f6c554521e2b392d9aad47c6221440f33d0bb4a6f13c
MD5 76cfbd72e9c3fcde55f0ff95b2a0ebc1
BLAKE2b-256 4e6ce712e5434b6478198c1908002cc14e73a47d082d29819761305109785a0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcd_stitcher-2.3.2-py3-none-any.whl:

Publisher: python-publish.yml on PawanChaurasia/mcd_stitcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.3.2 This release

2 files

2.3.1

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