-
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The RemoveSmallObjects() class is removing essential small tissue islands in our WSI due to the pre-set filters.
In the current implementation, every operation under FilterComposition, i.e, BinaryDilation(), RemoveSmallHoles() and RemoveSmallObjects() have pre-determined filter sizes.
- For example,
RemoveSmallHoles()has anarea_thresholdof 3000, but we may want a different threshold of, say 2000. - Another example:
RemoveSmallObjects()has a defaultmin_sizeof 3000, but we may want to change it to 1500.
To Reproduce
Steps to reproduce the behavior:
from histolab.masks import TissueMaskall_tissue_mask = TissueMask()slidetox = Slide(slidepath, outputpath)slidetox.locate_mask(all_tissue_mask).show()
Expected behavior
To be able to add the custom filter(s) in the constructor of the TissueMask. In addition to the default constructor TissueMask(), we would like the following option as well:
TissueMask(
imf.RgbToGrayscale(),
imf.OtsuThreshold(),
mof.BinaryDilation(),
mof.RemoveSmallObjects(min_size=2000),
mof.RemoveSmallHoles(area_threshold=1500)
)
or any other similar approach.
We are keen to provide the pool request for this issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working