具体情况因人而异
#!/bin/bash
#touch processgo.sh
filelist=`ls /root/user/xiangyademo1/control_DTI_mriconvert/`
for dir in ${filelist};do
if [ -d ${dir} ];then
echo $dir
cd ${dir}
name=$(find *.nii)
#echo ${name%.*}
fslroi ${name%.*} b0 0 1
b0=$(find b0.nii.gz)
bet2 $b0 nodif_brain -m -f 0.2
eddy_correct ${name%.*} data 0
bvecs=$(find *_bvecs)
bvals=$(find *_bvals)
dtifit --data=data.nii.gz --out=data --mask=nodif_brain_mask.nii.gz -- bvecs=$bvecs --bvals=$bvals
cd ..
fi
done
网友评论