Skip to content

Set Omero pixel size#192

Merged
jburel merged 8 commits intoome:masterfrom
jburel:pixels_size
Feb 5, 2026
Merged

Set Omero pixel size#192
jburel merged 8 commits intoome:masterfrom
jburel:pixels_size

Conversation

@jburel
Copy link
Copy Markdown
Member

@jburel jburel commented Feb 3, 2026

Read Ome-zarr pixel size and set Omero pixel size
This PR integrates changes suggested in BioNGFF/omero-import-utils#28 and fixes a few issues noticed while running the tests
cc @folterj

@will-moore
Copy link
Copy Markdown
Member

We already have testing code for checking pixels sizes (since we get pixel sizes set "for free" when we import OME.xml).

See https://github.com/ome/omero-cli-zarr/blob/10df9400245a8ffdf6e6557bf0690841972e1998/test/integration/clitest/test_import.py#L60C10-L60C23 where we get 3 images imported in the Fileset and this specifies the expected pixel_size_x for each image.

So if you could add a similar list to the other samples e.g. "pixel_sizes_x": [0.36] for the 6001240 image. Most are a single image (single item list) but I think there is a bf2raw layout one which will have multiple images.

@will-moore
Copy link
Copy Markdown
Member

Another thought: could we also set the timeIncrement too, if the Zarr has it.
https://forum.image.sc/t/how-to-correctly-set-a-timeincrement-for-omero-pixels/101600

I'm not sure we have any samples with correct Time values in the scale (which I also wanted for testing zarr in OMERO.figure), so I created #189 to export timeIncrement to zarr scale.

@jburel
Copy link
Copy Markdown
Member Author

jburel commented Feb 4, 2026

@will-moore Timeincrement can go in a follow-up PR.
The test mentioned above was initially failing. Let's quickly discuss

@will-moore
Copy link
Copy Markdown
Member

OK let's chat... What was the test failing with?
It looks like the pixel sizes are the same in the OME.xml for that image as in the zarr scales, so this PR shouldn't change the values that get populated in OMERO.

https://ome.github.io/ome-ngff-validator/?source=https://storage.googleapis.com/jax-public-ngff/example_v2/LacZ_ctrl.zarr/2/

@jburel
Copy link
Copy Markdown
Member Author

jburel commented Feb 4, 2026

@will-moore Test adjusted to check the value

Copy link
Copy Markdown
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@snoopycrimecop
Copy link
Copy Markdown
Member

snoopycrimecop commented Feb 5, 2026

Conflicting PR. Removed from build OMERO-plugins-push#44. See the console output for more details.
Possible conflicts:

--conflicts Conflict resolved in build OMERO-plugins-push#45. See the console output for more details.

Copy link
Copy Markdown
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the various samples from test_import.py, importing them via CLI to merge-ci.
All had pixel sizes set as expected 👍

@jburel
Copy link
Copy Markdown
Member Author

jburel commented Feb 5, 2026

Thanks @will-moore. Merging so we can fix the conflicts

@jburel jburel merged commit 9530c10 into ome:master Feb 5, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants