-
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Hi,
When I use the tissue mask with the custom filters, I receive this error.
masked_image[:,:,channel_i] = img_arr[:,:,channel_i] * mask
ValueError: operands could not be broadcast together with shapes (644, 988) (2013, 3089)
I am running this example from histolab:
from histolab.data import breast_tissue_diagnostic_green_pen
from histolab.filters.image_filters import (
ApplyMaskImage,
GreenPenFilter,
Invert,
OtsuThreshold,
RgbToGrayscale,
)
from histolab.filters.morphological_filters import RemoveSmallHoles, RemoveSmallObjects
from histolab.masks import TissueMask
from histolab.slide import Slide
_, slide_path = breast_tissue_diagnostic_green_pen()
breast_slide = Slide(slide_path, "")
mask = TissueMask(
RgbToGrayscale(),
OtsuThreshold(),
ApplyMaskImage(breast_slide.thumbnail),
GreenPenFilter(),
RgbToGrayscale(),
Invert(),
OtsuThreshold(),
RemoveSmallHoles(),
RemoveSmallObjects(),
)
breast_slide.locate_mask(mask, scale_factor=64)
Any help in resolving this issue will be greatly appreciated.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested