Skip to content

Commit e8483f0

Browse files
committed
STY: Better doc
1 parent bbece3d commit e8483f0

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

doc/documentation/split_brain.rst

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,40 @@
33
Working with a split-screen brain
44
=================================
55

6-
Placeholder
6+
The split-screen view can be activated by using the argument ``hemi='split'``.
7+
This will put views of the left hemisphere in consecutive vertical frames
8+
on the left, and views of the right hemisphere in consecutive vertical
9+
frames on the right. For example, running the following::
10+
11+
brain = Brain('fsaverage', 'split', 'inflated',
12+
views=['lat', 'med', 'ven'])
13+
14+
Will produce a window with two columns (hemispheres) and three rows (the
15+
lateral, medial, and vental views, respectively).
16+
17+
Adding and displaying data
18+
--------------------------
19+
20+
Data can be added to either hemisphere using the same functions that are
21+
normally used, e.g. ``add_data``, ``add_overlay``, ``add_morphometry``.
22+
The objects are automatically shown on all views of the brain.
23+
24+
Note that the ``show_view`` method accepts arguments for the ``row`` and
25+
``col`` values, which allow the user to control which ``Brain`` panel
26+
gets the updated view.
27+
28+
Caveats
29+
-------
30+
The multi-view support is available thanks to the capabilities of the
31+
TraitsUI framework. However, due to some limitations in the implementation
32+
of TraitsUI, there is no guarantee that a set of scripted commands will
33+
result in a painted window when the user may think it will. For
34+
example, making a series of calls to ``brain.add_label()`` followed by
35+
``brain.save_image('out.png')`` may result in some or all of the labels
36+
being absent from the saved ``out.png``. While we have implemented some
37+
workarounds to help prevent this occurrance, we cannot guarantee it will
38+
work. Thus we recommend that for critical non-interactive plotting (e.g.,
39+
if scripting figure generation for a paper) only a single view is used
40+
with ``hemi`` set to ``'lh'``, ``'rh'``, or ``'both'``. This will use a single,
41+
pure Mayavi window, thereby bypassing TraisUI entirely -- this helps
42+
guarantee that drawing commands result in updated visual display.

0 commit comments

Comments
 (0)