-
Notifications
You must be signed in to change notification settings - Fork 1
MATLAB implementation of Zarr #16
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
Comments
Would a low-level implementation (rust??) be a good step, to open zarr to multiple platforms? |
Was thinking C/C++ as the low level implementation since it is pretty easy to build on many platforms (C in particular). Though we already have a C++ implementation in Z5. So that might be the easiest way to start. That said, not everyone knows low level languages like this. So there are some downsides in merely binding to a low level implementation as not as many people can collaborate on that part. |
A cross-platform C implementation in form of (dynamic-link) library opens door not only for C and C++ clients, but also grants access from virtually any native language. C header file language of types, structs and function declarations is one of the most universal programming interfaces in use today (along with text streams and probably REST), and is definitely a must for efficient data format library. If it's implemented, I promise to provide Delphi language bindings ;-) Please note that it's recommended to avoid C-specific features, like |
Just so we are on the same page, I'm +1 on a C/C++ implementation. In fact there is already a C++ implementation, which we could pretty easily wrap in a C API layer. So this should be easily achieved. Would follow up with the z5 developers on getting C bindings to the C++ library if that is interesting. The question is whether the MATLAB implementation should be using the C/C++ implementation with MEX bindings or whether it should be implemented natively in MATLAB. There are pros and cons to both approaches. |
There's no harm that eventually it has both. Let a hundred flowers bloom! The most suited will survive. |
Regarding a C wrapper for z5: This should not be to difficult. For some context, the major part of the API is implemented in the Wrapping this should be straight-forward (just require quite a bit of code...). For the C wrapper it would probably be a good idea to re-implement this for C-arrays. |
Let's go ahead and open that issue. Would give people a place to discuss this other than the MATLAB support issue. 😉 |
Here is the z5 issue. Any input or contribution is welcome. |
@martindurant on the theme of "zarr and N5 are basically the same thing", there is a rust implementation of a subset of N5's features written by @aschampion here https://github.com/aschampion/rust-n5 , which could be useful as a reference if a rusty zarr implementation became a goal. |
This is one of the top results on google--is there a way to read Zarr in Matlab yet? Would love to switch from HDF5 to Zarr, but need interop with other languages. Thanks for your work on this! |
Hi @constantinpape and @jkh1, great to meet up virtually last week at the ome-ngff meeting. I mentioned that I am interested in looking into MATLAB ome-zarr implementation as I have a project using ScanImage, so using matlab to write directly to ome-zarr seems to be ideal. From the discussion I understand that there are a few routes to acheive that, https://github.com/zarr-developers/zarr_implementations (C: netcdf, C++: xtensor-zarr, z5). I shall take a look into those. If I have missed anything, please leave let me know. Thanks |
Yes, I think these are all the available C/C++ implementations. |
I think the most Matlab-y implementation would be an adapter for the new |
Presumably the blockedImage will be treated as a chunk in Zarr. |
Not sure, if I understand correctly. The |
Hi everyone. Dropping this here if anyone would like to participate.
You can sign-up for this session by sending an email to |
I was just asked about (OME-)Zarr & MATLAB today. Googling I came across https://github.com/mathworks/MATLAB-support-for-Zarr-files/blob/main/Zarr.m in case anyone is interested to look into it (and/or knows more). |
Hello all, Let me know if you have any questions. Thanks, |
Would be very useful to have a MATLAB implementation of Zarr. Opening this issue to connect with others interested in this problem. Also to determine the best approach for implementing this (e.g. pure MATLAB, C/C++ with MEX bindings, etc.).
The text was updated successfully, but these errors were encountered: