menus.run_editor

Attributes

logger

Classes

RunEditor

Module Contents

Bases: qtpy.QtWidgets.QGroupBox

Update the layer selection box with the input layers in the viewer

Update the rest of the UI when the selected layer is updated

Create the widget to select the input layer. Uses magicgui, but explicitly connects to the viewer layers events to keep it synced.

Returns:
QWidget: A dropdown select with all the labels layers in layers

and a refresh button to sync with napari.

Get the input segmentation or points in current selection in the layer dropdown.

Returns:
napari.layers.Layer | None: The points or labels layer with the name

that is selected, or None if no layer is selected.

Expect napari segmentation to have shape t, [z], y, x. Motile toolbox needs a channel dimension between time and space. This also raises an error if the input seg is not the expected shape.

Args:

segmentation (np.ndarray): _description_

Raises:

ValueError if segmentation is not 3D or 4D.

Construct a widget where you set the run name and start solving. Initializes self.run_name and connects the generate tracks button to emit the new_run signal.

Returns:
QWidget: A row widget with a line edit for run name and a button

to create a new run and start solving.

Construct a motile run from the current state of the run editor widget.

Returns:
MotileRun: A run with name, parameters, and input segmentation.

Output segmentation and tracks not yet specified.

Construct a run and start solving by emitting the start run signal for the main widget to connect to. If run is invalid, will not emit the signal.

Configure the run editor to copy the name and params of the given run.