@vitessce/all 3.1.2 → 3.1.3
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-19f2d5d6.js → deflate-e164f5b4.js} +1 -1
- package/dist/{hglib-88a02387.js → hglib-27190533.js} +1 -1
- package/dist/{index-b711b37e.js → index-61ee101c.js} +80 -23
- package/dist/index.js +1 -1
- package/dist/{jpeg-826e5bcb.js → jpeg-eaa82c98.js} +1 -1
- package/dist/{lerc-dae178a4.js → lerc-0c45509f.js} +1 -1
- package/dist/{lzw-1fcadb5f.js → lzw-8aa1e0b3.js} +1 -1
- package/dist/{packbits-193c276e.js → packbits-ad4b66a3.js} +1 -1
- package/dist/{raw-83f54019.js → raw-cb4a4ae9.js} +1 -1
- package/dist/{webimage-bf05fa7a.js → webimage-3d222f28.js} +1 -1
- package/package.json +20 -20
@@ -1,6 +1,6 @@
|
|
1
1
|
import React__default from "react";
|
2
2
|
import ReactDOM__default from "react-dom";
|
3
|
-
import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-
|
3
|
+
import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-61ee101c.js";
|
4
4
|
function _mergeNamespaces(n, m) {
|
5
5
|
for (var i = 0; i < m.length; i++) {
|
6
6
|
const e = m[i];
|
@@ -155223,16 +155223,16 @@ async function getDecoder(fileDirectory) {
|
|
155223
155223
|
const Decoder = await importFn();
|
155224
155224
|
return new Decoder(fileDirectory);
|
155225
155225
|
}
|
155226
|
-
addDecoder([void 0, 1], () => import("./raw-
|
155227
|
-
addDecoder(5, () => import("./lzw-
|
155226
|
+
addDecoder([void 0, 1], () => import("./raw-cb4a4ae9.js").then((m2) => m2.default));
|
155227
|
+
addDecoder(5, () => import("./lzw-8aa1e0b3.js").then((m2) => m2.default));
|
155228
155228
|
addDecoder(6, () => {
|
155229
155229
|
throw new Error("old style JPEG compression is not supported.");
|
155230
155230
|
});
|
155231
|
-
addDecoder(7, () => import("./jpeg-
|
155232
|
-
addDecoder([8, 32946], () => import("./deflate-
|
155233
|
-
addDecoder(32773, () => import("./packbits-
|
155234
|
-
addDecoder(34887, () => import("./lerc-
|
155235
|
-
addDecoder(50001, () => import("./webimage-
|
155231
|
+
addDecoder(7, () => import("./jpeg-eaa82c98.js").then((m2) => m2.default));
|
155232
|
+
addDecoder([8, 32946], () => import("./deflate-e164f5b4.js").then((m2) => m2.default));
|
155233
|
+
addDecoder(32773, () => import("./packbits-ad4b66a3.js").then((m2) => m2.default));
|
155234
|
+
addDecoder(34887, () => import("./lerc-0c45509f.js").then((m2) => m2.default));
|
155235
|
+
addDecoder(50001, () => import("./webimage-3d222f28.js").then((m2) => m2.default));
|
155236
155236
|
function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
|
155237
155237
|
return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
|
155238
155238
|
}
|
@@ -190276,6 +190276,41 @@ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
|
|
190276
190276
|
}
|
190277
190277
|
return mat;
|
190278
190278
|
}
|
190279
|
+
function normalizeCoordinateTransformations(coordinateTransformations, datasets) {
|
190280
|
+
var _a2;
|
190281
|
+
let result = [];
|
190282
|
+
if (Array.isArray(coordinateTransformations)) {
|
190283
|
+
result = coordinateTransformations.map((transform3) => {
|
190284
|
+
if (transform3.input && transform3.output) {
|
190285
|
+
const { type: type2 } = transform3;
|
190286
|
+
if (type2 === "translation") {
|
190287
|
+
return {
|
190288
|
+
type: type2,
|
190289
|
+
translation: transform3.translation
|
190290
|
+
};
|
190291
|
+
}
|
190292
|
+
if (type2 === "scale") {
|
190293
|
+
return {
|
190294
|
+
type: type2,
|
190295
|
+
scale: transform3.scale
|
190296
|
+
};
|
190297
|
+
}
|
190298
|
+
if (type2 === "identity") {
|
190299
|
+
return { type: type2 };
|
190300
|
+
}
|
190301
|
+
console.warn(`Coordinate transformation type "${type2}" is not supported.`);
|
190302
|
+
}
|
190303
|
+
return transform3;
|
190304
|
+
});
|
190305
|
+
}
|
190306
|
+
if (Array.isArray((_a2 = datasets == null ? void 0 : datasets[0]) == null ? void 0 : _a2.coordinateTransformations)) {
|
190307
|
+
result = [
|
190308
|
+
...datasets[0].coordinateTransformations,
|
190309
|
+
...result
|
190310
|
+
];
|
190311
|
+
}
|
190312
|
+
return result;
|
190313
|
+
}
|
190279
190314
|
var shortNumber$1 = { exports: {} };
|
190280
190315
|
(function(module2, exports2) {
|
190281
190316
|
(function(global2, factory2) {
|
@@ -198420,7 +198455,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
|
|
198420
198455
|
const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
|
198421
198456
|
register({ dataFetcher: ZarrMultivecDataFetcher, config: ZarrMultivecDataFetcher.config }, { pluginType: "dataFetcher" });
|
198422
198457
|
const LazyHiGlassComponent = React__default.lazy(async () => {
|
198423
|
-
const { HiGlassComponent } = await import("./hglib-
|
198458
|
+
const { HiGlassComponent } = await import("./hglib-27190533.js").then((n3) => n3.h);
|
198424
198459
|
return { default: HiGlassComponent };
|
198425
198460
|
});
|
198426
198461
|
const HG_SIZE = 800;
|
@@ -257383,22 +257418,21 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
|
|
257383
257418
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = this.options || {};
|
257384
257419
|
const loader2 = await loadOmeZarr(this.url, { fetchOptions: this.requestInit, type: "multiscales" });
|
257385
257420
|
const { metadata: metadata2, data: data2 } = loader2;
|
257386
|
-
const { omero, multiscales } = metadata2;
|
257387
|
-
|
257388
|
-
|
257421
|
+
const { omero, multiscales, channels_metadata: spatialDataChannels } = metadata2;
|
257422
|
+
const isSpatialData = !!spatialDataChannels;
|
257423
|
+
if (!isSpatialData && !omero) {
|
257424
|
+
console.error("image.ome-zarr must have omero metadata in attributes.");
|
257389
257425
|
return Promise.reject(payload);
|
257390
257426
|
}
|
257391
257427
|
if (!Array.isArray(multiscales) || multiscales.length === 0) {
|
257392
257428
|
console.error("Multiscales array must exist and have at least one element");
|
257393
257429
|
}
|
257394
|
-
const { coordinateTransformations } = multiscales[0];
|
257430
|
+
const { datasets, coordinateTransformations: coordinateTransformationsFromFile, name: imageName } = multiscales[0];
|
257395
257431
|
const axes = getNgffAxes(multiscales[0].axes);
|
257432
|
+
const normCoordinateTransformationsFromFile = normalizeCoordinateTransformations(coordinateTransformationsFromFile, datasets);
|
257396
257433
|
const transformMatrixFromOptions = coordinateTransformationsToMatrix(coordinateTransformationsFromOptions, axes);
|
257397
|
-
const transformMatrixFromFile = coordinateTransformationsToMatrix(
|
257434
|
+
const transformMatrixFromFile = coordinateTransformationsToMatrix(normCoordinateTransformationsFromFile, axes);
|
257398
257435
|
const transformMatrix = transformMatrixFromFile.multiplyLeft(transformMatrixFromOptions);
|
257399
|
-
const { rdefs, channels: channels2, name: omeroName } = omero;
|
257400
|
-
const t4 = rdefs.defaultT ?? 0;
|
257401
|
-
const z2 = rdefs.defaultZ ?? 0;
|
257402
257436
|
const filterSelection = (sel) => {
|
257403
257437
|
if (data2.length > 0) {
|
257404
257438
|
const nextSel = {};
|
@@ -257412,14 +257446,37 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
|
|
257412
257446
|
}
|
257413
257447
|
return sel;
|
257414
257448
|
};
|
257449
|
+
let channelObjects;
|
257450
|
+
let channelLabels = [];
|
257451
|
+
let initialTargetT = 0;
|
257452
|
+
let initialTargetZ = 0;
|
257453
|
+
if (isSpatialData) {
|
257454
|
+
const { channels: channels2 } = spatialDataChannels;
|
257455
|
+
channelObjects = channels2.map((channel, i2) => ({
|
257456
|
+
selection: filterSelection({ z: initialTargetZ, t: initialTargetT, c: i2 }),
|
257457
|
+
slider: [0, 255],
|
257458
|
+
color: [255, 255, 255]
|
257459
|
+
}));
|
257460
|
+
channelLabels = channels2.map((c2) => c2.label);
|
257461
|
+
} else {
|
257462
|
+
const { rdefs, channels: channels2 } = omero;
|
257463
|
+
if (typeof rdefs.defaultT === "number") {
|
257464
|
+
initialTargetT = rdefs.defaultT;
|
257465
|
+
}
|
257466
|
+
if (typeof rdefs.defaultZ === "number") {
|
257467
|
+
initialTargetZ = rdefs.defaultZ;
|
257468
|
+
}
|
257469
|
+
channelObjects = channels2.map((channel, i2) => ({
|
257470
|
+
selection: filterSelection({ z: initialTargetZ, t: initialTargetT, c: i2 }),
|
257471
|
+
slider: [channel.window.start, channel.window.end],
|
257472
|
+
color: hexToRgb(channel.color)
|
257473
|
+
}));
|
257474
|
+
channelLabels = channels2.map((c2) => c2.label);
|
257475
|
+
}
|
257415
257476
|
const imagesWithLoaderCreators = [
|
257416
257477
|
{
|
257417
|
-
name:
|
257418
|
-
channels:
|
257419
|
-
selection: filterSelection({ z: z2, t: t4, c: i2 }),
|
257420
|
-
slider: [channel.window.start, channel.window.end],
|
257421
|
-
color: hexToRgb(channel.color)
|
257422
|
-
})),
|
257478
|
+
name: imageName || "Image",
|
257479
|
+
channels: channelObjects,
|
257423
257480
|
...transformMatrix ? {
|
257424
257481
|
metadata: {
|
257425
257482
|
transform: {
|
@@ -257427,7 +257484,7 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
|
|
257427
257484
|
}
|
257428
257485
|
}
|
257429
257486
|
} : {},
|
257430
|
-
loaderCreator: async () => ({ ...loader2, channels:
|
257487
|
+
loaderCreator: async () => ({ ...loader2, channels: channelLabels })
|
257431
257488
|
}
|
257432
257489
|
];
|
257433
257490
|
const [autoImageLayers, imageLayerLoaders, imageLayerMeta] = await initializeRasterLayersAndChannels(imagesWithLoaderCreators, void 0);
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-61ee101c.js";
|
3
3
|
import "react";
|
4
4
|
import "@vitessce/vit-s";
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/all",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.3",
|
4
4
|
"author": "Gehlenborg Lab",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -18,25 +18,25 @@
|
|
18
18
|
"dependencies": {
|
19
19
|
"@material-ui/core": "~4.12.3",
|
20
20
|
"zod": "^3.21.4",
|
21
|
-
"@vitessce/constants-internal": "3.1.
|
22
|
-
"@vitessce/
|
23
|
-
"@vitessce/
|
24
|
-
"@vitessce/feature-list": "3.1.
|
25
|
-
"@vitessce/genomic-profiles": "3.1.
|
26
|
-
"@vitessce/heatmap": "3.1.
|
27
|
-
"@vitessce/json": "3.1.
|
28
|
-
"@vitessce/layer-controller": "3.1.
|
29
|
-
"@vitessce/obs-sets-manager": "3.1.
|
30
|
-
"@vitessce/ome-tiff": "3.1.
|
31
|
-
"@vitessce/plugins": "3.1.
|
32
|
-
"@vitessce/scatterplot-embedding": "3.1.
|
33
|
-
"@vitessce/scatterplot-gating": "3.1.
|
34
|
-
"@vitessce/schemas": "3.1.
|
35
|
-
"@vitessce/spatial": "3.1.
|
36
|
-
"@vitessce/statistical-plots": "3.1.
|
37
|
-
"@vitessce/status": "3.1.
|
38
|
-
"@vitessce/vit-s": "3.1.
|
39
|
-
"@vitessce/zarr": "3.1.
|
21
|
+
"@vitessce/constants-internal": "3.1.3",
|
22
|
+
"@vitessce/csv": "3.1.3",
|
23
|
+
"@vitessce/description": "3.1.3",
|
24
|
+
"@vitessce/feature-list": "3.1.3",
|
25
|
+
"@vitessce/genomic-profiles": "3.1.3",
|
26
|
+
"@vitessce/heatmap": "3.1.3",
|
27
|
+
"@vitessce/json": "3.1.3",
|
28
|
+
"@vitessce/layer-controller": "3.1.3",
|
29
|
+
"@vitessce/obs-sets-manager": "3.1.3",
|
30
|
+
"@vitessce/ome-tiff": "3.1.3",
|
31
|
+
"@vitessce/plugins": "3.1.3",
|
32
|
+
"@vitessce/scatterplot-embedding": "3.1.3",
|
33
|
+
"@vitessce/scatterplot-gating": "3.1.3",
|
34
|
+
"@vitessce/schemas": "3.1.3",
|
35
|
+
"@vitessce/spatial": "3.1.3",
|
36
|
+
"@vitessce/statistical-plots": "3.1.3",
|
37
|
+
"@vitessce/status": "3.1.3",
|
38
|
+
"@vitessce/vit-s": "3.1.3",
|
39
|
+
"@vitessce/zarr": "3.1.3"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
42
|
"@types/react": "^18.0.28",
|