Masks in web viewer#4432
Conversation
|
Apparently, we do not have any workflows how to get masks into OMERO. None of us has ever done this and the insight-IJ plugin does not support masks conversion. |
|
@pwalczysko @will-moore I will write some examples for you that 1) create a mask from a png file and attaches it to the OMERO image and 2) reads a mask from the OMERO.server and saves it to a png file. @pwalczysko is a python script ok for this? |
|
@emilroz yes. thank you |
|
@emilroz : note #4430 if you think there's a case for having CLI tools for converting to/from masks. @pwalczysko : in general, I think masks will often be coming from third-party tools (CellProfiler) so having it script-based makes sense. |
|
@emilroz if you don't have time to work on examples now, we can just test this PR with the existing script at https://github.com/openmicroscopy/openmicroscopy/pull/4415/files? |
|
@will-moore sorry for delaying, should have something later today. |
|
@will-moore and @pwalczysko sorry it took me while but the script is ready now: https://gist.github.com/emilroz/3858429bccd3012bf478 . I've used Will's code for mask reading and it works fine for me. @pwalczysko you should be able to use the script for creating new masks from image file and reading existing masks to a file: create mask:
@joshmoore will do my best to convert it to a CLI tool if it's useful. |
|
@emilroz : Thank you very much. The creation of the mask part of the script works fine. Also addition of the -x and -y options for a shift of the mask works fine. |
|
Nothwithstanding some export issues of the script #4432 (comment), (thank you @emilroz ), all looks good in this PR. We have unrelated, although important problem in Insight though here. When the mask was created using https://gist.github.com/emilroz/3858429bccd3012bf478 @emilroz 's script, then it is displayed okay in Insight (and web) but
|
|
https://trac.openmicroscopy.org/ome/ticket/13158#ticket created. Ready to merge. |
|
@pwalczysko: found this old ticket during trac review |
|
The same result as @will-moore re #4432 (comment) just double checked in Insight. Is our suspicion right that we actually do not have any reader for the masks in Bioformats ? cc @rleigh-dundee @melissalinkert |
|
Thanks for testing, I don't remember seeing any rois with that file. |
|
Looking at the Bio-Formats readers, it looks like MIAS and Trestle have the ability to read masks from the proprietary file format. That being said, reading masks in Bio-Formats may likely fall into one of the current codegen limitations which we should be addressed in Bio-Formats 5.2.0. |
|
ok. We can review the support of masks when they are correctly read. |
|
@will-moore: That's the value in insight. |
|
@chris-allan @emilroz: any strong feeling about the default fill color? |
|
There ARE masks on https://eel.openmicroscopy.org/merge/webclient/?show=plate-1210 (the |
|
@pwalczysko: thanks |
|
it will be nice to have tests for the |
|
Thanks @will-moore This is not for this PR, cc @bramalingam. |





This is a first stab at mask support in web viewer, see https://trello.com/c/H1MePy2A/124-mask-support-in-web
It seems to work fine for me, using masks created by @joshmoore's script at #4415 but it would be nice to test against "real" masks.
@emilroz Does that Mask-reading code look right?