Region of Interest Inputs and Outputs

class pumpia.module_handling.in_outs.roi_ios.BaseInputROI(name: str | None = None, *, default_type: Literal['Angle', 'ROI point', 'ROI circle', 'ROI ellipse', 'ROI square', 'ROI rectangle', 'ROI line'] = 'ROI ellipse', allow_manual_draw: bool = True, button_style: str | None = None)

Base class for input handling of ROIs.

Parameters:
  • name (str, optional) – The name of the ROI(default is None).

  • show_button (bool, optional) – Whether to show the button to select the ROI as active(default is True).

  • button_style (str, optional) – The style of the show_button (default is None).

name
Type:

str | None

roi
Type:

BaseROI | None

post_register_command

Command called after ROI is registered. This should accept an ROI and a boolean indicating if it was a manual draw.

Type:

Callable[[BaseInputROI, bool|None], Any]

label_var
Type:

tk.StringVar

select_button
Type:

ttk.Button

draw_button
Type:

ttk.Button

register_roi(roi: ROI)

Registers an ROI.

set_parent(parent: tk.Misc)

Sets the parent of the ROI.

set_manager(manager: Manager)

Sets the manager of the ROI.

set_as_active()

Sets the ROI as the active ROI.

class pumpia.module_handling.in_outs.roi_ios.InputGeneralROI(name: str | None = None, *, default_type: Literal['Angle', 'ROI point', 'ROI circle', 'ROI ellipse', 'ROI square', 'ROI rectangle', 'ROI line'] = 'ROI ellipse', allow_manual_draw: bool = True, button_style: str | None = None)

Represents a general ROI input. Has the same attributes and methods as BaseInputROI unless stated below.

class pumpia.module_handling.in_outs.roi_ios.InputRectangleROI(name: str | None = None, *, allow_manual_draw: bool = True, button_style: str | None = None)

Represents a RectangleROI input. Has the same attributes and methods as BaseInputROI unless stated below.

class pumpia.module_handling.in_outs.roi_ios.InputEllipseROI(name: str | None = None, *, allow_manual_draw: bool = True, button_style: str | None = None)

Represents an EllipseROI input. Has the same attributes and methods as BaseInputROI unless stated below.

class pumpia.module_handling.in_outs.roi_ios.InputLineROI(name: str | None = None, *, allow_manual_draw: bool = True, button_style: str | None = None)

Represents a LineROI input. Has the same attributes and methods as BaseInputROI unless stated below.

class pumpia.module_handling.in_outs.roi_ios.InputAngle(name: str | None = None, *, allow_manual_draw: bool = True, button_style: str | None = None)

Represents an Angle ROI input. Has the same attributes and methods as BaseInputROI unless stated below.

class pumpia.module_handling.in_outs.roi_ios.InputPointROI(name: str | None = None, *, allow_manual_draw: bool = True, button_style: str | None = None)

Represents a PointROI input. Has the same attributes and methods as BaseInputROI unless stated below.