- Like many devices, there are sort of noises contaminating the recorded data.
- Participants are not able to stay still ... obviously.
- Our experiment requires them to perform something that may cause the head to move.
- For the hope to increase confidence in the presence of the BOLD signal changes.
There are basically three sets of data one has to acquire when one performs fMRI-related studies:
- The high-resolution anatomical image. This is a T1-weighted image.
- The functional images in 4D (3D spatial + 1D temporal). These are generally T2* EPI images.
- Local field information if one wants to take into account field inhomogeneity.
Data Preparation
The very first step before any processing is to convert DICOM into the format that your software package is using. SPM8 has its own function to import DICOM > NIfTI format. There is one extremely useful conversion software here by Chris Rorden called dcm2nii. Note: People at the MNI prefers MINC format. We can check the post-conversion images by using any MRI viewer software, for example, FSLView. Once you get the files converted, you do some housekeeping. You have to carefully categorize the files into the appropriate folder. For example: T1 anatomical images can be put separately from the multiple runs of functional datasets.
Once file housekeeping is done, let's preprocess the dataset. To me, the easiest one is to strip the skull from the brain. The skull is not of our interest and it should be removed to simplify the data crunching during the analysis. Apply this step to both the anatomical image and raw EPI images. In addition, you have to remove a few volumes from the raw EPI data. Why? Because the magnetic system requires ~1.5 - 2.0 seconds to reach a steady state.
Head motion detection and correction
Substantial and sudden head motion bring negative effects to image acquisition. First, it contaminates the signal of a particular voxel with the neighboring voxels, making the voxel time series inaccurate. Second, it disrupts the magnetic field homogeneity in the bore that has been adjusted prior to functional scans. Managing head motion should be done before any other signal processing and statistical processes and usually involves the detection and correction or realignment.
Motion detection can be done by first selecting the target or reference volume. The choice of this reference volume can vary. For example: FSL uses the middle volume, AFNI uses either the first or a preselected volume. Often, head motion occurs very abruptly giving rise to spikes or outliers. Such outliers can be identified using a motion outlier script that uses certain metrics, e.g. rms intensity difference between the test and reference volume, or between volume n and n + 1 (DVARS), etc. Once chosen, a threshold to determine an outlier can be found using a boxplot method. Another approach includes a data exploration technique called Independent Component Analysis (ICA) which is more popular for resting-state fMRI. AFNI, though, prefers a different approach called motion scrubbing which means you remove some particular volumes where spikes occur.
Knowing when and how much the movements occur is one thing, but correcting for the contamination is another step. In the "correction" step, all other volumes will go through a 6 DOF rigid body transformation to find the best possible alignment with respect to the reference. The six parameters (or DOF) include 3 XYZ translations and 3 roll/pitch/yaw rotations.
Slice timing correction
To begin, one 3D image is also called a volume and one scan produces a full functional MRI dataset comprising multiple volumes. When analyzing one 3D image it is assumed that all slices are acquired simultaneously. In reality, however, this isn't the case. Rather, slices are obtained sequentially according to a certain slice order. Thus there is bound to shift in the individual time course across voxels of different slices. For example, imagine we did a scan with a TR = 2.5 sec, i.e. it takes 2.5 sec for a volume to be fully acquired. What this means is that the difference in time between the very first and last slice in a volume would be ~ 2.5 sec. The problem is worsened by the way we acquire the slice, e.g. using an interleaved slice acquisition.
The severity of slice time misalignment depends on the repetition time (TR) and paradigm involved. It is usually very important for an event-related design, which may not be that crucial for blocked-design. All software package that I know of has the correction feature. AFNI and FSL use an almost similar basic method of interpolating the time series. Such interpolation follows the way how the excitation happens in the magnet. It can be ascending or descending or interleaves. FSL provides options to do slice timing correction based on custom-made slice-timing data.
Note: Slice time information can be obtained directly from the DICOM header. This can be easily retrieved using a function in Matlab or SPM, but not FSL.
Spatial smoothing (blurring)
This step involves applying a Gaussian kernel to each voxel in a three-dimensional way, which is essentially averaging data points with the neighboring voxels. A Gaussian kernel is a mathematical function that is specified by its width σ (sigma) at half maximum or FWHM, whose center coincides with the voxel center. As a rule of thumb FWHM is selected to be 2x - 3x the voxel size of our functional data, although in practice any value 5-10 mm is very common. Smoothing is also similar to applying a low-pass filter to the original data.
High-pass filtering
This is basically a voxelwise temporal filter to remove unwanted drift and low-frequency components across time that obscure the actual BOLD changes. This drift is inherent in hardware design and the filtering is common ever since PET is used. High-pass filtering also removes the temporal dc value associated with the image. Common software tool such as SPM uses a discrete cosine function added to the General Linear Model (GLM) to model the drift. FSL uses a high-pass Gaussian filter.
What is the cutoff frequency? FSL gurus recommended that the filter period should be 2x or 3x the task duration per block. A cutoff of 100 sec or 0.01 Hz is therefore very common and also long enough to avoid removing meaningful signals. For an event-related design, there is no clear stimulation period. In order to assess what the cutoff should be, one has to analyze the frequency content of the expected activations.
Some practical examples
Okie, I managed to play around with my own data using different preprocessing steps. The data were obtained from Siemens Trio 3T scanner, with TR=1.69 sec EPI sequence, voxel size 2 × 2 × 2 mm. I stick with FSL5.0 as my software tool. Look how each preprocessing step has an impact on the raw EPI image, both for resting-state and task-based scans. The task is as followed. It is a blocked design between "Move" and "Rest". The subject puts her fist in front of her chest and makes repeated upward movements during "Move", and rests her hand on her chest during "Rest". It's clearly shown that a high-pass filter (HPF) removes low-frequency drift and spatial smoothing with σ = 5.0 mm attenuates the signal amplitude. These outcomes are clearly seen in resting-state data when the brain is not engaged in any special task.
What is the output of any fMRI data analyses? It is the statistical map that shows different activated brain regions associated with the task. What is the effect of different FWHM values on our map? Figure 5 below sums up everything by using FSL software package. Only five selected brain slices are shown through the bottom view:
(a) no preprocessing at all: no slice and motion correction, smoothing, and filtering;
(b) with preprocessing, σ = 0 mm;
(c) with preprocessing, σ = 2.0 mm; also refer to filtered EPI image on the right-hand panel.
(d) with preprocessing, σ = 4.5 mm, but without motion correction (MCFLIRT);
(e) with preprocessing, σ = 4.5 mm; the preferred FWHM is twice the voxel width, not too much!
(f) with preprocessing, σ = 15 mm; also refer to filtered EPI image on the right-hand panel.
Skipping motion correction gives a noisy map because it causes many false-positive clusters. Overblurring or oversmoothing the raw data yields to enlarged activation clusters that are most likely false positive.
References
[1] Some course materials from: http://fsl.fmrib.ox.ac.uk/fslcourse/
[2] http://support.brainvoyager.com/functional-analysis-preparation/
[3] Lindquist M. (2008). The statistical analysis of fMRI data. Statistical Science 23: 439–464.
[4] Ashby, F. Gregory. (2011). Statistical Analysis of fMRI Data, 1st ed. MIT Press.
*** Note: There are abundant piles of past literature dealing with each step of the preprocessing pipeline.
Substantial and sudden head motion bring negative effects to image acquisition. First, it contaminates the signal of a particular voxel with the neighboring voxels, making the voxel time series inaccurate. Second, it disrupts the magnetic field homogeneity in the bore that has been adjusted prior to functional scans. Managing head motion should be done before any other signal processing and statistical processes and usually involves the detection and correction or realignment.
Motion detection can be done by first selecting the target or reference volume. The choice of this reference volume can vary. For example: FSL uses the middle volume, AFNI uses either the first or a preselected volume. Often, head motion occurs very abruptly giving rise to spikes or outliers. Such outliers can be identified using a motion outlier script that uses certain metrics, e.g. rms intensity difference between the test and reference volume, or between volume n and n + 1 (DVARS), etc. Once chosen, a threshold to determine an outlier can be found using a boxplot method. Another approach includes a data exploration technique called Independent Component Analysis (ICA) which is more popular for resting-state fMRI. AFNI, though, prefers a different approach called motion scrubbing which means you remove some particular volumes where spikes occur.
Knowing when and how much the movements occur is one thing, but correcting for the contamination is another step. In the "correction" step, all other volumes will go through a 6 DOF rigid body transformation to find the best possible alignment with respect to the reference. The six parameters (or DOF) include 3 XYZ translations and 3 roll/pitch/yaw rotations.
| Fig-1: Example of how motion correction analysis estimates the amount of head movement (by FSL-MCFLIRT). |
Traditionally, we would want to compute the sum of the squared difference between the target and reference images. We would then minimize this or some cost function through iterative procedures or optimization. Once motion parameters for getting the best alignment have been determined, the new and resampled volumes will be created through spatial interpolation. Why? Because we have to recalculate the new voxel values for each volume after the adjustment. Such "correction" parameters are especially useful as regressors in the next pipeline (statistical analysis using GLM). This is usually a list of 6 parameters according to the rigid body transformation. Often, motion outliers are also used as additional regressors, e.g in FSL.
Slice timing correction
To begin, one 3D image is also called a volume and one scan produces a full functional MRI dataset comprising multiple volumes. When analyzing one 3D image it is assumed that all slices are acquired simultaneously. In reality, however, this isn't the case. Rather, slices are obtained sequentially according to a certain slice order. Thus there is bound to shift in the individual time course across voxels of different slices. For example, imagine we did a scan with a TR = 2.5 sec, i.e. it takes 2.5 sec for a volume to be fully acquired. What this means is that the difference in time between the very first and last slice in a volume would be ~ 2.5 sec. The problem is worsened by the way we acquire the slice, e.g. using an interleaved slice acquisition.
The severity of slice time misalignment depends on the repetition time (TR) and paradigm involved. It is usually very important for an event-related design, which may not be that crucial for blocked-design. All software package that I know of has the correction feature. AFNI and FSL use an almost similar basic method of interpolating the time series. Such interpolation follows the way how the excitation happens in the magnet. It can be ascending or descending or interleaves. FSL provides options to do slice timing correction based on custom-made slice-timing data.
Although controversial, the slice timing correction is usually performed after the head motion correction because the overall effect of the first is less severe than the latter.
Note: Slice time information can be obtained directly from the DICOM header. This can be easily retrieved using a function in Matlab or SPM, but not FSL.
This step involves applying a Gaussian kernel to each voxel in a three-dimensional way, which is essentially averaging data points with the neighboring voxels. A Gaussian kernel is a mathematical function that is specified by its width σ (sigma) at half maximum or FWHM, whose center coincides with the voxel center. As a rule of thumb FWHM is selected to be 2x - 3x the voxel size of our functional data, although in practice any value 5-10 mm is very common. Smoothing is also similar to applying a low-pass filter to the original data.
Why do we do spatial smoothing? First, it improves the signal-to-noise ratio. This is related to the assumption that when a voxel is activated, the surrounding voxels are activated as well. Also, we assume the noise of a voxel is not correlated with the noise of the adjacent voxel. Second, it helps to maintain a statistical validity associated with Random Field Theory to solve a multiple comparison problem. Lastly, smoothing is useful during the group-analysis because it improves inter-subject registration by blurring any residual anatomical difference. Risk of overdoing it? The optimal spatial resolution and some desired frequency components are lost if we use too big a kernel. There is also the risk of incorrectly placing the location of the activity or even missing the whole activity itself if it averages out the signal too much.
High-pass filtering
This is basically a voxelwise temporal filter to remove unwanted drift and low-frequency components across time that obscure the actual BOLD changes. This drift is inherent in hardware design and the filtering is common ever since PET is used. High-pass filtering also removes the temporal dc value associated with the image. Common software tool such as SPM uses a discrete cosine function added to the General Linear Model (GLM) to model the drift. FSL uses a high-pass Gaussian filter.
What is the cutoff frequency? FSL gurus recommended that the filter period should be 2x or 3x the task duration per block. A cutoff of 100 sec or 0.01 Hz is therefore very common and also long enough to avoid removing meaningful signals. For an event-related design, there is no clear stimulation period. In order to assess what the cutoff should be, one has to analyze the frequency content of the expected activations.
Some practical examples
Okie, I managed to play around with my own data using different preprocessing steps. The data were obtained from Siemens Trio 3T scanner, with TR=1.69 sec EPI sequence, voxel size 2 × 2 × 2 mm. I stick with FSL5.0 as my software tool. Look how each preprocessing step has an impact on the raw EPI image, both for resting-state and task-based scans. The task is as followed. It is a blocked design between "Move" and "Rest". The subject puts her fist in front of her chest and makes repeated upward movements during "Move", and rests her hand on her chest during "Rest". It's clearly shown that a high-pass filter (HPF) removes low-frequency drift and spatial smoothing with σ = 5.0 mm attenuates the signal amplitude. These outcomes are clearly seen in resting-state data when the brain is not engaged in any special task.
![]() |
| Fig-2: The different outcomes of each preprocessing stage to resting-state data in FSL-FEAT. |
![]() |
| Fig-3: Similar treatment but to task-based data, blocked design (Move & Rest, 30-sec each), right arm localizer task. Changes in BOLD signal outweigh the low-frequency drift. In practice, preprocessing is followed by a statistical analysis using the general linear modeling (GLM) framework. |
What is the output of any fMRI data analyses? It is the statistical map that shows different activated brain regions associated with the task. What is the effect of different FWHM values on our map? Figure 5 below sums up everything by using FSL software package. Only five selected brain slices are shown through the bottom view:
(a) no preprocessing at all: no slice and motion correction, smoothing, and filtering;
(b) with preprocessing, σ = 0 mm;
(c) with preprocessing, σ = 2.0 mm; also refer to filtered EPI image on the right-hand panel.
(d) with preprocessing, σ = 4.5 mm, but without motion correction (MCFLIRT);
(e) with preprocessing, σ = 4.5 mm; the preferred FWHM is twice the voxel width, not too much!
(f) with preprocessing, σ = 15 mm; also refer to filtered EPI image on the right-hand panel.
Skipping motion correction gives a noisy map because it causes many false-positive clusters. Overblurring or oversmoothing the raw data yields to enlarged activation clusters that are most likely false positive.
![]() |
| Fig-4: Different brain activation maps due to different preprocessing steps. The task is the same as the one in the previous figures. The maps are rendered on the standard MNI 152 template. The M1, premotor, S1, S2, and vermis are shown to be activated during Task execution w.r.t Rest. |
![]() |
| Fig-5: Activation maps with respect to rest in coronal, sagittal, and axial views (Z = 3.5, p < 0.05) overlayed on the standard MNI 152 template. Different spatial smoothing parameter is shown with different colors: 2.0 mm (green), 4.5 mm (blue), and 15.0 mm (red). |
References
[1] Some course materials from: http://fsl.fmrib.ox.ac.uk/fslcourse/
[2] http://support.brainvoyager.com/functional-analysis-preparation/
[3] Lindquist M. (2008). The statistical analysis of fMRI data. Statistical Science 23: 439–464.
[4] Ashby, F. Gregory. (2011). Statistical Analysis of fMRI Data, 1st ed. MIT Press.
*** Note: There are abundant piles of past literature dealing with each step of the preprocessing pipeline.




No comments:
Post a Comment