Skip to content

Dock Widgets

napari_relax._widgets

The two dock widgets registered in napari.yaml.

Each widget stacks the widgets listed in __all_widgets__ of its module behind a combobox, and adds the module's __overall_widget__ under them:

  • LineageTreeAnalysisWidget uses lineage_tree_analysis;
  • CrossEmbryoComparisonWidget uses relax_multipledatasets.

ReLAXWidget

Bases: QWidget

Base class of the ReLAX dock widgets.

Subclasses set module to the package whose __all_widgets__ are shown.

Parameters:

Name Type Description Default
napari_viewer Viewer

The napari viewer.

required

__make_widget_combobox()

Build a combobox that switches between the widgets of the module.

Returns:

Type Description
Container

The combobox and the stack of widgets.

LineageTreeAnalysisWidget

Bases: ReLAXWidget

Single-dataset widget: explore, recolor and compare lineages.

Parameters:

Name Type Description Default
napari_viewer Viewer

The napari viewer.

required

CrossEmbryoComparisonWidget

Bases: ReLAXWidget

Multiple-dataset widget: manage datasets and compare them.

Parameters:

Name Type Description Default
napari_viewer Viewer

The napari viewer.

required

napari_relax._util_classes.layer_corrector

LayerCorrectorTreeProducer

Bases: QWidget

Base class of the ReLAX widgets, without an interface of its own.

It provides helpers shared by the widgets: reading the LineageTree of the active layer, selecting a cell and its descendants, and finding the Lineage Viewer graph of a cell.

Parameters:

Name Type Description Default
napari_viewer Viewer

The napari viewer.

required

sub_points_selector()

Add all descendants of the selected point to the selection.

get_lT()

Return the LineageTree of the active layer.

Returns:

Type Description
LineageTree or None

The LineageTree, or None if no layer holds one.

paint_nodes_of_same_tree(val)

Color the whole tree of a graph with the selection color.

Used by widgets with a point_color_from_trees toggle.

Parameters:

Name Type Description Default
val int

Index of the graph in the list of graphs.

required

val_finder(cell, lt, graphs)

Find the graph that contains a cell.

Parameters:

Name Type Description Default
cell int

ID of the node.

required
lt LineageTree

The LineageTree.

required
graphs dict

The Lineage Viewer graphs, keyed by index.

required

Returns:

Type Description
int or None

The key of the graph whose root is the ancestor of the cell.