Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperettaReader: use smaller units when calculating physical Z size #4240

Open
melissalinkert opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@melissalinkert
Copy link
Member

With https://downloads.openmicroscopy.org/images/PerkinElmer-Operetta/omer/:

$ showinf -no-upgrade -nopix -omexml Index.idx.xml
...
<Pixels BigEndian="false" DimensionOrder="XYCZT" ID="Pixels:0" Interleaved="false" PhysicalSizeX="0.29898804047838085" PhysicalSizeXUnit="µm" PhysicalSizeY="0.29898804047838085" PhysicalSizeYUnit="µm" PhysicalSizeZ="9.999999999999994E-6" PhysicalSizeZUnit="dm" SignificantBits="16" SizeC="6" SizeT="1" SizeX="1080" SizeY="1080" SizeZ="18" Type="uint16">
...

As @mabruce noticed, after import to OMERO the PhysicalSizeZ is rounded to 0.0dm for display. That's not fully representative of the true value, and incorrectly suggests that the physical Z size is missing.

The Z positions being used to calculate PhysicalSizeZ are:

$ grep "<PositionZ" Index.idx.xml  | sort | uniq
      <PositionZ Unit="m">5.7E-05</PositionZ>
      <PositionZ Unit="m">5.8E-05</PositionZ>
      <PositionZ Unit="m">5.9E-05</PositionZ>
      <PositionZ Unit="m">6.1E-05</PositionZ>
      <PositionZ Unit="m">6.2E-05</PositionZ>
      <PositionZ Unit="m">6.3E-05</PositionZ>
      <PositionZ Unit="m">6.4E-05</PositionZ>
      <PositionZ Unit="m">6.5E-05</PositionZ>
      <PositionZ Unit="m">6.6E-05</PositionZ>
      <PositionZ Unit="m">6.7E-05</PositionZ>
      <PositionZ Unit="m">6.8E-05</PositionZ>
      <PositionZ Unit="m">6.9E-05</PositionZ>
      <PositionZ Unit="m">6E-05</PositionZ>
      <PositionZ Unit="m">7.1E-05</PositionZ>
      <PositionZ Unit="m">7.2E-05</PositionZ>
      <PositionZ Unit="m">7.3E-05</PositionZ>
      <PositionZ Unit="m">7.4E-05</PositionZ>
      <PositionZ Unit="m">7E-05</PositionZ>

and the relevant logic is:

https://github.com/ome/bioformats/blob/develop/components/formats-gpl/src/loci/formats/in/OperettaReader.java#L726
https://github.com/ome/bioformats/blob/develop/components/formats-gpl/src/loci/formats/in/OperettaReader.java#L1043

I suspect that simply performing the calculations in micrometers instead of meters will give a more useful result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant