navis.neuron2igraph¶
- navis.neuron2igraph(x, connectivity=18, raise_not_installed=True)[source]¶
Turn Tree-, Mesh- or VoxelNeuron(s) into an iGraph graph.
Requires iGraph to be installed.
- Parameters:
x (TreeNeuron | MeshNeuron | VoxelNeuron | NeuronList) – Neuron(s) to convert.
connectivity (6 | 18 | 26) –
- Connectedness for VoxelNeurons:
6 = faces
18 = faces + edges
26 = faces + edges + vertices
raise_not_installed (bool) – If False and igraph is not installed will silently return
None
.
- Returns:
igraph.Graph – Representation of the neuron. Returns list of graphs if x is multiple neurons. Directed for TreeNeurons, undirected for MeshNeurons.
None – If igraph not installed.