Page 1 of 1

DeltaT info in python-omero

PostPosted: Wed Feb 13, 2019 5:12 pm
by talley
not sure if I should be directing this to a bioformats-specific forum... but here goes:

I'm struggling to get DeltaT info for each timepoint in a timelapse, for an image stored on an OMERO server using the python bindings for omero, python-omero v5.4.10. From what I've been able to find in the documentation, it seems like it should be an attribute of image.pixels.plane ... but after loading an image (
Code: Select all
conn.getObject()
) and getting the pixels (
Code: Select all
im.getPrimaryPixels()
) the pixel wrapper object I get has only a getPlane() function that just returns the actual numpy array, but no "getPlaneDeltaT" or similar function, that I've seen referred to elsewhere.

if anyone can provide a basic example of extracting DeltaT info from an image ID on OMERO, using the python bindings, I would be grateful!

Re: DeltaT info in python-omero

PostPosted: Wed Feb 13, 2019 9:48 pm
by talley
for anyone else who stumbles upon this, I was able to find a working example in the example omero scripts on github: https://github.com/openmicroscopy/omero-example-scripts/blob/master/analysis_scripts/Simple_FRAP.py#L108

In this particular example... the query was actually performed in SQL using BlitzGateway.getQueryService()... so maybe this particular bit of metadata hasn't been exposed with the python wrapper yet?

Re: DeltaT info in python-omero

PostPosted: Fri Feb 15, 2019 1:34 pm
by Dominik
Hi,

it is in the pixel wrapper, but the method is called 'copyPlaneInfo'.

Here's an example:
Code: Select all
from omero.gateway import BlitzGateway

conn = BlitzGateway(USERNAME, PASSWORD, host="HOSTNAME")
conn.connect()

image_id = 123

img = conn.getObject("Image", oid=image_id)
pix = img.getPrimaryPixels()
for plane_info in pix.copyPlaneInfo():
    print "Plane ID: %d , Channel: %d, deltaT: %f, exposureTime: %f" %\
          (plane_info.getId(), plane_info.theC, plane_info.getDeltaT(),
           plane_info.getExposureTime())

conn.close()


Regards,
Dominik

Re: DeltaT info in python-omero

PostPosted: Fri Feb 15, 2019 2:30 pm
by talley
Thanks very much!