mpl_qt_viz.roiSelection.WaterShedPaintCreator

class mpl_qt_viz.roiSelection.WaterShedPaintCreator(ax, im, onselect=None)[source]

Bases: mpl_qt_viz.roiSelection._creatorWidgets._base.CreatorWidgetBase

Uses Watershed technique in an attempt to highlight all bright selectable regions in a fluorescence image.

Parameters
  • ax (Axes) – The matplotlib Axes that you want to interact with.

  • im (AxesImage) – A reference to a matplotlib AxesImage. The data from this object is used to detect bright regions.

  • onselect – A callback that will be called when the user hits ‘enter’. Should have signature (polygonCoords, sparseHandleCoords).

static getHelpText()[source]

Return a description of the selector which can be used as a tooltip.

paint(forceRedraw=True)[source]

Refresh the detected regions.

Parameters

forceRedraw (bool) – If True then polygons will be cleared and redrawn even if we don’t detect that our status is stale

reset()[source]

Reset the state of the selector so it’s ready for a new selection.

set_active(active)[source]

Set whether the widget is active.