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

CZI: Incorrect tile positions values #3790

Open
dgault opened this issue Mar 3, 2022 · 1 comment
Open

CZI: Incorrect tile positions values #3790

dgault opened this issue Mar 3, 2022 · 1 comment

Comments

@dgault
Copy link
Member

dgault commented Mar 3, 2022

This issue was raised on forum thread https://forum.image.sc/t/issue-with-czi-metadata/63836/5
A sample file was provided that reproduces the issue with Bio-Formats 6.9.0

The image consists of 6 tiles (2x3), each with dimensions 1920 x 273 x 4 x 82 and physical size 1788.59 x 1788.59, scaling per pixel is 0.93µm x 0.93µm x 4.36µm. When autostitching is applied the dimensions are 3648 x 5375 and physical size is3398.33 x 5007.13

By default when reading with Bio-Formats the tile positions are as below:

<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-313.209" PositionXUnit="µm" PositionY="8653.02" PositionYUnit="µm" PositionZ="-1359.3" PositionZUnit="µm" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864" PositionXUnit="reference frame" PositionY="-1727" PositionYUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864" PositionXUnit="reference frame" PositionY="0" PositionYUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-864" PositionXUnit="reference frame" PositionY="0" PositionYUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-864" PositionXUnit="reference frame" PositionY="1728" PositionYUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864" PositionXUnit="reference frame" PositionY="1728" PositionYUnit="reference frame" TheC="0" TheT="0" TheZ="0"/>

When the zeissczi.relative_positions is on then the first tile is no longer in physical space and all units are pixels:

<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-864.0" PositionXUnit="pixel" PositionY="-1727.0" PositionYUnit="pixel" PositionZ="-1359.3" PositionZUnit="µm" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864.0" PositionXUnit="pixel" PositionY="-1727.0" PositionYUnit="pixel" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864.0" PositionXUnit="pixel" PositionY="0.0" PositionYUnit="pixel" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-864.0" PositionXUnit="pixel" PositionY="0.0" PositionYUnit="pixel" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="-864.0" PositionXUnit="pixel" PositionY="1728.0" PositionYUnit="pixel" TheC="0" TheT="0" TheZ="0"/>
<Plane DeltaT="1088.9935883835194" DeltaTUnit="s" PositionX="864.0" PositionXUnit="pixel" PositionY="1728.0" PositionYUnit="pixel" TheC="0" TheT="0" TheZ="0"/>

In the default scenario the first tile has PositionX and Y in physical space and the remainder with reference frame units. The metadata used for the initial plane is as below, which is the only Position X and Y included in the metadata:

Information|Image|S|Scene|Position|X	-313.209
Information|Image|S|Scene|Position|Y	8653.02

From a Zen screenshot of the same file these position values which have been used for the first tile actually appear to be the centre of combined image and should be used as such with all of the tiles being a reference from this value:

e11326e409a6b4ac9132012e476d614f67f99d9d

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/issue-with-czi-metadata/63836/6

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

No branches or pull requests

3 participants