FreeSurfer Tutorial: Process Flow

This table shows the recon-all steps for the latest stable version of FreeSurfer, v4.0.2. See ReconAllDevTable for the dev version of FreeSurfer.

Click here to see this information presented in a block diagram format and here for a process v. files table.

See also the OtherUsefulFlags for other recon-all options.

recon-all step

Individual Flag

Input

Command Line

Output

recon-all -autorecon1 -subjid <subjid>

-i <invol1> -i <invol2>

invol1.dcm

mri_convert invol1.dcm orig/001.mgz

orig/001.mgz

invol2.dcm

mri_convert invol2.dcm orig/002.mgz

orig/002.mgz

-motioncor

orig/001.mgz

mri_motion_correct.fsl -o rawavg.mgz -wild orig/001.mgz orig/002.mgz

rawavg.mgz

orig/002.mgz

rawavg.mgz

mri_convert rawavg.mgz orig.mgz --conform

orig.mgz

orig.mgz

mri_add_xform_to_header -c transforms/talairach.xfm orig.mgz orig.mgz

orig.mgz

-nuintensitycor

orig.mgz

mri_nu_correct.mni --i orig.mgz --o nu.mgz --n 2

nu.mgz

-talairach

nu.mgz

talairach_avi --i nu.mgz --xfm transforms/talairach.auto.xfm

transforms/talairach.auto.xfm

transforms/talairach.auto.xfm

cp transforms/talairach.auto.xfm transforms/talairach.xfm

transforms/talairach.xfm

transforms/talairach.xfm

talairach_afd -T 0.005 -xfm transforms/talairach.xfm

transforms/talairach.xfm

awk -f $FREESURFER_HOME/bin/extract_talairach_avi_QA.awk transforms/talairach_avi.log

transforms/talairach_avi.log

-normalization

nu.mgz

mri_normalize -g 1 nu.mgz T1.mgz

T1.mgz

-skullstrip

nu.mgz

mri_em_register -skull nu.mgz $FREESURFER_HOME/average/RB_all_withskull_2007-08-08.gca transforms/talairach_with_skull.lta

transforms/talairach_with_skull.lta

T1.mgz

mri_watershed -T1 -brain_atlas $FREESURFER_HOME/average/RB_all_withskull_2007-08-08.gca transforms/talairach_with_skull.lta T1.mgz brainmask.auto.mgz

brainmask.auto.mgz

brainmask.auto.mgz

cp brainmask.auto.mgz brainmask.mgz

brainmask.mgz

recon-all -autorecon2 -subjid <subjid>

-gcareg

brainmask.mgz

mri_em_register -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB_all_2007-08-08.gca transforms/talairach.lta

transforms/talairach.lta

nu.mgz

-canorm

brainmask.mgz

mri_ca_normalize -mask brainmask.mgz nu.mgz $FREESURFER_HOME/average/RB_all_2007-08-08.gca transforms/talairach.lta norm.mgz

norm.mgz

nu.mgz

transforms/talairach.lta

-careg

brainmask.mgz

mri_ca_register -align-after -nobigventricles -mask brainmask.mgz -T transforms/talairach.lta norm.mgz $FREESURFER_HOME/average/RB_all_2007-08-08.gca transforms/talairach.m3z

transforms/talairach.m3z

transforms/talairach.lta

norm.mgz

-careginv

transforms/talairach.m3z

mri_ca_register -invert-and-save transforms/talairach.m3z

transforms/talairach.m3z.inv.x.mgz

transforms/talairach.m3z.inv.y.mgz

transforms/talairach.m3z.inv.z.mgz

-rmneck

nu.mgz

mri_remove_neck -radius 25 nu.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB_all_2007-08-08.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/RB_all_withskull_2007-08-08.gca transforms/talairach_with_skull.lta

transforms/talairach_with_skull.lta

nu_noneck.mgz

-calabel

norm.mgz

mri_ca_label -align -nobigventricles norm.mgz transforms/talairach.m3z $FREESURFER_HOME/average/RB_all_2007-08-08.gca aseg.auto.mgz

aseg.auto.mgz

transforms/talairach.m3z

aseg.auto.mgz

cp aseg.auto.mgz aseg.mgz

aseg.mgz

-ccseg

aseg.mgz

mri_cc -aseg aseg.auto.mgz -o aseg.auto_CCseg.mgz <subjid>

aseg.auto_CCseg.mgz

aseg.auto_CCseg.mgz

cp aseg.auto_CCseg.mgz aseg.mgz

aseg.mgz

-normalization2

brainmask.mgz

mri_normalize -aseg aseg.mgz -mask brainmask.mgz norm.mgz brain.mgz

brain.mgz

norm.mgz

aseg.mgz

-maskbfs

brain.mgz

mri_mask -T 5 brain.mgz brainmask.mgz brain.finalsurfs.mgz

brain.finalsurfs.mgz

brainmask.mgz

-segmentation

brain.mgz

mri_segment brain.mgz wm.seg.mgz

wm.seg.mgz

wm.seg.mgz

mri_edit_wm_with_aseg wm.seg.mgz brain.mgz aseg.mgz wm.asegedit.mgz

wm.asegedit.mgz

aseg.mgz

brain.mgz

wm.asegedit.mgz

mri_pretess wm.asegedit.mgz wm norm.mgz wm.mgz

wm.mgz

norm.mgz

-fill

wm.mgz

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

filled.mgz

aseg.mgz

../scripts/ponscc.cut.log

transforms/talairach.lta

-tessellate

filled.mgz

mri_pretess filled.mgz 255 norm.mgz filled-pretess255.mgz

filled-pretess255.mgz

norm.mgz

filled-pretess255.mgz

mri_tessellate filled-pretess255.mgz 255 lh.orig.nofix

