delta.pipeline.ROI#

class delta.pipeline.ROI(img_stack, fluo_stack, roi_nb, first_frame, box, config)[source]#

ROI processor object.

__init__(img_stack, fluo_stack, roi_nb, first_frame, box, config)[source]#

Initialize ROI.

Parameters
img_stackList[Image]

Image stack.

fluo_stackList[List[Image]]

Fluo stack. Shape: (frames, fluo_channels, Y, X).

roi_nbint

ROI index.

first_frameint

Index of the first frame (in general 0 or 1).

boxCroppingBox

CroppingBox for ROI.

configConfig

DeLTA configuration.

Returns
None.

Methods

__init__(img_stack, fluo_stack, roi_nb, ...)

Initialize ROI.

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.

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.

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_nb

The ROI index number

box

ROI crop box

first_frame

Index of the first frame

img_stack

Input images stack

seg_stack

Segmentation images stack

lineage

Lineage object for ROI

label_stack

Labelled images stack

config

Configuration parameters object

scaling

Resizing ratios along Y and X