#! /bin/csh -f # # synthrawroi # # Original Author: Doug Greve # CVS Revision Info: # $Author: nicks $ # $Date: 2007/01/09 22:41:19 $ # $Revision: 1.2 $ # # Copyright (C) 2002-2007, # The General Hospital Corporation (Boston, MA). # All rights reserved. # # Distribution, usage and copying of this software is covered under the # terms found in the License Agreement file named 'COPYING' found in the # FreeSurfer source code root directory, and duplicated here: # https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferOpenSourceLicense # # General inquiries: freesurfer@nmr.mgh.harvard.edu # Bug reports: analysis-bugs@nmr.mgh.harvard.edu # set SYNTHRAWROI_VER = '$Id: synthrawroi,v 1.2 2007/01/09 22:41:19 nicks Exp $'; set roistem = (); set outstem = (); set monly = 0; set synthtype = "const"; set ntp = 0; if($#argv == 0) then echo "USAGE: synthrawrow -roi stem -ntp ntp -o stem [options]"; echo " -roi stem : stem of roi volume" echo " -ntp ntp : number of time points" echo " -o stem : stem of synthetic volume" echo "" echo "Options:" echo " -synthtype : const, sin, white ($synthtype)" echo "" echo " $SYNTHRAWROI_VER" echo " Comments or questions: analysis-bugs@nmr.mgh.harvard.edu" echo "" exit 1; endif goto parse_args; parse_args_return: goto check_params; check_params_return: set MATLAB = `getmatlab`; if($status) exit 1; #### Output Directory ####### set OutDir = `dirname $outstem`; set OutBase = `basename $outstem`; mkdir -p $OutDir; if ($monly) then set QuitOnError = 0; set TARGET = "tee $mfile" rm -f $mfile; else set QuitOnError = 1; set TARGET = "$MATLAB -display iconic" endif #---------------------------------------------------------------# $TARGET <