I was thinking, I often have a directory with output files from a bunch of participants in standard space, but no anatomical underlay. So I made an alias that will link in a template. But ideally, there would be some way in the AFNI controller to specify that instead of a file in the current directory, I would like one of the templates in the main AFNI directory as my underlay.
Anyway, it’s not urgent or necessary, and I don’t know if it would be useful to anyone else, but I thought I’d mention it.
Step 1: create a directory, say $HOME/aglobal
Step 2: copy any file(s) you want to be always present into that directory, for example, MNI152_2009_template.nii.gz
Step 3: in your $HOME/.afnirc file, add the line (to the ***ENVIRONMENT section)
AFNI_GLOBAL_SESSION = /Users/rwcox/aglobal
When you start AFNI, the files in this global session will always appear in the dataset choosers at the end. I personally use this “trick” to put the MNI nonlinear template (mentioned in Step 2) as a universal underlay.
Thanks Bob. To be honest, I intended to add to that post that there was probably a way to do it in AFNI that I was just unaware of, but then I forgot to write that. It certainly didn’t come as a surprise that AFNI was one step ahead of me.
In any case, since we’re on a roll here, there is one other thing I was wondering about. It would be great to have a way to automatically mask the overlay on the basis of the underlay. As things stand, if I run a second-level analysis I wind up making two copies, one of the original analysis and one masked by the intersection mask of the normalized data of the participants. But I don’t really need both these files. Ideally, there would be some way that the AFNI viewer could on-the-fly mask the overlay by something like the 3dAutomasked underlay resampled into the grid of the overlay. That way I could see all the blobs outside of the brain but if I wanted to not see them I could also do that, without making a new masked output file on disk (not that this is a big deal from a storage standpoint, it’s just an extra step that I have to do for every analysis).
Anyway, maybe there is a way to do something like this that I am unaware of, but in any case I thought I’d mention it. Thanks a lot either way.
Right-click on the “intensity bar” just to the right of the image. You’ll get a popup menu.
The item labeled “Automask?” is a toggle (on/off) switch that restricts the overlay display to the 2D automask generated from the current underlay image. This feature is (at least) approximately what you want.
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.