The problem — A single lattice light-sheet or expansion-microscopy experiment can generate hundreds of terabytes of overlapping tiles. Classical stitching tools load tiles sequentially and compute pairwise overlaps in memory — a strategy that runs for days or fails entirely on datasets of this scale. The fundamental bottleneck is that neither I/O nor registration was designed for the chunked, cloud-friendly formats that large acquisitions now produce.
What it is / how it works — ZarrStitcher is the distributed stitching module within the PetaKit5D suite (Ruan et al., Nature Methods 2024). The pipeline has three stages: (1) tiles are converted to Zarr format with optional preprocessing (flat-field correction, cropping); (2) normalised cross-correlation aligns adjacent tile pairs, correcting for stage motion errors; (3) tiles are fused in parallel, writing directly into a multiscale OME-Zarr output chunked for lazy access by downstream tools. For datasets too large even for slab-based alignment, a maximum-intensity-projection slab technique further reduces memory: tiles are downsampled 2× in xy and ~100× in z before correlation, keeping overlap estimation tractable. On a 108-TiB whole-mouse-brain dataset, ZarrStitcher completed stitching in 1.4 h across 20 nodes versus roughly 20 h for BigStitcher-Spark — a 14× speed advantage.
Where it fits — ZarrStitcher sits at the ingest-to-preprocess handoff of a light-sheet pipeline: after raw camera output has been read by PetaKit5D's fast I/O layer, ZarrStitcher assembles the registered volume that downstream segmenters and trackers consume. The output is OME-Zarr, the format MoBIE, BigDataViewer, and napari can open directly.
Where it breaks — ZarrStitcher is tightly coupled to the PetaKit5D MATLAB/Python ecosystem; standalone use outside that framework is non-trivial. Normalised cross-correlation registration assumes sufficient structural texture in overlap regions; sparsely labelled or extremely dim specimens (e.g., cleared tissue with low labelling density) can yield degenerate overlap estimates. As with all stitching, a registration error here propagates into every downstream coordinate measurement.