[Neuroimaging] [PySurfer] When displaying ROI values on the surface, undefined regions are assigned values corresponding to another ROI
rlaplant at nmr.mgh.harvard.edu
Sun Jul 5 14:48:07 CEST 2015
I ran your example code but was not able to reproduce the behavior you
describe. Only the frontal region is colored in the output and not the
medial wall. What version of pysurfer are you using?
On Sun, Jul 5, 2015 at 12:04 AM, Carolyn Parkinson <
carolyn.parkinson at gmail.com> wrote:
> I hope this is the right place for this question! The PySurfer site
> directs questions to the NiPy mailing list, which this list appears to have
> I'm using PySurfer to display results from an analysis performed within
> each region of Freesurfer's Desikan-Killiany atlas on the surface.
> However, I've noticed that whatever value is assigned to the ROI
> 'caudalmiddlefrontal' in my results also appears to get mapped to the
> undefined regions of the surface model in the medial view. I've included
> some code below to show what I mean.
> Is there anything that I should be doing differently in order to avoid
> Thanks very much,
> import os
> import numpy as np
> import nibabel as nib
> from surfer import Brain
> # Set parameters
> subject_id = "fsaverage"
> hemi = "lh"
> # Read in the Desikan-Killiany atlas annotation
> aparc_file = os.path.join(os.environ["SUBJECTS_DIR"], subject_id, "label",
> hemi + ".aparc.annot")
> labels, ctab, names = nib.freesurfer.read_annot(aparc_file)
> # Make a list of values to display in each ROI
> # All ROIs but 'caudalmiddlefrontal' are assigned 0
> roi_data_list = 
> for roi in names:
> if roi == 'caudalmiddlefrontal':
> roi_data = np.array(roi_data_list)
> # Make a vector of values corresponding to each vertex
> vtx_data = roi_data[labels]
> # Bring up the visualization
> brain = Brain(subject_id, hemi, "inflated", config_opts = dict(background
> = "white", cortex = 'bone'))
> brain.add_data(vtx_data, -1, 1,colormap = "coolwarm", alpha = .75)
> brain.add_annotation('aparc', borders = 4)
> Neuroimaging mailing list
> Neuroimaging at python.org
> The information in this e-mail is intended only for the person to whom it
> addressed. If you believe this e-mail was sent to you in error and the
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> but does not contain patient information, please contact the sender and
> dispose of the e-mail.
Athinoula A. Martinos Center for Biomedical Imaging
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Neuroimaging