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

*** empty log message ***

parent ae55fdac
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ FTBOBJS=find_the_biggest.o ...@@ -21,7 +21,7 @@ FTBOBJS=find_the_biggest.o
PJOBJS=proj_thresh.o PJOBJS=proj_thresh.o
MEDOBJS=medianfilter.o MEDOBJS=medianfilter.o
SCRIPTS = eddy_correct
XFILES = dtifit probtrack find_the_biggest medianfilter XFILES = dtifit probtrack find_the_biggest medianfilter
RUNTCLS = Fdt RUNTCLS = Fdt
......
#!/bin/sh
Usage() {
echo ""
echo "Usage: eddy_coorect <4dinput> <4doutput> <reference_no>"
echo ""
exit
}
[ "$1" = "" ] && Usage
[ "$2" = "" ] && Usage
[ "$3" = "" ] && Usage
input=`basename ${1} .hdr`
input=`basename ${input} .img`
output=`basename ${2} .hdr`
output=`basename ${output} .img`
ref=${3}
if [ ! -e ${input}.hdr -o ! -e ${input}.img ];then
echo "Input does not exist or is not in analyze format"
exit
fi
avwroi ${input} ${$}ref ${ref} 1
nvols=`avwval ${input} dim4`
avwsplit ${input}
i=0;
avwmaths vol0000 newvol0000
while [ ${i} -lt ${nvols} ];do
echo ${i} volumes completed
inp=`zeropad $i 4`;
flirt -in vol${inp} -ref ${$}ref -nosearch -o newvol${inp}
i=`expr $i + 1`;
done
rm vol* ${$}*
avwmerge -t ${output} newvol*.hdr
rm newvol*
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