[ome-users] Getting a list of OMERO figures

Stephen Taylor stephen.taylor at imm.ox.ac.uk
Thu Feb 23 07:18:03 GMT 2017


Hi Will,

That is perfect.

Thank you!

Steve

From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk] On Behalf Of William Moore (Staff)
Sent: 22 February 2017 11:17
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk>
Subject: Re: [ome-users] Getting a list of OMERO figures

Hi Steve,

 The PDF/TIFF figures are created by an OMERO.script which is run by the scripting service (launched from the figure app).

Once generated, the PDF/TIFF figures are attached to the images in the figure as annotations with a namespace of “omero.web.figure.pdf” or “omero.web.figure.tiff”.

You can query these by namespace, the same way as for the figure json and download them as described under “Download a file annotation [linked to a Dataset]”
on https://www.openmicroscopy.org/site/support/omero5.2/developers/Python.html

If you need to generate the PDF or TIFF, you’ll need to pass the figure json to the script.
I created a gist that will do that for you:
https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6

Hope that helps,

 Will.



On 21 Feb 2017, at 13:39, Stephen Taylor <stephen.taylor at imm.ox.ac.uk<mailto:stephen.taylor at imm.ox.ac.uk>> wrote:

Hi,

Thanks that gets into the database. Is there also a way to download and save the figure as a PDF or JPG/PNG without using wget/curl/urllib2?

Thanks,

Steve



-----Original Message-----
From: Stephen Taylor
Sent: 10 February 2017 09:41
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: RE: [ome-users] Getting a list of OMERO figures

Hi Will,

Thank you very much. I haven't had a chance to test it yet but will let you know
how I get on.

Kind regards and thanks,

Steve
=======================================
Head of Computational Biology Research Group Weatherall Institute of
Molecular Medicine University of Oxford




-----Original Message-----
From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk]
On Behalf Of William Moore (Staff)
Sent: 07 February 2017 11:51
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: Re: [ome-users] Getting a list of OMERO figures

Hi Steve,

You just need to list file annotations with the correct namespace
“omero.web.figure.json”.

You can do that in the Python Blitz Gateway with

# set context to a cross-group query
conn.SERVICE_OPTS.setOmeroGroup(-1)

for f in conn.getObjects("FileAnnotation", attributes={"ns":
"omero.web.figure.json"}):

   # E.g. print something useful...
   print f.getId(), f.getFile().getName(), f.getOwner().getFullName()

Hope that helps,

 Will.



On 7 Feb 2017, at 10:08, Stephen Taylor
<stephen.taylor at imm.ox.ac.uk<mailto:stephen.taylor at imm.ox.ac.uk>>
wrote:


Hi,

I am trying to get a list of the OMERO.figures in an OMERO database.
I can
do this manually by logging into OMERO and then get a JSON string by
going to the URL:


https://xxxxx/figure/list_web_figures/

I'd like to do this regularly (e.g. nightly) so presumably I can
automate this
using wget/curl/urllib2 but I wondered if there is a more official way
using the OMERO API?


Kind regards and thanks,

Steve
=======================================
Head of Computational Biology Research Group Weatherall Institute of
Molecular Medicine University of Oxford


_______________________________________________
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


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
_______________________________________________
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


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20170223/1ce7a470/attachment.html>


More information about the ome-users mailing list