[ome-users] Change in API
Sebastien Besson (Staff)
s.besson at dundee.ac.uk
Sat May 2 13:15:38 BST 2015
Hi Sebastian,
you are correct. This API was modified between 5.0.x and 5.1.x as part of the
changes to support units in the model.
On 5.0.x, getPixelsPhysicalSizeX() was returning an PrimitiveType object
which was unwrapped via getValue().
http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)
http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/model/primitives/PositiveFloat.html
On 5.1.x, the same method now returns a Length object, i.e a combination of a
value and a length unit.
http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)
http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/units/quantity/Length.html
Other examples showing how to retrieve the unit or how to retrieve the length value
in a specific unit are given in:
https://www.openmicroscopy.org/site/support/bio-formats5.1/developers/matlab-dev.html#ome-metadata
These are MATLAB examples but the same semantics should be portable to python-bioformats.
Best,
Sebastien
On 2 May 2015, at 11:04, Sebastian Rhode <sebrhode at gmail.com<mailto:sebrhode at gmail.com>> wrote:
Hi,
I am using the BioFormats package 5.1.1 from python (via python-bioformats) and noticed, that my old code does not work any more.
To get the scaling I used before:
getPixelsPhysicalSizeX(0).getValue().floatValue()
but this seems to be now:
getPixelsPhysicalSizeX(0).value().floatValue()
Is this correct and why was it changed? I am just curious? Or is the a issue of the python-bioformats wrapper?
Cheers,
Sebastian
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20150502/55597ff9/attachment.html>
More information about the ome-users
mailing list