Differences between revisions 2 and 25 (spanning 23 versions)
Revision 2 as of 2005-10-18 11:49:04
Size: 15463
Editor: JenniPacheco
Comment:
Revision 25 as of 2006-01-19 17:30:38
Size: 17053
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The following flags can be used in conjunction with individual steps or the entire process:

||<bgcolor='#FFFFE0'>'''-autorecon-all'''||<|2-5(bgcolor='#E0E0FF'>either of these flags will work to run the entire recon-all process.||
||<bgcolor='#FFFFE0'>'''-all'''||
||<bgcolor='#FFFFE0'>'''-dontrun'''||<-5(bgcolor='#E0E0FF'>useful for debugging. just prints the commands that will run (does not execute them).||
||<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'>'''-clean-tal'''||<-5(bgcolor='#E0E0FF'>trashes any manual edits to the talairach, makes talairach.xfm and talairach.auto.xfm the same and runs using the automatically generated talairach.xfm||
||<bgcolor='#FFFFE0'>'''-clean-seed'''||<-5(bgcolor='#E0E0FF'>trashes all saved seed point for the cutting planes and uses the automatically set cutting planes.||
||<bgcolor='#FFFFE0'>'''-clean-cp'''||<-5(bgcolor='#E0E0FF'>trashes control points and runs the normalization without control points.||
||<bgcolor='#FFFFE0'>'''-clean-bm'''||<-5(bgcolor='#E0E0FF'>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||
||<bgcolor='#FFFFE0'>'''-clean-wm'''||<-5(bgcolor='#E0E0FF'>trashes any manual edits to the wm.mgz volume and runs using the automatically generated wm.mgz.||
||<bgcolor='#FFFFE0'>'''-clean-aseg'''||<-5(bgcolor='#E0E0FF'>trashes any manual edits to the aseg.mgz and runs using the automatically generated aseg.mgz||
||<bgcolor='#FFFFE0'>'''-clean-cpwm'''||<-5(bgcolor='#E0E0FF'>combination of -clean-cp and -clean-wm.||
||<bgcolor='#FFFFE0'>'''-clean'''||<-5(bgcolor='#E0E0FF'>use this flag to clear all of your manual edits and run it completely fresh.||
||<bgcolor='#FFFFE0'>'''-noaseg'''||<-5(bgcolor='#E0E0FF'>use this flag on subjects that either can not 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.||
Line 5: Line 20:
||<bgcolor='#FFFFE0'>-usecontrolpoints||<bgcolor='#FFFFE0'>-normalization||<bgcolor='#E0E0FF'>nu.mgz||<bgcolor='#E0E0FF'>["mri_normalize"] -f $SUBJECTS_DIR/subjid/tmp/control.dat nu.mgz T1.mgz||<bgcolor='#E0E0FF'>T1.mgz||<bgcolor='#FFFFE0'>uses control points, saved to tmp/control.dat to modify the normalization||
||<bgcolor='#FFFFE0'>-keepwmedits||<bgcolor='#FFFFE0'>-segmentation||<bgcolor='#E0E0FF'>brain.mgz||<bgcolor='#E0E0FF'>["mri_segment"] -keep brain.mgz wm.mgz||<bgcolor='#E0E0FF'>wm.mgz||<bgcolor='#FFFFE0'>preserves any previous edits to wm volume||



||<|10(bgcolor='#FFFFE0'>["recon-all"] -autorecon1 -subjid subj||
||<|3(bgcolor='#FFFFE0'>-motioncor||<bgcolor='#E0E0FF'>orig/001.mgz||<|2(bgcolor='#E0E0FF'>["mri_motion_correct2"] -i orig/001.mgz -i orig/002.mgz -o rawavg.mgz||<|2(bgcolor='#E0E0FF'>rawavg.mgz||
||<rowbgcolor='#E0E0FF'>orig/002.mgz||
||<rowbgcolor='#E0E0FF'>rawavg.mgz||["mri_convert"] rawavg.mgz orig.mgz --conform||orig.mgz||
||<|3(bgcolor='#FFFFE0'>-nuintensitycor||<bgcolor='#E0E0FF'>orig.mgz||<bgcolor='#E0E0FF'>["mri_convert"] orig.mgz orig.mnc||<bgcolor='#E0E0FF'>orig.mnc||
||<rowbgcolor='#E0E0FF'>orig.mnc||(4 iterations of) ["nu_correct"] -clobber nu0.mnc nu1.mnc||nu4.mnc||
||<rowbgcolor='#E0E0FF'>nu4.mnc||["mri_convert"] nu4.mnc nu.mgz||nu.mgz||
||<bgcolor='#FFFFE0'>-talairach||<bgcolor='#E0E0FF'>nu.mgz||<bgcolor='#E0E0FF'>["talairach2"] subjid -mgz||<bgcolor='#E0E0FF'>transforms/talairach.xfm||
||<bgcolor='#FFFFE0'>-normalization||<bgcolor='#E0E0FF'>nu.mgz||<bgcolor='#E0E0FF'>["mri_normalize"] nu.mgz T1.mgz||<bgcolor='#E0E0FF'>T1.mgz||
||<bgcolor='#FFFFE0'>-skullstrip||<bgcolor='#E0E0FF'>T1.mgz||<bgcolor='#E0E0FF'>["mri_watershed"] T1.mgz brain.mgz||<bgcolor='#E0E0FF'>brain.mgz||
||<-5(rowbgcolor='#FF8080'>Check skullstrip (brain.mgz), talairach (transforms/talairach.xfm), and normalization (brain.mgz or T1.mgz - mean wm voxel value = 110)||
||<|36(bgcolor='#FFFFE0'>["recon-all"] -autorecon2 -subjid subj||
||<|2(bgcolor='#FFFFE0'>-gcareg||<bgcolor='#E0E0FF'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_em_register"] -mask brain.mgz -p .5 -fsamples fsamples.mgz nu.mgz $GCA transforms/talairach.lta||<|2(bgcolor='#E0E0FF'>transforms/talairach.lta||
||<|6(bgcolor='#FFFFE0'>'''-no-ca-align'''||<|3(bgcolor='#FFFFE0'>-careg||<bgcolor='#E0E0FF'>brainmask.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_register"] -mask brainmask.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.m3z||<|3(bgcolor='#E0E0FF'>transforms/talairach.m3z||<|6(bgcolor='#FFFFE0'>description||
||<rowbgcolor='#E0E0FF'>transforms/talairach.lta||
||<rowbgcolor='#E0E0FF'>norm.mgz||
||<|3(bgcolor='#FFFFE0'>-calabel||<bgcolor='#E0E0FF'>norm.mgz||<|2(bgcolor='#E0E0FF'>["mri_ca_label"] norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca aseg.auto.mgz||<|2(bgcolor='#E0E0FF'>aseg.auto.mgz||
||<rowbgcolor='#E0E0FF'>transforms/talairach.m3z||
||<rowbgcolor='#E0E0FF'>aseg.auto.mgz||<bgcolor='#E0E0FF'>cp aseg.auto.mgz aseg.mgz||<bgcolor='#E0E0FF'>aseg.mgz||
||<|16(bgcolor='#FFFFE0'>'''-subcortseg'''||<|2(bgcolor='#FFFFE0'>-gcareg||<bgcolor='#E0E0FF'>brainmask.mgz||<|2(bgcolor='#E0E0FF'>["mri_em_register"] -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.lta||<|2(bgcolor='#E0E0FF'>transforms/talairach.lta||<|16(bgcolor='#FFFFE0'>runs the subcortical segmentation and associated statistics||
Line 24: Line 28:
||<|3(bgcolor='#FFFFE0'>-canorm||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_normalize"] -mask brain.mgz nu.mgz $GCA transforms/talairach.lta norm.mgz||<|3(bgcolor='#E0E0FF'>norm.mgz|| ||<|3(bgcolor='#FFFFE0'>-canorm||<bgcolor='#E0E0FF'>brainmask.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_normalize"] -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.lta norm.mgz||<|3(bgcolor='#E0E0FF'>norm.mgz||
Line 27: Line 31:
||<|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 $GCA transforms/talairach.m3z||<|3(bgcolor='#E0E0FF'>transforms/talairach.m3z|| ||<|3(bgcolor='#FFFFE0'>-careg||<bgcolor='#E0E0FF'>brainmask.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_register"] -align -mask brainmask.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.m3z||<|3(bgcolor='#E0E0FF'>transforms/talairach.m3z||
Line 30: Line 34:
||<|2(bgcolor='#FFFFE0'>-calabel||<bgcolor='#E0E0FF'>norm.mgz||<|2(bgcolor='#E0E0FF'>["mri_ca_label"] -cross-sequence norm.mgz transforms/talairach.m3z $GCA aseg.mgz||<|2(bgcolor='#E0E0FF'>aseg.mgz|| ||<|2(bgcolor='#FFFFE0'>-rmneck||<bgcolor='#E0E0FF'>nu.mgz||<|2(bgcolor='#E0E0FF'>["mri_remove_neck"] -radius 25 nu.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca nu_noneck.mgz||<|2(bgcolor='#E0E0FF'>nu_noneck.mgz||
Line 32: Line 36:
||<bgcolor='#FFFFE0'>-segstats||<bgcolor='#E0E0FF'>aseg.mgz||<bgcolor='#E0E0FF'>["mri_segstats"] --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz --in mri/orig.mgz --ctab-default --excludeid 0 --brain-vol-from-seg --brainmask mri/brain.mgz||<bgcolor='#E0E0FF'>stats/aseg.stats||
||<|4(bgcolor='#FFFFE0'>-normalization2||<bgcolor='#E0E0FF'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_normalize"] -mask brain.mgz nu.mgz T1.mgz||<|2(bgcolor='#E0E0FF'>T1.mgz||
||<|2(bgcolor='#FFFFE0'>-skull-lta||<bgcolor='#E0E0FF'>transforms/talairach.lta||<|2(bgcolor='#E0E0FF'>["mri_em_register"] -skull -t transforms/talairach.lta nu_noneck.mgz $FREESURFER_HOME/average/RB40_talairach_with_skull_2005-12-30.gca transforms/talairach_with_skull.lta||<|2(bgcolor='#E0E0FF'>transforms/talairach_with_skull.lta||
||<rowbgcolor='#E0E0FF'>nu_noneck.mgz||
||<|3(bgcolor='#FFFFE0'>-calabel||<bgcolor='#E0E0FF'>norm.mgz||<|2(bgcolor='#E0E0FF'>["mri_ca_label"] -align norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca aseg.auto.mgz||<|2(bgcolor='#E0E0FF'>aseg.auto.mgz||
||<rowbgcolor='#E0E0FF'>transforms/talairach.m3z||
||<rowbgcolor='#E0E0FF'>aseg.auto.mgz||<bgcolor='#E0E0FF'>cp aseg.auto.mgz aseg.mgz||<bgcolor='#E0E0FF'>aseg.mgz||
||<bgcolor='#FFFFE0'>-segstats||<bgcolor='#E0E0FF'>aseg.mgz||<bgcolor='#E0E0FF'>["mri_segstats"] --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz --in mri/norm.mgz --ctab-default --excludeid 0 --brain-vol-from-seg --brainmask mri/brainmask.mgz --in-intensity-name orig --in-intensity-units MR --etiv --subject <subjid>||<bgcolor='#E0E0FF'>stats/aseg.stats||
||<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||
||<|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.||

The following flags can be used after certain manual intervention to regenerate accurate volumes and surfaces:

||<rowbgcolor='#80FF80'>'''recon-all step'''||'''Individual Flag'''||'''Input'''||'''Command Line'''||'''Output'''||
||<|25(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'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_normalize"] -f $SUBJECTS_DIR/subjid/tmp/control.dat -mask brain.mgz nu.mgz T1.mgz||<|2(bgcolor='#E0E0FF'>T1.mgz||
Line 37: Line 72:
||<bgcolor='#FFFFE0'>-segmentation||<bgcolor='#E0E0FF'>brain.mgz||<bgcolor='#E0E0FF'>["mri_segment"] brain.mgz wm.mgz||<bgcolor='#E0E0FF'>wm.mgz||
||<|2(bgcolor='#FFFFE0'>-edit_wm_with_aseg||<bgcolor='#E0E0FF'>wm.mgz||<|2(bgcolor='#E0E0FF'>["mri_edit_wm_with_aseg"] wm.mgz aseg.mgz wm.mgz||<|2(bgcolor='#E0E0FF'>wm.mgz||
||<rowbgcolor='#E0E0FF'>aseg.mgz||
||<|2(bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<|2(bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -xform transforms/talairach.xfm -segmentation aseg.mgz wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||
||<rowbgcolor='#E0E0FF'>aseg.mgz||../scripts/ponscc.cut.log||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 255 ../surf/lh.orig||<bgcolor='#E0E0FF'>lh.orig||
||<rowbgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 128 ../surf/rh.orig||rh.orig||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.orig ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm||<bgcolor='#E0E0FF'>["mris_inflate"] ?h.smoothwm ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated||<bgcolor='#E0E0FF'>["mris_sphere"] -w 0 -inflate -in 200 -q ?h.inflated ?h.qsphere||<bgcolor='#E0E0FF'>?h.qsphere||
||<bgcolor='#FFFFE0'>-fix||<bgcolor='#E0E0FF'>?h.qsphere||<bgcolor='#E0E0FF'>["mris_fix_topology"] subj ?h||<bgcolor='#E0E0FF'>?h.orig||
||<bgcolor='#FFFFE0'>-euler||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_euler_number"] ?h.orig||<bgcolor='#E0E0FF'>?h.orig.euler||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.orig ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<bgcolor='#FFFFE0'>-inflate2||<bgcolor='#E0E0FF'>?h.smoothwm||<bgcolor='#E0E0FF'>["mris_inflate"] ?h.smoothwm ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<|3(bgcolor='#FFFFE0'>-f== FreeSurfer Tutorial: Process Flow ==


||<rowbgcolor='#80FF80'>'''recon-all step'''||'''Individual Flag'''||'''Input'''||'''Command Line'''||'''Output'''||
||<bgcolor='#FFFFE0'>none||<bgcolor='#FFFFE0'>none||<bgcolor='#E0E0FF'>file.dcm||<bgcolor='#E0E0FF'>["mri_convert"] file.dcm orig/001.mgz||<bgcolor='#E0E0FF'>orig/001.mgz||
||<|10(bgcolor='#FFFFE0'>["recon-all"] -autorecon1 -subjid subj||
||<|3(bgcolor='#FFFFE0'>-motioncor||<bgcolor='#E0E0FF'>orig/001.mgz||<|2(bgcolor='#E0E0FF'>["mri_motion_correct2"] -i orig/001.mgz -i orig/002.mgz -o rawavg.mgz||<|2(bgcolor='#E0E0FF'>rawavg.mgz||
||<rowbgcolor='#E0E0FF'>orig/002.mgz||
||<rowbgcolor='#E0E0FF'>rawavg.mgz||["mri_convert"] rawavg.mgz orig.mgz --conform||orig.mgz||
||<|3(bgcolor='#FFFFE0'>-nuintensitycor||<bgcolor='#E0E0FF'>orig.mgz||<bgcolor='#E0E0FF'>["mri_convert"] orig.mgz orig.mnc||<bgcolor='#E0E0FF'>orig.mnc||
||<rowbgcolor='#E0E0FF'>orig.mnc||(4 iterations of) ["nu_correct"] -clobber nu0.mnc nu1.mnc||nu4.mnc||
||<rowbgcolor='#E0E0FF'>nu4.mnc||["mri_convert"] nu4.mnc nu.mgz||nu.mgz||
||<bgcolor='#FFFFE0'>-talairach||<bgcolor='#E0E0FF'>nu.mgz||<bgcolor='#E0E0FF'>["talairach2"] subjid -mgz||<bgcolor='#E0E0FF'>transforms/talairach.xfm||
||<bgcolor='#FFFFE0'>-normalization||<bgcolor='#E0E0FF'>nu.mgz||<bgcolor='#E0E0FF'>["mri_normalize"] nu.mgz T1.mgz||<bgcolor='#E0E0FF'>T1.mgz||
||<bgcolor='#FFFFE0'>-skullstrip||<bgcolor='#E0E0FF'>T1.mgz||<bgcolor='#E0E0FF'>["mri_watershed"] T1.mgz brain.mgz||<bgcolor='#E0E0FF'>brain.mgz||
||<-5(rowbgcolor='#FF8080'>Check skullstrip (brain.mgz), talairach (transforms/talairach.xfm), and normalization (brain.mgz or T1.mgz - mean wm voxel value = 110)||
||<|36(bgcolor='#FFFFE0'>["recon-all"] -autorecon2 -subjid subj||
||<|2(bgcolor='#FFFFE0'>-gcareg||<bgcolor='#E0E0FF'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_em_register"] -mask brain.mgz -p .5 -fsamples fsamples.mgz nu.mgz $GCA transforms/talairach.lta||<|2(bgcolor='#E0E0FF'>transforms/talairach.lta||
||<rowbgcolor='#E0E0FF'>nu.mgz||
||<|3(bgcolor='#FFFFE0'>-canorm||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mri_ca_normalize"] -mask brain.mgz nu.mgz $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 $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 $GCA aseg.mgz||<|2(bgcolor='#E0E0FF'>aseg.mgz||
||<rowbgcolor='#E0E0FF'>transforms/talairach.m3z||
||<bgcolor='#FFFFE0'>-segstats||<bgcolor='#E0E0FF'>aseg.mgz||<bgcolor='#E0E0FF'>["mri_segstats"] --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz --in mri/orig.mgz --ctab-default --excludeid 0 --brain-vol-from-seg --brainmask mri/brain.mgz||<bgcolor='#E0E0FF'>stats/aseg.stats||
||<|4(bgcolor='#FFFFE0'>-normalization2||<bgcolor='#E0E0FF'>brain.mgz||<|2(bgcolor='#E0E0FF'>["mri_normalize"] -mask brain.mgz nu.mgz T1.mgz||<|2(bgcolor='#E0E0FF'>T1.mgz||
||<rowbgcolor='#E0E0FF'>nu.mgz||
||<rowbgcolor='#E0E0FF'>T1.mgz||<|2(>["mri_mask"] T1.mgz brain.mgz brain.mgz||<|2(>brain.mgz||
||<rowbgcolor='#E0E0FF'>brain.mgz||
||<bgcolor='#FFFFE0'>-segmentation||<bgcolor='#E0E0FF'>brain.mgz||<bgcolor='#E0E0FF'>["mri_segment"] brain.mgz wm.mgz||<bgcolor='#E0E0FF'>wm.mgz||
||<bgcolor='#FFFFE0'>-segmentation||<bgcolor='#E0E0FF'>brain.mgz||<bgcolor='#E0E0FF'>["mri_segment"] -keep brain.mgz wm.mgz||<bgcolor='#E0E0FF'>wm.mgz||
Line 103: Line 92:
||<-5(rowbgcolor='#FF8080'>Check final surfaces '''tkmedit subj wm.mgz ?h.white brain.mgz'''||
||<|8(bgcolor='#FFFFE0'>["recon-all"] -autorecon3 -subjid subj||
||<bgcolor='#FFFFE0'>-sphere||<bgcolor='#E0E0FF'>?h.inflated||<bgcolor='#E0E0FF'>["mris_sphere"] -w 0 ?h.inflated ?h.sphere||<bgcolor='#E0E0FF'>?h.sphere||
||<bgcolor='#FFFFE0'>-surfreg||<bgcolor='#E0E0FF'>?h.sphere||<bgcolor='#E0E0FF'>["mris_register"] -w 0 -curv ?h.sphere $AvgTif ?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 $AvgTif rh.lh.sphere.reg||<bgcolor='#E0E0FF'>rh.lh.sphere.reg||
||<rowbgcolor='#E0E0FF'>lh.sphere||["mris_register"] -w 0 -curv -reverse lh.sphere $AvgTif lh.rh.sphere.reg||lh.rh.sphere.reg||
||<bgcolor='#FFFFE0'>-avgcurv||<bgcolor='#E0E0FF'>?h.sphere.reg||<bgcolor='#E0E0FF'>["mrisp_paint"] -a 5 $AvgTif#6 ?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 $CPAtlas ?h.aparc.annot||<bgcolor='#E0E0FF'>label/?h.aparc.annot||
||<bgcolor='#FFFFE0'>-parcstats||<bgcolor='#E0E0FF'>label/?h.aparc.annot||<bgcolor='#E0E0FF'>["mris_anatomical_stats"] -f scripts/?h.aparc.stats -b -a label/?h.aparc.annot subj ?h||<bgcolor='#E0E0FF'>stats/?h.aparc.stats||
inalsurfs||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mris_make_surfaces"] -w 0 subj ?h||<bgcolor='#E0E0FF'>?h.white||


||<rowbgcolor='#80FF80'>'''recon-all step'''||'''Individual Flag'''||'''Input'''||'''Command Line'''||'''Output'''||
||<|18(bgcolor='#FFFFE0'>'''["recon-all"] -autorecon2-wm -subjid subj '''(use this after doing manual wm edits. This flag will regenerate all necessary volumes and surfaces)||
||<|2(bgcolor='#FFFFE0'>-fill||<bgcolor='#E0E0FF'>wm.mgz||<|2(bgcolor='#E0E0FF'>["mri_fill"] -a ../scripts/ponscc.cut.log -xform transforms/talairach.xfm -segmentation aseg.mgz wm.mgz filled.mgz||<bgcolor='#E0E0FF'>filled.mgz||
||<rowbgcolor='#E0E0FF'>aseg.mgz||../scripts/ponscc.cut.log||
||<|2((bgcolor='#FFFFE0'>-tessellate||<|2(bgcolor='#E0E0FF'>filled.mgz||<bgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 255 ../surf/lh.orig||<bgcolor='#E0E0FF'>lh.orig||
||<rowbgcolor='#E0E0FF'>["mri_tessellate"] filled.mgz 128 ../surf/rh.orig||rh.orig||
||<bgcolor='#FFFFE0'>-smooth1||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.orig ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<bgcolor='#FFFFE0'>-inflate1||<bgcolor='#E0E0FF'>?h.smoothwm||<bgcolor='#E0E0FF'>["mris_inflate"] ?h.smoothwm ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<bgcolor='#FFFFE0'>-qsphere||<bgcolor='#E0E0FF'>?h.inflated||<bgcolor='#E0E0FF'>["mris_sphere"] -w 0 -inflate -in 200 -q ?h.inflated ?h.qsphere||<bgcolor='#E0E0FF'>?h.qsphere||
||<bgcolor='#FFFFE0'>-fix||<bgcolor='#E0E0FF'>?h.qsphere||<bgcolor='#E0E0FF'>["mris_fix_topology"] subj ?h||<bgcolor='#E0E0FF'>?h.orig||
||<bgcolor='#FFFFE0'>-euler||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_euler_number"] ?h.orig||<bgcolor='#E0E0FF'>?h.orig.euler||
||<bgcolor='#FFFFE0'>-smooth2||<bgcolor='#E0E0FF'>?h.orig||<bgcolor='#E0E0FF'>["mris_smooth"] ?h.orig ?h.smoothwm||<bgcolor='#E0E0FF'>?h.smoothwm||
||<bgcolor='#FFFFE0'>-inflate2||<bgcolor='#E0E0FF'>?h.smoothwm||<bgcolor='#E0E0FF'>["mris_inflate"] ?h.smoothwm ?h.inflated||<bgcolor='#E0E0FF'>?h.inflated||
||<|3(bgcolor='#FFFFE0'>-finalsurfs||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mris_make_surfaces"] -w 0 subj ?h||<bgcolor='#E0E0FF'>?h.white||
Line 118: Line 113:
||<-5(rowbgcolor='#FF8080'>Check final surfaces '''tkmedit subj wm.mgz ?h.white brain.mgz'''||
||<|8(bgcolor='#FFFFE0'>["recon-all"] -autorecon3 -subjid subj||
||<bgcolor='#FFFFE0'>-sphere||<bgcolor='#E0E0FF'>?h.inflated||<bgcolor='#E0E0FF'>["mris_sphere"] -w 0 ?h.inflated ?h.sphere||<bgcolor='#E0E0FF'>?h.sphere||
||<bgcolor='#FFFFE0'>-surfreg||<bgcolor='#E0E0FF'>?h.sphere||<bgcolor='#E0E0FF'>["mris_register"] -w 0 -curv ?h.sphere $AvgTif ?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 $AvgTif rh.lh.sphere.reg||<bgcolor='#E0E0FF'>rh.lh.sphere.reg||
||<rowbgcolor='#E0E0FF'>lh.sphere||["mris_register"] -w 0 -curv -reverse lh.sphere $AvgTif lh.rh.sphere.reg||lh.rh.sphere.reg||
||<bgcolor='#FFFFE0'>-avgcurv||<bgcolor='#E0E0FF'>?h.sphere.reg||<bgcolor='#E0E0FF'>["mrisp_paint"] -a 5 $AvgTif#6 ?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 $CPAtlas ?h.aparc.annot||<bgcolor='#E0E0FF'>label/?h.aparc.annot||
||<bgcolor='#FFFFE0'>-parcstats||<bgcolor='#E0E0FF'>label/?h.aparc.annot||<bgcolor='#E0E0FF'>["mris_anatomical_stats"] -f scripts/?h.aparc.stats -b -a label/?h.aparc.annot subj ?h||<bgcolor='#E0E0FF'>stats/?h.aparc.stats||
Line 128: Line 114:
||<rowbgcolor='#80FF80'>'''recon-all step'''||'''Individual Flag'''||'''Input'''||'''Command Line'''||'''Output'''||
||<|7(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)||
||<|3(bgcolor='#FFFFE0'>-finalsurfs||<bgcolor='#E0E0FF'>brain.mgz||<|3(bgcolor='#E0E0FF'>["mris_make_surfaces"] -w 0 subj ?h||<bgcolor='#E0E0FF'>?h.white||
||<|2(rowbgcolor='#E0E0FF'>?h.orig||?h.pial||
||<rowbgcolor='#E0E0FF'>?h.thickness||
||<|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.

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).

-legacy

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).

-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 can not 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.

recon-all flag

Used with step

Input

Command Line

Output

Description

-no-ca-align

-careg

brainmask.mgz

["mri_ca_register"] -mask brainmask.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.m3z

transforms/talairach.m3z

description

transforms/talairach.lta

norm.mgz

-calabel

norm.mgz

["mri_ca_label"] norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca aseg.auto.mgz

aseg.auto.mgz

transforms/talairach.m3z

aseg.auto.mgz

cp aseg.auto.mgz aseg.mgz

aseg.mgz

-subcortseg

-gcareg

brainmask.mgz

["mri_em_register"] -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.lta

transforms/talairach.lta

runs the subcortical segmentation and associated statistics

nu.mgz

-canorm

brainmask.mgz

["mri_ca_normalize"] -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.lta norm.mgz

norm.mgz

nu.mgz

transforms/talairach.lta

-careg

brainmask.mgz

["mri_ca_register"] -align -mask brainmask.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca transforms/talairach.m3z

transforms/talairach.m3z

transforms/talairach.lta

norm.mgz

-rmneck

nu.mgz

["mri_remove_neck"] -radius 25 nu.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca nu_noneck.mgz

nu_noneck.mgz

transforms/talairach.m3z

-skull-lta

transforms/talairach.lta

["mri_em_register"] -skull -t transforms/talairach.lta nu_noneck.mgz $FREESURFER_HOME/average/RB40_talairach_with_skull_2005-12-30.gca transforms/talairach_with_skull.lta

transforms/talairach_with_skull.lta

nu_noneck.mgz

-calabel

norm.mgz

["mri_ca_label"] -align norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB40_talairach_2005-12-30.gca aseg.auto.mgz

aseg.auto.mgz

transforms/talairach.m3z

aseg.auto.mgz

cp aseg.auto.mgz aseg.mgz

aseg.mgz

-segstats

aseg.mgz

["mri_segstats"] --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz --in mri/norm.mgz --ctab-default --excludeid 0 --brain-vol-from-seg --brainmask mri/brainmask.mgz --in-intensity-name orig --in-intensity-units MR --etiv --subject <subjid>

stats/aseg.stats

-cc-xyz <X Y Z>

-fill

wm.mgz

["mri_fill"] -a ../scripts/ponscc.cut.log -C X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz

filled.mgz

manually sets the corpus callosum seed point

-pons-xyz <X Y Z>

-fill

wm.mgz

["mri_fill"] -a ../scripts/ponscc.cut.log -P X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz

filled.mgz

manually sets the pons seed point

-rh-xyz <X Y Z>

-fill

wm.mgz

["mri_fill"] -a ../scripts/ponscc.cut.log -rh X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz

filled.mgz

manually sets the right hemisphere seed point

-lh-xyz <X Y Z>

-fill

wm.mgz

["mri_fill"] -a ../scripts/ponscc.cut.log -lh X Y Z -xform transforms/talairach.xfm wm.mgz filled.mgz

filled.mgz

manually sets the left hemisphere seed point

-old-atlas

-gcareg

brain.mgz

["mri_em_register"] -mask brain.mgz -p .5 -fsamples fsamples.mgz nu.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.lta

transforms/talairach.lta

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.

nu.mgz

-canorm

brain.mgz

["mri_ca_normalize"] -mask brain.mgz nu.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.lta norm.mgz

norm.mgz

nu.mgz

transforms/talairach.lta

-careg

brain.mgz

["mri_ca_register"] -cross-sequence -mask brain.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/talairach_mixed.gca transforms/talairach.m3z

transforms/talairach.m3z

transforms/talairach.lta

norm.mgz

-calabel

norm.mgz

["mri_ca_label"] -cross-sequence norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/talairach_mixed.gca aseg.mgz

aseg.mgz

transforms/talairach.m3z

-surfreg

?h.sphere

["mris_register"] -w 0 -curv ?h.sphere $FREESURFER_HOME/average?h.average.tif ?h.sphere.reg

?h.sphere.reg

-contrasurfreg

rh.sphere

["mris_register"] -w 0 -curv -reverse rh.sphere $FREESURFER_HOME/average?h.average.tif rh.lh.sphere.reg

rh.lh.sphere.reg

lh.sphere

["mris_register"] -w 0 -curv -reverse lh.sphere $FREESURFER_HOME/average?h.average.tif lh.rh.sphere.reg

lh.rh.sphere.reg

-avgcurv

?h.sphere.reg

["mrisp_paint"] -a 5 $FREESURFER_HOME/average?h.average.tif ?h.sphere.reg ?h.avg_curv

?h.avg_curv

-cortparc

?h.sphere.reg

["mris_ca_label"] -t $CPAnnotTable subj ?h sphere.reg $FREESURFER_HOME/average/?h.atlas2002_simple.gcs ?h.aparc.annot

label/?h.aparc.annot

-deface

orig.mgz

mri_deface orig.mgz $FREESURFER_HOME/average/talairach_mixed_with_skull.gca $FREESURFER_HOME/average/face.gca orig_defaced.mgz

orig_defaced.mgz

removes the face from the orig volume to anonymize it.

The following flags can be used after certain manual intervention to regenerate accurate volumes and surfaces:

recon-all step

Individual Flag

Input

Command Line

Output

["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)

-normalization2

brain.mgz

["mri_normalize"] -f $SUBJECTS_DIR/subjid/tmp/control.dat -mask brain.mgz nu.mgz T1.mgz

T1.mgz

nu.mgz

T1.mgz

["mri_mask"] T1.mgz brain.mgz brain.mgz

brain.mgz

brain.mgz

-segmentation

brain.mgz

["mri_segment"] -keep brain.mgz wm.mgz

wm.mgz

-edit_wm_with_aseg

wm.mgz

["mri_edit_wm_with_aseg"] wm.mgz aseg.mgz wm.mgz

wm.mgz

aseg.mgz

-fill

wm.mgz

["mri_fill"] -a ../scripts/ponscc.cut.log -xform transforms/talairach.xfm -segmentation aseg.mgz wm.mgz filled.mgz

filled.mgz

aseg.mgz

../scripts/ponscc.cut.log

-tessellate

filled.mgz

["mri_tessellate"] filled.mgz 255 ../surf/lh.orig

lh.orig

["mri_tessellate"] filled.mgz 128 ../surf/rh.orig

rh.orig

-smooth1

?h.orig

["mris_smooth"] ?h.orig ?h.smoothwm

?h.smoothwm

-inflate1

?h.smoothwm

["mris_inflate"] ?h.smoothwm ?h.inflated

?h.inflated

-qsphere

?h.inflated

["mris_sphere"] -w 0 -inflate -in 200 -q ?h.inflated ?h.qsphere

?h.qsphere

-fix

?h.qsphere

["mris_fix_topology"] subj ?h

?h.orig

-euler

?h.orig

["mris_euler_number"] ?h.orig

?h.orig.euler

-smooth2

?h.orig

["mris_smooth"] ?h.orig ?h.smoothwm

?h.smoothwm

-inflate2

?h.smoothwm

["mris_inflate"] ?h.smoothwm ?h.inflated

?h.inflated

-finalsurfs

brain.mgz

["mris_make_surfaces"] -w 0 subj ?h

?h.white

?h.orig

?h.pial

?h.thickness

-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-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.xfm -segmentation aseg.mgz wm.mgz filled.mgz

filled.mgz

aseg.mgz

../scripts/ponscc.cut.log

-tessellate

filled.mgz

["mri_tessellate"] filled.mgz 255 ../surf/lh.orig

lh.orig

["mri_tessellate"] filled.mgz 128 ../surf/rh.orig

rh.orig

-smooth1

?h.orig

["mris_smooth"] ?h.orig ?h.smoothwm

?h.smoothwm

-inflate1

?h.smoothwm

["mris_inflate"] ?h.smoothwm ?h.inflated

?h.inflated

-qsphere

?h.inflated

["mris_sphere"] -w 0 -inflate -in 200 -q ?h.inflated ?h.qsphere

?h.qsphere

-fix

?h.qsphere

["mris_fix_topology"] subj ?h

?h.orig

-euler

?h.orig

["mris_euler_number"] ?h.orig

?h.orig.euler

-smooth2

?h.orig

["mris_smooth"] ?h.orig ?h.smoothwm

?h.smoothwm

-inflate2

?h.smoothwm

["mris_inflate"] ?h.smoothwm ?h.inflated

?h.inflated

-finalsurfs

brain.mgz

["mris_make_surfaces"] -w 0 subj ?h

?h.white

?h.orig

?h.pial

?h.thickness

-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.mgz to alter pial surface. This flag will regenerate all final surfaces)

-finalsurfs

brain.mgz

["mris_make_surfaces"] -w 0 subj ?h

?h.white

?h.orig

?h.pial

?h.thickness

-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)