brainspace.mesh.array_operations.compute_cell_center¶
-
brainspace.mesh.array_operations.
compute_cell_center
(surf, append=False, key='cell_center')[source]¶ Compute center of cells (parametric center).
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 cell data attributes. Only used if
append == True
. Default is ‘cell_center’.
Returns: output (vtkPolyData, BSPolyData or ndarray) – Return ndarray if
append == False
. Otherwise, return input surface with the new array.