motile_tracker.import_export.menus.segmentation_widgets

Classes

ExternalSegmentationWidget

Widget for specifying the path to an external segmentation image file or folder.

FileFolderDialog

Dialog to select a file or folder for segmentation data.

CSVSegmentationWidget

QWidget to select segmentation data when importing from CSV

GeffSegmentationWidget

QWidget to select segmentation data when importing from geff.

Module Contents

class motile_tracker.import_export.menus.segmentation_widgets.ExternalSegmentationWidget

Bases: qtpy.QtWidgets.QWidget

Widget for specifying the path to an external segmentation image file or folder.

seg_path_updated
image_path_line
image_browse_button
valid = False
seg_label
_browse_segmentation() None

Open custom dialog to select either a file or a folder

_verify_path() None

Check that the path exists and is of type .zarr or tiff, change style sheet if invalid

get_segmentation_path() pathlib.Path | None

Return the path to the segmentation data.

class motile_tracker.import_export.menus.segmentation_widgets.FileFolderDialog(parent=None)

Bases: qtpy.QtWidgets.QDialog

Dialog to select a file or folder for segmentation data.

path_line_edit
file_button
folder_button
ok_button
_select_file()

Open File dialog to select a file and set it to the line edit.

_select_folder()

Open Folder dialog to select a folder and set it to the line edit.

get_selected_path() pathlib.Path | None

Return the path entered in the line edit.

class motile_tracker.import_export.menus.segmentation_widgets.CSVSegmentationWidget

Bases: qtpy.QtWidgets.QWidget

QWidget to select segmentation data when importing from CSV

seg_updated
button_group
none_radio
external_segmentation_radio
segmentation_widget
_toggle_segmentation(checked: bool) None

Toggle visibility of the segmentation widget based on the radio button state.

include_seg() bool

Return True if any segmentation radio button is checked, else False.

get_segmentation_path() pathlib.Path | None

Return the path to selected segmentation data

load_segmentation() numpy.ndarray | None

Return the associated segmentation image array if a valid path is given.

class motile_tracker.import_export.menus.segmentation_widgets.GeffSegmentationWidget(root: zarr.Group | None = None)

Bases: qtpy.QtWidgets.QWidget

QWidget to select segmentation data when importing from geff.

seg_updated
root = None
button_group
related_object_radio_buttons
none_radio
related_objects_layout
external_segmentation_radio
segmentation_widget
update_root(root: zarr.Group | None) None

Update the root group and populate related objects if available. Args:

root (zarr.Group | None): The root group of the geff zarr store.

_toggle_segmentation(checked: bool) None

Toggle visibility of the segmentation widget based on the radio button state.

include_seg() bool

Return True if any segmentation radio button is checked, else False.

get_segmentation_path() pathlib.Path | None

Return the path to selected related object or external segmentation