# Summary of AFNI capabilities

*AFNI* is an environment for processing and displaying
functional MRI data. It was designed and written at MCW, largely by
RW Cox, starting in 1994. *AFNI* runs under
Unix+X11+Motif systems, including SGI and Linux. It now comprises
over 100,000 lines of C source code, and its capabilities are
continually being extended. In addition, a skilled C
programmer can add interactive and batch functions to *AFNI*
with relative ease.

*AFNI* refers both to the interactive program of that name,
and to the entire software package. The basic unit of data storage
is the "3D dataset", which consists of one or more 3D arrays of
voxel values (bytes, shorts, floats, or complex numbers), plus some
control information stored in a header file.

*AFNI* Built-in
Functions

Just the most obvious ones (much of the "fun" of *AFNI* comes
from finding the unobvious functions):

- Switch viewing/analysis between many different datasets.
- Image display in axial, sagittal, and/or coronal views (including multi-image montages).
- Display of graphs (line and surface) of data extracted from image viewers.
- Time series graphing of square regions from image viewers.
- Linked image/graph viewing of multiple 3D datasets (e.g., linked scrolling through multiple brains).
- Transformation to Talairach coordinates (12 sub-volume piecewise linear method).
- Computation of activation maps using the "correlation method".
- Color overlay of activation maps onto higher-resolution anatomical images (resampling of lower-resolution functionals is handled on the fly).
- Interactive thresholding of functional overlays.

**Command Line Programs**

These programs are often used in batch processing scripts. They
take as input 3D *AFNI* datasets, and compute new 3D datasets
as output. The results can then be displayed or further processed
with the interactive *AFNI* program.

-- Program to create a 3D*to3d**AFNI*dataset from image data.-- Program to average or otherwise merge multiple 3D datasets.*3dmerge*-- Program to do voxel-by-voxel*3dttest**t*-tests on 3D datasets.,*3dANOVA*, and*3dANOVA2*-- This series of program performs 1-way, 2-way, and 3-way ANOVA tests across a collection of 3D datasets, on a voxel-by-voxel basis.*3dANOVA3*-- Multiple linear regression across a collection of 3D datasets.*3dRegAna*,*3dFriedman*,*3dKruskalWallis*, and*3dMannWhitney*-- This series of programs carries out various nonparametric statistical analyses across a collection of 3D datasets, on a voxel-by-voxel basis.*3dWilcoxon*-- Multiple linear regression of a 3D+time series, including linear deconvolution to find an ideal response vector for each voxel.*3dDeconvolve*-- Nonlinear regression of a 3D+time series. The nonlinear time series model functions can be anything programmable in C. Twelve sample model functions are supplied with the*3dNLfim**AFNI*source code.-- Use multiple linear regression to remove unwanted components from voxel time series in a 3D+time dataset.*3dDetrend*-- Compute the correlation coefficient between 2 datasets (voxel-wise)*3dTcorrelate*-- General purpose 3D dataset calculator program.*3dcalc*-- Program to smooth voxel time series.*3dTsmooth*-- Program to calculate statistics of voxel time series.*3dTstat*-- Program to calculate the mean of a collection of datasets.*3dMean*-- Program to do Fourier filtering of 3D+time datasets along the time axis.*3dFourier*-- Program to do Wavelet filtering of 3D+time datasets along the time axis.*3dWavelets*-- Implements the "correlation method" on a 3D+time series.*3dfim*-- Implements the "correlation method" on a 3D+time series, with many additional output options.*3dfim+*-- Program to find spatially contiguous clusters of above-threshold voxels.*3dclust*-- Program to resample an ROI mask from one grid spacing to another.*3dfractionize*-- Program to compute statistics of voxels selected by an ROI mask.*3dmaskave*-- Program to print out values of voxels selected by an ROI mask.*3dmaskdump*-- Program to create a dataset from a list of voxel coordinates and values.*3dUndump*-- Program to compute statistics of each of a collection of ROIs defined by a mask dataset.*3dROIstats*-- Program to compute which voxels are nonzero in an entire collection of datasets.*3dOverlap*-- Program to compute principal components from multiple 3D datasets.*3dpc*-- Program to calculate the correlation coefficient between two 3D volumes.*3ddot*-- Cluster voxels together based on similarities in parameter vectors (e.g., from*3dStatClust**3dNLfim*).-- Program to rotate the volumes in a 3D dataset.*3drotate*-- Program to do 2D (slice-wise) registration of a 3D+time series.*2dImReg*-- Program to do 3D volume registration of a 3D+time series.*3dvolreg*-- Program that*3dAnatNudge**tries*to align SPGR and EPI datasets.-- Program to align 3D volumes based on "tags" manually set using*3dTagalign**plug_tag*.-- Utility program to time-shift voxel time series to the same temporal origin.*3dTshift*-- Utility program to catenate multiple 3D+time series files into one.*3dTcat*-- Utility program to catenate 3D volumes into one big "bucket".*3dbucket*-- Utility program to extract 3D volumes from a "bucket" dataset.*3dbuc2fim*-- Utility program to extract a histogram of a 3D dataset.*3dhistog*-- Utility program to print out information about a 3D dataset.*3dinfo*-- Utility program to attach notes to a dataset header file, and to retrieve them for reading.*3dNotes*-- Utility program to edit the header information about a 3D dataset.*3drefit*-- Utility program to add planes of zeros to the edges of a 3D dataset.*3dZeropad*-- Utility program to interpolate a dataset to a new slice thickness.*3dZregrid*-- Utility program to cut up a dataset in the slice (z) direction.*3dZcutup*-- Utility program to assemble datasets in the slice (z) direction.*3dZcat*-- Utility program to count number of "outliers" in a 3D+time dataset.*3dToutcount*-- Utility program to measure "quality" of a 3D+time dataset.*3dTqual*-- Utility program to generate random 3D+time series datasets from nonlinear model equations; used for testing*3dTSgen**3dNLfim*and other analysis codes.-- Simulates noise-only 3D+time series and activation detection therefrom, in order to estimate the probability of false positives. Used when analytical estimates for this*AlphaSim**p*-value are unavailable.-- Resample a functional dataset to the Talairach coordinate grid defined by an anatomical "parent".*adwarp*-- Reorient the slices in a dataset to be in a standard axial order.*3daxialize*-- Remove the "scalp" from a T1-weighted high-resolution anatomical dataset.*3dIntracranial*The following utility programs make certain tasks easier:

-- Utility program to generate an "ideal" response function for use with the correlation method (or other regression analyses).*waver*-- Utility program to evaluate an arithemetic expression at a set of evenly spaced points in time.*1deval*-- Quick and dirty graph of a 1D array of numbers read from an ASCII file.*1dplot*-- Calculate FFT of a 1D array of numbers.*1dfft*-- Catenate 1D files together into a multi-column file.*1dcat*-- Utility program to scan a floating point file for illegal values (Infinity and NaN).*float_scan*,*2swap*, and*4swap*-- Utility programs to swap byte pairs and quads; useful when transferring data between computers with different "endian-ness".*24swap*-- Generates random stimulus timeseries functions.*RSFgen*-- Print information from the header of a dataset.*3dAttribute*-- Estimate the value to clip off "air" voxels.*3dClipLevel*-- Convert a MINC file to an*3dMINCtoAFNI**AFNI*dataset-- Convert an*3dAFNItoANALYZE**AFNI*dataset to ANALYZE files-- Rename*3drename**AFNI*datasets-- Copy*3dcopy**AFNI*datasets

**Interactive AFNI
Plugins**

Plugins are a way to add functionality to

*AFNI*without modifying the core software. There is a 40 page programming manual to aid in the creation of new plugins.

-- Interactive version of*plug_clust**3dclust*.-- Make a copy of a dataset (useful for subsequent editing/drawing).*plug_copy*-- Interactive version of*plug_deconvolve**3dDeconvolve*.-- Hilbert transform estimation of time delay in active voxels.*plug_delay_V2*-- Draw values into a dataset (used to create ROI masks).*plug_drawdset*-- Helps choose ROIs based on anatomy.*plug_roiedit*-- Interactive version of*plug_edit**3dmerge*(voxel value editing functions).-- Plot histogram of one dataset 3D array.*plug_histog*-- 2D (slice-wise) image registration.*plug_imreg*-- Interactive linear least squares regression on time series data.*plug_lsqfit*-- Interactive version of*plug_maskave**3dmaskave*(statistics from an ROI).-- Interactive nonlinear least squares regression on time series data.*plug_nlfit*-- Power spectrum estimation from a 3D+time series.*plug_power*-- Real-time image acquisition, registration, and activation maps. (Program*plug_realtime**rtfeedme*is used to simulate real-time imaging, and will transmit images into this plugin in lieu of a scanner.)-- Volume rendering of 3D datasets, with color functional overlay.*plug_render*-- Compute some voxel-by-voxel statistics of a 3D+time series.*plug_stats*-- Put "tags" into a dataset, as markers for points of interest (cf.*plug_tag**3dTagalign*)-- Interactive version of*plug_volreg**3dvolreg*(volume registration).-- Reorder a 3D+time dataset; useful for analysis of "event-related" FMRI data.*plug_reorder*-- Plugin version of*plug_fourier**3dFourier*.-- Plugin version of*plug_fourier**3dFourier*.-- Plugin version of*plug_wavelets**3dWavelets*.-- Plugin to view/edit text Notes attached to a dataset.*plug_notes*