tumourkit.utils.nearest.generate_tree

tumourkit.utils.nearest.generate_tree(centroids: List[Tuple[int, int, int]]) KDTree

Returns a KDTree object from a list of (x, y, class) tuples.

Parameters:

centroids (list[tuple(int, int, int)]) – A list of (x, y, class) tuples representing the centroids.

Returns:

A KDTree object created from the x and y coordinates of the centroids.

Return type:

KDTree