brainspace.mesh.array_operations.compute_cell_area

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

Compute cell area.

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_area’.
Returns:

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