AFNI Workshop

From BrainImagingCenter
Revision as of 19:39, 16 March 2009 by Jed.dobson (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Download Software

The latest AFNI release for Linux, Solaris, and Mac OS X can be located here: http://afni.nimh.nih.gov/afni/download/afni/releases/latest

Installing on Mac OS X

Mac OS X - 10.4

  • Obtain correct version of AFNI
  • Extract and move to "Applications":
tar -zxvf macosx_10.4_G5.tgz
mv macosx_10.4_G5 /Applications/afni
  • Add afni directory to your PATH:
echo "PATH=${PATH}:/Applications/afni" >> ~/.profile
  • Install Fink from

http://www.finkproject.org/download/

  • From a terminal window install required libraries
sudo /sw/bin/fink install openmotif3 glib2-dev glib netpbm 
  • Open X11 (/Applications/X11) and then open an xterm
  • Launch AFNI from the xterm

Mac OS X - 10.5

  • Download AFNI and move to Applications (as above)
  • Install fink & libraries
  • I ran into some library issues (i.e. missing) on 10.5/Intel. The fink supplied glib2 is too old. I downloaded the GTK+ framework and then copied the glib2 library from the framework directory to /sw/lib.

DBIC Accounts

If you have a temporary account for the DBIC you will need to login and change your password. To do this please connect to dexter.dartmouth.edu and via ssh and execute the kpasswd command. On a Mac you can open Terminal.app (Applications/Utilities/Terminal.app) and run the following command:

ssh username@dexter.dartmouth.edu

On Windows you can download Putty (putty.exe) from the following URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Once you've connected run kpasswd (which will look something like this):

[jed@eros ~]$ kpasswd
Changing password for 'jed' in cell 'dbic.dartmouth.edu'.
Old password:

Download Datasets and Test Instructions

Download here: ftp://dbic.dartmouth.edu/pub/afni/CD.tgz

  • Installing the latest binaries (and hopefully not having to compile). The current binaries on our website ( http://afni.nimh.nih.gov/afni/download/afni/releases/latest or http://afni.nimh.nih.gov/pub/dist/tgz/ ) are good to go for the workshop. I leave it up to you to figure out which binaries are appropriate for your machines. If you need help on that front, let me know. We usually name the binaries directory ~/abin. If you want to change that you'll need to be sure the final .cshrc reflects that. By the way, we need all users to have csh or tcsh to work with. The simple test to run at this stage is:
$ afni &
$ suma &

Each of these commands will start a GUI. AFNI will open a window with many buttons, SUMA will open a window with some surface displayed in 3D. If AFNI does not launch, we have major problems that must be sorted out. If SUMA does not launch we have significant woes to sort out. If SUMA does launch, there are still some important speed tests to carry out further below. SUMA needs hardware-accelerated OpenGL for it to work well.

    • Download and unpack the data:
$ wget ftp://dbic.dartmouth.edu/pub/afni/CD.tgz
$ tar xfz CD.tgz

That would create a CD directory that has these files/dirs:

        AFNI_data3.tgz   AFNI_data4.tgz
        SUMA_demo.tgz    SUMA_StandardMeshes.tgz
        dotfiles         afni_handouts.tgz
        s1.rm.old.data   s2.cp.files              s3.test

You might put it on a CD, network drive or USB drive. Let me assume that you have it on a USB drive mounted under /mnt/usb/CD.

    • To unpack those files, run the s2.cp.files script, giving it the source and destination directories. For example, this command would run it from the /mnt/usb/CD directory, and extract the packages into the user's home directory:
$ /mnt/usb/CD/s2.cp.files /mnt/usb/CD ~

Note that the last part of the s2.cp.files script copies the .afnirc, .cshrc and .sumarc files into the destination directory. If the destination is not the user's home directory, you will want to make sure that similar files are in the home dir. The old files will be backed up to bak.FILE.

Note also that the included .cshrc file adds $HOME/abin to the path. If that is not where you put the binaries, you will want to adjust it.

If you want to exclude any/all of the dotfiles, just remove them from the 'dotfiles' directory.

    • Test the install. Assuming files were unpacked into the $HOME directory, go under suma_demo/afni and run afni and suma, then have them talk together.
$ cd ~/CD/suma_demo/afni
$ afni -niml &
$ tcsh run_suma &
      • Once suma has loaded the surfaces, hit 't' while over the suma image window.
      • Then open an afni Image, and make sure the surface outlines are there (blue and/or green along the edges of the gray matter, say).
      • To test the rendering speed for OpenGL, press the F12 key in SUMA, which times how long it takes for 20 renderings. The results are echoed to the shell: 10 displays/second is good. 30 is now typical, 5 is something we can live with.
  • Misc points:
    • It is vastly preferable to have windows selected when the mouse moves over them (as opposed to click-to-select).
    • It is vastly preferable to have 3-button mice, and with all of the buttons appropriately activated (see mouse control on macs).
    • Note which program can be used to open the afni_handouts (pdf). E.g. acroread, xpdf, gpdf, ggv, or just 'open'
    • It is useful to verify how the users can cut-and-paste. E.g.
      • [Unix]: left mouse button to select, middle to paste
      • [Mac]: apple-c (to copy), apple-v (to paste)
    • It may be nice to note a text-editor that can be used (on files that do not necessarily end in .txt). E.g. gedit, nedit, xemacs, xedit, TextEdit (wants .txt?)

Schedule

Tues. March 17th
8:30 -- 10:15:	The AFNI interactive interface 	(ZSS)
10:30 -- 12:15:	Linear regression 1 (RWC)
1:30  -- 3:15: 	Linear regression, hands-on(ZSS)
3:30  -- 5:15: 	Volume Registration, Spatial Nomalization, & ROI analyses	(ZSS)

Wed. Mar 18th
8:30 -- 10:15:	Deconvolution 	(ZSS)
10:30 -- 12:15:	Advanced Regression (RWC)
1:30  -- 3:15: 	Experiment Design (RWC, ZSS)
3:30  -- 5:15: 	Hands-on exercises	(ALL)

Thu. Mar 19th
8:30 -- 10:15:	Group Analysis 	(RWC)
10:30 -- 12:15:	A sample analysis, start to finish (ZSS)
1:30  -- 3:15: 	Surface-based analysis & display with SUMA (ZSS)
3:30  -- 5:15: 	Automating AFNI and SUMA (ZSS)
		Hands-on exercises	(ALL)

Friday:
Meetings and consultation with various groups

Remote Access After the Workshop

After the workshop all visiting users will be able to remotely login to the DBIC systems to access files and documents. You can connect to dexter.dartmouth.edu for SCP/SFTP connections. Please email james.e.dobson [AT] dartmouth [DOT] EDU if you have any problems with connecting or access your files.

Wireless Network

There is wireless network access available throughout the campus, including Moore Hall and Rm 434. You should make sure to select the "Dartmouth Public" network instead of "Dartmouth Secure" or any other options.