-
Notifications
You must be signed in to change notification settings - Fork 12
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
Link to existing OME-Zarr images in Fiji project creator #1116
Comments
Same question here:
Why is that? We could just store the absolutePath to the linked OME-Zarr; I don't see the problem.... |
This message was about people linking to images stored on the filesystem outside of their project. It's useful to be able to do this so people don't have to copy large images around when they just want to view their mobie project locally. The issue is that when this project is then uploaded to S3, these links will break and the images will no longer be available. I agree - it should be possible to link to ome-zarr images that are already hosted on S3. This just hasn't been implemented yet, and would need to be some kind of new option.
For this one, it's just that this hasn't been implemented yet. So far all linking has been done by placing an XML file inside the MoBIE project that internally contains a link to the position of the file elsewhere on the filesystem. I agree that using absolute path is probably a better way to do this - and would mean that n5 + ome-zarr could be handled in the same way. |
@K-Meech would you have some time to look into the |
@tischi I probably wouldn't have time until next week or the week after. Do you need it done before then? |
There is no deadline for any of the issues that I posted today; I just had time travelling to work on this. |
The
...this needs work and is thus commented out for now. |
Hi @K-Meech, little ping :-) And please use the |
Sorry for the delay in getting back to you @tischi ! I should have time to take a look at this next week. |
@tischi I'm starting to look into this, but I'm having trouble getting it to build. Just to check, you're using:
|
Yes, that's correct. |
Thanks @tischi - I'm getting |
Could you please pull everything again and re-built? |
Thanks @tischi - everything builds now. |
@tischi I couldn't find |
You are right, we would need to discuss this. I will sent a mail around. |
Hmm, I have it in the Java code, though:
My proposal would be adding a new way of referring to the storage location, called |
In the spec there's currently two different ways of specifying ome-zarr files: For the project creator, you could then have three options for adding images: adding the currently open image from imageJ, adding an ome-zarr file from the file system (link or copy, using absolute or relative path), then adding an ome-zarr file from s3 (where you can type in the s3 path)? |
We can still keep those separate on the UI level, but internally we could use OK, but what I think you could do right now is to implement what you proposed, because it should just work, given the current code in
Could you please try this? We can then, as a second step, discuss what we do on the spec level, where |
Ok - sounds good! I should hopefully have time to look at this tomorrow. |
Fwiw, in OME-Zarr this attribute is called |
I was trying to anticipate the collection spec, where I think you proposed uri... |
I initially had |
@tischi I'm trying to get linking images to work, but having issues reading/writing ome-zarr with the current code in the project creator. For example, running:
throws a bunch of errors:
Does the same happen on your system? Potentially it's windows specific. |
Hi @K-Meech, I added an OMEZarrWriterTest to mobie-io and that works for me... If you pull that and run the test, does it work for you? If not, we 'd probably need to ask the Janelia folks... |
Thanks @tischi - I just tried and this test fails on my Windows 11 computer. The ome-zarr file is written successfully, but can't be opened again:
|
Hi, @k-dominik (on your Mac) and @constantinpape (on your Linux) could you please do us a favour and please try whether this works for you?
For Kimberly the OMEZarrWriter test fails, for me it works. |
Seems to work for me: [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.601 s -- in org.embl.mobie.io.OMEZarrWriterTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:08 min [INFO] Finished at: 2024-04-15T09:57:49+02:00 [INFO] ------------------------------------------------------------------------ ╭─ ~/scratch/mobie-io new-n5 ························································································ ✔ 3m 15s java 09:57:49 ╰─ git log -1 commit 44fab8ace6b1a786eadb01b9787455025c6349eb (HEAD -> new-n5, origin/new-n5) Author: Christian Tischer Date: Fri Apr 12 23:18:09 2024 +0200 Add OMEZarrWriterTest |
@K-Meech would you mind asking for help here? https://imagesc.zulipchat.com/#narrow/stream/328251-NGFF |
Done! |
I've also confirmed an issue on windows 10, albeit a different one?
|
I tried on Ubuntu @tischi. I had to do a |
I traced the first two lines in the exception trace and the outcome is that org.embl.mobie.io.imagedata.N5ImageData.open(N5ImageData.java:153 Please follow up from here. Reference with stream of thought https://imagesc.zulipchat.com/#narrow/stream/328251-NGFF/topic/Making.20it.20easy.20to.20read.20.2B.20write.20ome-zarr.20in.20Fiji |
Thanks @axtimwalde for the analysis! @K-Meech could you try the following on your Windows machine: After this line of code: Running in debug mode, could you check what the |
@tischi - I just checked and |
Time for a short zoom now? |
Does it help if you change the code to:
? |
Sorry @tischi - I'm just about to head out! Using |
Ok - so looking in to this more, it seems to be an issue with how the There are probably a number of places that contribute to this - but for example, |
@K-Meech could you please try whether that also happens when you are using the Fiji UI: You could run this macro, but just adapt the
|
@tischi The same doesn't happen in Fiji. Running this macro writes the image successfully with paths like |
Ha, that's interesting...then we need to look into the OME-Zarr writing code in mobie-io and n5-viewer and find the difference. I will have a look right now, however due to lack of access to a Windows computer I can only do educated guessing. So, if you could also have a look that would be ❤️ ! |
@K-Meech could you please try whether it makes a different if you put a non-empty string here? For instance, replace that line with Along similar lines, could you please also test writing an image from the Fiji GUI and then leaving the In fact I don't know how to do this in the macro.....?
|
@tischi - yes, changing |
And what happens if you put an empty string into the Fiji UI and save it there? |
If the |
|
I'm testing this now, but it will be tricky (for me right now) because I'm not on a windows machine, and @cmhulbert has an idea of what's causing this. A side comment: p.s. thanks for identifying this issue |
Oh wow...thanks for letting me know! |
This issue on windows might be (probably is?) fixed by the latest n5-universe (1.4.3-SNAPSHOT). I made a test that was failing on the windows build but not the ubuntu build that now works for both (see this PR. @K-Meech , if you have a chance to try it, please let me know if it behaves better |
All tests pass on Windows now - thanks @bogovicj ! The paths are written correctly now like |
@K-Meech could you close this if it can be closed? |
All good from my side! I'll close the issue. |
@K-Meech
You had:
I don't see why one could not link to OME-Zarr from and to S3? In fact, I would think in the future it could be a major use-case to link to OME-Zarr hosted on S3 at the BioImage Archive.
The text was updated successfully, but these errors were encountered: