neuromaps.points.make_surf_graph

neuromaps.points.make_surf_graph(vertices, faces, mask=None)[source]

Construct adjacency graph from surf.

Parameters:
  • vertices ((N, 3) array_like) – Coordinates of vertices comprising mesh with faces

  • faces ((F, 3) array_like) – Indices of vertices that compose triangular faces of mesh

  • mask ((N,) array_like, optional (default None)) – Boolean mask indicating which vertices should be removed from generated graph. If not supplied, all vertices are used.

Returns:

graph – Sparse matrix representing graph of vertices and faces

Return type:

scipy.sparse.csr_matrix

Raises:

ValueError – Inconsistent number of vertices in mask and vertices