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

Use CATMAID stack info to create xarray.DataArrays #235

Merged
merged 20 commits into from
Jan 15, 2024

Conversation

clbarnes
Copy link
Collaborator

@clbarnes clbarnes commented Jun 23, 2023

Introduces a Stack class which loads stack and mirror info from CATMAID. That has a get_scale method which returns an xarray.DataArray representing that scale level, which wraps a dask array wrapping a zarr array. Depending on the mirror info, the zarr array pulls either from an N5 store, or one of a few custom zarr store shims implementing a few of our more common tile source types (JPEG stacks, for now, but H2N5 should be fairly low-hanging fruit as well). xarray allows us to pull data in voxel or world space.

The Stack can be created simply from a catmaid client instance and stack ID or title (or by selection with a CLI). By default the JPEG tile sources re-use the session from that client instance (so that auth headers are re-used).

Using dask arrays means we can have concurrent downloads and also do things like lazy transposes, which means we can use CATMAID's orientations. However, there is quite a lot of complexity in the interactions between N5, Zarr, and CATMAID orientations, which needs a fair bit of testing.

To do

  • Literally any testing at all 😬
  • HTTP auth for tile stores
  • HTTP auth for N5FSStore
  • Make sure the orientations all work out correctly
  • Docs
  • Maybe implement some more tile sources

@clbarnes clbarnes marked this pull request as ready for review July 14, 2023 13:12
@clbarnes clbarnes changed the title Use CATMAID stack info to create dask arrays Use CATMAID stack info to create xarray.DataArrays Jul 17, 2023
@clbarnes clbarnes force-pushed the n5_source branch 2 times, most recently from 7c9bcc5 to 1830a60 Compare July 28, 2023 15:51
@clbarnes clbarnes merged commit 0f05a46 into navis-org:master Jan 15, 2024
0 of 6 checks passed
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.

1 participant