motile_plugin.layers.track_labels

Classes

TrackLabels

Extended labels layer that holds the track information and emits and responds to dynamics visualization signals

Functions

create_selection_label_cmap(...)

Generates a label colormap with three possible opacity values (0 for invisibible labels, 0.6 for visible labels, and 1 for selected labels)

Module Contents

motile_plugin.layers.track_labels.create_selection_label_cmap(color_dict_rgb: Dict, visible: List[int] | str, highlighted: List[int]) napari.utils.DirectLabelColormap

Generates a label colormap with three possible opacity values (0 for invisibible labels, 0.6 for visible labels, and 1 for selected labels)

class motile_plugin.layers.track_labels.TrackLabels(viewer: napari.Viewer, data: numpy.array, name: str, colormap: napari.utils.CyclicLabelColormap, tracks: motile_plugin.core.Tracks, opacity: float, selected_nodes: motile_plugin.utils.node_selection.NodeSelectionList, scale: tuple)

Bases: napari.layers.Labels

Extended labels layer that holds the track information and emits and responds to dynamics visualization signals

nodes
props
viewer
selected_nodes
tracks
base_label_color_dict
create_label_color_dict(labels: List[int], colormap: napari.utils.CyclicLabelColormap) Dict

Extract the label colors to generate a base colormap, but keep opacity at 0

update_label_colormap(visible: list[int] | str) None

Updates the opacity of the label colormap to highlight the selected label and optionally hide cells not belonging to the current lineage