livecellx.core.SingleCellStatic

class livecellx.core.SingleCellStatic(timeframe=0, bbox=None, regionprops=None, img_dataset=None, mask_dataset=None, dataset_dict=None, feature_dict=None, contour=None, meta=None, uns=None, id=None, cache=None, update_mask_dataset_by_contour=False, empty_cell=False, tmp=None, use_cache_contour_mask=False, use_img_crop_cache=False, cached_img_shape=None)[source]

Single cell at one time frame

Methods

add_component(component[, component_type])

Add a component to this unit

add_feature(name, features[, typecheck])

add_organelle(organelle)

Add an organelle to this cell (convenience method)

assign_uuid([exclude_set, max_try])

clear_contour_cache()

compute_iomin(other_cell[, bbox])

compute_iou(other_cell[, bbox])

compute_overlap_mask(other_cell[, bbox])

compute_overlap_percent(other_cell[, bbox])

compute overlap defined by: overlap = intersection / self's area.

compute_regionprops([crop, ignore_errors])

copy()

gen_contour_mask(contour[, img, shape, ...])

gen_contour_mask_skimage_deprecated(contour)

gen_skimage_bbox_img_crop(bbox, img[, ...])

get_bbox([padding])

get_bbox_from_contour(contour[, dtype])

get the bounding box of a contour

get_bbox_on_crop([bbox, padding])

get_center([crop])

get_components([component_type])

Get components of a specific type or all components

get_contour()

Get the contour for this unit

get_contour_coords_on_crop([bbox, padding])

get_contour_coords_on_img_crop([padding])

A utility function to calculate pixel coord in image crop's coordinate system from the contour coordinates in the whole image's coordinate system.

get_contour_img([crop, bg_val])

return a contour image with out of self cell region set to background_val

get_contour_label_mask([padding, crop, ...])

get_contour_mask([padding, crop, bbox, dtype])

get_contour_mask_closed_form([padding, crop])

If contour points are pixel-wise closed, use this function to fill the contour.

get_feature_pd_series()

Generate a pandas Series containing features for a single cell.

get_img()

Get the image for this unit

get_img_crop([padding, bbox])

get_img_shape([use_cache])

get_label_mask([dtype])

Get the label mask for this unit

get_label_mask_crop([bbox, dtype])

get_mask([dtype])

Get the mask for this unit

get_mask_crop([bbox, dtype])

get_napari_shape_bbox_vec()

get_napari_shape_contour_vec([...])

get_napari_shape_vec(coords)

get_organelles([organelle_type])

Get organelles of a specific type or all organelles (convenience method)

get_sc_img([crop, bg_val])

return a contour image with out of self cell region set to background_val

get_sc_label_mask([padding, crop, bbox, dtype])

get_sc_mask([padding, crop, bbox, dtype])

inflate_from_json_dict(json_dict[, ...])

load from json dict

load_from_json_dict(json_dict[, ...])

load from json dict

load_single_cells_json(path[, verbose])

load a json file containing a list of single cells

load_single_cells_jsons(paths)

remove_component(component[, component_type])

Remove a component from this unit

remove_organelle(organelle)

Remove an organelle from this cell (convenience method)

sample_contour_point(max_contour_num[, ...])

sample contour points from the trajectory and modify contour attr

segment_by_cellpose()

segment_by_detectron()

show([crop, padding, ax])

show_contour_img([padding, ax, crop, cmap])

show_contour_mask([padding, ax, crop, cmap])

show_label_mask([padding, ax, crop, cmap])

show_mask([crop, padding, ax, cmap])

show_panel([padding, figsize, img_cmap, ...])

show_whole_img([ax, cmap])

show_whole_mask([ax, cmap])

to_json_dict([include_dataset_json, ...])

returns a dict that can be converted to json

update_bbox([bbox])

update_contour(contour[, update_bbox, ...])

update_regionprops()

update_sc_mask_by_crop(mask[, ...])

Updates the single cell mask by cropping the input mask to the bounding box of the single cell and updating the contour.

write_json([path, dataset_json_dir])

write_single_cells_json(single_cells, path)

Write a JSON file containing a list of single cells.

Attributes