brainspace.mesh.mesh_creation.build_polydata

brainspace.mesh.mesh_creation.build_polydata(points, cells=None)[source]

Build surface (PolyData) from points and cells.

Parameters:
  • points (ndarray, shape = (n_points, 3)) – Array of points.
  • cells (ndarray, shape = (n_cells, nd), optional) – Array of cells. Cells can be vertex (nd=1), line (nd=2) or triangle (nd=3). Default is None (no topology information).
Returns:

output (BSPolyData) – Returns surface (PolyData).

See also

to_vertex, to_lines

Notes

Point ids within cells must start from 0 (first point) and contain all points.