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.Action
The
ApplyCommandLineAction
class is anAction
which 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:
Exception
Exception
class 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
argv
to theCanvasPanel
panel
. Ifpanel is None
, it is assumed thatargv
only contains overlay arguments.Parameters: - overlayList – The
OverlayList
. - displayCtx – The
DisplayContext
. If apanel
is provided, this should be theDisplayContext
associated with that panel. - argv – List of command line arguments to apply.
- panel – Optional
CanvasPanel
to 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