core

Contents

Atlas

Base class to handle atlases in BrainGlobe.
Parameters
----------
path : str or Path object
path to folder containing data info.

__init__ [#28]

Check the source code online

def __init__(self, path):

  docstring:

no docstring

resolution [#57]

Check the source code online

def resolution(self):

  docstring:

Make resolution more accessible from class.

hierarchy [#63]

Check the source code online

def hierarchy(self):

  docstring:

Returns a Treelib.tree object with structures hierarchy.

lookup_df [#71]

Check the source code online

def lookup_df(self):

  docstring:

Returns a dataframe with id, acronym and name for each structure.

reference [#85]

Check the source code online

def reference(self):

  docstring:

no docstring

annotation [#91]

Check the source code online

def annotation(self):

  docstring:

no docstring

hemispheres [#97]

Check the source code online

def hemispheres(self):

  docstring:

no docstring

hemisphere_from_coords [#122]

Check the source code online

def hemisphere_from_coords(self, coords, microns=False,
as_string=False):

  docstring:

Get the hemisphere from a coordinate triplet.
Parameters
----------
coords : tuple or list or numpy array
Triplet of coordinates. Default in voxels, can be microns if
microns=True
microns : bool
If true, coordinates are interpreted in microns.
as_string : bool
If true, returns "left" or "right".
Returns
-------
int or string
Hemisphere label.

structure_from_coords [#148]

Check the source code online

def structure_from_coords(self, coords, microns=False,
as_acronym=False, hierarchy_lev=None):

  docstring:

Get the structure from a coordinate triplet.
Parameters
----------
coords : tuple or list or numpy array
Triplet of coordinates.
microns : bool
If true, coordinates are interpreted in microns.
as_acronym : bool
If true, the region acronym is returned.
hierarchy_lev : int or None
If specified, return parent node at thi hierarchy level.
Returns
-------
int or string
Structure containing the coordinates.

_get_from_structure [#183]

Check the source code online

def _get_from_structure(self, structure, key):

  docstring:

Internal interface to the structure dict. It support querying with a
single structure id or a list of ids.
Parameters
----------
structure : int or str or list
Valid id or acronym, or list if ids or acronyms.
key : str
Key for the Structure dictionary (eg "name" or "rgb_triplet").
Returns
-------
value or list of values
If structure is a list, returns list.

mesh_from_structure [#205]

Check the source code online

def mesh_from_structure(self, structure):

  docstring:

no docstring

meshfile_from_structure [#208]

Check the source code online

def meshfile_from_structure(self, structure):

  docstring:

no docstring

root_mesh [#211]

Check the source code online

def root_mesh(self):

  docstring:

no docstring

root_meshfile [#214]

Check the source code online

def root_meshfile(self):

  docstring:

no docstring

_idx_from_coords [#217]

Check the source code online

def _idx_from_coords(self, coords, microns):

  docstring:

no docstring

get_structure_ancestors [#224]

Check the source code online

def get_structure_ancestors(self, structure):

  docstring:

Returns a list of acronyms for all
ancestors of a given structure

get_structure_descendants [#235]

Check the source code online

def get_structure_descendants(self, structure):

  docstring:

Returns a list of acronyms for all
descendants of a given structure