delta.utilities.roi_features

delta.utilities.roi_features(labels_frame: ndarray[Any, dtype[uint16]], features: Tuple[str, ...] = ('length', 'width', 'area', 'perimeter', 'edges'), fluo_frames: Optional[ndarray] = None, roi_box: Optional[CroppingBox] = None) Tuple[List[int], List[Dict[str, Any]]]

Extract single-cell morphological and fluorescence features

Parameters
labels_frame2D array of uint16

Labels image of numbered cell regions.

featureslist of str, optional

Features to extract. Valid features are ‘length’,’width’,’area’, ‘perimeter’,’edges’,’fluo1’,’fluo2’,…,’fluoN’. The default is (‘length’,’width’,’area’,’perimeter’,’edges’).

fluo_frames3D array, optional

Array of fluo frames to extract fluorescence from. Dimensions are (size_x, size_y, fluo_channels). The number of fluo_channels must match the number of fluo features to extract. The default is None.

roi_boxdict, optional

Cropping box dictionary (see cropbox())to apply shift when looking at full-frame fluo images. The default is None.

Returns
cell_nbslist of ints

IDs of cells present in the labels frame

cell_featureslist of dict

List of dictionary with values for requested features.