Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.
OFFSCREEN RENDERING OF SCENE TO AN IMAGE FILE wb_command -scene-capture-image <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 The file name must end with a valid extension that identifies the image file format. Valid extensions on this system are: (.bmp .jpeg .jpg .png .ppm .tif .tiff). If there is more than one window in the scene, multiple image files are output with the window's number inserted into the name of the image file immediately before the image file's extension. [-size-window] - Output image is size of window's graphics region from when scene was created. [-size-capture] - Output image uses size from Capture Dialog when scene was created [-size-width-height] - Width and height for output image <width> - Width for output image <height> - Height for output image [-size-width] - Width for output image. Height is computed using the aspect ratio from the window's width and height saved in the scene. <width> - Width for output image [-size-height] - Height for output image. Width is computed using the aspect ratio from the window's width and height saved in the scene. <height> - Height for output image [-units] - Units for image width/height Default is PIXELS <units> - Name of units for image width/height. Valid units are: INCHES CENTIMETERS MILLIMETERS METERS PIXELS [-resolution] - Image resolution (number pixels per size unit) Default is 300 PIXELS_PER_INCH <Number of pixels> - number of pixels <Units Name> - Name of resolution units. Valid resolution unit names are: PIXELS_PER_INCH PIXELS_PER_CENTIMETER PIXELS_PER_METER PIXELS_PER_MILLIMETER [-margin] - Add a margin to sides of the image using the window's background color. <size> - size of margin, in pixels, added to all sides of output image [-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 undex> - Map index for yoking group. Indices start at 1 (one) [-conn-db-login] - Login for scenes with files in Connectome Database. If this option is not specified, the login and password stored in the user's preferences is used. <username> - Connectome DB Username <password> - Connectome DB Password [-show-capture-settings] - Print settings from Capture Dialog only, DO NOT create image file(s) [-renderer] - Select renderer for drawing image <Renderer> - Name of renderer to use for drawing image Available renderers are (first is default): OSMesa - Mesa3D OSMesa software renderer [-print-image-info] - Print the size and other information about output images only and DO NOT create any output images ---------------------------------------------------------------------- Render content of browser windows displayed in a scene into image file(s). If none of the "-size" options are specified, the default is "-size-window" (Output image is size of the window that was saved in the scene). For the "-size" options that accept a width and/or height, the values default to number of pixels. To express the width and/or height in physical units (inches, centimeters, etc.), use the "-units" option. When physical units are used, the pixel width and height are derived using the physical width/height and the image resolution (see the "-resolution" option). Note that scenes created prior to version 1.2 (May 2016) do not contain information about the size of the window. Therefore, one must use the "-size-width-height" option. Examples: Generate an image of the second scene. Width and height of image is width and height of window saved in the scene. wb_command -scene-capture-image myscene.scene 2 image2.jpg Generate an image of the second scene with a margin around sides of the image. Width and height of image is width and height of window saved in the scene. wb_command -scene-capture-image myscene.scene 2 image2.jpg -margin 10 Generate an image of the second scene that is 6 inches width with 300 pixels per inch. The resulting width is 1800 pixels. The resulting height of the image is a function of the width and the aspect ratio (height divided by width) of the window size saved in the scene. wb_command -scene-capture-image myscene.scene 2 image21.jpg \ -size-width 6 -units INCHES -resolution 300 PIXELS_PER_INCH Print information about the size of the output image for the second scene (no image file is created) using a width of 4.5 centimeters. wb_command -scene-capture-image myscene.scene 2 test.jpg \ -size-width 4.5 -units CENTIMETERS -print-image-info