<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Will,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">That is perfect.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thank you!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Steve<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> ome-users [mailto:ome-users-bounces@lists.openmicroscopy.org.uk]
<b>On Behalf Of </b>William Moore (Staff)<br>
<b>Sent:</b> 22 February 2017 11:17<br>
<b>To:</b> OME User Support List <ome-users@lists.openmicroscopy.org.uk><br>
<b>Subject:</b> Re: [ome-users] Getting a list of OMERO figures<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Steve, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> The PDF/TIFF figures are created by an OMERO.script which is run by the scripting service (launched from the figure app).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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”.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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]”<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">on <a href="https://www.openmicroscopy.org/site/support/omero5.2/developers/Python.html">https://www.openmicroscopy.org/site/support/omero5.2/developers/Python.html</a> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If you need to generate the PDF or TIFF, you’ll need to pass the figure json to the script.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I created a gist that will do that for you:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6">https://gist.github.com/will-moore/d448a7abd57425734aba426f0952eff6</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hope that helps,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Will.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 21 Feb 2017, at 13:39, Stephen Taylor <<a href="mailto:stephen.taylor@imm.ox.ac.uk">stephen.taylor@imm.ox.ac.uk</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<br>
<br>
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>
<br>
Thanks,<br>
<br>
Steve<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">-----Original Message-----<br>
From: Stephen Taylor<br>
Sent: 10 February 2017 09:41<br>
To: OME User Support List <<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a>><br>
Subject: RE: [ome-users] Getting a list of OMERO figures<br>
<br>
Hi Will,<br>
<br>
Thank you very much. I haven't had a chance to test it yet but will let you know<br>
how I get on.<br>
<br>
Kind regards and thanks,<br>
<br>
Steve<br>
=======================================<br>
Head of Computational Biology Research Group Weatherall Institute of<br>
Molecular Medicine University of Oxford<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">-----Original Message-----<br>
From: ome-users [<a href="mailto:ome-users-bounces@lists.openmicroscopy.org.uk">mailto:ome-users-bounces@lists.openmicroscopy.org.uk</a>]<br>
On Behalf Of William Moore (Staff)<br>
Sent: 07 February 2017 11:51<br>
To: OME User Support List <<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a>><br>
Subject: Re: [ome-users] Getting a list of OMERO figures<br>
<br>
Hi Steve,<br>
<br>
You just need to list file annotations with the correct namespace<br>
“omero.web.figure.json”.<br>
<br>
You can do that in the Python Blitz Gateway with<br>
<br>
# set context to a cross-group query<br>
conn.SERVICE_OPTS.setOmeroGroup(-1)<br>
<br>
for f in conn.getObjects("FileAnnotation", attributes={"ns":<br>
"omero.web.figure.json"}):<br>
<br>
# E.g. print something useful...<br>
print f.getId(), f.getFile().getName(), f.getOwner().getFullName()<br>
<br>
Hope that helps,<br>
<br>
Will.<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">On 7 Feb 2017, at 10:08, Stephen Taylor<br>
<<a href="mailto:stephen.taylor@imm.ox.ac.uk">stephen.taylor@imm.ox.ac.uk</a>><o:p></o:p></p>
</blockquote>
<p class="MsoNormal">wrote:<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
Hi,<br>
<br>
I am trying to get a list of the OMERO.figures in an OMERO database.<br>
I can<o:p></o:p></p>
</blockquote>
<p class="MsoNormal">do this manually by logging into OMERO and then get a JSON string by<br>
going to the URL:<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
<a href="https://xxxxx/figure/list_web_figures/">https://xxxxx/figure/list_web_figures/</a><br>
<br>
I'd like to do this regularly (e.g. nightly) so presumably I can<br>
automate this<o:p></o:p></p>
</blockquote>
<p class="MsoNormal">using wget/curl/urllib2 but I wondered if there is a more official way<br>
using the OMERO API?<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
Kind regards and thanks,<br>
<br>
Steve<br>
=======================================<br>
Head of Computational Biology Research Group Weatherall Institute of<br>
Molecular Medicine University of Oxford<br>
<br>
<br>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
<br>
The University of Dundee is a registered Scottish Charity, No:<br>
SC015096 _______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><o:p></o:p></p>
</blockquote>
</blockquote>
<p class="MsoNormal">_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><br>
<span style="font-size:10.0pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
<o:p></o:p></p>
</div>
</div>
</body>
</html>