xcp_d.interfaces.workbench.ShowScene

class xcp_d.interfaces.workbench.ShowScene(command=None, terminal_output=None, write_cmdline=False, **inputs)[source]

Wrapped executable: wb_command -show-scene.

Offscreen rendering of scene to an image file.

Notes

wb_command -show-scene

<scene-file> - scene file <scene-name-or-number> - name or number (starting at one) of the scene in

the scene file

<image-file-name> - output image file name <image-width> - width of output image(s), in pixels <image-height> - height of output image(s), in pixels

[-use-window-size] - Override image size with window size

[-no-scene-colors] - Do not use background and foreground colors in scene

[-set-map-yoke] - Override selected map index for a map yoking group.

<Map Yoking Roman Numeral> - Roman numeral identifying the map yoking group (I, II, III, IV, V, VI, VII, VIII, IX, X) <Map Index> - Map index for yoking group. Indices start at 1 (one)

[-conn-db-login] - Login for scenes with files in Connectome Database

<Username> - Connectome DB Username <Password> - Connectome DB Password

Render content of browser windows displayed in a scene into image file(s). The image file name should be similar to “capture.png”. If there is only one image to render, the image name will not change. If there is more than one image to render, an index will be inserted into the image name: “capture_01.png”, “capture_02.png” etc.

If the scene references files in the Connectome Database, the “-conn-db-login” option is available for providing the username and password. If this options is not specified, the username and password stored in the user’s preferences is used.

The image format is determined by the image file extension. The available image formats may vary by operating system. Image formats available on this system are:

bmp jpeg jpg png ppm tif tiff

The result of using the “-use-window-size” option is dependent upon the version used to create the scene.

  • Versions 1.2 and newer contain the width and

height of the graphics region. The output image will be the width and height from the scene and the image width and height specified on the command line is ignored. * If the scene does not contain the width and height of the graphics region, the width and height specified on the command line is used for the size of the output image.

Mandatory Inputs:
  • image_height (an integer) – Height of output image(s), in pixels. Maps to a command-line argument: %s (position: 4).

  • image_width (an integer) – Width of output image(s), in pixels. Maps to a command-line argument: %s (position: 3).

  • scene_file (a pathlike object or string representing an existing file) – Maps to a command-line argument: %s (position: 0).

  • scene_name_or_number (an integer or a string) – Name or number (starting at one) of the scene in the scene file. Maps to a command-line argument: %s (position: 1).

Optional Inputs:
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value: {})

  • out_file (a pathlike object or string representing a file) – Output image file name. Maps to a command-line argument: %s (position: 2).

Outputs:

out_file (a pathlike object or string representing an existing file) – Output image file name.

__init__(command=None, terminal_output=None, write_cmdline=False, **inputs)[source]

Subclasses must implement __init__

Methods

__init__([command, terminal_output, ...])

Subclasses must implement __init__

aggregate_outputs([runtime, needed_outputs])

Collate expected outputs and apply output traits validation.

help([returnhelp])

Prints class help

load_inputs_from_json(json_file[, overwrite])

A convenient way to load pre-set inputs from a JSON file.

raise_exception(runtime)

run([cwd, ignore_exception])

Execute this interface.

save_inputs_to_json(json_file)

A convenient way to save current inputs to a JSON file.

set_default_terminal_output(output_type)

Set the default terminal output for CommandLine Interfaces.

version_from_command([flag, cmd])

Attributes

always_run

Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.

can_resume

Defines if the interface can reuse partial results after interruption.

cmd

sets base command, immutable

cmdline

command plus any arguments (args) validates arguments and generates command line

resource_monitor

terminal_output

version

interfaces should implement a version property

write_cmdline