Skip to content
Snippets Groups Projects
Commit 413e5a2b authored by Tim Behrens's avatar Tim Behrens
Browse files

*** empty log message ***

parent 91f529ab
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ RVOBJS=replacevols.o ...@@ -32,7 +32,7 @@ RVOBJS=replacevols.o
MDVOBJS=make_dyadic_vectors.o MDVOBJS=make_dyadic_vectors.o
SCRIPTS = eddy_correct bedpost bedpost_proc bedpost_cleanup bedpost_kill_all bedpost_kill_pid zeropad SCRIPTS = eddy_correct bedpost bedpost_proc bedpost_cleanup bedpost_kill_all bedpost_kill_pid zeropad bedpost_datacheck
XFILES = dtifit probtrack find_the_biggest medianfilter diff_pvm make_dyadic_vectors proj_thresh XFILES = dtifit probtrack find_the_biggest medianfilter diff_pvm make_dyadic_vectors proj_thresh
......
#!/bin/sh #!/bin/sh
if [ $1 = "" ]; then if [ "$1" = "" ]; then
echo "Usage: $0 data directory" echo "Usage: $0 data_dir"
exit; exit;
fi fi
...@@ -18,7 +18,41 @@ done ...@@ -18,7 +18,41 @@ done
for bv in ${DIR}/bvals ${DIR}/bvecs;do for bv in ${DIR}/bvals ${DIR}/bvecs;do
echo " num lines in $bv " echo " num lines in $bv "
cat $bv|wc -l cat $bv|wc -l |grep -v "^ *$"
echo " num words in $bv " echo " num words in $bv "
cat $bv|wc -w cat $bv|wc -w
done done
\ No newline at end of file
if [ `imtest ${DIR}/data` -eq 1 -a `imtest ${DIR}/nodif_brain_mask` -eq 1 ];then
dx=`avwval ${DIR}/data dim1`
dy=`avwval ${DIR}/data dim2`
dz=`avwval ${DIR}/data dim3`
dt=`avwval ${DIR}/data dim4`
nbmx=`avwval ${DIR}/nodif_brain_mask dim1`
nbmy=`avwval ${DIR}/nodif_brain_mask dim2`
nbmz=`avwval ${DIR}/nodif_brain_mask dim3`
if [ $dx -ne $nbmx -o $dy -ne $nbmy -o $dz -ne $nbmz ];then
echo "data dimensions do not match mask dimensions"
fi
bvallen=`cat ${DIR}/bvals|wc -w|grep -v "^ *$"`
bveclenw=`cat ${DIR}/bvecs|wc -w`
bveclenl=`cat ${DIR}/bvecs|wc -l|grep -v "^ *$"`
bveclen=`echo "$bveclenw / $bveclenl"|bc`
if [ $bveclen -ne $bvallen ];then
echo "bvecs and bvals are incompatible"
fi
if [ $bvallen -ne $dt ];then
echo "number of elements in bvals is not equal to number of vols in data"
fi
if [ $bveclen -ne $dt ];then
echo "number of elements per line in bvecs is not equal to number of vols in data"
fi
fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment