@vitessce/ome-tiff 3.1.2 → 3.2.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-fab4dad6.js → deflate-3aebf52d.js} +1 -1
- package/dist/{index-902940dd.js → index-738cadd7.js} +28769 -27696
- package/dist/index.js +1 -1
- package/dist/{jpeg-714c2bbe.js → jpeg-48c29005.js} +1 -1
- package/dist/{lerc-ba258177.js → lerc-1e116f30.js} +1 -1
- package/dist/{lzw-2712730c.js → lzw-17a535f6.js} +1 -1
- package/dist/{packbits-41f0b851.js → packbits-249fe288.js} +1 -1
- package/dist/{raw-066e1e3c.js → raw-2d1e8ae3.js} +1 -1
- package/dist/{webimage-f3f86602.js → webimage-72e835aa.js} +1 -1
- package/dist-tsc/OmeTiffAsObsSegmentationsLoader.d.ts.map +1 -1
- package/dist-tsc/OmeTiffAsObsSegmentationsLoader.js +7 -1
- package/dist-tsc/OmeTiffLoader.d.ts.map +1 -1
- package/dist-tsc/OmeTiffLoader.js +8 -2
- package/package.json +8 -7
- package/src/OmeTiffAsObsSegmentationsLoader.js +9 -1
- package/src/OmeTiffLoader.js +10 -2
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-738cadd7.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
var LercDecode = { exports: {} };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OmeTiffAsObsSegmentationsLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffAsObsSegmentationsLoader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OmeTiffAsObsSegmentationsLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffAsObsSegmentationsLoader.js"],"names":[],"mappings":"AAYA;CA6FC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
2
|
import { LoaderResult } from '@vitessce/vit-s';
|
|
3
3
|
import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxesForTiff, } from '@vitessce/spatial-utils';
|
|
4
|
+
import { ImageWrapper, } from '@vitessce/image-utils';
|
|
4
5
|
import OmeTiffLoader from './OmeTiffLoader.js';
|
|
5
6
|
export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
6
7
|
async load() {
|
|
@@ -8,6 +9,7 @@ export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
|
8
9
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = this.options || {};
|
|
9
10
|
const offsets = await this.loadOffsets();
|
|
10
11
|
const loader = await viv.loadOmeTiff(url, { offsets, headers: requestInit?.headers });
|
|
12
|
+
const imageWrapper = new ImageWrapper(loader, this.options);
|
|
11
13
|
const { Name: imageName, Pixels: { Channels, DimensionOrder, PhysicalSizeX, PhysicalSizeXUnit, PhysicalSizeY, PhysicalSizeYUnit, }, } = loader.metadata;
|
|
12
14
|
const transformMatrixFromOptions = coordinateTransformationsToMatrix(coordinateTransformationsFromOptions, getNgffAxesForTiff(DimensionOrder));
|
|
13
15
|
const usePhysicalSizeScaling = (PhysicalSizeX
|
|
@@ -55,7 +57,11 @@ export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
|
55
57
|
};
|
|
56
58
|
return new LoaderResult({
|
|
57
59
|
obsSegmentationsType: 'bitmask',
|
|
58
|
-
obsSegmentations: {
|
|
60
|
+
obsSegmentations: {
|
|
61
|
+
loaders: imageLayerLoaders,
|
|
62
|
+
meta: imageLayerMeta,
|
|
63
|
+
instance: imageWrapper, // TODO: make this the root value of LoaderResult.image.
|
|
64
|
+
},
|
|
59
65
|
}, urls, coordinationValues);
|
|
60
66
|
});
|
|
61
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OmeTiffLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffLoader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OmeTiffLoader.d.ts","sourceRoot":"","sources":["../src/OmeTiffLoader.js"],"names":[],"mappings":"AASA;IACE,4BAWC;IAED,qBA4FC;IA1BG,oBAIC;CAuBN"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { viv } from '@vitessce/gl';
|
|
2
2
|
import { initializeRasterLayersAndChannels, coordinateTransformationsToMatrix, getNgffAxesForTiff, } from '@vitessce/spatial-utils';
|
|
3
|
+
import { ImageWrapper } from '@vitessce/image-utils';
|
|
3
4
|
import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/vit-s';
|
|
4
5
|
export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
5
6
|
async loadOffsets() {
|
|
@@ -19,6 +20,7 @@ export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
|
19
20
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = this.options || {};
|
|
20
21
|
const offsets = await this.loadOffsets();
|
|
21
22
|
const loader = await viv.loadOmeTiff(url, { offsets, headers: requestInit?.headers });
|
|
23
|
+
const imageWrapper = new ImageWrapper(loader, this.options);
|
|
22
24
|
const { Name: imageName, Pixels: { Channels, DimensionOrder, PhysicalSizeX, PhysicalSizeXUnit, PhysicalSizeY, PhysicalSizeYUnit, }, } = loader.metadata;
|
|
23
25
|
const channels = Array.isArray(Channels)
|
|
24
26
|
? Channels.map((channel, i) => channel.Name || `Channel ${i}`)
|
|
@@ -63,8 +65,12 @@ export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
|
63
65
|
spatialImageLayer: autoImageLayers,
|
|
64
66
|
};
|
|
65
67
|
return new LoaderResult({
|
|
66
|
-
image: {
|
|
67
|
-
|
|
68
|
+
image: {
|
|
69
|
+
loaders: imageLayerLoaders,
|
|
70
|
+
meta: imageLayerMeta,
|
|
71
|
+
instance: imageWrapper, // TODO: make this the root value of LoaderResult.image.
|
|
72
|
+
},
|
|
73
|
+
featureIndex: imageWrapper.getChannelNames(),
|
|
68
74
|
}, urls, coordinationValues);
|
|
69
75
|
});
|
|
70
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/ome-tiff",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"ajv": "^6.10.0",
|
|
20
20
|
"d3-array": "^2.4.0",
|
|
21
21
|
"lodash-es": "^4.17.21",
|
|
22
|
-
"@vitessce/constants-internal": "3.
|
|
23
|
-
"@vitessce/gl": "3.
|
|
24
|
-
"@vitessce/sets-utils": "3.
|
|
25
|
-
"@vitessce/spatial-utils": "3.
|
|
26
|
-
"@vitessce/utils": "3.
|
|
27
|
-
"@vitessce/
|
|
22
|
+
"@vitessce/constants-internal": "3.2.0",
|
|
23
|
+
"@vitessce/gl": "3.2.0",
|
|
24
|
+
"@vitessce/sets-utils": "3.2.0",
|
|
25
|
+
"@vitessce/spatial-utils": "3.2.0",
|
|
26
|
+
"@vitessce/image-utils": "3.2.0",
|
|
27
|
+
"@vitessce/utils": "3.2.0",
|
|
28
|
+
"@vitessce/vit-s": "3.2.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"ajv": "^6.10.0"
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
coordinateTransformationsToMatrix,
|
|
6
6
|
getNgffAxesForTiff,
|
|
7
7
|
} from '@vitessce/spatial-utils';
|
|
8
|
+
import {
|
|
9
|
+
ImageWrapper,
|
|
10
|
+
} from '@vitessce/image-utils';
|
|
8
11
|
import OmeTiffLoader from './OmeTiffLoader.js';
|
|
9
12
|
|
|
10
13
|
export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
@@ -13,6 +16,7 @@ export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
|
13
16
|
const { coordinateTransformations: coordinateTransformationsFromOptions } = this.options || {};
|
|
14
17
|
const offsets = await this.loadOffsets();
|
|
15
18
|
const loader = await viv.loadOmeTiff(url, { offsets, headers: requestInit?.headers });
|
|
19
|
+
const imageWrapper = new ImageWrapper(loader, this.options);
|
|
16
20
|
const {
|
|
17
21
|
Name: imageName,
|
|
18
22
|
Pixels: {
|
|
@@ -88,7 +92,11 @@ export default class OmeTiffAsObsSegmentationsLoader extends OmeTiffLoader {
|
|
|
88
92
|
return new LoaderResult(
|
|
89
93
|
{
|
|
90
94
|
obsSegmentationsType: 'bitmask',
|
|
91
|
-
obsSegmentations: {
|
|
95
|
+
obsSegmentations: {
|
|
96
|
+
loaders: imageLayerLoaders, // TODO: replace with imageWrapper
|
|
97
|
+
meta: imageLayerMeta, // TODO: replace with imageWrapper
|
|
98
|
+
instance: imageWrapper, // TODO: make this the root value of LoaderResult.image.
|
|
99
|
+
},
|
|
92
100
|
},
|
|
93
101
|
urls,
|
|
94
102
|
coordinationValues,
|
package/src/OmeTiffLoader.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
coordinateTransformationsToMatrix,
|
|
5
5
|
getNgffAxesForTiff,
|
|
6
6
|
} from '@vitessce/spatial-utils';
|
|
7
|
+
import { ImageWrapper } from '@vitessce/image-utils';
|
|
7
8
|
import { AbstractTwoStepLoader, LoaderResult } from '@vitessce/vit-s';
|
|
8
9
|
|
|
9
10
|
export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
@@ -26,6 +27,9 @@ export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
|
26
27
|
|
|
27
28
|
const offsets = await this.loadOffsets();
|
|
28
29
|
const loader = await viv.loadOmeTiff(url, { offsets, headers: requestInit?.headers });
|
|
30
|
+
|
|
31
|
+
const imageWrapper = new ImageWrapper(loader, this.options);
|
|
32
|
+
|
|
29
33
|
const {
|
|
30
34
|
Name: imageName,
|
|
31
35
|
Pixels: {
|
|
@@ -98,8 +102,12 @@ export default class OmeTiffLoader extends AbstractTwoStepLoader {
|
|
|
98
102
|
};
|
|
99
103
|
return new LoaderResult(
|
|
100
104
|
{
|
|
101
|
-
image: {
|
|
102
|
-
|
|
105
|
+
image: {
|
|
106
|
+
loaders: imageLayerLoaders, // TODO: replace with imageWrapper
|
|
107
|
+
meta: imageLayerMeta, // TODO: replace with imageWrapper
|
|
108
|
+
instance: imageWrapper, // TODO: make this the root value of LoaderResult.image.
|
|
109
|
+
},
|
|
110
|
+
featureIndex: imageWrapper.getChannelNames(),
|
|
103
111
|
},
|
|
104
112
|
urls,
|
|
105
113
|
coordinationValues,
|