Multivariate Pattern Analysis in Python

# mvpa2.atlases.warehouse.XMLBasedAtlas

class `mvpa2.atlases.warehouse.``XMLBasedAtlas`(filename=None, resolution=None, image_file=None, coordT=None, default_levels=None, load_maps=True)

  Base class for atlases using XML as the definition backend

  Attributes

  `coordT` |
  `extent` |
  `levels` |
  `origin` |
  `resolution` |
  `spaceT` |
  `version` |
  `voxdim` |

  Methods

  Parameters:

  filename : str

  > Filename for the xml definition of the atlas

  resolution : None or float

  > Some atlases link to multiple images at different resolutions. if None – best resolution is selected using 0th dimension resolution

  image_file : None or str

  > If None, overrides filename for the used imagefile, so it could load a custom (re-registered) atlas maps

  coordT

  > Optional transformation to apply first

  default_levels : None or slice or list of int

  > What levels by default to operate on

  load_maps : bool

  > Load spatial maps for the atlas.

  Attributes

  `coordT` |
  `extent` |
  `levels` |
  `origin` |
  `resolution` |
  `spaceT` |
  `version` |
  `voxdim` |

  Methods

  `coordT`
  `extent`
  `label_point`(coord, levels=None)

    Return labels for the given spatial point at specified levels

    Function takes care about first transforming the point into the voxel space

    Parameters:

    coord : tuple

    > Coordinates of the point (xyz)

    levels : None or list of int

    > At what levels to return the results

  `levels`
  `levels_listing`()
  `load_atlas`(filename)

    Load atlas from a file

  `origin`
  `query`(index, query_voxel=False)

    Generic query method.

    Use shortcuts `__getitem__` for querying by voxel indices and `__call__` for querying by space coordinates.

    Parameters:

    index : tuple or list

    > Arguments of the query, such as coordinates and optionally levels

    query_voxel : bool

    > Either at the end query a voxel indexes or point coordinates

    Allows to access the elements via simple indexing. Examples::

    > print atlas[ 0, -7, 20, [1,2,3] ] print atlas[ (0, -7, 20), 1:2 ] print atlas[ (0, -7, 20) ] print atlas[ (0, -7, 20), : ]

  `resolution`
  `set_coordT`(coordT)

    Set coordT transformation.

    spaceT needs to be adjusted since we glob those two transformations together

  `spaceT`
  `version`
  `voxdim`