qupath / qupath-extension-omero-web

QuPath extension to work with images through OMERO's web API
GNU General Public License v3.0
8 stars 12 forks source link

ROI saving options #12

Closed pwalczysko closed 2 years ago

pwalczysko commented 2 years ago

Hi, I am trying to update our omero-guide for QuPath so that it includes the qupath-extension-omero. The PR I am working on is https://github.com/ome/omero-guide-qupath/pull/6 When reading the https://qupath.readthedocs.io/en/latest/docs/advanced/omero.html, and also playing with the qupath-extension-omero , I think I cannot save the "detection" or "derived" ROIs from QuPath to OMERO using this plugin. I can only save the Annotations. Is that conclusion correct please ? Thank you

pwalczysko commented 2 years ago

Further info: The reason for my confusion is that the doc https://qupath.readthedocs.io/en/latest/docs/advanced/omero.html#send-objects-back-to-your-omero-server is saying click OMERO ‣ Send selection to OMERO server and confirm the operation. But I only have following menu item in my QuPath (see screenshot below). Screenshot 2021-10-29 at 13 19 54

Fiurther, the doc https://qupath.readthedocs.io/en/latest/docs/advanced/omero.html#send-objects-back-to-your-omero-server explicitly mentions the possiblity of saving detection ROIs, QuPath can send annotations and detections back to the OMERO server But I cannot find any way how to achieve that, as every time I use the command Send annotations to OMERO as per my screenshot, only the Annotation is saved, whereas the detection ROIs are not.

Thank you cc @petebankhead @melvingelbard

melvingelbard commented 2 years ago

Hi @pwalczysko ,

We have indeed restricted the export of Detection objects to OMERO through the UI. This was done to prevent users from sending a huge amount of objects (e.g. Cells) for no reason and cause trouble somewhere along the way. The inconsistency that you're seeing in the docs is due to the fact that the ability to send Detections as well as Annotations was removed recently. I'll keep a note of this and fix it soon, thanks!

On the other hand, it is technically possible to send your detections object via scripting:

import qupath.lib.images.servers.omero.OmeroTools
OmeroTools.writePathObjects(getSelectedObjects(), getCurrentServer())

But be careful not to send millions of cells for instance. The 'Send to OMERO' command wasn't really designed for this.

pwalczysko commented 2 years ago

@melvingelbard Thank you very much for the quick and precise answer. Tested all on my machine, all works as described. I will adjust the https://github.com/ome/omero-guide-qupath/pull/6 accordingly, giving an explicit warning about sending large numbers of ROIs to OMERO. Please feel free to comment on https://github.com/ome/omero-guide-qupath/pull/6 once this is (probably today and mainly during next week). The reason I am refreshing https://github.com/ome/omero-guide-qupath/pull/6 is that our users explicitly asked us to insert QuPath <-> OMERO workflows into a standard OMERO workshop which is upcoming in November, so thank you for this extension, I am sure they will like it.

melvingelbard commented 2 years ago

No worries, I'm glad all works fine :) If you have more suggestions/comments about the OMERO extension, please do not hesitate to get in touch (on the forum or else). We'd love to get more feedback on this and improve it. I will have a look at the OME guide too. I'll now close this issue as I think it's been solved. Feel free to reopen it if there's something more I can do!