brainstat.mesh.utils.mesh_edges¶
-
brainstat.mesh.utils.
mesh_edges
(surf, mask=None)[source]¶ Converts the triangles or lattices of a mesh to edges.
- Parameters
surf (dict, BSPolyData, SLM, Nifti1Image) –
- One of the following:
- A dictionary with key ‘tri’ where tri is numpy array of triangle indices, t:#triangles.
Note that, for compatibility with SurfStat, these triangles are 1-indexed, not 0-indexed.
A dictionary with key ‘lat’ where lat is a 3D numpy array of 1’s and 0’s (1:in, 0:out).
A BrainSpace surface object
An SLM object with an associated surface.
- Returns
np.ndarray – A e-by-2 numpy array containing the indices of the edges, where e is the number of edges. Note that these are 0-indexed.