navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.dist_between
          • dist_between()

    navis.dist_between¶

    navis.dist_between(x, a, b)[source]¶

    Get the geodesic distance between nodes in nanometers.

    Parameters:
    • x (TreeNeuron | MeshNeuron | NeuronList) – If NeuronList must contain only a single neuron.

    • a (int) – Node IDs (for TreeNeurons) or vertex indices (MeshNeurons) to check the distance between.

    • b (int) – Node IDs (for TreeNeurons) or vertex indices (MeshNeurons) to check the distance between.

    Returns:

    distance in nm

    Return type:

    int

    See also

    distal_to()

    Check if a node A is distal to node B.

    geodesic_matrix()

    Get all-by-all geodesic distance matrix.

    navis.segment_length()

    Much faster if you have a linear segment and know all node IDs.

    Examples

    >>> import navis
    >>> n = navis.example_neurons(1)
    >>> d = navis.dist_between(n,
    ...                        n.nodes.node_id.values[0],
    ...                        n.nodes.node_id.values[1])
    

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.