create_region_mesh#
- brainglobe_atlasapi.atlas_generation.mesh_utils.create_region_mesh(args)[source]#
Automate the creation of a region’s mesh. Given a volume of annotations and a structures tree, it takes the volume’s region corresponding to the region of interest and all of its children’s labels and creates a mesh. It takes a tuple of arguments to facilitate parallel processing with multiprocessing.pool.map.
Note, by default it avoids overwriting a structure’s mesh if the .obj file exists already.
- Parameters:
meshes_dir_path (pathlib Path object with folder where meshes are saved)
tree (treelib.Tree with hierarchical structures information)
node (tree's node corresponding to the region whose mesh is being created)
labels (list of unique label annotations in annotated volume,)
(list(np.unique(annotated_volume)))
annotated_volume (3d numpy array path to a zarr store with annotations)
ROOT_ID (int,)
that) (id of root structure (mesh creation is a bit more refined for)