Tutorial 5 - fMRI Preprocessing and Quality (Motion Artifacts)

Goals

  • To understand the types and causes of motion artifacts

  • To determine means to identify runs/participants with substantial motion artifacts

  • To understand the benefits and limitations of motion correction algorithms

  • To understand the logic of including motion correction output as predictors of no interest.

Relevant Lectures

Lecture 04b: Head Motion

Lecture 04c: Preprocessing and Predictors of No Interest

Accompanying Data

Tutorial 5 Data

Tutorial 5 Questions

Background

Recall that head motion leads to several problems with fMRI data.

  1. Voxels shift over time

  2. Head motion can lead to artifacts in time courses (e.g., drift, spikes)

  3. Motion of the head (or any other mass) changes the magnetic field, leading to artifacts.

There are three approaches to dealing with head motion artifacts:

A. Prevent it.

B. Correct it with preprocessing (motion correction)

C. Reduce the contamination of the time courses and reduce the residuals by including motion parameters as predictors of no interest

Motion-corrected data is never as good as data that didn’t have motion to begin with; therefore, do not underestimate the value of the first approach (A). Motion correction algorithms (B) reasonably well at shifting voxels back to the appropriate location, solving problem #1. Motion correction algorithms will often reduce the severity of problem #2. Including motion parameters as predictors of no interest (C) can lead to better estimates of activation levels (i.e., beta weights) and can reduce residuals, improving statistical power. None of these approaches (A, B or C) addresses problem #3 well. Emerging solutions for data collection (multi-echo imaging) show some promise for reducing the impact of problem #3 and will be discussed when we discuss MR physics.

 
Figure 5-1. Motion of a rigid body (like the head) in 3D space can be quantified and corrected using 6 motion parameters (3 translations and 3 rotations)

Figure 5-1. Motion of a rigid body (like the head) in 3D space can be quantified and corrected using 6 motion parameters (3 translations and 3 rotations)

Motion Correction Algorithms

Motion correction algorithms attempt to correct the first two problems. These algorithms realign each volume (set of slices at one point in time) with a reference volume (often the first volume within a run) using 3 translation and 3 rotation parameters (Figure 1).

 
Figure 5-2. Recall that GLM stats can be improved by increasing the fit of the POIs, reducing residuals, and shifting known sources of noise into the GLM by adding PONIs.

Figure 5-2. Recall that GLM stats can be improved by increasing the fit of the POIs, reducing residuals, and shifting known sources of noise into the GLM by adding PONIs.

Adding Motion Parameters as Predictors of No Interest to the GLM

Recall that statistical significance depends on how well the predictors of interest (POIs) fit the data relative to the residuals. By reducing noise, motion correction can help achieve more accurate estimates of beta weights (orange arrow) and reduce residuals (yellow arrow). However, because motion correction is imperfect, it is often beneficial to account for variability related to head motion using predictors of no interest (PONIs) in the GLM (red arrow). Shifting variance from the residuals to the model improves statistical significance.

This is a good solution so long as motion predictors are not highly correlated with our activation predictors (e.g., if they are due to things like swallows that are unrelated to the paradigm). If the motion PONIs and condition POIs are tightly correlated (e.g, in block-design studies of hand actions or speech), the situation is more complex.

General Instructions and Assignment Questions: Overview

You have data from one localizer run in each of four participants. One or more of the participants have substantial head motion artifacts; one or more do not. You will learn how to investigate motion artifacts on one of the participants and will then have to complete the same steps again for each of the other 3 participants.

In Step 1 , you will evaluate each of the three participants’ data for signatures of head motion.

In Step 2 , you will pick the participant that you think had the worst head motion artifacts, and compare different GLMs with and without predictors of non-interest (motion predictors).

Files

For each of 4 participants (P01, P06, P11, and P13) , there is a folder with the following files:

.fmr and .stc files (and .amr files, but ignore these)

Brain Voyager performs motion correction on the 2D slice data (fmr/stc files) instead of the 3D volumetric data (vtcs).

  • These paired files include raw 2D (sliced) functional data
    • .fmr (functional MR sequence) is a text header file
    • .stc contains the corresponding slice time course data
  • All files are for the first localizer run for that participant (Loc1; S1R1 means Session1Run1).
  • Files without 3DMCTS have not had any preprocessing performed.
  • Files ending in 3DMCTS have been motion corrected. 3DMCTS stands for 3D motion correction with trilinear-sinc interpolation. (Geek note: trilinear interpolation is fast but bad; sinc interpolation is slow but accurate; trilinear-sinc is reasonably fast and reasonably good)

.prt files

  • These protocol files contain the information about the order and timing of conditions
  • They are linked in the .fmr and .sdm files

