fsleyes.actions.addmaskdataseries¶
This module provides the AddMaskDataSeriesAction class, an action
used by the TimeSeriesPanel.
-
class
fsleyes.actions.addmaskdataseries.AddMaskDataSeriesAction(overlayList, displayCtx, plotPanel)¶ 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.-
__init__(overlayList, displayCtx, plotPanel)¶ Create an
AddMaskDataSeriesAction.Parameters: - overlayList – The
OverlayList. - displayCtx – The
DisplayContext. - plotPanel – The
TimeSeriesPanel.
- overlayList – The
-
destroy()¶ Must be called when this
AddMaskDataSeriesActionis no longer in use.
-
_AddMaskDataSeriesAction__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.
-
_AddMaskDataSeriesAction__overlayListChanged(*a)¶ Called when the
OverlayListchanges. Updates theAction.enabledflag based on the currently selected overlay, and the contents of the overlay list.
-
__module__= 'fsleyes.actions.addmaskdataseries'¶
-
-
class
fsleyes.actions.addmaskdataseries.MaskDialog(parent, choices, title=None, message=None, checkbox=True, checkboxMessage=None)¶ Bases:
__main__.MockClassA dialog which displays some options to the user:
- A
Choicewidget containing a list of mask images - A 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)¶ 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.
- parent –
-
okButton¶ Returns the OK button.
-
cancelButton¶ Returns the cancel button.
-
checkbox¶ Returns the checkbox.
-
choice¶ Returns the choice widget.
-
GetChoice()¶ Returns the index of the currently selected choice.
-
GetCheckBox()¶ Returns the index of the currently selected choice.
-
_MaskDialog__onCancelButton(ev)¶ Called when the cancel button is pushed.
-
_MaskDialog__onOkButton(ev)¶ Called when the ok button is pushed.
-
__module__= 'fsleyes.actions.addmaskdataseries'¶
- A