-
Notifications
You must be signed in to change notification settings - Fork 0
/
hcp7recontrack.sh
executable file
·70 lines (57 loc) · 1.82 KB
/
hcp7recontrack.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
#!/bin/bash
#PBS -k o
#PBS -l nodes=1:ppn=2,mem=4000mb,walltime=24:00:00
#PBS -M pavesani@iu.edu
#PBS -m abe
#PBS -N hcp7t-redo
#PBS -j oe
# Adaptation of the original pipeline used for Caiafa-Pestilli paper
# see on github.com the repository
# brain-life/pestillilab_projects/blob/master/et/mrtrix_ensemble_7t.sh
ID_0009=108323
ID_0010=109123
ID_0011=131217
ID_0012=910241
SUB=$1
ID=$(eval echo "\$ID_$1")
SRC=/N/dc2/projects/lifebid/HCP7/${ID}/fibers
DIR=/N/dc2/projects/o3d/test3/O3D_HCP7T/derivatives/preprocess/sub-${SUB}/dwi
OUT=/N/dc2/projects/lifebid/Paolo/data/O3D_SRC/HCP7T/${ID}
DWI=data_b2000
LMAX=8
NUMFIBERS=500000
MAXNUMFIBERSATTEMPTED=1500000
cp ${SRC}/${DWI}_wm.mif ${OUT}/${DWI}_wm.mif
## Compute Tensor Model
dwi2tensor ${OUT}/${DWI}_dwi.mif \
-grad ${OUT{/${DWI}.b \
${OUT}/${DWI}_dt.mif
## create eigenvector map
tensor2vector $OUT/${DWI}_dt.mif - | \
mrmult - $OUT/${DWI}_fa.mif $OUT/${DWI}_ev.mif
## Perform CSD in white matter voxel
csdeconv $OUT/${DWI}_dwi.mif \
-grad $OUT/$DWI.b \
$OUT/${DWI}_response.txt \
-lmax $LMAX \
-mask $OUT/${DWI}_brainmask.mif \
$OUT/${DWI}_lmax${LMAX}.mif
##echo tracking Deterministic Tensorbased
for i_track in 01 02 03 04 05 06 07 08 09 10; do
streamtrack DT_STREAM $OUT/${DWI}_dwi.mif \
$OUT/${DWI}_wm_tensor-NUM${i_track}-$NUMFIBERS.tck \
-seed $OUT/${DWI}_wm.mif \
-mask $OUT/${DWI}_wm.mif \
-grad $OUT/${DWI}.b \
-number $NUMFIBERS -maxnum $MAXNUMFIBERSATTEMPTED
done
for i_track in 01 02 03 04 05 06 07 08 09 10; do
for i_type in SD_STREAM SD_PROB; do
streamtrack $i_type $OUT/${DWI}_lmax${LMAX}.mif \
$OUT/${DWI}_csd_lmax${LMAX}_wm_${i_type}-NUM${i_track}-$NUMFIBERS.tck \
-seed $OUT/${DWI}_wm.mif \
-mask $OUT/${DWI}_wm.mif \
-grad $OUT/$DWI.b \
-number $NUMFIBERS -maxnum $MAXNUMFIBERSATTEMPTED
done
done