HOME | SCANNING | RESOURCES | PUBLICATIONS | PEOPLE | SCHEDULE

Image Pre-processing at the fMRI lab 

(um-stream7 and um-stack02)



UM_STACK02 functions (for the structural images)

1. The first step is to convert the files from the GE header format to an Analyze single file.  The output file name is something like "t1overlay.img"

2. The image is now filtered to remove the dielectric effect (this means that we get larger flip angles and therefore different signal intensity at the center of the image).  We use Kalina Kristoff's spm_homocor.m.  The image name is now "et1overlay.img"

3. The images are now converted to NIFTI format.  The image name is now "ht1overlay.nii"

4. The skull is removed to facilitate the normalization process (some times the images are acquisred with fat saturation, other times they are not.  To work around the discrepancies between images and the standard templates we simply remove the scalp from the images and from teh template.  There is a scalped template here ).  The scalping is done usinf BET from the FSL library.  The image name is now "eht1overlay.nii"

---------

UM-STREAM7 functions (for the BOLD time series):

1. The first thing the script does is to build a directory structure for storing the data.  The data are stored in the following directory structure for a given subject whose ID is "subjectID":

./subjectID/func 
./subjectID/func/run_01
./subjectID/func/run_02
 .... etc.
This is where the functional BOLD weighted data goes.  They are organized by run ( a run is defined as a time series of images collected at a constant TR without stopping the scanner).  Each run directory contains the initial reconstructed images, physio corrected images, slice timing corrected images, realigned images.
./subjectID/phys This is where the physiological data are stored in the cases where it is collected (typically in functional connectivity analyses)
./subjectID/anatomy This is where the structural images are stored.  Typically this means T1 weighted overlay images and T1 weighted high resolution SPGR images.
./subjectID/raw The raw k-space files ("Pfiles") are stored here.  If anything goes wrong, this is where we go back to in order to rebuild the data.

2. The raw Pfiles are filtered to remove "white pixel artefact" if present.  (White pixel artefacts are large spikes in the k-space data that lead to a stripe pattern superimposed on the reconstructed images).

3. The data are reconstructed into images.  The reconstruction incorporates field map correction to reduce susceptibility artefacts.  (more info here soon).  The output file is called "run_01.nii" for the first run, "run_02.nii" for the second ...etc.

4. If physiological data are collected, they are used at this stage to remove physiological artefacts from the time course using the RETROICOR algorithm (Hu et al:  Magn Reson Med 34, 201-212 (1995).  Pfeuffer et al Magn Reson Med 47, 344-353 (2002)).  The output file name is now "prun_01.nii".

5. The next step is to correct the images for the difference in the acquisition time of each slice.  Typically the slices are collected sequentially from bottom to top, so the bottom slice was collected almost one full TR before the top slice.  In this step, we shift them in time to align them with the first (bottom) slice.  We use "slicetimer" from the FSL library .   The output file name is now "aprun_01.nii"

6. The images are next realigned.  The stream looks for the 10th image in the first run for reference.  We use "mcflirt" from the FSL library with the following parameters:

        mcflirt -in tmp -out rtmp -refvol 0 -cost normcorr -verbose 1 -stats -plots -mats

The output file name is now "raprun_01.nii"

----
Note that the output of all these steps is in NIFTI format.  In a nutshell, the whole time series are stored in a single file sequentially, and a header (348 or 352 bytes long) is pre-pended to the file. The images names end in .nii.   Here is a matlab program to convert from NIFTI to 4D Analyze format.

Click here for more information on How to normalize

Back to the Lab