Jim: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Psych204B
No edit summary
imported>Psych204B
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
= Background =
= Background =
This quarter, we've talked a great deal about the importance of making deliberate choices at ever step of imaging analysis, and not trusting a 'black-box' pipeline. In this spirit, I decided to take a closer look at a typical preprocessing stream used in my lab. In doing so, I noticed variation in the preprocessing steps taken in my lab at even the earliest steps of preprocessing.  Specifically, noticed some variation in the implementation of volume registration, and how decisions about the inputs to this volume registration can affect the motion parameters by this process. Accordingly, for my project, I decided to take a look at this variation. To do so I performed volume registration on previously collected imaging data from two different subjects, varying the chosen reference volume and the amount of data included in the imaging process.  
This quarter, we've talked a great deal about the importance of making deliberate choices at ever step of imaging analysis, and not trusting a 'black-box' pipeline. In this spirit, I decided to take a closer look at a typical preprocessing stream used in my lab. In doing so, I noticed variation in the preprocessing steps taken in my lab at even the earliest steps of preprocessing.  Specifically, noticed some variation in the implementation of volume registration, and how decisions about the inputs to this volume registration can affect the motion parameters by this process. Accordingly, for my project, I decided to take a look at this variation. To do so I performed volume registration on previously collected imaging data from two different subjects, varying the chosen reference volume and the amount of data included in the imaging process.  
<br>
== Volume Registration ==  
== Volume Registration ==  
An important early step of fMRI image preprocessing is volume registration. During scanning, there is inevitably some variance in the position of a participant’s brain. Participants (despite even the best intentions) move during a scan, and the brain will also move in the skull thanks to pulsation.  Volume registration is one way of (partially) accounting for this. During volume registration, each acquired volume (full set of slices acquired in a single TR) is aligned to a template volume. During this process movement is estimated at each TR by measuring the displacement of an image from the reference image in 6 different dimensions, displacement in the x, y and z planes, and translation in terms of roll, pitch and yaw. These estimates are commonly used later in data analysis as nuisance parameters in the GLM (generalized linear model).   
An important early step of fMRI image preprocessing is volume registration. During scanning, there is inevitably some variance in the position of a participant’s brain. Participants (despite even the best intentions) move during a scan, and the brain will also move in the skull thanks to pulsation.  Volume registration is one way of (partially) accounting for this. During volume registration, each acquired volume (full set of slices acquired in a single TR) is aligned to a template volume. During this process movement is estimated at each TR by measuring the displacement of an image from the reference image in 6 different dimensions, displacement in the x, y and z planes, and translation in terms of roll, pitch and yaw. These estimates are commonly used later in data analysis as nuisance parameters in the GLM (generalized linear model).   
<br>
= Methods =  
= Methods =  
== Data Acquisition ==  
== Data Acquisition ==  
 
Two female participants aged 40 and 50 were scanned as a part of an ongoing project studing intergenerational risk factors for depression. Scans were conducted on a 3T scanner at the Lucas Center. Scans were 314 Volumes long, with a TR of 2000 MS and acquired with a flip angle=70 degrees, TE = 40 msec, FOV 204 and a T2* weighted sprial in/out pulse sequence.  Volumes were composed of 24 axial slices, 3.0 mm per slice, 3.75 x 3.75 mm in plane resolution.
Two female participants aged 40 and 50 were scanned as a part of an ongoing project studing intergenerational risk factors for depression. Scans were conducted on a 3T scanner at the Lucas Center. Scans were 314 Volumes long, with a TR of 2000 MS and acquired with a flip angle=70 degrees, TE = 40 msec, FOV 204 and a T2* weighted sprial in/out pulse sequence.  Volumes were composed of 24 axial slices, 3.0 mm per slice, 3.75 x 3.75  
mm in plane resolution.
 
