Differences between revisions 57 and 74 (spanning 17 versions)
Revision 57 as of 2008-02-11 17:30:56
Size: 20032
Comment:
Revision 74 as of 2011-03-31 15:28:41
Size: 13908
Editor: KhoaNguyen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
||<bgcolor='#FFFFE0'>'''-legacy'''||<-5(bgcolor='#E0E0FF'>use this flag on data that was previously processed with a different version of freesurfer. Use this flag THE FIRST TIME only. It will automatically keep all your prior edits (talairach, control points, white matter etc). || ##||<bgcolor='#FFFFE0'>'''-legacy'''||<-5(bgcolor='#E0E0FF'>use this flag on data that was previously processed with a different version of freesurfer. Use this flag THE FIRST TIME only. It will automatically keep all your prior edits (talairach, control points, white matter etc). ||
Line 22: Line 22:
||<bgcolor='#FFFFE0'>'''-notal-check'''||<-5(bgcolor='#E0E0FF'>use this flag when running a subject after receiving an error about Tailarach Failure Detection and the tailarach transform looks fine after checking it with this command line: tkregister2 --mgz --s <subjid> --fstal ||
||<bgcolor='#FFFFE0'>'''-gcut'''||<-5(bgcolor='#E0E0FF'>use this flag when skull strip leaves a little bit of dura behind. In this case, adjusting the watershed parameters won't be as useful and manual edits will take too long. <<BR>>INFO: Care must be taken to thoroughly inspect your data when using -gcut. In particular, inpsect the edges of gm and cerebellum for over-aggressive cutting. Add -segmentation brainmask.gcuts.mgz to tkmedit to view the voxels which gcut has removed. ||
||<bgcolor='#FFFFE0'>'''-surfsegedit'''||<-5(bgcolor='#E0E0FF'>this flag fixes the gm and a few other areas in the aseg using info from the surfaces. Run after the surfaces are done. ||
||<bgcolor='#FFFFE0'>'''-multistrip'''||<-5(bgcolor='#E0E0FF'>use this flag on a subject when you would like to get skullstrip results using several different watershed preflood heights simultaneously. Output will be nu, orig, and T1 volumes stripped at these heights: 5, 10, 20, 30. You can change which preflood heights are used by setting this variable first: setenv WATERSHED_PREFLOOD_HEIGHTS '20 30 40 50'. Be sure to use -clean-bm with this flag. ||
||<bgcolor='#FFFFE0'>'''-deface'''||<bgcolor='#E0E0FF'>removes the face from the orig volume to anonymize it.||
||<bgcolor='#FFFFE0'>'''-vno_match_check'''||<bgcolor='#E0E0FF'> Confirms that the surface data is out of sync in case an error indicates that there is a size mismatch. Then run from whatever stage that is out of sync.||
Line 23: Line 29:
||<rowbgcolor='#80FF80'>'''recon-all flag'''||'''Used with step'''||'''Command'''||'''Description'''||
||<|2(bgcolor='#FFFFE0'>'''-no-ca-align'''||<bgcolor='#FFFFE0'>-careg||<bgcolor='#E0E0FF'>["mri_ca_register"]||<|2(bgcolor='#FFFFE0'>this flag should be used if the data to be processed comes from the same scanner platform and pulse sequence as the atlas. With the FreeSurfer RB40 atlas this means MPRAGE on a 1.5T Siemens scanner.||
||<bgcolor='#FFFFE0'>-calabel||<(bgcolor='#E0E0FF'>["mri_ca_label"]||
||<|7(bgcolor='#FFFFE0'>'''-subcortseg'''||<bgcolor='#FFFFE0'>-gcareg||<bgcolor='#E0E0FF'>["mri_em_register"] ||<|7(bgcolor='#FFFFE0'>runs the subcortical segmentation and associated statistics||
||<bgcolor='#FFFFE0'>-canorm||<bgcolor='#E0E0FF'>["mri_ca_normalize"]||
||<bgcolor='#FFFFE0'>-careg||<bgcolor='#E0E0FF'>["mri_ca_register"]||
||<bgcolor='#FFFFE0'>-rmneck||<bgcolor='#E0E0FF'>["mri_remove_neck"]||
||<bgcolor='#FFFFE0'>-skull-lta||<bgcolor='#E0E0FF'>["mri_em_register"]|| ||<bgcolor='#FFFFE0'>-calabel||<bgcolor='#E0E0FF'>["mri_ca_label"]||
||<bgcolor='#FFFFE0'>-segstats||<bgcolor='#E0E0FF'>["mri_segstats"]||
||<bgcolor='#FFFFE0'>'''-cc-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -C X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#FFFFE0'>manually sets the corpus callosum seed point||
||<bgcolor='#FFFFE0'>'''-pons-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -P X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#FFFFE0'>manually sets the pons seed point||
||<bgcolor='#FFFFE0'>'''-rh-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -rh X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#FFFFE0'>manually sets the right hemisphere seed point||
||<bgcolor='#FFFFE0'>'''-lh-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -lh X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#FFFFE0'>manually sets the left hemisphere seed point||
||<|2(bgcolor='#FFFFE0'>'''-jacobian_dist0'''||<|2(bgcolor='#FFFFE0'> ||<|2(bgcolor='#E0E0FF'>?h.sphere.reg||<|2(bgcolor='#E0E0FF'>mris_register -curv -norot -jacobian ../surf/lh.jacobian -dist 0 ../surf/lh.sphere.reg $FREESURFER_HOME/average/lh.average.curvature.filled.buckner40.tif ../surf/lh.sphere.dist0.jacobian.reg||<bgcolor='#E0E0FF'>?h.jacobian_dist0||<|2(bgcolor='#FFFFE0'>Computes how much an individual surface must be distorted in order to perfectly match the atlas (ie, distance contraints are turned off). ||
||<rowbgcolor='#E0E0FF'>?h.sphere.jacobian.reg||
||<|16(bgcolor='#FFFFE0'>'''-old-atlas'''||
||<|2(bgcolor='#FFFFE0'>-gcareg||<bgcolor='#E0E0FF'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_em_register"] -mask brain.mgz -p .5 -fsamples fsamples.mgz nu.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.lta||<|2(bgcolor='#E0E0FF'>transforms/talairach.lta||<|15(bgcolor='#FFFFE0'>Use this flag in conjunction with other steps of recon-all and it will default to the old set of atlases. Uses talairach_mixed.gca for the subcortical segmentation, ?h.average.tif for the surface morph, and ?h.atlas2002_simple.gcs for the cortical parcellations.||
||<rowbgcolor='#E0E0FF'>nu.mgz||
||<|3(bgcolor='#FFFFE0'>-canorm||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_normalize"] -mask brain.mgz nu.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.lta norm.mgz||<|3(bgcolor='#E0E0FF'>norm.mgz||
||<rowbgcolor='#E0E0FF'>nu.mgz||
||<rowbgcolor='#E0E0FF'>transforms/talairach.lta||
||<|3(bgcolor='#FFFFE0'>-careg||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_register"] -cross-sequence -mask brain.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.m3z||<|3(bgcolor='#E0E0FF'>transforms/talairach.m3z||
||<rowbgcolor='#E0E0FF'>transforms/talairach.lta||
||<rowbgcolor='#E0E0FF'>norm.mgz||
||<|2(bgcolor='#FFFFE0'>-calabel||<bgcolor='#E0E0FF'>norm.mgz||<|2(bgcolor='#E0E0FF'>["mri_ca_label"] -cross-sequence norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/talairach_mixed.gca aseg.mgz||<|2(bgcolor='#E0E0FF'>aseg.mgz||
||<rowbgcolor='#E0E0FF'>transforms/talairach.m3z||
||<bgcolor='#FFFFE0'>-surfreg||<bgcolor='#E0E0FF'>?h.sphere||<bgcolor='#E0E0FF'>["mris_register"] -w 0 -curv ?h.sphere $FREESURFER_HOME/average?h.average.tif ?h.sphere.reg||<bgcolor='#E0E0FF'>?h.sphere.reg||
||<|2(bgcolor='#FFFFE0'>-contrasurfreg||<bgcolor='#E0E0FF'>rh.sphere||<bgcolor='#E0E0FF'>["mris_register"] -w 0 -curv -reverse rh.sphere $FREESURFER_HOME/average?h.average.tif rh.lh.sphere.reg||<bgcolor='#E0E0FF'>rh.lh.sphere.reg||
||<rowbgcolor='#E0E0FF'>lh.sphere||["mris_register"] -w 0 -curv -reverse lh.sphere $FREESURFER_HOME/average?h.average.tif lh.rh.sphere.reg||lh.rh.sphere.reg||
||<bgcolor='#FFFFE0'>-avgcurv||<bgcolor='#E0E0FF'>?h.sphere.reg||<bgcolor='#E0E0FF'>["mrisp_paint"] -a 5 $FREESURFER_HOME/average?h.average.tif ?h.sphere.reg ?h.avg_curv||<bgcolor='#E0E0FF'>?h.avg_curv||
||<bgcolor='#FFFFE0'>-cortparc||<bgcolor='#E0E0FF'>?h.sphere.reg||<bgcolor='#E0E0FF'>["mris_ca_label"] -t $CPAnnotTable subj ?h sphere.reg $FREESURFER_HOME/average/?h.atlas2002_simple.gcs ?h.aparc.annot||<bgcolor='#E0E0FF'>label/?h.aparc.annot||
||<bgcolor='#FFFFE0'>'''-deface'''||<bgcolor='#FFFFE0'>||<bgcolor='#E0E0FF'>orig.mgz||<bgcolor='#E0E0FF'>mri_deface orig.mgz $FREESURFER_HOME/average/talairach_mixed_with_skull.gca $FREESURFER_HOME/average/face.gca orig_defaced.mgz||<bgcolor='#E0E0FF'>orig_defaced.mgz||<bgcolor='#FFFFE0'>removes the face from the orig volume to anonymize it.||
||<rowbgcolor='#80FF80'>'''recon-all flag'''||'''Used with step'''||'''Description'''||
||<|2(bgcolor='#FFFFE0'>'''-no-ca-align'''||<bgcolor='#FFFFE0'>-careg||<|2(bgcolor='#E0E0FF'>this flag should be used if the data to be processed comes from the same scanner platform and pulse sequence as the atlas. With the FreeSurfer RB40 atlas this means MPRAGE on a 1.5T Siemens scanner.||
||<bgcolor='#FFFFE0'>-calabel||
||<|7(bgcolor='#FFFFE0'>'''-subcortseg'''||<bgcolor='#FFFFE0'>-gcareg||<|7(bgcolor='#E0E0FF'>runs the subcortical segmentation and associated statistics||
||<bgcolor='#FFFFE0'>-canorm||
||<bgcolor='#FFFFE0'>-careg||
||<bgcolor='#FFFFE0'>-rmneck||
||<bgcolor='#FFFFE0'>-skull-lta||
||<bgcolor='#FFFFE0'>-calabel||
||<bgcolor='#FFFFE0'>-segstats||
||<bgcolor='#FFFFE0'>'''-cc-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>manually sets the corpus callosum seed point||
||<bgcolor='#FFFFE0'>'''-pons-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>manually sets the pons seed point||
||<bgcolor='#FFFFE0'>'''-rh-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>manually sets the right hemisphere seed point||
||<bgcolor='#FFFFE0'>'''-lh-xyz <X Y Z>'''||<bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>manually sets the left hemisphere seed point||
||<bgcolor='#FFFFE0'>'''-jacobian_dist0'''||<bgcolor='#FFFFE0'> ||<bgcolor='#E0E0FF'>Computes how much an individual surface must be distorted in order to perfectly match the atlas (ie, distance contraints are turned off). ||
||<|9(bgcolor='#FFFFE0'>'''-old-atlas'''||
||<bgcolor='#FFFFE0'>-gcareg||<|8(bgcolor='#E0E0FF'>Use this flag in conjunction with other steps of recon-all and it will default to the old set of atlases. Uses talairach_mixed.gca for the subcortical segmentation, ?h.average.tif for the surface morph, and ?h.atlas2002_simple.gcs for the cortical parcellations.||
||<bgcolor='#FFFFE0'>-canorm||
||<bgcolor='#FFFFE0'>-careg||
||<bgcolor='#FFFFE0'>-calabel||
||<bgcolor='#FFFFE0'>-surfreg||
||<bgcolor='#FFFFE0'>-contrasurfreg||
||<bgcolor='#FFFFE0'>-avgcurv||
||<bgcolor='#FFFFE0'>-cortparc||
Line 59: Line 58:
||<|34(bgcolor='#FFFFE0'>'''["recon-all"] -autorecon2-cp -subjid subj '''(use this after setting control points. This flag will preserve your wm.mgz edits and remake all necessary volumes and surfaces)||
||<|4(bgcolor='#FFFFE0'>-normalization2||<bgcolor='#E0E0FF'>brainmask.mgz||<|2(bgcolor='#E0E0FF'>["mri_normalize"] -mask brainmask.mgz norm.mgz brain.mgz||<|2(bgcolor='#E0E0FF'>brain.mgz||
||<rowbgcolor='#E0E0FF'>norm.mgz||
||<rowbgcolor='#E0E0FF'>brain.mgz||<|2(>["mri_mask"] brain.mgz brainmask.mgz brain.finalsurfs.mgz||<|2(>brain.finalsurfs.mgz||
||<rowbgcolor='#E0E0FF'>brainmask.mgz||
||<|6(bgcolor='#FFFFE0'>-segmentation||<bgcolor='#E0E0FF'>brain.mgz||<bgcolor='#E0E0FF'>["mri_segment"] brain.mgz wm.seg.mgz||<bgcolor='#E0E0FF'>wm.seg.mgz||
||<bgcolor='#E0E0FF'>wm.seg.mgz||<|3(bgcolor='#E0E0FF'>["mri_edit_wm_with_aseg"] wm.seg.mgz brain.mgz aseg.mgz wm.asegedit.mgz||<|3(bgcolor='#E0E0FF'>wm.asegedit.mgz||
||<rowbgcolor='#E0E0FF'>aseg.mgz||
||<rowbgcolor='#E0E0FF'>brain.mgz||
||<bgcolor='#E0E0FF'>wm.asegedit.mgz||<|2(bgcolor='#E0E0FF'>["mri_pretess"] wm.asegedit.mgz norm.mgz wm.mgz||<|2(bgcolor='#E0E0FF'>wm.mgz||
||<rowbgcolor='#E0E0FF'>norm.mgz||
||<|3(bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<|3(bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -xform transforms/talairach.lta -segmentation aseg.mgz wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||
||<|24(bgcolor='#FFFFE0'>'''[[recon-all]] -autorecon2-wm -subjid subj '''(use this after doing manual wm edits. This flag will regenerate all necessary volumes and surfaces)||
||<|3(bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<|3(bgcolor='#E0E0FF'>[[mri_fill]] -a ../scripts/ponscc.cut.log -xform transforms/talairach.lta -segmentation aseg.mgz wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||
Line 73: Line 62:
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 255 ../surf/lh.orig.nofix||<bgcolor='#E0E0FF'>lh.orig.nofix||
||<rowbgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 127 ../surf/rh.orig.nofix||rh.orig.nofix||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>["mris_smooth"] -nw ?h.orig.nofix ?h.smoothwm.nofix||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||<bgcolor='#E0E0FF'>["mris_inflate"] -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix||<bgcolor='#E0E0FF'>?h.inflated.nofix||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>["mris_sphere"] -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix||<bgcolor='#E0E0FF'>?h.qsphere.nofix||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>[[mri_tessellate]] filled.mgz 255 ../surf/lh.orig.nofix||<bgcolor='#E0E0FF'>lh.orig.nofix||
||<rowbgcolor='#E0E0FF'>[[mri_tessellate]] filled.mgz 127 ../surf/rh.orig.nofix||rh.orig.nofix||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>[[mris_smooth]] -nw ?h.orig.nofix ?h.smoothwm.nofix||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||<bgcolor='#E0E0FF'>[[mris_inflate]] -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix||<bgcolor='#E0E0FF'>?h.inflated.nofix||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>[[mris_sphere]] -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix||<bgcolor='#E0E0FF'>?h.qsphere.nofix||
Line 80: Line 69:
||<bgcolor='#E0E0FF'>?h.qsphere.nofix||<bgcolor='#E0E0FF'>["mris_fix_topology"] -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h||<bgcolor='#E0E0FF'>?h.orig||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>["mris_make_surfaces"] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
||<bgcolor='#E0E0FF'>?h.qsphere.nofix||<bgcolor='#E0E0FF'>[[mris_fix_topology]] -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h||<bgcolor='#E0E0FF'>?h.orig||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>[[mris_make_surfaces]] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
Line 87: Line 76:
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>["mris_inflate"] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>[[mris_smooth]] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>[[mris_inflate]] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
Line 90: Line 79:
||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>["mri_surf2vol"] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz|| ||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>[[mri_surf2vol]] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz||
Line 94: Line 83:
Line 95: Line 85:
||<|24(bgcolor='#FFFFE0'>'''["recon-all"] -autorecon2-wm -subjid subj '''(use this after doing manual wm edits. This flag will regenerate all necessary volumes and surfaces)||
||<|3(bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<|3(bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -xform transforms/talairach.lta -segmentation aseg.mgz wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||
||<rowbgcolor='#E0E0FF'>aseg.mgz||<|2(bgcolor='#E0E0FF'>../scripts/ponscc.cut.log||
||<rowbgcolor='#E0E0FF'>transforms/talairach.lta||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 255 ../surf/lh.orig.nofix||<bgcolor='#E0E0FF'>lh.orig.nofix||
||<rowbgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 127 ../surf/rh.orig.nofix||rh.orig.nofix||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>["mris_smooth"] -nw ?h.orig.nofix ?h.smoothwm.nofix||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||<bgcolor='#E0E0FF'>["mris_inflate"] -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix||<bgcolor='#E0E0FF'>?h.inflated.nofix||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>["mris_sphere"] -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix||<bgcolor='#E0E0FF'>?h.qsphere.nofix||
||<|3(bgcolor='#FFFFE0'>-fix||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>cp ?h.orig.nofix ?h.orig||<bgcolor='#E0E0FF'>?h.orig||
||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>cp ?h.inflated.nofix ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#E0E0FF'>?h.qsphere.nofix||<bgcolor='#E0E0FF'>["mris_fix_topology"] -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h||<bgcolor='#E0E0FF'>?h.orig||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>["mris_make_surfaces"] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
||<|13(bgcolor='#FFFFE0'>'''[[recon-all]] -autorecon2-pial -subjid subj '''(use this after editing brain.finalsurfs.mgz to alter pial surface. This flag will regenerate all final surfaces)||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>[[mris_make_surfaces]] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
Line 113: Line 92:
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>["mris_inflate"] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>[[mris_smooth]] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>[[mris_inflate]] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
Line 116: Line 95:
||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>["mri_surf2vol"] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz|| ||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>[[mri_surf2vol]] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz||
Line 120: Line 99:
Line 122: Line 100:
||<|13(bgcolor='#FFFFE0'>'''["recon-all"] -autorecon2-pial -subjid subj '''(use this after editing brain.mgz to alter pial surface. This flag will regenerate all final surfaces)||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>["mris_make_surfaces"] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
||<|21(bgcolor='#FFFFE0'>'''[[recon-all]] -autorecon2-perhemi -subjid subj '''(use this to run only the steps that are run per-hemisphere, in conjunction with the '-hemi' flag. This is useful if one hemisphere failed and you need to run them separately)||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>[[mri_tessellate]] filled.mgz 255 ../surf/lh.orig.nofix||<bgcolor='#E0E0FF'>lh.orig.nofix||
||<rowbgcolor='#E0E0FF'>[[mri_tessellate]] filled.mgz 127 ../surf/rh.orig.nofix||rh.orig.nofix||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>[[mris_smooth]] -nw ?h.orig.nofix ?h.smoothwm.nofix||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||<bgcolor='#E0E0FF'>[[mris_inflate]] -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix||<bgcolor='#E0E0FF'>?h.inflated.nofix||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>[[mris_sphere]] -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix||<bgcolor='#E0E0FF'>?h.qsphere.nofix||
||<|3(bgcolor='#FFFFE0'>-fix||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>cp ?h.orig.nofix ?h.orig||<bgcolor='#E0E0FF'>?h.orig||
||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>cp ?h.inflated.nofix ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#E0E0FF'>?h.qsphere.nofix||<bgcolor='#E0E0FF'>[[mris_fix_topology]] -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h||<bgcolor='#E0E0FF'>?h.orig||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>[[mris_make_surfaces]] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
Line 129: Line 115:
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>["mris_inflate"] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>[[mris_smooth]] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>[[mris_inflate]] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
Line 132: Line 118:
||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>["mri_surf2vol"] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz|| ||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>[[mri_surf2vol]] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz||
Line 135: Line 121:

||<rowbgcolor='#80FF80'>'''recon-all step'''||'''Individual Flag'''||'''Input'''||'''Command Line'''||'''Output'''||
||<|21(bgcolor='#FFFFE0'>'''["recon-all"] -autorecon2-perhemi -subjid subj '''(use this to run only the steps that are run per-hemisphere, in conjunction with the '-hemi' flag. This is useful if one hemisphere failed and you need to run them separately)||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 255 ../surf/lh.orig.nofix||<bgcolor='#E0E0FF'>lh.orig.nofix||
||<rowbgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 127 ../surf/rh.orig.nofix||rh.orig.nofix||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>["mris_smooth"] -nw ?h.orig.nofix ?h.smoothwm.nofix||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm.nofix||<bgcolor='#E0E0FF'>["mris_inflate"] -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix||<bgcolor='#E0E0FF'>?h.inflated.nofix||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>["mris_sphere"] -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix||<bgcolor='#E0E0FF'>?h.qsphere.nofix||
||<|3(bgcolor='#FFFFE0'>-fix||<bgcolor='#E0E0FF'>?h.orig.nofix||<bgcolor='#E0E0FF'>cp ?h.orig.nofix ?h.orig||<bgcolor='#E0E0FF'>?h.orig||
||<bgcolor='#E0E0FF'>?h.inflated.nofix||<bgcolor='#E0E0FF'>cp ?h.inflated.nofix ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#E0E0FF'>?h.qsphere.nofix||<bgcolor='#E0E0FF'>["mris_fix_topology"] -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h||<bgcolor='#E0E0FF'>?h.orig||
||<|6(bgcolor='#FFFFE0'>-finalsurfs||<|3(bgcolor='#E0E0FF'>brain.finalsurfs.mgz||<|6(bgcolor='#E0E0FF'>["mris_make_surfaces"] -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h||<bgcolor='#E0E0FF'>?h.white||
||<rowbgcolor='#E0E0FF'>?h.pial||
||<rowbgcolor='#E0E0FF'>?h.thickness||
||<|3(rowbgcolor='#E0E0FF'>?h.orig||
||<rowbgcolor='#E0E0FF'>?h.curv||
||<rowbgcolor='#E0E0FF'>?h.area||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.white||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.white ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<|2(bgcolor='#FFFFE0'>-inflate2||<|2(bgcolor='#E0E0FF'>?h.white||<|2(bgcolor='#E0E0FF'>["mris_inflate"] ?h.white ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<(rowbgcolor='#E0E0FF'>?h.sulc||
||<|3(bgcolor='#FFFFE0'>-cortribbon||<bgcolor='#E0E0FF'>orig.mgz||<|3(bgcolor='#E0E0FF'>["mri_surf2vol"] --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz||<|3(bgcolor='#E0E0FF'>?h.ribbon.mgz||
||<rowbgcolor='#E0E0FF'>?h.white||
||<rowbgcolor='#E0E0FF'>?h.pial||

FreeSurfer Tutorial: Useful recon-all flags.

This page extends ReconAllDevTable. The following flags can be used in conjunction with individual steps or the entire process:

-autorecon-all

either of these flags will work to run the entire recon-all process.

-all

-dontrun

useful for debugging. just prints the commands that will run (does not execute them).

-clean-tal

trashes any manual edits to the talairach, makes talairach.xfm and talairach.auto.xfm the same and runs using the automatically generated talairach.xfm

-clean-seed

trashes all saved seed point for the cutting planes and uses the automatically set cutting planes.

-clean-cp

trashes control points and runs the normalization without control points.

-clean-bm

trashes any manual edits to the brainmask.mgz volume, makes brainmask.mgz and brainmask.auto.mgz the same and runs using the automatically generated brainmask.mgz

-clean-wm

trashes any manual edits to the wm.mgz volume and runs using the automatically generated wm.mgz.

-clean-aseg

trashes any manual edits to the aseg.mgz and runs using the automatically generated aseg.mgz

-clean-cpwm

combination of -clean-cp and -clean-wm.

-clean

use this flag to clear all of your manual edits and run it completely fresh.

-noaseg

use this flag on subjects that either cannot use an aseg (i.e., baby brains or non-human primates) or for those for which you will never want an aseg. It skips the subcortical segmentation and will not try and use it (aseg.mgz) in any of the subsequent steps.

-norandomness

use this flag on a subject when it is necessary to ensure that results are exactly the same from run to run. it seeds the random number generator used by some algorithms with the same number, removing any variability.

-notal-check

use this flag when running a subject after receiving an error about Tailarach Failure Detection and the tailarach transform looks fine after checking it with this command line: tkregister2 --mgz --s <subjid> --fstal

-gcut

use this flag when skull strip leaves a little bit of dura behind. In this case, adjusting the watershed parameters won't be as useful and manual edits will take too long.
INFO: Care must be taken to thoroughly inspect your data when using -gcut. In particular, inpsect the edges of gm and cerebellum for over-aggressive cutting. Add -segmentation brainmask.gcuts.mgz to tkmedit to view the voxels which gcut has removed.

-surfsegedit

this flag fixes the gm and a few other areas in the aseg using info from the surfaces. Run after the surfaces are done.

-multistrip

use this flag on a subject when you would like to get skullstrip results using several different watershed preflood heights simultaneously. Output will be nu, orig, and T1 volumes stripped at these heights: 5, 10, 20, 30. You can change which preflood heights are used by setting this variable first: setenv WATERSHED_PREFLOOD_HEIGHTS '20 30 40 50'. Be sure to use -clean-bm with this flag.

-deface

removes the face from the orig volume to anonymize it.

-vno_match_check

Confirms that the surface data is out of sync in case an error indicates that there is a size mismatch. Then run from whatever stage that is out of sync.

recon-all flag

Used with step

Description

-no-ca-align

-careg

this flag should be used if the data to be processed comes from the same scanner platform and pulse sequence as the atlas. With the FreeSurfer RB40 atlas this means MPRAGE on a 1.5T Siemens scanner.

-calabel

-subcortseg

-gcareg

runs the subcortical segmentation and associated statistics

-canorm

-careg

-rmneck

-skull-lta

-calabel

-segstats

-cc-xyz <X Y Z>

-fill

manually sets the corpus callosum seed point

-pons-xyz <X Y Z>

-fill

manually sets the pons seed point

-rh-xyz <X Y Z>

-fill

manually sets the right hemisphere seed point

-lh-xyz <X Y Z>

-fill

manually sets the left hemisphere seed point

-jacobian_dist0

Computes how much an individual surface must be distorted in order to perfectly match the atlas (ie, distance contraints are turned off).

-old-atlas

-gcareg

Use this flag in conjunction with other steps of recon-all and it will default to the old set of atlases. Uses talairach_mixed.gca for the subcortical segmentation, ?h.average.tif for the surface morph, and ?h.atlas2002_simple.gcs for the cortical parcellations.

-canorm

-careg

-calabel

-surfreg

-contrasurfreg

-avgcurv

-cortparc

The following flags can be used after certain manual intervention to regenerate accurate volumes and surfaces (if a data set has or needs spherical morphing, add the -autorecon3 flag):

recon-all step

Individual Flag

Input

Command Line

Output

recon-all -autorecon2-wm -subjid subj (use this after doing manual wm edits. This flag will regenerate all necessary volumes and surfaces)

-fill

wm.mgz

mri_fill -a ../scripts/ponscc.cut.log -xform transforms/talairach.lta -segmentation aseg.mgz wm.mgz filled.mgz

filled.mgz

aseg.mgz

../scripts/ponscc.cut.log

transforms/talairach.lta

-tessellate

filled.mgz

mri_tessellate filled.mgz 255 ../surf/lh.orig.nofix

lh.orig.nofix

mri_tessellate filled.mgz 127 ../surf/rh.orig.nofix

rh.orig.nofix

-smooth1

?h.orig.nofix

mris_smooth -nw ?h.orig.nofix ?h.smoothwm.nofix

?h.smoothwm.nofix

-inflate1

?h.smoothwm.nofix

mris_inflate -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix

?h.inflated.nofix

-qsphere

?h.inflated.nofix

mris_sphere -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix

?h.qsphere.nofix

-fix

?h.orig.nofix

cp ?h.orig.nofix ?h.orig

?h.orig

?h.inflated.nofix

cp ?h.inflated.nofix ?h.inflated

?h.inflated

?h.qsphere.nofix

mris_fix_topology -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h

?h.orig

-finalsurfs

brain.finalsurfs.mgz

mris_make_surfaces -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h

?h.white

?h.pial

?h.thickness

?h.orig

?h.curv

?h.area

-smooth2

?h.white

mris_smooth ?h.white ?h.smoothwm

?h.smoothwm

-inflate2

?h.white

mris_inflate ?h.white ?h.inflated

?h.inflated

?h.sulc

-cortribbon

orig.mgz

mri_surf2vol --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz

?h.ribbon.mgz

?h.white

?h.pial

recon-all step

Individual Flag

Input

Command Line

Output

recon-all -autorecon2-pial -subjid subj (use this after editing brain.finalsurfs.mgz to alter pial surface. This flag will regenerate all final surfaces)

-finalsurfs

brain.finalsurfs.mgz

mris_make_surfaces -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h

?h.white

?h.pial

?h.thickness

?h.orig

?h.curv

?h.area

-smooth2

?h.white

mris_smooth ?h.white ?h.smoothwm

?h.smoothwm

-inflate2

?h.white

mris_inflate ?h.white ?h.inflated

?h.inflated

?h.sulc

-cortribbon

orig.mgz

mri_surf2vol --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz

?h.ribbon.mgz

?h.white

?h.pial

recon-all step

Individual Flag

Input

Command Line

Output

recon-all -autorecon2-perhemi -subjid subj (use this to run only the steps that are run per-hemisphere, in conjunction with the '-hemi' flag. This is useful if one hemisphere failed and you need to run them separately)

-tessellate

filled.mgz

mri_tessellate filled.mgz 255 ../surf/lh.orig.nofix

lh.orig.nofix

mri_tessellate filled.mgz 127 ../surf/rh.orig.nofix

rh.orig.nofix

-smooth1

?h.orig.nofix

mris_smooth -nw ?h.orig.nofix ?h.smoothwm.nofix

?h.smoothwm.nofix

-inflate1

?h.smoothwm.nofix

mris_inflate -no-save-sulc ?h.smoothwm.nofix ?h.inflated.nofix

?h.inflated.nofix

-qsphere

?h.inflated.nofix

mris_sphere -q -0 ?h.inflated.nofix ?h.inflated.nofix ?h.qsphere.nofix

?h.qsphere.nofix

-fix

?h.orig.nofix

cp ?h.orig.nofix ?h.orig

?h.orig

?h.inflated.nofix

cp ?h.inflated.nofix ?h.inflated

?h.inflated

?h.qsphere.nofix

mris_fix_topology -errors -mgz -sphere qsphere.nofix -ga <subjid> ?h

?h.orig

-finalsurfs

brain.finalsurfs.mgz

mris_make_surfaces -mgz -w 0 -T1 brain.finalsurfs.mgz subj ?h

?h.white

?h.pial

?h.thickness

?h.orig

?h.curv

?h.area

-smooth2

?h.white

mris_smooth ?h.white ?h.smoothwm

?h.smoothwm

-inflate2

?h.white

mris_inflate ?h.white ?h.inflated

?h.inflated

?h.sulc

-cortribbon

orig.mgz

mri_surf2vol --mkmask --hemi ?h --fillribbon --template orig.mgz --volregidentity subj --outvol ?h.ribbon.mgz

?h.ribbon.mgz

?h.white

?h.pial

OtherUsefulFlags (last edited 2017-04-25 13:53:01 by AndrewHoopes)