FreesurferGoodies - MRC CBU Imaging Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Type the odd characters out in each group: abz2a 125t7 HhHaHh year.s 5433r21 worl3d

location: FreesurferGoodies

FreeSurfer at the CBSU

See here for the general Freesurfer home page and FreeSurfer Wiki.

Refer to this page if you need to set up your Freesurfer environment here at the CBSU.

Here are some freesurfer goodies that you might find useful:

An introduction tutorial to freesurfer by our own Linda Henriksson

A matlab function for semi-automated batch recon-all

Compute the study average cortical surface (the average cortical surface across the subjects in your study):

make_average_subject --subjects   Subject1 Subject2 Subject3 --out myAverage

Draw your own ROIs (labels) on the study average inflated cortical surface:

  • First load the study average inflated cortical surface using tksurfer:

tksurfer myAverage lh inflated -curv
  • Make sure you have no selected vertices.
  • Then make a series of left clicks on the surface to outline the label you want to draw. Then click the "Make Closed Path" button.
  • Click on the Custom fill button, this will bring up a dialog box with several fill options. Click the one that says "Up to and including boundaries" and then click the fill button. This should create a label which you can now save with labels -> save as.

Automatic labeling of your individual subjects from the ROI you have just drawn on the study average cortical surface:


Automating conversion of the high resolution anatomical images extracted by freeSurfer (.mgz format) to a nifti format usable for spm coregistration:


Copying the spm statistical maps used for coregistration from folder to folder (in matlab):


Coregister the freeSurfer and SPM high resolution anatomicals:


Creating the register.dat and the v2r.dat that are needed for the transformation from freeSurfer RAS space to your subject native space


Once you have all the labels you can bring it to SPM space:


A useful tutorial by Michael S. Beauchamp on how to create flat maps

Creating Flat Maps

Let me know if you encounter any problems using this code.