#! /bin/tcsh -ef # # morph_subject-lh # # # # Copyright © 2021 The General Hospital Corporation (Boston, MA) "MGH" # # Terms and conditions for use, reproduction, distribution and contribution # are found in the 'FreeSurfer Software License Agreement' contained # in the file 'LICENSE' found in the FreeSurfer distribution, and here: # # https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense # # Reporting: freesurfer@nmr.mgh.harvard.edu # # set version = 'morph_subject-lh dev'; set hemi = lh if($#argv != 1) then echo "USAGE: morph_subject-$hemi subjid" echo $version exit 1; endif set subjdir = $SUBJECTS_DIR/$1 if(! -e $subjdir) then echo "ERROR: $subjdir does not exist" exit 1; endif pushd $SUBJECTS_DIR/$1 touch NOTES echo " " >> NOTES echo $0 $* >> NOTES echo $version >> NOTES whoami >> NOTES date >> NOTES hostname >> NOTES popd mkdir -p $SUBJECTS_DIR/$1/scripts pushd $SUBJECTS_DIR/$1/scripts #if (-e $SUBJECTS_DIR/$1/surf/$hemi.sphere == 0) \ # mris_sphere -w 0 ../surf/$hemi.inflated ../surf/$hemi.sphere ;\ #endif set StartDate = `date`; #-----------------------------------------------------------------# mris_sphere -w 0 ../surf/$hemi.inflated ../surf/$hemi.sphere #-----------------------------------------------------------------# mris_register -w 0 -curv \ ../surf/$hemi.sphere \ $FREESURFER_HOME/average/$hemi.average.tif \ ../surf/$hemi.sphere.reg #-----------------------------------------------------------------# mris_register -w 0 -curv -reverse \ ../surf/$hemi.sphere \ $FREESURFER_HOME/average/rh.average.tif \ ../surf/$hemi.rh.sphere.reg #-----------------------------------------------------------------# #morph_rgb-$hemi $1 #mris_register -w 0 ../surf/$hemi.sphere $FREESURFER_HOME/average/$hemi.average.tif ../surf/$hemi.sphere.dist_new #-----------------------------------------------------------------# map_central_sulcus $1 $hemi echo "Started at: $StartDate" echo "Ended at: `date`" exit 0; #--------------- Ignore ------------------------# set SVIT_DIR = $SUBJECTS_DIR/$1/svit if (-e $SVIT_DIR == 0) \ mkdir $SVIT_DIR ;\ endif set SLF = $SVIT_DIR/$hemi.sphere.reg.svit.log mri-structvits -subject $1 -umask 0 \ -hemi $hemi -outdir $SVIT_DIR -can sphere.reg | tee -a $SLF if($status)then echo "ERROR: mri-structvits" exit 1; endif #mri-structvits -subject $1 -umask 0 \ # -hemi $hemi -outdir $SVIT_DIR -can rh.sphere.reg | tee -a $SLF