fsleyes.state

This module provides two functions, getState() and setState(). These functions may be used to get/set the state of FSLeyes.

fsleyes.state.SEP = '\n------\n'

String used to separate different parts of the state string.

fsleyes.state.CLISEP = '\t'

String used to separate different command line arguments, within the state string.

fsleyes.state.getState(frame)

Generate a string which describes the current state of FSLeyes.

The string contains:

  • A layout specification string, as generated by the layouts.serialiseLayout() function.

  • A set of command line arguments describing the overlays that are loaded, generated by the genCommandLineArgs() function.

  • A set of command line arguments for each CanvasPanel, describing the panel settings, and any panel-specific overlay settings.

Parameters

frame – The FSLeyesFrame

Returns

A string describing FSLeyes.

fsleyes.state.setState(frame, state)

Set the state of FSLeyes from the given state string.

Warning

This function will remove all view panels, and remove all overlays, before loading the new state.

Parameters