@vitessce/json 3.3.2 → 3.3.4
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-44be7eee.js → deflate-4d52bdec.js} +1 -1
- package/dist/{index-c9e50f8e.js → index-cd2c00d9.js} +10990 -10874
- package/dist/index.js +1 -1
- package/dist/{jpeg-4352029f.js → jpeg-69e005b7.js} +1 -1
- package/dist/{lerc-9666eaeb.js → lerc-cc95d8a0.js} +1 -1
- package/dist/{lzw-95c88af0.js → lzw-893f4756.js} +1 -1
- package/dist/{packbits-dbe03832.js → packbits-b1b1628c.js} +1 -1
- package/dist/{raw-489994e7.js → raw-6807a7ef.js} +1 -1
- package/dist/{webimage-bf903bbd.js → webimage-1e5d733c.js} +1 -1
- package/dist-tsc/json-loaders/ObsSegmentationsJson.d.ts.map +1 -1
- package/dist-tsc/json-loaders/ObsSegmentationsJson.js +27 -1
- package/dist-tsc/raster-json-loaders/RasterJsonLoader.d.ts.map +1 -1
- package/dist-tsc/raster-json-loaders/RasterJsonLoader.js +2 -1
- package/package.json +10 -9
- package/src/json-loaders/ObsSegmentationsJson.js +30 -0
- package/src/raster-json-loaders/RasterJsonLoader.js +2 -1
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-cd2c00d9.js";
|
|
3
3
|
import "@vitessce/vit-s";
|
|
4
4
|
import "react";
|
|
5
5
|
var LercDecode = { exports: {} };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObsSegmentationsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSegmentationsJson.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObsSegmentationsJson.d.ts","sourceRoot":"","sources":["../../src/json-loaders/ObsSegmentationsJson.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;MAYC;IAFC;;;;;;;kBAAmF;IAIrF,qBAwCC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
2
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
3
|
import JsonLoader from './JsonLoader.js';
|
|
3
4
|
export default class ObsSegmentationsJsonLoader extends JsonLoader {
|
|
4
5
|
loadFromCache(data) {
|
|
@@ -19,8 +20,33 @@ export default class ObsSegmentationsJsonLoader extends JsonLoader {
|
|
|
19
20
|
if (payload instanceof AbstractLoaderError) {
|
|
20
21
|
return Promise.reject(payload);
|
|
21
22
|
}
|
|
23
|
+
const channelCoordination = [{
|
|
24
|
+
// obsType: null,
|
|
25
|
+
spatialChannelColor: [255, 255, 255],
|
|
26
|
+
spatialChannelVisible: true,
|
|
27
|
+
spatialChannelOpacity: 1.0,
|
|
28
|
+
spatialChannelWindow: null,
|
|
29
|
+
// featureType: 'feature',
|
|
30
|
+
// featureValueType: 'value',
|
|
31
|
+
obsColorEncoding: 'spatialChannelColor',
|
|
32
|
+
spatialSegmentationFilled: true,
|
|
33
|
+
spatialSegmentationStrokeWidth: 1.0,
|
|
34
|
+
obsHighlight: null,
|
|
35
|
+
}];
|
|
36
|
+
const coordinationValues = {
|
|
37
|
+
// spatialTargetZ: imageWrapper.getDefaultTargetZ(),
|
|
38
|
+
// spatialTargetT: imageWrapper.getDefaultTargetT(),
|
|
39
|
+
segmentationLayer: CL([
|
|
40
|
+
{
|
|
41
|
+
fileUid: this.coordinationValues?.fileUid || null,
|
|
42
|
+
spatialLayerOpacity: 1.0,
|
|
43
|
+
spatialLayerVisible: true,
|
|
44
|
+
segmentationChannel: CL(channelCoordination),
|
|
45
|
+
},
|
|
46
|
+
]),
|
|
47
|
+
};
|
|
22
48
|
const { data, url } = payload;
|
|
23
49
|
const result = this.loadFromCache(data);
|
|
24
|
-
return Promise.resolve(new LoaderResult(result, url));
|
|
50
|
+
return Promise.resolve(new LoaderResult(result, url, coordinationValues));
|
|
25
51
|
}
|
|
26
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RasterJsonLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonLoader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RasterJsonLoader.d.ts","sourceRoot":"","sources":["../../src/raster-json-loaders/RasterJsonLoader.js"],"names":[],"mappings":"AA8HA;IAWE,qBAyCC;IAnBG,oBAIC;CAgBN"}
|
|
@@ -63,7 +63,8 @@ async function initLoader(imageData) {
|
|
|
63
63
|
// Most of the following has been copied from OmeZarrLoader.js.
|
|
64
64
|
// Reference: https://github.com/vitessce/vitessce/blob/fb0e7f/packages/file-types/zarr/src/ome-loaders/OmeZarrLoader.js#L29
|
|
65
65
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata || {};
|
|
66
|
-
const
|
|
66
|
+
const root = await zarrOpenRoot(url, requestInit);
|
|
67
|
+
const loader = await loadOmeZarr(root);
|
|
67
68
|
const { metadata: loaderMetadata } = loader;
|
|
68
69
|
const { omero, multiscales } = loaderMetadata;
|
|
69
70
|
if (!Array.isArray(multiscales) || multiscales.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/json",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,15 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"zarrita": "0.4.0-next.4",
|
|
22
22
|
"zod": "^3.21.4",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/
|
|
25
|
-
"@vitessce/
|
|
26
|
-
"@vitessce/
|
|
27
|
-
"@vitessce/
|
|
28
|
-
"@vitessce/
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/schemas": "3.3.4",
|
|
24
|
+
"@vitessce/constants-internal": "3.3.4",
|
|
25
|
+
"@vitessce/spatial-utils": "3.3.4",
|
|
26
|
+
"@vitessce/sets-utils": "3.3.4",
|
|
27
|
+
"@vitessce/gl": "3.3.4",
|
|
28
|
+
"@vitessce/utils": "3.3.4",
|
|
29
|
+
"@vitessce/vit-s": "3.3.4",
|
|
30
|
+
"@vitessce/config": "3.3.4",
|
|
31
|
+
"@vitessce/zarr-utils": "3.3.4"
|
|
31
32
|
},
|
|
32
33
|
"scripts": {
|
|
33
34
|
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AbstractLoaderError, LoaderResult } from '@vitessce/vit-s';
|
|
2
|
+
import { CoordinationLevel as CL } from '@vitessce/config';
|
|
2
3
|
import JsonLoader from './JsonLoader.js';
|
|
3
4
|
|
|
4
5
|
export default class ObsSegmentationsJsonLoader extends JsonLoader {
|
|
@@ -21,11 +22,40 @@ export default class ObsSegmentationsJsonLoader extends JsonLoader {
|
|
|
21
22
|
if (payload instanceof AbstractLoaderError) {
|
|
22
23
|
return Promise.reject(payload);
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
const channelCoordination = [{
|
|
27
|
+
// obsType: null,
|
|
28
|
+
spatialChannelColor: [255, 255, 255],
|
|
29
|
+
spatialChannelVisible: true,
|
|
30
|
+
spatialChannelOpacity: 1.0,
|
|
31
|
+
spatialChannelWindow: null,
|
|
32
|
+
// featureType: 'feature',
|
|
33
|
+
// featureValueType: 'value',
|
|
34
|
+
obsColorEncoding: 'spatialChannelColor',
|
|
35
|
+
spatialSegmentationFilled: true,
|
|
36
|
+
spatialSegmentationStrokeWidth: 1.0,
|
|
37
|
+
obsHighlight: null,
|
|
38
|
+
}];
|
|
39
|
+
|
|
40
|
+
const coordinationValues = {
|
|
41
|
+
// spatialTargetZ: imageWrapper.getDefaultTargetZ(),
|
|
42
|
+
// spatialTargetT: imageWrapper.getDefaultTargetT(),
|
|
43
|
+
segmentationLayer: CL([
|
|
44
|
+
{
|
|
45
|
+
fileUid: this.coordinationValues?.fileUid || null,
|
|
46
|
+
spatialLayerOpacity: 1.0,
|
|
47
|
+
spatialLayerVisible: true,
|
|
48
|
+
segmentationChannel: CL(channelCoordination),
|
|
49
|
+
},
|
|
50
|
+
]),
|
|
51
|
+
};
|
|
52
|
+
|
|
24
53
|
const { data, url } = payload;
|
|
25
54
|
const result = this.loadFromCache(data);
|
|
26
55
|
return Promise.resolve(new LoaderResult(
|
|
27
56
|
result,
|
|
28
57
|
url,
|
|
58
|
+
coordinationValues,
|
|
29
59
|
));
|
|
30
60
|
}
|
|
31
61
|
}
|
|
@@ -80,7 +80,8 @@ async function initLoader(imageData) {
|
|
|
80
80
|
// Reference: https://github.com/vitessce/vitessce/blob/fb0e7f/packages/file-types/zarr/src/ome-loaders/OmeZarrLoader.js#L29
|
|
81
81
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata || {};
|
|
82
82
|
|
|
83
|
-
const
|
|
83
|
+
const root = await zarrOpenRoot(url, requestInit);
|
|
84
|
+
const loader = await loadOmeZarr(root);
|
|
84
85
|
const { metadata: loaderMetadata } = loader;
|
|
85
86
|
|
|
86
87
|
const { omero, multiscales } = loaderMetadata;
|