delta.utilities¶
Click on the signatures below to get a complete description.
Module for utility functions and class definitions that are used in pipeline.py
A few functions are redundant from data.py, but we keep the files separate to minimize the risk of unforeseen bugs.
@author: jblugagne
Classes
|
Class for cell lineages contained in each ROI |
|
Daemon to watch experiment files and signal new ones (not functional yet) |
|
Class to read experiment files from bioformats-compatible files or from file sequences in folders |
Functions
|
Area of a single cell |
|
Extract mean fluorescence level from mask |
|
Get single cell perimeter |
|
Mesure width and length of single cell |
|
Crop input image into windows of set size. |
|
Crop image |
|
Compute the rotation angle to apply to the image to remove its rotation. |
|
Identify which poles belong to the mother and which to the daughter |
|
Compute drift between current frame and the reference, and return corrected image |
|
Euclidean point to point distance |
|
Extract poles per cell from ends image |
|
A slower and more rudimentary version of poles finding but that is guaranteed to find exactly 2 poles |
|
wrapper for CV2's findContours() because it keeps changing signatures |
|
Find first non-zero element of list |
|
Get attribution matrix from tracking scores |
|
This function retrieves a region above the chambers to use as drift template |
|
Extract the bounding boxes of the chambers in the binary mask produced by the chambers identification unet |
|
Get overlap scores between input/target cells and tracking outputs |
|
Get numbers of cells present in frame, sorted along Y axis |
|
Get centroid of cv2 contour |
|
Get cell poles |
|
Pseudo-randomly generate list of random hsv colors. |
|
|
|
Get a crop box and a fill box around a cell that fits the tracking target size |
|
Pop up window to select experiment file or folder. |
|
Identify if cell touches image borders |
|
Rotate image |
|
Label cells in segmentation mask |
|
Load models (as specified in config.py) |
|
Area filtering using openCV instead of skimage |
|
Rescale image values to be within range |
|
Extract single-cell morphological and fluorescence features |
|
Extract features for a single cell |
|
This function was adapted from stackoverflow #https://stackoverflow.com/questions/26537313/how-can-i-find-endpoints-of-binary-skeleton-image-in-opencv |
|
Stitch segmentation back together from the windows of create_windows() |
|
Track poles of a cell to the previous old and new poles |
|
Sometimes the skeleton produces more than 2 poles. |
|
Write images stack to video file with h264 compression. |