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
[x] Literally any testing at all :grimacing:
[x] HTTP auth for tile stores
[x] HTTP auth for N5FSStore
[ ] Make sure the orientations all work out correctly
Introduces a
Stack
class which loads stack and mirror info from CATMAID. That has aget_scale
method which returns anxarray.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