#pragma section-numbers 2
= Longitudinal Stream (FS 4.5 and 5.0) =
'''WARNING:''' <
>
The longitudinal stream in FreeSurfer 5.0 (distribution package) is broken!<
>
PLEASE LOAD FIXED BINARIES (links here: [[LongitudinalChangeLog]]) !
This page describes the most current version of the longitudinal stream in FreeSurfer.
If you use it for your study, please cite our papers (see [[FreeSurferMethodsCitation]] )!
See [[LongitudinalChangeLog]] for a change log of the last versions.
<>
----
== Background ==
Compared with cross-sectional studies, a longitudinal design can significantly reduce the confounding effect of inter-individual morphological variability by using each subject as his or her own control. As a result, longitudinal imaging studies are getting increased interest and popularity in various aspects of neuroscience. The default FreeSurfer pipeline is designed for the processing of individual data sets (cross-sectionally), and thus not optimal for the processing of longitudinal data series. It is an active research area at the Martinos Center for Biomedical Imaging, how to obtain robust and more reliable cortical and subcortical morphological measurements by incorporating additional (temporal) information in a longitudinal data series.
The longitudinal scheme is designed to be unbiased with respect to any time point. Instead of initializing it with information from a specific time point, a template volume is created and run through FreeSurfer. This template can be seen as an initial guess for the segmentation and surface reconstruction. The FreeSurfer cortical and subcortical segmentation and parcellation procedure involves solving many complex nonlinear optimization problems, such as the deformable surface reconstruction, the nonlinear atlas-image registration, and the nonlinear spherical surface registration. These nonlinear optimization problems are usually solved using iterative methods, and the final results are known to be highly sensitive to the selection of a particular starting point (a.k.a. algorithm initialization). It is our belief that by initializing the processing of a new data set in a longitudinal series using the processed results from the unbiased template, we can reduce the random variation in the processing procedure and improve the robustness and sensitivity of the overall longitudinal analysis. Such an initialization scheme makes sense also because a longitudinal design is often targeted at detecting small or subtle changes. Additionally to the template new probabilistic methods (temporal fusion) were introduced to further reduce the variability of results across time points. For these algorithms it becomes necessary to process all time points cross-sectionally first.
The longitudinal processing scheme is coded in the recon-all script via the flags "'''-base'''" (template creation) and "'''-long'''" (longitudinal runs).
== References ==
Highly Accurate Inverse Consistent Registration: A Robust Approach,
M. Reuter, H.D. Rosas, B. Fischl. NeuroImage 53 (4), pp. 1181-1196, 2010.
http://dx.doi.org/10.1016/j.neuroimage.2010.07.020 <
>
http://reuter.mit.edu/papers/reuter-robreg10.pdf
Avoiding Asymmetry-Induced Bias in Longitudinal Image Processing,
M. Reuter, B. Fischl. NeuroImage, 2011.
http://dx.doi.org/10.1016/j.neuroimage.2011.02.076 <
>
http://reuter.mit.edu/papers/reuter-bias11.pdf
Also see [[FreeSurferMethodsCitation]].
== Workflow Summary ==
'''Step 1. cross-sectionally process all time points with the default workflow (tpN is one of the timepoints):'''
{{{
recon-all -all -s -i path_to_tpN_dcm
}}}
'''Step 2. create an unbiased template from all time points for each subject and process it with recon-all:'''
{{{
recon-all -base -tp -tp ... -all
}}}
can be started once all norm.mgz files are available from the cross sectional processing of the individual timepoint (step 1). The represents a new
average template for this subject and the name needs to be chosen by the user. A directory with this name will be created in $SUBJECTS_DIR. This needs to be passed to the longitudinal processing of each timepoint of this subject below (step 3). Note, the '...' means that more timepoints can be used as "-tp ".
'''Step 3. "-long" longitudinally process all timepoints:'''
{{{
recon-all -long -all
}}}
The longitudinal processing scheme is coded in the recon-all script via the "-long" flag. These runs will be much faster than the cross sectional or template runs above. This step produces output subject data containing '''.long.''' in the name (to help distinguish from the default stream).
'''Step 4. Compare results from step 3:''' <
>
E.g. calculate differences between .long. and .long.. Do not compare to the template, as that is merely a blurry guess of where things are located in the specific subject, used only for the initialization of the longitudinal runs.
----
In the following, we describe the two processing streams. We assume that the longitudinal series has time-points tpN (tp1, tp2, ...). All of these have already been processed cross sectionally using the standard FreeSurfer recon-all (step 1). First we discuss the construction of the template (step 2) and then the longitudinal processing of tpN (step 3).
== Creation of Template (recon-all -base) ==
In step 2 the unbiased template is created for each subject using information from all of its time points. It is possible to start the template construction once the norm.mgz of all time points are available from step 1. After the template is fully processed it is used as an initial guess to initialize many steps in the longitudinal runs (step 3). Also, the [[eTIV]] of the template can probably be used as a robust measure for head size (instead of using the [[eTIV]] of the individual time points), as eTIV should not change over time. However, this needs to be investigated further.
The following paragraphs will explain details on what happens inside the recon-all -base. Only the differences to the regular cross sectional recon_all are discussed.
=== Template Initialization (-base-init) ===
The template is created in the -base-init block of recon-all. This is achieved by [[mri_robust_template]], which constructs an unbiased mean or median (default) norm_template.mgz volume together with the transforms that align each tp's norm.mgz volume with the template (see also [[mri_robust_register]] which is used by [[mri_robust_template]] to construct the maps). The longitudinal scheme later requires aligning the image data of tpN to the template, thus all time points are aligned to an unbiased common space with the command:
{{{
mri_robust_template --mov --lta --template /mri/norm_template.mgz
}}}
where the input --mov is a list of the time point's norm.mgz files and the output --lta a list of the LTA registrations files that take each tp to the template and --template ... norm_template.mgz the median image. The LTA maps are stored in /mri/transforms/_to_.lta. Also the inverse maps are needed and constructed by
{{{
mri_concatenate_lta -invert1 _to_.lta identity.nofile _to_.lta
}}}
Since all data sets come from the same subject, these rigid registrations with 6 dof (translation,rotation) are sufficient to get a good alignment between the (intensity normalized) images (i.e. norm.mgz). The registrations and its inverse will be used to transfer information between time points mutually and between time points and the template in the longitudinal stream. The routine [[mri_robust_template]] uses robust statistics to automatically detect outliers and align the rest of the image in an optimal manner. The median template is unbiased with respect to any timepoint and therefore perfectly suited as a template to produce initializations for several steps in the longitudinal runs (see below).
After the registrations and the norm_template.mgz volume are created, the orig.mgz images from all TPs are mapped to the template location and averaged (again the default is the median image) to produce the /mri/orig/001.mgz image. This image is then processed cross-sectionally with the standard FreeSurfer stream, mainly to obtain the talairach.xfm, nu.mgz and T1.mgz image, however very early we switch over to the norm_template.mgz.
It is possible to check the registrations and template creation either using the norm.mgz or orig.mgz of all time points. These images are first mapped to and resampled in the space of the template with:
{{{
mri_convert -rl /mri/norm.mgz -at /mri/transforms/_to_.lta /mri/norm.mgz _to_.norm.mgz
}}}
The resampled files _to_.norm.mgz can than be compared with each other or with the template's norm_template.mgz using e.g. tkmedit -f file1 -aux file2.
If you want to compare aseg.mgz files, make sure, you use ''nearest'' for the resample type:
{{{
mri_convert -rl /mri/aseg.mgz -rt nearest -at /mri/transforms/_to_.lta /mri/aseg.mgz _to_.aseg.mgz
}}}
Except for the following steps, the template is processed with the default cross sectional stream:
=== Skull Strip (-skullstrip) ===
Use the norm_template.mgz as brainmask.mgz. This is possible as the norm_template.mgz contains only brain (being constructed from norm.mgz images). The norm_template.mgz can be seen as a robust OR of all norm.mgz images of the different TPs.
=== EM (GCA) Registration (-gcareg) ===
Use the norm_template.mgz instead of the nu.mgz for the Talairach registration. The resulting registration {{{talairach.lta}}} should be checked as it will be used in the longitudinal stream and will influence all time points.
=== CA Normalize (-canorm) ===
Use the norm_template.mgz instead of the nu.mgz for the normalization. This ensures that the norm_template is correctly normalized.
''(internal note: this step might not be necessary, should be checked if norm_template.mgz is already sufficiently normalized)''
----
== Longitudinal Stream (recon-all -long) ==
In the -long stream we set {{{NoRandomness = 1}}} (always use same seed for RNG).
Affects [[mris_smooth]], [[mris_fix_topology]], [[mris_topo_fixer]], [[mris_sphere]], and [[mris_ca_label]])
=== Input (-i) ===
Copy the {{{orig/00?.mgz}}} from the cross sectionals.
=== Motion Corrections (-motioncor) ===
Copy the {{{rawavg.mgz}}} and {{{orig.mgz}}} from the cross sectionals.
=== NU Intensity Correction (-nuintensitycor) ===
Copy the {{{nu.mgz}}} from the cross sectionals.
=== Talairach (-talairach) ===
Copy the {{{talairach.xfm}}} from the cross sectionals.
Note: the {{{talairach.xfm}}} is used for the [[eTIV]] estimation. It might turn out to be better to use the eTIV from the template instead of the slightly varying eTIV from the cross sectionals (eTIV should not change over time). In that case the {{{talairach.xfm}}} will be copied from the template to each TP in the future.
=== Normalization (-normalization) ===
Copy the {{{T1.mgz}}} from the cross sectionals.
=== Skull Strip (-skullstrip) ===
Map the brainmask.mgz (i.e. the norm_template.mgz) from the template to the current TP. Use it to mask the T1.mgz to obtain the brainmask.
Note, the brainmask in the template can be seen as an OR of all brainmasks of the individual TPs, as it is the norm_template image containing all stripped brains.
=== EM (GCA) Registration (-gcareg) ===
The {{{talairach.lta}}} is constructed from the template by concatenation with the map from the current TP to the template.
''(internal note: in the future maybe use the nu.mgz's from all TPS to construct the registration simultaneously (in the -base))''
=== CA Normalize (-canorm) ===
The normalization is initialized with the {{{aseg.mgz}}} of the template mapped to the current TP. Thus all TP's use similar control points for the normalization.
''(internal note: in the future maybe find the control points by looking at all nu.mgz's simultaneously (in the -base))''
=== CA Nonlinear Registration (-careg) ===
Uses the {{{talairach.m3z}}} from the template as initialization (after concatenation). Also different flags are used:
{{{
mri_ca_register -levels 2 -A 1 -l /mri/transforms/talairach.m3z /mri/transforms/totpN_regfile
}}}
=== CA Nonlinear Registration Inverse (-careginv) ===
No change.
=== Remove Neck (-rmneck) ===
No change.
=== EM Registration (with skull but no neck) (-skull-lta) ===
No change.
=== CA Label (-calabel) ===
Registers this TP to all others. Then creates {{{aseg.fused.mgz}}} by incorporating information of all TPS. Finally uses the fused aseg as initialization to mri_ca_label to construct the final labels. Furthermore, the intensity scaling factors are passed from the template.
''(internal notes: 1. Registrations can be done through the template, probably not much less accurate, but faster. 2. In the future maybe labeling all TPS simultaneously?)''
=== Normalization 2 (-normalization2) ===
No change.
=== Mask Brain Final Surface (-maskbfs) ===
No change.
=== WM Segmentation (-segmentation) ===
Transfer WM edits and deletions from template to TP.
=== Cut/Fill (-fill) ===
No change.
=== Tessellate (-tesselate) ===
Skipped.
=== Orig Surface Smoothing 1 (-smooth1) ===
Skipped.
=== Inflation 1 (-inflate1) ===
Skipped.
=== QSphere (-qsphere) ===
Skipped.
=== Automatic Topology Fixer (-fix) ===
Skipped.
=== Final Surfaces (-finalsurfs) ===
Map and use {{{?h.white}}} and {{{?h.pial}}} from the template to initialize white, pial and orig surfaces in current TP. This also ensures that all surfaces are indirectly registered (the vertex numbers agree) across all time points.
=== Surface Volume (-surfvolume) ===
No change.
=== Orig Surface Smoothing 2 (-smooth2) ===
No change.
=== Inflate 2 (-inflate2) ===
No change.
=== ASeg Stats (-segstats) ===
No change.
=== Spherical Inflation (-sphere) ===
{{{?h.sphere}}} copied from the template.
=== Ipsilateral Surface Registation (Spherical Morph) (-surfreg) ===
Extra flags to [[mris_register]]:
{{{
-nosulc -norot /surf/$hemi.sphere.reg
}}}
=== Jacobian (-jacobian_white) ===
No change.
=== Average Curvature (-avgcurv) ===
No change.
=== Cortical Parcellation (-cortparc) ===
Extra flags with [[mris_ca_label]]:
{{{
-long -R /surf/$hemi.aparc.annot
}}}
=== Parcellation Statistics (-parcstats) ===
No change.
=== Cortical Parcellation 2 (-cortparc) ===
Extra flags with [[mris_ca_label]]:
{{{
-long -R /surf/$hemi.aparc.a2005s.annot
}}}
=== Parcellation Statistics (-parcstats) ===
No change.
=== Cortical Ribbon Mask (-cortribbon) ===
No change.
=== Add Parcellation to ASeg (-aparc2aseg) ===
No change.
=== Update WMparc(-wmparc) ===
No change.
----
MartinReuter