[Neuroimaging] [PySurfer] When displaying ROI values on the surface, undefined regions are assigned values corresponding to another ROI

Roan LaPlante rlaplant at nmr.mgh.harvard.edu
Sun Jul 5 14:48:07 CEST 2015


Hi Carolyn,

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?

best,

On Sun, Jul 5, 2015 at 12:04 AM, Carolyn Parkinson <
carolyn.parkinson at gmail.com> wrote:

> Hello,
>
> 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
> replaced.
>
> 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
> this?
>
> Thanks very much,
> Carolyn
>
>
> 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_list.append(1)
>     else:
>         roi_data_list.append(0)
> 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
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>


-- 
Roan LaPlante
Athinoula A. Martinos Center for Biomedical Imaging
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150705/f848bbdf/attachment.html>


More information about the Neuroimaging mailing list