8.5.5.2.4. pymodaq_gui.plotting.items.roi module
- class pymodaq_gui.plotting.items.roi.CircularROI(index=0, pos=[0, 0], size=[10, 10], **kwargs)[source]
Bases:
EllipseROI
- class pymodaq_gui.plotting.items.roi.DataDim(*values)[source]
Bases:
StrEnum- Data1D = 'Data1D'
- Data2D = 'Data2D'
- class pymodaq_gui.plotting.items.roi.EllipseROI(index=0, pos=[0, 0], size=[10, 10], **kwargs)[source]
Bases:
ROIElliptical ROI subclass with one scale handle and one rotation handle.
Arguments
pos
(length-2 sequence) The position of the ROI’s origin.
size
(length-2 sequence) The size of the ROI’s bounding rectangle.
**args
All extra keyword arguments are passed to ROI()
Methods
getArrayRegion(arr[, img, axes])Return the result of ROI.getArrayRegion() masked by the elliptical shape of the ROI.
paint(self, painter, option[, widget])shape()- getArrayRegion(arr, img=None, axes=(0, 1), **kwds)[source]
Return the result of ROI.getArrayRegion() masked by the elliptical shape of the ROI. Regions outside the ellipse are set to 0.
- class pymodaq_gui.plotting.items.roi.LinearROI(index=0, pos=[0, 10], name='roi', compute=True, **kwargs)[source]
Bases:
LinearRegionItem,ROIMixin,ROIBase- Attributes:
- color
Methods
contextMenuEvent(self, event)pos()setPos(pos)center
contextMenuEnabled
copy_clipboard
getMenu
mouseClickEvent
raiseContextMenu
setPen
sigCopyRequested
sigDoubleClicked
sigRemoveRequested
- contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)[source]
- property color
- class pymodaq_gui.plotting.items.roi.ROI(*args, index=0, name='roi', compute=True, **kwargs)[source]
-
Base class for all 2D ROI
- Attributes:
- color
Methods
center()Get the center position of the ROI
contextMenuEvent(self, event)set_center(center)Set the center position of the ROI
contextMenuEnabled
copy_clipboard
getMenu
height
mouseClickEvent
raiseContextMenu
sigCopyRequested
sigDoubleClicked
sigRemoveRequested
width
- contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent | None)[source]
- property color
- class pymodaq_gui.plotting.items.roi.ROIBase[source]
Bases:
objectBase class to be inherited for ROI to be created by the factory
- class pymodaq_gui.plotting.items.roi.ROIBrushable(brush=None, *args, **kwargs)[source]
Bases:
ROIMethods
paint(self, painter, option[, widget])setBrush(*br, **kargs)Set the brush that fills the region.
- class pymodaq_gui.plotting.items.roi.ROIFactory[source]
Bases:
objectThe factory class for creating ROI
Methods
create(dimensionality, descriptor, *args, ...)Factory command to create the ROI object.
Returns a list of ROi descriptors for a given dimensionality
Returns a list of registered dimensionality
register()Class decorator method to register ROI class to the internal registry.
- classmethod create(dimensionality, descriptor, *args, **kwargs)[source]
Factory command to create the ROI object. This method gets the appropriate ROI class from the registry and instantiates it. :param dimensionality: the dimensionality of the ROI :type dimensionality:
DataDim:param descriptor: the roi descriptor string :type descriptor:str- Return type:
- classmethod get_descriptors_from_dimensionality(dim)[source]
Returns a list of ROi descriptors for a given dimensionality
- classmethod register()[source]
Class decorator method to register ROI class to the internal registry. Must be used as decorator above the definition of a ROI class.
- Return type:
- registry = {DataDim.Data1D: {'LinearROI': <class 'pymodaq_gui.plotting.items.roi.LinearROI'>}, DataDim.Data2D: {'CircularROI': <class 'pymodaq_gui.plotting.items.roi.CircularROI'>, 'EllipseROI': <class 'pymodaq_gui.plotting.items.roi.EllipseROI'>, 'RectROI': <class 'pymodaq_gui.plotting.items.roi.RectROI'>}}
- class pymodaq_gui.plotting.items.roi.ROIMixin(index=0, name='roi', compute=True)[source]
Bases:
object- Attributes:
- compute
Methods
center
color
copy_clipboard
doShow
emit_index_signal
getMenu
height
index_signal
init_qt
key
mouseClickEvent
mouseDoubleClickEvent
type
width
- property compute
- class pymodaq_gui.plotting.items.roi.ROIPositionMapper(*args: Any, **kwargs: Any)[source]
Bases:
QWidgetWidget presenting a Tree structure representing a ROI positions.
Methods
show_dialog
- class pymodaq_gui.plotting.items.roi.RectROI(index=0, pos=[0, 0], size=[10, 10], **kwargs)[source]
Bases:
ROI