Skip to content

Commit

Permalink
Move the surface fixing up and apply it to rh/lh.orig.premesh
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuegler committed Aug 8, 2024
1 parent 0f635ce commit 170435e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions recon_surf/recon-surf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,18 @@ for hemi in lh rh; do
echo "echo " | tee -a $CMDF
echo "echo \"=================== Creating surfaces $hemi - fix ========================\"" | tee -a $CMDF
echo "echo " | tee -a $CMDF
cmd="recon-all -subject $subject -hemi $hemi -fix -autodetgwstats -white-preaparc -cortex-label -no-isrunning $hiresflag $fsthreads"
cmd="recon-all -subject $subject -hemi $hemi -fix -no-isrunning $hiresflag $fsthreads"
RunIt "$cmd" $LF $CMDF

# rename the freesurfer preaparc surface
cmd="mv $sdir/$hemi.orig.premesh $sdir/$hemi.orig.premesh.noorient"
RunIt "$cmd" $LF $CMDF

# fix the surfaces if they are corrupt
cmd="$python ${binpath}rewrite_oriented_surface.py -i $sdir/$hemi.orig.premesh.noorient -o $sdir/$hemi.orig.premesh"
RunIt "$cmd" $LF $CMDF

cmd="recon-all -subject $subject -hemi $hemi -autodetgwstats -white-preaparc -cortex-label -no-isrunning $hiresflag $fsthreads"
RunIt "$cmd" $LF $CMDF
## copy nofix to orig and inflated for next step
# -white (don't know how to call this from recon-all as it needs -whiteonly setting and by default it also creates the pial.
Expand All @@ -703,14 +714,6 @@ for hemi in lh rh; do
cmd="recon-all -subject $subject -hemi $hemi -smooth2 -inflate2 -curvHK -no-isrunning $hiresflag $fsthreads"
RunIt "$cmd" $LF $CMDF

# rename the freesurfer preaparc surface
cmd="mv $sdir/$hemi.white.preaparc $sdir/$hemi.white.preaparc.nofix"
RunIt "$cmd" $LF $CMDF

# fix the surfaces if they are corrupt
cmd="$python ${binpath}rewrite_oriented_surface.py -i $sdir/$hemi.white.preaparc.nofix -o $sdir/$hemi.white.preaparc"
RunIt "$cmd" $LF $CMDF


# ============================= MAP-DKT ==========================================================

Expand Down

0 comments on commit 170435e

Please sign in to comment.