<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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
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;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-GB;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 129.75pt 72.0pt 129.7pt;}
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="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hi Ola,<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">I tried:<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">dataset = conn.getObject("Dataset", datasetId)<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">print "\nDataset:%s" % datasetId<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">print "=" * 50<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">dataset = conn.getObject("Dataset", datasetId)<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">print "\nImages in Dataset:", dataset.getName()<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt"># get all the images for that dataset<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">for image in dataset.listChildren():<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt"> instrument = image.getInstrument()<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt"> print "Microscope %s " % instrument.getMicroscope();<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">All the images return "None" though in the UI we have<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt"><img width="391" height="250" id="Picture_x0020_1" src="cid:image001.png@01D0B5A5.85EA71F0"></span><o:p></o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">Do I have to get “model” and “manufacturer” somehow?
<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">Thanks!<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">Steve<o:p></o:p></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><o:p> </o:p></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">-----Original Message-----</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">From: ome-users [mailto:ome-users-bounces@lists.openmicroscopy.org.uk]</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">On Behalf Of Aleksandra Tarkowska (Staff)</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">Sent: 03 July 2015 14:26</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">To: OME User Support List</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font><span lang="EN-US">Subject: Re: [ome-users] Dumping out metadata for each image id</span></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> Hi Steve</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> You can do it via loading instruments:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument = conn.getObject("Image", imageid).getInstrument()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> print instrument.__dict__</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> Or access directly</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getMicroscope()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getObjectives()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getFilters()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getDichroics()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getDetectors()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> instrument.getLightSources()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> I hope that helps</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> Kind regards</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> Ola</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> On 03/07/2015 14:09, "Stephen Taylor" <<a href="mailto:stephen.taylor@imm.ox.ac.uk"><font color="black"><span style="color:windowtext;text-decoration:none">stephen.taylor@imm.ox.ac.uk</span></font></a>></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> wrote:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Hi Josh,</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Thanks for your reply. I tried printing image._obj, it does contain some</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >data but it doesn't seem to contain all the data I was expecting, for</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >example:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Objective:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Model:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Manufacturer:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Nominal magnification:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Lens NA:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Immersion:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Correction:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Working distance:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Etc</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >How can I get access to these?</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Thanks,</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >Steve</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> -----Original Message-----</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> From: ome-users [<a href="mailto:ome-users-bounces@lists.openmicroscopy.org.uk"><font color="black"><span style="color:windowtext;text-decoration:none">mailto:ome-users-</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt"><a href="mailto:ome-users-bounces@lists.openmicroscopy.org.uk"><font color="black"><span style="color:windowtext;text-decoration:none">> bounces@lists.openmicroscopy.org.uk</span></font></a></span>]</font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> On Behalf Of Josh Moore</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> Sent: 03 July 2015 13:30</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> To: OME User Support List</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> Subject: Re: [ome-users] Dumping out metadata for each image id</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> On Fri, Jul 3, 2015 at 2:14 PM, Stephen Taylor</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> <<a href="mailto:stephen.taylor@imm.ox.ac.uk"><font color="black"><span style="color:windowtext;text-decoration:none">stephen.taylor@imm.ox.ac.uk</span></font></a>> wrote:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > Hi,</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> Hi Stephen,</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > I'd like to be able to dump out the metadata for each image using the</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> Python API in OMERO. I can do something like :</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > image = conn.getObject("Image", imageId)</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > print image.getName(), image.getDescription()</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> ></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > but is there a way of returning all the available metadata for that</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >>image</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> that is stored in the database? i.e. not having to specify getXXXX for</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >>each</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> property?</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> Are you looking to have it in a particular format? If not, print</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> image._obj should show you what's available.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> ~Josh.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > Thanks for any help,</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> > Steve</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> _______________________________________________</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >> ome-users mailing list</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk"><font color="black"><span style="color:windowtext;text-decoration:none">ome-users@lists.openmicroscopy.org.uk</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users"><font color="black"><span style="color:windowtext;text-decoration:none">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >_______________________________________________</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> >ome-users mailing list</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ><a href="mailto:ome-users@lists.openmicroscopy.org.uk"><font color="black"><span style="color:windowtext;text-decoration:none">ome-users@lists.openmicroscopy.org.uk</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ><a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users"><font color="black"><span style="color:windowtext;text-decoration:none">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> The University of Dundee is a registered Scottish Charity, No: SC015096</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> _______________________________________________</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">> ome-users mailing list</span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk"><font color="black"><span style="color:windowtext;text-decoration:none">ome-users@lists.openmicroscopy.org.uk</span></font></a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Calibri"><span style="font-size:11.0pt">>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users"><font color="black"><span style="color:windowtext;text-decoration:none">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</span></font></a></span></font></p>
</div>
</body>
</html>