Skip to main content

Freeview from FreeSurfer

·547 words·3 mins
Table of Contents

FreeSurfer is an open source software package for the analysis and visualization of structural and functional neuroimaging data. It is developed by the Laboratory for Computational Neuroimaging at the Athinoula A. Martinos Center for Biomedical Imaging. It’s a really useful tool that allows for automated processes as well as manual interventions, mainly through it’s GUI, Freeview.

I started using FreeSurfer and Freeview last year and, albeit the documentation being quite thorough, I had a harder time navigating the website than I expected.

So here are a few tricks to make your handling FreeSurfer’s GUI, Freeview, easier and faster!

Starting Freeview
#

You can start freeview by just typing freeview in your command line and then opening the files you want. Of course, you will be far better off if you write a small script with your usual calls.

The command options available for Freeview are:

ArgumentAction
-vload a volume file
-lload a label file
-dtiload one or more dti volumes
-fload a surface
-wload waypoints

I have the following script saved under my subjects/ folder:

export SUBJECT='<subject name>'
freeview -v \
    $SUBJECT/mri/T1.mgz \
    $SUBJECT/mri/wm.mgz \
    $SUBJECT/mri/brainmask.mgz \
    -f \
    $SUBJECT/surf/lh.white:edgecolor=blue \
    $SUBJECT/surf/lh.pial:edgecolor=yellow \
    $SUBJECT/surf/rh.white:edgecolor=blue \
    $SUBJECT/surf/rh.pial:edgecolor=yellow

So, if I want to analyze, let’s say, subject bert’s images, I just open my freeview.sh script with a text editor and change <subject name> to bert (which is this subject’s folder name). Then, I can open a terminal, navigate to my subjects/ folder and type:

./freeview.sh

For more information on how to use the freeview command, type:

freeview --help

You’ll get a list of the available sub-options to make the most out of your image visualization!

All right, we have opened Freeview and we’re ready to start interacting with the GUI!

Keyboard shortcuts!
#

These will save you an amazing amount of time. I have been working with CentOs and a few shortcuts I have found by experimenting are:

CommandAction
Alt + N
navigate
Navigate Tool
Ctrl + E
recon_edit
Recon Edit Tool
Alt + E
voxel_edit
Voxel Edit Tool
Ctrl + FToggle all surfaces
Alt + CAlternate between volumes/surfaces
Ctrl + PToggle left side menu
Ctrl + TPoint set edit
Ctrl + RReset View
Alt + XShow sagital images
Alt + YShow axial images
Alt + ZShow coronal images
Alt + A/DDecrease/Increase opacity of currently highlighted volume
Ctrl + DHide brainmask
Alt + FToggle currently highlighted surface
Alt + UShow cursor

You’ll find other shortcuts under this link. I’ll copy the most useful ones here for convenience:

CommandAction
Ctrl + SSave
Ctrl + ZUndo
Ctrl + QExit Freeview
Ctrl + OLoad Volume
Up/Down Arrow Keys or PageUp/PageDownChange slice
Scroll or Drag-Right-ClickZoom In/Zoom Out
Ctrl + Up/Down/Left/Right (arrow keys)Moving volume (Panning)
Alt + VToggle currently highlighted volume
Shift-Drag Left ClickAdjust Contrast/Brightness
Zoom in at current locationCtrl-Left-Click (or scroll)
Zoom out at current locationCtrl-Right-Click (or scroll)

When you’re in Voxel/Recon/ROI edit mode:

CommandAction
Draw / FillLeft Click
Erase / Erase FillShift+Left Click

That concludes this short tutorial about Freeview! If you want to read/know more, the full Freeview Guide can be found here. Also, check out this cool Freeview demo.