tumourkit.postprocessing.draw_cells.draw_cells

tumourkit.postprocessing.draw_cells.draw_cells(orig: ndarray, png: ndarray, csv: DataFrame, type_info: Dict[str, Tuple[str, List[int]]]) ndarray

Draws cell labels on the original image based on the PNG labels and CSV data.

Given the original image, PNG labels, CSV data containing cell labels, and type information, this function draws the cell labels on the original image. The cell labels are blended with the original image by alpha compositing.

Parameters:
  • orig (np.ndarray) – The original image.

  • png (np.ndarray) – The PNG labels representing cell IDs.

  • csv (pd.DataFrame) – The CSV data containing cell labels.

  • type_info (Dict[str, Tuple[str, List[int]]]) – The type information dictionary mapping cell labels to colors.

Returns:

The image with cell labels drawn on it.

Return type:

np.ndarray