fsl.scripts.atlasq

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

exception fsl.scripts.atlasq.IdentifyError[source]

Bases: Exception

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

__module__ = 'fsl.scripts.atlasq'
__weakref__

list of weak references to the object (if defined)

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

Bases: RawDescriptionHelpFormatter

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

_format_usage(usage, actions, groups, prefix)[source]
__module__ = 'fsl.scripts.atlasq'
fsl.scripts.atlasq.listAtlases(namespace)[source]

List all available atlases.

fsl.scripts.atlasq.summariseAtlas(namespace)[source]

Print information about one atlas.

fsl.scripts.atlasq.queryAtlas(namespace)[source]

Query an atlas with coordinates or masks.

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

Called by queryAtlas when short output is requested.

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

Called by queryAtlas when long output is requested.

fsl.scripts.atlasq.ohi(namespace)[source]

Emulates the FSL atlasquery tool.

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

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)[source]

Converts the given sequence of labels into region names.

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

Queries the atlas at the given masks.

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

Queries the atlas at the given coords.

fsl.scripts.atlasq.identifyAtlas(idOrName)[source]

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)[source]

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)[source]

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

fsl.scripts.atlasq.main(args=None)[source]

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

fsl.scripts.atlasq.atlasquery_emulation(args=None)[source]

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