== Data Analysis ==  
== Data Analysis ==  
Data analysis was conducted using AFNI (Analysis of Functional NeuroImaging), a data analysis program developed by Bob Cox. To test factors affecting the motion parameters, volume registration was conducted varying two inputs of interest.  The first was the input data; during fMRI acquisition, the MR scanner typically takes several TRs to reach equilibrium. While the data acquired during the first few TRs is typically discarded prior to image analysis; some preprocessing scripts trim this initial TRs later in preprocessing. Accordingly, I conducted volume registration on both a full data set that included these initial TRs, and a trimmed data set that included only the ‘settled’ TRs.
Data analysis was conducted using AFNI (Analysis of Functional NeuroImaging), a data analysis program developed by Bob Cox. To test factors affecting the motion parameters, volume registration was conducted varying two inputs of interest.  The first was the input data; during fMRI acquisition, the MR scanner typically takes several TRs to reach equilibrium. While the data acquired during the first few TRs is typically discarded prior to image analysis; some preprocessing scripts trim this initial TRs later in preprocessing. Accordingly, I conducted volume registration on both a full data set that included these initial TRs, and a trimmed data set that included only the ‘settled’ TRs.
 
Additionally, I also varied the volume chosen as the template volume for registration.  For each data set (‘trimmed’ and ‘settled’), I conducted volume registration using either the initial (0), 90th or 300th TR of each data set as the template volume. These data analyses were performed for each subject.  The 90th and initial volumes were chosen because they were both options chosen in preprocessing scripts for our lab, the later TR was chosen as it seemed interesting.  These analyses were conducted on both participants’ data. The outcome measures for these analyses were the maximum displacement a volume as provided by 3dVolReg in afni, as well as the variance, means, and correlation (across analysis choice) of the 6 motion parameters produced by volume registration. I hypothesized that Volume registration conducted on the full data set with the initial TR as the reference volume would produce the worst motion parameters (highest variance, greatest motion displacement), but wanted to investigate whether including the initial TRs would distort motion parameters even when a later (90,300) TR was chosen as the reference volume.
Additionally, I also varied the volume chosen as the template volume for registration.  For each data set (‘trimmed’ and ‘settled’), I conducted  
<br>
volume registration using either the initial (0), 90th or 300th TR of each data set as the template volume. These data analyses were performed for each subject.  The 90th and initial volumes were chosen because they were both options chosen in preprocessing scripts for our lab, the later TR was chosen as it seemed interesting.  These analyses were conducted on both participants’ data. The outcome measures for these analyses were the maximum displacement a volume as provided by 3dVolReg in afni, as well as the variance, means, and correlation (across analysis choice) of the 6 motion parameters produced by volume registration. I hypothesized that Volume registration conducted on the full data set with the initial TR as the reference volume would produce the worst motion parameters (highest variance, greatest motion displacement), but wanted to investigate whether including the initial TRs would distort motion parameters even when a later (90,300) TR was chosen as the reference volume.
 
 
= Results =  
= Results =  
Below are summary statistics from volume registration.  Several things pop out from this data Analysis.  The first is that there seems to be appreciable variance between participants.  Subject 1 seems to have moved more – regardless of data set or reference volume, Subject one has greater variance, maximum displacement and mean value of motion parameters than Subject 2.  Additionally, it seems clear that both chosen data set and template volume affect parameter estimates.  Looking at the first column, there seems to be the greatest maximum displacement for both subjects for the full dataset fcompared to the trimmed ‘settled only’ data set.  Additionally, for both subjects the 90th TR produced motion parameters with the smallest maximum displacement.


 
[[File:Summary Statistics.png |thumb|400px|center| Summary Statistics]]
= Background =
 
A point of emphasis this quarter has been understanding all the steps necessary for neuroimaging analysis, and
 
This quarter, we've talked a great deal about the importance of making deliberate choices at ever step of imaging analysis, and not trusting a  'black-box' pipeline. In this spirit, I decided to take a closer look at a typical preprocessing stream used in my lab. 
 
 
 
You can use subsections if you like.
Below is an example of a retinotopic map.  Or, to be precise, below ''will'' be an example of a retinotopic map once the image is uploaded. To add an image, simply put text like this inside double brackets 'MyFile.jpg | My figure caption'. When you save this text and click on the link, the wiki will ask you for the figure.
<br>
<br>
 
