microcorrelate.stitching ======================== .. py:module:: microcorrelate.stitching .. autoapi-nested-parse:: This module contains functions for stitching together microscopy images Classes ------- .. autoapisummary:: microcorrelate.stitching.StitchConfig Functions --------- .. autoapisummary:: microcorrelate.stitching.read_metadata microcorrelate.stitching.stitch_images Module Contents --------------- .. py:class:: StitchConfig Custom TIFF tag IDs used to store acquisition metadata in stitched images. .. attribute:: tag_metadata_common TIFF tag ID for the JSON-encoded metadata common to all acquired tiles. Default is 65000. :type: int .. attribute:: tag_metadata_all TIFF tag ID for the JSON-encoded per-tile acquisition metadata. Default is 65001. :type: int .. py:function:: read_metadata(stitch_path: pathlib.Path) -> tuple[dict, dict] Read acquisition metadata from a stitched TIFF image. :param stitch_path: Path to the stitched TIFF file produced by :func:`stitch_images`. :type stitch_path: Path :returns: * **metadata_common** (*dict*) -- Metadata keys and values shared across all acquired tiles. * **metadata_all** (*dict*) -- Per-tile metadata, keyed by original filename. .. py:function:: stitch_images(tileset_path: pathlib.Path | str, dest_path: pathlib.Path | str, compression: bool = True, group_path: str | None = None, pyramid_levels: int = 1, verbose: bool = False) -> None Stitch together tiled images from a tileset acquired via the Thermo Fisher Maps software and save the stitched image as a single TIFF file or Zarr file. The tileset is expected to be in the directory structure produced by Maps, and have been already stitched by the acquisition software (that is, there's no overlap or gaps between tiles). :param tileset_path: Path to the tileset directory. :type tileset_path: Path | str :param dest_path: Path to save the stitched image. It can be either a .tif file or a .zarr store. :type dest_path: Path | str :param compression: Save Tiff image with compression (zlib). This parameter is only used when output is TIff. Zarr files are always compressed. (default = True). :type compression: bool :param group_path: Path to the group in the Zarr array where images should be saved. If None, save in root. This parameter is only used if output is Zarr. (default = None). :type group_path: str | None :param pyramid_levels: Number or pyramid levels used when saving to Zarr multiscales. If 1, no downscaled levels are calculated. (default = 1). :type pyramid_levels: int :param verbose: Enable verbose output (default = False). :type verbose: bool :rtype: None