[ome-users] Format for arguments for OMERO model objects

Mark Carroll m.t.b.carroll at dundee.ac.uk
Thu Jan 14 14:04:48 GMT 2016


On 01/14/2016 01:38 PM, Paul Kibet Korir wrote:

> I'm having a difficult time making sense of OMERO model objects
> described here
> <https://www.openmicroscopy.org/site/support/omero5.2/developers/Model/EveryObject.html>.
> There seems to be no explicit definition of the argument formats.
>
> I'm presently working with omero.model.PolygonI() objects for which I
> need to set a number of attributes e.g. fillColor, strokeColor etc. The
> documentation specifies base types (e.g. int, string, bool) for the
> arguments but no accompanying structure.

Indeed: I am afraid that page does not document value formats. It was
generated by introspecting into the Hibernate (ORM) model to investigate
which mapped model objects refer to each other via which properties; it
doesn't contain anything that Hibernate doesn't know. That page is most
useful for figuring out how to write the JOINs in HQL to get from what
one has to what one wants.

(snip)
> Is there any documentation on model arguments that I can refer to? If
> not is there any plan to include this because client programming is nigh
> impossible without it.

The most useful source is
http://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2015-01/ome.html
-- click on "Polygon", far down on the left. That tells you the format
for the "points" property and links you back to "Shape" for the others,
for instance describing that the stroke color is a signed 32-bit RGBA value.

To generate examples, one can create the data interactively (e.g., draw
ROIs in Insight) then query them via HQL. For instance, doing the
described conversion, a -993737532 integer that I just queried from
OMERO is #C4C4C4C4 as a color and indeed in Insight's code I see,

     DEFAULT_STROKE_COLOUR = new Color(196, 196, 196, 196);

If you have trouble with any specific properties we'd be happy to take a
look to see if we can make any sense of them, as it may have been some
time since anybody read the OME-XML schema documentation carefully for
the properties you need. The web client code has to deal with some of
these formats "manually" as well.

Cheers,

Mark

The University of Dundee is a registered Scottish Charity, No: SC015096



More information about the ome-users mailing list