Collections
- class pumpia.module_handling.collections.ModuleGroup(*modules: BaseModule, verbose_name: str | None = None, direction: DirectionType = 'V', border: ScreenUnits = ..., borderwidth: ScreenUnits = ..., class_: str = '', cursor: Cursor = '', height: ScreenUnits = 0, padding: Padding = ..., relief: Relief = ..., style: str = '', takefocus: TakeFocusValue = '', width: ScreenUnits = 0)
- class pumpia.module_handling.collections.ModuleGroup(*modules: BaseModule, verbose_name: str | None = None, direction: DirectionType = 'V', **kwargs)
Groups multiple modules into the same tab in the collection.
- Parameters:
*modules (BaseModule)
verbose_name (str or None, optional) – The verbose name of the group (default is None).
direction (DirectionType, optional) – The direction of the modules in the group (default is vertical).
**kw (dict) – Additional keyword arguments as defined by ttk Panedwindow.
- modules
The list of modules to display.
- Type:
list[BaseModule]
- verbose_name
The verbose name of the group.
- Type:
str or None
- direction
The direction of the modules in the group.
- Type:
str
- setup(parent: tk.Misc, verbose_name: str | None = None)
Sets up the window group.
- on_tab_select()
Called when the tab containing this window is selected.
- class pumpia.module_handling.collections.BaseCollection(parent: Misc, manager: Manager, *, direction: DirectionType = 'Horizontal', border: ScreenUnits = ..., borderwidth: ScreenUnits = ..., class_: str = '', cursor: Cursor = '', height: ScreenUnits = 0, name: str = ..., padding: Padding = ..., relief: Relief = ..., style: str = '', takefocus: TakeFocusValue = '', width: ScreenUnits = 0)
- class pumpia.module_handling.collections.BaseCollection(parent: Misc, manager: Manager, *, direction: DirectionType = 'Horizontal', **kwargs)
A base class for collections of modules and viewers.
- Parameters:
parent (tk.Misc) – The parent widget.
manager (Manager) – The manager object for this collection.
direction (DirectionType, optional) – The direction of the child widgets in this collection (default is “Horizontal”).
**kwargs (dict) – Additional keyword arguments as defined in ttk Frame.
- context_manager
Set at class level. Determines which context manager to use if none is passed in at object initialisation. (default is SimpleContextManager)
- Type:
- title
Set at class level. Title of the module tkinter window.
- Type:
str
- direction
The direction of the child widgets in this collection.
- Type:
str
- modules
- field_groups
- field_windows
- viewers
- module_groups
- main_viewer
The main viewer in the collection.
- Type:
BaseViewer | None
- viewer_count
The number of viewers in the collection.
- Type:
int
- output_frame_count
The number of output frames in the collection.
- Type:
int
- load_commands()
User can override this method to register command buttons for the collection.
- register_command(text: str, command: Callable[[], Any])
Register a command so that it shows as a button in the main tab.
- on_image_load(viewer: BaseViewer) None
User should override this method to handle image load events.
- on_main_tab_select()
Handles the event when the main tab is selected.
- create_rois() None
Calls the create_rois method for each module.
- run_analysis() None
Calls the run_analysis method for each module.
- create_and_run() None
Calls the create_rois and run_analysis methods.
- run(cls: type[Self], direction: DirectionType = 'Horizontal')
Runs the application.