tumourkit.preprocessing.pngcsv2geojson.pngcsv2geojson
- tumourkit.preprocessing.pngcsv2geojson.pngcsv2geojson(png: ndarray, csv: DataFrame, num_classes: int | None = 2) List[Dict[str, Any]]
Computes the GeoJSON representation of contours in the given PNG image based on the provided CSV labels.
- Parameters:
png (np.ndarray) – A NumPy array representing the PNG image.
csv (pd.DataFrame) – A Pandas DataFrame with the CSV labels of each cell.
num_classes (Optional[int]) – The number of classes. Default is 2.
- Returns:
A list of features representing contours.
- Return type:
List[Dict[str, Any]]