fsleyes.actions.applycommandline¶
This module provides the ApplyCommandLineAction class, an
Action which allows the user to apply FSLeyes command line
arguments to a CanvasPanel. The stand-alone
applyCommandLineArgs() function is where the work is actually
implemented.
-
class
fsleyes.actions.applycommandline.ApplyCommandLineAction(overlayList, displayCtx, panel)¶ Bases:
fsleyes.actions.base.ActionThe
ApplyCommandLineActionclass is anActionwhich allows the user to apply FSLeyes command line arguments to aCanvasPanel.-
__init__(overlayList, displayCtx, panel)¶ Create an
ApplyCommandLineAction.Parameters: - overlayList – The
OverlayList. - displayCtx – The
DisplayContext. - panel – The
CanvasPanel.
- overlayList – The
-
_ApplyCommandLineAction__applyCommandLineArgs()¶ Called when this action is executed. Prompts the user to enter some command line arguments, and then passes them to the
applyCommandLineArgs()function.
-
__module__= 'fsleyes.actions.applycommandline'¶
-
-
exception
fsleyes.actions.applycommandline.ApplyCLIExit(code, stdout, stderr)¶ Bases:
ExceptionExceptionclass raised by theapplyCommandLineArgs()function.-
__init__(code, stdout, stderr)¶ Initialize self. See help(type(self)) for accurate signature.
-
__str__()¶ Return str(self).
-
__module__= 'fsleyes.actions.applycommandline'¶
-
__weakref__¶ list of weak references to the object (if defined)
-
-
fsleyes.actions.applycommandline.applyCommandLineArgs(overlayList, displayCtx, argv, panel=None, applyOverlayArgs=True, **kwargs)¶ Applies the command line arguments stored in
argvto theCanvasPanelpanel. Ifpanel is None, it is assumed thatargvonly contains overlay arguments.Parameters: - overlayList – The
OverlayList. - displayCtx – The
DisplayContext. If apanelis provided, this should be theDisplayContextassociated with that panel. - argv – List of command line arguments to apply.
- panel – Optional
CanvasPanelto apply the arguments to. - applyOverlayArgs – If
False, overlay arguments are not applied.
All other keyword arguments are passed to the
parseargs.applyOverlayArgs()function.- overlayList – The