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

    navis.neuron2KDTree¶

    navis.neuron2KDTree(x, tree_type='c', data='auto', **kwargs)[source]¶

    Turn neuron into scipy KDTree.

    Parameters:
    • x (TreeNeuron | MeshNeuron | VoxelNeuron | Dotprops) – A single neuron to turn into a KDTree.

    • tree_type ('c' | 'normal') –

      Type of KDTree:
      1. 'c' = scipy.spatial.cKDTree (faster)

      2. 'normal' = scipy.spatial.KDTree (more functions)

    • data ('auto' | str) – Data used to generate tree. “auto” will pick the core data depending on neuron type: nodes, vertices, voxels and points for TreeNeuron, MeshNeuron, VoxelNeuron and Dotprops, respectively. Other values (e.g. “connectors” or “nodes”) must map to a neuron property that is either (N, 3) array or DataFrame with x/y/z columns.

    • **kwargs – Keyword arguments passed at KDTree initialization.

    Return type:

    scipy.spatial.cKDTree or scipy.spatial.KDTree

    Back to top

    Source

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