brainspace.mesh.array_operations.get_n_adjacent_cells

brainspace.mesh.array_operations.get_n_adjacent_cells(surf, append=False, key='point_ncells')[source]

Compute number of adjacent cells for each point.

Parameters:
  • surf (vtkPolyData or BSPolyData) – Input surface.
  • append (bool, optional) – If True, append array to cell data attributes of input surface and return surface. Otherwise, only return array. Default is False.
  • key (str, optional) – Array name to append to surface’s point data attributes. Only used if append == True. Default is ‘point_ncells’.
Returns:

output (vtkPolyData, BSPolyData or ndarray) – Return ndarray if append == False. Otherwise, return input surface with the new array.