.../username/.brainglobe
folder, unless differently specified in the bg-atlasapi
configuration.atlas_scripts
directory (see below)structure_id_path
is the fundamental key argument for bg-atlasapi to understand the hierarchy of your regions. Going back to our example above, if telencephalon is 1, cortex 2, and visual cortex 3, structure_id_path
for the cortex region will be [1, 2], and for the visual cortex region will be [1, 2, 3]. you don’t necessarily need a fixed number of levels in your hierarchy. You should just make sure that there is one and only one root region (ie, a region with structure_id_path
of length 1). If your atlas does not have a multilevel hierarchy, just create a root region that all other regions are children of. How to generate the region hierarchy is up to you; just make sure you have a way of generating this list of dictionaries in python when you’ll start creating the atlas. wrapup_atlas_from_data
which takes all the metadata and data from above and creates the data structures required. These data structures include .tiff files with the various images, csv files with the structures metadata information, a README file laying out the atlas content etc. The same function creates a compressed folder which can be loaded to GIN for distribution (see above).brainrender
for visualizing anatomical data in 3D. For this reason, the atlas generation code from BrainGlobe provides functionality that can be used to generate such mesh files. This code can be used to generate a region’s mesh starting from the annotated image. A mask image is created which only contains the annotation for the brain region of interest, and a marching cubes algorithm is used to identify the surface of the region; finally a mesh is created from the output of the marching cubes algorithm and the results are saved to a .obj file. Repeating the process for each region in the atlas, it’s possible to easily create all the necessary meshes.atlasname_resolutionum
in the directory you were generating the atlas in) and check out its content.