<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Steve,
<div class=""><br class="">
</div>
<div class=""> The PDF/TIFF figures are created by an OMERO.script which is run by the scripting service (launched from the figure app).</div>
<div class=""><br class="">
</div>
<div class="">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”.</div>
<div class=""><br class="">
</div>
<div class="">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]”</div>
<div class="">on <a href="https://www.openmicroscopy.org/site/support/omero5.2/developers/Python.html" class="">https://www.openmicroscopy.org/site/support/omero5.2/developers/Python.html</a> </div>
<div class=""><br class="">
</div>
<div class="">If you need to generate the PDF or TIFF, you’ll need to pass the figure json to the script.</div>
<div class="">I created a gist that will do that for you:</div>
<div class=""><a href="https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6" class="">https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6</a></div>
<div class=""><br class="">
</div>
<div class="">Hope that helps,</div>
<div class=""><br class="">
</div>
<div class=""> Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 21 Feb 2017, at 13:39, Stephen Taylor <<a href="mailto:stephen.taylor@imm.ox.ac.uk" class="">stephen.taylor@imm.ox.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Hi,<br class="">
<br class="">
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?<br class="">
<br class="">
Thanks,<br class="">
<br class="">
Steve<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">-----Original Message-----<br class="">
From: Stephen Taylor<br class="">
Sent: 10 February 2017 09:41<br class="">
To: OME User Support List <<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a>><br class="">
Subject: RE: [ome-users] Getting a list of OMERO figures<br class="">
<br class="">
Hi Will,<br class="">
<br class="">
Thank you very much. I haven't had a chance to test it yet but will let you know<br class="">
how I get on.<br class="">
<br class="">
Kind regards and thanks,<br class="">
<br class="">
Steve<br class="">
=======================================<br class="">
Head of Computational Biology Research Group Weatherall Institute of<br class="">
Molecular Medicine University of Oxford<br class="">
<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">-----Original Message-----<br class="">
From: ome-users [<a href="mailto:ome-users-bounces@lists.openmicroscopy.org.uk" class="">mailto:ome-users-bounces@lists.openmicroscopy.org.uk</a>]<br class="">
On Behalf Of William Moore (Staff)<br class="">
Sent: 07 February 2017 11:51<br class="">
To: OME User Support List <<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a>><br class="">
Subject: Re: [ome-users] Getting a list of OMERO figures<br class="">
<br class="">
Hi Steve,<br class="">
<br class="">
You just need to list file annotations with the correct namespace<br class="">
“omero.web.figure.json”.<br class="">
<br class="">
You can do that in the Python Blitz Gateway with<br class="">
<br class="">
# set context to a cross-group query<br class="">
conn.SERVICE_OPTS.setOmeroGroup(-1)<br class="">
<br class="">
for f in conn.getObjects("FileAnnotation", attributes={"ns":<br class="">
"omero.web.figure.json"}):<br class="">
<br class="">
   # E.g. print something useful...<br class="">
   print f.getId(), f.getFile().getName(), f.getOwner().getFullName()<br class="">
<br class="">
Hope that helps,<br class="">
<br class="">
 Will.<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On 7 Feb 2017, at 10:08, Stephen Taylor<br class="">
<<a href="mailto:stephen.taylor@imm.ox.ac.uk" class="">stephen.taylor@imm.ox.ac.uk</a>><br class="">
</blockquote>
wrote:<br class="">
<blockquote type="cite" class=""><br class="">
Hi,<br class="">
<br class="">
I am trying to get a list of the OMERO.figures in an OMERO database.<br class="">
I can<br class="">
</blockquote>
do this manually by logging into OMERO and then get a JSON string by<br class="">
going to the URL:<br class="">
<blockquote type="cite" class=""><br class="">
<a href="https://xxxxx/figure/list_web_figures/" class="">https://xxxxx/figure/list_web_figures/</a><br class="">
<br class="">
I'd like to do this regularly (e.g. nightly) so presumably I can<br class="">
automate this<br class="">
</blockquote>
using wget/curl/urllib2 but I wondered if there is a more official way<br class="">
using the OMERO API?<br class="">
<blockquote type="cite" class=""><br class="">
Kind regards and thanks,<br class="">
<br class="">
Steve<br class="">
=======================================<br class="">
Head of Computational Biology Research Group Weatherall Institute of<br class="">
Molecular Medicine University of Oxford<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</blockquote>
<br class="">
<br class="">
The University of Dundee is a registered Scottish Charity, No:<br class="">
SC015096 _______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</blockquote>
</blockquote>
_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>