brainspace.mesh.array_operations.get_labeling_border

brainspace.mesh.array_operations.get_labeling_border(surf, labeling, append=False, key='border')[source]

Get labeling borders.

Parameters:
  • surf (vtkPolyData or BSPolyData) – Input surface.
  • labeling (str, 1D ndarray) – Array with labels. If str, it must be in the point data attributes of surf.
  • append (bool, optional) – If True, append array to point 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 ‘border’.
Returns:

output (vtkPolyData, BSPolyData or ndarray) – A 1D array with ones in the borders. Return array if append == False. Otherwise, return input surface with the new array.