tumourkit.utils.nearest.find_nearest_dist_idx
- tumourkit.utils.nearest.find_nearest_dist_idx(a: Tuple[int, int, int], B: KDTree) Tuple[float, int]
Finds the distance and 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:
A tuple containing the distance and index of the nearest point in the KDTree to the given tuple.
- Return type:
tuple(float, int)