当前位置:   article > 正文

DTI数据预处理及tbss的批处理代码_tbss预处理批量文件

tbss预处理批量文件

批处理代码
数据存放: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

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读