Hi, Colm-
I suspect that using @chauffeur_afni:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/auto_image/auto_%40chauffeur_afni.html
would simplify your life here. It automatically makes sets of axial, coronal and sagittal images. It can make montages, and/or you can specify slice locations. You can specify ulay and olay ranges at the command line. You can combine it with 2dcat:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/auto_image/auto_2dcat.html
too.
This is a wrapper for making movies of a single slice---it will make 3 movies, one of axial, sagittal and coronal---which you might find useful, and in fact it might do what you want directly?
@djunct_4d_imager \
-inset 4D_DSET \
-prefix PREFIX \
-do_movie AGIF
... which will produce these outputs:
+ an image of the same central slice across volumes along the time
axis, with the brightness range constant across volume
("*onescl*" images); that is, the same grayscale in each panel
corresponds to the same numerical value.
+ an image of the same central slice across volumes along the time
axis, with the brightness range possibly *varying* for each
panel across volume ("*sepscl*" images); that is, the grayscale
value in each panel can (and likely will) correspond to *a
different* numerical value. Useful, for example, for checking
details in DWIs, where the expected scale of values can change
dramatically across volumes.
+ (with option flag) a movie version of the "onescl" images,
showing one slice at a time.
+ (with option flag) a movie version of the "sepscl" images,
showing one slice at a time.
--pt