ImageHighlightSelector#

ImageHighlightSelector#

Constructor#

ImageHighlightSelector([color, lut, alpha, ...])

Highlights pixel regions of an ImageGraphic.

Properties#

ImageHighlightSelector.alpha

Get or set alpha value, 0 - 1.0

ImageHighlightSelector.color

Get or set color applied to all selected items, used if lut is None.

ImageHighlightSelector.graphics

Get graphics the highlight selector is operating on.

ImageHighlightSelector.lut

Get or set per-item color lookup table, shape (n, 4) float32 RGBA, or a str that defines a colormap.

ImageHighlightSelector.lut_wrap

Get or set LUT wrap mode.

ImageHighlightSelector.options_alpha

Get or set alpha blend value of unselected option items (options mode only).

ImageHighlightSelector.options_color

Get or set color for unselected option items (options mode only).

ImageHighlightSelector.selection

tuple of selection option indices.

ImageHighlightSelector.selection_options

Get or set a pool of selectable items (same dict format as selection in free mode).

Methods#

ImageHighlightSelector.add_event_handler(handler)

Add a callback that is called when the selection changes.

ImageHighlightSelector.add_graphic(graphic)

Add graphic and apply the current highlight selection to it.

ImageHighlightSelector.append(dict_or_index)

append to the current selection

ImageHighlightSelector.clear()

Clear the selection (options mode: deselects all, free mode: clears all regions).

ImageHighlightSelector.remove(dict_or_index)

In options mode: remove(index): remove an option index from the selection.

ImageHighlightSelector.remove_event_handler(handler)

Remove an event handler.

ImageHighlightSelector.remove_graphic(graphic)

remove graphic and clear its highlight buffer.