-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMT_build_template_04.sh
executable file
·77 lines (58 loc) · 1.16 KB
/
MT_build_template_04.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# variables
refDir=/Volumes/Yorick/Templates/old_templates/mni_icbm152_nlin_sym_09c_nifti/mni_icbm152_nlin_sym_09c
workDir=/Volumes/Yorick/PreProc_Methods/Template
con1=${workDir}/construct_head
con2=${workDir}/construct_brain
# set up
mkdir $con1
mkdir $con2
cd $workDir
for i in s*; do
cd $i
cp ${i}_mni.nii.gz $con1
cp ${i}_brain.nii.gz $con2
cd $workDir
done
# make head template
if [ ! -f ${con1}/PreProc_head_template.nii.gz ]; then
cd $con1
DIM=3
ITER=30x90x30
TRANS=GR
SIM=CC
CON=2
PROC=8
REF=${refDir}/mni_icbm152_t1_tal_nlin_sym_09c.nii
buildtemplateparallel.sh \
-d $DIM \
-m $ITER \
-t $TRANS \
-s $SIM \
-c $CON \
-j $PROC \
-o PreProc_head_ \
-z $REF \
s*.nii.gz
fi
# make brain template
if [ ! -f ${con2}/PreProc_brain_template.nii.gz ]; then
cd $con2
DIM=3
ITER=30x90x30
TRANS=GR
SIM=CC
CON=2
PROC=8
REF=${refDir}/mni_icbm152_t1_tal_nlin_sym_09c.nii
buildtemplateparallel.sh \
-d $DIM \
-m $ITER \
-t $TRANS \
-s $SIM \
-c $CON \
-j $PROC \
-o PreProc_brain_ \
-z $REF \
s*.nii.gz
fi