8.5.3.4. pymodaq_gui.managers.roi_manager module

class pymodaq_gui.managers.roi_manager.ROIManager(viewer_widget=None, ROI_type=DataDim.Data1D)[source]

Bases: QObject

Attributes:
ROIs

Methods

copy_ROI(roi)

Method to copy a ROI and add it to the parameter tree and to the viewer widget The method extracts the parameters of the copied ROI, create a new parameter, a new ROI and update it with the settings from the copied parameter :param roi: the ROI to be copied :type roi: ROI

make_ROI1D(index, pos[, compute])

Convenience function to make custom ROI_1D

make_ROI2D(descriptor, index, pos, size[, ...])

Convenience function to make custom ROI_2D

remove_ROI(roi)

Function to remove roi from dict and widget

update_use_channel(channels[, index])

Function to update the selected channels.

add_ROI

add_roi_programmatically

clear_ROI

color_signal

emit_colors

expand_roi_tree

get_ROI_indexes

get_parameter

get_roi

get_roi_from_index

load_ROI

make_ROI

new_ROI_signal

remove_ROI_signal

remove_roi_programmatically

roi_changed

roi_format

roi_tree_changed

roi_update_children

roi_value_changed

save_ROI

set_roi

setupUI

update_roi

update_roi_pos

update_roi_tree

static roi_format(index)[source]
add_ROI(roi)[source]
add_roi_programmatically(descriptor='CircularROI')[source]
clear_ROI()[source]
copy_ROI(roi)[source]

Method to copy a ROI and add it to the parameter tree and to the viewer widget The method extracts the parameters of the copied ROI, create a new parameter, a new ROI and update it with the settings from the copied parameter :param roi: the ROI to be copied :type roi: ROI

emit_colors()[source]
expand_roi_tree(roi)[source]
get_ROI_indexes()[source]
get_parameter(roi)[source]
get_roi(roi_key)[source]
get_roi_from_index(index)[source]
Return type:

ROI

load_ROI(path=None, params=None)[source]
make_ROI(param)[source]
make_ROI1D(index, pos, compute=True, **kwargs)[source]

Convenience function to make custom ROI_1D

Parameters:
  • index (int) – Current index of ROI

  • pos – Initial position of ROI

Returns:

LinearROI

Return type:

roi

make_ROI2D(descriptor, index, pos, size, compute=True, **kwargs)[source]

Convenience function to make custom ROI_2D

Parameters:
  • descriptor (str) – name of 2D ROI

  • index (int) – Current index of ROI

  • pos – Initial position of ROI

  • size – Initial size of ROI

Returns:

pg.ROI

Return type:

roi

remove_ROI(roi)[source]

Function to remove roi from dict and widget

Parameters:

roi (pg.ROI) – roi to be removed

remove_roi_programmatically(index)[source]
roi_tree_changed(param, changes)[source]
save_ROI()[source]
set_roi(roi_params, roi_params_new)[source]
setupUI()[source]
update_roi(roi, param)[source]
update_roi_pos(pos, param)[source]
update_roi_tree(roi)[source]
update_use_channel(channels, index=None)[source]

Function to update the selected channels. If no index is given, the channels are applied to all ROIs.

Parameters:
  • channels (List[str]) – channels list from a viewer

  • index (int, optional) – ROI index. Defaults to None.

property ROIs
color_list = array([[255,   0,   0],        [  0, 255,   0],        [  0,   0, 255],        [ 14, 207, 189],        [207,  14, 166],        [207, 204,  14]])
class pymodaq_gui.managers.roi_manager.ROISaver(msgbox=False, det_modules=[])[source]

Bases: object

Methods

set_file_roi

set_new_roi

show_rois

set_file_roi(filename, show=True)[source]
set_new_roi(file=None)[source]
show_rois()[source]
class pymodaq_gui.managers.roi_manager.ROIScalableGroup(roi_type=DataDim.Data1D, **opts)[source]

Bases: GroupParameter

Methods

addNew([typ])

makeChannelsParam

makeChild

makeDisplayParam

makeMathParam

make_ROIParam1D

make_ROIParam2D

static makeChannelsParam(dim=DataDim.Data2D)[source]
static makeDisplayParam(index)[source]
static makeMathParam(dim=DataDim.Data2D)[source]
static make_ROIParam1D(descriptor, index)[source]
static make_ROIParam2D(descriptor, index)[source]
addNew(typ='')[source]
makeChild(index, descriptor)[source]
pymodaq_gui.managers.roi_manager.roi_format(index)[source]