navis.neuron2nx¶
- navis.neuron2nx(x)[source]¶
Turn Tree-, Mesh- or VoxelNeuron into an NetworkX graph.
- Parameters:
x (TreeNeuron | MeshNeuron | VoxelNeuron | NeuronList) – Uses simple 6-connectedness for voxels.
- Returns:
graph – NetworkX representation of the neuron. Returns list of graphs if x is multiple neurons. Graph is directed for TreeNeurons and undirected for Mesh- and VoxelNeurons. Graph is weighted for Tree- and MeshNeurons.
- Return type:
networkx.Graph | networkx.DiGraph