Dear Ziad,
thanks again for your help, the whole thing works great! Please find below the script as I use it. This should also inspire folks who read the following post (I stumbled on that after our conversation):
Author: Oori (---.dsl.chcgil.sbcglobal.net)
Date: 11-01-06 22:59
Best wishes
-Wolfgang
#!/bin/tcsh
if ("$1" == "") then
echo "Usage:"
echo "\t`basename $0` [-startSUMA] I_range_min I_range_max bricks"
echo
echo "Parameter -startSUMA starts SUMA and adapts the viewer."
echo
echo "Examples:"
echo "\t`basename $0` -startSUMA 0 4 27"
echo "\t`basename $0` 0 4 29 31"
goto END
endif
echo "Initializing `basename $0`..."
set left = lh.pial.tlrc.ply
set right = rh.pial.tlrc.ply
set shots = shots.`date +%F-%H-%M`
set sleep_default = 1
if ("$1" == "-startSUMA") then
set I_range = ($argv[2-3])
set bricks = ($argv[4-$#argv])
## Start SUMA (and do nothing else)
@start
echo "\n### Switching to pial surface..."
DriveSuma -com viewer_cont -key period
echo "\n### Adapting view..."
# Remove crosshair and axes
DriveSuma -com viewer_cont -key F3 -key F1
# Change viewer size to 400x400 pixels
DriveSuma -com viewer_cont -viewer_size 400 400
# Zoom out two steps and redisplay immediately
DriveSuma -com viewer_cont -key:r2:d z
else
set I_range = ($argv[1-2])
set bricks = ($argv[3-$#argv])
endif
echo "\nI_range: $I_range"
echo "\nbricks: $bricks"
echo "\n### Loading datasets and making shots..."
# Subbrick to be displayed in SUMA
set sb = 7
foreach brick ($bricks)
echo "\nBrick $brick..."
set brick_left = `ls *left.$brick.1D.dset`
set brick_right = `ls *right.$brick.1D.dset`
# Load left dataset
DriveSuma -com surf_cont -load_dset $brick_left -surf_label $left
sleep $sleep_default
DriveSuma -com surf_cont -surf_label $left -I_sb $sb -T_sb $sb -B_sb 5 -I_range $I_range -switch_cmap byr64 -shw_0 y
sleep $sleep_default
# Load right dataset
DriveSuma -com surf_cont -load_dset $brick_right -surf_label $right
sleep $sleep_default
DriveSuma -com surf_cont -surf_label $right -I_sb $sb -T_sb $sb -B_sb 5 -I_range $I_range -switch_cmap byr64 -shw_0 y
sleep $sleep_default
## Full Brain (8 shots)
# Dorsal view
DriveSuma -com viewer_cont -key ctrl+up
DriveSuma -com viewer_cont -key r
# Ventral view
DriveSuma -com viewer_cont -key ctrl+down
DriveSuma -com viewer_cont -key r
# Frontal view
DriveSuma -com viewer_cont -key ctrl+shift+up
DriveSuma -com viewer_cont -key r
# Special view
DriveSuma -com viewer_cont -key ctrl+shift+up
DriveSuma -com viewer_cont -key:r2:d down
DriveSuma -com viewer_cont -key r
# Left lateral view
DriveSuma -com viewer_cont -key ctrl+left
DriveSuma -com viewer_cont -key r
# Right lateral view
DriveSuma -com viewer_cont -key ctrl+right
DriveSuma -com viewer_cont -key r
# Hide right hemisphere, capture medial view of left hemisphere
DriveSuma -com viewer_cont -key ']'
DriveSuma -com viewer_cont -key ctrl+right
DriveSuma -com viewer_cont -key r
DriveSuma -com viewer_cont -key ']'
# Hide left hemisphere, capture medial view of right hemisphere
DriveSuma -com viewer_cont -key '['
DriveSuma -com viewer_cont -key ctrl+left
DriveSuma -com viewer_cont -key r
DriveSuma -com viewer_cont -key '['
end
echo "\n### Saving shots (this may take a while - even after termination of thisscript)..."
set name = $shots
DriveSuma -com recorder_cont -save_as $name.png -save_all
echo "\nFinished `basename $0`."
END: