magmap.brain_globe.bg_model module#

BrainGlobe model for integration in MagellanMapper

class magmap.brain_globe.bg_model.BrainGlobeMM[source]#

Bases: object

Model for BrainGlobe-MagellanMapper interactions.

Variables:
  • atlases_avail – Dictionary of the names of available atlases from BrainGlobe to their latest version string.

  • atlases_local – Dictionary of the names of locally downloaded BrainGlobe atlases to their version string.

get_atlas(name, download=True, fn_update=None)[source]#

Get a BrainGlobe atlas.

Parameters:
  • name (str) – Name of atlas to retrieve.

  • download (bool, default: True) – True to download the atlas if not available locally; False to return None if the atlas is not present.

  • fn_update (Optional[Callable[[int, int], None]], default: None) – Handler for progress updates during atlas download.

Return type:

Optional[BrainGlobeAtlas]

Returns:

The BrainGlobe atlas instance. None if the atlas could not be found or downloaded.

get_avail_atlases()[source]#

Fetch the available atlases from BrainGlobe.

Return type:

Dict[str, str]

Returns:

Dictionary of the names of available atlases from BrainGlobe to their latest version string.

get_local_atlases()[source]#

Get local, downloaded BrainGlobe atlases.

Return type:

Dict[str, str]

Returns:

Dictionary of the names of locally downloaded BrainGlobe atlases to their version string.

remove_local_atlas(name)[source]#

Remove local copy of downloaded BrainGlobe atlas.

Parameters:

name (str) – Name of atlas to remove