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:
Argument | Action |
---|---|
-v | load a volume file |
-l | load a label file |
-dti | load one or more dti volumes |
-f | load a surface |
-w | load 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:
Command | Action |
---|---|
Alt + N | Navigate Tool |
Ctrl + E | Recon Edit Tool |
Alt + E | Voxel Edit Tool |
Ctrl + F | Toggle all surfaces |
Alt + C | Alternate between volumes/surfaces |
Ctrl + P | Toggle left side menu |
Ctrl + T | Point set edit |
Ctrl + R | Reset View |
Alt + X | Show sagital images |
Alt + Y | Show axial images |
Alt + Z | Show coronal images |
Alt + A/D | Decrease/Increase opacity of currently highlighted volume |
Ctrl + D | Hide brainmask |
Alt + F | Toggle currently highlighted surface |
Alt + U | Show cursor |
You’ll find other shortcuts under this link. I’ll copy the most useful ones here for convenience:
Command | Action |
---|---|
Ctrl + S | Save |
Ctrl + Z | Undo |
Ctrl + Q | Exit Freeview |
Ctrl + O | Load Volume |
Up/Down Arrow Keys or PageUp/PageDown | Change slice |
Scroll or Drag-Right-Click | Zoom In/Zoom Out |
Ctrl + Up/Down/Left/Right (arrow keys) | Moving volume (Panning) |
Alt + V | Toggle currently highlighted volume |
Shift-Drag Left Click | Adjust Contrast/Brightness |
Zoom in at current location | Ctrl-Left-Click (or scroll) |
Zoom out at current location | Ctrl-Right-Click (or scroll) |
When you’re in Voxel/Recon/ROI edit mode:
Command | Action |
---|---|
Draw / Fill | Left Click |
Erase / Erase Fill | Shift+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.