froi: fs-fast roi



Installation of froi, while not a walk in the park, should not pose difficulties to those who have installed the FS-FAST and Freesurfer distribution. Because of the connection between froi and FS-FAST there is relatively minimal configuration needed to make the tools work.


froi has not been tested on a wide variety of platforms, but there is nothing that should prevent it from working in many places, including almost all Unices such as Linux, xBSD, Darwin, Solaris, and Irix. It was developed on Linux running Matlab 6.5 (R13) with perl version 5.6.1. I assume that it should work for all versions of Matlab that work with FS-FAST and with versions of perl down to 5.2 or so. If you find any version incompatibilities, please let me know.

getting and unpacking the source

  1. You can download the source from the froi website,
  2. Move the file to the directory just above where you want froi to live:

    mv froi-source.tar.gz /usr/local
  3. Unzip the distribution:

    gunzip froi-source.tar.gz
  4. Next untar the archive:

    tar xvf froi-source.tar.gz

You will find a directory called froi. Within this directory is the complete distribution, including some additional modules that need to be installed for froi to work.

installing the perl modules

To help keep the design modular, and to allow future developers a reusable framework, I created Perl modules that abstract a large amount of the code. These modules must be installed in a place that is accessible to the perl scripts that form the basis of the froi analysis.

There are three modules to install (FSFAST::Parse, FSFAST::ROI, and FSFAST::Misc) and the procedure is the same for all.

  1. Unzip and untar the module source:

    gunzip module-name.tar.gz tar xvf module-name.tar.gz

At this point you have two options. If you are the system administrator for this computer, you can do the following to install the module into your system-wide perl module directory:

  1. Build the module and manual page:

    perl make make test
  2. Change to root and install:

    su root make install

If, however, you are not the administrator and/or want to install the software in a non-standard place, you can do the following:

  1. Tell the install script where to put the module; this location must be writable by you:

    perl PREFIX=/place/to/install/module
  2. Build the module and manual page and install:

    make make test make install

At this point the module will exist under /place/to/install/module. To let perl know the module exists, however, you have to do one more thing. You need to set the environment variable $PERLLIB, which differs depending on what shell you are using. For csh or tcsh, put the following in your .environment file:

setenv PERLLIB /place/to/install/module/lib/site_perl/pervar/

where perlvar is your perl version, perhaps 5.6.1.

For other shells, consult the documentation to see how to set environment variables.

You will need to do this for each module in the distribution. Later releases will streamline this into a single-step process.

note: The scripts assume perl is located at /usr/bin/perl; if its not there, you can create a symbolic link from /usr/bin/perl to your actual perl executable, or you can change the shebang lines in each perl script. Again, later releases of froi will automatically determine the location of perl.

setup environment for froi

There are two final steps before you can use froi. First, you have to put the froi scripts in your path. For csh or tcsh, type (replacing the location of froi with your own location):

set path = ( $path /usr/local/froi/bin)

For other shells, consult your documentation.

Finally, you have to tell matlab where to find the scripts. In your home directory there should be a directory called matlab. If it doesnt exist, create it. Within that directory, create or edit a file called startup.m and add the following:

addpath /usr/local/froi/toolbox

Again, replace the location of froi with your own installation directory.

At this point, logout and log back in again and you should be able to use froi!

If you have any problems, send a detailed description of the problem to