Conversation
|
It is a nice improvement for I noticed that And To be consistent with other |
…lity of getShapes)
|
Could you also add support for loading Shapes on the fly in |
762b3ba to
ff1936b
Compare
|
Hey Will, sorry I'm taking this work back after a long pause. Working back on the tags & ROIs, I would need this to handle tags on ROIs.
I reimplemented These should now work: roi_o = conn.getObject("Roi", 123)
shapes = list(roi_o.listChildren())
annotations = list(roi_o.listAnnotations())
print(shapes)
>> [<_ShapeWrapper id=1714>, <_ShapeWrapper id=1715>]
print(annotations)
>> [<TagAnnotationWrapper id=29>, <TagAnnotationWrapper id=28>] |
| return "PlateAcquisitionAnnotationLink" | ||
| if objecttype == "well": | ||
| return "WellAnnotationLink" | ||
| if objecttype == "roi": |
There was a problem hiding this comment.
Was this change needed to fix something? I don't see that getAnnotationLinkTableName() is used anywhere now.
I've tried to make obj.listAnnotations() work for all object types over at #489, but I'd actually missed that getAnnotationLinkTableName() existed.
There was a problem hiding this comment.
Thank you, I removed the changes. It works without it indeed.
|
Thanks for getting back to this. I wonder if you could open a test PR to add a test like Don't worry about testing roi annotations - I've got that covered in ome/openmicroscopy#6458 for #489 Thanks |
|
I reverted my changes in getAnnotationLinkTableName. This was supposed to enable listing of Annotation from Roi, but is not needed anymore as #489 fixes it. I also want to point out another change I have, to list Rois from an Annotation, in |
|
As we just merge #489 and will be planning an upcoming minor release of OMERO.py, is this an effort we would like to include? Re-reading the change, I am not particularly enthusiastic about overriding and specializing |
|
@sbesson agreed that is nice if So, it would be a breaking API change, which I guess is OK if we manage it right? Well.listChildren() lists the directly-linked Well-Samples, so that is equivalent of roi.shapes |
I was initially confused as I could not see any implementation for To avoid backwards-incompatible changes, one option would be to introduce a flag e.g. |
|
Happy to change again the code to go back to But should I do it on a new PR? The commit history is getting weird here. |
|
I still feel that That's a lot easier to remember than Then we get to OMERO.py 6, you can just make We should probably do |
|
To facilitate the discussion, should we collect a reference table of the existing |
|
omero-py/src/omero/gateway/__init__.py Line 727 in 8990768 Wow - I realise there that The objects that have a We also have custom So,
Looking for other There's too many Most of them are to get single items. There are quite a few that return a list - Just looking by eye...: Summary
Proposing to add We have lots of NB: it's also clear there's a bunch of stuff in the BlitzGateway that could be cleaned up. |
|
Thanks for the summary, there is a lot of history here. My biggest reservation with omero-py/src/omero/gateway/__init__.py Lines 757 to 763 in 8990768 Alternatively, we could introduce |
|
Thanks @sbesson. But I would also be OK with your alternative suggestion of |
Changes in this PR are to increase the support of functionalities around ROIs:
getShapesfor an ROI now retrieves wrapped shapes instead ofShapeI