brainglobe_atlasapi.structure_tree_util#

Description

Utility functions for working with structure trees.

Functions

child_ids

Return a list of IDs of the children of a given structure.

get_structures_tree

Create a tree graph with the hierarchical organisation of all structures.

postorder_depth_first_search

Yield nodes in post-order depth first traversal (leaves first).

preorder_breadth_first_search

Yield nodes in a pre-order breadth first traversal of the tree.

preorder_depth_first_search

Yield nodes in a pre-order depth first traversal of the tree.