menus.params_editor
Classes
Widget for editing SolverParams. |
Functions
|
Extract the base numeric type from a type annotation. |
Module Contents
- menus.params_editor._get_base_type(annotation: type) → type
Extract the base numeric type from a type annotation.
- For example:
int -> int float -> float int | None -> int float | None -> float
- class menus.params_editor.EditableParam(param_name: str, solver_params: motile_tracker.motile.backend.SolverParams, negative: bool = False)
Bases:
qtpy.QtWidgets.QWidget- param_name
- dtype
- title
- negative = False
- param_label
- param_value
- _param_label_widget() → qtpy.QtWidgets.QLabel
- update_from_params(params: motile_tracker.motile.backend.SolverParams)
- class menus.params_editor.OptionalEditableParam(param_name: str, solver_params: motile_tracker.motile.backend.SolverParams, negative: bool = False)
Bases:
EditableParam- ui_default
- _param_label_widget() → qtpy.QtWidgets.QCheckBox
- update_from_params(params: motile_tracker.motile.backend.SolverParams)
- toggle_enable(checked: bool)
- toggle_visible(visible: bool)
- class menus.params_editor.SolverParamsEditor
Bases:
qtpy.QtWidgets.QWidgetWidget for editing SolverParams. Spinboxes will be created for each parameter in SolverParams and linked such that editing the value in the spinbox will change the corresponding parameter. Checkboxes will also be created for each optional parameter (group) and linked such that unchecking the box will update the parameter value to None, and checking will update the parameter to the current spinbox value. To update for a backend change to SolverParams, emit the new_params signal, which the spinboxes and checkboxes will connect to and use to update the UI and thus the stored solver params.
- new_params
- solver_params
- param_categories
- iou_row: OptionalEditableParam
- window_size_row: OptionalEditableParam
- overlap_size_row: OptionalEditableParam
- single_window_start_row: OptionalEditableParam
- _params_group(title: str, param_category: str, negative: bool) → qtpy.QtWidgets.QWidget
- _setup_chunking_constraints() → None
Set up validation constraints for chunking fields.
- _update_overlap_constraints(window_size: int | None) → None
Update overlap_size spinbox maximum based on window_size.
- _toggle_chunking_fields(enabled: bool) → None
Enable/disable overlap_size and single_window_start based on window_size.
- _on_overlap_toggled(checked: bool) → None
When overlap_size is checked, uncheck single_window_start and remember choice.
- _on_single_window_toggled(checked: bool) → None
When single_window_start is checked, uncheck overlap_size and remember choice.
- set_max_frames(max_frame: int) → None
Set the maximum frame index for single_window_start.
- Args:
max_frame: The maximum valid frame index (typically num_frames - 1).