fsleyes.actions.addroihistogram

This module provides the AddROIHistogramAction class, an action used by the HistogramPanel.

class fsleyes.actions.addroihistogram.AddROIHistogramAction(overlayList, displayCtx, plotPanel)[source]

Bases: fsleyes.actions.base.Action

The AddROIHistogramAction class is used by the HistogramPanel.

It performs a very similar task to the AddMaskDataSeriesAction - the user selects a binary mask, the data within the base image is extracted for that mask, and the histogram of that data is added to the plot.

__init__(overlayList, displayCtx, plotPanel)[source]

Create an AddROIHistogramAction.

Parameters
destroy()[source]

Must be called when this AddROIHistogramAction is no longer in use.

_AddROIHistogramAction__addROIHistogram()

Prompts the user to select an ROI mask, calculates the histogram of that mask on the currently selected overlay, and adds the result to the HistogramPanel.

_AddROIHistogramAction__overlayListChanged(*a)

Called when the OverlayList or the DisplayContext.selectedOverlay changes. Updates a list of valid mask images for the currently selected overlay.

__module__ = 'fsleyes.actions.addroihistogram'