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

William Moore will at lifesci.dundee.ac.uk
Fri Jan 15 11:06:29 GMT 2016


Hi Paul,

 I have just opened a PR to improve our python ROI examples, adding a Polygon example
and setting the strokeWidth, strokeColor and fillColor. 

See https://github.com/openmicroscopy/openmicroscopy/pull/4412 <https://github.com/openmicroscopy/openmicroscopy/pull/4412>

The updated ROIs.py file can be viewed at
https://github.com/will-moore/openmicroscopy/blob/polygon_python_training_example/examples/Training/python/ROIs.py <https://github.com/will-moore/openmicroscopy/blob/polygon_python_training_example/examples/Training/python/ROIs.py>

Some changes might be made during the PR review, but hopefully that example is enough
to help you now?

 Regards,

  Will.



> On 14 Jan 2016, at 15:37, Paul Kibet Korir <pkorir at ebi.ac.uk> wrote:
> 
> Thanks. I was actually interested in formating arguments for Python (not Java).
> 
> P
> 
> On 14/01/2016 14:04, Mark Carroll wrote:
>> 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> <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 <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 
>> _______________________________________________ 
>> ome-users mailing list 
>> ome-users at lists.openmicroscopy.org.uk <mailto:ome-users at lists.openmicroscopy.org.uk> 
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users <http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users> 
> 
> -- 
> With kind regards,
> 
> Paul K Korir, PhD
> Scientific Programmer
> EMBL-EBI
> Main Building, A2-35,
> WTGC, Hinxton, Cambridge CB10 1SD
> P: +44 1223 49 44 22
> F: +44 1223 49 44 68
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20160115/f67f876a/attachment.html>


More information about the ome-users mailing list