Collections
- class pumpia.module_handling.module_collections.OutputFrame(parent: Misc | None = None, *, verbose_name: str | None = None, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = 'V', border: str | float = ..., borderwidth: str | float = ..., class_: str = '', cursor: str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] = '', height: str | float = 0, labelanchor: Literal['nw', 'n', 'ne', 'en', 'e', 'es', 'se', 's', 'sw', 'ws', 'w', 'wn'] = ..., labelwidget: Misc = ..., padding: str | float | tuple[str | float] | tuple[str | float, str | float] | tuple[str | float, str | float, str | float] | tuple[str | float, str | float, str | float, str | float] = ..., relief: Literal['raised', 'sunken', 'flat', 'ridge', 'solid', 'groove'] = ..., style: str = '', takefocus: bool | Literal[0, 1, ''] | Callable[[str], bool | None] = '', underline: int = -1, width: str | float = 0)
- class pumpia.module_handling.module_collections.OutputFrame(parent: Misc | None = None, *, verbose_name: str | None = None, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = 'V', **kw)
A frame for displaying output values.
- Parameters:
parent (tk.Misc or None, optional) – The parent widget (default is None).
verbose_name (str or None, optional) – The verbose name of the frame (default is None).
direction (DirectionType, optional) – The direction of the child widgets in the frame (default is vertical).
**kw (dict) – Additional keyword arguments as defined by ttk Labelframe.
- verbose_name
The verbose name of the frame.
- Type:
str or None
- parent
The parent widget.
- Type:
tk.Misc or None
- is_setup
- Type:
bool
- var_values
- Type:
list
- var_strings
- Type:
list[str]
- horizontal_str
- Type:
str
- vertical_str
- Type:
str
- set_parent(parent: tk.Misc)
Sets the parent widget.
- setup(parent: tk.Misc | None = None, verbose_name: str | None = None)
Sets up the frame.
- copy_horizontal() None
Copies the horizontal string representation of the variable values to the clipboard.
- copy_vertical() None
Copies the vertical string representation of the variable values to the clipboard.
- class pumpia.module_handling.module_collections.WindowGroup(modules: list[BaseModule], verbose_name: str | None = None, *, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = 'V', border: str | float = ..., borderwidth: str | float = ..., class_: str = '', cursor: str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] = '', height: str | float = 0, padding: str | float | tuple[str | float] | tuple[str | float, str | float] | tuple[str | float, str | float, str | float] | tuple[str | float, str | float, str | float, str | float] = ..., relief: Literal['raised', 'sunken', 'flat', 'ridge', 'solid', 'groove'] = ..., style: str = '', takefocus: bool | Literal[0, 1, ''] | Callable[[str], bool | None] = '', width: str | float = 0)
- class pumpia.module_handling.module_collections.WindowGroup(modules: list[BaseModule], verbose_name: str | None = None, *, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = 'V', **kwargs)
A window for showing multiple modules.
- Parameters:
modules (list of BaseModule) – The list of modules to display.
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.module_collections.BaseCollection(parent: Misc, manager: Manager, *, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = 'Horizontal', border: str | float = ..., borderwidth: str | float = ..., class_: str = '', cursor: str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] = '', height: str | float = 0, name: str = ..., padding: str | float | tuple[str | float] | tuple[str | float, str | float] | tuple[str | float, str | float, str | float] | tuple[str | float, str | float, str | float, str | float] = ..., relief: Literal['raised', 'sunken', 'flat', 'ridge', 'solid', 'groove'] = ..., style: str = '', takefocus: bool | Literal[0, 1, ''] | Callable[[str], bool | None] = '', width: str | float = 0)
- class pumpia.module_handling.module_collections.BaseCollection(parent: Misc, manager: Manager, *, direction: Literal['Horizontal', 'h', 'H', 'Vertical', 'v', 'V'] = '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.
- direction
The direction of the child widgets in this collection.
- Type:
str
- main_viewer
The main viewer in the collection.
- Type:
BaseViewer | None
- viewers
The list of viewers in the collection.
- Type:
list[BaseViewer]
- viewer_count
The number of viewers in the collection.
- Type:
int
- modules
The list of modules in the collection.
- Type:
list[BaseModule]
- output_frame_count
The number of output frames in the collection.
- Type:
int
- load_outputs()
User should override this method to load outputs into the OutputFrame objects in collection and link input and output variables in IOGroup objects.
- 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.