neurom.features.sectionfunc

Section functions and functional tools.

Functions

branch_order

Branching order of a tree section.

downstream_pathlength

Compute the total downstream length starting from a section.

locate_segment_position

Segment ID / offset corresponding to a given fraction of section length.

section_area

Surface area of a section.

section_end_distance

End to end distance of a section.

section_mean_radius

Compute the mean radius of a section weighted by segment lengths.

section_meander_angles

Inter-segment opening angles in a section.

section_path_length

Path length from section to root.

section_radial_distance

Return the radial distances of a tree section to a given origin point.

section_tortuosity

Tortuosity of a section.

section_volume

Volume of a section.

segment_lengths

Returns the list of segment lengths within the section.

strahler_order

Branching order of a tree section.

class neurom.features.sectionfunc.COLS[source]

Bases: object

Column labels for internal data representation.

neurom.features.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.features.sectionfunc.downstream_pathlength(section)[source]

Compute the total downstream length starting from a section.

neurom.features.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.features.sectionfunc.locate_segment_position(section, fraction)[source]

Segment ID / offset corresponding to a given fraction of section length.

neurom.features.sectionfunc.section_area(section)[source]

Surface area of a section.

neurom.features.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.features.sectionfunc.section_mean_radius(section)[source]

Compute the mean radius of a section weighted by segment lengths.

neurom.features.sectionfunc.section_meander_angles(section)[source]

Inter-segment opening angles in a section.

neurom.features.sectionfunc.section_path_length(section)[source]

Path length from section to root.

neurom.features.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.features.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.features.sectionfunc.section_volume(section)[source]

Volume of a section.

neurom.features.sectionfunc.segment_lengths(section, prepend_zero=False)[source]

Returns the list of segment lengths within the section.

neurom.features.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).