8.5.3.3. 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
- copy_ROI(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
- 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: str, index, pos, size, compute=True, **kwargs)[source]
Convenience function to make custom ROI_2D
- remove_ROI(roi)[source]
Function to remove roi from dict and widget
- Parameters:
roi (pg.ROI) – roi to be removed
- update_use_channel(channels: List[str], index=None)[source]
Function to update the selected channels. If no index is given, the channels are applied to all ROIs.
- property ROIs
- color_list = array([[255, 255, 255], [255, 0, 0], [ 0, 255, 0], [ 0, 0, 255], [ 14, 207, 189], [207, 14, 166], [207, 204, 14]])
- color_signal
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- new_ROI_signal
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- remove_ROI_signal
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- roi_changed
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- roi_update_children
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- roi_value_changed
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- class pymodaq_gui.managers.roi_manager.ROISaver(msgbox=False, det_modules=[])[source]
Bases:
objectMethods
set_file_roi
set_new_roi
show_rois
- class pymodaq_gui.managers.roi_manager.ROIScalableGroup(roi_type=DataDim.Data1D, **opts)[source]
Bases:
GroupParameterMethods
addNew([typ])This method is called when the user has requested to add a new item to the group.
makeChannelsParam
makeChild
makeDisplayParam
makeMathParam
make_ROIParam1D
make_ROIParam2D