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

xarray DataTree #8

Open
TomNicholas opened this issue Feb 1, 2022 · 11 comments
Open

xarray DataTree #8

TomNicholas opened this issue Feb 1, 2022 · 11 comments

Comments

@TomNicholas
Copy link

Hi there, I was just wondering if you had seen the prototype xarray DataTree we're working on? Supporting multi-scale image arrays is supposed to be one of the use cases so if you have any thoughts I would love to hear them!

@joshmoore
Copy link

joshmoore commented Feb 10, 2022

@thewtex: writing here what I would have said last night on the zarr call had we not run out of time:

  • had a good chat with Tom et al. re: Multiscale convention zarr-developers/zarr-specs#125
  • he pointed out that dataclasses plays a related role to spatial-image
  • and that assuming dataclasses can be mixed with datatrees(!) that the combination could play a similar role to spatial-image-multiscale
  • (in a separate email, he mentioned xarray accessors but we didn't chat about that)
  • all along way to say that you might be an ideal candidate (a) for testing out prototypes and (b) identifying functionality that you'd like to see added upstream 😉

@thewtex
Copy link
Contributor

thewtex commented Feb 11, 2022

Hi @TomNicholas @joshmoore ,

Thank you for the tips!! 🙏

Yes, I will move forward with these excellent suggestions!

Current plans (thoughts welcome):

  1. Investigate how we can create tests to validate adherence to the OME-NGFF spec
  2. Update the SpatialImage type alias to a data class with further type specification
  3. and that assuming dataclasses can be mixed with datatrees(!) that the combination could play a similar role to spatial-image-multiscale <- this =-)
  4. add features to update output the OME-NGFF to the v0.4 spec

(in a separate email, he mentioned xarray accessors but we didn't chat about that)

It is later down the line, but I am interested in your thoughts on how we could possibly use this to make itk.Image more compatible with xarray.

@thewtex
Copy link
Contributor

thewtex commented Mar 18, 2022

Investigate how we can create tests to validate adherence to the OME-NGFF spec

The ngff repository now makes JSON schema validation possible per:

Future, additional array validation is being added per:

Update the SpatialImage type alias to a data class with further type specification

Draft: spatial-image/spatial-image#8

@thewtex
Copy link
Contributor

thewtex commented Apr 21, 2022

Draft implementation based on xarray DataTree in #10

SpatialImage was rebuilt on xarray dataclasses in spatial-image/spatial-image#8 and the constructor was refactored to correspond to the NGFF v0.4 data model. Todo: Add support for additional dimension orders.

@thewtex
Copy link
Contributor

thewtex commented Apr 22, 2022

Channel-first support added in spatial-image 0.2.0

@thewtex
Copy link
Contributor

thewtex commented Apr 29, 2022

Full initial implementation in #11

To come: more examples

@thewtex
Copy link
Contributor

thewtex commented Apr 30, 2022

NGFF 0.4 validation in #18

@thewtex
Copy link
Contributor

thewtex commented May 1, 2022

Basic docs: in #20

@thewtex
Copy link
Contributor

thewtex commented May 6, 2022

Rename + updates to xarray-datatree 0.0.5 refactors in #35

@TomNicholas
Copy link
Author

TomNicholas commented May 6, 2022

Glad you were able to update to update to accommodate those breaking changes in datatree so quickly @thewtex - let me know if you have any particular issues or suggestions!

@thewtex
Copy link
Contributor

thewtex commented May 16, 2022

@TomNicholas if you please review / merge / cut a release with xarray-contrib/datatree#90 that would be very helpful!

This is a blocker to create demos e.g. re #32 and related to https://github.com/thewtex/shardedstore . With these demos @joshmoore this is worthwhile discussing with the zarr community.

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

No branches or pull requests

3 participants