-
Notifications
You must be signed in to change notification settings - Fork 216
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
Create annotations API #118
Comments
Discussion of the NDPI annotation sidecar format. |
OK, I would like to start the work. In my opinion the best format for annotations is svg.
How? On the other hand, the annotation file might not contain all data needed to properly transform. Still, we can use xml library and create the svg file. I'll try to start with mrxs and maybe later with ndpa, I'm pretty sure It won't be complete. So far I've got mrxs annotations translated years ago (see demo here: http://lekarski.katowice.pl/ ) It will be functional for points, polygons/freehands and rectangles. I think we should use pixel coordinates system of level 0 of the slide and transform to other levels with svg scaling. |
Is there any good solution for making annotations like markers, polygons /freehands in openseadragon over openslide? I saw a plugin but only rectangles can be done. Kind regards! |
https://github.com/openseadragon/svg-overlay could be useful. I've decided to keep openseadragon read-only in my setup, extract the overlays stored by Pannoramic Viewer or NDPView, and pass them to OSD. |
Hi @boskar, apologies for the delayed response. I'm not excited about requiring applications to parse SVG in order to obtain annotations. However, using an existing vector format would be better than implementing an entire custom vector API, so SVG may indeed be the right approach here. I'm not convinced about producing the SVG with XSLT, though. XSLT can be pretty unreadable, plus it won't work for formats that don't store annotations as XML. I'd prefer OpenSlide to parse the annotations, draw them onto a Cairo surface, and then export the surface to SVG. That approach may not work, however, if Cairo doesn't support adding all of the necessary metadata (e.g. labels) to SVG output. Please also discuss your plans on the openslide-users mailing list, since other users may have thoughts about annotation support. |
Athough It's not a key feature some API for annotations should be defined.
Probably most formats openslide supports have the possibility to store some metadata. It might be difficult to unify different approaches of vendors, but on the other hand - it should be simplier to implement work them out. It shouldn't require so much reverse-engineering, as even in MRXS annotations are stored in xml-alike format.
In MRXS case Data0023.dat after stripping first 296 bytes is pure xml with pretty obvious content.
The text was updated successfully, but these errors were encountered: