<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Sebastian,
<div class=""><br class="">
</div>
<div class="">you are correct. This API was modified between 5.0.x and 5.1.x as part of the</div>
<div class="">changes to support units in the model.</div>
<div class=""><br class="">
</div>
<div class="">On 5.0.x, getPixelsPhysicalSizeX() was returning an PrimitiveType object</div>
<div class="">which was unwrapped via getValue().</div>
<div class="">
<div class=""><a href="http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)" class="">http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)</a></div>
</div>
<div class=""><a href="http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/model/primitives/PositiveFloat.html" class="">http://downloads.openmicroscopy.org/latest/bio-formats5.0/api/ome/xml/model/primitives/PositiveFloat.html</a></div>
<div class=""><br class="">
</div>
<div class="">On 5.1.x, the same method now returns a Length object, i.e a combination of a</div>
<div class="">value and a length unit.</div>
<div class=""><a href="http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)" class="">http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/xml/meta/MetadataRetrieve.html#getPixelsPhysicalSizeX(int)</a></div>
<div class=""><a href="http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/units/quantity/Length.html" class="">http://downloads.openmicroscopy.org/latest/bio-formats5.1/api/ome/units/quantity/Length.html</a></div>
<div class=""><br class="">
</div>
<div class="">Other examples showing how to retrieve the unit or how to retrieve the length value</div>
<div class="">in a specific unit are given in:</div>
<div class=""><a href="https://www.openmicroscopy.org/site/support/bio-formats5.1/developers/matlab-dev.html#ome-metadata" class="">https://www.openmicroscopy.org/site/support/bio-formats5.1/developers/matlab-dev.html#ome-metadata</a></div>
<div class="">These are MATLAB examples but the same semantics should be portable to python-bioformats.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Sebastien</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 2 May 2015, at 11:04, Sebastian Rhode <<a href="mailto:sebrhode@gmail.com" class="">sebrhode@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">To get the scaling I used before:</div>
<div class=""><br class="">
</div>
<div class=""><b class="">getPixelsPhysicalSizeX(0).getValue().floatValue()</b></div>
<div class=""><br class="">
</div>
<div class="">but this seems to be now:</div>
<div class=""><br class="">
</div>
<div class=""><b class="">getPixelsPhysicalSizeX(0).value().floatValue()</b><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Is this correct and why was it changed? I am just curious? Or is the a issue of the python-bioformats wrapper?</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class=""><br class="">
</div>
<div class="">Sebastian</div>
</div>
_______________________________________________<br class="">
ome-users mailing list<br class="">
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" class="">ome-users@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>