Differences between revisions 22 and 23
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
Please select the instructions for the type you downloaded:
 * [[LinuxInstall|Linux Installation]]
Line 36: Line 34:
 * [[MacOsInstall|Mac OS X Installation]] '''Linux:'''
Line 38: Line 36:
 * [[Installation/FreeSurferVirtualImage|FreeSurfer Virtual Image Installation using VirtualBox]] Installing freesurfer on Linux systems involves simply extracting the contents of the .tar.gz file somewhere on your machine. Installing into the directory {{{/usr/local}}} is recommended. For example:
Line 40: Line 38:
== Set Up & Configuration ==
Set the default shell to be permanently switched to tcsh by typing the following in a terminal window and then pressing enter:
Line 43: Line 39:
chsh -s /bin/tcsh $> tar -C /usr/local -xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz
Line 46: Line 42:
Set up your shell's configuration file ('''.tcshrc''') so that !FreeSurfer is sourced every time you open a new terminal window. You can do this by adding the two commands in the box below to any part of the .tcshrc file. Use pico or any other text editor to create a .tcshrc file or to open the .tcshrc file and make this change (i.e. type "pico .tcshrc" on the command-line). '''Mac:'''
Line 48: Line 44:
Installing freesurfer on Mac systems involves simply double clicking the .dmg file and clicking thru the steps. The default installation location is in the {{{/Applications}}} directory. For more detailed instructions, please see the following [[MacOsInstall#SetupandConfiguration|step-by-step]].


== Setup & Configuration ==

To begin using !FreeSurfer, you must define and evironment variable called '''{{{FREESURFER_HOME}}}''' which is set to the location !FreeSurfer was installed, and then source the setup script:

'''Linux:'''
Line 49: Line 53:
setenv FREESURFER_HOME <freesurfer_installation_directory>/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.csh
## bash
$> export FREESURFER_HOME=/usr/local/freesurfer
$> source $FREESURFER_HOME/SetUpFreeSurfer.sh

## tcsh
$> setenv FREESURFER_HOME /usr/local/freesurfer
$> source $FREESURFER_HOME/SetUpFreeSurfer.csh
Line 53: Line 62:
**''Where <freesurfer_installation_directory> is replaced with the location you installed !FreeSurfer (e.g., /Applications/freesurfer).''
Line 55: Line 63:
To save your changes in pico, hit Ctrl+x to exit and then type 'y' and press enter to save the changes. '''Mac:'''
{{{
export FREESURFER_HOME=/Applications/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh
}}}
Line 57: Line 69:
Is done correctly, you should see output similar to this:
Line 58: Line 71:
To check that you have done everything correctly, open a new terminal window. You should see output similar to this:
Line 68: Line 80:
If you see the above, it means the !SetUpFreeSurfer.csh script was sourced successfully. == License ==
A license key must be obtained to make the !FreeSurfer tools operational. Obtaining a license is free and comes in the form of a license.txt file. Once you obtain the license.txt key file, copy it to your !FreeSurfer installation directory. This is also the location defined by the '''{{{FREESURFER_HOME}}}''' environment variable.
Line 70: Line 83:
If any warnings appear, it's usually safe to ignore them, but make sure that they are not stating that a file or directory that should exist cannot be found. If any error messages appear, check that the installation process was successfully completed.

== License ==
You must register to obtain a license key [[https://surfer.nmr.mgh.harvard.edu/registration.html|here]]. The license is free but your !FreeSurfer installation will not work without it.

Once you register, you will be emailed the license key. This license key needs to be saved in a text file in the location where you installed !FreeSurfer. To do this, open a new terminal window and type each line of command below (hit enter after each line):
{{{
cd $FREESURFER_HOME
pico license.txt
}}}

Copy and paste the text between the "CUT HERE" lines in the license email onto the blank screen (which is the text file called license.txt). To save your changes in pico, hit Ctrl+x to exit and then type 'y' and press enter to save the changes.
[[https://surfer.nmr.mgh.harvard.edu/registration.html|Follow this link to obtain a license key.]]
Line 99: Line 101:
If you encounter problems with your installation or have any questions about !FreeSurfer, you can post those questions to the listserv after you sign up [[http://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer|here]].

== Get Started! ==
=== Practice data & commands ===
We highly recommend downloading the [[https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Data|tutorial dataset]] and learning !FreeSurfer with our guided tutorials. You can find the list of tutorials on our course wiki, under the [[https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial#CourseSchedule|Course Schedule section]]. Here, you will also find slides from our most recent lecture series with videos of the lectures [[http://www.youtube.com/channel/UCruQerP8aa-gYttXkAcyveA|here]].

=== Preparing to work with FreeSurfer ===
Whenever you want to work with !FreeSurfer, you must make sure three things have happened:
 1. The variable {{{FREESURFER_HOME}}} is set (so your computer knows where !FreeSurfer is installed):
  {{{setenv FREESURFER_HOME <freesurfer_installation_directory>/freesurfer}}}
 1. The !FreeSurfer set up script must be sourced (so !FreeSurfer knows the location of everything it needs):
  {{{source $FREESURFER_HOME/SetUpFreeSurfer.csh}}}
 1. !FreeSurfer has been pointed to a directory of subjects to work on:
  {{{setenv SUBJECTS_DIR /location/of/subjects}}}

If you followed all the Quick Install instructions on this page, you have set it up so all 3 of these things happen automatically when you open a terminal window. However, when working on the tutorial data or on your own data, keep in mind that you may need to redo #3 in order to specify a different set of subjects for !FreeSurfer to work with. You can change the location the {{{SUBJECTS_DIR}}} variable is set to in the {{{$FREESURFER_HOME/SetUpFreeSurfer.csh}}} file or you can run the command listed in step #3 every time you open a new terminal window.

=== Processing your first subject ===
If you have data you would like to process with !FreeSurfer, you can do so using the command {{{recon-all}}}. An example of how to run this command is below:
{{{
recon-all \
  -all \
  -i <one slice in the anatomical dicom series> \
  -s <subject id that you make up> \
}}}

Things to note:
 * -all will run all the steps in the !FreeSurfer processing stream. Alternatively, you can run different parts of the stream.
 * -i stands for input. Here, you would specify one dicom file/slice in the MPRAGE scan series you collected (!FreeSurfer will find the rest of the slices automatically). You could also specify nifti files as input. If you have more than one MPRAGE or input for a given subject, use another -i flag for each one.
 * -s specifies the name of the subject and will create a directory with that name for all the subject's !FreeSurfer output.

The process is complete when the last line printed to the screen (and in the recon-all.log found in the subject's scripts directory) says "recon-all exited without errors". If you run into errors, search the [[http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/|mailing list]] for help or follow the steps in BugReporting.

=== Resources ===
You may find these wiki pages helpful as you get started:
 *[[UserContributions/FAQ|FAQ]]
 *Helpful [[FsTutorial/Scripts|scripts]] to make working with !FreeSurfer easier
 *Complete list of [[https://surfer.nmr.mgh.harvard.edu/fswiki/Tutorials|tutorials]] we offer
 *Complete list of possible [[https://surfer.nmr.mgh.harvard.edu/fswiki/Edits|edits]] that can be made to !FreeSurfer recons (the structural analysis output)
 *Detailed description of our [[https://surfer.nmr.mgh.harvard.edu/fswiki/CorticalParcellation|cortical atlases]]
 *Explanation of how [[https://surfer.nmr.mgh.harvard.edu/fswiki/eTIV|total intracranial volume]] is estimated
If you encounter problems with your installation or have any questions about !FreeSurfer, you can

This page takes you through all the steps necessary for downloading & installing FreeSurfer but lacks the detail and options presented throughout the DownloadAndInstall wiki.

FreeSurfer System Requirements

Summary of Requirements:
Operating System: Linux, Mac OS X, Windows (via VirtualBox)
Processor Speed: 2GHz at least
RAM: 8GB recommended
Graphics card: 3D graphics card with its own graphics memory & accelerated OpenGL drivers
Size of installation package: 8.5GB
Typical size of a processed subject: 370MB
Tutorial dataset size: 18GB
Other requirements: Matlab (only needed to run FS-FAST, the fMRI analysis stream)

Download

Freesurfer 5.3 stable release (ReleaseNotes)

Important Note: It is essential to process all your subjects with the same version of FreeSurfer, on the same OS platform and vendor, and to be completely safe, even the same version of the OS.

OS

Platform

Version

Release Date

Download

Size

Linux

CentOS 6 x86_64 (64b)

stable v5.3.0

15 May 2013

freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz

4.2G

Linux

CentOS 4 x86_64 (64b)

stable v5.3.0

15 May 2013

freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0.tar.gz

4.0G

Linux

CentOS 4 (32b)

stable v5.3.0

15 May 2013

freesurfer-Linux-centos4-stable-pub-v5.3.0.tar.gz

3.8G

Mac

Lion OX X 10.7 (64b Intel)

stable v5.3.0

15 May 2013

freesurfer-Darwin-lion-stable-pub-v5.3.0.dmg

3.5G

Mac

SnowLeopard OS X 10.6 (32b Intel)

stable v5.3.0

15 May 2013

freesurfer-Darwin-snowleopard-i686-stable-pub-v5.3.0.dmg

3.2G

Virtualbox

Xubuntu 12.04

stable v5.3.0

15 Aug 2013

freesurfer-Virtualbox-linux-x86-stable-pub-v5.3-full.vdi.gz

9.0G

Development Version:
The most recent build of FreeSurfer can be download from here.

Installation

Linux:

Installing freesurfer on Linux systems involves simply extracting the contents of the .tar.gz file somewhere on your machine. Installing into the directory /usr/local is recommended. For example:

$> tar -C /usr/local -xzvf freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz

Mac:

Installing freesurfer on Mac systems involves simply double clicking the .dmg file and clicking thru the steps. The default installation location is in the /Applications directory. For more detailed instructions, please see the following step-by-step.

Setup & Configuration

To begin using FreeSurfer, you must define and evironment variable called FREESURFER_HOME which is set to the location FreeSurfer was installed, and then source the setup script:

Linux:

## bash
$> export FREESURFER_HOME=/usr/local/freesurfer
$> source $FREESURFER_HOME/SetUpFreeSurfer.sh

## tcsh
$> setenv FREESURFER_HOME /usr/local/freesurfer
$> source $FREESURFER_HOME/SetUpFreeSurfer.csh

Mac:

export FREESURFER_HOME=/Applications/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh

Is done correctly, you should see output similar to this:

Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /usr/local/freesurfer
FSFAST_HOME     /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii
SUBJECTS_DIR    /usr/local/freesurfer/subjects
MNI_DIR         /usr/local/freesurfer/mni

License

A license key must be obtained to make the FreeSurfer tools operational. Obtaining a license is free and comes in the form of a license.txt file. Once you obtain the license.txt key file, copy it to your FreeSurfer installation directory. This is also the location defined by the FREESURFER_HOME environment variable.

Follow this link to obtain a license key.

Test your FreeSurfer Installation

Close any terminal windows you have open and then open a new one.

Copy and paste this command into the terminal window:

freeview -v $SUBJECTS_DIR/bert/mri/brainmask.mgz \
-v $SUBJECTS_DIR/bert/mri/aseg.mgz:colormap=lut:opacity=0.2 \
-f $SUBJECTS_DIR/bert/surf/lh.white:edgecolor=yellow \
-f $SUBJECTS_DIR/bert/surf/rh.white:edgecolor=yellow \
-f $SUBJECTS_DIR/bert/surf/lh.pial:annot=aparc:edgecolor=red \
-f $SUBJECTS_DIR/bert/surf/rh.pial:annot=aparc:edgecolor=red

The above command will open the freeview GUI and the subject named 'bert' which comes with your FreeSurfer installation and can be used as an example for what FreeSurfer output should look like.

Sign up for the Mailing List

If you encounter problems with your installation or have any questions about FreeSurfer, you can

DownloadAndInstall (last edited 2024-02-21 02:20:31 by buildqa)