1. Freesurfer Course Personal Laptop Setup

This page describes how to setup a personal laptop for usage in the Freesurfer course. Note that these instructions are targeted at Mac users, but its possible to use a Linux laptop, assuming you know how to adapt the instructions below.

1.0.1. Hardware/Software Requirements

1.0.2. Setup

pico .cshrc

then copy and paste the following text into the editor:

# exit if not an interactive shell
if ($?USER == 0 || $?prompt == 0) exit

alias dir "ls -alF"

xset b off

setenv PATH "/sbin:/usr/sbin:/usr/local/bin":"$PATH"
if ( -e $HOME/bin) then
  setenv PATH "$HOME/bin":"$PATH"
endif

# define path to mac mini server NFS mount of apps and data.
set MYOS=(leopard)
set NFSAPPS=(/mnt/macmini/apps)
set MYNAME=(gust)
set NFSDATA=(/mnt/macmini/RW_tutorial_data)

#
# FSL
#
if ( -e $NFSAPPS/$MYOS/fsl) then
  setenv FSLDIR $NFSAPPS/$MYOS/fsl
else
  if ( -e /usr/local/fsl) then
    setenv FSLDIR /usr/local/fsl
  endif
endif

#
# Freesurfer and FS-FAST
#
# data...
if ( -e $NFSDATA/$MYNAME/buckner_data ) then
  setenv TUTORIAL_DATA $NFSDATA/$MYNAME
else
  if ( -e /Applications/freesurfer/subjects/buckner_data/tutorial_subjs ) then
    setenv TUTORIAL_DATA /Applications/freesurfer/subjects
  endif
endif
if ( $?TUTORIAL_DATA ) then
  setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs
  setenv FSFTUTDIR $TUTORIAL_DATA/fsfast-tutorial.subjects
endif
# binaries...
if ( -e $NFSAPPS/$MYOS/freesurfer/SetUpFreeSurfer.csh ) then
  setenv FREESURFER_HOME $NFSAPPS/$MYOS/freesurfer
else
  if ( -e /Applications/freesurfer/SetUpFreeSurfer.csh ) then
    setenv FREESURFER_HOME /Applications/freesurfer
  endif
endif
# setup...
if ( $?FREESURFER_HOME ) then
  setenv FSF_OUTPUT_FORMAT nii.gz
  source $FREESURFER_HOME/SetUpFreeSurfer.csh
  echo "FSFTUTDIR         $FSFTUTDIR"
endif

#
# MATLAB
#
if ( -e $NFSAPPS/matlab/bin ) then
  setenv MATLABPATH $NFSAPPS/matlab
else
  if ( -e /usr/local/matlab/bin ) then
    setenv MATLABPATH /usr/local/matlab
  endif
endif
if ( $?MATLABPATH ) then
  setenv PATH "$MATLABPATH/bin":"$PATH"
endif

#
# Diffusion Toolkit and TrackVis
#
if ( -e $NFSAPPS/$MYOS/dtk ) then
  setenv DTK_HOME $NFSAPPS/$MYOS/dtk
else
  if ( -e /usr/local/dtk ) then
    setenv DTK_HOME /usr/local/dtk
  endif
endif
if ( $?DTK_HOME ) then
  setenv PATH "$PATH":"$DTK_HOME"
endif

-------- freesurfer-Darwin-leopard-i686-stable-pub-v5.1.0 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /mnt/macmini/apps/leopard/freesurfer
FSFAST_HOME       /mnt/macmini/apps/leopard/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /mnt/macmini/RW_tutorial_data/gust/buckner_data/tutorial_subjs
MNI_DIR           /mnt/macmini/apps/leopard/freesurfer/mni
FSL_DIR           /mnt/macmini/apps/leopard/fsl
FSFTUTDIR         /mnt/macmini/RW_tutorial_data/gust/fsfast-tutorial.subjects

actually, you will only see the /mnt/macmini path when connected at the course. otherwise, you will see /Applications/freesurfer.

cd /
sudo mkdir -p /mnt/macmini

you will be prompted for your user password.

nfs://192.168.2.1:/Users/Shared

and in the Mount location box, type:

/mnt/macmini

then click Verify. it will say that it cant find it, but thats ok, just continue without verifying. we'll check that it works at the start of the course.

That is all. We can also do this the day of the course. Note that the .cshrc file will direct all binaries and data to use our mac mini server, so you dont need to install Freesurfer if you dont want to. Its also possible for you to copy all the tutorial data to your local hard disk if you want to take it home with you. It consumes 55GB though.


2012-06-20 21:20