wrapup_atlas_from_data#
- brainglobe_atlasapi.atlas_generation.wrapup.wrapup_atlas_from_data(atlas_name: str, atlas_minor_version: int | str, citation: str, atlas_link: str, species: str, resolution: Tuple[int | float, int | float, int | float] | List[Tuple[int | float, int | float, int | float]], orientation: str, root_id: int, reference_stack: str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]] | List[str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]]], annotation_stack: str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]] | List[str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]]], structures_list: List[Dict], meshes_dict: Dict[int | str, str | Path], working_dir: str | Path, atlas_packager=None, hemispheres_stack=None, template_info: Dict[str, str | bool] | None = None, annotation_info: Dict[str, str | bool] | None = None, terminology_info: Dict[str, str | bool] | None = None, coordinate_space_info: Dict[str, str | bool] | None = None, scale_meshes=False, resolution_mapping=None, additional_references: List[Tuple[Dict | str, str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]] | List[str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]]]]] | Dict[str, str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]] | List[str | Path | ndarray[tuple[Any, ...], dtype[_ScalarT]]]] | None = None, additional_metadata: dict | None = None, overwrite=False, cleanup_files=None, compress=None) Path[source]#
Finalise an atlas with truly consistent format from all the data.
- Parameters:
atlas_name (str) – Atlas name in the form author_species.
atlas_minor_version (int | str) – Minor version number for this particular atlas.
citation (str) – Citation for the atlas, if unpublished specify “unpublished”.
atlas_link (str) – Valid URL for the atlas.
species (str) – Species name formatted as “CommonName (Genus species)”.
resolution (Resolution | ResolutionList) – Three elements tuple, resolution on three axes or a list of such tuples for each scale, ordered from highest to lowest resolution.
orientation (str) – Orientation of the original atlas (tuple describing origin for BGSpace).
root_id (int) – Id of the root element of the atlas.
reference_stack (ValidComponentData) – Reference stack for the atlas. If str or Path, will be read with tifffile. If list, should be list of stacks for each scale, ordered from highest to lowest resolution.
annotation_stack (ValidComponentData) – Annotation stack for the atlas. If str or Path, will be read with tifffile. If list, should be list of stacks for each scale, ordered from highest to lowest resolution.
structures_list (List[Dict]) – List of valid dictionaries for structures.
meshes_dict (Dict[int | str, str | Path]) – dict of meshio-compatible mesh file paths in the form {struct_id: meshpath}
working_dir (str | Path) – Path where the atlas will be generated.
atlas_packager (str or None) – Credit for those responsible for converting the atlas into the BrainGlobe format.
hemispheres_stack (ValidComponentData | None, optional) – Hemisphere stack for the atlas. If str or Path, will be read with tifffile. If list, should be list of stacks for each scale, ordered from highest to lowest resolution. If none is provided, atlas is assumed to be symmetric.
scale_meshes (bool, optional) – (Default value = False). If True the meshes points are scaled by the resolution to ensure that they are specified in microns, regardless of the atlas resolution.
resolution_mapping (List[int], optional) – a list of three mapping the target space axes to the source axes only needed for mesh scaling of anisotropic atlases
additional_references (List[Tuple[Dict | str, ValidComponentData]] | Dict[str, ValidComponentData] | None) – List of tuples containing metadata and arrays for secondary templates.
additional_metadata (dict, optional) – (Default value = empty dict). Additional metadata to write to manifest.json
overwrite (bool, optional) – (Default value = False). If True, will overwrite existing atlas directory. If False and atlas directory exists, raises FileExistsError.
cleanup_files (deprecated, optional) – (Default value = None). Deprecated and has no effect.
compress (deprecated, optional) – (Default value = None). Deprecated and has no effect.
- Returns:
Path to the finalised atlas directory.
- Return type:
Path