fsleyes.views.histogrampanel¶
This module provides the HistogramPanel, which is a FSLeyes view
that plots the histogram of data from Image overlays.
-
class
fsleyes.views.histogrampanel.HistogramPanel(parent, overlayList, displayCtx, frame)¶ Bases:
fsleyes.views.plotpanel.OverlayPlotPanelAn
OverlayPlotPanelwhich plots histograms fromImageoverlay data. AHistogramPanellooks something like this:
A
HistogramPanelplots one or moreHistogramSeriesinstances, each of which encapsulate histogram data from anImageoverlay.A couple of control panels may be shown on a
HistogramPanel:PlotListPanelThe PlotListPanelis a FSLeyes control panel for use withOverlayPlotPanelviews.HistogramControlPanelThe HistogramControlPanelis a FSLeyes control panel which allows the user to configure aHistogramPanel.The following
actionsare provided, in addition to those already provided by thePlotPanel:toggleHistogramToolBarShows/hides a HistogramToolBar.toggleHistogramControlShows/hides a HistogramControlPanel.Some tools are also available, to do various things:
addROIHistogramRuns an AddROIHistogramAction.-
histType= <MagicMock name='mock.Choice()' id='139845843612560'>¶ The histogram type:
countThe y axis represents the absolute number of values within each bin probabilityThe y axis represents the number of values within each bin, divided by the total number of values.
-
plotType= <MagicMock name='mock.Choice()' id='139845843612560'>¶ How histograms are plotted:
centrePlot one data point at the centre of each bin edgePlot one data point at each bin edge - this produces a “stepped” plot.
-
__init__(parent, overlayList, displayCtx, frame)¶ Create a
HistogramPanel.Parameters: - parent – The
wxparent. - overlayList – The
OverlayListinstance. - displayCtx – The
DisplayContextinstance. - frame – The
FSLeyesFrameinstance.
- parent – The
-
destroy()¶ Removes some property listeners, and calls
PlotPanel.destroy().
-
toggleHistogramControl(floatPane=False)¶ Shows/hides a
HistogramControlPanel. SeeViewPanel.togglePanel().
-
toggleHistogramToolBar()¶ Shows/hides a
HistogramToolBar. SeeViewPanel.togglePanel().
-
toggleHistogramOverlay()¶ Toggles the value of the
HistogramSeries.showOverlayfor the currently selected overlay (if possible).
-
addROIHistogram()¶ Runs an
AddROIHistogramAction.
-
getActions()¶ Overrides
ActionProvider.getActions(). Returns all of theactionsthat are defined on thisHistogramPanel.
-
getTools()¶ Returns a list of tools to be added to the
FSLeyesFrameforHistogramPanelviews.
-
draw(*a)¶ Overrides
PlotPanel.draw(). Passes someHistogramSeriesinstances to thePlotPanel.drawDataSeries()method.
-
createDataSeries(overlay)¶ Creates a
HistogramSeriesinstance for the specified overlay.
-
_HistogramPanel__selectedOverlayChanged(*a)¶ Called when the
OverlayListor theDisplayContext.selectedOverlaychanges. Configures thetoggleHistogramOverlay()action.
-
__module__= 'fsleyes.views.histogrampanel'¶
-
prepareDataSeries(hs)¶ Overrides
PlotPanel.prepareDataSeries().Performs some pre-processing on the data contained in the given
HistogramSeriesinstance.
-