| AFNI & FSL Interoperation
|
|
AFNI is a set of C
programs for processing, analyzing, and displaying FMRI data. It runs
on Unix+X11+Motif systems, including SGI, Solaris, Linux, and Mac OS
X. It is available free (in C source code format, and some precompiled
binaries) for research purposes.
One of AFNI's particular strengths is that it is a powerful display
tool. Bob Cox has very kindly made some changes in AFNI which make it
very easy to view FSL output, in particular, FEAT output, using
AFNI. You can easily:
- View thresholded or unthresholded FEAT stats images,
colour-overlaid onto lowres (example_func.hdr), structural
(highres.hdr) or standard-space (standard.hdr) images, without having
to transform the stats images, because AFNI understands the
registration transforms saved in the FEAT directory.
- View thresholded or unthresholded FEAT stats images,
colour-overlaid onto the filtered 4D data (filtered_func_data.hdr),
and view time series by clicking on the coloured stats
overlays.
To get this working, download and install the latest version of
AFNI. Then:
- feat2afni <featdirectory.feat> (this is a short
script necessary for FEAT5 analyses which makes links to certain files
in the FEAT directory for AFNI to use - it will probably not be
necessary once we have finished working with Bob Cox on the
interoperation of AFNI and FSL).
- cd <featdirectory.feat>
afni
- Load in an Anatomy image (eg example_func.hdr) by
pressing Switch Anatomy (don't select by double-clicking;
click once then press
Set). Press one or more Image buttons.
- To view voxel intensity at the crosshair, you have to open all
Image views and have the Define function view open. Then
the value is displayed.
- Load in a stats image (eg thresh_zstat1.hdr) by
pressing Switch Function. Press See Function.
- To make the colour overlay transparent press the down-arrow next to
the 9 on an image viewer.
- To view stats overlaid on either highres or standard press
Switch Anatomy and select the apropriate image.
- To view time series, load in filtered_func_data.hdr using
Switch Anatomy and press one or more Graph buttons.
- To view a histogram of the current anatomical image, press
Define Datamode -> Plugins -> Histogram.
- If you create a new image in a directory after starting afni, to
get afni to realise it's there, you must press Define Datamode
-> Rescan -> This.
- To create an image mask using AFNI: Load in an anatomical image by
pressing Switch Anatomy. Press all three Image buttons.
Press Define Datamode -> Plugins -> Draw Dataset. Press
Choose Dataset and select your anatomical image. Set the
Drawing Value to a value greater than the maximum value in your
image. Set Drawing Mode to Filled Curve. Draw on any of the
three Images using the middle mouse button. To undo the previous
drawing click Undo in the AFNI Editor window (you can only undo
one previous fill). Save the mask by clicking Save As in the
AFNI Editor window (suppose you choose grot; your file will get
saved as grot+orig.BRIK). To convert your mask from afni to
analyse format run afni2avw grot+orig from the command line.
To remove the background brain image and binarise your mask run
avwmaths grot+orig -thr <val> -bin grot+orig from the
command line, where the threshold value used is just below the value
you filled the mask with.
Written by S. Smith