delta.pipeline.ROI¶
- class delta.pipeline.ROI(stack, roi_nb, first_frame, box, config)[source]¶
ROI processor object.
- __init__(stack, roi_nb, first_frame, box, config)[source]¶
Initialize ROI.
- Parameters:
- stackxr.DataArray
Image and fluo stack. Expected dimensions: (frame, channel, y, x). The first channel must be phase contrast imaging (used for segmentation), the rest are fluorescence channels (used for feature extraction).
- roi_nbint
ROI index.
- first_frameint
Index of the first frame (in general 0 or 1).
- boxCroppingBox
CroppingBox for ROI.
- configConfig
DeLTA configuration.
Methods
__init__(stack, roi_nb, first_frame, box, config)Initialize ROI.
adopt(cellid, motherid)Attribute a new mother
motherid(which can beNone) to the cellcellid.chunks_predict(inputs, model[, batch_size])Run keras model, but by splitting the input data into "chunks".
compare(other[, level])Compare this ROI with another and print the differences.
from_xarray(dataset)Create a ROI from an
xarray.Dataset.get_fluo(frame)Return the ROI fluo images at a given frame.
get_img(frame)Return the ROI image at a given frame.
get_labels(frame)Return the ROI labels at a given frame.
get_seg(frame)Return the ROI segmentation mask at a given frame.
get_segmentation_inputs(frame)Compile segmentation inputs for ROI.
get_tracking_inputs(frame)Compile tracking inputs for ROI from seg_stack.
load_netcdf(filename[, group])Load a ROI from a netCDF file.
merge(cellid, merge_into_cellid)Rename a cell (
cellid) to merge it into another one (merge_into_cellid).pivot(cellid)Swap the roles between cell
cellidand its mother.process_segmentation_outputs(logits, frame)Process outputs after they have been segmented.
process_tracking_outputs(logits, frame, boxes)Process output from tracking U-Net.
segment(frames[, model])Segment img_stack and store the results in seg_stack.
split(cellid, frame)Break a cell lineage into two independent cell lineages.
swap_poles(cellid[, frame])Swap the poles of the cell
cellidfor all the frames or for frameframeonwards.to_netcdf(filename, **kwargs)Save the ROI as a netCDF file.
to_xarray()Convert the ROI into a xarray.Dataset.
track(frames[, model, progress_bar])Track cells in the ROI.
Attributes
roi_nbThe ROI index number
boxROI crop box
first_frameIndex of the first frame
img_stackInput images stack
fluo_stackFluo images stack
seg_stackSegmentation images stack
lineageLineage object for ROI
label_stackLabelled images stack
configConfiguration parameters object
scalingResizing ratios along Y and X