@vitessce/spatial-utils 4.0.0-test.0 → 4.0.0-test.2
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/dist/{deflate-D9_QLRrK.js → deflate-CVce_-La.js} +1 -1
- package/dist/{index-eg9AfQpw.js → index-C5cy3J5q.js} +262 -259
- package/dist/index.js +1 -1
- package/dist/{jpeg-8u_Neg38.js → jpeg-AJv2kZca.js} +1 -1
- package/dist/{lerc-bKaxnsyK.js → lerc-8rr5kVc2.js} +1 -1
- package/dist/{lzw-CzAjji63.js → lzw-DLXXUpEz.js} +1 -1
- package/dist/{packbits-DmKeDFs4.js → packbits-CN5Wf7cN.js} +1 -1
- package/dist/{raw-av0MDkyf.js → raw-BW4rcScv.js} +1 -1
- package/dist/{webimage-CmJDzlML.js → webimage-BJe_5cpU.js} +1 -1
- package/dist-tsc/load-ome-zarr.d.ts +1 -1
- package/dist-tsc/load-ome-zarr.d.ts.map +1 -1
- package/dist-tsc/load-ome-zarr.js +6 -2
- package/package.json +7 -7
- package/src/load-ome-zarr.js +7 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, e, a, b, c, d, H, G, Z, E, s, n, o, F, C, z, l, m, A, y, h, r, w, q, i, f, j, k, v, u, t, p, x } from "./index-
|
|
1
|
+
import { D, e, a, b, c, d, H, G, Z, E, s, n, o, F, C, z, l, m, A, y, h, r, w, q, i, f, j, k, v, u, t, p, x } from "./index-C5cy3J5q.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEFAULT_CELLS_LAYER,
|
|
4
4
|
e as DEFAULT_LAYER_TYPE_ORDERING,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-C5cy3J5q.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function guessTileSize(arr: any): number;
|
|
2
2
|
export function loadOmeZarr(root: any): Promise<{
|
|
3
3
|
data: ZarritaPixelSource[];
|
|
4
|
-
metadata:
|
|
4
|
+
metadata: any;
|
|
5
5
|
}>;
|
|
6
6
|
export class ZarritaPixelSource extends viv.ZarrPixelSource<any> {
|
|
7
7
|
constructor(arr: any, labels: any, tileSize: any);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-ome-zarr.d.ts","sourceRoot":"","sources":["../src/load-ome-zarr.js"],"names":[],"mappings":"AAmBA,gDAMC;
|
|
1
|
+
{"version":3,"file":"load-ome-zarr.d.ts","sourceRoot":"","sources":["../src/load-ome-zarr.js"],"names":[],"mappings":"AAmBA,gDAMC;AAkED;;;GAaC;AA7BD;IACE,kDASC;IADC,qBAAwB;CAE3B;oBAtFmB,cAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
2
|
import { open as zarrOpen } from 'zarrita';
|
|
3
|
-
import { createZarrArrayAdapter } from '@vitessce/zarr-utils';
|
|
3
|
+
import { createZarrArrayAdapter, flattenOmeAttrs } from '@vitessce/zarr-utils';
|
|
4
4
|
import { ZarrNodeNotFoundError } from '@vitessce/error';
|
|
5
5
|
function prevPowerOf2(x) {
|
|
6
6
|
return 2 ** Math.floor(Math.log2(x));
|
|
@@ -36,11 +36,15 @@ async function loadMultiscales(root) {
|
|
|
36
36
|
// Re-throw the error if it is not a NodeNotFoundError.
|
|
37
37
|
throw e;
|
|
38
38
|
}
|
|
39
|
+
// OME-NGFF v0.5 nests OME metadata under an `ome` key.
|
|
40
|
+
// Hoist it to the root so downstream consumers see the flat v0.4 shape.
|
|
41
|
+
rootAttrs = flattenOmeAttrs(rootAttrs);
|
|
39
42
|
let paths = ['0'];
|
|
40
43
|
// Default axes used for v0.1 and v0.2.
|
|
41
44
|
let labels = ['t', 'c', 'z', 'y', 'x'];
|
|
42
45
|
if ('multiscales' in rootAttrs) {
|
|
43
|
-
const {
|
|
46
|
+
const { multiscales } = rootAttrs;
|
|
47
|
+
const { datasets, axes } = multiscales[0];
|
|
44
48
|
paths = datasets.map(d => d.path);
|
|
45
49
|
if (axes) {
|
|
46
50
|
if (isAxis(axes)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/spatial-utils",
|
|
3
|
-
"version": "4.0.0-test.
|
|
3
|
+
"version": "4.0.0-test.2",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"math.gl": "^3.5.6",
|
|
22
22
|
"mathjs": "^9.2.0",
|
|
23
23
|
"internmap": "^2.0.3",
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/constants-internal": "4.0.0-test.
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/zarr-utils": "4.0.0-test.
|
|
28
|
-
"@vitessce/
|
|
29
|
-
"@vitessce/error": "4.0.0-test.
|
|
24
|
+
"@vitessce/gl": "4.0.0-test.2",
|
|
25
|
+
"@vitessce/constants-internal": "4.0.0-test.2",
|
|
26
|
+
"@vitessce/utils": "4.0.0-test.2",
|
|
27
|
+
"@vitessce/zarr-utils": "4.0.0-test.2",
|
|
28
|
+
"@vitessce/globals": "4.0.0-test.2",
|
|
29
|
+
"@vitessce/error": "4.0.0-test.2"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
|
package/src/load-ome-zarr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
2
|
import { open as zarrOpen } from 'zarrita';
|
|
3
|
-
import { createZarrArrayAdapter } from '@vitessce/zarr-utils';
|
|
3
|
+
import { createZarrArrayAdapter, flattenOmeAttrs } from '@vitessce/zarr-utils';
|
|
4
4
|
import { ZarrNodeNotFoundError } from '@vitessce/error';
|
|
5
5
|
|
|
6
6
|
function prevPowerOf2(x) {
|
|
@@ -41,11 +41,16 @@ async function loadMultiscales(root) {
|
|
|
41
41
|
throw e;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
// OME-NGFF v0.5 nests OME metadata under an `ome` key.
|
|
45
|
+
// Hoist it to the root so downstream consumers see the flat v0.4 shape.
|
|
46
|
+
rootAttrs = flattenOmeAttrs(rootAttrs);
|
|
47
|
+
|
|
44
48
|
let paths = ['0'];
|
|
45
49
|
// Default axes used for v0.1 and v0.2.
|
|
46
50
|
let labels = ['t', 'c', 'z', 'y', 'x'];
|
|
47
51
|
if ('multiscales' in rootAttrs) {
|
|
48
|
-
const {
|
|
52
|
+
const { multiscales } = rootAttrs;
|
|
53
|
+
const { datasets, axes } = multiscales[0];
|
|
49
54
|
paths = datasets.map(d => d.path);
|
|
50
55
|
if (axes) {
|
|
51
56
|
if (isAxis(axes)) {
|