getCutoff: Get Cutoff Values for Nuclear Mask Area

View source: R/getCutoff.R

getCutoffR Documentation

Get Cutoff Values for Nuclear Mask Area

Description

Find appropriate range limits for the area of nuclei defined in a binary nuclear mask. The limits will be defined by the "saddle" point on the low end and by the upper quantile on the high end.

Usage

getCutoff(area, lo, hi, breaks = 256, quant = 0.995, plot = FALSE)

Arguments

area

either an Image object, array, or a list of these objects containing a binary mask defining regions of the image to be segmented. Typically, these binary masks would obtained from nucMask. Alternatively, this can be a numeric vector for which "cutoff" values are desired.

lo

a optional numeric value indicating the approximate minimum value. This value will be used to search for the true saddle point. If negative, the search will start at the lower 10 percentile of the area.

hi

a optional numeric value for the expected upper limit of the cutoff. If missing, thequantile will be used to determine the upper limit.

breaks

a number (or means) to determining the number of cells for the optional histogram (see hist)

quant

if hi is not provided, the area given by this quantile will be used as the upper limit.

plot

if TRUE, plot histogram with selected cutoff points

Details

Get the low and high cutoffs to provide to trimMask.

Value

Vector of two values recommended as cutoff values suitable for trimMask


ornelles/virustiter documentation built on Oct. 13, 2024, 7:58 a.m.