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:
'c'
=scipy.spatial.cKDTree
(faster)'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
orscipy.spatial.KDTree