cupyx.scipy.ndimage.find_objects#

cupyx.scipy.ndimage.find_objects(input, max_label=0)[source]#

Find objects in a labeled array.

Parameters:
  • input (ndarray of ints) – Array containing objects defined by different labels. Labels with value 0 are ignored.

  • max_label (int, optional) – Maximum label to be searched for in input. If max_label is not given, the positions of all objects are returned.

Returns:

object_slices – A list of tuples, with each tuple containing N slices (with N the dimension of the input array). Slices correspond to the minimal parallelepiped that contains the object. If a number is missing, None is returned instead of a slice. The label l corresponds to the index l-1 in the returned list.

Return type:

list of tuples

See also

label, center_of_mass

This function will synchronize the device.