-
-
Notifications
You must be signed in to change notification settings - Fork 64
Fix Tile's tissue mask in case of a full tissue tile
#360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
|
| Returns | ||
| ------- | ||
| mask: np.ndarray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring.
Is it necessary to have this as a method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand the matter ... sorry
3e8b988 to
a87eb06
Compare
nicolebussola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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