Skip to content
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

🆕 Use Annotations as a Filter for Patch Extraction #822

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

measty
Copy link
Collaborator

@measty measty commented Jun 13, 2024

This PR is something i've been thinking about from a conversation with Daan when he was here from Radboud doing a seminar a while back. His comment was that one thing some of his colleges felt was missing in TIAtoolbox was ability to get patches filtered by class/label.

Its not that hard to set up tiatoolbox patch extractor to allow this, which is what i've added in this PR.

it allows you to provide a path to an annotation store as the mask. By default the mask will then be built out of all the annotations, but you can also provide any filter that works in the annotation store, and have only those annotations make the mask. So for example, if you have some pathologist annotations with some regions, and you only want to extract patches which have some overlap with regions labelled 'tumor' or whatever, you would just have to provide the appropriate string ("props['label'] == 'tumor'" for example).

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.89%. Comparing base (14f1215) to head (b007dc2).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #822   +/-   ##
========================================
  Coverage    99.89%   99.89%           
========================================
  Files           69       69           
  Lines         8650     8658    +8     
  Branches      1653     1654    +1     
========================================
+ Hits          8641     8649    +8     
  Misses           1        1           
  Partials         8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shaneahmed shaneahmed added the enhancement New feature or request label Jun 14, 2024
@shaneahmed shaneahmed added this to the Release v1.6.0 milestone Jun 14, 2024
@shaneahmed shaneahmed changed the title ENH: Use annotations as a filter for patch extraction 🆕 Use Annotations as a Filter for Patch Extraction Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants