Edits

This page lists the 'persistent' edits that can be made to subject data supported by the recon-all stream (both the default 'cross-sectional' stream, and the longitudinal stream). An 'edit' in this context is a manual intervention by a user necessary when the automated stream (recon-all) does not produce output that is correct or suitable as determined by the user, or if the automated stream fails outright. Manual interventions occur via the volume editing tool tkmedit, tkregister2, or by recon-all command-line options. 'Persistent' in this context means that an edit, once made, is treated as a permanent change: it is saved to a file in some manner (either a voxel change in a volume, or a text file listing points or commands), and it is automatically re-used by recon-all if recon-all is run again. The user does not need to re-specify the intervention, because it is saved and re-used (hence, 'persistent').

Persistent edits are removed via '-clean' options to recon-all. A 'persistent' edit is in contrast to the many possible recon-all options available to alter the operation of an executable but are not saved to disk (and not re-used by recon-all, thus necessitating the user to specify the options again on any future run of recon-all if that operation is desired). Specifying gm/wm intensity priors is an example of a 'non-persistent' edit (one which is not saved to disk). But note that just about any option can be made persistent via an expert options file (described in recon-all --help, and below).

All persistent edits made to a subject can be revealed by using the recon-all option -show-edits (available in v5.X).

Each of the persistent edits is now described. Where/when/how it is used is referenced, along with how recon-all handles it internally, and how it can be removed.

Note: all persistent edits can be removed with the option -clean

Other resources to learn about edits:


control points

user intervention

A control point is added to indicate a white matter voxel. See ControlPoints_freeview or ControlPoints_tktools for details. Control points are stored in the file <subjid>/tmp/control.dat.

recon-all handling

The -normalization, -canorm and -normalization2 stages use control points if present.

removal

-clean-cp moves <subjid>/tmp/control.dat to <subjid>/trash


talairach.xfm

user intervention

If the talairach alignment is wrong, tkregister2 is used to manually correct it. See Talairach_freeview or Talairach_tktools. The file <subjid>/mri/transforms/talairach.xfm stores the user modified transform.

recon-all handling

The -talairach stage creates the file talairach.auto.xfm, and copies it to talairach.xfm unless the file talairach.xfm already exists. If talairach.xfm already exists, it is assumed the user has either edited talairach.xfm, or it exists from a prior run of recon-all.

removal

-clean-tal moves <subjid>/mri/transforms/talairach.xfm to <subjid>/trash


brainmask.mgz

user intervention

Skull, dura and blood vessels might interfere with surface formation and need to be erased. See SkullStripFix_freeview or SkullStripFix_tktools for skullstrip edits. See PialEdits_freeview or PialEdits_tktools for pial edits . The file <subjid>/mri/brainmask.mgz is edited by the user.

recon-all handling

The -skullstrip stage creates the file brainmask.auto.mgz and copies it to brainmask.mgz unless the file brainmask.mgz already exists. If brainmask.mgz already exists, it is assumed the user has either edited brainmask.mgz, or it exists from a prior run of recon-all. brainmask.mgz is used in the -gcareg, -canorm, -careg, -normalization2, -wmparc, and -aparc+aseg-stats stages.

removal

-clean-bm moves <subjid>/mri/brainmask.mgz to <subjid>/trash


wm.mgz

user intervention

Sometimes the white matter is not segmented correctly: voxels that should be white matter are sometimes excluded, and other times voxels that should not be white matter are included in error. Either of these occurrences can be fixed with manual edits to the file <subjid>/mri/wm.mgz. See WhiteMatterEdits_freeview or WhiteMatterEdits_tktools for white matter edits. See TopologicalDefect_freeview or TopologicalDefect_tktools for correcting topological defects.

recon-all handling

If wm.mgz exists, then it is copied to wm.seg.mgz, and any voxel deletions or additions in that file are kept by mri_segment during the -segmentation stage.

removal

-clean-wm moves <subjid>/mri/wm.mgz and wm.seg.mgz to <subjid>/trash


aseg.mgz

user intervention

If the automatic subcortical segmentation does not label voxels correctly, or to the users satisfaction, they may change the voxel values in <subjid>/mri/aseg.mgz using tkmedit. Instructions on how to edit the aseg can be found at FreeviewSegmentations or TkMeditSegmentations.

recon-all handling

If both aseg.mgz and aseg.auto.mgz exist, and they are different, then the file aseg.manedit.mgz is created from the differences (and if an aseg.manedit.mgz file also exists, then its contents are merged with the newly created aseg.manedit.mgz). If aseg.manedit.mgz exists, then its contents are merged with aseg.auto.mgz (which is the output of the automatic segmentation program mri_ca_label). The default action, if neither aseg.manedit.mgz nor aseg.mgz exist, is to copy aseg.auto.mgz to aseg.mgz.

removal

-clean-aseg moves <subjid>/mri/aseg.mgz and aseg.manedit.mgz to <subjid>/trash


brain.finalsurfs.mgz

user intervention

Where surface errors occur, and other forms of edits (control points or wm.mgz edits) do not correct the surface, voxel edits to the file <subjid>/mri/brain.finalsurfs.manedit.mgz can be made. That file is created by the user from a copy of brain.finalsurfs.mgz.

recon-all handling

If brain.finalsurfs.manedit.mgz exists, then the voxels with values 255 (cloned) and 1 (deleted) are transferred to brain.finalsurfs.mgz.

removal

-clean-bfse moves <subjid>/mri/brain.finalsurfs.manedit.mgz to <subjid>/trash


seed points, fill and cut

user intervention

A 'seed point' is used to correct a failure of mri_fill in 'filling' the white matter volume and cutting the hemis and the pons. If a failure occurs, then voxel coordinates ('seed' points) are specified on the recon-all command line indicating one or more of: 1. center of pons (-pons-crs C R S), 2. center of corpus callosum (-cc-crs C R S), 3. center of right hemi (-rh-crs C R S), and 4. center of left hemi (-lh-crs C R S). Recon-all will save these coords in the files <subjid>/scripts/seed-pons.crs.man.dat, seed-cc.crs.man.dat, seed-rh.crs.man.dat, and seed-lh.crs.man.dat.

recon-all handling

If any of the files <subjid>/scripts/seed-pons.crs.man.dat, seed-cc.crs.man.dat, seed-rh.crs.man.dat, and seed-lh.crs.man.dat exist, their contents are read and used during mri_fill.

removal

-clean-seed will move <subjid>/scripts/seed-*.crs.man.dat to <subjid>/trash (note: the watershed seed point file is also moved)


seed point, watershed

user intervention

A 'seed point' can be used to correct a failure of mri_watershed during the skull-strip stage. If a failure occurs, and the other skull-strip interventions do not work, then voxel coordinates (a 'seed' point) are specified on the recon-all command line (-wsseed C R S) indicating center of white matter in either hemi. Recon-all will save these coords in the file <subjid>/scripts/seed-ws.crs.man.dat.

recon-all handling

If the file <subjid>/scripts/seed-ws.crs.man.dat exists, its contents are read and used during mri_watershed.

removal

-clean-seed will move <subjid>/scripts/seed-*.crs.man.dat to <subjid>/trash (note: the fill-and-cut seed point files are also moved)


cw256

user intervention

If a scan has a field-of-view (FOV) greater than 256, the -cw256 flag must be added to the recon-all command to force the FOV to 256.

recon-all handling

If the -cw256 flag is included in the recon-all command string, then mri_convert will crop the image to a FOV of 256. Also, an empty file named <subjid>/tmp/cw256 is created. Subsequent runs of recon-all will not require the -cw256 flag, but rather will check for the existence of the file <subjid>/tmp/cw256.

removal

-clean-cw256 moves the file <subjid>/tmp/cw256 to <subjid>/trash


expert options

user intervention

The 'expert options' functionality of recon-all allows a user to specify flags to specific executables in order to override or modify the defaults. The user creates a file containing one or more lines where the first item is the name of the command, followed by the extra options. For example, if a file called expert.opts is created containing these lines:

  mri_em_register -p .5
  mris_topo_fixer -asc

then the option "-p .5" will be passed to mri_em_register, and "-asc" will be passed to mris_topo_fixer. The name of the expert options file is passed to recon-all with the -expert flag, eg. recon-all -expert expert.opts

recon-all handling

The expert options file is copied to <subjid>/scripts/expert-options, and re-used in subsequent runs of recon-all.

removal

-clean-xopts moves the file <subjid>/scripts/expert-options to <subjid>/trash

Edits (last edited 2015-04-20 16:48:54 by MartinReuter)