FreeSurfer Tools Tutorial

The tutorial below is meant to introduce you to several tools that are used by the FreeSurfer Development team.

To use any FreeSurfer tool first you must source the FreeSurfer environment that you want to use. To source the development environment, open a terminal window and type the following (if you highlight it and copy it instead, click the middle mouse button to paste in the terminal window):

source  /usr/local/freesurfer/nmr-dev-env


Freeview is an editing tool similar to Tkmedit described below. It is mostly used to label high resolution ex vivo images and to view diffusion data.

To look at some high res ex vivo data using freeview, do the following:

cd   /autofs/space/rainbow_002/users/hires/FHS19_ec_amyg_032808/mri/flash
freeview  -v  flash20_ec_amyg_100um_avg.mgz

This will probably take awhile to load and may even take awhile before it even opens. Once the file name appears in the left window and the loading bar (bottom right) has stopped, click on File and choose Load Volume. Click on the folder icon and find the file called HP_06232009CP.mgz. Hit Open and then OK. Once this finishes loading click on its name in the left window (under the "Volumes" tab) so it is highlighted. Below that window, find where it says Color Map and switch it from Grayscale to Lookup Table.

You are looking at part of the left hemisphere of an ex vivo brain scanned at 100um (microns) or .10 mm. At the top of the window are several buttons you can click on to see what they do. If you click on Help then choose Quick Reference Guide you'll find some information about how to navigate with the mouse. Try out all the options you can.

You can scroll through the slices by using the Page Up or Page Down button and you can zoom in or out by sliding the scroll button of your mouse. If you are using the default 2x2 view, mouse over a quadrant to select which axis you are scrolling along (you can follow your progress by watching the bottom-right corner). At some point in your scrolling you'll see the labeled hippocampus. This is an example of the kind of labeling that may be done on high resolution ex vivo images. Choose the 1x1 view to really be able to see the detail. Click on the buttons that look like small MRIs to see the different views of the brain. Hovering over a colored section of the label will show you its name in the window below.

To create a new label, go to File then choose New Volume. Type in a name for your new volume. The template volume should be the ex vivo scan (flash20_EC_100um_avg). Hit OK. Again, find where it says Color Map and switch it from Grayscale to Lookup Table.

Click on the Voxel Edit button which is the second button from the left on the top of the window. If you hover over it, it should say Voxel Edit. A Drawing box will appear. There are many different options here to choose from. The first three options on the top are Freehand, Polyline, and Fill. Use Freehand or Polyline to outline the parts of the hippocampus. Use Fill to fill in what you have outlined. Give it a try and see what they do. Your Reference should be the name you gave your new volume.

Under the Lookup Table, there are many parts of the brain to choose from. The numbers that one who is labeling the hippocampus are to be concerned with are between 201 and 221. Once you have identified a part on the slice, find it in the Lookup Table and label it. If there are any imperfections while labeling, hold shift while clicking the mouse to erase. You can always adjust the transparency of your labeling to see the original volume by changing the Opacity level on the bar to the left.

When finishing one slice, use the Copy and Paste buttons in the Edit tab on the top bar to copy your slice to the next one or the one before.


For an intro to tkmedit, see the TkMeditGuide.


For an intro to tksurfer, see the TkSurferGuide.

ToolsTutorial (last edited 2009-12-22 20:06:33 by AllisonStevens)