neurom.fst.sectionfunc¶
Legacy module, replaced by neurom.features.sectionfunc.
Functions
Branching order of a tree section. |
|
Compute the total downstream length starting from a section. |
|
Returns the list of distances between consecutive points. |
|
Segment ID / offset corresponding to a given fraction of section length. |
|
Surface area of a section. |
|
End to end distance of a section. |
|
Compute the mean radius of a section weighted by segment lengths. |
|
Inter-segment opening angles in a section. |
|
Path length from section to root. |
|
Return the radial distances of a tree section to a given origin point. |
|
Tortuosity of a section. |
|
Volume of a section. |
|
Returns the list of segment lengths within the section. |
|
Branching order of a tree section. |
Classes
Column labels for internal data representation. |
-
class
neurom.fst.sectionfunc.
COLS
[source]¶ Bases:
object
Column labels for internal data representation.
-
neurom.fst.sectionfunc.
branch_order
(section)[source]¶ Branching order of a tree section.
The branching order is defined as the depth of the tree section.
Note
The first level has branch order 1.
-
neurom.fst.sectionfunc.
downstream_pathlength
(section)[source]¶ Compute the total downstream length starting from a section.
-
neurom.fst.sectionfunc.
interval_lengths
(points, prepend_zero=False)[source]¶ Returns the list of distances between consecutive points.
- Parameters
points – a list of np.array of 3D points
prepend_zero (bool) – if True, the returned array will start with a zero
-
neurom.fst.sectionfunc.
locate_segment_position
(section, fraction)[source]¶ Segment ID / offset corresponding to a given fraction of section length.
-
neurom.fst.sectionfunc.
section_end_distance
(section)[source]¶ End to end distance of a section.
The end to end distance of a section is defined as the euclidian distnce between its end points.
If the section contains less than 2 points, the value 0 is returned.
-
neurom.fst.sectionfunc.
section_mean_radius
(section)[source]¶ Compute the mean radius of a section weighted by segment lengths.
-
neurom.fst.sectionfunc.
section_meander_angles
(section)[source]¶ Inter-segment opening angles in a section.
-
neurom.fst.sectionfunc.
section_radial_distance
(section, origin)[source]¶ Return the radial distances of a tree section to a given origin point.
The radial distance is the euclidian distance between the end-point point of the section and the origin point in question.
- Parameters
section – neurite section object
origin – point to which distances are measured. It must have at least 3 components. The first 3 components are (x, y, z).
-
neurom.fst.sectionfunc.
section_tortuosity
(section)[source]¶ Tortuosity of a section.
The tortuosity is defined as the ratio of the path length of a section and the euclidian distnce between its end points.
The path length is the sum of distances between consecutive points.
If the section contains less than 2 points, the value 1 is returned.
-
neurom.fst.sectionfunc.
segment_lengths
(section, prepend_zero=False)[source]¶ Returns the list of segment lengths within the section.
-
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).