lock controllers a little bit more?

hi my beloved AFNI team-

i’m doing lots of zooming-in micro comparisons between analyses and i really gotta get in there to see differences sometimes.
it’s obviously great how we can lock 2 controllers ‘A’ and ‘B’ in terms of both cross hairs and pval thresholds.
however, is there a way to also lock zoom, pan and especially crop? i seem to be wasting a lot of time getting windows set up so i can evaluate.
sure i guess i could “chauffeur it” (it’s a verb now, Paul!) but that takes extra time in a different way.
i can’t find the answer in the AFNI_interactive pdfs, on the message board, or any of the random gui menus that i can remember exist, but maybe i’m searching incorrectly. Thanks!


Advanced MRI Technologies, LLC
Helen Wills Neuroscience Institute, UC Berkeley

I suppose Zoom and Crop/Pan could be locked, but cannot be at this time.
I’d have to look into the code to see how to do these.

Zoom would be pretty easy, as I recall the way it’s implemented, and it’s a straightforward thing with only 4 discrete choices (1, 2, 3, 4).

Crop and Pan would be more complicated, as they would require dealing with the possibility that the Underlay datasets in two viewers would not be on the same grids (voxel dimensions and/or voxel counts along each edge), as the Underlay dataset defines the 3D “box” from which the image viewers extract slices. I suppose the easiest way to deal with this particular difficulty would be to outlaw such locking. Then it would probably not be too difficult. But of course, then Paul will also ask for the ability to chauffeur such capabilities, and then I’d have to take away his espresso machine (AKA the death penalty).

That is pretty high stakes GUI functionality. I will have to put my espresso machine under lock-and-key, just in case…


I will point out one sort-of workaround or at least a clue to making this work. The shift_Home key will move the cropped view to be over the crosshair. Similarly the Home key will center a zoomed view that is panned over somewhere else. This could be tracked automatically. The plugout_drive command for making controller B zoomed in image controller center the crosshair for the zoom/pan case would look like this (I can’t figure out the cropped case keystroke though).

plugout_drive -com ‘OPEN_WINDOW B.axialimage keypress=XK_Home’

hey guys-

thanks for the humorous exchange :slight_smile:
no need to build new stuff just for me; i realize i’m one of those annoying ‘meso-scale’ breeds

daniel your suggestion worked and totally satisfies me enough for me now, THANKS!

for anyone listening in:
before you type daniel’s command, start afni (i.e. controller A) with
afni -q -yesplugouts
then do the
plugout_drive -com ‘OPEN_WINDOW B.axialimage keypress=XK_Home’

(and if you have a simpler mac keyboard the home key is Fn + Left Arrow, i believe)



I just uploaded changes to the GUI to allow locking of zooming and panning (but not cropping) between windows from different AFNI controllers. That is, when ‘Zoom lock’ is enabled, axial image viewers from different controllers with zoom and pan together.

It’s kind of fun, actually. This feature will be available in stores for Christmas. And on our website for Hanukkah. Maybe even by Beethoven’s birthday.

ok i just installed the newest AFNI and it works so wonderfully and smoothly. THANKS BOB. i also added:

AFNI_ZOOM_LOCK = YES // NO=don’t lock zoomed in panels

to my .afnirc so it’s on by default for me now. i so appreciate this!