-
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
I have binary mask .tiff files.
- Attribute .show() shows a black image, but taking the .resampled_array() * 255 shows the correct mask.
- Tile extraction on these .tiff binary mask doesnt work (but works with OpenSlide .read_region())
To Reproduce
Steps to reproduce the Issue 1:
- from histolab.slide import Slide
- annotation_mask = Slide(annotation_path, processed_annotation_path)
- annotation_mask.show() # shows a black image
- (annotation_mask.resampled_array() * 255) shows the correct mask
Steps to reproduce the Issue 2:
- from histolab.slide import Slide
from histolab.tiler import RandomTiler - annotation_mask = Slide(annotation_path, processed_annotation_path)
- random_tiles_extractor = RandomTiler(tile_size=(256, 256),
n_tiles=30,
level=3,
seed=42,
check_tissue=True,
tissue_percent=80.0,
prefix=prefix + '_',
suffix=".png"
) - random_tiles_extractor.extract(annotation_mask )
- ValueError: n should be smaller than the number of regions [0], got 1
Expected behavior issue 2
import openslide as ops
reader = ops.OpenSlide(test_annotation_path)
patch = reader.read_region(location=(47800, 12901), level=3, size=(256, 256))
reader.close()
Software (please complete the following information):
- OS: Ubuntu
- Python Version: 3.8
- histolab version: 0.5.1
Additional context
Data can be downloaded here
images: WSI_part_02/ID-29_HE_active.ndpi
mask: TIFF-annotations/ID-29_HE_active.tiff
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request