eelbrain.plot._brain_object.Brain.save_image

Brain.save_image(filename, mode='rgb', antialiased=False, fake_transparency=None)

Save view from all panels to disk

Parameters
  • filename (string) – Path to new image file.

  • mode ('rgb' | 'rgba') – 'rgb' to render solid background (default), or 'rgba' to include alpha channel for a transparent background.

  • antialiased (bool) –

    Antialias the image (see mayavi.mlab.screenshot() for details; default False).

    Warning

    Antialiasing can interfere with rgba mode, leading to opaque background.

  • fake_transparency (Optional[Any]) – Use this color as background color and make it transparent. Workaround if mode='rgba' is broken.

See also

screenshot

grab current image as array

Notes

Due to limitations in TraitsUI, if multiple views or hemi=’split’ is used, there is no guarantee painting of the windows will complete before control is returned to the command line. Thus we strongly recommend using only one figure window (which uses a Mayavi figure to plot instead of TraitsUI) if you intend to script plotting commands.