An examination of the distribution of motion parameters (see below) supports our initial intuition that both data set and reference volume affect motion parameters, though there does seem to be considerable overlap- the distributions of the various parameters seem to be of similar shapes across analyses, and seem to be roughly in the same place on the x-axis. Moreover, we can see that the motion parameters generated using the full data set with the initial TR as the reference volume seem to be the most deviant.
[[File:Summary Statistics.png | Figure 1]]
[[File: Distribution of mvmt parameters.png |thumb|400px|center| Smoothed Density Distribution of Motion parameters for Subject 1, split by data set used and reference TR]]
 
Below is another example of a reinotopic map in a different subject.
<br>
<br>
[[File:Example2.jpg | Figure 2]]
In the final figure below, motion parameters of Subject 1 are charted out as a function of TR (x-axis) and magnitude (y-axis). The parameters are split such that each panel represents an individual motion parameter (ie roll or pitch), and the various lines indicate the data set and reference TRs chosen. Here we see that there seems to be considerable variation in the magnitude of the parameters- for instance the lines tracking the ‘yaw’ parameter seem to be quite far apart for the various analyses.  However, it seems clear that the differences only appear to be a main effect- across analyses the parameters appear to be quite tightly correlated, rising and falling quite closely.  Indeed, after performing a computing a correlation matrix, I found that within parameters, the correlation across analyses was generally extremely high (~.99).  This would indicate that although there may be some variation in the parameters, these differences may only be trivial and therefore not have a large influence on later analysis (say during GLM when they are included as nuisance regressors)
 
[[File: TR split.png |thumb|400px|center| Magnitude of motion parameters plotted by TR, split by parameter type, data set included and reference TR chosen.]]
Once you upload the images, they look like this. Note that you can control many features of the images, like whether to show a thumbnail, and the display resolution.
[[File:Example3.jpg |thumb|300px|center| Figure 3]]
<br>
<br>
 
= Conclusions =  
== MNI space ==
Altogether, it seems that both the data set and the TR chosen as a reference point can influence the values of the motion parameters estimated during volume registration. However, it seems that these differences are largely ones of magnitude, and may not reflect temporal changes. It seems that the most deviant parameters are generated by volume registration which includes a data set with the initial TRs (during which the scanner is still settling down), and has the intial TR as the template volume. Additionally, it seems that including these initial TRs can influence the magnitude of motion parameters even when a later TR is chosen as the reference volume. Altogether, it seems that if one is seeking to minimize variation in motion parameters, the best practice is to trim one’s data set prior to registration, and to choose a reference volume that is relatively early in a run (but not one acquired during the first useable TR).
 
