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

Optionally save Geojson masks for Qupath & DSA compatibility #298

Open
jacksonjacobs1 opened this issue May 16, 2024 · 4 comments
Open

Optionally save Geojson masks for Qupath & DSA compatibility #298

jacksonjacobs1 opened this issue May 16, 2024 · 4 comments
Assignees

Comments

@jacksonjacobs1
Copy link
Collaborator

Add functionality to export geojson masks at the base magnification level instead of binary png masks.

@choosehappy , @nanli-emory would it be more appropriate to implement this as a standalone module or as a function in saveModule.py?

@choosehappy
Copy link
Owner

choosehappy commented May 17, 2024 via email

@CielAl
Copy link
Contributor

CielAl commented May 20, 2024

@jacksonjacobs1 @choosehappy

Geojson might be more inefficient in space than binary png...
Also agree that AnnotationModule and the histoqc.annotation package would be a more semantically matched place to implement the functions than SaveModule. Just add some interface to export xml/geojson from mask (e.g., cv2 + geojson) and create something like AnnotationModule.exportAnnotation which export specified keys in BaseImage as xml or geojson and that's all.

Use shapely's affine transformation to upscale the coordinates properly.

@choosehappy
Copy link
Owner

choosehappy commented May 21, 2024 via email

@CielAl
Copy link
Contributor

CielAl commented May 21, 2024

geojson is desirable because its drag/drop-able into other common tools, like qupath. the can't be said for binary masks unforunately (or at this time)

Yes. Not trying to dispute that just as a reason why this geojson output should be in the AnnotationModule (export as annotation file that can be used by other tools) rather than in SaveModule (as a replacement of mask, which it can't)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants