morph_tool.axon_point

Module to detect the terminal point of the main axon.

Functions

axon_point_section(morph[, direction, bbox, ...])

Estimate axon point as the terminal point of the main axon.

morph_tool.axon_point.axon_point_section(morph, direction=None, bbox=None, ignore_axis=2)

Estimate axon point as the terminal point of the main axon.

This point is defined as the point for which the sum of the angles with the direction vector is minimal. This corresponds to a main axon being a branch that follows best a straight line in the given direction. More constraints can be added with bbox argument, if incorrect axon is detected.

Parameters
  • morph (morphio.Morphology) – morphology

  • direction (ndarray) – estimated direction of main axon, if None [0, -1, 0] is used

  • bbox (dict) – bbox of the form {‘x’: [-100, 100], ‘y’: [-500, -400]}

  • ignore_axis (int) – axis to ignore in the angle computation, if None, 3d directions are used

Returns

MorphIO section ID for which the last point is the axon point