brainstat.mesh.utils.mesh_edges

brainstat.mesh.utils.mesh_edges(surf, mask=None)[source]

Converts the triangles or lattices of a mesh to edges.

Args:

surf (dict): = a dictionary with key ‘tri’ or ‘lat’ surf[‘tri’] = (t x 3) numpy array of triangle indices, t:#triangles, or, surf[‘lat’] = 3D numpy array of 1’s and 0’s (1:in, 0:out). or surf (BSPolyData) = a BrainSpace surface object or surf (SLM) = a SLM object with an associated surface.

Returns:

edg (np.array): A e-by-2 numpy array containing the indices of the edges, where e is the number of edges.