-
Notifications
You must be signed in to change notification settings - Fork 54
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
Writing ome-zarr in a serial fashion, one 2D slice at a time #284
Comments
There's some discussion of using dask for this at: A simpler alternative might be to use the approach at ome-zarr-py/ome_zarr/reader.py Line 534 in 685eb89
In that example, we're concatenating 5D images (1 from each Well of a Plate) across X and Y axes. You'd want to concatenate 2D planes across T. pseudo-code!
But there's nothing wrong with doing what you're doing too. Can you try to view in vizarr and ome-zarr-validator? Just put this python script as
Then run Do you have MoBIE working with other sample data? |
@will-moore : thanks for your reply. I'm able to create the test image using the script here and open that in BigDataViewer in Fiji via the MoBIE plugin. It looks fine. I don't think dask would work in my case since I'm collecting images and different timepoints across several hours. I would like to have the zarr dataset built up during acquisition and ready to go. I tried running the ome-ngff validator on my dataset and it initially gave an error that it cannot find the .zattrs file. In fact, I can only see a .zgroup file in my folder. This is the folder structure: filename.zarr --.zgroup I tried creating a .zattrs file with the text below, and the validator now thinks the schema is correct, but raises an Error: Dimension separator must be / for version 0.4. I'm not creating a multiresolution pyramid.
Can you let me know what I'm missing? Thanks, |
So, the v0.2 - v0.4 OME-NGFF spec states that you should use a In your original post, you're not doing anything to create an OME-Zarr.
This will create a pyramid from your data (by downsampling in X and Y dimensions) and also create the However, if you've already created the |
Got you, using a '/' as the dimension separator and manually creating a .zattrs file seems to work for me. I see that I could write to ome-zarr programmatically via Dask using the approach you've linked to earlier (here), so I will close this issue for now. Thanks. |
Hi
Is there a good way to setup writing to zarr format using this package, by writing one 2D XY slice at a time?
My current workflow is below:
I can create a zarr directory structure this way, but I'm unable to open the stack in Fiji after installing the MoBIE plugin and trying the Open OME-Zarr from file system command. Am I missing something here? I'm assuming this package should let me write images serially from python and open in Fiji.
I checked the documentation but write_image seems to need the full numpy array beforehand.
Thanks,
Chaitanya
The text was updated successfully, but these errors were encountered: