Skip to content

Commit

Permalink
Merge pull request #430 from Deep-MI/parc
Browse files Browse the repository at this point in the history
Sample Parc
  • Loading branch information
m-reuter committed Jan 19, 2024
2 parents 360d554 + 7cfff9f commit 799fb9d
Show file tree
Hide file tree
Showing 3 changed files with 513 additions and 57 deletions.
14 changes: 7 additions & 7 deletions recon_surf/recon-surf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,8 @@ else
RunIt "$cmd" $LF $CMDF

# Rewrite surface orig.nofix to fix vertex locs bug (scannerRAS instead of surfaceRAS set with mc)
cmd="$python ${binpath}rewrite_mc_surface.py --input $outmesh --output $outmesh --filename_pretess $mdir/filled-pretess$hemivalue.mgz"
RunIt "$cmd" $LF $CMDF
#cmd="$python ${binpath}rewrite_mc_surface.py --input $outmesh --output $outmesh --filename_pretess $mdir/filled-pretess$hemivalue.mgz"
#RunIt "$cmd" $LF $CMDF

# Check if the surfaceRAS was correctly set and exit otherwise (sanity check in case nibabel changes their default header behaviour)
cmd="mris_info $outmesh | tr -s ' ' | grep -q 'vertex locs : surfaceRAS'"
Expand Down Expand Up @@ -818,13 +818,13 @@ echo "echo \" \"" |& tee -a $CMDF
# this is dangerous, as some cortices could be < 0.6 mm, but then there is no volume label probably anyway.
# Also note that currently we cannot mask non-cortex regions here, should be done in mris_anatomical stats later
# the smoothing helps
cmd="mris_sample_parc -ct $FREESURFER_HOME/average/colortable_desikan_killiany.txt -file ${binpath}$hemi.DKTatlaslookup.txt -projmm 0.6 -f 5 -surf white.preaparc $subject $hemi aparc.DKTatlas+aseg.orig.mgz aparc.DKTatlas.mapped.prefix.annot"
RunIt "$cmd" $LF $CMDF

cmd="$python ${binpath}smooth_aparc.py --insurf $sdir/$hemi.white.preaparc --inaparc $ldir/$hemi.aparc.DKTatlas.mapped.prefix.annot --incort $ldir/$hemi.cortex.label --outaparc $ldir/$hemi.aparc.DKTatlas.mapped.annot"
#cmd="mris_sample_parc -ct $FREESURFER_HOME/average/colortable_desikan_killiany.txt -file ${binpath}$hemi.DKTatlaslookup.txt -projmm 0.6 -f 5 -surf white.preaparc $subject $hemi aparc.DKTatlas+aseg.orig.mgz aparc.DKTatlas.mapped.prefix.annot"
#RunIt "$cmd" $LF $CMDF
#cmd="$python ${binpath}smooth_aparc.py --insurf $sdir/$hemi.white.preaparc --inaparc $ldir/$hemi.aparc.DKTatlas.mapped.prefix.annot --incort $ldir/$hemi.cortex.label --outaparc $ldir/$hemi.aparc.DKTatlas.mapped.annot"
#RunIt "$cmd" $LF $CMDF
cmd="$python ${binpath}sample_parc.py --inseg $mdir/aparc.DKTatlas+aseg.orig.mgz --insurf $sdir/$hemi.white.preaparc --incort $ldir/$hemi.cortex.label --outaparc $ldir/$hemi.aparc.DKTatlas.mapped.annot --seglut ${binpath}$hemi.DKTatlaslookup.txt --surflut ${binpath}DKTatlaslookup.txt --projmm 0.6 --radius 2"
RunIt "$cmd" $LF $CMDF


# if we segment with FS or if surface registration is requested do it here:
if [ "$fsaparc" == "1" ] || [ "$fssurfreg" == "1" ] ; then
echo "echo \" \"" |& tee -a $CMDF
Expand Down
Loading

0 comments on commit 799fb9d

Please sign in to comment.