Commit afe9c866 authored by Eric Larson's avatar Eric Larson

ENH: Add auto parc and annot parsing

parent 0129278d
......@@ -11,7 +11,7 @@ print __doc__
from surfer import Brain
brain = Brain("fsaverage", "lh", "pial",
brain = Brain("fsaverage", "both", "pial", views="frontal",
......@@ -19,16 +19,18 @@ Because the morphometry files generated by
recon-all live in a predicatble location,
all you need to call the add_morphometry
method with is the name of the measure you want.
Here, we'll look at cortical curvatuve values.
Here, we'll look at cortical curvatuve values,
and plot them for both hemispheres.
Each of the possible values is displayed in an
appropriate full-color map, but you can also
display in grayscale.
display in grayscale. Here we only plot the
left hemisphere.
brain.add_morphometry("sulc", grayscale=True)
brain.add_morphometry("sulc", hemi='lh', grayscale=True)
The Brain object can only hold one morphometry
......@@ -13,13 +13,15 @@ from surfer import Brain
subject_id = 'fsaverage'
hemi = 'lh'
hemi = 'both'
surface = 'inflated'
view = 'frontal'
Bring up the visualization
brain = Brain(subject_id, hemi, surface,
brain = Brain(subject_id, hemi, surface, views=view,
config_opts={"cortex": "bone",
"background": "ivory"})
......@@ -37,8 +39,11 @@ brain.add_annotation("aparc", borders=False)
You may also provide a full path to an annotation file
at an arbitray location on the disc.
at an arbitray location on the disc. You can also
plot things separately for the left and right hemispheres.
subjects_dir = os.environ["SUBJECTS_DIR"]
annot_path = pjoin(subjects_dir, subject_id, "label", "lh.aparc.annot")
brain.add_annotation(annot_path, hemi='lh', borders=False)
annot_path = pjoin(subjects_dir, subject_id, "label", "rh.aparc.a2009s.annot")
brain.add_annotation(annot_path, hemi='rh', remove_existing=False)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment