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

Implement Darwin v7 reader and improve annotation class #162

Merged
merged 31 commits into from
Aug 22, 2023
Merged

Conversation

jonasteuwen
Copy link
Contributor

The suggested changes have two major changes

  • Labels in WsiAnnotations are now a class rather than a string. This means that you can have AnnotationClass with the label 'tumor' and the type being any AnnotationType
  • Darwin V7 JSON 2.0 reader

We have also included the changes of #157

@github-actions github-actions bot added the python label Aug 7, 2023
@github-actions github-actions bot added the ci label Aug 8, 2023
- Bumped pydantic to >2.0.0
- Added mypy to the dev requirements
- Cleanup variables and code in annotations.py
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 8, 2023

# Now we can make WsiSingleLabel annotations
output = []
for an_cls in annotations:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        for an_cls, coordinates in annotations.items():
            output.append(WsiSingleLabelAnnotation(a_cls=an_cls, coordinates=coordinates))
        return cls(output)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very small change to make it a bit more explicit that we get the "coordinates"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@martvanrijthoven
Copy link
Collaborator

Looks good :). Here is an test json file for testing darwin parsing:

103S.json.zip

Copy link
Collaborator

@martvanrijthoven martvanrijthoven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me that this is ready to go :)

@jonasteuwen jonasteuwen merged commit 09e638d into main Aug 22, 2023
8 checks passed
@jonasteuwen jonasteuwen deleted the v7-darwin branch August 22, 2023 08:06
@jonasteuwen jonasteuwen mentioned this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci documentation Improvements or additions to documentation python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants