Hi all,
I'm trying to do a drive afni script that allows me to quickly review the results of the alignments of preprocessing.
To make things simpler, I copied all datasets I want to review into one folder. Basically, the script needs to switch the underlay and overlay volumes for each subject in the original space and tlrc space, and waits for the user to press ENTER to continue. See below my script. Although the script opens AFNI, it seems the plugout_drive commands are not done, neither the loop for the subjects.
Do you know what the problem could be? Any suggestions?
FYI, I'm using bash shell.
Thanks very much in advance,
Cesar
------------------------------
#!/bin/bash
## full/path/to/site/subject_list
subjects_list=subjects_list_APQ
align_dir=./review_align
## Get subjects to run
subjects=$(cat ${subjects_list})
cd ${align_dir}
# open AFNI
afni -niml -yesplugouts &
for subject in $subjects
do
echo "Press ENTER to see ORIG alignments for subject ${subject}"
set l = $<
plugout_drive \
-com "SWITCH_UNDERLAY A t1_${subject}_unif_al_epi+orig" \
-com "SWITCH_OVERLAY A pb03.${subject}.volreg+orig" \
-com 'OPEN_WINDOW A.axialimage mont=10x10:1 opacity=0.4 ifrac=1' \
-quit
echo "Press ENTER to see TRLC alignments for subject ${subject}"
set l = $<
plugout_drive -com "SWITCH_UNDERLAY A TT_N27+tlrc" \
-com "SWITCH_OVERLAY A pb03.${subject}.volreg+tlrc" \
-com 'OPEN_WINDOW A.axialimage mont=10x10:1 opacity=0.4 ifrac=1' \
-quit
done
# close AFNI
echo "Hit Enter to Quit AFNI"
set l = $<
plugout_drive -com 'QUIT' \
-quit