ROI editor#

The datalab.gui.roieditor module provides the ROI editor widgets for signals and images.

Signal ROI editor#

class datalab.gui.roieditor.SignalROIEditor(parent: QW.QWidget | None, obj: SignalObj | ImageObj, mode: Literal['apply', 'extract', 'define'] = 'apply', item: TypePlotItem | None = None, options: PlotOptions | dict[str, Any] | None = None, size: tuple[int, int] | None = None)[source]#

Signal ROI Editor

Parameters:
  • parent – Parent plot dialog

  • obj – Object to edit (sigima.objects.SignalObj or sigima.objects.ImageObj)

  • mode – Mode of operation, either “apply” (define ROI, then apply it to selected objects), “extract” (define ROI, then extract data from it), or “define” (define ROI without applying or extracting).

  • item – Optional plot item to add to the plot (if None, a new item is created from the object)

get_obj_roi_class() type[SignalROI][source]#

Get object ROI class

add_tools_to_plot_dialog() None[source]#

Add tools to plot dialog

manually_add_roi() None[source]#

Manually add segment ROI

create_coordinate_based_roi_actions() list[QAction][source]#

Create coordinate-based ROI actions

Image ROI editor#

class datalab.gui.roieditor.ImageROIEditor(parent: QW.QWidget | None, obj: SignalObj | ImageObj, mode: Literal['apply', 'extract', 'define'] = 'apply', item: TypePlotItem | None = None, options: PlotOptions | dict[str, Any] | None = None, size: tuple[int, int] | None = None)[source]#

Image ROI Editor

Parameters:
  • parent – Parent plot dialog

  • obj – Object to edit (sigima.objects.SignalObj or sigima.objects.ImageObj)

  • mode – Mode of operation, either “apply” (define ROI, then apply it to selected objects), “extract” (define ROI, then extract data from it), or “define” (define ROI without applying or extracting).

  • item – Optional plot item to add to the plot (if None, a new item is created from the object)

get_obj_roi_class() type[ImageROI][source]#

Get object ROI class

add_tools_to_plot_dialog() None[source]#

Add tools to plot dialog

manually_add_roi(roi_type: Literal['rectangle', 'circle', 'polygon']) None[source]#

Manually add image ROI

create_coordinate_based_roi_actions() list[QAction][source]#

Create coordinate-based ROI actions

setup_items() None[source]#

Setup items