tumourkit.postprocessing.rswoosh.rswoosh

tumourkit.postprocessing.rswoosh.rswoosh(I: List[Tuple[int, int, List[Tuple[float, float]]]], isEqual: Callable[[List[Tuple[float, float]], List[Tuple[float, float]]], bool], merge: Callable[[Tuple[int, int, List[Tuple[float, float]]], Tuple[int, int, List[Tuple[float, float]]]], Tuple[int, int, List[Tuple[float, float]]]]) List[Tuple[int, int, List[Tuple[float, float]]]]

Given a list of cells, returns the same list without duplicates.

The rswoosh function takes a list of cells I, a function isEqual to check equality between contours, and a function merge to merge two cells.

Parameters:
  • I (List[Cell]) – The list of cells.

  • isEqual (Callable[[Contour, Contour], bool]) – A function to check equality between contours.

  • merge (Callable[[Cell, Cell], Cell]) – A function to merge two cells.

Returns:

The list of cells without duplicates.

Return type:

List[Cell]