Skip to content

Conversation

@dominikl
Copy link
Member

This PR fixes a couple of issues noted in #109 .

  • An object store URL doesn't necessarily have to start with s3. This PR checks for s3 and http(s).
  • On several occasions File.separator was used, also when the path is actually a URL. This fails for Windows. With this PR / is used in case the path is a URL.

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/qupath-0-6-0rc1-unable-to-read-remote-ome-zarr-by-url/101605/37

@will-moore
Copy link
Member

Since all the File.separator usage has been replaced by /, it seems we don't need to test on Windows? At least not for the first round of testing.

@dominikl
Copy link
Member Author

dominikl commented Jul 15, 2025

Well, it would be good to see if that really was the issue and fixes the problem with Windows (although I'm 99% sure).

Anyway I was testing with Fiji on OSX (via Bio-Formats [Remote] Importer). As BF importer expects a file you have to point it to METADATA.ome.xml, .zarray or .zattrs.

With current release ZarrReader 0.6.0:

With this PR:

  • Local zarr - Still works
  • Remote zarr (https) - Works

Was also testing some other zarrs mentioned on the image.sc thread:

Tests missing are:

  • OME Zarr (v0.4) from a s3://... URL (can't find any examples!) - should work with current release on OSX (but fail on Windows), should work in both cases with this PR.
  • Test on Windows generally.

Maybe you could test Windows @melissalinkert?
Get latest Fiji, drop the current release ZarrReader jar in.

  • Local import should work
  • Remote import from s3 should not work.
    Then replace with jar from this release.
  • Local import should still work (probably most important test)
  • Remote import from s3 and http should work.

@melissalinkert
Copy link
Member

I downloaded Fiji from https://downloads.imagej.net/fiji/latest/fiji-latest-win64-jdk.zip, then added ZarrReader 0.6.0 from https://artifacts.openmicroscopy.org/artifactory/ome.releases/ome/OMEZarrReader/0.6.0/OMEZarrReader-0.6.0.jar to the jars folder.

I can open https://minio-dev.openmicroscopy.org/idr/Testing/cat.ome.zarr/OME/METADATA.ome.xml using Bio-Formats Remote Importer without an error message, but the image data is all 0s. Trying to use https://minio-dev.openmicroscopy.org/idr/Testing/cat.ome.zarr/.zattrs instead spends minutes on the Identifying... step with no error message. Both of those together are consistent with ZarrReader not being picked up at all in Fiji. Can you clarify what exactly needs to be done to get 0.6.0 (and/or the snapshot jar) working in Fiji? This is a fresh install with nothing else added and no additional update sites enabled; I tried to find user-facing instructions but maybe missed the correct page (if there is one).

Separately from manual testing, since GitHub Actions in this repo runs on Windows/Mac/Linux, it might be worth expanding the unit tests so that we have more automatic confidence in cross-platform support.

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/valid-remote-ome-zarr-v0-4-failing-with-bio-formats-on-windows/116456/6

@dominikl
Copy link
Member Author

@melissalinkert I think that problem was that it needs to go into the "plugins" directory, not "jars".

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/help-for-abba-in-fiji-failed-to-import-qupath-project-with-ome-zarr-images-to-abba/116313/28

@melissalinkert
Copy link
Member

Just summarizing discussion from Monday's formats meeting, it would be good to update the readme to include a step-by-step guide to installing jars from a PR into Fiji (including when starting from a fresh install of Fiji). Once that has been done, feel free to request a review from me, and I will test on Windows as soon as I have time.

@dominikl
Copy link
Member Author

This does actually not solve the problem. Found a way to test on Windows. And still:

java.nio.file.InvalidPathException: Illegal char <:> at index 5: https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0073A/9798462.zarr
	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
	at java.nio.file.Paths.get(Paths.java:84)
	at loci.formats.services.JZarrServiceImpl.<init>(JZarrServiceImpl.java:79)

This problem is much deeper. Throughout the code sun.nio.fs.Path is used and this always fails with URLs. On Windows; somehow the Linux implementation seems to be able to handle it.

@dominikl dominikl closed this Oct 20, 2025
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.

4 participants