neurom.fst.sectionfunc.strahler_order¶
-
neurom.fst.sectionfunc.
strahler_order
(section)[source]¶ Branching order of a tree section
The strahler order is the inverse of the branch order, since this is computed from the tips of the tree towards the root.
This implementation is a translation of the three steps described in Wikipedia (https://en.wikipedia.org/wiki/Strahler_number):
- If the node is a leaf (has no children), its Strahler number is one.
- If the node has one child with Strahler number i, and all other children have Strahler numbers less than i, then the Strahler number of the node is i again.
- If the node has two or more children with Strahler number i, and no children with greater number, then the Strahler number of the node is i + 1.
No efforts have been invested in making it computationnaly efficient, but it computes acceptably fast on tested morphologies (i.e., no waiting time).