cellcoloc.run_roi_cellpose_colocalization

cellcoloc.run_roi_cellpose_colocalization(loaded_images, roi_labels_2d, cell_model_config, marker_model_config, colocalization_config, runtime_config, optional_region_model_config=None, optional_region_result=None)[source]

Run the configured ROI-wise segmentation workflow and build result tables.

The pipeline always segments ROI crops in XY and may additionally apply one global analysis z-crop resolved from the participating channel configs. That z-crop affects all channels, all ROIs, and all downstream quantification consistently, while the exported and visualized arrays keep full-stack shape. When the input loaded_images bundle already represents a prepared z-projection, segmentation and quantification operate on that projected 2D analysis view instead of the original full stack.

The two primary analysis channels can each use either Cellpose or one of the supported threshold-based backends. An optional third channel can be segmented through the same mechanism and contributes occupancy metrics, and optionally per-cell positivity, to the result tables.

Return type:

ColocalizationRunResult