.sdm files

  • These files contain columns of numbers. These can reflect:
    a) _POI.sdm = predictors of interest (POIs) in the design matrix (hence the acronym, single design matrix)
    b) _3DMC.sdm = the output of motion correction algorithm, 3 translation and 3 rotation plots
    c) _POI+PONI.sdm = both the predictors of interest in (a) and the motion parameters in (b) as predictors of no interest to account for known variance

.glm files

  • These files store the output of running the GLM (that is, one beta weight per condition per voxel) and enable you to generate maps of particular contrasts.

There are two versions for both the _param.bmp files. These are files that show motion plots across the whole session (including the other Localizer run and the 6 Experimental runs, not provided here).

Specific Instructions

Step 1 - Inspecting data for Possible Motion Artifacts

You will run each of these steps for the data from each of the four participants. There are four ways to inspect data for possible motion artefacts.

Use the File/Open… command and select a .fmr file. For Step 1, choose the file that does not have motion correction applied, sub-XX_ses-01_task-Localizer_run-01_bold_SCCTBL.fmr where XX is the participant number.

Use the buttons on the left side of the main BV window to adjust rows and columns such that the matrix fills the screen. The bigger the slices, the better.

a) To play a movie of slices over time

Select Options/Time Course Movie… Click on “Preload All” to make your movie play more smoothly.

Use the bottom buttons to play the movie >, pause ||, step back < or step forward >|

You can also place your cursor in the numbered window right of “Time point:” and use the up and down arrows on your keyboard to move back and forward. You can click First <-> Last to jump between first and last volumes.

Figure 5-3. To play a movie for an .fmr file, go to Options/Time course movie

Figure 5-3. To play a movie for an .fmr file, go to Options/Time course movie

Figure 5-4. Time course movie controls

Figure 5-4. Time course movie controls

Some slices are more informative than others, especially the top slice of the brain, where up-down movements (z translation) is most easy to detect. Thought question (does not need to be answered in assignment): Why do you think this is?

While looking at the movie, note any time points at which things appeared “funky”. If you think you see motion artifacts, you should also examine the movie for the motion-corrected fMR to see if motion correction fixed it.

b) To see motion correction output one way

Select Analysis/General Linear Model: Single Study… Select Load… and select the file ending in _3DMC.sdm . Click “Use protocol” under Time course segmentation to see the colored bars showing the timing of conditions.

Figure 5-5. Loading predictors for a Single-Study GLM

Figure 5-5. Loading predictors for a Single-Study GLM

Figure 5-6. The “Load” button allows you to view motion parameters

Figure 5-6. The “Load” button allows you to view motion parameters

If you want to see the name of each predictor, under Predictors you can step through each of the six. To see them all at once, turn on “Show all” Note any time points where there were abrupt changes. Note any gradual changes. Pay attention to the magnitude of changes (y-axis)

c) To see motion correction output another way

Programmer Kevin Stubbs generated code that concatenates the motion outputs for every run and saves the image (as a bitmap, .bmp), making easy to see the output of an entire session at a glance.

You can also inspect the .bmp files in each folder to see motion across the whole session.

Figure 5-7. Motion parameters concatenated across all runs within a session

Figure 5-7. Motion parameters concatenated across all runs within a session

Raw Position (top row) and Raw Rotation (2nd row) show the same plots of head motion over time as in Step 2 above, but split into 3 translation and 3 rotation plots.

Each plot shows motion correction output concatenated across the entire session. Breaks between runs are indicated by short vertical lines on the y-axis = 0 line and the run is labelled beneath.

Location shows how much the 3D location (across directions) changed over time.

Motion Per Volume shows the derivative of the Location plot. That is, it shows how much the participant moved between volumes over time. This is often a very useful measure to inspect because abrupt movements are more likely to contaminate GLM stats than gradual movements.

Note any time points where there were abrupt changes. Note any gradual changes. Pay attention to the magnitude of changes (y-axis).

d) Voxel surfing

Figure 5-8. You can select an entire slice to see the average time course of all voxels (above a certain intensity that corresponds to the voxels inside the brain)

Figure 5-8. You can select an entire slice to see the average time course of all voxels (above a certain intensity that corresponds to the voxels inside the brain)

Sometimes you can detect motion artifacts simply by looking across strategically or even randomly selected time courses.

To do so with .fmr files, just use the mouse to select a box containing the voxels for which you want to extract a time course. This will draw a green box on the slice and derive the time course from all voxels inside the brain in that box.

Figure 5-9. Example time course, showing motion artifacts.  Can you spot one “spike” and one “glitch”?

Figure 5-9. Example time course, showing motion artifacts. Can you spot one “spike” and one “glitch”?

For each of the four participants' data in Tutorial 4, utilize the four approaches above to inspect the data for motion. When vieiwng movies, load the uncorrected .fmr files (which do not have a 3DMCTS suffix).

Inspect the time course for suspicious trends. Repeat across different regions of the brain (hint: try top and bottom slices, ventricles, outside head, regions of expected activation such as occipital pole.

Note the volumes (time points) at which funky things happened, especially if observed across multiple slices/regions.

Question 1:
a) Where would you expect genuine activation?
b) Where would you expect artifacts?
c) How would the shape of genuine BOLD activation be expected to differ from artifacts?

