brainspace.mesh.mesh_operations.select_cells

brainspace.mesh.mesh_operations.select_cells(surf, array, low=-inf, upp=inf)[source]

Select surface cells whose values fall within the threshold.

Points corresponding to these cells are also kept.

Parameters:
  • surf (vtkPolyData or BSPolyData) – Input surface.
  • array (str or 1D ndarray) – Array used to perform selection. If str, it must be an array in the CellData attributes of the PolyData.
  • low (float or -np.inf) – Lower threshold. Default is -np.inf.
  • upp (float or np.inf) – Upper threshold. Default is np.inf.
Returns:

surf_selected (vtkPolyData or BSPolyData) – PolyData after selection.