@vitessce/spatial-utils 3.7.1 → 3.8.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/dist/{deflate-ldFkItxC.js → deflate-D_2UO6fa.js} +1 -1
- package/dist/{index-BG1V_H-C.js → index-zLXH8-s_.js} +13 -8
- package/dist/index.js +1 -1
- package/dist/{jpeg-BbjFORMl.js → jpeg-ByXD9maJ.js} +1 -1
- package/dist/{lerc-BuRW-ikH.js → lerc-BQbF85ET.js} +1 -1
- package/dist/{lzw-CR842oo8.js → lzw-DSzM2vzP.js} +1 -1
- package/dist/{packbits-d5Chjmu1.js → packbits-CrqHVPsh.js} +1 -1
- package/dist/{raw-DYD4ffWY.js → raw-DZY6tqRx.js} +1 -1
- package/dist/{webimage-BzeeSDvF.js → webimage-CFSHFGmn.js} +1 -1
- package/dist-tsc/spatial.d.ts +4 -0
- package/dist-tsc/spatial.d.ts.map +1 -1
- package/dist-tsc/spatial.js +2 -1
- package/package.json +7 -7
- package/src/spatial.js +6 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-zLXH8-s_.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -120352,22 +120352,22 @@ function addDecoder(cases, importFn) {
|
|
|
120352
120352
|
}
|
|
120353
120353
|
cases.forEach((c) => registry$2.set(c, importFn));
|
|
120354
120354
|
}
|
|
120355
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
120356
|
-
addDecoder(5, () => import("./lzw-
|
|
120355
|
+
addDecoder([void 0, 1], () => import("./raw-DZY6tqRx.js").then((m) => m.default));
|
|
120356
|
+
addDecoder(5, () => import("./lzw-DSzM2vzP.js").then((m) => m.default));
|
|
120357
120357
|
addDecoder(6, () => {
|
|
120358
120358
|
throw new Error("old style JPEG compression is not supported.");
|
|
120359
120359
|
});
|
|
120360
|
-
addDecoder(7, () => import("./jpeg-
|
|
120361
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
120362
|
-
addDecoder(32773, () => import("./packbits-
|
|
120360
|
+
addDecoder(7, () => import("./jpeg-ByXD9maJ.js").then((m) => m.default));
|
|
120361
|
+
addDecoder([8, 32946], () => import("./deflate-D_2UO6fa.js").then((m) => m.default));
|
|
120362
|
+
addDecoder(32773, () => import("./packbits-CrqHVPsh.js").then((m) => m.default));
|
|
120363
120363
|
addDecoder(
|
|
120364
120364
|
34887,
|
|
120365
|
-
() => import("./lerc-
|
|
120365
|
+
() => import("./lerc-BQbF85ET.js").then(async (m) => {
|
|
120366
120366
|
await m.zstd.init();
|
|
120367
120367
|
return m;
|
|
120368
120368
|
}).then((m) => m.default)
|
|
120369
120369
|
);
|
|
120370
|
-
addDecoder(50001, () => import("./webimage-
|
|
120370
|
+
addDecoder(50001, () => import("./webimage-CFSHFGmn.js").then((m) => m.default));
|
|
120371
120371
|
function decodeRowAcc(row, stride) {
|
|
120372
120372
|
let length2 = row.length - stride;
|
|
120373
120373
|
let offset = 0;
|
|
@@ -137813,13 +137813,18 @@ const getStatsForResolution = (loader, resolution) => {
|
|
|
137813
137813
|
const height = shape[labels.indexOf("y")];
|
|
137814
137814
|
const width = shape[labels.indexOf("x")];
|
|
137815
137815
|
const depth = shape[labels.indexOf("z")];
|
|
137816
|
+
const dims = Object.fromEntries(
|
|
137817
|
+
labels.map((label, i2) => [label, shape[i2]])
|
|
137818
|
+
);
|
|
137816
137819
|
const depthDownsampled = Math.max(1, depth >> resolution);
|
|
137817
137820
|
const totalBytes = 4 * height * width * depthDownsampled;
|
|
137818
137821
|
return {
|
|
137819
137822
|
height,
|
|
137820
137823
|
width,
|
|
137824
|
+
depth,
|
|
137821
137825
|
depthDownsampled,
|
|
137822
|
-
totalBytes
|
|
137826
|
+
totalBytes,
|
|
137827
|
+
dims
|
|
137823
137828
|
};
|
|
137824
137829
|
};
|
|
137825
137830
|
const canLoadResolution = (loader, resolution) => {
|
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-zLXH8-s_.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-zLXH8-s_.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
package/dist-tsc/spatial.d.ts
CHANGED
|
@@ -100,8 +100,12 @@ export function coordinateTransformationsToMatrixForSpatialData(ngffMetadata: {
|
|
|
100
100
|
export function getStatsForResolution(loader: any, resolution: any): {
|
|
101
101
|
height: any;
|
|
102
102
|
width: any;
|
|
103
|
+
depth: any;
|
|
103
104
|
depthDownsampled: number;
|
|
104
105
|
totalBytes: number;
|
|
106
|
+
dims: {
|
|
107
|
+
[k: string]: any;
|
|
108
|
+
};
|
|
105
109
|
};
|
|
106
110
|
export function canLoadResolution(loader: any, resolution: any): boolean;
|
|
107
111
|
import { Matrix4 } from 'math.gl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../src/spatial.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,4CAJW,MA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O,MAAM,GACJ,OAAO,CA2CnB;AA7qBM;;;;;;;;;EAiBN;AAEM,yEAiBN;wBAzDuB,SAAS"}
|
package/dist-tsc/spatial.js
CHANGED
|
@@ -23,12 +23,13 @@ export const getStatsForResolution = (loader, resolution) => {
|
|
|
23
23
|
const height = shape[labels.indexOf('y')];
|
|
24
24
|
const width = shape[labels.indexOf('x')];
|
|
25
25
|
const depth = shape[labels.indexOf('z')];
|
|
26
|
+
const dims = Object.fromEntries(labels.map((label, i) => ([label, shape[i]])));
|
|
26
27
|
// eslint-disable-next-line no-bitwise
|
|
27
28
|
const depthDownsampled = Math.max(1, depth >> resolution);
|
|
28
29
|
// Check memory allocation limits for Float32Array (used in XR3DLayer for rendering)
|
|
29
30
|
const totalBytes = 4 * height * width * depthDownsampled;
|
|
30
31
|
return {
|
|
31
|
-
height, width, depthDownsampled, totalBytes,
|
|
32
|
+
height, width, depth, depthDownsampled, totalBytes, dims,
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
35
|
export const canLoadResolution = (loader, resolution) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/spatial-utils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
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/gl": "3.
|
|
25
|
-
"@vitessce/utils": "3.
|
|
26
|
-
"@vitessce/zarr-utils": "3.
|
|
27
|
-
"@vitessce/constants-internal": "3.
|
|
28
|
-
"@vitessce/globals": "3.
|
|
29
|
-
"@vitessce/error": "3.
|
|
24
|
+
"@vitessce/gl": "3.8.0",
|
|
25
|
+
"@vitessce/utils": "3.8.0",
|
|
26
|
+
"@vitessce/zarr-utils": "3.8.0",
|
|
27
|
+
"@vitessce/constants-internal": "3.8.0",
|
|
28
|
+
"@vitessce/globals": "3.8.0",
|
|
29
|
+
"@vitessce/error": "3.8.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
|
package/src/spatial.js
CHANGED
|
@@ -25,12 +25,17 @@ export const getStatsForResolution = (loader, resolution) => {
|
|
|
25
25
|
const height = shape[labels.indexOf('y')];
|
|
26
26
|
const width = shape[labels.indexOf('x')];
|
|
27
27
|
const depth = shape[labels.indexOf('z')];
|
|
28
|
+
|
|
29
|
+
const dims = Object.fromEntries(
|
|
30
|
+
labels.map((label, i) => ([label, shape[i]])),
|
|
31
|
+
);
|
|
32
|
+
|
|
28
33
|
// eslint-disable-next-line no-bitwise
|
|
29
34
|
const depthDownsampled = Math.max(1, depth >> resolution);
|
|
30
35
|
// Check memory allocation limits for Float32Array (used in XR3DLayer for rendering)
|
|
31
36
|
const totalBytes = 4 * height * width * depthDownsampled;
|
|
32
37
|
return {
|
|
33
|
-
height, width, depthDownsampled, totalBytes,
|
|
38
|
+
height, width, depth, depthDownsampled, totalBytes, dims,
|
|
34
39
|
};
|
|
35
40
|
};
|
|
36
41
|
|