API

Import livecellx as:

import livecellx as lcx
import livecellx
import livecellx.annotation
import livecellx.annotation.labelme2coco

Annotation

annotation.labelme2coco.get_coco_from_labelme_folder(...)

Generate coco object from labelme annotations.

annotation.labelme2coco.convert(labelme_folder)

Args:

Classification

Core

core.datasets.read_img_default(url, **kwargs)

rtype

ndarray

core.io_sc.process_scs_from_label_mask(...)

process single cells from one label mask.

core.io_sc.process_mask_wrapper(args)

core.io_sc.prep_scs_from_mask_dataset(...[, ...])

core.io_utils.save_png(path, img[, mode])

save image to png file

core.io_utils.save_tiff(img, path[, mode])

core.io_utils.save_general(img, path[, mode])

save image to tiff file

core.pl_utils.add_colorbar(im, ax, fig)

core.sc_seg_operator.create_sc_seg_napari_ui(...)

Usage # viewer = napari.view_image(dic_dataset.to_dask(), name="dic_image", cache=True) # shape_layer = NapariVisualizer.viz_trajectories(traj_collection, viewer, contour_sample_num=20) # sct_operator = SctOperator(traj_collection, shape_layer, viewer) # sct_operator.setup_shape_layer(shape_layer)

core.sct_operator.create_sct_napari_ui(...)

Usage # viewer = napari.view_image(dic_dataset.to_dask(), name="dic_image", cache=True) # shape_layer = NapariVisualizer.viz_trajectories(traj_collection, viewer, contour_sample_num=20) # sct_operator = SctOperator(traj_collection, shape_layer, viewer) # sct_operator.setup_shape_layer(shape_layer)

core.sct_operator.create_scts_operator_viewer(sctc)

rtype

SctOperator

core.sct_operator.create_scs_edit_viewer(...)

Creates a viewer for editing SingleCellStatic objects.

Model_zoo

Preprocess

Segment

segment.ou_simulator.viz_check_combined_sc_result(...)

segment.ou_simulator.compute_distance_by_contour(...)

segment.ou_simulator.combine_two_scs_monte_carlo(...)

segment.ou_simulator.gen_synthetic_overlap_scs(...)

segment.ou_simulator.gen_gauss_sc_bg(sc, shape)

generate background for sc by gaussian noise

segment.ou_simulator.gen_sc_bg_crop(sc, shape)

generate background for sc by cropping from the sc's image.

segment.ou_simulator.move_two_scs(sc1, sc2, ...)

segment.utils.get_contours_from_pred_masks(...)

segment.utils.match_mask_labels_by_iou(...)

compute the similarity between ground truth mask and segmentation mask by intersection over union

segment.utils.filter_labels_match_map(...)

segment.utils.compute_match_label_map(t1, ...)

Compute the label map (mapping between objects) between two time points

segment.utils.process_scs_from_one_label_mask(...)

segment.utils.judge_connected_bfs(mask, ...)

rtype

Tuple[bool, int]

Track

track.classify_utils.video_frames_and_masks_from_sample(sample)

Given a sample of SingleCell objects, returns a list of video frames and a list of video frame masks.

track.classify_utils.combine_video_frames_and_masks(...)

returns a list of combined video frames and masks, each item contains a 3-channel image with first channel as frame and second channel as mask

track.sort_tracker.associate_detections_with_trackers(...)

Assigns detections to tracked object (both represented as bounding boxes)

Trajectory

trajectory.contour_utils.get_cellTool_contour_points(traj)

rtype

List[Contour]

trajectory.contour_utils.viz_contours(...)

trajectory.feature_extractors.compute_haralick_features(sc)

Returns a list of texture features for the given image.

trajectory.feature_extractors.compute_skimage_regionprops(sc)

rtype

Series

Contour