brainspace.mesh.mesh_elements.get_point2cell_connectivity¶
-
brainspace.mesh.mesh_elements.
get_point2cell_connectivity
(surf, mask=None, dtype=<class 'numpy.uint8'>)[source]¶ Get point to cell connectivity.
Parameters: - surf (vtkDataSet or BSDataSet) – Input surface.
- mask (1D ndarray, optional) – Binary mask. If specified, only get points within the mask. Default is None.
- dtype (dtype, optional) – Data type. Default is uint8.
Returns: output (sparse matrix, shape (n_points, n_cells)) – The connectivity matrix. The (i,j) entry is 1 if the j-th cell uses the i-th point.
Notes
This function returns the transpose of
get_cell2point_connectivity
.