Skip to content

Freesurfer

Anthony Dick edited this page Jan 7, 2020 · 11 revisions

Using Freesurfer on the HPC

To use Freesurfer on the HPC, you first have to log into the Visualization Node.

Next, you need to load the module.

  • Example: module load freesurfer/dcnlab

Next, you need to source the set up script.

  • Example: source /home/applications/freesurfer_dcnlab/SetUpFreeSurfer.sh

Next, you need to set the subjects directory. This is the directory containing the subject folders.

  • Example: Change directory to the directory you want. e.g., cd /home/data/dcnlab/AHEAD/freesurfer_v6 or cd /scratch/adick/tutorial

Then, set the environment variable to the current directory.

  • For bash: export SUBJECTS_DIR=${PWD}
  • For tcsh: setenv SUBJECTS_DIR ${PWD}

Open Freeview

You can open Freeview by typing freeview and then using the GUI. However, it is recommended to load the views you want from the command line:

  • Example
freeview -v 4150694/mri/brainmask.mgz \
4150694/mri/wm.mgz:colormap=heat:opacity=0.27 \
-f 4150694/surf/lh.white:edgecolor=black \
4150694/surf/lh.pial:edgecolor=yellow \
4150694/surf/rh.white:edgecolor=black \
4150694/surf/rh.pial:edgecolor=yellow \
4150694/surf/rh.inflated:visible=0 \
4150694/surf/lh.inflated:visible=1