Skip to content

Switch from PixelBuffer to Zarr metadata and array cache #3

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

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Switch from PixelBuffer to Zarr metadata and array cache #3

merged 2 commits into from
Mar 14, 2024

Conversation

chris-allan
Copy link
Member

@chris-allan chris-allan commented Mar 14, 2024

Caching at the PixelBuffer level can cause concurrency issues due to the combination of setResolutionLevel() and getTile() not being used atomically in all situations. We can also improve performance by caching ZarrArray instances and not recreating them when switching between resolution levels.

@chris-allan chris-allan requested review from kkoz and sbesson March 14, 2024 11:37
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

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

Similarly to #1 (comment), integrated these changes into a development branch of omero-ms-image-region for deployment and testing on a development instance.

The rendering of RGB and fluorescent OME-Zarr images as well as OME-Zarr labels hosted on our public S3 bucket is working as expected in PathViewer. For digital pathology data in particular, the navigation experience including the bird's eye view as well as zooming & panning functionality was working without any error while retrieving tiles.

My inline comments are related to possible next steps so I think we could get this included as is but @kkoz might want to take a look at the changes.

throws IOException {
// FIXME: Really should be ZarrUtils.readAttributes() to allow for
// attribute retrieval from either a ZarrArray or ZarrGroup but ZarrPath
// is package private at the moment.
Copy link
Member

Choose a reason for hiding this comment

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

In the same spirit as the work we did with @melissalinkert on bioformats2raw/raw2ometiff, I was considering switching to the more active zarr-developers/jzarr fork on this repository as well
This might be an opportunity to discuss any API improvements we should consider as a preamble of this update.

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened as zarr-developers/jzarr#19. I think it makes sense to switch to that fork for testing as soon as possible.

.maximumSize(0)
.buildAsync(PixelsService::getZarrArray)
);
}
Copy link
Member

Choose a reason for hiding this comment

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

👍 I'll port similar changes to the omero-ms-image-region unit tests instantiating ZarrPixelBuffer .

This raises the question of whether AbstractZarrPixelBufferTest (which originates from the omero-ms-image-region tests) is still relevant and could be consumed by downstream components. In that case, there's probably a case for moving this utility method under this abstract class.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I'm not sure the utility now to be honest.

@chris-allan chris-allan merged commit 395c955 into glencoesoftware:master Mar 14, 2024
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.

2 participants