Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
strucutre (as would happen in FS-FAST). This tutorial makes use of structure (as would happen in FS-FAST). This tutorial makes use of
Line 12: Line 12:
[[FsTutorial/MultiModalRegistration|Multimodal Registration]] [[FsTutorial/MultiModalFmriIndividual|Individual fMRI Integration]]

<<TableOfContents>>

= fMRI Basics =

In fMRI, stimuli are presented to a subject, which creates a BOLD
hemodynamic response function (HRF) in certain areas of the brain. The
analysis is performed by first performing motion correction, then
correlating each voxel's time course with the stimulus schedule
convolved with an assumed HRF shape. The result is an estimate of the
HRF amplitude for each condition at each voxel, contrasts of the HRF
amplitudes of various conditions, the variance of this
contrast, and some measure of the significance (eg, p, t, F, or z)
map. All these maps are aligned with the motion correction template,
which should be used as the registration template.

= This Data Set =

All the commands in this section should be run from this directory
{{{
cd $TUTORIAL/mmtutorial/fmri
}}}

There are five subjects from the fBIRN Phase I acquisition. They are
fbirn-10?, where "?" is 1, 3, 4, 5, 6 (note that #2 is missing). Each
has a FreeSurfer reconstruction by the name fbirn-anat-10?.v4. The
[[FsTutorial/MultiModalRegistration| individual registration]]
[[FsTutorial/MultiModalFmriIndividual|ROI Analysis]] have already been
performed on all subjects.

The data are the results from a sensorimotor paradigm (flashing
checkerboard, audible tone, and finger tapping). The raw fMRI data
were motion corrected but not smoothed. Each subject has four
volumes:

{{{
template.nii - motion correction template
ces.nii - contrast effect size
cesvar.nii - variance of contrast effect size
sig.nii - signed significance of contrast (-log10(p))
}}}

The contrast is the contrast between the ON and the OFF (ie, a
comparison against baseline). The sig.nii volume has signed -log10(p)
values. So, if the p-value = .01, -log10(p) = 2. If the contrast was
positive, then the value would be +2, if negative (ie, ON<OFF), then
the value would be -2.

= Check Registration =

First (and always), check the registration (see the
[[FsTutorial/MulitModalRegistration|Registration Tutorial]] for more
information).

{{{
tkregister2 --mov fbirn-101/template.nii \
  --reg fbirn-101/bb.register.dat --surf
}}}

This registration should already be good, so there is no need to make
any modifications. In a real analysis, you should check the
registrations for all subjects, but that is not necessary here.

= Surface-based Group fMRI Analysis =

The group analysis is done in three stages:
1. Assemble data
1. Spatially smooth data on surface (if desired)
1. GLM Analysis

== Assemble Data ==

Only the first step is different than an anatomical (eg, thickness)
analysis. Still, you run mri_preproc, but with different arguments:

{{{
mris_preproc --target fsaverage --hemi lh \
  --iv fbirn-101/ces.nii fbirn-101/bb.register.dat \
  --iv fbirn-103/ces.nii fbirn-103/bb.register.dat \
  --iv fbirn-104/ces.nii fbirn-104/bb.register.dat \
  --iv fbirn-105/ces.nii fbirn-105/bb.register.dat \
  --iv fbirn-106/ces.nii fbirn-106/bb.register.dat
  --projfrac 0.5 \
  --out lh.ces.mgh \
}}}

Notes:
1. The target surface is the left hemisphere of fsaverage
1. Each input volume and corresponding registration is listed separately
1. The fMRI data are sampled half-way between the white and pial
surfaces ("--projfrac 0.5").

The output is lh.ces.mgh. It has the same size as any other surface overlay for fsaverage
eg, lh.thickness. To see it's dimensions, run:
{{{
mri_info lh.ces.mgh
}}}

You will see "dimensions: 163842 x 1 x 1 x 5", indicating that there are
163842 "columns" (ie, vertices), 1 "row", and 1 "slice". There are 5
frames, one for each subject.

== Surface Smoothing ==

{{{
mri_surf2surf --hemi lh --s fsaverage --fwhm 5 --cortex\
  --sval lh.ces.mgh --tval lh.ces.sm05.mgh
}}}

Notes:
1. Full-Width/Half-Max (fwhm) is 5 mm
1. The smoothing is only perform in regions of legitimate cortex
(--cortex, which uses the lh.cortex.label).

== GLM Fit ==

This performs a one-sample, group mean (OSGM) just looking for places
where the CES is different than 0.

{{{
mri_glmfit --y lh.ces.sm05.mgh --surf fsaverage lh \
  --osgm --glmdir lh.ces.sm05.osgm
}}}

{{{
tksurfer fsaverage lh inflated -annot aparc -ov lh.ces.sm05.osgm/osgm/sig.mgh
}}}

Note that the activation is light because there are only five
subjects, but the activation that is there is in the right place.

The purpose of this tutorial is to get you acquainted with the concepts need to perform fMRI integration in FreeSurfer by interacting with the data from several subjects in a group analysis. You will not learn how to perform fMRI analysis here; that knowledge is already assumed. This tutorial also does not assume any particular directory structure (as would happen in FS-FAST). This tutorial makes use of data from the Functional Biomedical Informatics Research Network (fBIRN, www.nbirn.net).

Other useful references: Multimodal Registration Individual fMRI Integration

fMRI Basics

In fMRI, stimuli are presented to a subject, which creates a BOLD hemodynamic response function (HRF) in certain areas of the brain. The analysis is performed by first performing motion correction, then correlating each voxel's time course with the stimulus schedule convolved with an assumed HRF shape. The result is an estimate of the HRF amplitude for each condition at each voxel, contrasts of the HRF amplitudes of various conditions, the variance of this contrast, and some measure of the significance (eg, p, t, F, or z) map. All these maps are aligned with the motion correction template, which should be used as the registration template.

This Data Set

All the commands in this section should be run from this directory

cd $TUTORIAL/mmtutorial/fmri

There are five subjects from the fBIRN Phase I acquisition. They are fbirn-10?, where "?" is 1, 3, 4, 5, 6 (note that #2 is missing). Each has a FreeSurfer reconstruction by the name fbirn-anat-10?.v4. The individual registration ROI Analysis have already been performed on all subjects.

The data are the results from a sensorimotor paradigm (flashing checkerboard, audible tone, and finger tapping). The raw fMRI data were motion corrected but not smoothed. Each subject has four volumes:

template.nii - motion correction template
ces.nii - contrast effect size
cesvar.nii - variance of contrast effect size
sig.nii - signed significance of contrast (-log10(p))

The contrast is the contrast between the ON and the OFF (ie, a comparison against baseline). The sig.nii volume has signed -log10(p) values. So, if the p-value = .01, -log10(p) = 2. If the contrast was positive, then the value would be +2, if negative (ie, ON<OFF), then the value would be -2.

Check Registration

First (and always), check the registration (see the Registration Tutorial for more information).

tkregister2 --mov fbirn-101/template.nii \
  --reg fbirn-101/bb.register.dat --surf

This registration should already be good, so there is no need to make any modifications. In a real analysis, you should check the registrations for all subjects, but that is not necessary here.

Surface-based Group fMRI Analysis

The group analysis is done in three stages: 1. Assemble data 1. Spatially smooth data on surface (if desired) 1. GLM Analysis

Assemble Data

Only the first step is different than an anatomical (eg, thickness) analysis. Still, you run mri_preproc, but with different arguments:

mris_preproc --target fsaverage --hemi lh \
  --iv  fbirn-101/ces.nii fbirn-101/bb.register.dat \
  --iv  fbirn-103/ces.nii fbirn-103/bb.register.dat \
  --iv  fbirn-104/ces.nii fbirn-104/bb.register.dat \
  --iv  fbirn-105/ces.nii fbirn-105/bb.register.dat \
  --iv  fbirn-106/ces.nii fbirn-106/bb.register.dat
  --projfrac 0.5 \
  --out lh.ces.mgh \

Notes: 1. The target surface is the left hemisphere of fsaverage 1. Each input volume and corresponding registration is listed separately 1. The fMRI data are sampled half-way between the white and pial surfaces ("--projfrac 0.5").

The output is lh.ces.mgh. It has the same size as any other surface overlay for fsaverage eg, lh.thickness. To see it's dimensions, run:

mri_info lh.ces.mgh

You will see "dimensions: 163842 x 1 x 1 x 5", indicating that there are 163842 "columns" (ie, vertices), 1 "row", and 1 "slice". There are 5 frames, one for each subject.

Surface Smoothing

mri_surf2surf --hemi lh --s fsaverage --fwhm 5 --cortex\
  --sval lh.ces.mgh --tval lh.ces.sm05.mgh 

Notes: 1. Full-Width/Half-Max (fwhm) is 5 mm 1. The smoothing is only perform in regions of legitimate cortex (--cortex, which uses the lh.cortex.label).

GLM Fit

This performs a one-sample, group mean (OSGM) just looking for places where the CES is different than 0.

mri_glmfit --y lh.ces.sm05.mgh --surf fsaverage lh \
  --osgm --glmdir lh.ces.sm05.osgm

tksurfer fsaverage lh inflated -annot aparc -ov lh.ces.sm05.osgm/osgm/sig.mgh

Note that the activation is light because there are only five subjects, but the activation that is there is in the right place.

FsTutorial/MultiModalFmriGroup_tktools (last edited 2014-01-28 16:48:27 by LouisVinke)