ome / omero-marshal

OMERO marshalling infrastructure
https://pypi.org/project/omero-marshal/
GNU General Public License v2.0
3 stars 11 forks source link

Add the Instrument encoder #81

Open stefanches7 opened 1 month ago

stefanches7 commented 1 month ago

I was just curious if there is any impediment to this, or things to consider here. Currently, I am working around the lack of proper encoder here with using simpleMarshal() method in the API that provides the most important info, and then unwrapping OMERO objects using omero.rtypes.unwrap()

will-moore commented 1 month ago

There's quite a few objects linked under Instrument (https://omero.readthedocs.io/en/stable/developers/Model/EveryObject.html#instrument) so it would need a bunch of new encoders.

You're using image.simpleMarshal() from https://github.com/ome/omero-py/blob/4fd72efaa8cdbec9da98e1d28678af16878a86ba/src/omero/gateway/__init__.py#L8260 and you have an Image with the Instrument loaded with your own query, or you're calling image.getInstrument() before image.simpleMarshal()?

stefanches7 commented 1 month ago

@will-moore thanks, I see why it is problematic now. I am indeed using instrument = image.getInstrument() if instrument: m = instrument.simpleMarshal() , so I am marshalling the Instrument object.