How to change directory with AFNI GUI open

Is it possible to change the current directory and thereby the list of files to choose from in Underlay/Overlay after AFNI GUI has been opened? If I change the directory in terminal it doesn’t auto-update in the GUI. Is the only option to open another GUI window from terminal after ‘cd’-ing?

I searched a bit but didn’t find the answer; apologies if this has already been covered! Thanks.

The directory switching is done by the Read Session and Switch Session buttons. You have to navigate to the desired directory on the left side and then choose it on the right side of the menu.

In the GUI, instead of “Session”, it is now “DataDir” (with “Switch” and “Read” next to the “DataDir” label).

You can start AFNI with multiple directories, as in


afni A B C

which will read data from the 3 directories named A, B, and C. Then you can switch among them with the “DataDir Switch”. If you read in more than one directory, you can also find in the “DataDir Switch” chooser something called “All_Datasets” (at the bottom). You can switch to that, which will allow you to overlay a dataset from directory C onto an underlay from directory A (for example).

You can also put the names of datasets on the afni command line. These will show up in a DataDir called “fromCLI” (CLI = Command Line Interface).

You can also read in image files (.jpg and .png) as “datasets”, as in

afni *.jpg

These can only be opened as Axial images, since they are only 1 “voxel” thick.

You can read directories recursively, as in

afni -R1

which will read datasets from the current directory and all its immediate (1 level deep) sub-directories. You can descend deeper with “-R2” and even deeper with just “-R” – however, do NOT try “-R” at the top of a large disk, because AFNI will try to read everything, and that is not going to work well.

For much more information, including lots of stuff you will likely never use, see the output of

afni -help

or see https://afni.nimh.nih.gov/pub/dist/doc/program_help/afni.html

Terrific, thanks very much!