Helper function for count_within_batch and count_within_many. This does the actual work of calling count_within multiple times and accumulating the result.

count_within_many_impl(csd, name, combos, radius, phenotype_rules)

Arguments

csd

Cell seg data for a single field.

name

Name associated with `csd`, for example the basename of the image file.

combos

List of pairs of (from phenotype name, to phenotype name) and tissue category.

radius

Vector of radii.

phenotype_rules

Named list of phenotype rules.