tumourkit.utils.nearest.find_nearest

tumourkit.utils.nearest.find_nearest(a: Tuple[int, int, int], B: KDTree) int

Finds the index of the nearest point in a KDTree to a given (x, y, class) tuple.

Parameters:
  • a (tuple(int, int, int)) – The (x, y, class) tuple to search for the nearest point.

  • B (KDTree) – The KDTree to search for the nearest point.

Returns:

The index of the nearest point in the KDTree to the given tuple.

Return type:

int