hms-dbmi / viv

Library for multiscale visualization of high-resolution multiplexed bioimaging data on the web. Directly renders Zarr and OME-TIFF.
http://avivator.gehlenborglab.org
MIT License
274 stars 42 forks source link

Allow for passing slice type #698

Closed keller-mark closed 11 months ago

keller-mark commented 12 months ago

Background

ZarrJS cannot currently be tree-shaken-out of the ZarrPixelSource class because it imports slice and BoundsCheckError.

Change List

Checklist

manzt commented 11 months ago

The slice helpers are just simple objects in both Zarrita and ZarrJS (or at least now they are: https://github.com/manzt/zarrita.js/pull/121). We can just create these ourselves, rather than using those utilities.

For the bounds check error, we can just create that ourselves as well (just make sure the slices are within the bounds) and then throw our own errors that we catch in the onTileError. See #700

manzt commented 11 months ago

Do you mind if I close in favor of #700 ?

keller-mark commented 11 months ago

No, go ahead!