neuralib.atlas.data

neuralib.atlas.data.load_bg_structure_tree(atlas_name='allen_mouse_10um', check_latest=True, paired=False)[source]

Load structure dataframe or dict from brainglobe_atlasapi

Parameters:
  • atlas_name (str) – allen source name

  • check_latest (bool) – if check the brainglobe api latest version

  • paired (bool) – To only acronym & parent_acronym fields

Returns:

Return type:

DataFrame

neuralib.atlas.data.get_children(parent: int, *, dataframe: bool = False, atlas_name: str = 'allen_mouse_10um') list[int] | DataFrame[source]
neuralib.atlas.data.get_children(parent: str, *, dataframe: bool = False, atlas_name: str = 'allen_mouse_10um') list[str] | DataFrame
neuralib.atlas.data.get_annotation_ids(atlas_name='allen_mouse_10um', check_latest=True)[source]
Parameters:
  • atlas_name (str)

  • check_latest (bool)

Return type:

ndarray

neuralib.atlas.data.get_leaf_in_annotation(region, *, name=False, cached_file=None)[source]

Get a list of annotation {id, acronym} with given region {id, acronym}

Parameters:
  • region (int | str) – region id or region acronym

  • name (bool) – If True, return acronym, otherwise return id

  • cached_file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None) – cached json for the annotation_leaf_map

Returns:

List of annotation {id, acronym}

Return type:

list[int] | list[str]

neuralib.atlas.data.build_annotation_leaf_map(cached_file=None)[source]

Get all region id (key) and list of annotation id (values)

Parameters:

cached_file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None) – cached json file

Returns:

Return type:

dict[int, list[int]]

neuralib.atlas.data.get_dorsal_cortex(output_dir=None)[source]

Get example dorsal projection annotation svg file

Parameters:

output_dir (Path | None) – Output directory for caching

Returns:

Output file path

Return type:

Path

neuralib.atlas.data.load_allensdk_annotation(resolution=10, output_dir=None)[source]

DEPRECATED. Data Source directly from Allen Institute

Parameters:
  • resolution (int) – volume resolution in um. default is 10 um

  • output_dir (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None) – output directory for caching

Returns:

Array[uint32, [AP, DV, ML]]

Return type:

ndarray

neuralib.atlas.data.load_ccf_annotation(output_dir=None)[source]

DEPRECATED.

Parameters:

output_dir (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

Return type:

ndarray

neuralib.atlas.data.load_ccf_template(output_dir=None)[source]

DEPRECATED.

Parameters:

output_dir (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

Return type:

ndarray

neuralib.atlas.data.load_structure_tree(version='2017', output_dir=None)[source]

DEPRECATED.

Parameters:
  • version (Literal['2017', 'old'])

  • output_dir (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader | None)

Return type:

DataFrame