@vitessce/spatial-utils 3.6.4 → 3.6.5
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-D9ljyhNr.js → deflate-Cumj_9kB.js} +1 -1
- package/dist/{index-BHjTDkex.js → index-C6jVF_qi.js} +26 -17
- package/dist/index.js +12 -11
- package/dist/{jpeg-CBCGd1ig.js → jpeg-Bv9e5TsR.js} +1 -1
- package/dist/{lerc-KzhcoJX_.js → lerc-CN8oy9fE.js} +1 -1
- package/dist/{lzw-DH_0TN8Q.js → lzw-Ckpw-zOq.js} +1 -1
- package/dist/{packbits-CFKxEnzI.js → packbits-KgFJoulg.js} +1 -1
- package/dist/{raw-BIF7paLv.js → raw-DwHPYVQy.js} +1 -1
- package/dist/{webimage-C0GvbHjI.js → webimage-BeD_xi6W.js} +1 -1
- package/dist-tsc/index.d.ts +1 -1
- package/dist-tsc/index.js +1 -1
- package/dist-tsc/spatial.d.ts +1 -0
- package/dist-tsc/spatial.d.ts.map +1 -1
- package/dist-tsc/spatial.js +13 -0
- package/package.json +6 -6
- package/src/index.js +1 -0
- package/src/spatial.js +15 -0
|
@@ -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-C6jVF_qi.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -120365,22 +120365,22 @@ function addDecoder(cases, importFn) {
|
|
|
120365
120365
|
}
|
|
120366
120366
|
cases.forEach((c) => registry$2.set(c, importFn));
|
|
120367
120367
|
}
|
|
120368
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
120369
|
-
addDecoder(5, () => import("./lzw-
|
|
120368
|
+
addDecoder([void 0, 1], () => import("./raw-DwHPYVQy.js").then((m) => m.default));
|
|
120369
|
+
addDecoder(5, () => import("./lzw-Ckpw-zOq.js").then((m) => m.default));
|
|
120370
120370
|
addDecoder(6, () => {
|
|
120371
120371
|
throw new Error("old style JPEG compression is not supported.");
|
|
120372
120372
|
});
|
|
120373
|
-
addDecoder(7, () => import("./jpeg-
|
|
120374
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
120375
|
-
addDecoder(32773, () => import("./packbits-
|
|
120373
|
+
addDecoder(7, () => import("./jpeg-Bv9e5TsR.js").then((m) => m.default));
|
|
120374
|
+
addDecoder([8, 32946], () => import("./deflate-Cumj_9kB.js").then((m) => m.default));
|
|
120375
|
+
addDecoder(32773, () => import("./packbits-KgFJoulg.js").then((m) => m.default));
|
|
120376
120376
|
addDecoder(
|
|
120377
120377
|
34887,
|
|
120378
|
-
() => import("./lerc-
|
|
120378
|
+
() => import("./lerc-CN8oy9fE.js").then(async (m) => {
|
|
120379
120379
|
await m.zstd.init();
|
|
120380
120380
|
return m;
|
|
120381
120381
|
}).then((m) => m.default)
|
|
120382
120382
|
);
|
|
120383
|
-
addDecoder(50001, () => import("./webimage-
|
|
120383
|
+
addDecoder(50001, () => import("./webimage-BeD_xi6W.js").then((m) => m.default));
|
|
120384
120384
|
function decodeRowAcc(row, stride) {
|
|
120385
120385
|
let length2 = row.length - stride;
|
|
120386
120386
|
let offset = 0;
|
|
@@ -138032,6 +138032,14 @@ function hexToRgb(hex) {
|
|
|
138032
138032
|
parseInt(result[3].toLowerCase(), 16)
|
|
138033
138033
|
];
|
|
138034
138034
|
}
|
|
138035
|
+
function normalizeAxes(axes) {
|
|
138036
|
+
return axes.map((axisInfo) => {
|
|
138037
|
+
if (typeof axisInfo === "string") {
|
|
138038
|
+
return { name: axisInfo, type: "space" };
|
|
138039
|
+
}
|
|
138040
|
+
return axisInfo;
|
|
138041
|
+
});
|
|
138042
|
+
}
|
|
138035
138043
|
function normalizeCoordinateTransformations(coordinateTransformations, datasets) {
|
|
138036
138044
|
var _a3;
|
|
138037
138045
|
let result = [];
|
|
@@ -139625,11 +139633,12 @@ function getDomains() {
|
|
|
139625
139633
|
}
|
|
139626
139634
|
const DOMAINS = getDomains();
|
|
139627
139635
|
export {
|
|
139628
|
-
|
|
139636
|
+
getBoundingCube as A,
|
|
139629
139637
|
BaseDecoder as B,
|
|
139630
|
-
|
|
139638
|
+
abbreviateNumber as C,
|
|
139631
139639
|
DEFAULT_CELLS_LAYER as D,
|
|
139632
|
-
|
|
139640
|
+
filterSelection as E,
|
|
139641
|
+
DOMAINS as F,
|
|
139633
139642
|
GLOBAL_LABELS as G,
|
|
139634
139643
|
ZarritaPixelSource as Z,
|
|
139635
139644
|
DEFAULT_MOLECULES_LAYER as a,
|
|
@@ -139651,11 +139660,11 @@ export {
|
|
|
139651
139660
|
getStatsForResolution as q,
|
|
139652
139661
|
canLoadResolution as r,
|
|
139653
139662
|
normalizeCoordinateTransformations as s,
|
|
139654
|
-
|
|
139655
|
-
|
|
139656
|
-
|
|
139657
|
-
|
|
139658
|
-
|
|
139659
|
-
|
|
139660
|
-
|
|
139663
|
+
normalizeAxes as t,
|
|
139664
|
+
loadOmeZarr as u,
|
|
139665
|
+
guessTileSize as v,
|
|
139666
|
+
toRgbUIString as w,
|
|
139667
|
+
getSingleSelectionStats as x,
|
|
139668
|
+
getMultiSelectionStats as y,
|
|
139669
|
+
getPhysicalSizeScalingMatrix as z
|
|
139661
139670
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D, e, a, b, c, d,
|
|
1
|
+
import { D, e, a, b, c, d, F, G, Z, C, r, n, E, A, y, l, m, z, x, h, q, v, o, i, f, j, k, u, t, s, p, w } from "./index-C6jVF_qi.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DEFAULT_CELLS_LAYER,
|
|
4
4
|
e as DEFAULT_LAYER_TYPE_ORDERING,
|
|
@@ -6,29 +6,30 @@ export {
|
|
|
6
6
|
b as DEFAULT_NEIGHBORHOODS_LAYER,
|
|
7
7
|
c as DEFAULT_RASTER_DOMAIN_TYPE,
|
|
8
8
|
d as DEFAULT_RASTER_LAYER_PROPS,
|
|
9
|
-
|
|
9
|
+
F as DOMAINS,
|
|
10
10
|
G as GLOBAL_LABELS,
|
|
11
11
|
Z as ZarritaPixelSource,
|
|
12
|
-
|
|
12
|
+
C as abbreviateNumber,
|
|
13
13
|
r as canLoadResolution,
|
|
14
14
|
n as coordinateTransformationsToMatrix,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
E as filterSelection,
|
|
16
|
+
A as getBoundingCube,
|
|
17
|
+
y as getMultiSelectionStats,
|
|
18
18
|
l as getNgffAxes,
|
|
19
19
|
m as getNgffAxesForTiff,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
z as getPhysicalSizeScalingMatrix,
|
|
21
|
+
x as getSingleSelectionStats,
|
|
22
22
|
h as getSourceFromLoader,
|
|
23
23
|
q as getStatsForResolution,
|
|
24
|
-
|
|
24
|
+
v as guessTileSize,
|
|
25
25
|
o as hexToRgb,
|
|
26
26
|
i as initializeLayerChannels,
|
|
27
27
|
f as initializeRasterLayersAndChannels,
|
|
28
28
|
j as isInterleaved,
|
|
29
29
|
k as isRgb,
|
|
30
|
-
|
|
30
|
+
u as loadOmeZarr,
|
|
31
|
+
t as normalizeAxes,
|
|
31
32
|
s as normalizeCoordinateTransformations,
|
|
32
33
|
p as physicalSizeToMatrix,
|
|
33
|
-
|
|
34
|
+
w as toRgbUIString
|
|
34
35
|
};
|
|
@@ -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-C6jVF_qi.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
package/dist-tsc/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DOMAINS } from "./constants.js";
|
|
2
2
|
export { GLOBAL_LABELS, DEFAULT_CELLS_LAYER, DEFAULT_MOLECULES_LAYER, DEFAULT_NEIGHBORHOODS_LAYER, DEFAULT_RASTER_DOMAIN_TYPE, DEFAULT_RASTER_LAYER_PROPS, DEFAULT_LAYER_TYPE_ORDERING } from "@vitessce/constants-internal";
|
|
3
|
-
export { initializeLayerChannels, initializeRasterLayersAndChannels, getSourceFromLoader, isInterleaved, isRgb, getNgffAxes, getNgffAxesForTiff, coordinateTransformationsToMatrix, physicalSizeToMatrix, hexToRgb, getStatsForResolution, canLoadResolution, normalizeCoordinateTransformations } from "./spatial.js";
|
|
3
|
+
export { initializeLayerChannels, initializeRasterLayersAndChannels, getSourceFromLoader, isInterleaved, isRgb, getNgffAxes, getNgffAxesForTiff, coordinateTransformationsToMatrix, physicalSizeToMatrix, hexToRgb, getStatsForResolution, canLoadResolution, normalizeCoordinateTransformations, normalizeAxes } from "./spatial.js";
|
|
4
4
|
export { loadOmeZarr, guessTileSize, ZarritaPixelSource } from "./load-ome-zarr.js";
|
|
5
5
|
export { toRgbUIString, getSingleSelectionStats, getMultiSelectionStats, getPhysicalSizeScalingMatrix, getBoundingCube, abbreviateNumber, filterSelection } from "./layer-controller.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-tsc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { GLOBAL_LABELS, DEFAULT_CELLS_LAYER, DEFAULT_MOLECULES_LAYER, DEFAULT_NEIGHBORHOODS_LAYER, DEFAULT_RASTER_DOMAIN_TYPE, DEFAULT_RASTER_LAYER_PROPS, DEFAULT_LAYER_TYPE_ORDERING, } from '@vitessce/constants-internal';
|
|
2
|
-
export { initializeLayerChannels, initializeRasterLayersAndChannels, getSourceFromLoader, isInterleaved, isRgb, getNgffAxes, getNgffAxesForTiff, coordinateTransformationsToMatrix, physicalSizeToMatrix, hexToRgb, getStatsForResolution, canLoadResolution, normalizeCoordinateTransformations, } from './spatial.js';
|
|
2
|
+
export { initializeLayerChannels, initializeRasterLayersAndChannels, getSourceFromLoader, isInterleaved, isRgb, getNgffAxes, getNgffAxesForTiff, coordinateTransformationsToMatrix, physicalSizeToMatrix, hexToRgb, getStatsForResolution, canLoadResolution, normalizeCoordinateTransformations, normalizeAxes, } from './spatial.js';
|
|
3
3
|
export { loadOmeZarr, guessTileSize, ZarritaPixelSource, } from './load-ome-zarr.js';
|
|
4
4
|
export { toRgbUIString, getSingleSelectionStats, getMultiSelectionStats, getPhysicalSizeScalingMatrix, getBoundingCube, abbreviateNumber, filterSelection, } from './layer-controller.js';
|
|
5
5
|
export { DOMAINS, } from './constants.js';
|
package/dist-tsc/spatial.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export function getNgffAxesForTiff(dimOrder: any): any;
|
|
|
52
52
|
*/
|
|
53
53
|
export function coordinateTransformationsToMatrix(coordinateTransformations: object[] | undefined, axes: object[] | undefined): Matrix4;
|
|
54
54
|
export function hexToRgb(hex: any): number[];
|
|
55
|
+
export function normalizeAxes(axes: any): any;
|
|
55
56
|
/**
|
|
56
57
|
* Normalize coordinate transformations to the OME-NGFF v0.4 format,
|
|
57
58
|
* despite potentially being in the new format proposed in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../src/spatial.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,4CAJW,MAAM,SACN,MAAM,GAAG,SAAS,GAChB,MAAM,CAMlB;AAoCD;;;;GAIG;AACH,8BAHW,MAAM,YACN,KAAK,GAAC,IAAI,WAiBpB;AAID,sHAmCC;AAiHD;;GAEG;AACH,qCAFW,KAAK,CAAE,MAAM,CAAC,WAKxB;AAED;;;;;;GAMG;AACH,gDALW,MAAM,eAEJ,MAAM,EAAE,CAuCpB;AAED;;;;;;;;;GASG;AACH,gEAJW,MAAM,EAAE,sBAER,CAAC,MAAM,EAAE,GAAC,IAAI,CAAC,+CAuEzB;AASD;;;IAuBC;AAED,uDAQC;AAED;;;;;;;;GAQG;AACH,6EANW,MAAM,EAAE,GAAC,SAAS,QAElB,MAAM,EAAE,GAAC,SAAS,GAEhB,OAAO,CA4CnB;AAED,6CAOC;AAED;;;;;;;;;GASG;AACH,8EANW,MAAM,EAAE,GAAC,SAAS,YAGlB,MAAM,EAAE,GACN,MAAM,EAAE,CAoDpB;
|
|
1
|
+
{"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../src/spatial.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,4CAJW,MAAM,SACN,MAAM,GAAG,SAAS,GAChB,MAAM,CAMlB;AAoCD;;;;GAIG;AACH,8BAHW,MAAM,YACN,KAAK,GAAC,IAAI,WAiBpB;AAID,sHAmCC;AAiHD;;GAEG;AACH,qCAFW,KAAK,CAAE,MAAM,CAAC,WAKxB;AAED;;;;;;GAMG;AACH,gDALW,MAAM,eAEJ,MAAM,EAAE,CAuCpB;AAED;;;;;;;;;GASG;AACH,gEAJW,MAAM,EAAE,sBAER,CAAC,MAAM,EAAE,GAAC,IAAI,CAAC,+CAuEzB;AASD;;;IAuBC;AAED,uDAQC;AAED;;;;;;;;GAQG;AACH,6EANW,MAAM,EAAE,GAAC,SAAS,QAElB,MAAM,EAAE,GAAC,SAAS,GAEhB,OAAO,CA4CnB;AAED,6CAOC;AAMD,8CASC;AAED;;;;;;;;;GASG;AACH,8EANW,MAAM,EAAE,GAAC,SAAS,YAGlB,MAAM,EAAE,GACN,MAAM,EAAE,CAoDpB;AAvgBM;;;;;EAYN;AAEM,yEAkBN;wBAnDuB,SAAS"}
|
package/dist-tsc/spatial.js
CHANGED
|
@@ -412,6 +412,19 @@ export function hexToRgb(hex) {
|
|
|
412
412
|
parseInt(result[3].toLowerCase(), 16),
|
|
413
413
|
];
|
|
414
414
|
}
|
|
415
|
+
// TODO: is this needed?
|
|
416
|
+
// In the spatialdata metadata the axis name/type/unit info are also listed in
|
|
417
|
+
// coordinateTransformations[].input|output.axes[] entries.
|
|
418
|
+
export function normalizeAxes(axes) {
|
|
419
|
+
// Normalize axes to OME-NGFF v0.4 format.
|
|
420
|
+
return axes.map((axisInfo) => {
|
|
421
|
+
if (typeof axisInfo === 'string') {
|
|
422
|
+
// If the axis is a string, assume it is a name and set type to 'space'.
|
|
423
|
+
return { name: axisInfo, type: 'space' };
|
|
424
|
+
}
|
|
425
|
+
return axisInfo;
|
|
426
|
+
});
|
|
427
|
+
}
|
|
415
428
|
/**
|
|
416
429
|
* Normalize coordinate transformations to the OME-NGFF v0.4 format,
|
|
417
430
|
* despite potentially being in the new format proposed in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/spatial-utils",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.5",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"zarrita": "0.5.2",
|
|
21
21
|
"math.gl": "^3.5.6",
|
|
22
22
|
"mathjs": "^9.2.0",
|
|
23
|
-
"@vitessce/gl": "3.6.
|
|
24
|
-
"@vitessce/utils": "3.6.
|
|
25
|
-
"@vitessce/zarr-utils": "3.6.
|
|
26
|
-
"@vitessce/constants-internal": "3.6.
|
|
27
|
-
"@vitessce/globals": "3.6.
|
|
23
|
+
"@vitessce/gl": "3.6.5",
|
|
24
|
+
"@vitessce/utils": "3.6.5",
|
|
25
|
+
"@vitessce/zarr-utils": "3.6.5",
|
|
26
|
+
"@vitessce/constants-internal": "3.6.5",
|
|
27
|
+
"@vitessce/globals": "3.6.5"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
package/src/index.js
CHANGED
package/src/spatial.js
CHANGED
|
@@ -462,6 +462,21 @@ export function hexToRgb(hex) {
|
|
|
462
462
|
];
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
+
|
|
466
|
+
// TODO: is this needed?
|
|
467
|
+
// In the spatialdata metadata the axis name/type/unit info are also listed in
|
|
468
|
+
// coordinateTransformations[].input|output.axes[] entries.
|
|
469
|
+
export function normalizeAxes(axes) {
|
|
470
|
+
// Normalize axes to OME-NGFF v0.4 format.
|
|
471
|
+
return axes.map((axisInfo) => {
|
|
472
|
+
if (typeof axisInfo === 'string') {
|
|
473
|
+
// If the axis is a string, assume it is a name and set type to 'space'.
|
|
474
|
+
return { name: axisInfo, type: 'space' };
|
|
475
|
+
}
|
|
476
|
+
return axisInfo;
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
|
|
465
480
|
/**
|
|
466
481
|
* Normalize coordinate transformations to the OME-NGFF v0.4 format,
|
|
467
482
|
* despite potentially being in the new format proposed in
|