Skip to content

Commit 22d55df

Browse files
committed
Merge pull request #139 from aestrivex/allow_brain_without_x_offset
Allow brain without x offset
2 parents 7faeabc + 14b1099 commit 22d55df

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

surfer/viz.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ class Brain(object):
317317
variable.
318318
views : list | str
319319
views to use
320+
offset : bool
321+
If True, aligs origin with medial wall. Useful for viewing inflated
322+
surface where hemispheres typically overlap (Default: True)
320323
show_toolbar : bool
321324
If True, toolbars will be shown for each view.
322325
offscreen : bool
@@ -333,8 +336,8 @@ class Brain(object):
333336
def __init__(self, subject_id, hemi, surf, curv=True, title=None,
334337
cortex="classic", size=800, background="black",
335338
foreground="white", figure=None, subjects_dir=None,
336-
views=['lat'], show_toolbar=False, offscreen=False,
337-
config_opts=None):
339+
views=['lat'], offset=True, show_toolbar=False,
340+
offscreen=False, config_opts=None):
338341

339342
# Keep backwards compatability
340343
if config_opts is not None:
@@ -370,7 +373,7 @@ def __init__(self, subject_id, hemi, surf, curv=True, title=None,
370373
n_row = len(views)
371374

372375
# load geometry for one or both hemispheres as necessary
373-
offset = None if hemi != 'both' else 0.0
376+
offset = None if (not offset or hemi != 'both') else 0.0
374377
self.geo = dict()
375378
if hemi in ['split', 'both']:
376379
geo_hemis = ['lh', 'rh']

0 commit comments

Comments
 (0)