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 +30 -7
- package/dist/__vite-browser-external-BIIyDRRX.js +7 -0
- package/dist/__vite-browser-external-YbutIfMq-DmIpWUUk.js +7 -0
- package/dist/blosc-D7C3XedS.js +692 -0
- package/dist/chunk-BXES_1_E.js +13 -0
- package/dist/chunk-INHXZS53-DODoS5wr.js +13 -0
- package/dist/dist-DIvEDGnZ.js +87 -0
- package/dist/lz4-O6H78S8a.js +626 -0
- package/dist/omezarr-tilesource.d.ts +20 -19
- package/dist/omezarr-tilesource.js +2821 -14554
- package/dist/omezarr-tilesource.umd.cjs +42 -42
- package/dist/png-K1gqQ34g-BW3a7qE6.js +1950 -0
- package/dist/zstd-GeB6dyr_.js +583 -0
- package/package.json +18 -19
- package/dist/blosc-D1xNXZJs.js +0 -719
- package/dist/chunk-INHXZS53-DiyuLb3Z.js +0 -14
- package/dist/lz4-1Ws5oVWR.js +0 -640
- package/dist/zstd-C4EcZnjq.js +0 -603
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
|
|
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
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
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
|
-
//
|
|
55
|
-
//
|
|
56
|
-
//
|
|
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
|
+
//#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 _ };
|