| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Mapping Electrode Locations to Average Brains

Page history last edited by David Groppe 1 year, 4 months ago

Tutorial Data:

You can download the data used in the tutorial below from here. These data consists of a FreeSurfer folder for PT001, PT002, and fsaverage. Place the PT001, PT002, and fsaverage folders in your FreeSurfer subjects directory and you should be able to run the commands below after you've run the localization tutorial commands.

 

1. Mapping cortical surface electrodes to the FreeSurfer average brain

To display group results of electrodes on the cortical surface, you can use FreeSurfer's surface based mapping of each individual brain to its average brain. The surface based mapping is derived by trying to align the gyrification patterns of the individual to that of the average and has been shown to be superior to volume-based mapping (i.e., warping the entire brain to that of an average brain) when doing fMRI group analyses (Fischl et al., 1999).

 

Slightly modified version of Figure 1 from Fischl et al. (1999), which illustrates how an individual brain is warped to a group average brain via gyrification patterns.

 

To use this Matlab code you first need to make sure you've downloaded the FreeSurfer average brain and placed it in your FreeSurfer subject folder along with all your patient folders. If you've already installed FreeSurfer on your computer, then you already have the FreeSurfer average brain and do not need to download it again. Then you collect the coordinates of each individual's brain relative to the average brain by doing something like this:

 

>>groupAvgCoords=[];
>>groupLabels=[];
>>groupIsLeft=[];

>>cfg=[];
>>subs={'PT001','PT002'};
>>for a=1:length(subs),
>>    fprintf('Working on Participant %s\n',subs{a});
>>    [avgCoords, elecNames, isLeft]=sub2AvgBrain(subs{a},cfg);
>>    groupAvgCoords=[groupAvgCoords; avgCoords];
>>    groupLabels=[groupLabels; elecNames];
>>    groupIsLeft=[groupIsLeft; isLeft];
>>end

 

To run the above command, download the FreeSurfer folder's for PT001 and PT002 (below) and put them in your FreeSurfer subjects directory: 

PT001

PT002

 

Note that by default, sub2AvgBrain.m shows the electrode coordinates both on the individual's brain and the average brain so that you can check the accuracy of the mapping. For example, the plots for PT001 looks like this:

 

 

Then you plot all the electrodes on the average brain them using a plotElecPial.m:

 

>>cfg=[];
>>cfg.view='l';
>>cfg.elecCoord=[groupAvgCoords groupIsLeft];
>>cfg.elecNames=groupLabels;

 >>cfg.showLabels='n';

>>cfg.title='PT001-2 on Avg. Brain';
>>cfgOut=plotPialSurf('fsaverage',cfg);

 

To get the image below:

 

Finally, for depth electrodes (ignored in the above example) sub2AvgBrain.m maps them to MNI305 space via an affine transformation. These coordinates can also be visualized on the FreeSurfer average brain. For depth electrodes that lie in cortical grey matter, it would be better to use the surface based mapping. You can edit the subject's *.electrodeNames file to make this happen by labeling the cortical depth contacts as subdural electrodes (i.e., change the "D" in its row to an "S").

 

For more information on mapping to and from the MNI and FreeSurfer brains see this paper:

 

Accurate Nonlinear Mapping between MNI Volumetric and FreeSurfer Surface Coordinate Systems

Jianxiao Wu, Gia H Ngo, Douglas Greve, Jingwei Li, Tong He, Bruce Fischl, Simon B. Eickhoff, B.T. Thomas Yeo

bioRxiv 302794; doi: https://doi.org/10.1101/302794

https://www.biorxiv.org/content/early/2018/04/27/302794

 

 

**** GRATITUDE ****

 

Fischl, B., Sereno, M. I., Tootell, R. B. H., & Dale, A. M. (1999). High-resolution intersubject averaging and a coordinate system for the cortical surface. Human Brain Mapping, 8(4), 272–284.

 

 

Comments (0)

You don't have permission to comment on this page.