Anatomical templates

Screen Shot 2022-04-12 at 1.30.22 PM

Spatial normalization is often a desirable step in neuroimaging. The use of anatomical template directories simplifies command-line entry considerably. A typical interactive workflow might load a single-subject 4D data and then use “control-t” to load the previous template directory, including the multi-subject template, atlas, and user-defined regions.  On the command line, one can use “-T [template directory]”, where [template directory] is either a directory specification or a user-defined directory tag.

Fastmap enables users to define anatomical templates and atlases specific to a species or study by using a “template directory”. First, create or identify a directory somewhere on the local disk that contains

  • template.nii:        a required 3D volume(s) that usually is an average multi-subject brain, often in some standardized coordinate system;
  • atlas.nii/atlas.txt: an optional atlas with integer numbered regions, supplemented by a corresponding text file listing region number and text descriptions in rows (e.g., “11 right_putamen”);
  • overlay-list.dat:  an optional list of user-defined overlays, listed as region name followed by a file name. Note that file names can be listed relative to the template directory to simply creation and moving of directories. E.g., an overlay list will contain entries like “putamen regions/putamen.ovl”.

To define template directories in fastmap, use these steps under the “Anatomy” menu (see right figure):

  1. Create new template subMenu” to define a new template directory name (ID tag).
  2. Set template directory” to associate a directory with the name chosen in step 1.
  3. You can load the template directory either by “Load template directory —> name” or by using “Load last template directory” or the shortcut control-t to load the last template directory that you’ve used. For interactive usage, it’s often easiest to use control-t to avoid extra input from the command line.

For a defined template (e.g, “human_MNI305”), you can use the template ID with the “-T” command, as described above, or treat is an environment variable in other usage cases from the command line or from the “fastmap” file. To do the latter, refer to the template using the “%” character like this: fm -T human_MNI305 -o %human_MNI305/mySecondOverlayList.dat.  The “%” character replaces the typical “$” used for Unix/Linux environment variables so that the operating system doesn’t intercept the variable and prevent interpretation by fastmap.

Joseph B. Mandeville, Athinoula A. Martinos Center for Biomedical Imaging at MGH/MIT/Harvard