R/count_touching_cells_fast.R
count_touching_cells_fast.RdFast implementation of count touching cells. This function requires a membrane label image such as created by adaptive cell segmentation in inForm 2.4.3 or newer. It will not work with membrane masks created by older segmentation algorithms.
count_touching_cells_fast(
csd,
field_name,
export_path,
phenos,
color1,
color2,
discard_dups = FALSE
)Cell seg data, may include multiple fields
Sample Name or Annotation ID to process
Path to a directory containing composite, component, and segmentation image files from inForm
Named list of phenotype definitions. Must have length 2.
Colors for cells matching phenos.
If TRUE, cells matching both phenotypes will be
discarded from the output. If FALSE, overlapping phenotypes is an error.
Returns a list containing two items:
An EBImage::Image of touching cells.
A tibble containing
data about the touching cells.