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.Action
The
AddMaskDataSeriesAction
class 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 aDataSeries
to theTimeSeriesPanel
.-
static
supportedViews
()[source]¶ The
AddMaskDataSeriesAction
is restricted for use withTimeSeriesPanel
views.
-
__init__
(overlayList, displayCtx, plotPanel)[source]¶ Create an
AddMaskDataSeriesAction
.- Parameters
overlayList – The
OverlayList
.displayCtx – The
DisplayContext
.plotPanel – The
TimeSeriesPanel
.
-
__overlayListChanged
(*a)¶ Called when the
OverlayList
changes. Updates theAction.enabled
flag 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 theTimeSeriesPanel
that 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>.MockClass
A dialog which displays some options to the user:
A
Choice
widget 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 –
wx
parent 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'¶