-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsuma-pics.sh
executable file
·67 lines (49 loc) · 1.93 KB
/
suma-pics.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
#!/bin/bash
#The following text file contains the location of the the functional images you wish to overlay
maps=$( cat ttest_image_list.txt )
function dataLoop() {
fname=$1
while read image; do
map=`echo $image | cut -d '.' -f 1 | cut -d '/' -f2`
plugout_drive \
-com "SWITCH_FUNCTION ${image}" \
-com "SET_PBAR_SIGN +" \
-com "SET_THRESHNEW A 0.05 *p" \
-com "SET_PBAR_ALL A +7
1.000000=#3300CC
0.962264=#330099
0.720755=#330066
0.267568=#0000FF
0.245676=#0066FF
0.243487=#0099FF
0.243268=#0066CC" \
-quit
sleep 2
DriveSuma \
-com recorder_cont -save_as ${fname}_${map}.jpg
done <ttest_image_list.txt
} # End of dataLoop
# Open afni and suma, wait 8 seconds or so because it takes SUMA a while to open
afni -yesplugouts -niml & suma -spec /usr/local/suma_MNI_N27/MNI_N27_both.spec -sv /usr/local/suma_MNI_N27/MNI_N27_SurfVol.nii -niml & sleep 8
plugout_drive -com "SWITCH_UNDERLAY MNI_N27_SurfVol.nii" \
-com "SEE_OVERLAY +" \
-com "SET_PBAR_SIGN +" \
-quit
# Connect Suma to afni
DriveSuma -com viewer_cont -key t
# Set the size of window
DriveSuma -com viewer_cont -viewer_size 1920 1200
# Turn the background colors and crosshair to OFF
DriveSuma -com viewer_cont -key b -key F3
# Move brain to show right lateral side and start recorder
DriveSuma -com viewer_cont -key 'ctrl+right' -key R
dataLoop R-Lat
# Remove the Right Hemisphere for Left Medial Shot
DriveSuma -com viewer_cont -key ']'
dataLoop L-Med
# Move brain for Left lateral shot
DriveSuma -com viewer_cont -key 'ctrl+left'
dataLoop L-Lat
# Restore Right hemisphere and Remove the Left Hemisphere for Right Medial Shot
DriveSuma -com viewer_cont -key ']' -key '['
dataLoop R-Med