|
|
|
|
Developed to provide an environment for FMRI data analyses |
|
And a platform for development of new software |
|
AFNI refers to both the program of that name and the entire
package of programs and plugins (more than 100) |
|
Important principles in the development of AFNI: |
|
Allow user to stay close to the data and view it in many
different ways |
|
Allow users to assemble pieces in different ways to make
customized analyses |
|
ÒProvide mechanism, not policyÓ |
|
Allow other programmers to add features that can interact
with the rest of the package |
|
|
|
|
|
|
Basic unit of data in AFNI is the dataset |
|
A collection of 1 or more 3D arrays of numbers |
|
Each entry in the array is in a particular spatial location
in a 3D grid (a voxel) |
|
Image datasets: each array holds a collection of slices
from the scanner |
|
Each number is the signal intensity for that particular
voxel |
|
Derived datasets: each number is computed from other
dataset(s) |
|
e.g., each voxel value is a t-statistic reporting
ÒactivationÓ significance from an FMRI time series dataset, for that voxel |
|
Each 3D array in a dataset is called a sub-brick |
|
There is one number in each voxel in each sub-brick |
|
|
|
|
|
Different types of numbers can be stored in datasets |
|
8 bit bytes (e.g., from grayscale photos) |
|
16 bit shorts (e.g., from MRI scanners) |
|
Each sub-brick may also have a floating point scale factor a attached, so that the ÒtrueÓ value in each voxel is
actually a×(value in dataset file) |
|
32 bit floats (e.g., calculated values) |
|
24 bit RGB color triples (e.g., from your digital camera!) |
|
64 bit complex numbers (e.g., for the physicists in the
room) |
|
Different sub-bricks are allowed to have different numeric
types |
|
But this is not recommended |
|
Will occur if you ÒcatenateÓ two dissimilar datasets
together (e.g., using 3dTcat or 3dbucket commands) |
|
|
|
|
|
Besides the voxel values, a dataset also contains auxiliary
information, including (some of which is optional): |
|
xyz dimensions of each voxel (in mm) |
|
Orientation of dataset axes; |
|
for example, x-axis=R-L, y-axis=A-P, z-axis=I-S |
|
Þ axial slices |
|
Location of dataset in scanner coordinates |
|
Needed to overlay one dataset onto another |
|
Time between sub-bricks, for 3D+time datasets |
|
Such datasets are the basic unit of FMRI data (one per
imaging run) |
|
Statistical parameters associated with each sub-brick |
|
e.g., a t-statistic has the degrees-of-freedom parameter
stored |
|
|
|
|
|
AFNI formatted datasets are stored in 2 files |
|
The .HEAD file holds all the auxiliary information |
|
The .BRIK file holds all the numbers in all the sub-bricks |
|
Datasets can be in one of 3 coordinate systems (AKA views) |
|
Original data or +orig view: from the scanner |
|
AC-PC aligned or +acpc view: |
|
Dataset rotated so that the anterior commissure and
posterior commissure are horizontal, the AC is at (x,y,z)=(0,0,0), and the
hemispheric fissure is vertical |
|
Talairach or +tlrc view: |
|
Dataset has been rescaled to have its 12 sub-regions
conform to the Talairach-Tournoux atlas |
|
Talairach or Stererotaxic coordinates |
|
Not quite the same as MNI coordinates, but close |
|
|
|
|
AFNI dataset filenames consist of 3 parts |
|
The user-selected prefix (almost anything) |
|
The view (one of +orig, +acpc, or +tlrc) |
|
The suffix (one of .HEAD or .BRIK) |
|
Example: BillGates+tlrc.HEAD and BillGates+tlrc.BRIK |
|
When creating a dataset with an AFNI program, you supply
the prefix; the program supplies the rest |
|
AFNI programs can read datasets stored in several formats |
|
ANALYZE (.hdr/.img file pairs); i.e., from SPM, FSL |
|
MINC (.mnc); i.e., from mnitools |
|
CTF (.mri, .svl) MEG analysis volumes |
|
NIfTI-1 (.nii) Ñ a new standard format that AFNI, SPM, FSL,
and BrainVoyager have agreed upon |
|
ASCII text (.1D) Ñ numbers arranged into columns |
|
|
|
|
|
Datasets are stored in directories, also called sessions |
|
All the datasets in the same session, in the same view, are
presumed to be aligned in xyz-coordinates |
|
Voxels with same value of (x,y,z) correspond to same brain
location |
|
Can overlay (in color) any one dataset on top of any other
one dataset (in grayscale) from same session |
|
Even if voxel sizes and orientations differ |
|
Typical AFNI contents of a session directory are all data
derived from a single scanning session for one subject |
|
Anatomical reference (SPGR or MP-RAGE volume) |
|
10-20 3D+time datasets from EPI functional runs |
|
Statistical datasets computed from 3D+time datasets,
showing activation (you hope and pray) |
|
Datasets transformed from +orig to +tlrc coordinates, for
comparison with datasets from other subjects |
|
|
|
|
AFNI runs on Unix systems: Linux, Sun, SGI, Mac OS X |
|
Can run under Windows with Cygwin Unix emulator |
|
If you are at the NIH: SSCC can install AFNI and update it
on your system(s) |
|
You must give us an account with ssh access |
|
You can download precompiled binaries from our Website |
|
http://afni.nimh.nih.gov/afni |
|
Also: documentation, message board, humor, É |
|
You can download source code and compile it |
|
AFNI is updated fairly frequently, so it is important to
update occasionally |
|
|
|
|
|
Start AFNI from the Unix command line |
|
afni reads
datasets from the current directory |
|
afni dir1 dir2 É
reads datasets from directories listed |
|
afni -R reads
datasets from current directory and from all directories below it |
|
AFNI also reads a file named .afnirc from your home
directory |
|
Used to change many of the defaults |
|
Window layout and image/graph viewing setup; popup hints;
whether to compress .BRIK files |
|
cf. file README.environment in the AFNI documentation |
|
Also can read file .afni.startup_script to restore the
window layout from a previous run |
|
Created from Define Datamode->Misc->Save Layout menu |
|
cf. file README.driver for what can be done with AFNI
scripts |
|
|
|
|
|
Batch mode programs |
|
Are run by typing commands directly to computer, or by
putting commands into a text file (script) and later executing them |
|
Good points about batch mode |
|
Can process new datasets exactly the same as old ones |
|
Can link together a sequence of programs to make a
customized analysis (a personal pipeline) |
|
Some analyses take a long time |
|
Bad points about batch mode |
|
Learning curve is Òall at onceÓ rather than gradual |
|
If you are, like, under age 35, you may not know how to
type commands into a computer |
|
At least we donÕt make you use punched cards |
|
|
|
|
Many important capabilities in AFNI are only available in
batch programs |
|
A few examples (of more than 100, from trivial to complex) |
|
3dDeconvolve = multiple linear regression on 3D+time
datasets, to fit each voxelÕs time series to a model and then test fits for
significance |
|
3dvolreg = 3D+time dataset registration, to correct for
small subject head movements |
|
3dANOVA = 1-, 2-, 3-, and 4- way ANOVA layouts, for
combining datasets in Talairach space |
|
3dcalc = general purpose voxel-wise calculator |
|
3dclust = find clusters of activated voxels |
|
3dresample = resample a dataset to a new grid orientation
and/or voxel size |
|
|
|
|
A plugin is an extension to AFNI that attaches itself to
the interactive AFNI GUI |
|
Not the same as a batch program |
|
Offers a relatively easy way to add certain types of
interactive functionality to AFNI |
|
A few examples: |
|
Draw Dataset = ROI drawing |
|
Render [new] = volume renderer |
|
Dataset#N = lets you plot multiple 3D+time datasets as
overlays in an AFNI graph viewer |
|
Histogram = plots a histogram of a dataset or piece of one |
|
Edit Tagset = lets you attach labeled Òtag pointsÓ to a
dataset (e.g., as anatomical reference markers) |
|
|
|
|
|
SUMA is the AFNI surface mapper |
|
For displaying surface models of the cortex |
|
Surface models come from FreeSurfer (MGH) or SureFit (Wash
U) |
|
Can display functional activations mapped from 3D volumes
to the surface |
|
Can draw ROIs on the cortical surface |
|
SUMA is a separate program from AFNI, but can ÒtalkÓ to
AFNI so that volume and surface viewing are linked |
|
Click in AFNI or SUMA to change focus point, and the other
program jumps to that location at the same time |
|
Functional overlay in AFNI can be sent to SUMA for
simultaneous display |
|
And much more Ñ stayed tuned for the SUMA talks to come! |
|
|
|
How to get images into AFNI |
|
Detailed hands-on with using AFNI for data viewing |
|
Signal modeling and analysis: theory and hands-on |
|
Image registration |
|
Volume rendering hands-on |
|
ROI drawing hands-on |
|
Transformation to Talairach hands-on |
|
Group analysis: theory and hands-on |
|
SUMA hands-on and Surface-based analysis |
|
Miscellaneous AFNI utility programs and plugins |
|
A tour of the AFNI Website |