My apologies if my blog is a bit slow this week. I have to submit a draft of my qualification exam
proposal by Friday. In the meantime, I thought I'd share some code that I'm using for my draft.
For my thesis, I'm interested in the causal role of the ventrolateral prefrontal cortex (vlpfc) in
suppressing emotional interference. To present the background of research involving the vlpfc, I'm
including a figure that summarizes findings from several articles, and maps their functional
localization of the vlpfc to a common template. For this, I adapt an example from pysurfer. The
output of the demo doesn't appear in the ipython window presumably because its a mayavi window,
so I include a screen shot. If you're running this code yourself, be sure to open your terminal
using the line below.
ipython --gui=wx
%matplotlib inline
%load /Users/Alan/Downloads/plot_foci.py
import os
import os.path as op
from numpy import arange
from numpy.random import permutation
import nibabel as nib
from surfer import Brain
subject_id = "fsaverage"
subjects_dir = '/Applications/freesurfer/subjects'
sf = 0.5
"""
Bring up the visualization.
"""
brain = Brain(subject_id, "rh", "pial", subjects_dir=subjects_dir)
# oei et al
coords = [[52, 30, 4]]
brain.add_foci(coords, color='green', scale_factor=sf, hemi='rh', map_surface='pial')
# zhang et al
coords = [[41, 34, 3]]
brain.add_foci(coords, color='red', scale_factor=sf, hemi='rh', map_surface='pial')
# anticevic et al
coords = [[51, 33, 14]]
brain.add_foci(coords, color='blue', scale_factor=sf, hemi='rh', map_surface='pial')
# ziaei et al
coords = [[46, 28, 16]]
brain.add_foci(coords, color='magenta', scale_factor=sf, hemi='rh', map_surface='pial')
# morey et al
coords = [[51, 20, 21]]
brain.add_foci(coords, color='yellow', scale_factor=sf, hemi='rh', map_surface='pial')
from IPython.display import Image
Image('/Users/Alan/Desktop/Screen Shot 2014-06-09 at 4.22.13 PM.png')
No comments:
Post a Comment