fsl.scripts.atlasq

This module contains the FSL atlasq program, the successor to atlasquery.

exception fsl.scripts.atlasq.IdentifyError

Bases: Exception

Exception raised by the identifyAtlas when an atlas cannot be identified.

class fsl.scripts.atlasq.HelpFormatter(prog, indent_increment=2, max_help_position=24, width=None)

Bases: argparse.RawDescriptionHelpFormatter

A custom argparse.HelpFormatter class which customises a few annoying things about default argparse behaviour.

fsl.scripts.atlasq.listAtlases(namespace)

List all available atlases.

fsl.scripts.atlasq.summariseAtlas(namespace)

Print information about one atlas.

fsl.scripts.atlasq.queryAtlas(namespace)

Query an atlas with coordinates or masks.

fsl.scripts.atlasq.queryShortOutput(atlas, sources, types, allLabels, allProps)

Called by queryAtlas when short output is requested.

fsl.scripts.atlasq.queryLongOutput(atlas, sources, types, allLabels, allProps)

Called by queryAtlas when long output is requested.

fsl.scripts.atlasq.ohi(namespace)

Emulates the FSL atlasquery tool.

fsl.scripts.atlasq.atlasOrDesc(aord, *args, **kwargs)

If aord is an Atlas it is returned. Otherwise it is assumed to be an AtlasDescription, in which case the corresponding Atlas is loaded and returned.

fsl.scripts.atlasq.labelNames(atlas, labels)

Converts the given sequence of labels into region names.

fsl.scripts.atlasq.maskQuery(atlas, masks, *args, **kwargs)

Queries the atlas at the given masks.

fsl.scripts.atlasq.coordQuery(atlas, coords, voxel, *args, **kwargs)

Queries the atlas at the given coords.

fsl.scripts.atlasq.identifyAtlas(idOrName)

Given a partial atlas ID or name, tries to find an atlas which uniquely matches it.

fsl.scripts.atlasq.printColumns(columns, titles=None, delim=' | ', sep=True, strip=False)

Convenience function which pretty-prints a collection of columns in a tabular format.

Parameters
  • columns – A sequence of columns, where each column is a list of strings.

  • titles – A sequence of titles, one for each column.

fsl.scripts.atlasq.parseArgs(args)

Parses command line arguments, returning an argparse.Namespace object.

fsl.scripts.atlasq.main(args=None)

Entry point for atlasq. Parses arguments, and runs the requested command.

fsl.scripts.atlasq.atlasquery_emulation(args=None)

Entry point for atlasquery. Runs as atlasq in ohi mode.