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

Check that 'source' field points to a zarr group in ImageLabel #114

Open
dstansby opened this issue Jan 10, 2025 · 3 comments
Open

Check that 'source' field points to a zarr group in ImageLabel #114

dstansby opened this issue Jan 10, 2025 · 3 comments

Comments

@dstansby
Copy link
Collaborator

It looks like we still need to implement

The image-label dictionary MAY contain a source key whose value MUST be a JSON object containing information on the image the label is associated with. If included, it MAY include a key image whose value MUST be a string specifying the relative path to a Zarr image group. The default value is "../../" since most labels are stored under a subgroup named "labels/" (see above).

@d-v-b
Copy link
Collaborator

d-v-b commented Jan 10, 2025

This is not very well specified. Seems like it's the intersection of an arbitrary JSON object and the specific JSON object {"image": <str>}. I'm guessing the path must resolve to an actual image? In pydantic terms, I think we have to accept any JSON input, but if that input contains an "image" field, then we have to check that it's a relative path that resolves to a zarr group that is an ome zarr image.

@dstansby
Copy link
Collaborator Author

Yep, that's how I interpret the text.

@dstansby
Copy link
Collaborator Author

Is there actually any way for us to check this, given it can contain a relative path that's outside of the currently opened zarr group? e.g., if I open a zarr group with an arbitrary store, and there's another group at "../../../", how do I get to that group?

@dstansby dstansby added bug and removed bug labels Jan 23, 2025
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

2 participants