diameters#
- omnipose.core.diameters(masks, dt=None, dist_threshold=0)[source]#
Calculate the mean cell diameter from a label matrix.
- Parameters
masks (ND array, float) -- label matrix 0,...,N
dt (ND array, float) -- distance field
dist_threshold (float) -- cutoff below which all values in dt are set to 0. Must be >=0.
- Returns
diam -- a single number that corresponds to the average diameter of labeled regions in the image, see dist_to_diam()
- Return type
float