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

  • Browse and search Google Drive and Gmail attachments (plus Dropbox and Slack files) with a unified tool for working with your cloud files. Try Dokkio (from the makers of PBworks) for free. Now available on the web, Mac, Windows, and as a Chrome extension!


Overlaying Neuroimaging Data

Page history last edited by David Groppe 2 years ago

The iELVis toolbox can visualize neuroimaging data that has been converted to a FreeSurfer surface file (e.g., an *.mgh file) or a MATLAB *.mat file that contains an mgh.vol variable, which specifies a value for every vertex of the pial surface. The instructions below illustrate how to do the former.


0. Example nii files:

To run the example commands below with PT001 you will need to download the following files:




You also need to download the FreeSurfer folder for PT001 from here and place it in your FreeSurfer subjects directory. You can then run the commands below after you've run the localization tutorial commands.


1. Registering a neuroimaging volume to an individual's FreeSurfer reconstruction:

Create a mapping from the neuroimaging data to the individual's FreeSurfer reconstruction using the FreeSurfer function bbregister by doing something like this:

$bbregister --s PT001 --mov /Applications/freesurfer/subjects/PT001/fmriVolume.nii.gz --reg fmri2mri.dat --fslmat fmri2mri.mat --init-fsl --bold


The mapping produced by the above command is stored in the file fmri2mri.dat.


Check the mapping by running the tkregister command that is produced when bbregister is finished:

$tkregister2 --mov /Applications/freesurfer/subjects/PT001/fmriVolume.nii.gz --reg fmri2mri.dat --surf



2. Creating a FreeSurfer surface file from the neuroimaging volume:

Create surface from volume co-registered to FreeSurfer brain using the FreeSurfer function mri_vol2surf by doing something like this:

$mri_vol2surf --src /Applications/freesurfer/subjects/PT001/handMotorZVol.nii.gz --reg fmri2mri.dat --out handMotorLH.mgh --out_type mgh --hemi lh


Note that you have to do this separately for each hemisphere, like so:

$mri_vol2surf --src /Applications/freesurfer/subjects/PT001/handMotorZVol.nii.gz --reg fmri2mri.dat --out handMotorRH.mgh --out_type mgh --hemi rh



3. Visualizing the neuroimaging data in Matlab

You can now visualize the neuroimaging data (with or with or without electrodes) with the iELVis function plotPialSurf.m by doing something like this:





It can also help to view the data overlayed on the inflated pial surface and thresholded:



Comments (0)

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