1. PETsurfer Kinetic Modeling Tutorial Data Description

The dynamic PET data were completely synthesized based on on average ROI time activity curves (TACs) from a study using [11C]SB207145 which targets the serotonin 5HT4 receptor (see Beliveau, et all, 2016). These ROI TACs where then applied to the anatomical MRIs of subjects not in the PET study to create PET-like dynamic images. The anatomical images are 18 real subjects distributed as part of the FSFAST fMRI tutorial. The anatomical images were gradient unwarped prior to analyzing in recon-all. The data are suitable for analyzing using the MRTM1 and MRTM2 models. The data were synthesized with both tissue fraction effects (TFEs) and partial volume effects (PVEs). The PVE is an isotropic 6mm Gaussian kernel. The data were simulated with slight differences in subjects according to two (arbitrary) groups so that there will be a group effect in the bindind potentials.

2. Getting the Data (not necessary for the Boston FreeSurfer Course)

3. Analyzing an Individual Subject

Change directory into the project folder. There you will see 18 folders called s01, s02, etc. Change directory into sb01. You will see several files:

3.1. Examine Input Data

tac.vol.nii.gz -- this is a multi frame volume holding the time activity curves (TACs) for each voxel
frame.time.dat -- text file indicating the time at which each frame was acquired.
subjectname -- text file with the name of the !FreeSurfer-analyzed anatomy of the subject, uw.fsf01anat in this case.  

Examine the contents of frame.time.dat using any text viewer or editor. Verify that the time file has 38 entries. Also notice that the frames are NOT uniformly distributed in time.

Now examine the dimensions of the TAC with

mri_info tac.vol.nii.gz

Verify that the TAC also has 38 frames (the spatial dimensions are 64x64x30)

3.2. Compute the mean of the TAC and Visualize

Run

mri_concat tac.vol.nii.gz --mean --o tac.vol.mean.nii.gz

Visualize the mean and the TAC volume

freeview  tac.vol.nii.gz tac.vol.mean.nii.gz

Click on the "tac.vol.nii.gz" item in the menu, then show the time series. Click around the brain. Generally, you should see a curve that rises and then slowly returns to 0. Note that freeview displays the curve assuming that the time points are uniformly spaced in time (though they are not, see above).

3.3. Register TAC Mean to the Anatomical

mri_coreg --s uw.fsf01anat --mov tac.vol.mean.nii.gz --reg egistration.lta

This will compute a 6DOF registration to the FreeSurfer anatomical. Check the registration with

tkregisterfv --mov tac.vol.mean.nii.gz --reg registration.lta --surfs

Verify that it is accurate.

3.4. Run Partial Volume Correction

mri_gtmpvc --i tac.vol.nii.gz --o gtm.psf6 --psf 6 - --seg gtmseg.mgz --reg registration.lta \
   --mgx .01 --km-ref 8 47 --km-hb 11 12 50 51 --no-rescale --auto-mask 1 .1 \
   --default-seg-merge  --update-tt  

This command does a lot so let's break it down:
--i tac.vol.nii.gz : this is the multi-frame input that we want to analyze
--o gtm.psf : this is the output folder
--psf 6 : assume the scanner has a 6mm Gaussian point spread function (PSF) -- this is how it was simulated. When you analyze your data, you must know what the PSF for your scanner is. DON'T JUST USE "6"!
--seg gtmseg.mgz : this is a segmentation in the FreeSurfer analysis created by running gtmseg --s uw.fsf01anat.
--reg registration.lta : registration to FreeSurfer analysis created above. The subjectname is imbedded
--mgx .01 : this instructs mri_gtmpvc to produce "extended" Muller-Gartner PVC maps. The .01 requires that a voxels have at least 1% gray matter or else it is set to 0. This is a liberal threshold that can be superceded in later processing
--km-ref 8 47 : save the average TAC from these segmentations in a text file called km.ref.tac.dat. This will be used as the reference TAC in the MRTM1 and MRTM2 analysis below. For this particular tracer (SB207145) we will use the cerebellar gray matter (8 and 47 are left and right cerebellar gray as found in $FREESURFER_HOME/FreeSurferColorLUT.txt). Different tracers may require different reference regions.
-km-hb 11 12 50 51 : save the average TAC from these segmentations in a file called km.hb.tac.dat. This will be used as the TAC from the "high-binding" regions when running MRTM2. For this tracer, we will use caudate and putamen. Different tracers may require different HB regions.
--no-rescale : do not rescale the output (often done in SUVR analysis)
--auto-mask 1 .1 : automatically create a mask so that irrelevant voxels outside of the are not analyzed. "1 .1" will roughly extend the mask about 1mm beyond the head. This is fine for all applications. The explanation of what "1 .1" means is a little complicated and not necessary to explain right now.
--default-seg-merge : merge smaller segmentations with larger ones

After this runs, cd into the output folder and examine the contents. There are a lot of files, and we'll only look at a couple of them:

 9   17 Left-Hippocampus                subcort_gm        87   30.486      333.332      50.3048

9 = ninth row, 17 = index for ROI, Left-Hippocampus = name of ROI, subcort_gm = tissue class, 87 = number of PET voxels in the ROI, 30.486 = variance reduction factor for ROI (based on GLM/SGTM), 333.332 = PVC uptake of ROI, 50 = resdiual varaince across voxels in the ROI. For kinetic modeling, this file is not that important.