[ome-users] Dumping out metadata for each image id
Stephen Taylor
stephen.taylor at imm.ox.ac.uk
Fri Jul 3 15:34:30 BST 2015
Hi Ola,
I tried:
dataset = conn.getObject("Dataset", datasetId)
print "\nDataset:%s" % datasetId
print "=" * 50
dataset = conn.getObject("Dataset", datasetId)
print "\nImages in Dataset:", dataset.getName()
# get all the images for that dataset
for image in dataset.listChildren():
instrument = image.getInstrument()
print "Microscope %s " % instrument.getMicroscope();
All the images return "None" though in the UI we have
[cid:image001.png at 01D0B5A5.85EA71F0]
Do I have to get "model" and "manufacturer" somehow?
Thanks!
Steve
> -----Original Message-----
> From: ome-users [mailto:ome-users-bounces at lists.openmicroscopy.org.uk]
> On Behalf Of Aleksandra Tarkowska (Staff)
> Sent: 03 July 2015 14:26
> To: OME User Support List
> Subject: Re: [ome-users] Dumping out metadata for each image id
>
> 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<mailto: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-<mailto:ome-users-bounces at lists.openmicroscopy.org.uk>
> bounces at lists.openmicroscopy.org.uk<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<mailto: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<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
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150703/f6d5fa50/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 12429 bytes
Desc: image001.png
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150703/f6d5fa50/attachment.png>
More information about the ome-users
mailing list