You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most common methods of image downsampling result in a translation of the downsampled image, but this code for generating coordinateTransformations metadata only returns scale transformations, which will be incorrect for almost all multiscale pyramids.
Thanks for this @d-v-b.
Let me just clarify on how to generate the translations here. Looking at the spec 0.4: "If translation is given it MUST be listed after scale to ensure that it is given in physical coordinates".
So, if we have an image that has a pixel size of 1 microns then the 'scale' for each resolution would look like this (given a zoom factor of 2 between resolutions):
When mapping to physical coordinates, I guess the translation needed after scaling depends on where the 'anchor' is when you're scaling. I'm assuming that this is the centre of the pixel at [0, 0]. So after scaling then the top-left of that pixel at 2 x its original size will be at -0.5, 0.5 microns. So then we need to translate 0.5, 0.5, and so on..
The most common methods of image downsampling result in a translation of the downsampled image, but this code for generating
coordinateTransformations
metadata only returns scale transformations, which will be incorrect for almost all multiscale pyramids.ome-zarr-py/ome_zarr/format.py
Lines 260 to 271 in 56f72b0
Suggested fix: generate translation transforms
The text was updated successfully, but these errors were encountered: