Getting Data From the UT Philips Scanner

MR data can be sent directly from the Philips scanner to the RAID.
The data will end up in

/Volumes/data2/raw

in a directory name that is made by Vips, the scanner technologist.
Depending on how it is exported from the scanner, the data will be one of three formats:

NiFTI Format

tms_10_10_1.nii

This is the preferred format because it can be read by AFNI directly.

PAR/REC Format

tms_10_10_1.PAR
tms_10_10_1.REC

This is the native Philips format. The PAR file contains the data PARameters. The REC file contains the raw REConstructed data for the entire run.

DICOM format

IM_2048

Each file contains one image, so that one run has thousands of images in it.

Getting Data from other Scanners

Data from other scanners will often be stored in DICOM or other formats. DICOM is the standard file format for storing medical data. Typically each scan is saved in a unique folder and each file represents a single slice. OsiriX is a free DICOM viewer for Macs and can be downloaded from the following URL:

OsiriX can often extract images from DICOM or other formats and write them out to a directory in standard DICOM format.
Then, to3d is used to convert the extracted DICOM files to AFNI BRIK/HEAD files.

Using to3d from the command line

If scanner data is obtained in NiFTI format, then no conversion is necessary (see above). For all other types of scanner data, the program to3d is used to convert the raw data to AFNI BRIK/HEAD files.
The preferred way to run to3d is from the command line, so that all parameters are recorded and the process can be automated.
To see the to3d options check the help file:

to3d –help | more

To process an anatomical dataset, to3d is quite simple because there is only one timepoint.

This creates an AFNI BRIK/HEAD named CD anat from the anatomical DICOM images in the current directory and places them in the "session" directory.
AFNI reads information about the images from the DICOM header so that the voxel size and image origin is automatically correct in the BRIK/HEAD file.

To process a functional dataset, to3d if more complicated because we must tell it how many timepoints there were (this information is NOT in the DICOM header). Here is the to3d command to create a BRIK/HEAD from a functional run of DICOM images.

Using to3d from the GUI interface

If all of the necessary arguments to create a BRIK/HEAD file are given from the command line, then to3d will create the BRIK/HEAD file and finish.
If some arguments are missing, then to3d will display a GUI.
For instance, simply go to the directory containing the raw DICOM files and type
to3d *
from the correct folder. Below is a picture of the GUI interface with the most commonly edited options highlighted. Note that the bottom right of the window includes buttons to view the images, save the dataset, and quit. Normally to3d reads the variable information from the DICOM headers and nothing needs to be changed. Only the filename prefix needs to be set.

Averaging Anatomical Scans Using AFNI

To register all the anatomicals to the space of the anatomical closest in time to the functional data (generally anatr1), this is with just two anatomical's: