The tool atlasquery is designed to allow command-line interrogation of the atlas images supplied with FSL, in the same way as is possible via FSLView. It takes as input the name of one of the FSL atlases together with either a coordinate of interest or a mask. The syntax is:
atlasquery [-a "<atlasname>"] [-m <maskimage>] [-c <X>,<Y>,<Z>] Compulsory arguments (You MUST set one or more of): -a,--atlas name of atlas to use Optional arguments (You may optionally specify one or more of): -V,--verbose switch on diagnostic messages -h,--help display this message -m,--mask a mask image to use during structural lookups -c <X>,<Y>,<Z> specify coordinates of the point of interest (as mm coordinates) --dumpatlases Dump a list of the available atlases
Note that the name of the atlas being specified must be exactly as specified in the list created by --dumpatlases and requires double quotes to enable the spaces to be included in the name. See examples below.
The output from atlasquery is text, sometimes with a small amount of formatting in html suitable for a browser. It gives the (average) probability of a voxel or mask being a member of the different labelled regions within the atlas. If a mask is used then the probability is averaged over all the voxels in the mask. All the probability numbers are scaled from 0 to 100, so that they are easily interpreted as percentages (e.g., 49.5 represents a probability of 0.495).
The probability values will not add up to 100 if the coordinate or mask is outside, or on the edge of, the ROIs featured in the atlas.
For a single coordinate, the output will exactly match that shown in the atlas tool of FSLView.
Example Usage and Output
In the following examples the first line is the command (after the shell prompt, $) and the remaining lines are the output.
With a coordinate (in mm convention; i.e. MNI coordinates):
$ atlasquery -a "Harvard-Oxford Subcortical Structural Atlas" -c -22,10,0 <b>Harvard-Oxford Subcortical Structural Atlas</b><br>99% Left Putamen
With a mask (in MNI space):
$ atlasquery -a "Harvard-Oxford Subcortical Structural Atlas" -m mask.nii.gz Right Cerebral White Matter:3.5 Right Cerebral Cortex :0.5 Right Putamen:49.5 Right Pallidum:46