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

Zarr sink metadata management #1508

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Zarr sink metadata management #1508

wants to merge 7 commits into from

Conversation

annehaley
Copy link
Collaborator

@annehaley annehaley commented Apr 17, 2024

@annehaley annehaley marked this pull request as ready for review April 18, 2024 14:52
@annehaley annehaley requested a review from manthey April 18, 2024 14:53
@@ -653,6 +648,111 @@ def addTile(self, tile, x=0, y=0, mask=None, axes=None, **kwargs):
self.levels = int(max(1, math.ceil(math.log(max(
self.sizeX / self.tileWidth, self.sizeY / self.tileHeight)) / math.log(2)) + 1))

def addAssociatedImage(self, image):
Copy link
Member

@manthey manthey May 23, 2024

Choose a reason for hiding this comment

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

We should change this method signature to def addAssociatedImage(self, image, imageKey=None), where imageKey is an optional string that we store and can use to identify what this associated image is used for.

Copy link
Member

Choose a reason for hiding this comment

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

Note that you couldn't set the imageKey in the vips sink (we could go back and add it eventually).

Copy link
Member

Choose a reason for hiding this comment

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

We don't currently read in the imageKey when finding associated images in zarr files. If we used the key as the zarr group OR used associated_, then we could use the group name on read (this means changing https://github.com/girder/large_image/blob/master/sources/zarr/large_image_source_zarr/__init__.py#L323-L324 and associated areas).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I made this change in 8976f3d. We now store self._associatedImages as a dict.

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