fsleyes.actions.showcommandline

This module provides the ShowCommandLineAction class, an action used by the CanvasPanel class. A couple of stand-alone functions are also defined here:

showCommandLineArgs

Generates command line arguments which can be used to re-create the scene shown on the given CanvasPanel, and displays them to the user with a TextEditDialog.

genCommandLineArgs

Called by the showCommandLineArgs() function.

class fsleyes.actions.showcommandline.ShowCommandLineAction(*args, **kwargs)[source]

Bases: Action

The ShowCommandLineAction class is an action which is used by CanvasPanel instances to generate a FSLeyes command line string which can be used to re-create the scene shown in the panel.

__init__(overlayList, displayCtx, panel)[source]

Create a ShowCommandLineAction.

Parameters:
__showCommandLineArgs()

Called when this action is executed. Calls the showCommandLineArgs() function.

__annotations__ = {}
__module__ = 'fsleyes.actions.showcommandline'
fsleyes.actions.showcommandline.showCommandLineArgs(overlayList, displayCtx, canvas)[source]

Generates command line arguments which can be used to re-create the scene shown on the given CanvasPanel, and displays them to the user with a TextEditDialog.

Parameters:
fsleyes.actions.showcommandline.genCommandLineArgs(overlayList, displayCtx, canvas=None)[source]

Called by the showCommandLineArgs() function. Generates command line arguments which can be used to re-create the scene currently shown on the given CanvasPanel.

Parameters:
  • overlayList – A OverlayList .

  • displayCtx – A DisplayContext instance.

  • canvas – A CanvasPanel instance. If None, scene arguments are not generated.

Returns:

A list of command line arguments.