fsleyes.plugins.tools.addmaskdataseries¶
This module provides the AddMaskDataSeriesAction class, an action
used by the TimeSeriesPanel.
-
class
fsleyes.plugins.tools.addmaskdataseries.AddMaskDataSeriesAction(overlayList, displayCtx, plotPanel)[source]¶ Bases:
fsleyes.actions.base.ActionThe
AddMaskDataSeriesActionclass is used by theTimeSeriesPanel.It prompts the user to select a mask image for the currently selected overlay (assumed to be a 4D time series
Image), then extracts the mean time series for the non-zero voxels within the mask, and adds them as aDataSeriesto theTimeSeriesPanel.-
static
supportedViews()[source]¶ The
AddMaskDataSeriesActionis restricted for use withTimeSeriesPanelviews.
-
__init__(overlayList, displayCtx, plotPanel)[source]¶ Create an
AddMaskDataSeriesAction.- Parameters
overlayList – The
OverlayList.displayCtx – The
DisplayContext.plotPanel – The
TimeSeriesPanel.
-
__overlayListChanged(*a)¶ Called when the
OverlayListchanges. Updates theAction.enabledflag based on the currently selected overlay, and the contents of the overlay list.
-
__addMaskDataSeries()¶ Run the
AddMaskDataSeriesAction. Prompt the user to select a mask, using aMaskDialog, then calculates the mean time series in that mask, then adds that time series to theTimeSeriesPanelthat owns this action instance.
-
__module__= 'fsleyes.plugins.tools.addmaskdataseries'¶
-
static
-
class
fsleyes.plugins.tools.addmaskdataseries.MaskDialog(parent, choices, title=None, message=None, checkbox=True, checkboxMessage=None)[source]¶ Bases:
__main__.docbuilder.run.<locals>.MockClassA dialog which displays some options to the user:
A
Choicewidget containing a list of mask imagesA checkbox allowing the user to select whether to calculate the weighted mean time series, weighted by the mask values, or calculate the unweighted mean.
The selections are available via the
GetMask()andGetWeighted()methods-
__init__(parent, choices, title=None, message=None, checkbox=True, checkboxMessage=None)[source]¶ Create a
ChoiceDialog.- Parameters
parent –
wxparent object.choices – List of strings, the choices to present to the user.
title – Dialog title
message – Message to show above choice widget.
checkbox – Show a checkbox
checkboxMessage – Message to show alongside checkbox widget.
-
property
okButton¶ Returns the OK button.
-
property
cancelButton¶ Returns the cancel button.
-
property
checkbox¶ Returns the checkbox.
-
property
choice¶ Returns the choice widget.
-
__onOkButton(ev)¶ Called when the ok button is pushed.
-
__onCancelButton(ev)¶ Called when the cancel button is pushed.
-
__module__= 'fsleyes.plugins.tools.addmaskdataseries'¶