#pragma section-numbers 1 {{{#!html

Longitudinal Edits

}}} '''<>''' * This page describes how edits are done in the longitudinal stream of FreeSurfer versions 5.1 and up. * If you use this software for your study, please cite our papers (see [[FreeSurferMethodsCitation]] )! Specifically Reuter et al. !NeuroImage 2012 describing the longitudinal pipeline should be cited. * Please read the general description of edits first: [[Edits]]. * Also make sure you understand the Longitudinal Stream: [[LongitudinalProcessing]]. * You can also take a look at the [[FsTutorial/LongitudinalTutorial|Longitudinal Tutorial]] that also describes edits. Generally, '''edit stuff as early in the stream as possible'''. That means first edit the cross sectional runs, rerun from that point to complete the cross sectional run, recreate the base (from scratch, i.e. remove or rename that directory). Check and edit the base, reprocess the base from that point, finally recreate the longitudinal from scratch (removing or renaming the directory if it existed) with the new base. Optimally there should be no editing necessary in the long runs, but it is recommended to check them. For exceptions and special treatment in specific cases see the detailed description below. Note, if you rerun a base or longitudinal from the start, make sure you '''delete or rename''' any existing directories to assert that edits are correctly copied over. Since the surfaces in the long are initialized with surfaces from the base, it is '''important to edit and fix surfaces in the base'''! Instead of doing everything the nice and clean way (editing as early as possible), you probably get away with just editing the base in many cases. After editing the base, you need to rerun the base before running the longitudinals (again). When you re-run a base (template) or long run, even partially, you still '''need to pass -base or -long flags''' with the required arguments in addition to the desired parameters (e.g. -autorecon2 -autorecon3). For example: {{{ recon-all -base -tp -tp ... -autorecon2 -autorecon3 }}} (here replace '...' with more time point flags, if you have them). Then for all time points you run the longitudinals as usual: {{{ recon-all -long -all }}} Also note, you '''cannot rename''' any of the time points (cross or long) and rerun during this process. Renaming is only possible if you are recreating the base AND all longitudinal runs from scratch. Instead of renaming, when editing you might want to first '''create a backup copy''' of the existing directory for comparison and to have the option to go back to the earlier results later. If you just want to quality check results, you would start in the reverse order. First QC the longitudinal runs, if they are fine, there is no need to look at the base or cross results. If you find problems, go up a step to see if these problems exist in the base or cross runs already. So the rule is: QC from back to front (long -> base -> cross), once you find where problems occur, edit from front to back (cross -> base -> long). ---- == Cheat Sheet == 1. Surfaces in Long are initialized from surfaces in Base (need to be accurate in base) 1. Edits get usually automatically transferred from Cross to Long (within the time point) 1. It should rarely be necessary to edit the Long 1. control points: optional flag -uselongbasectrlvol copies control points from base to long (if only little longitudinal change is expected) 1. brainmask.mgz: shortcut might be to edit only the base || '''Edits''' || '''Cross'''|| '''Base'''|| '''Long'''|| || '''control points'''|| 1. fix here (better norm.mgz will improve base)|| 2. fix, if still necessary || 3. get transferred from cross, fix if still necessary (unlikely)|| || '''talairach.xfm'''|| 1. fix here|| 2. fix here|| ''Cannot be edited in long, is the same as base''|| || '''brainmask.mgz'''|| 1. fix (will improve base, which is the union of all masks)|| 2. computed from all cross, fix if still necessary|| 3. gets transferred from base, fix if necessary|| ||'''wm.mgz'''|| (maybe here)|| 1. fix here, should fix longs|| Fix in cross or here, if still necessary|| || '''aseg.mgz'''|| Usually not necessary|| fix here: if surfaces need to be changed due to incorrect labeling|| Here: if you want to correct volume of structures|| || '''brain.finalsurfs.mgz'''|| 1. fix here|| 2. fix here (to fix surfaces in long)|| 3. edits get transferred from cross and uses surfaces from base. Fix if still necessary.|| ||'''fill/cut seed points'''|| Usually not necessary|| 1. fix here|| untested|| ||'''watershed seed points'''|| 1. only here|| ''Not possible in base (brainmask is union)''|| ''Not possible in long''|| ||'''cw256'''|| 1. only here|| ''Inherited''|| ''Inherited'' || ---- == control points == Control points edits can be done to the cross, the base and the long runs. ''Recommendation'': Edit in cross and base. First CP edits should be done in the cross if necessary. They will influence the norm.mgz and therefore the base, so base and later the long runs need to be rerun (from scratch). If edits have been done to the cross, they are mapped and used in the long runs by default, so also editing the longitudinals should not be necessary! However it might be necessary to also edit the base if the same problem still exists there. It should be asserted that the surfaces in the base are correct, because they are used to initialize surfaces in the longitudinal runs. ''Special cases with little longitudinal change'': Optionally, CP edits can transferred from the base (instead of the cross runs) into specific longitudinal runs by specifying the ''-uselongbasectrlvol'' in the -long run. This can be helpful if longitudinal structural differences are expected to be very small (e.g. test-retest data). Then the CPs from the base are meaningful in ''all'' affected time points and can be copied, instead of editing each TP individually. To check if an edit in the base is meaningful in several time points, you can open all these images on top of each other (e.g. using freeview), as they are in the same voxel space (since FS 5.1). In both cases (mapping CP from the cross, or transferring them from the base), it is recommended to check if all CPs are accurately placed in the long. They might move into a neighboring voxel when mapped from the cross, due to the resampling of the mapping, or they might not be meaningful due to longitudinal change when taken from the base. ---- == talairach.xfm == ''Recommendation'': Edit in cross and base. A broken talairach.xfm can badly influence many downstream results. Therefore it is important to edit these problems if they occur, as early as in the cross sectionals. The talairach.xfm is common for all longitudinal runs. It is taken from the base and therefore also needs to be checked and edited there. ---- == brainmask.mgz == The brainmask.mgz can be edited in the cross, base and long. ''Recommendation'': Edit the cross and base. ''QA Shortcut'': instead of inspecting the brainmask.mgz in all time points, you can instead inspect the brainmask.mgz in the base of each subject. If it is incorrect, check all cross time points of that subject and fix brainmask there, re-run cross with -autorecon2 -autorecon3 and re-run base from scratch. The base brainmask should be OK now, if not, repeat. ''Info'': The brainmask in the base is a union (logical OR) of the brainmasks from the cross. Therefore, if the base is started after the cross have been edited and re-run, it will contain edits from the cross (delete the base if it already existed, before recreating it). The longitudinals all use the brainmask from the base, therefore the brainmask should be edited first in the cross, then manually in the base if it is still not correct there. ''Possible Edit Shortcut'': It might be enough to only edit the base, the brainmask will then be copied to the longitudinal runs and should fix things there. ''Edits to Long'': In rare occasions it might be problematic to use a single brainmask (from the base) for all time points due to significant longitudinal change in the images. In that case the individual brainmask in the long runs can be edited as a last resort. ''Warning'': if the brainmask.mgz is available in the .long.