lh.orig.nofix

filled.mgz

mri_pretess filled.mgz 127 norm.mgz filled-pretess127.mgz

filled-pretess127.mgz

norm.mgz

filled-pretess127.mgz

mri_tessellate filled-pretess127.mgz 127 rh.orig.nofix

rh.orig.nofix

?h.orig.nofix

mris_extract_main_component ?h.orig.nofix ?h.orig.nofix

?h.orig.nofix

rm -f filled-pretess255.mgz filled-pretess127.mgz

-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 ?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 -mgz -sphere qsphere.nofix -ga <subjid> ?h

?h.orig

?h.orig

mris_euler_number ?h.orig

?h.orig

?h.orig

mris_remove_intersection ?h.orig ?h.orig

?h.orig

rm ?h.inflated

-finalsurfs

brain.finalsurfs.mgz

mris_make_surfaces -noaparc -mgz -T1 brain.finalsurfs <subjid> ?h

?h.white

?h.pial

?h.thickness

?h.orig

?h.curv

?h.area

?h.cortex.label

-surfvolume

?h.area

mris_calc -o ?h.area.mid ?h.area add ?h.area.pial

?h.area.mid

?h.area.pial

?h.area.mid

mris_calc -o ?h.area.mid ?h.area.mid div 2

?h.area.mid

?h.area.mid

mris_calc -o ?h.volume ?h.area.mid mul lh.thickness

?h.volume

?h.volume

-smooth2

?h.white

mris_smooth -n 3 -nw ?h.white ?h.smoothwm

?h.smoothwm

-inflate2

?h.smoothwm

mris_inflate ?h.smoothwm ?h.inflated

?h.inflated

?h.sulc

?h.inflated

mris_curvature -thresh .999 -n -a 5 -w -distances 10 10 ?h.inflated

?h.inflated.H

?h.inflated.K

-segstats

aseg.mgz

mri_segstats --seg mri/aseg.mgz --sum stats/aseg.stats --pv mri/norm.mgz --excludeid 0 --brain-vol-from-seg --brainmask mri/brainmask.mgz --in mri/norm.mgz --in-intensity-name norm --in-intensity-units MR --etiv --surf-wm-vol --ctab $FREESURFER_HOME/ASegStatsLUT.txt --subject <subjid>

stats/aseg.stats

-cortribbon

orig.mgz

mris_volmask --label_left_white 2 --label_left_ribbon 3 --label_right_white 41 --label_right_ribbon 42 --save_ribbon --save_distance <subjid>

?h.ribbon.mgz

?h.white

?h.pial

recon-all -autorecon3 -subjid <subjid>

-sphere

?h.inflated

mris_sphere ?h.inflated ?h.sphere

?h.sphere

-surfreg

?h.sphere

mris_register -curv ?h.sphere $FREESURFER_HOME/average/?h.average.curvature.filled.buckner40.tif ?h.sphere.reg

?h.sphere.reg

-jacobian_white

?h.white

mris_jacobian ?h.white ?h.sphere.reg ?h.jacobian_white

?h.jacobian_white

?h.sphere.reg

-avgcurv

?h.sphere.reg

mrisp_paint -a 5 $FREESURFER_HOME/average/?h.average.curvature.filled.buckner40.tif#6 ?h.sphere.reg ?h.avg_curv

?h.avg_curv

-cortparc

aseg.mgz

mris_ca_label -aseg mri/aseg.mgz <subjid> ?h ?h.sphere.reg $FREESURFER_HOME/average/?h.curvature.buckner40.filled.desikan_killiany.2007-06-20gcs ?h.aparc.annot

label/?h.aparc.annot

?h.sphere.reg

-parcstats

label/?h.aparc.annot

mris_anatomical_stats -mgz -f stats/?h.aparc.stats -b -a label/?h.aparc.annot -c label/aparc.annot.ctab <subjid> ?h

stats/?h.aparc.stats label/aparc.annot.ctab

-cortparc2

aseg.mgz

mris_ca_label -aseg aseg.mgz <subjid> ?h ?h.sphere.reg $FREESURFER_HOME/average/?h.atlas2005_simple.gcs label/?h.aparc.a2005s.annot

label/?h.aparc.a2005s.annot

?h.sphere.reg

-parcstats2

label/?h.aparc.a2005s.annot

mris_anatomical_stats -mgz -f stats/?h.aparc.a2005s.stats -b -a label/?h.aparc.a2005s.annot -c label/aparc.annot.a2005s.ctab <subjid> ?h

stats/?h.aparc.a2005s.stats stats/aparc.annot.a2005s.ctab

-aparc2aseg

aseg.mgz

mri_aparc2aseg --s <subjid> --ribbon

aparc+aseg.mgz

?h.ribbon.mgz

label/?h.aparc.annot

aseg.mgz

mri_aparc2aseg --s <subjid> --ribbon --a2005s

aparc.a2005s+aseg.mgz

?h.ribbon.mgz

label/?h.aparc.a2005s.annot

-wmparc

aparc+aseg.mgz

mri_aparc2aseg --s <subjid> --labelwm --hypo-as-wm --rip-unknown --ribbon --o mri/wmparc.mgz --ctxseg aparc+aseg.mgz

wmparc.mgz

wmparc.mgz

mri_segstats --seg mri/wmparc.mgz --sum stats/wmparc.stats --pv mri/norm.mgz --excludeid 0 --brain-vol-from-seg --brainmask mri/brainmask.mgz --in mri/norm.mgz --in-intensity-name norm --in-intensity-units MR --etiv --subject <subjid> --surf-wm-vol --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt

stats/wmparc.stats

ReconAllStableTablev4 (last edited 2012-03-26 16:47:44 by NickSchmansky)