-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.2.TENSOR_FITTING.sh
61 lines (34 loc) · 1.74 KB
/
2.2.TENSOR_FITTING.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
HOST='compimglab.myqnapcloud.com'
USER='ozgecan_kaplan'
PASSWD='guest123'
echo 'This script fits the tensors.Outputs will be saved under the subjects DTI/nii'
KBrainDir="/home/compimglab/Desktop/DTI/"
BVecDir="/home/compimglab/Desktop/DTI_Thesis/"
BValDir="/home/compimglab/Desktop/DTI_Thesis/"
MaskDir="/home/compimglab/Desktop/B0_Thesis/"
##### PD-Patients #######################
for i in "${input_P[@]}"
do
echo "Fit Tensors for Image PD_${i}"
mkdir "/home/compimglab/Desktop/DTI/PD${i}Fit"
OutDir="/home/compimglab/Desktop/DTI/PD${i}Fit/"
dtifit --data="${KBrainDir}PD${i}_ecc_brain.nii.gz" --out="${OutDir}PD${i}_fit" --mask="${MaskDir}PD${i}_B0_ecc_brain_mask.nii.gz" --bvecs="${BVecDir}PD${i}.bvec" --bvals="${BValDir}PD${i}.bval"
cd /home/compimglab/Desktop/DTI/
ncftpput -R -u $USER -p $PASSWD $HOST /PD_Patients/PD_${i}/exam_1/images/DTI/DTI_32/nii/ /home/compimglab/Desktop/DTI/PD${i}Fit/
done
####### END ############################
####### Healthy Control #############################
for i in "${input_K[@]}"
do
echo "Fit Tensors for Image K_${i}"
mkdir "/home/compimglab/Desktop/DTI/K${i}Fit"
OutDir="/home/compimglab/Desktop/DTI/K${i}Fit/"
dtifit --data="${KBrainDir}K${i}_ecc_brain.nii.gz" --out="${OutDir}K${i}_fit" --mask="${MaskDir}K${i}_B0_ecc_brain_mask.nii.gz" --bvecs="${BVecDir}K${i}.bvec" --bvals="${BValDir}K${i}.bval"
#Upload the outputs to server under regarding patients DTI_32/nii folder.
cd /home/compimglab/Desktop/DTI/
ncftpput -R -u $USER -p $PASSWD $HOST /PD_Patients/K_${i}/exam_1/images/DTI/DTI_32/nii/ /home/compimglab/Desktop/DTI/K${i}Fit/
done
####### END #############################
echo "Eddy Current Correction and Brain Extraction Completed."
echo "Registration will start."