赞
踩
批处理代码
数据存放:DTI/sub01下存放sub01.nii.gz,sub01.bvec ,sub01.bval
脚本存放:FSL文件夹下如下代码
#!/bin/bash
input='/Users/xiaoyanjia/Desktop/working/study/test_data/FSL/DTI'
for i in `ls ${input}`
do
echo ${i}
fslroi ${input}/${i}/${i}.nii ${input}/${i}/${i}_b0 0 -1 0 -1 0 -1 0 1
bet ${input}/${i}/${i}_b0.nii.gz ${input}/${i}/${i}_nodif_brain.nii.gz -m -f 0.2
eddy_correct ${input}/${i}/${i}.nii ${input}/${i}/${i}_data 0
dtifit --data=${input}/${i}/${i}_data.nii.gz --out=${input}/${i}/${i}_data --mask=${input}/${i}/${i}_nodif_brain_mask.nii.gz --bvecs=${input}/${i}/${i}.bvec --bvals=${input}/${i}/${i}.bval
done
mkdir tbss
input='/Users/xiaoyanjia/Desktop/working/study/test_data/FSL/DTI'
for i in `ls ${input}`
do
cp ${input}/${i}/${i}_data_FA.nii.gz tbss
done
cd $pwd/tbss
tbss_1_prepro *.nii.gz
tbss_2_reg -T
tbss_3_postreg -S
tbss_4_prestats 0.2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。