omezarr-tilesource 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ An OpenSeadragon tile source for the OME-Zarr bioimage file format
12
12
 
13
13
  ## Prerequisites
14
14
 
15
- OpenSeadragon 5 or newer
15
+ OpenSeadragon 6 or newer
16
16
 
17
17
  ## Installation
18
18
 
@@ -39,9 +39,11 @@ const tileSource2 = {
39
39
  type: "ome-zarr",
40
40
  url: url,
41
41
  // zip: undefined, // undefined = OME-Zarr ZIP auto-detection based on .ozx suffix
42
- // t: undefined,
43
- // c: undefined,
44
- // z: undefined
42
+ // c: undefined, // undefined = composite of all active channels (requires dataType "context2d")
43
+ // z: undefined, // undefined = omero metadata default
44
+ // t: undefined, // undefined = omero metadata default
45
+ // dataType: undefined, // "context2d" (default, rendered tiles) or "ome-zarr" (raw single-channel chunks)
46
+ // autoBoost: undefined // boost brightness of dark tiles (default false)
45
47
  };
46
48
 
47
49
  // direct instantiation with URL (works with any OME-Zarr storage backend)
@@ -51,9 +53,11 @@ const tileSource3 = new OMEZarrTileSource(url);
51
53
  const tileSource4 = new OMEZarrTileSource({
52
54
  url: url,
53
55
  // zip: undefined, // undefined = OME-Zarr ZIP auto-detection based on .ozx suffix
54
- // t: undefined,
55
- // c: undefined,
56
- // z: undefined
56
+ // c: undefined, // undefined = composite of all active channels (requires dataType "context2d")
57
+ // z: undefined, // undefined = omero metadata default
58
+ // t: undefined, // undefined = omero metadata default
59
+ // dataType: undefined, // "context2d" (default, rendered tiles) or "ome-zarr" (raw single-channel chunks)
60
+ // autoBoost: undefined // boost brightness of dark tiles (default false)
57
61
  });
58
62
 
59
63
  const viewer = OpenSeadragon(
@@ -67,6 +71,25 @@ const viewer = OpenSeadragon(
67
71
  );
68
72
  ```
69
73
 
74
+ ## Data pipeline
75
+
76
+ By default (`dataType: "context2d"`), tiles are rendered by the tile source and
77
+ passed to OpenSeadragon as 2D canvas contexts, using the rendering settings
78
+ (color, color LUT/map, contrast limits, inversion) from the omero metadata. For
79
+ multi-channel images without `c`, all active channels are rendered into a
80
+ composite image.
81
+
82
+ With `dataType: "ome-zarr"`, tiles are instead downloaded as raw single-channel
83
+ zarrita chunks and passed to OpenSeadragon with the data type `ome-zarr` (see
84
+ the `OMEZarrTileData` type). Multi-channel images therefore require the `c`
85
+ option. A converter from `ome-zarr` to `context2d` is registered on
86
+ `OpenSeadragon.converter` when the module is imported (and by
87
+ `OMEZarrTileSource.enable`). It reads the rendering settings at conversion time
88
+ from the omero channel referenced by the tile data (`OMEZarrTileData.channel`).
89
+ The channel object is shared by all tiles of a tile source, so advanced users
90
+ may modify it (e.g. from a `tile-invalidated` handler) and re-render the cached
91
+ tiles using `viewer.requestInvalidate()`.
92
+
70
93
  ## Example
71
94
 
72
95
  [Example](https://tissuumaps.github.io/OMEZarrTileSource)
@@ -0,0 +1,7 @@
1
+ import { t as e } from "./chunk-BXES_1_E.js";
2
+ //#region __vite-browser-external
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = {};
5
+ }));
6
+ //#endregion
7
+ export default t();
@@ -0,0 +1,7 @@
1
+ //#region node_modules/.pnpm/ome-zarr.js@0.0.20/node_modules/ome-zarr.js/dist/__vite-browser-external-YbutIfMq.js
2
+ var e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3
+ __proto__: null,
4
+ default: {}
5
+ }, Symbol.toStringTag, { value: "Module" }));
6
+ //#endregion
7
+ export { e as _ };