Skip to content

Commit a7adae3

Browse files
authored
Merge pull request #729 from christianewert/patch-3
Fix typos in LONG.md
2 parents 870a9c9 + 9302bbd commit a7adae3

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

doc/overview/LONG.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Longitudinal Processing
22

3-
FastSurfer has a dedicated pipeline to quantify longitudinal changes in T1-weighted MRI. FastSurfer's longitudinal pipeline outpeforms independent (cross sectional) processing of individual MRIs across time in both FastSurfer and FreeSurfer, as well as even the longitudional pipeline in FreeSurfer.
3+
FastSurfer has a dedicated pipeline to quantify longitudinal changes in T1-weighted MRI. FastSurfer's longitudinal pipeline outperforms independent (cross-sectional) processing of individual MRIs across time in both FastSurfer and FreeSurfer, as well as even the longitudinal pipeline in FreeSurfer.
44

55
## What is Longitudinal Processing
66

7-
In longitudinal studies, MRIs of the same participant are acquired at different time points. Usually the goal is to quantify potentially subtle anatomical changes representing early disease effects or effects of disease modifying therapies or drug studies. In these situations we know that most of the anatomy will be very similar, as compared to cross sectional differences between participants. Longitudinal processing, as opposed to independent processing of each MRI, tries to make use of the joint information to reduce variance across time, leading to more sensitive estimates of longitudinal changes. This methodological approach leads to increased statistical power to detect subtle changes and, therefore, permits to either find smaller effects or to reduce the number of particiants needed to detect such an effect - saving time and money. Our paper for the FreeSurfer longitudinal stream (Reuter et al. [2012](https://doi.org/10.1016/j.neuroimage.2012.02.084)) nicley highlights these advantages, such as increased reliability and sensitiviy and describes the general idea.
7+
In longitudinal studies, MRIs of the same participant are acquired at different time points. Usually, the goal is to quantify potentially subtle anatomical changes representing early disease effects or effects of disease-modifying therapies or drug studies. In these situations, we know that most of the anatomy will be very similar, as compared to cross-sectional differences between participants. Longitudinal processing, as opposed to independent processing of each MRI, tries to make use of the joint information to reduce variance across time, leading to more sensitive estimates of longitudinal changes. This methodological approach leads to increased statistical power to detect subtle changes and, therefore, permits either finding smaller effects or reducing the number of participants needed to detect such an effect - saving time and money. Our paper for the FreeSurfer longitudinal stream (Reuter et al. [2012](https://doi.org/10.1016/j.neuroimage.2012.02.084)) nicely highlights these advantages, such as increased reliability and sensitivity, and describes the general idea.
88

9-
Generally the idea is to:
9+
Generally, the idea is to:
1010
- Align images across time robustly into an unbiased mid-space (Reuter et al. [2010](https://doi.org/10.1016/j.neuroimage.2010.07.020)).
11-
- Construct a template image for each participant (called within-subject template).
11+
- Construct a template image for each participant (called a within-person template).
1212
- Process the template image, e.g. to generate initial WM and GM surfaces.
1313
- Process each time point, initializing or reusing results from the template, yet allowing enough freedom for results to evolve.
1414

1515
This approach is used in FreeSurfer and in FastSurfer and it avoids multiple issues that are inherent to other approaches:
1616
- It avoids the introduction of processing bias (Reuter, Fischl [2011](https://doi.org/10.1016/j.neuroimage.2011.02.076)) by treating all time points the same.
17-
- It is independent on the number of time points, and independent of the time differences between acquisitions.
18-
- It is flexible enough to not over-constrain (smooth) longitudinal effects.
19-
- It does not enforce or encourage directional temporal changes (e.g. atrophy) and can therefore be used in studying cyclic patterns, or cross-over drug studies.
17+
- It is independent of the number of time points and independent of the time differences between acquisitions.
18+
- It is flexible enough not to over-constrain (smooth) longitudinal effects.
19+
- It does not enforce or encourage directional temporal changes (e.g. atrophy) and can therefore be used in studying cyclic patterns, or crossover drug studies.
2020

2121
## How to Run Your Data
2222

23-
We are providing a new entry script `long_fastsurfer.sh` to help you process longitudinal data.
23+
We are providing a new entry script, `long_fastsurfer.sh`, to help you process longitudinal data.
2424

2525
```bash
2626
# Setup FASTSURFER and FREESURFER
@@ -38,11 +38,11 @@ $FASTSURFER_HOME/long_fastsurfer.sh \
3838
--tpids <tID1> <tID2> ...
3939
```
4040

41-
Here `<templateID>` is a name you assign to this individual person and will be used in the output directory (`$SUBJECTS_DIR`) for the directory containing the within-subject template (e.g. "`--tid bert`"). The `<T1_1> <T1_2>` etc. are the global paths to the input full head T1w images for each time point (do not need to be bias corrected) in nifti or mgz format. The `<tID1> <tID2>` etc. are the ID names for each time point. Corresponding directories will be created in the output directory (`$SUBJECTS_DIR`) , e.g. "`--tpids bert_1 bert_2`". These directories will contain the final results for each time point for downstream analysis.
41+
Here `<templateID>` is a name you assign to this individual person and will be used in the output directory (`$SUBJECTS_DIR`) for the directory containing the within-subject template (e.g. "`--tid bert`"). The `<T1_1> <T1_2>` etc. are the global paths to the input full head T1w images for each time point (do not need to be bias corrected) in nifti or mgz format. The `<tID1> <tID2>` etc. are the ID names for each time point. Corresponding directories will be created in the output directory (`$SUBJECTS_DIR`), e.g. "`--tpids bert_1 bert_2`". These directories will contain the final results for each time point for downstream analysis.
4242

4343
Note, with a few exceptions, you can add additional flags that can be understood by `run_fastsurfer.sh`, which will be passed through, e.g. the `--3T` when working with 3T images.
4444

45-
The above command will, of course, be slightly different when using the preferred installation way Singularity (or Docker). For example for Singularity:
45+
The above command will, of course, be slightly different when using your preferred installation in Singularity or Docker. For example, for Singularity:
4646

4747
```bash
4848
singularity exec --nv \
@@ -60,7 +60,7 @@ singularity exec --nv \
6060
--3T
6161
```
6262

63-
For Docker this is very similar, but we need to specify the entrypoint explicitly:
63+
For Docker, this is very similar, but we need to specify the entrypoint explicitly:
6464

6565
```bash
6666
docker run --gpus all --rm --user $(id -u):$(id -g) \
@@ -77,15 +77,15 @@ docker run --gpus all --rm --user $(id -u):$(id -g) \
7777
--3T
7878
```
7979

80-
For speed-up you can also add ```--parallel_surf max --threads_surf 2``` to run all hemispheres of all time points for the surface module in parallel (if you have enough CPU threads and RAM). Also, sometimes the FreeSurfer license is not called `license.txt` but `.license` (from older FreeSurfer versions).
80+
For speed-up, you can also add ```--parallel_surf max --threads_surf 2``` to run all hemispheres of all time points for the surface module in parallel (if you have enough CPU threads and RAM). Also, sometimes the FreeSurfer license is not called `license.txt` but `.license` (from older FreeSurfer versions).
8181

82-
Note, FastSurfer does not like if you pass images with different voxel sizes across time. That should never happen anyway in a longitudinal study, as you would never even think of changing your acquisition sequences, right? That would introduce potential bias due to consistent changes in the way that time points are acquired. If you want to process that kind of data, conform images first (e.g. with ```mri_convert --conform```) and beware that you may introduce biases here (maybe account for the acquisition change with a time varying co-variate in your LME statistical model later).
82+
Note, FastSurfer does not like it if you pass images with different voxel sizes across time. That should never happen anyway in a longitudinal study, as you would never even think of changing your acquisition sequences, right? That would introduce potential bias due to consistent changes in the way that time points are acquired. If you want to process that kind of data, conform images first (e.g. with ```mri_convert --conform```) and beware that you may introduce biases here (maybe account for the acquisition change with a time varying co-variate in your LME statistical model later).
8383

8484
## Single Time Point Cases
8585

8686
Sometimes your longitudinal data set contains participants with only one time point, e.g. due to drop-out or QC exclusion. Instead of excluding single-time point cases completely (which may even bias results), you can include them for better statistics. While this obviously will not help to better estimate longitudinal slopes, linear mixed effects models (LMEs), for example, can include single time point data to obtain better estimates of cross-subject variance.
8787

88-
HOWEVER, this requires that you process these cases also through the longitudinal stream! This is very important, to ensure that they undergo the same processing steps as data from cases with multiple time points. Only then are the results comparable. The command is the same as above, just specify only the single t1 and time point id. Could not be any easier.
88+
HOWEVER, this requires that you process these cases also through the longitudinal stream! This is very important to ensure that they undergo the same processing steps as data from cases with multiple time points. Only then are the results comparable. The command is the same as above, just specify only the single t1 and the time point ID. It could not be any easier.
8989

9090
## Behind the Scenes
9191

@@ -94,20 +94,20 @@ HOWEVER, this requires that you process these cases also through the longitudina
9494
```bash
9595
long_prepare_template.sh \
9696
--tid <templateID> \
97-
--i1s <T1_1> <T1_2> ... \
97+
--t1s <T1_1> <T1_2> ... \
9898
--tpids <tID1> <tID2>
9999
```
100-
This will register (align) all time point images into the unbiased mid-space using `mri_robust_template`, after an initial segmentation and skull stripping. It will also create the template image, kind of a mean image across time. For single time point cases it will align the input into a standard upright position.
100+
This will register (align) all time point images into the unbiased mid-space using `mri_robust_template`, after an initial segmentation and skull stripping. It will also create the template image, kind of a mean image across time. For single time point cases, it will align the input into a standard upright position.
101101
2. [Template Seg] Next, the template image will be segmented via a call to `run_fastsurfer.sh --sid <templateID> --base --seg_only ...` where the `--base` flag indicates that the input image will be taken from the already existing template directory.
102102
3. [Template Surf] This is followed by the surface processing of the template `run_fastsurfer.sh --sid <templateID> --base --surf_only ...`, which can be combined with the previous step.
103103
4. [Long Seg] Next, the segmentation of each time point, which can theoretically run in parallel with the previous two steps, is performed `run_fastsurfer.sh --sid <tIDn> --long <templateID> --seg_only ...`,
104-
5. [Long Surf] Again followed by the surface processing for each time point: `run_fastsurfer.sh --<id <tIDn> --long <templateID> --surf_only`. This step needs to wait until 3. and 4. (for this time point) are finished. In this step, for example, surfaces are initialized with the ones obtained on the template above and only fine-tuned, instead of recreating them.
104+
5. [Long Surf] Again followed by the surface processing for each time point: `run_fastsurfer.sh --sid <tIDn> --long <templateID> --surf_only`. This step needs to wait until 3. and 4. (for this time point) are finished. In this step, for example, surfaces are initialized with the ones obtained on the template above and only fine-tuned, instead of being recreated from scratch.
105105

106-
Internally we use `brun_fastsurfer.sh` as a helper script to process multiple time points in parallel (in the LONG steps 4. and 5.). Here `--parallel_seg` can be passed to `long_fastsurfer.sh` to specify the number of parallel runs during the segmentation step (4) which is usually limited by GPU memory, if run on the GPU. Further `--parallel_surf` specifies the number of parallel surface runs on the CPU and is most impactful. It can be combined with `--threads_surf 2` (or higher) to switch on parallelization of the two hemispheres in each surface block.
106+
Internally, we use `brun_fastsurfer.sh` as a helper script to process multiple time points in parallel (in the LONG steps 4. and 5.). Here, `--parallel_seg` can be passed to `long_fastsurfer.sh` to specify the number of parallel runs during the segmentation step (4), which is usually limited by GPU memory, if run on the GPU. Further, `--parallel_surf` specifies the number of parallel surface runs on the CPU and is most impactful. It can be combined with `--threads_surf 2` (or higher) to switch on parallelization of the two hemispheres in each surface block.
107107

108108
## Final Statistics:
109109

110-
The final results will be located in `$SUBJECTS_DIR/tID1` ... for each time point. These directories will have the same structure as a regular FastSurfer/FreeSurfer output directory. Therefore, you can use the regular downstream analysis tools, e.g. to extract statistics from the stats files. Note, that the surfaces are already in vertex-correspondence across time for each participant. For group analysis one would still need to map thickness estimates to fsaverage spherical template (this is usually done with `mris_preproc`). For longitudinal statistics using the (recommended) linear mixed effects models see our R toolbox [FS LME R](https://github.com/Deep-MI/fslmer), which can also analyze the mass-univariate situation for e.g. cortical thickness maps. Alternatively use this Matlab package: [LME Matlab](https://github.com/NeuroStats/lme) and our matlab tools for time-to-even (survival) analysis: [Survival](https://github.com/NeuroStats/Survival).
110+
The final results will be located in `$SUBJECTS_DIR/tID1` ... for each time point. These directories will have the same structure as a regular FastSurfer/FreeSurfer output directory. Therefore, you can use the regular downstream analysis tools, e.g. to extract statistics from the stats files. Note that the surfaces are already in vertex correspondence across time for each participant. For group analysis, one would still need to map thickness estimates to the fsaverage spherical template (this is usually done with `mris_preproc`). For longitudinal statistics using the (recommended) linear mixed effects models, see our R toolbox [FS LME R](https://github.com/Deep-MI/fslmer), which can also analyze the mass-univariate situation, e.g. for cortical thickness maps. Alternatively, you can use this Matlab package: [LME Matlab](https://github.com/NeuroStats/lme) and our Matlab tools for time-to-event (survival) analysis: [Survival](https://github.com/NeuroStats/Survival).
111111

112112
## References
113113

0 commit comments

Comments
 (0)