-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3rd.sh
More file actions
31 lines (21 loc) · 1 KB
/
Copy path3rd.sh
File metadata and controls
31 lines (21 loc) · 1 KB
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
#!/bin/bash
#$ -S /bin/bash
set -x -e
#prepross code path
export preroot=/home/lixinwei/daiyu/prepross
# Original data path
cd /home/lixinwei/daiyu/initial_data/image
labelpath=/home/lixinwei/daiyu/initial_data/labels
# registration template
template=$preroot/MNI152_T1_1mm.nii.gz
for im in *_d_n4_trun_hism.nii.gz;do
bn=$(basename $im _d_n4_trun_hism.nii.gz)
# hippocampus
seg=$labelpath/${bn}_mask.nii.gz
seg_template=$labelpath/${bn}_mask_template.nii.gz
#t1-->template
$preroot/greedy -d 3 -a -dof 6 -m NCC 2x2x2 -i $template $im -o ${bn}_3t_greedy_t1_to_template_init_rigid.mat -n 400x0x0x0 -ia-image-centers -search 400 5 5
$preroot/greedy -d 3 -a -m NCC 2x2x2 -i $template $im -o ${bn}_3t_greedy_t1_to_template.mat -n 400x80x40x0 -ia ${bn}_3t_greedy_t1_to_template_init_rigid.mat
#reslice to template (get whole brain image)
$preroot/greedy -d 3 -rm $im ${bn}_3t_reslice_t1_to_template.nii.gz -rf $template -ri LABEL 0.2vox -rm $seg $seg_template -r ${bn}_3t_greedy_t1_to_template.mat
done