menus.run_editor
Attributes
Classes
Module Contents
- menus.run_editor.logger
- class menus.run_editor.RunEditor(viewer: napari.Viewer)
Bases:
qtpy.QtWidgets.QGroupBox
- start_run
- viewer
- solver_params_widget
- run_name: qtpy.QtWidgets.QLineEdit
- layer_selection_box: qtpy.QtWidgets.QComboBox
- update_labels_layers() → None
Update the layer selection box with the input layers in the viewer
- update_layer_selection() → None
Update the rest of the UI when the selected layer is updated
- _labels_layer_widget() → qtpy.QtWidgets.QWidget
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_input_layer() → napari.layers.Layer | None
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.
- _run_widget() → qtpy.QtWidgets.QWidget
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.
- static _has_duplicate_ids(segmentation: numpy.ndarray) → bool
Checks if the segmentation has duplicate label ids across time. For efficiency, only checks between the first and second time frames.
- Args:
segmentation (np.ndarray): (t, [z], y, x)
- Returns:
- bool: True if there are duplicate labels between the first two frames, and
False otherwise.
- get_run() → motile_tracker.motile.backend.MotileRun | None
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.
- emit_run() → None
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.
- new_run(run: motile_tracker.motile.backend.MotileRun) → None
Configure the run editor to copy the name and params of the given run.