Question 2 (complete this question for each participant separately):
For each of the four participants,
a) What evidence is there for gradual or abrupt head motion (and if abrupt, at which time points is the problem most evident)? If you think there is substantial motion, list all the signatures of the problem that led you to this conclusion.
b) For participants who show evidence of head motion, what could they have been doing to cause these artifacts?

Question 3: Among the four participants, which shows the most problematic data? Justify your choice.

Question 4: Many researchers will exclude participants' data using some vaguely defined motion criterion like, "Data in which head motion exceeded 2 mm or 2 deg were excluded from analysis." Why is this too vague? When might such a statement indicate too much caution? When might it indicate not enough?

Now let's see how well motion corection did at fixing the problems. For the participant that had the worst motion, load the motion-corrected .fMR file (ending in 3DMCTS: sub-XX_ses-01_task-Localizer_run-01_bold_SCCTBL_3DMCTS.fmr). Play the movie and do some voxel surfing.

Question 5. Many people assume that motion correction is a panacea (cure-all) for head motion. Is it? Why or why not?

 

Step 2 - Investigating Statistical Maps to Find Evidence for Artifacts and Evaluate the effect of Motion PONIs

After repeating Step 1 for all four participants pick the participant that you think had the worst head motion artifacts. For this participant ( and only this participant ), you will choose at least one contrast that makes theoretical sense to find a theoretically meaningful area (visual cortex, hand area, face area). You will compare and contrast a GLM that includes only the predictors of interest (POIs) vs. a GLM that includes both the predictors of interest (POIs) and predictors of no interest (PONIs) (i.e., motion plots).

a) Inspecting statistical maps can also provide clues as to the effect of head motion.

File/Open… the version of the file without motion correction applied (sub-XX_ses-01_task-Localizer_run-01_bold_SCCTBL.fmr)

Analysis/Overlay General Linear Model… load the version of the GLM with both POIs and PONIs (sub-XX_ses-01_Localizer_run-1_POI+PONI.glm)

Play with contrasts using POIs or PONIs such as the following:

Figure 5-10. Left = A typical contrast using only POIs. Right = a contrast using PONIs.  Although PONIs, by definition, are generally not of particular interest, nevertheless, performing such contrasts can give you an idea of how problematic head motion is and which brain regions might be particularly vulnerable.  You can also inspect the time courses of the artifact regions to see how bad the effects are.

Figure 5-10. Left = A typical contrast using only POIs. Right = a contrast using PONIs. Although PONIs, by definition, are generally not of particular interest, nevertheless, performing such contrasts can give you an idea of how problematic head motion is and which brain regions might be particularly vulnerable. You can also inspect the time courses of the artifact regions to see how bad the effects are.

You can adjust thresholds by clicking these symbols (bigger blobs and smaller blobs) on the left side of the main BV window or by using the menu generated from Analysis/Overlay Volume Maps… (Analysis tab) (the latter shows you the Min threshold, which is helpful – for casual data inspection, Min = 2.5 or 3 is a reasonable value).

Question 6: Where do you see signals predicted by POIs? Where do you see signals predicted by PONIs?

 

b) To contrast the effect of including PONIs in the data from the participant with the worst motion artifacts.

Decide which subject you think had the worst motion and use only their data for the remainder of the tutorial. Close all files opened so far.

Go to File/Open… and select the motion corrected file: sub-XX_ses-01_task-Localizer_run-01_bold_SCCTBL_3DMCTS.fmr . Do this again so you have two versions that you can jump between.

In one version , Analysis/Overlay General Linear Model… and select the file that includes only POIs, without PONIs: sub-XX_ses-01_Localizer_run-1_SCCTBL_3DMCTS_POI.glm Contrast all 4 POIs vs. baseline (+1 +1 +1 +1).

In the other version (just open the same fmr again - a new tab will appear), Analysis/Overlay General Linear Model… and select the version with both POIs and PONIs sub-XX_ses-01_Localizer_run-1_SCCTBL_3DMCTS_POI+PONI.glm. Contrast all 4 POIs vs. baseline (+1 +1 +1 +1).

Use Analysis/Overlay Volume Maps… to be sure that both versions are using the same threshold.

Compare and contrast the effect of including PONIs even though our contrast only involves POIs.

Question 7: For only the participant with the worst artifacts,
a) How did the model with only POIs compare to the model with both POIs and PONIs?
b) Considering how the GLM works, what effect should the addition of PONIs have on statistical significance and why?

Question 8:
a) Explain three reasons that motion can be detrimental to fMRI data.
b) In general, which consequences of motion are fixed by motion correction algorithms and which are not?
c) Suggest three strategies that can be used to prevent head motion rather than correcting for it in adults and/or children.