#!/bin/sh

#Charlotte Rae 2012

#Put me in your /home/bin/, and remember to make me executable with chmod a+rwx dtifit_data.

#Fit diffusion tensors

#Example dtifit usage:
#dtifit -k PD_04/*ec.nii.gz -m PD_04/nodif_brain_mask.nii.gz -r PD_04/*.bvec -b PD_04/*.bval -o PD_04/dti

subjs="110159 110309"
#Put your subject folders in here

#Write your main directory here
cd /imaging/cr01/folder/

for zzVARdti in ${subjs} ; do
echo "Running dtifit for ${zzVARdti}"
cd ${zzVARdti}/
dtifit -k ${zzVARdti}"ec".nii.gz -m nodif_brain_mask.nii.gz -r ${zzVARdti}.bvec -b ${zzVARdti}.bval -o dti
cd /imaging/cr01/folder/
done


echo "End"
