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

Support Zarr stores not ending in '.zarr' #719

Closed
berombau opened this issue Nov 15, 2023 · 4 comments · Fixed by #721
Closed

Support Zarr stores not ending in '.zarr' #719

berombau opened this issue Nov 15, 2023 · 4 comments · Fixed by #721
Labels

Comments

@berombau
Copy link
Contributor

Reading an OME-NGFF zarr store without the usual .zarr suffix (probably not best practice but they exist) result in an error:

message: "Could not find IO for: HumanLiverH35"

Can the reader logic be updated to support this?
Or can an additional URL parameter be added like &use2D to specify the reader?

@PaulHax
Copy link
Collaborator

PaulHax commented Nov 15, 2023

Thanks for the report. Your right, not good logic. For a fix, we could add another URL parameter here, say &imageName:
https://github.com/Kitware/itk-vtk-viewer/blob/master/src/index.js#L220-L232

And when imageName ends in .zarr, this becomes true:
https://github.com/Kitware/itk-vtk-viewer/blob/master/src/IO/toMultiscaleSpatialImage.js#L68

@berombau
Copy link
Contributor Author

berombau commented Nov 15, 2023

Can you give an example for a correct imageName then? Would it matter what's before the .zarr?
How about changing this regex line here. The comment appears to support my use case already, as the images I want to view are subgroups of a SpatialData .zarr store. The regex in the code does not appear to do so. It was changed in this commit to support DANDI urls.

It can be something like [./]zarr\b regexr, which should work I think.

@PaulHax
Copy link
Collaborator

PaulHax commented Nov 16, 2023

Ah, just changing the regex would be nice. If you want to open a PR, I'll test and deploy. Otherwise I plan on touching code within a couple weeks.

(Thanks for the regexr link, very usefull.)

berombau added a commit to berombau/itk-vtk-viewer that referenced this issue Nov 16, 2023
The isZarr regex was updated to support .zarr/image, besides just .zarr and DANDI /zarr/.

fix Kitware#719
PaulHax added a commit that referenced this issue Dec 20, 2023
…arr (#721)

* fix(zarrmultiscalespatialimage): support Zarr stores not ending in .zarr

The isZarr regex was updated to support .zarr/image, besides just .zarr and DANDI /zarr/.

fix #719

* fix(ZarrMultiscaleSpatialImage): add word boundary to isZarr regex

---------

Co-authored-by: Paul Elliott <paul.elliott@kitware.com>
Copy link

🎉 This issue has been resolved in version 14.47.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants