Deep learning for NeuroImaging in Python.
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.
- surfify.utils.sampling.vertex_adjacency_graph(vertices, triangles)[source]ΒΆ
Build a networkx graph representation of the vertices and their connections in the mesh.
- Parameters:
vertices : array (N, 3)
the icosahedron vertices.
triangles : array (M, 3)
the icosahedron triangles.
- Returns:
graph : networkx.Graph
Graph representing vertices and edges between them where vertices are nodes and edges are edges
Examples
This is useful for getting nearby vertices for a given vertex, potentially for some simple smoothing techniques. >>> graph = mesh.vertex_adjacency_graph >>> graph.neighbors(0) > [1, 3, 4]
Follow us