FreeSurfer Software Suite is an open source software suite for processing and
analyzing (human) brain MRI images. FreeSurfer applications include: Skullstripping, Image Regisitration, Subcortical Segmentation, Cortical
Surface Reconstruction, Cortical Segmentatoin, Cortical Thickness Estimation,
Longitudinal Processing, fMRI Analysis, Tractography, FreeView Visualization
GUI, and much more!
This page is designed to show users how to submit batch jobs on the SCC for the FreeSurfer reconstruction application recon-all and how to access the FreeView
GUI for viewing/editing brains. For further instructions on FreeSurfer processing
pipelines, please see the tutorial materials on the Developer Site.
FreeSurfer versions 4.5, 5.1, 5.3, and 6.0 are available on SCC and scc-lite
through BU ENG-IT software distribution. Batch processing is only accessible
on SCC (not scc-lite). The FreeView GUI works best when using
VNC with OpenGL on SCC (details below).
Recon-all performs all, or any part of, the FreeSurfer cortical
reconstruction process. In order to call recon-all on multiple subjects
in parallel on SCC, a starter script scc-recon-all.qsub has been provided
and should be called as:
Please make sure to open scc-recon-all.qsub and edit your Project (line 5),
number of subjects (line 26), and SUBJECTS_DIR (line 33) before submitting.
[clarkdc@scc1:scv]$ vim scc-recon-all.qsub
1 #!/bin/bash -l
3 #<-- MANDATORY USER EDIT HERE -->
4 # Set SCC project
5 #$ -P scv
7 # Specify hard time limit for the job.
8 # The job will be aborted if it runs longer than this time.
9 # The default time is 12 hours
10 #$ -l h_rt=15:00:00
12 # Request a node with minimum 4 GB of memory per core as recommended by freesurfer
13 #$ -l mem_per_core=4G
15 # Send an email when the job finishes or if it is aborted (by default no email is sent).
16 #$ -m ea
18 # Give job a name
19 #$ -N recon-all
21 # Combine output and error files into a single file
22 #$ -j y
24 #<-- MANDATORY USER EDIT HERE -->
25 # Submit an array job with N tasks
26 #$ -t 1-2
28 # Load desired version of freesurfer
29 module load freesurfer/6.0
31 # <--- MANDATORY USER EDIT HERE --->
32 # Set environment variables
33 export SUBJECTS_DIR=/usr3/bustaff/clarkdc/freesurfer/SUBJECTS_DIR/
Note: This script calls recon-all from FreeSurfer 6.0. In order to
change versions, please change the module load freesurfer/6.0 command to the
Create a VNC Password
If you have not used VNC on SCC, you must create a password.
Create a VNC with OpenGL Session
From SCC, run the "qvgl" command to create VNC with OpenGL session. Read the
instructions and take special note of the command printed under "on your local
workstation run:" to be run in the next step.
Waiting for immediate job to be scheduled.
on your local workstation run:
ssh firstname.lastname@example.org -L XXXX:localhost:5911
then execute vncviewer to connect to localhost port XXXX
to run an OpenGL application on a hardware GPU use vglrun command
to quit the job please run:
Forward the VNC Port
From a local computer, open a new terminal and setup port forwarding for the
hostname and port advertised in the VirtualGL session info. Note that for the
local port, I have choosen port 7000 in place of "XXXX".
From your local computer, use a VNC client to connect to the forwarded port. Use
the password you created with "vncpasswd" in step 1 as the password. The image
below is "MobaXterm VNC" on Windows, but any standard client should work with similar settings.
In the VNC window, open "Terminal", load the FreeSurfer module to set up the
FreeSurfer environment, and use vglrun to run FreeView.
"Terminal" can be found in Applications > System Tools > Terminal
Document written by Dustin Clark on 10/13/2017. Last modified on 10/13/2017.
Note: Research Computing Services (RCS) example programs are provided
"as is" without any warranty of any kind. The user assumes the entire risk of
quality, performance, and repair of any defects. You are encouraged to copy
and modify any of the given examples for your own use.