[FSL] [TitleIndex] [WordIndex

Prerequisites

Before you install FSL you should first ensure that you have the X11 windowing system installed. Mac OS X 10.5-10.7 come with this pre-installed, but on Apple's OS X 10.8 you will need to install the version available from the XQuartz web page (you'll almost certainly need X11 later for things other than FSL anyway). The FSL install script will warn you if it is unable to find X11 on your computer.

Note for Yosemite (10.10) users: even if you have previously installed X11, you will need to either reinstall XQuartz or fix symlinks (sudo ln -s /opt/X11 /usr/X11R6 ; sudo ln -s /opt/X11 /usr/X11) to get FSL to work.

FSL Install Script

The fslinstaller.py script carries out the installation of FSL, configuring your environment to enable you to run FSL from your terminals.

if you use Mathworks' MATLAB it will configure your startup.m file to allow you to use the FSL MATLAB functions and on OS X platforms it will also install FSLView into /Applications.

Running the installer (on Mac or Linux)

Administrative privileges may be required

Installation into certain folders on your computer (eg the default, /usr/local) may require administrative privileges. If this is the case, the installer will attempt to gain these privileges through the use of the sudo command, which will require you to enter your password for verification. If you don't have any rights to use sudo (an administration account on OS X) then the installer will fail and will need to be run as the root user. Should you install as root see the configuring your account for FSL section for details on how to use the installer to setup your user account for FSL.

The installer requires access to the internet to be able to download the FSL software appropriate for your platform and runs from within a terminal session, so you need to open a terminal:

  • Linux (Centos)
    • The Terminal application can be found in Applications > System Tools > Terminal menu

  • Mac
    • The Terminal application can be found in /Applications/Utilities

In the terminal change to the folder containing the downloaded file and run it; assuming that you wish to install into /usr/local (the default) then just press the Return key when the installer asks where to install to. For example if you downloaded to your Downloads folder:

cd ~/Downloads
python fslinstaller.py

Once the install completes Linux users should log out (System > Log out) and log back in to complete the FSL setup. If you are accessing the Linux computer via a remote SSH session then close the SSH session and re-login. Apple OS X users should open a new terminal window to begin using FSL.

Checking the installation

Test that the environment and command line tools are set up correctly by doing the following:

  • Start a new Terminal session (File > Open Terminal under Linux/Gnome, Shell > New Window on Mac OS X)

  • Check that your environment is correct by typing:
    echo $FSLDIR
    
    This should display the name of the directory that you installed FSL in.
  • Check that your path is correct by typing:
          flirt -version
    
    which should display a line like:
          FLIRT version 6.0
    (although the version number might be different).

In general, to run the FSL tools from the command line (within a terminal) you need to enter the program name in lower case (e.g. bet). Typing a command on its own (without any arguments or options) gives you a help message for that command.

A more complete test of the FSL installation can be run, if desired, by using the testing and evaluation suite FEEDS.

Running the GUIs

To run a GUI version of a program you can either type its capitalised name with an additional '_gui' appended in the terminal (e.g. Bet_gui), or you can start the main FSL GUI by just typing fsl.

If this doesn't work the see the FAQ for how to go about fixing this, otherwise you are ready to run FSL.


Advanced usage

Using FSL MATLAB libraries

The fslinstaller script sets this up for you so you should not need to do this. However, if the installer cannot configure MATLAB for some reason you may need to do this by hand.

FSL ships with several Matlab scripts for loading NIFTI files. These libraries are dependant on FSL environment variables which aren't set in the OS X Desktop environment, so won't run in a Matlab session started from the /Applications/MATLAB.app launcher. You can configure MATLAB by adding the following to your ~/matlab/startup.m file (create it if it doesn't already exist) (assuming FSL is installed in /usr/local!):

setenv( 'FSLDIR', '/usr/local/fsl');
fsldir = getenv('FSLDIR');
fsldirmpath = sprintf('%s/etc/matlab',fsldir);
path(path, fsldirmpath);
clear fsldir fsldirmpath;

Manual installation

  1. Use the installer to download the install file
    • python fslinstaller -o
      
  2. Verify the download
    • The installer reports the expected MD5 sum for the download.
    • Open up a Terminal (you can find this application in the Utilities folder inside the Applications folder).

    • In the terminal, change to the directory where you downloaded the FSL distribution (it will be the folder you were in when you ran the installer, e.g.
      cd ~/Downloads
      
    • Check the file with
      md5 fsl-5.*-macosx.tar.gz
      
    • The hexadecimal number should match that reported after the download.
  3. Unpack the FSL distribution
    • In the terminal, change to the directory where you want FSL installed, e.g.
      cd /usr/local
      
    • Unpack the fsl download file - for example, if you downloaded it onto your Downloads folder,

      tar -zxvf ~/Downloads/fsl-*-macosx.tar.gz
      

      (omit the z in the -zxvf if your computer has already uncompressed the tarfile for you). This will create a directory called fsl in the current directory which will contain all the required files for FSL and FSLView. Note that you might need to add sudo to the start of the tar command if you don't automatically have the right to create files in /usr/local.

  4. Install the applications
    • To get a double-clickable FSLView application, open a file browser in the top-level fsl directory, e.g.
      open /usr/local/fsl
      

      and alt-cmd-drag the fslview.app directory into your Applications folder - the Finder will display an curly arrow when you do this to signify you are creating a link to the original program.

  5. Configure your shell

For more information on controlling the installer, run it with the -h option - there are options for downloading the install files without installation (for example for installing on multiple computers) and specifying the installation location.

Downloading the install file without installing the software

If you have to install FSL on many computers, or perhaps on a machine that doesn't have access to the internet then you can use the installer to download the FSL distribution for later use. To do this, run the installer with the -o option:

python fslinstaller.py -o

This will download the install package to the current folder and print the expected MD5 checksum for this file to the screen. To install this downloaded file, use the -f and -C options, eg:

python fslinstaller.py -f fsl-centos6_54.tar.gz -C `MD5sum`

replacing MD5sum with the hexadecimal number printed when you downloaded the file.

Scripting installation

If your computers have access to the internet then you can automate the installation process using the -q and -d options to prevent questions being asked and to specify the install location respectively. Where they cannot access our download site then you can download the install file as above and then use the -q, -d, -f and -C options with appropriate values to fully automate the install. For more details run the installer with the -h option.


2017-04-20 13:28