Calculates the average minimum distance of all cells to their nearest cells in the input image.

average_minimum_distance(spe_object)

Arguments

spe_object

SpatialExperiment object in the form of the output of format_image_to_spe.

Value

A single number is returned

Examples

average_minimum_distance(SPIAT::simulated_image)
#> [1] 17.01336