organoid_tracker.gui.window module
- class organoid_tracker.gui.window.DisplaySettings(*, show_next_time_point: bool = False, show_images: bool = True, show_data_axes: bool = True, show_positions: bool = True)
Bases:
object
Used for window-specific display settings.
- KEY_SHOW_IMAGES = 'i'
- KEY_SHOW_NEXT_IMAGE_ON_TOP = 'n'
- image_channel: ImageChannel
- segmentation_channel: Optional[ImageChannel]
- class organoid_tracker.gui.window.Window(q_window: QMainWindow, figure: Figure, experiment: GuiExperiment, title_text: QLabel, status_text: QLabel)
Bases:
object
The model for a window.
- property display_settings: DisplaySettings
- get_active_experiments() Iterable[Experiment]
- get_experiment() Experiment
Gets the experiment that is being shown. Raises UserError if no particular experiment was selected.
- get_gui_experiment() GuiExperiment
Gets the GUI experiment, which stores the experiment along with undo/redo data, and some other non-saveable data.
- get_undo_redo() UndoRedo
Gets the undo/redo handler. Any actions performed through this handler can be undone.
- perform_data_action(action: UndoableAction)
Performs an action that will change the experiment data. The action will be executed, then the window will be redrawn with an updated status bar.
- property plugin_manager: PluginManager
Gets the plugin manager, allowing you to load, inspect and unload plugins.
- redraw_all()
Redraws the image using the latest values from the experiment.
- redraw_data()
Redraws the main figure using the latest values from the experiment.
- register_event_handler(event: str, action: Callable)
Registers an event handler, whichs allows you to react on things like “data changed”. Supported events:
All matplotlib events.
All GuiExperiment event: GuiExperiment.KNOWN_EVENTS
Don’t forget to unregister your event handlers when its no longer needed! Otherwise you’ll have a memory leak.
- property registry: Registry
Gets the registry. Used for plugin-provided things, like new cell types.
- replace_plugin_manager(value: PluginManager)
Replaces the plugin manager. Can only be done if no plugins are loaded.
- set_window_title(text: Optional[str])
Sets the title of the window, prefixed by APP_NAME. Use None as the title to just sown APP_NAME.
Update the main menu of the window to contain the given options.
- unregister_event_handlers()
Unregisters all handlers registered using register_event_handler