New AFNI user here! My lab was wondering how to load multiple AFNI images at once (aka without having to click “New” in the GUI)? We are trying to streamline our QA process and wanted to see if there was a faster way to do this!
There is an @DriveAfni demo, actually, which you would probably want to look at. You need to download the AFNI Bootcamp dataset, and run the command just from the directory containing AFNI_data6.tgz; if you run @DriveAfni with no args, it will tell you how to do so.
#!/bin/tcsh
# make a list of dsets you want to view; here, they are in a single directory
set all_dsets = ( DSET1 DSET2 DSET3 ... )
set Ndset = ${#all_dsets}
# have at least as many letters as $all_dsets
set all_letts = ( A B C D E F G H )
set Nlett = ${#all_letts}
if ( ${Nlett} < ${Ndset} ) then
echo "** Hey, going to need more than ${Nlett} for these ${Ndset} dsets!"
exit 1
endif
# -----------------------------------------------------
set NPB = `afni -available_npb_quiet`
set x0 = 200
# open up the GUI
afni -npb ${NPB} -niml -yesplugouts -echo_edu
# loop over datasets, move windows with each new dset opened
foreach ii ( `seq 1 1 ${Ndset}` )
# pick out each dset, and a letter designation for the controller
set dset = ${all_dsets[$ii]}
set ll = ${all_letts[$ii]}
# open up each, moving a bit to the right with each new set
plugout_drive -npb ${NPB} -echo_edu \
-com "OPEN_WINDOW ${ll} geom=500x500+${x0}+5" \
-com "OPEN_WINDOW ${ll}.axialimage geom=500x500+${x0}+200 \
ifrac=0.8 opacity=9" \
-com "OPEN_WINDOW ${ll}.sagittalimage geom=500x500+${x0}+725 \
ifrac=0.8 opacity=9" \
-com "SWITCH_UNDERLAY ${ll}.${dset}" \
-quit
@ x0 = $x0 + 510
end
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.