[ome-users] Dumping out metadata for each image id

Aleksandra Tarkowska (Staff) A.Tarkowska at dundee.ac.uk
Fri Jul 3 14:26:19 BST 2015


Hi Steve

You can do it via loading instruments:


instrument = conn.getObject("Image", imageid).getInstrument()

print instrument.__dict__

Or access directly

instrument.getMicroscope()
instrument.getObjectives()
instrument.getFilters()
instrument.getDichroics()
instrument.getDetectors()
instrument.getLightSources()



I hope that helps

Kind regards
Ola





On 03/07/2015 14:09, "Stephen Taylor" <stephen.taylor at imm.ox.ac.uk> wrote:

>Hi Josh,
>
>Thanks for your reply. I tried printing image._obj, it does contain some
>data but it doesn't seem to contain all the data I was expecting, for
>example:
>
>Objective:
>Model:
>Manufacturer:
>Nominal magnification:
>Lens NA:
>Immersion:
>
>Correction:
>
>Working distance:
>
>Etc
>
>How can I get access to these?
>
>Thanks,
>
>Steve
>
>> -----Original Message-----
>> From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk]
>> On Behalf Of Josh Moore
>> Sent: 03 July 2015 13:30
>> To: OME User Support List
>> Subject: Re: [ome-users] Dumping out metadata for each image id
>>
>> On Fri, Jul 3, 2015 at 2:14 PM, Stephen Taylor
>> <stephen.taylor at imm.ox.ac.uk> wrote:
>> > Hi,
>>
>> Hi Stephen,
>>
>>
>> > I'd like to be able to dump out the metadata for each image using the
>> Python API in OMERO.  I can do something like :
>> >
>> > image = conn.getObject("Image", imageId)
>> > print image.getName(), image.getDescription()
>> >
>> > but is there a way of returning all the available metadata for that
>>image
>> that is stored in the database? i.e. not having to specify getXXXX for
>>each
>> property?
>>
>> Are you looking to have it in a particular format? If not, print
>> image._obj should show you what's available.
>>
>> ~Josh.
>>
>>
>> > Thanks for any help,
>> > Steve
>> _______________________________________________
>> ome-users mailing list
>> 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
>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096



More information about the ome-users mailing list