Fix Tile's tissue mask in case of a full tissue tile#360
Fix Tile's tissue mask in case of a full tissue tile#360ernestoarbitrio merged 8 commits intomasterfrom
Tile's tissue mask in case of a full tissue tile#360Conversation
3c45c19 to
c0d925b
Compare
Codecov Report
@@ Coverage Diff @@
## master #360 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 1409 1411 +2
Branches 218 218
=========================================
+ Hits 1409 1411 +2
Continue to review full report at Codecov.
|
| @@ -197,7 +197,4 @@ def _(self, tile: Tile) -> np.ndarray: | |||
| mask: np.ndarray | |||
There was a problem hiding this comment.
docstring.
Is it necessary to have this as a method?
There was a problem hiding this comment.
docstring.
what do you mean?
Is it necessary to have this as a method?
I like the idea of having TissueMask that is flexible and does the right thing based on the input
@ernestoarbitrio thoughts?
There was a problem hiding this comment.
I do not understand the matter ... sorry
3e8b988 to
a87eb06
Compare
This was already addressed in the past in #360, but 10px of border thickness is not enough for some use cases
Description
This PR fixes the calculation of the tissue mask (and related usages) in case we have a tile completely covered with tissue.
From #357 "Sometimes the filters used to extract the tissue mask of the tile are not identifying the whole tissue, but the cell nuclei only. Therefore during tile extraction from the WSI, the tile will be wrongly discarded as if it contained too much background."
In order to solve this, the filters are applied on the tile with a white border of 10px, and then the border is removed from the returned mask.
Types of Changes
Issues Fixed or Closed by This PR
Tile.has_enough_tissuesometimes returnsFalseon tiles with tissue only #357Checklist