tumourkit.utils.preprocessing.get_mask
- tumourkit.utils.preprocessing.get_mask(png: ndarray, idx: int) ndarray
Given segmentation mask with indices as pixel values, returns the mask corresponding to the given index.
- Parameters:
png (np.ndarray) – Segmentation mask with indices as pixel values.
idx (int) – Index of the mask to retrieve.
- Returns:
The mask corresponding to the given index.
- Return type:
np.ndarray