[wiki:FreeSurferWiki top] | [wiki:Tutorials previous]
This tutorial steps you through the analysis of an fMRI data set with the FreeSurfer Functional Analysis Stream (FSFAST), from organizing the data to group analysis.
Tutorial Data Description
The data being analyzed is part of the fBIRN Phase I data set. There are 5 subjects, each scanned twice at each of 10 sites. The data in the tutorial is the data collected at MGH. The task is a simple sensory motor blocked design experiment. During each task block the subject was shown a flashing checkerboard and presented with an auditory tone. During this time, the subject was asked to press bottons with both hands. The task blocks alternated with fixation blocks during which the subject stared at a fixation cross but performed no other task. Each block type was 15 sec long. Each run started with a fixation block followed by 8 pairs of task and fixation blocks (and so ends with a fixation block) for a total run duration of 255 sec. The TR was 3 sec, so there were 85 time points. This task was performed 4 times in each visit.Anatomicals were also collected and analyzed in FreeSurfer for each of these subjects.
Getting and Organizing the Tutorial
The tutorial requires about 10G of space. Find a location for this data, download or copy the tarfile from XXX. Untar it with:
tar xvfz fsfast-tutorial.tar.gz
This will create a directory called fsfast-tutorial. You can now delete the tar file. cd fsfast-tutorial. It will be assumed that you are in this directory (or subdirectory there of) throughout the tutorial. This directory will have five folders:
- fb1-raw - raw fMRI data
- fb1-raw-study - raw data origanized as an FSFAST study but unanalyzed
- fb1-preproc-study - The same data preprocessed.
- fb1-analysis-study - The same data analyzed
subjects - FreeSurfer reconstruction of anatomical data (plus the fsaverage subject).
If you look (ls) in fb1-raw, you will see that there are 20 NIFTI data sets with names like f.mgh-10X.1-rYYY.nii. These are the 20 fMRI runs mentioned above. X indicates the subjects number (1, 3, 4, 5, 6), and YYY indicates the run number. The sensory-motor task happend to be runs 3, 5, 7, and 10.
Quick Visualization Tutorial (tkmedit/tksurfer)
The purpose of this tutorial is to familarize you with how to use FreeSurfer volume viewer (tkmedit) and surface viewer (tksurfer) in the context of viewing functional data.You should already know how to use tkmedit and tksurfer otherwise. See the pages below for a more detailed handling of tkmedit and tksurfer.
tkmedit
[wiki:TkMeditGuide_2fTkMeditGeneralUsage_2fTkMeditInterface Interface] BR
[wiki:FsTutorial/TkmeditGeneralUsage General usage] BR
[wiki:FsTutorial/TkmeditWorkingWithData Working with data] BR
[wiki:FsTutorial/TkmeditReference Quick reference] BR
tksufer
[wiki:TkSurferGuide_2fTkSurferGeneralUsage_2fTkSurferInterface Interface] BR
[wiki:FsTutorial/TksurferGeneralUsage General usage] BR
[wiki:FsTutorial/TksurferWorkingWithData Working with data] BR
[wiki:FsTutorial/TksurferReference Quick reference] BR
Viewing a single functional overlay in the volume
cd into the study with all the analyzed data:
cd fb1-analysis-study
Run tkmedit-sess (this is an FSFAST wrapper for tkmedit):
tkmedit-sess -s mgh-101.v1 -a sm-gamma-fwhm5 -c 1v0 -aparc+aseg
Don't worry about what all the arguments mean, this part is only about visualization.This command will bring up two windows, one with a brain image the other a control panel.
attachment:tkm-101-gam-cor.2-4.gif attachment:tkm-101-toolswindow.gif
The brain image is the FreeSurfer anatomical for this subject. The slightly pale colors on the anatomical indicate the FreeSurfer automatic segmentation. The bright red/yellow/blue are super-threshold voxels in the functional overlay. As you click on different points, you will see the "Functional value" field in the Tools window change as well as the "Sgmtn label".Note that areas that are not above threshold will still have non-zero functional values. The interpretation of the value depepends on what is being viewed. This is a significance map, so the value is -log10(pvalue)*sign (ie, for a pvalue = .01, the functional value will be +2). The sign is a functional direction. The red/yellow are postive, and the blue are negative. As a functional value gets more positive, its color will change from red to yellow. As it gets more negative, it will change from blue to cyan.BR
Toggle the functional overlay on and off by hitting the button with the red/yellow blob in the Tools window (it's in the top row - if you mouse over it, you'll see a "Show Overlay" tooltip.)BR
Configure the functional overlay by clicking on "View..." in the Tools window, then "Configure->Functional Overlay...". You should see the following interface:
attachment:tkm-101-config-funcoverlay.gif
The thresholds are currently set at 2 (Min) and 4 (max). The Min threshold is the minimum absolute value needed for a voxel to show an overlay color. The maximum is the value beyond which the voxel will stop changing color. Try changing these values, then hit the Apply button to see their effect.BR
So, what's all that activation OUTSIDE of the brain. Can't have that! Try hitting View->Mask Functional Overlay to Aux button. There, now isn't that better? And why is it so blockly? There are big voxels in functional data, but if you'd like to pretend otherwise, try hitting the "Trilinear" button on the Configure Functional Overlay window.
Viewing multiple functional overlays and time courses in the volume
Run tkmedit-sess (this is an FSFAST wrapper for tkmedit):
tkmedit-sess -s mgh-101.v1 -a sm-fir-fwhm5 -c 1v0 -aparc+aseg
This will bring up the two windows as you saw before (the brain image window will have a different overlay). It will also bring up a window called "Time Course". Click anywhere in the volume, and you will see a time course associated with that voxel similar to the one below.
attachment:tkm-101-fir.gif
The meaning of the time course depends upon the nature of the time course loaded. In this case it is the hemodynamic response to the task block averaged over all blocks over all runs (this is an "FIR" model). The horizontal axis is time (0 means the onset of the block). You can visualize the values of any multi-frame data set in this way (it does not have to be a "time" course).BR
Notice that there is not much activation in the functional overlay. This is good! You are looking at an overlay that corresponds 3 seconds prior to stimulus onset, so there should be no activation. To see the other time points, bring up the functional overlay configuration window (View->Configure->Functional Overlay). Notice that the "Time Point" field now has a range of 0-8 indiating the 9 time points in the Time Course window. If you hit the + button next to "Time Point" then hit Apply, you will see the overlay change. You will also see a vertical dashed line in the Time Course window. You are now looking the map associated with the time between 0 and 3 sec after stimulus onset. Keep hitting the +/Apply buttons to see different time points. You can hit the "|>" button to start a movie of the activation (then "[]" to stop it).
Viewing a single functional overlay on the surface
To view the same data on the surface run:
tksurfer-sess -s mgh-101.1 -a sm-gamma-fwhm5 -c 1v0 -hemi lh
Again you will see two windows, "Tksurfer Tools" and a surface image window.
Assembling the Data in the FSFAST Hiearchy
The Project (or Study) Directory
Create a Session
Create a Stimulus Schedule (Paradigm File)
Link to the FreeSurfer Anatomical Recontruction
Create a SessionID File
Preprocessing of fMRI Data (preproc-sess)
What preprocessing stages do you want to run?
Run preprocessing
Examine additions to hiearchy
View motion correction plots
First-Level Analysis
Configure Analysis and Contrasts (mkanalysis-sess)
Analyze First Level (selxavg3-sess)
Visualize
Volume-based visualization (tkmedit-sess)
Surface-based visualization (tksurfer-sess)
Examine additions to the hierarchy
Function-Structure Registration
View unregistered (tkregister-sess)
Run automatic registration (fslregister-sess)
Check automatic registration (tkregister-sess)
Check talairach registration
Higher-Level (Group) Analysis
Assemble the Data (isxconcat-sess)
Volume-based (talairach/MNI305)
Quality Assurance
Group Analysis
Random and Fixed Effects
Cluster Analysis
Surface-based
FsFast Tutorial SlideShow
- ["/000 Frontmatter"]
- ["/300 Download data"]
- ["/400 Get familiar with sessions format"]
- ["/500 Make a directory for your study"]
- ["/600 Make paradigm files for your experiment"]
- ["/700 Motion correct the data"]
- ["/800 Normalize signal intensity"]
- ["/900 Set up session-level analysis"]
- ["/905 Average session-level data by condition"]
- ["/910 Define an omnibus contrast"]
- ["/920 Compute statistical maps of the omnibus contrast"]
- ["/930 Run functional and structural registration"]
- ["/940 Visualization"]
