core
Base class to handle atlases in BrainGlobe.
Parameters
----------
path : str or Path object
path to folder containing data info.
def __init__(self, path):
docstring:
no docstring
def resolution(self):
docstring:
Make resolution more accessible from class.
def hierarchy(self):
docstring:
Returns a Treelib.tree object with structures hierarchy.
def lookup_df(self):
docstring:
Returns a dataframe with id, acronym and name for each structure.
def reference(self):
docstring:
no docstring
def annotation(self):
docstring:
no docstring
def hemispheres(self):
docstring:
no docstring
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.
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.
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.
def mesh_from_structure(self, structure):
docstring:
no docstring
def meshfile_from_structure(self, structure):
docstring:
no docstring
def root_mesh(self):
docstring:
no docstring
def root_meshfile(self):
docstring:
no docstring
def _idx_from_coords(self, coords, microns):
docstring:
no docstring
def get_structure_ancestors(self, structure):
docstring:
Returns a list of acronyms for all
ancestors of a given structure
def get_structure_descendants(self, structure):
docstring:
Returns a list of acronyms for all
descendants of a given structure
Last modified 2yr ago