eelbrain.plot._brain_object.Brain
- class eelbrain.plot._brain_object.Brain(subject, hemi, surf='inflated', title=None, cortex='classic', alpha=1.0, background='white', foreground='black', subjects_dir=None, views='lat', offset=True, show_toolbar=False, offscreen=False, interaction='trackball', w=None, h=None, axw=None, axh=None, name=None, pos=None, source_space=None, show=True, run=None)
PySurfer
Brain
subclass returned byplot.brain
functionsPySurfer
surfer.Brain
subclass adding Eelbrain GUI integration and methods to visualize data inNDVar
format.- Parameters:
subject (str) – Subject name.
hemi ('lh' | 'rh' | 'both' | 'split') – ‘both’: both hemispheres are shown in the same window; ‘split’: hemispheres are displayed side-by-side in different viewing panes.
surf (str) – Freesurfer surface mesh name (ie ‘white’, ‘inflated’, etc.).
title (str) – Title for the window.
cortex (str, tuple, dict, or None) –
Specifies how the cortical surface is rendered. Options:
The name of one of the preset cortex styles:
'classic'
(default),'high_contrast'
,'low_contrast'
, or'bone'
.A color-like argument to render the cortex as a single color, e.g.
'red'
or(0.1, 0.4, 1.)
. Setting this toNone
is equivalent to(0.5, 0.5, 0.5)
.The name of a colormap used to render binarized curvature values, e.g.,
Grays
.A list of colors used to render binarized curvature values. Only the first and last colors are used. E.g., [‘red’, ‘blue’] or [(1, 0, 0), (0, 0, 1)].
A container with four entries for colormap (string specifiying the name of a colormap), vmin (float specifying the minimum value for the colormap), vmax (float specifying the maximum value for the colormap), and reverse (bool specifying whether the colormap should be reversed. E.g.,
('Greys', -1, 2, False)
.A dict of keyword arguments that is passed on to the call to surface.
alpha (float in [0, 1]) – Alpha level to control opacity of the cortical surface.
background (matplotlib colors) – color of the background and foreground of the display window
foreground (matplotlib colors) – color of the background and foreground of the display window
subjects_dir (str | None) – If not None, this directory will be used as the subjects directory instead of the value set using the SUBJECTS_DIR environment variable.
offset (bool) – If True, aligs origin with medial wall. Useful for viewing inflated surface where hemispheres typically overlap (Default: True)
show_toolbar (bool) – If True, toolbars will be shown for each view.
offscreen (bool) – If True, rendering will be done offscreen (not shown). Useful mostly for generating images or screenshots, but can be buggy. Use at your own risk.
interaction (str) – Can be “trackball” (default) or “terrain”, i.e. a turntable-style camera.
w (int) – Figure width and height.
h (int) – Figure width and height.
axw (int) – Width and height of the individual viewing panes.
axh (int) – Width and height of the individual viewing panes.
name (str) – Window title (alternative to
title
for consistency with other Eelbrain figures).pos (tuple of int) – Position of the new window on the screen.
show (bool) – Currently meaningless due to limitation in VTK that does not allow hidden plots.
run (bool) – Run the Eelbrain GUI app (default is True for interactive plotting and False in scripts).
Notes
The documentation lists only the methods that Eelbrain adds to or overrides from the PySurfer
Brain
super-class. For complete PySurfer functionality see te PySurfer documentation.
Methods
|
|
|
Add a mask shading areas that are not included in an NDVar |
|
Add data layer form an NDVar |
|
Add annotation from labels in an NDVar |
|
Draw a boolean NDVar as label. |
|
Add a map of p-values as data-layer |
|
Close the figure window |
Copy the currently shown image to the clipboard |
|
|
Find source space vertice by right-clicking on the brain |
|
Retrieve the current time |
|
|
|
Create an FMText Image from a screenshot |
|
Link the time axis of this figure with another figure |
|
Play an animation by setting time |
|
Plot a colorbar corresponding to the displayed data |
|
Plot legend for parcellation |
|
Remove data shown with |
|
Remove labels shown with |
|
Save view from all panels to disk |
|
Set view to parallel projection |
|
Set image size in pixels |
|
|
|
Set the time point to display |
|
Set the window title |
|
Change the colormap limits |