MNI is an abbreviation for [http://en.wikipedia.org/wiki/Montreal_Neurological_Institute Montreal Neurological Institute].
 
= Methods =
== Measuring retinotopic maps ==
Retinotopic maps were obtained in 5 subjects using Population Receptive Field mapping methods [http://white.stanford.edu/~brian/papers/mri/2007-Dumoulin-NI.pdf Dumoulin and Wandell (2008)]. These data were collected for another [http://www.journalofvision.org/9/8/768/ research project] in the Wandell lab. We re-analyzed the data for this project, as described below. 
 
=== Subjects ===
Subjects were 5 healthy volunteers.
 
=== MR acquisition ===
Data were obtained on a GE scanner. Et cetera.
 
=== MR Analysis ===
The MR data was analyzed using [http://white.stanford.edu/newlm/index.php/MrVista mrVista] software tools.
 
==== Pre-processing ====
All data were slice-time corrected, motion corrected, and repeated scans were averaged together to create a single average scan for each subject. Et cetera.
 
==== PRF model fits ====
PRF models were fit with a 2-gaussian model.
 
==== MNI space ====
After a pRF model was solved for each subject, the model was trasnformed into MNI template space. This was done by first aligning the high resolution t1-weighted anatomical scan from each subject to an MNI template. Since the pRF model was coregistered to the t1-anatomical scan, the same alignment matrix could then be applied to the pRF model. <br>
Once each pRF model was aligned to MNI space, 4 model parameters - x, y, sigma, and r^2 - were averaged across each of the 6 subjects  in each voxel.
 
Et cetera.
 
 
= Results - What you found =
 
== Retinotopic models in native space ==
Some text. Some analysis. Some figures.
 
== Retinotopic models in individual subjects transformed into MNI space ==
Some text. Some analysis. Some figures.
 
== Retinotopic models in group-averaged data on the MNI template brain ==
Some text. Some analysis. Some figures. Maybe some equations.
 
 
=== Equations===
If you want to use equations, you can use the same formats that are use on wikipedia. <br>
''See wikimedia help on  [http://meta.wikimedia.org/wiki/Help:Displaying_a_formula formulas] for help.'' <br>
This example of equation use is copied and pasted from [http://en.wikipedia.org/wiki/Discrete_Fourier_transform wikipedia's article on the DFT].  
 
The [[sequence]] of ''N'' [[complex number]]s ''x''<sub>0</sub>, ..., ''x''<sub>''N''−1</sub> is transformed into the  sequence of ''N'' complex numbers ''X''<sub>0</sub>, ..., ''X''<sub>''N''−1</sub> by the DFT according to the formula:
 
:<math>X_k = \sum_{n=0}^{N-1} x_n e^{-\frac{2 \pi i}{N} k n} \quad \quad k = 0, \dots, N-1</math> 
           
where i is the imaginary unit and <math>e^{\frac{2 \pi i}{N}}</math>  is a primitive N'th [[root of unity]]. (This expression can also be written in terms of a [[DFT matrix]]; when scaled appropriately it becomes a [[unitary matrix]] and the ''X''<sub>''k''</sub> can thus be viewed as coefficients of ''x'' in an [[orthonormal basis]].)
 
The transform is sometimes denoted by the symbol <math>\mathcal{F}</math>, as in <math>\mathbf{X} = \mathcal{F} \left \{ \mathbf{x} \right \} </math> or <math>\mathcal{F} \left ( \mathbf{x} \right )</math> or <math>\mathcal{F} \mathbf{x}</math>. 
 
The '''inverse discrete Fourier transform (IDFT)''' is given by
 
:<math>x_n = \frac{1}{N} \sum_{k=0}^{N-1} X_k e^{\frac{2\pi i}{N} k n} \quad \quad n = 0,\dots,N-1.</math>
 
== Retinotopic models in group-averaged data projected back into native space ==
Some text. Some analysis. Some figures.
 
 
= Conclusions =
 
Here is where you say what your results mean.
 
= References - Resources and related work =
 
References
 
Software
 
= Appendix I - Code and Data =
 
==Code==
[[File:CodeFile.zip]]
 
==Data==
[[File:DataFile.zip | zip file with my data]]
 
= Appendix II - Work partition (if a group project) =
Brian and Bob gave the lectures. Jon mucked around on the wiki.

Latest revision as of 11:15, 17 March 2012


Background

This quarter, we've talked a great deal about the importance of making deliberate choices at ever step of imaging analysis, and not trusting a 'black-box' pipeline. In this spirit, I decided to take a closer look at a typical preprocessing stream used in my lab. In doing so, I noticed variation in the preprocessing steps taken in my lab at even the earliest steps of preprocessing. Specifically, noticed some variation in the implementation of volume registration, and how decisions about the inputs to this volume registration can affect the motion parameters by this process. Accordingly, for my project, I decided to take a look at this variation. To do so I performed volume registration on previously collected imaging data from two different subjects, varying the chosen reference volume and the amount of data included in the imaging process.

Volume Registration

An important early step of fMRI image preprocessing is volume registration. During scanning, there is inevitably some variance in the position of a participant’s brain. Participants (despite even the best intentions) move during a scan, and the brain will also move in the skull thanks to pulsation. Volume registration is one way of (partially) accounting for this. During volume registration, each acquired volume (full set of slices acquired in a single TR) is aligned to a template volume. During this process movement is estimated at each TR by measuring the displacement of an image from the reference image in 6 different dimensions, displacement in the x, y and z planes, and translation in terms of roll, pitch and yaw. These estimates are commonly used later in data analysis as nuisance parameters in the GLM (generalized linear model).


Methods

Data Acquisition

Two female participants aged 40 and 50 were scanned as a part of an ongoing project studing intergenerational risk factors for depression. Scans were conducted on a 3T scanner at the Lucas Center. Scans were 314 Volumes long, with a TR of 2000 MS and acquired with a flip angle=70 degrees, TE = 40 msec, FOV 204 and a T2* weighted sprial in/out pulse sequence. Volumes were composed of 24 axial slices, 3.0 mm per slice, 3.75 x 3.75 mm in plane resolution.

Data Analysis

Data analysis was conducted using AFNI (Analysis of Functional NeuroImaging), a data analysis program developed by Bob Cox. To test factors affecting the motion parameters, volume registration was conducted varying two inputs of interest. The first was the input data; during fMRI acquisition, the MR scanner typically takes several TRs to reach equilibrium. While the data acquired during the first few TRs is typically discarded prior to image analysis; some preprocessing scripts trim this initial TRs later in preprocessing. Accordingly, I conducted volume registration on both a full data set that included these initial TRs, and a trimmed data set that included only the ‘settled’ TRs. Additionally, I also varied the volume chosen as the template volume for registration. For each data set (‘trimmed’ and ‘settled’), I conducted volume registration using either the initial (0), 90th or 300th TR of each data set as the template volume. These data analyses were performed for each subject. The 90th and initial volumes were chosen because they were both options chosen in preprocessing scripts for our lab, the later TR was chosen as it seemed interesting. These analyses were conducted on both participants’ data. The outcome measures for these analyses were the maximum displacement a volume as provided by 3dVolReg in afni, as well as the variance, means, and correlation (across analysis choice) of the 6 motion parameters produced by volume registration. I hypothesized that Volume registration conducted on the full data set with the initial TR as the reference volume would produce the worst motion parameters (highest variance, greatest motion displacement), but wanted to investigate whether including the initial TRs would distort motion parameters even when a later (90,300) TR was chosen as the reference volume.

Results

Below are summary statistics from volume registration. Several things pop out from this data Analysis. The first is that there seems to be appreciable variance between participants. Subject 1 seems to have moved more – regardless of data set or reference volume, Subject one has greater variance, maximum displacement and mean value of motion parameters than Subject 2. Additionally, it seems clear that both chosen data set and template volume affect parameter estimates. Looking at the first column, there seems to be the greatest maximum displacement for both subjects for the full dataset fcompared to the trimmed ‘settled only’ data set. Additionally, for both subjects the 90th TR produced motion parameters with the smallest maximum displacement.

Summary Statistics


An examination of the distribution of motion parameters (see below) supports our initial intuition that both data set and reference volume affect motion parameters, though there does seem to be considerable overlap- the distributions of the various parameters seem to be of similar shapes across analyses, and seem to be roughly in the same place on the x-axis. Moreover, we can see that the motion parameters generated using the full data set with the initial TR as the reference volume seem to be the most deviant.

Smoothed Density Distribution of Motion parameters for Subject 1, split by data set used and reference TR


In the final figure below, motion parameters of Subject 1 are charted out as a function of TR (x-axis) and magnitude (y-axis). The parameters are split such that each panel represents an individual motion parameter (ie roll or pitch), and the various lines indicate the data set and reference TRs chosen. Here we see that there seems to be considerable variation in the magnitude of the parameters- for instance the lines tracking the ‘yaw’ parameter seem to be quite far apart for the various analyses. However, it seems clear that the differences only appear to be a main effect- across analyses the parameters appear to be quite tightly correlated, rising and falling quite closely. Indeed, after performing a computing a correlation matrix, I found that within parameters, the correlation across analyses was generally extremely high (~.99). This would indicate that although there may be some variation in the parameters, these differences may only be trivial and therefore not have a large influence on later analysis (say during GLM when they are included as nuisance regressors)

Magnitude of motion parameters plotted by TR, split by parameter type, data set included and reference TR chosen.


Conclusions

Altogether, it seems that both the data set and the TR chosen as a reference point can influence the values of the motion parameters estimated during volume registration. However, it seems that these differences are largely ones of magnitude, and may not reflect temporal changes. It seems that the most deviant parameters are generated by volume registration which includes a data set with the initial TRs (during which the scanner is still settling down), and has the intial TR as the template volume. Additionally, it seems that including these initial TRs can influence the magnitude of motion parameters even when a later TR is chosen as the reference volume. Altogether, it seems that if one is seeking to minimize variation in motion parameters, the best practice is to trim one’s data set prior to registration, and to choose a reference volume that is relatively early in a run (but not one acquired during the first useable TR).