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

  • Whenever you search in PBworks, Dokkio Sidebar (from the makers of PBworks) will run the same search in your Drive, Dropbox, OneDrive, Gmail, and Slack. Now you can find what you're looking for wherever it lives. Try Dokkio Sidebar for free.


Overlaying Neuroimaging Data

Page history last edited by David Groppe 3 years, 6 months 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.