##2) tbss
data_path="/home/mcbrain/sharefolder/dti_tbss_new"
input="${data_path}/data_dti_con_time1"
ls $input |while read line;do
echo ${line}
fslroi ${input}/${line}/Dwi/${line}.nii ${input}/${line}/Dwi/${line}_b0 0 1
bet ${input}/${line}/Dwi/${line}_b0.nii ${input}/${line}/Dwi/${line}_nodif_brain -m -f 0.2
eddy_correct ${input}/${line}/Dwi/${line}.nii ${input}/${line}/Dwi/${line}_data.nii 0
dtifit --data=${input}/${line}/Dwi/${line}_data.nii --out=${input}/${line}/Dwi/${line}_data --mask=${input}/${line}/Dwi/${line}_nodif_brain_mask.nii.gz --bvecs=${input}/${line}/Dwi/${line}.bvec --bvals=${input}/${line}/Dwi/${line}.bval
fslmaths ${input}/${line}/Dwi/${line}_data_L2.nii -add ${input}/${line}/Dwi/${line}_data_L3.nii -div 2 ${input}/${line}/Dwi/${line}_RD.nii
done
##3)move FA.nii into one directory
mkdir ${data_path}/tbss
input="${data_path}/con_time1_dti"
ls $input |while read line;do
cp -r ${input}/${line}/Dwi/${line}_data_FA.nii.gz ${data_path}/tbss
done
cd ${data_path}/tbss
tbss_1_preproc *.nii
tbss_2_reg -T
tbss_3_postreg -S
tbss_4_prestats 0.2
网友评论