cellcoloc.load_analysis_images

cellcoloc.load_analysis_images(source_path, channel_config, voxel_scale_zyx, crop_for_testing=None, image_loading_mode='memory')[source]

Load the configured channels from a microscopy dataset.

The function relies on omio so that future projects are not limited to CZI files. The loaded channels are returned as ZYX volumes. Two loading modes are supported:

  • "memory": eager in-memory loading with zarr_store=None

  • "memap": disk-backed OMIO/Zarr cache with zarr_store="disk" and reuse_disk_cache=True

Parameters:
  • source_path – Input microscopy dataset that OMIO can open.

  • channel_config – Zero-based channel mapping defining which raw channels correspond to the cell, marker, and optional third channel.

  • voxel_scale_zyx – Optional explicit voxel size in micrometers. This may be passed either in full (Z, Y, X) order or, for 2D convenience, as (Y, X). A two-value input is internally expanded to (1.0, Y, X). When this argument is None, the loader first tries to derive physical pixel sizes from OMIO metadata entries such as PhysicalSizeZ and falls back to (1.0, 1.0, 1.0) with a warning when no usable metadata are available.

  • crop_for_testing – Optional test crop applied after channel extraction in (Z, Y, X) order.

  • image_loading_mode – Raw-image loading strategy. "memory" materializes the full image eagerly, whereas "memap" keeps OMIO’s disk-backed Zarr cache.

Return type:

LoadedImageChannels

Returns:

LoadedImageChannels – Structured bundle containing the extracted analysis channels, resolved voxel size, OMIO metadata, and standardized output paths.