Skip to content
Snippets Groups Projects
ocmr_preproc 1.15 KiB
Newer Older
David Flitney's avatar
David Flitney committed
#!/bin/sh

#   Copyright (C) 2004 University of Oxford
#
#   SHCOPYRIGHT

usage()
{
    echo "Usage :ocmr_preproc <number of slices per volume>"
    echo ""
    exit 1
}
 
[ $# -lt 1 ] && usage

nep=`echo *ep2d_* |wc -w`
nlp=`echo *lp2d_* |wc -w`

if [ $nep -gt 1 ];then 
    a1=`imglob -oneperimage images_?_*ep2d_*`
    a2=`imglob -oneperimage images_??_*ep2d_*`
    avwmerge -t big4D $a1 $a2
elif [ $nlp -gt 1 ];then 
    a1=`imglob -oneperimage images_?_*lp2d_*`
    a2=`imglob -oneperimage images_??_*lp2d_*`
    avwmerge -t big4D $a1 $a2
fi

#nslices=${1}
#zsize=`avwval big4D dim3`
#tsize=`avwval big4D dim4`
#tpts=`echo "10k $zsize $nslices /p "|dc -` 
#afterdot=`echo $tpts | awk -F . '{print \$2}'`
#foo=`echo $afterdot|grep  [123456798]`
#if [ ! "$foo" = "" ]; then
#    echo "wrong number of slices somewhere - exiting"
#    exit 1
#fi
#tpts=`echo "$tpts \* $tsize" |bc"'
#xsize=`avwval big4D dim1`
#ysize=`avwval big4D dim2`
#xvoxsize=`avwval big4D pixdim1`
#yvoxsize=`avwval big4D pixdim2`
#zvoxsize=`avwval big4D pixdim3`
#datatype=`avwval big4D datatype`


#avwcreatehd $xsize $ysize $nslices $tpts $xvoxsize $yvoxsize $zvoxsize 0 0 0 0# $datatype big4D