CellSegmentation.cell_image
— MethodWrap an array containing a cell image into a nicely-indexed CellImage.
CellSegmentation.extract_segment
— MethodExtract the contents of a segment mask and place it on a black background.
CellSegmentation.get_background_mask
— MethodFinds the background of a grayscale image, resulting in a black and white image.
Binarizes based on quantile of nonzero values.
Uses median smoothing and morphological opening for improved smoothness.
An alternative to something like .!ImageBinarization.binarize(image, ImageBinarization.Otsu())
`
CellSegmentation.median_filter
— MethodSmooth an image using a windowed median, with window length as a fraction of image size.
CellSegmentation.nearest_neighbor_resize
— MethodResize using nearest-neighbor Interpolation rather than whatever ImageTransformations.imresize uses (which averages out integers).
CellSegmentation.remove_edges
— MethodFinds, isolates, and removes edges in a grayscale image.
Potentially useful to increase distance between bordering cell nuclei.
TODO: Examine if Otsu's method is best binarization for edges. TODO: Make edge thickening (by morphological dilation) independent of image resolution.
CellSegmentation.segment_via_background
— MethodSegment nucleui or cells using marked watershed method.
If markers are not provided, they are established using a distance from the background, thresholded to a quantile of foreground distances from background.
Using a different background for markers is supported as well.