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)[source]¶
Bases:
fsleyes.views.plotpanel.OverlayPlotPanel
An
OverlayPlotPanel
which plots histograms fromImage
overlay data. AHistogramPanel
looks something like this:A
HistogramPanel
plots one or moreHistogramSeries
instances, each of which encapsulate histogram data from anImage
overlay.A couple of control panels may be shown on a
HistogramPanel
, viaViewPanel.togglePanel()
:The
PlotListPanel
is a FSLeyes control panel for use withOverlayPlotPanel
views.The
HistogramControlPanel
is a FSLeyes control panel which allows the user to configure aHistogramPanel
.- histType = <MagicMock name='mock.Choice()' id='139907488217072'>¶
The histogram type:
count
The y axis represents the absolute number of values within each bin
probability
The y axis represents the number of values within each bin, divided by the total number of values.
- plotType = <MagicMock name='mock.Choice()' id='139907488217072'>¶
How histograms are plotted:
centre
Plot one data point at the centre of each bin
edge
Plot one data point at each bin edge - this produces a “stepped” plot.
- static defaultLayout()[source]¶
Returns a list of control panel types to be added for the default histogram panel layout.
- static controlOrder()[source]¶
Returns a list of control panel names, specifying the order in which they should appear in the FSLeyes ortho panel settings menu.
- __init__(parent, overlayList, displayCtx, frame)[source]¶
Create a
HistogramPanel
.- Parameters
parent – The
wx
parent.overlayList – The
OverlayList
instance.displayCtx – The
DisplayContext
instance.frame – The
FSLeyesFrame
instance.
- destroy()[source]¶
Removes some property listeners, and calls
PlotPanel.destroy()
.
- toggleHistogramOverlay()[source]¶
Toggles the value of the
HistogramSeries.showOverlay
for the currently selected overlay (if possible).
- getActions()[source]¶
Overrides
ActionProvider.getActions()
. Returns all of theactions
that are defined on thisHistogramPanel
.
- draw(*a)[source]¶
Overrides
PlotPanel.draw()
. Passes someHistogramSeries
instances to thePlotPanel.drawDataSeries()
method.
- createDataSeries(overlay)[source]¶
Creates a
HistogramSeries
instance for the specified overlay.
- __annotations__ = {}¶
- __module__ = 'fsleyes.views.histogrampanel'¶
- prepareDataSeries(hs)[source]¶
Overrides
PlotPanel.prepareDataSeries()
.Performs some pre-processing on the data contained in the given
HistogramSeries
instance.
- __selectedOverlayChanged(*a)¶
Called when the
OverlayList
or theDisplayContext.selectedOverlay
changes. Configures thetoggleHistogramOverlay()
action.