-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprepare_data.sh
executable file
·45 lines (41 loc) · 1.03 KB
/
prepare_data.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
#!/bin/bash
#
# This script prepares data: rename and copy to appropriate folders.
#
# NB: add the flag "-x" after "!/bin/bash" for full verbose of commands.
# Julien Cohen-Adad 2019-03-13
# t2
# ==============================================================================
# create folder
if [ ! -d "t2" ]; then
mkdir t2
fi
cd t2
# copy data
cp ${PATH_DATA}/${1}/${SUBFOLDER}/t2_tra.nii.gz t2.nii.gz
# go back to previous folder
cd -
# t2s
# ==============================================================================
# create folder
if [ ! -d "t2s" ]; then
mkdir t2s
fi
cd t2s
# copy data
cp ${PATH_DATA}/${1}/${SUBFOLDER}/pd_medic.nii.gz t2s_all.nii.gz
# go back to previous folder
cd -
# dwi
# ==============================================================================
# create folder
if [ ! -d "dwi" ]; then
mkdir dwi
fi
cd dwi
# copy data
cp ${PATH_DATA}/${1}/${SUBFOLDER}/dwi.nii.gz dmri.nii.gz
cp ${PATH_DATA}/${1}/${SUBFOLDER}/dwi.bvec bvec.txt
cp ${PATH_DATA}/${1}/${SUBFOLDER}/dwi.bval bval.txt
# go back to previous folder
cd -