-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbwMNIview.sh
executable file
·69 lines (52 loc) · 1.71 KB
/
bwMNIview.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
#!/bin/bash
# Launches fslview with three image layers in MNI1521mm space:
#
# top (atlas) layer: translucent Harvard-Oxford MNI atlas: either cortical or sucortical
# middle layer: MNI152 T1 skull-stripped (greyscale), or user-provided image
# bottom layer: MNI152 T1 not skull-stripped (light green)
fxnLaunchFslview(){
du -h $atlasLayer
du -h $middleLayer
du -h $bottomLayer
fslview -m ortho \
${bottomLayer} -l Green -t 0.3 \
${middleLayer} -l Greyscale \
${atlasLayer} -l ${atlasLUT} -t 0.5 &
}
fxnSetAtlasLayer(){
# specify atlas and matching color look-up-table:
case "$atlas" in
hoCortical)
atlasLUT="MGH-Cortical"
atlasLayer="$FSLDIR/data/atlases/HarvardOxford/HarvardOxford-cort-maxprob-thr25-1mm.nii.gz"
;;
hoSubcortical)
atlasLUT="MGH-Subcortical"
atlasLayer="$FSLDIR/data/atlases/HarvardOxford/HarvardOxford-sub-maxprob-thr25-1mm.nii.gz"
;;
*) break ;;
esac
}
fxnSetMiddleLayer(){
# If there wasn't a user-provided image then use the skull-stripped MNI152 1mm brain:
middleLayer=$FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz #TBD: fail gracefully if doesn't exist
# Else, if the user provided an image first check it for:
# 1) whether it is a valid, readable image
# 2) whether it is geometrically identical FSL's MNI image
}
fxnSetLayers(){
# set the atlas layer:
fxnSetAtlasLayer
# set the middle layer:
fxnSetMiddleLayer
# set the bottom layer:
bottomLayer=$FSLDIR/data/standard/MNI152_T1_1mm.nii.gz
}
fxnMain(){
fxnSetLayers
fxnLaunchFslview
}
# set value of $atlas (hoCortial by default)
atlas="hoCortical"
#atlas="hoSubcortical"
fxnMain