@fideus-labs/ngff-zarr 0.2.3 → 0.2.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/README.md +268 -76
- package/esm/browser-mod.d.ts +2 -0
- package/esm/browser-mod.d.ts.map +1 -1
- package/esm/browser-mod.js +4 -1
- package/esm/browser-mod.js.map +1 -0
- package/esm/io/from_ngff_zarr.d.ts.map +1 -1
- package/esm/io/from_ngff_zarr.js +2 -2
- package/esm/io/from_ngff_zarr.js.map +1 -0
- package/esm/io/hcs.js +1 -0
- package/esm/io/hcs.js.map +1 -0
- package/esm/io/itk_image_to_ngff_image.js +1 -0
- package/esm/io/itk_image_to_ngff_image.js.map +1 -0
- package/esm/io/ngff_image_to_itk_image.js +1 -0
- package/esm/io/ngff_image_to_itk_image.js.map +1 -0
- package/esm/io/to_ngff_image.js +1 -0
- package/esm/io/to_ngff_image.js.map +1 -0
- package/esm/io/to_ngff_zarr.d.ts.map +1 -1
- package/esm/io/to_ngff_zarr.js +2 -2
- package/esm/io/to_ngff_zarr.js.map +1 -0
- package/esm/methods/itkwasm-browser.js +1 -0
- package/esm/methods/itkwasm-browser.js.map +1 -0
- package/esm/methods/itkwasm-node.js +1 -0
- package/esm/methods/itkwasm-node.js.map +1 -0
- package/esm/methods/itkwasm-shared.js +1 -0
- package/esm/methods/itkwasm-shared.js.map +1 -0
- package/esm/methods/itkwasm.js +1 -0
- package/esm/methods/itkwasm.js.map +1 -0
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -1
- package/esm/mod.js.map +1 -0
- package/esm/process/to_multiscales-browser.d.ts +17 -0
- package/esm/process/to_multiscales-browser.d.ts.map +1 -0
- package/esm/process/to_multiscales-browser.js +15 -0
- package/esm/process/to_multiscales-browser.js.map +1 -0
- package/esm/process/to_multiscales-node.d.ts +18 -0
- package/esm/process/to_multiscales-node.d.ts.map +1 -0
- package/esm/process/to_multiscales-node.js +17 -0
- package/esm/process/to_multiscales-node.js.map +1 -0
- package/esm/process/to_multiscales-shared.d.ts +28 -0
- package/esm/process/to_multiscales-shared.d.ts.map +1 -0
- package/esm/{io/to_multiscales.js → process/to_multiscales-shared.js} +7 -5
- package/esm/process/to_multiscales-shared.js.map +1 -0
- package/esm/schemas/coordinate_systems.js +1 -0
- package/esm/schemas/coordinate_systems.js.map +1 -0
- package/esm/schemas/index.js +1 -0
- package/esm/schemas/index.js.map +1 -0
- package/esm/schemas/methods.js +1 -0
- package/esm/schemas/methods.js.map +1 -0
- package/esm/schemas/multiscales.js +1 -0
- package/esm/schemas/multiscales.js.map +1 -0
- package/esm/schemas/ngff_image.js +1 -0
- package/esm/schemas/ngff_image.js.map +1 -0
- package/esm/schemas/ome_zarr.js +1 -0
- package/esm/schemas/ome_zarr.js.map +1 -0
- package/esm/schemas/rfc4.js +1 -0
- package/esm/schemas/rfc4.js.map +1 -0
- package/esm/schemas/units.js +1 -0
- package/esm/schemas/units.js.map +1 -0
- package/esm/schemas/zarr_metadata.js +1 -0
- package/esm/schemas/zarr_metadata.js.map +1 -0
- package/esm/types/array_interface.js +1 -0
- package/esm/types/array_interface.js.map +1 -0
- package/esm/types/hcs.js +1 -0
- package/esm/types/hcs.js.map +1 -0
- package/esm/types/methods.js +1 -0
- package/esm/types/methods.js.map +1 -0
- package/esm/types/multiscales.js +1 -0
- package/esm/types/multiscales.js.map +1 -0
- package/esm/types/ngff_image.js +1 -0
- package/esm/types/ngff_image.js.map +1 -0
- package/esm/types/rfc4.js +1 -0
- package/esm/types/rfc4.js.map +1 -0
- package/esm/types/units.js +1 -0
- package/esm/types/units.js.map +1 -0
- package/esm/types/zarr_metadata.js +1 -0
- package/esm/types/zarr_metadata.js.map +1 -0
- package/esm/utils/create_queue.js +1 -0
- package/esm/utils/create_queue.js.map +1 -0
- package/esm/utils/factory.js +1 -0
- package/esm/utils/factory.js.map +1 -0
- package/esm/utils/method_metadata.js +1 -0
- package/esm/utils/method_metadata.js.map +1 -0
- package/esm/utils/validation.js +1 -0
- package/esm/utils/validation.js.map +1 -0
- package/package.json +31 -28
- package/esm/_dnt.shims.d.ts +0 -2
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -57
- package/esm/io/to_multiscales.d.ts +0 -18
- package/esm/io/to_multiscales.d.ts.map +0 -1
- package/esm/package.json +0 -3
- package/script/_dnt.shims.d.ts +0 -2
- package/script/_dnt.shims.d.ts.map +0 -1
- package/script/_dnt.shims.js +0 -60
- package/script/browser-mod.d.ts +0 -14
- package/script/browser-mod.d.ts.map +0 -1
- package/script/browser-mod.js +0 -48
- package/script/io/from_ngff_zarr.d.ts +0 -10
- package/script/io/from_ngff_zarr.d.ts.map +0 -1
- package/script/io/from_ngff_zarr.js +0 -234
- package/script/io/hcs.d.ts +0 -18
- package/script/io/hcs.d.ts.map +0 -1
- package/script/io/hcs.js +0 -55
- package/script/io/itk_image_to_ngff_image.d.ts +0 -30
- package/script/io/itk_image_to_ngff_image.d.ts.map +0 -1
- package/script/io/itk_image_to_ngff_image.js +0 -153
- package/script/io/ngff_image_to_itk_image.d.ts +0 -30
- package/script/io/ngff_image_to_itk_image.d.ts.map +0 -1
- package/script/io/ngff_image_to_itk_image.js +0 -244
- package/script/io/to_multiscales.d.ts +0 -18
- package/script/io/to_multiscales.d.ts.map +0 -1
- package/script/io/to_multiscales.js +0 -67
- package/script/io/to_ngff_image.d.ts +0 -17
- package/script/io/to_ngff_image.d.ts.map +0 -1
- package/script/io/to_ngff_image.js +0 -162
- package/script/io/to_ngff_zarr.d.ts +0 -10
- package/script/io/to_ngff_zarr.d.ts.map +0 -1
- package/script/io/to_ngff_zarr.js +0 -346
- package/script/methods/itkwasm-browser.d.ts +0 -6
- package/script/methods/itkwasm-browser.d.ts.map +0 -1
- package/script/methods/itkwasm-browser.js +0 -488
- package/script/methods/itkwasm-node.d.ts +0 -6
- package/script/methods/itkwasm-node.d.ts.map +0 -1
- package/script/methods/itkwasm-node.js +0 -493
- package/script/methods/itkwasm-shared.d.ts +0 -68
- package/script/methods/itkwasm-shared.d.ts.map +0 -1
- package/script/methods/itkwasm-shared.js +0 -524
- package/script/methods/itkwasm.d.ts +0 -14
- package/script/methods/itkwasm.d.ts.map +0 -1
- package/script/methods/itkwasm.js +0 -21
- package/script/mod.d.ts +0 -24
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -50
- package/script/package.json +0 -3
- package/script/schemas/coordinate_systems.d.ts +0 -251
- package/script/schemas/coordinate_systems.d.ts.map +0 -1
- package/script/schemas/coordinate_systems.js +0 -142
- package/script/schemas/index.d.ts +0 -9
- package/script/schemas/index.d.ts.map +0 -1
- package/script/schemas/index.js +0 -101
- package/script/schemas/methods.d.ts +0 -3
- package/script/schemas/methods.d.ts.map +0 -1
- package/script/schemas/methods.js +0 -11
- package/script/schemas/multiscales.d.ts +0 -4
- package/script/schemas/multiscales.d.ts.map +0 -1
- package/script/schemas/multiscales.js +0 -24
- package/script/schemas/ngff_image.d.ts +0 -20
- package/script/schemas/ngff_image.d.ts.map +0 -1
- package/script/schemas/ngff_image.js +0 -24
- package/script/schemas/ome_zarr.d.ts +0 -617
- package/script/schemas/ome_zarr.d.ts.map +0 -1
- package/script/schemas/ome_zarr.js +0 -211
- package/script/schemas/rfc4.d.ts +0 -334
- package/script/schemas/rfc4.d.ts.map +0 -1
- package/script/schemas/rfc4.js +0 -132
- package/script/schemas/units.d.ts +0 -78
- package/script/schemas/units.d.ts.map +0 -1
- package/script/schemas/units.js +0 -70
- package/script/schemas/zarr_metadata.d.ts +0 -55
- package/script/schemas/zarr_metadata.d.ts.map +0 -1
- package/script/schemas/zarr_metadata.js +0 -71
- package/script/types/array_interface.d.ts +0 -7
- package/script/types/array_interface.d.ts.map +0 -1
- package/script/types/array_interface.js +0 -2
- package/script/types/hcs.d.ts +0 -70
- package/script/types/hcs.d.ts.map +0 -1
- package/script/types/hcs.js +0 -233
- package/script/types/methods.d.ts +0 -7
- package/script/types/methods.d.ts.map +0 -1
- package/script/types/methods.js +0 -12
- package/script/types/multiscales.d.ts +0 -21
- package/script/types/multiscales.d.ts.map +0 -1
- package/script/types/multiscales.js +0 -38
- package/script/types/ngff_image.d.ts +0 -27
- package/script/types/ngff_image.d.ts.map +0 -1
- package/script/types/ngff_image.js +0 -48
- package/script/types/rfc4.d.ts +0 -94
- package/script/types/rfc4.d.ts.map +0 -1
- package/script/types/rfc4.js +0 -143
- package/script/types/units.d.ts +0 -12
- package/script/types/units.d.ts.map +0 -1
- package/script/types/units.js +0 -66
- package/script/types/zarr_metadata.d.ts +0 -58
- package/script/types/zarr_metadata.d.ts.map +0 -1
- package/script/types/zarr_metadata.js +0 -20
- package/script/utils/create_queue.d.ts +0 -6
- package/script/utils/create_queue.d.ts.map +0 -1
- package/script/utils/create_queue.js +0 -17
- package/script/utils/factory.d.ts +0 -13
- package/script/utils/factory.d.ts.map +0 -1
- package/script/utils/factory.js +0 -108
- package/script/utils/method_metadata.d.ts +0 -10
- package/script/utils/method_metadata.d.ts.map +0 -1
- package/script/utils/method_metadata.js +0 -40
- package/script/utils/validation.d.ts +0 -6
- package/script/utils/validation.d.ts.map +0 -1
- package/script/utils/validation.js +0 -78
- /package/{LICENSE → LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fideus-labs/ngff-zarr",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "TypeScript implementation of ngff-zarr for reading and writing OME-Zarr files",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./esm/mod.js",
|
|
8
|
+
"types": "./esm/mod.d.ts",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/thewtex/ngff-zarr.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/thewtex/ngff-zarr/issues"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/thewtex/ngff-zarr#readme",
|
|
5
17
|
"keywords": [
|
|
6
18
|
"ome-zarr",
|
|
7
19
|
"zarr",
|
|
@@ -12,58 +24,49 @@
|
|
|
12
24
|
"deno"
|
|
13
25
|
],
|
|
14
26
|
"author": "ngff-zarr contributors",
|
|
15
|
-
"homepage": "https://github.com/thewtex/ngff-zarr#readme",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/thewtex/ngff-zarr.git"
|
|
19
|
-
},
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/thewtex/ngff-zarr/issues"
|
|
23
|
-
},
|
|
24
|
-
"main": "./esm/mod.js",
|
|
25
|
-
"module": "./esm/mod.js",
|
|
26
|
-
"types": "./esm/mod.d.ts",
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
29
|
"types": "./esm/mod.d.ts",
|
|
30
30
|
"browser": "./esm/browser-mod.js",
|
|
31
31
|
"node": "./esm/mod.js",
|
|
32
32
|
"import": "./esm/mod.js",
|
|
33
|
-
"require": "./script/mod.js",
|
|
34
33
|
"default": "./esm/mod.js"
|
|
35
34
|
},
|
|
36
35
|
"./browser": {
|
|
37
|
-
"types": "./
|
|
36
|
+
"types": "./esm/browser-mod.d.ts",
|
|
38
37
|
"import": "./esm/browser-mod.js",
|
|
39
|
-
"require": "./script/browser-mod.js",
|
|
40
38
|
"default": "./esm/browser-mod.js"
|
|
41
39
|
},
|
|
42
40
|
"./methods/itkwasm-browser": {
|
|
43
|
-
"types": "./
|
|
41
|
+
"types": "./esm/methods/itkwasm-browser.d.ts",
|
|
44
42
|
"import": "./esm/methods/itkwasm-browser.js",
|
|
45
|
-
"require": "./script/methods/itkwasm-browser.js",
|
|
46
43
|
"default": "./esm/methods/itkwasm-browser.js"
|
|
47
44
|
},
|
|
48
45
|
"./methods/itkwasm-node": {
|
|
49
|
-
"types": "./
|
|
46
|
+
"types": "./esm/methods/itkwasm-node.d.ts",
|
|
50
47
|
"import": "./esm/methods/itkwasm-node.js",
|
|
51
|
-
"require": "./script/methods/itkwasm-node.js",
|
|
52
48
|
"default": "./esm/methods/itkwasm-node.js"
|
|
49
|
+
},
|
|
50
|
+
"./process/to_multiscales-browser": {
|
|
51
|
+
"types": "./esm/process/to_multiscales-browser.d.ts",
|
|
52
|
+
"import": "./esm/process/to_multiscales-browser.js",
|
|
53
|
+
"default": "./esm/process/to_multiscales-browser.js"
|
|
54
|
+
},
|
|
55
|
+
"./process/to_multiscales-node": {
|
|
56
|
+
"types": "./esm/process/to_multiscales-node.d.ts",
|
|
57
|
+
"import": "./esm/process/to_multiscales-node.js",
|
|
58
|
+
"default": "./esm/process/to_multiscales-node.js"
|
|
53
59
|
}
|
|
54
60
|
},
|
|
55
61
|
"browser": {
|
|
56
62
|
"./esm/methods/itkwasm.js": "./esm/methods/itkwasm-browser.js",
|
|
57
|
-
"./script/methods/itkwasm.js": "./script/methods/itkwasm-browser.js",
|
|
58
63
|
"./esm/methods/itkwasm-node.js": "./esm/methods/itkwasm-browser.js",
|
|
59
|
-
"./
|
|
64
|
+
"./esm/process/to_multiscales-node.js": "./esm/process/to_multiscales-browser.js"
|
|
60
65
|
},
|
|
61
66
|
"files": [
|
|
62
67
|
"esm/",
|
|
63
|
-
"script/",
|
|
64
|
-
"types/",
|
|
65
68
|
"README.md",
|
|
66
|
-
"LICENSE"
|
|
69
|
+
"LICENSE.txt"
|
|
67
70
|
],
|
|
68
71
|
"dependencies": {
|
|
69
72
|
"@itk-wasm/downsample": "^1.8.1",
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
"zarrita": "^0.5.2"
|
|
75
78
|
},
|
|
76
79
|
"devDependencies": {
|
|
77
|
-
"@itk-wasm/image-io": "^1.6.0"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
"@itk-wasm/image-io": "^1.6.0",
|
|
81
|
+
"typescript": "^5.7.2"
|
|
82
|
+
}
|
|
80
83
|
}
|
package/esm/_dnt.shims.d.ts
DELETED
package/esm/_dnt.shims.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
|
package/esm/_dnt.shims.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const dntGlobals = {};
|
|
2
|
-
export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
3
|
-
function createMergeProxy(baseObj, extObj) {
|
|
4
|
-
return new Proxy(baseObj, {
|
|
5
|
-
get(_target, prop, _receiver) {
|
|
6
|
-
if (prop in extObj) {
|
|
7
|
-
return extObj[prop];
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
return baseObj[prop];
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
set(_target, prop, value) {
|
|
14
|
-
if (prop in extObj) {
|
|
15
|
-
delete extObj[prop];
|
|
16
|
-
}
|
|
17
|
-
baseObj[prop] = value;
|
|
18
|
-
return true;
|
|
19
|
-
},
|
|
20
|
-
deleteProperty(_target, prop) {
|
|
21
|
-
let success = false;
|
|
22
|
-
if (prop in extObj) {
|
|
23
|
-
delete extObj[prop];
|
|
24
|
-
success = true;
|
|
25
|
-
}
|
|
26
|
-
if (prop in baseObj) {
|
|
27
|
-
delete baseObj[prop];
|
|
28
|
-
success = true;
|
|
29
|
-
}
|
|
30
|
-
return success;
|
|
31
|
-
},
|
|
32
|
-
ownKeys(_target) {
|
|
33
|
-
const baseKeys = Reflect.ownKeys(baseObj);
|
|
34
|
-
const extKeys = Reflect.ownKeys(extObj);
|
|
35
|
-
const extKeysSet = new Set(extKeys);
|
|
36
|
-
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
37
|
-
},
|
|
38
|
-
defineProperty(_target, prop, desc) {
|
|
39
|
-
if (prop in extObj) {
|
|
40
|
-
delete extObj[prop];
|
|
41
|
-
}
|
|
42
|
-
Reflect.defineProperty(baseObj, prop, desc);
|
|
43
|
-
return true;
|
|
44
|
-
},
|
|
45
|
-
getOwnPropertyDescriptor(_target, prop) {
|
|
46
|
-
if (prop in extObj) {
|
|
47
|
-
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
has(_target, prop) {
|
|
54
|
-
return prop in extObj || prop in baseObj;
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NgffImage } from "../types/ngff_image.js";
|
|
2
|
-
import { Multiscales } from "../types/multiscales.js";
|
|
3
|
-
import { Methods } from "../types/methods.js";
|
|
4
|
-
export { toNgffImage, type ToNgffImageOptions } from "./to_ngff_image.js";
|
|
5
|
-
export interface ToMultiscalesOptions {
|
|
6
|
-
scaleFactors?: (Record<string, number> | number)[];
|
|
7
|
-
method?: Methods;
|
|
8
|
-
chunks?: number | number[] | Record<string, number>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Generate multiple resolution scales for an NgffImage (simplified version for testing)
|
|
12
|
-
*
|
|
13
|
-
* @param image - Input NgffImage
|
|
14
|
-
* @param options - Configuration options
|
|
15
|
-
* @returns Multiscales object
|
|
16
|
-
*/
|
|
17
|
-
export declare function toMultiscales(image: NgffImage, options?: ToMultiscalesOptions): Promise<Multiscales>;
|
|
18
|
-
//# sourceMappingURL=to_multiscales.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to_multiscales.d.ts","sourceRoot":"","sources":["../../src/io/to_multiscales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,WAAW,CAAC,CAqEtB"}
|
package/esm/package.json
DELETED
package/script/_dnt.shims.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
|
package/script/_dnt.shims.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dntGlobalThis = void 0;
|
|
4
|
-
const dntGlobals = {};
|
|
5
|
-
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
6
|
-
function createMergeProxy(baseObj, extObj) {
|
|
7
|
-
return new Proxy(baseObj, {
|
|
8
|
-
get(_target, prop, _receiver) {
|
|
9
|
-
if (prop in extObj) {
|
|
10
|
-
return extObj[prop];
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return baseObj[prop];
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
set(_target, prop, value) {
|
|
17
|
-
if (prop in extObj) {
|
|
18
|
-
delete extObj[prop];
|
|
19
|
-
}
|
|
20
|
-
baseObj[prop] = value;
|
|
21
|
-
return true;
|
|
22
|
-
},
|
|
23
|
-
deleteProperty(_target, prop) {
|
|
24
|
-
let success = false;
|
|
25
|
-
if (prop in extObj) {
|
|
26
|
-
delete extObj[prop];
|
|
27
|
-
success = true;
|
|
28
|
-
}
|
|
29
|
-
if (prop in baseObj) {
|
|
30
|
-
delete baseObj[prop];
|
|
31
|
-
success = true;
|
|
32
|
-
}
|
|
33
|
-
return success;
|
|
34
|
-
},
|
|
35
|
-
ownKeys(_target) {
|
|
36
|
-
const baseKeys = Reflect.ownKeys(baseObj);
|
|
37
|
-
const extKeys = Reflect.ownKeys(extObj);
|
|
38
|
-
const extKeysSet = new Set(extKeys);
|
|
39
|
-
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
40
|
-
},
|
|
41
|
-
defineProperty(_target, prop, desc) {
|
|
42
|
-
if (prop in extObj) {
|
|
43
|
-
delete extObj[prop];
|
|
44
|
-
}
|
|
45
|
-
Reflect.defineProperty(baseObj, prop, desc);
|
|
46
|
-
return true;
|
|
47
|
-
},
|
|
48
|
-
getOwnPropertyDescriptor(_target, prop) {
|
|
49
|
-
if (prop in extObj) {
|
|
50
|
-
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
has(_target, prop) {
|
|
57
|
-
return prop in extObj || prop in baseObj;
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}
|
package/script/browser-mod.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from "./types/units.js";
|
|
2
|
-
export * from "./types/methods.js";
|
|
3
|
-
export * from "./types/array_interface.js";
|
|
4
|
-
export * from "./types/zarr_metadata.js";
|
|
5
|
-
export * from "./types/ngff_image.js";
|
|
6
|
-
export * from "./types/multiscales.js";
|
|
7
|
-
export * from "./schemas/units.js";
|
|
8
|
-
export * from "./schemas/methods.js";
|
|
9
|
-
export * from "./schemas/zarr_metadata.js";
|
|
10
|
-
export * from "./schemas/ngff_image.js";
|
|
11
|
-
export * from "./schemas/multiscales.js";
|
|
12
|
-
export { isValidDimension, isValidUnit, validateMetadata, } from "./utils/validation.js";
|
|
13
|
-
export { createAxis, createDataset, createMetadata, createMultiscales, createNgffImage, } from "./utils/factory.js";
|
|
14
|
-
//# sourceMappingURL=browser-mod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-mod.d.ts","sourceRoot":"","sources":["../src/browser-mod.ts"],"names":[],"mappings":"AASA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
package/script/browser-mod.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createNgffImage = exports.createMultiscales = exports.createMetadata = exports.createDataset = exports.createAxis = exports.validateMetadata = exports.isValidUnit = exports.isValidDimension = void 0;
|
|
18
|
-
// SPDX-FileCopyrightText: Copyright (c) Fideus Labs LLC
|
|
19
|
-
// SPDX-License-Identifier: MIT
|
|
20
|
-
// Browser-compatible module exports
|
|
21
|
-
// This module excludes I/O functionality (from_ngff_zarr, to_ngff_zarr)
|
|
22
|
-
// because those modules depend on Node.js/Deno-specific filesystem APIs
|
|
23
|
-
// that are not available in browser environments.
|
|
24
|
-
//
|
|
25
|
-
// For browser use cases, the schemas, types, and validation utilities
|
|
26
|
-
// are the most commonly needed functionality.
|
|
27
|
-
__exportStar(require("./types/units.js"), exports);
|
|
28
|
-
__exportStar(require("./types/methods.js"), exports);
|
|
29
|
-
__exportStar(require("./types/array_interface.js"), exports);
|
|
30
|
-
__exportStar(require("./types/zarr_metadata.js"), exports);
|
|
31
|
-
__exportStar(require("./types/ngff_image.js"), exports);
|
|
32
|
-
__exportStar(require("./types/multiscales.js"), exports);
|
|
33
|
-
__exportStar(require("./schemas/units.js"), exports);
|
|
34
|
-
__exportStar(require("./schemas/methods.js"), exports);
|
|
35
|
-
__exportStar(require("./schemas/zarr_metadata.js"), exports);
|
|
36
|
-
__exportStar(require("./schemas/ngff_image.js"), exports);
|
|
37
|
-
__exportStar(require("./schemas/multiscales.js"), exports);
|
|
38
|
-
var validation_js_1 = require("./utils/validation.js");
|
|
39
|
-
Object.defineProperty(exports, "isValidDimension", { enumerable: true, get: function () { return validation_js_1.isValidDimension; } });
|
|
40
|
-
Object.defineProperty(exports, "isValidUnit", { enumerable: true, get: function () { return validation_js_1.isValidUnit; } });
|
|
41
|
-
Object.defineProperty(exports, "validateMetadata", { enumerable: true, get: function () { return validation_js_1.validateMetadata; } });
|
|
42
|
-
var factory_js_1 = require("./utils/factory.js");
|
|
43
|
-
Object.defineProperty(exports, "createAxis", { enumerable: true, get: function () { return factory_js_1.createAxis; } });
|
|
44
|
-
Object.defineProperty(exports, "createDataset", { enumerable: true, get: function () { return factory_js_1.createDataset; } });
|
|
45
|
-
Object.defineProperty(exports, "createMetadata", { enumerable: true, get: function () { return factory_js_1.createMetadata; } });
|
|
46
|
-
Object.defineProperty(exports, "createMultiscales", { enumerable: true, get: function () { return factory_js_1.createMultiscales; } });
|
|
47
|
-
Object.defineProperty(exports, "createNgffImage", { enumerable: true, get: function () { return factory_js_1.createNgffImage; } });
|
|
48
|
-
// Note: Excluding I/O modules for browser compatibility
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as zarr from "zarrita";
|
|
2
|
-
import { Multiscales } from "../types/multiscales.js";
|
|
3
|
-
export interface FromNgffZarrOptions {
|
|
4
|
-
validate?: boolean;
|
|
5
|
-
version?: "0.4" | "0.5";
|
|
6
|
-
}
|
|
7
|
-
export type MemoryStore = Map<string, Uint8Array>;
|
|
8
|
-
export declare function fromNgffZarr(store: string | MemoryStore | zarr.FetchStore, options?: FromNgffZarrOptions): Promise<Multiscales>;
|
|
9
|
-
export declare function readArrayData(storePath: string, arrayPath: string, selection?: (number | null)[]): Promise<unknown>;
|
|
10
|
-
//# sourceMappingURL=from_ngff_zarr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"from_ngff_zarr.d.ts","sourceRoot":"","sources":["../../src/io/from_ngff_zarr.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CACzB;AAED,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAElD,wBAAsB,YAAY,CAEhC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC,UAAU,EAC7C,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,WAAW,CAAC,CA6MtB;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAC5B,OAAO,CAAC,OAAO,CAAC,CAmClB"}
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.fromNgffZarr = fromNgffZarr;
|
|
27
|
-
exports.readArrayData = readArrayData;
|
|
28
|
-
// SPDX-FileCopyrightText: Copyright (c) Fideus Labs LLC
|
|
29
|
-
// SPDX-License-Identifier: MIT
|
|
30
|
-
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
31
|
-
const zarr = __importStar(require("zarrita"));
|
|
32
|
-
const multiscales_js_1 = require("../types/multiscales.js");
|
|
33
|
-
const ngff_image_js_1 = require("../types/ngff_image.js");
|
|
34
|
-
const zarr_metadata_js_1 = require("../schemas/zarr_metadata.js");
|
|
35
|
-
async function fromNgffZarr(
|
|
36
|
-
// Also accepts FileSystemStore, ZipFileStore objects in Node.js/Deno
|
|
37
|
-
store, options = {}) {
|
|
38
|
-
const validate = options.validate ?? false;
|
|
39
|
-
const version = options.version;
|
|
40
|
-
try {
|
|
41
|
-
// Determine the appropriate store type based on the path
|
|
42
|
-
let resolvedStore;
|
|
43
|
-
if (store instanceof Map || store instanceof zarr.FetchStore) {
|
|
44
|
-
resolvedStore = store;
|
|
45
|
-
}
|
|
46
|
-
else if (store.startsWith("http://") || store.startsWith("https://")) {
|
|
47
|
-
// Use FetchStore for HTTP/HTTPS URLs
|
|
48
|
-
resolvedStore = new zarr.FetchStore(store);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
// For local paths, check if we're in a browser environment
|
|
52
|
-
if (typeof dntShim.dntGlobalThis !== "undefined") {
|
|
53
|
-
throw new Error("Local file paths are not supported in browser environments. Use HTTP/HTTPS URLs instead.");
|
|
54
|
-
}
|
|
55
|
-
// Use dynamic import for FileSystemStore, ZipFileStore in Node.js/Deno environments
|
|
56
|
-
try {
|
|
57
|
-
const { FileSystemStore, ZipFileStore } = await Promise.resolve().then(() => __importStar(require("@zarrita/storage")));
|
|
58
|
-
// @ts-ignore: Node/Deno workaround
|
|
59
|
-
if (store instanceof FileSystemStore || store instanceof ZipFileStore) {
|
|
60
|
-
// @ts-ignore: Node/Deno workaround
|
|
61
|
-
resolvedStore = store;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
// Normalize the path for cross-platform compatibility
|
|
65
|
-
const normalizedPath = store.replace(/^\/([A-Za-z]:)/, "$1");
|
|
66
|
-
// @ts-ignore: Node/Deno workaround
|
|
67
|
-
resolvedStore = new FileSystemStore(normalizedPath);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
throw new Error(`Failed to load FileSystemStore: ${error}. Use HTTP/HTTPS URLs for browser compatibility.`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Try to use consolidated metadata for better performance
|
|
75
|
-
let optimizedStore;
|
|
76
|
-
try {
|
|
77
|
-
// @ts-ignore: tryWithConsolidated typing
|
|
78
|
-
optimizedStore = await zarr.tryWithConsolidated(resolvedStore);
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
optimizedStore = resolvedStore;
|
|
82
|
-
}
|
|
83
|
-
const root = await zarr.open(optimizedStore, {
|
|
84
|
-
kind: "group",
|
|
85
|
-
});
|
|
86
|
-
const attrs = root.attrs;
|
|
87
|
-
if (!attrs || !attrs.multiscales) {
|
|
88
|
-
throw new Error("No multiscales metadata found in Zarr store");
|
|
89
|
-
}
|
|
90
|
-
const multiscalesArray = attrs
|
|
91
|
-
.multiscales;
|
|
92
|
-
if (!Array.isArray(multiscalesArray) || multiscalesArray.length === 0) {
|
|
93
|
-
throw new Error("No multiscales metadata found in Zarr store");
|
|
94
|
-
}
|
|
95
|
-
const multiscalesMetadata = multiscalesArray[0];
|
|
96
|
-
if (validate) {
|
|
97
|
-
const result = zarr_metadata_js_1.MetadataSchema.safeParse(multiscalesMetadata);
|
|
98
|
-
if (!result.success) {
|
|
99
|
-
throw new Error(`Invalid OME-Zarr metadata: ${result.error.message}`);
|
|
100
|
-
}
|
|
101
|
-
// Check version compatibility if specified
|
|
102
|
-
if (version) {
|
|
103
|
-
const metadataWithVersion = multiscalesMetadata;
|
|
104
|
-
if (metadataWithVersion.version !== version) {
|
|
105
|
-
throw new Error(`Expected OME-Zarr version ${version}, but found ${metadataWithVersion.version || "unknown"}`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const metadata = multiscalesMetadata;
|
|
110
|
-
// Extract omero metadata from root attributes if present
|
|
111
|
-
if (attrs.omero) {
|
|
112
|
-
const omeroData = attrs.omero;
|
|
113
|
-
// Handle backward compatibility for OMERO window metadata
|
|
114
|
-
if (omeroData.channels && Array.isArray(omeroData.channels)) {
|
|
115
|
-
for (const channel of omeroData.channels) {
|
|
116
|
-
if (channel.window && typeof channel.window === "object") {
|
|
117
|
-
const window = channel.window;
|
|
118
|
-
// Ensure both min/max and start/end are present for compatibility
|
|
119
|
-
if (window.min !== undefined && window.max !== undefined) {
|
|
120
|
-
// If only min/max present, use them for start/end
|
|
121
|
-
if (window.start === undefined) {
|
|
122
|
-
window.start = window.min;
|
|
123
|
-
}
|
|
124
|
-
if (window.end === undefined) {
|
|
125
|
-
window.end = window.max;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else if (window.start !== undefined && window.end !== undefined) {
|
|
129
|
-
// If only start/end present, use them for min/max
|
|
130
|
-
if (window.min === undefined) {
|
|
131
|
-
window.min = window.start;
|
|
132
|
-
}
|
|
133
|
-
if (window.max === undefined) {
|
|
134
|
-
window.max = window.end;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
metadata.omero = omeroData;
|
|
141
|
-
}
|
|
142
|
-
const images = [];
|
|
143
|
-
for (const dataset of metadata.datasets) {
|
|
144
|
-
const arrayPath = dataset.path;
|
|
145
|
-
const zarrArray = (await zarr.open(root.resolve(arrayPath), {
|
|
146
|
-
kind: "array",
|
|
147
|
-
}));
|
|
148
|
-
// Verify we have an array with the expected properties
|
|
149
|
-
if (!zarrArray ||
|
|
150
|
-
!("shape" in zarrArray) ||
|
|
151
|
-
!("dtype" in zarrArray) ||
|
|
152
|
-
!("chunks" in zarrArray)) {
|
|
153
|
-
throw new Error(`Invalid zarr array at path ${arrayPath}: missing shape property`);
|
|
154
|
-
}
|
|
155
|
-
const scale = {};
|
|
156
|
-
const translation = {};
|
|
157
|
-
for (const transform of dataset.coordinateTransformations) {
|
|
158
|
-
if (transform.type === "scale") {
|
|
159
|
-
metadata.axes.forEach((axis, i) => {
|
|
160
|
-
if (i < transform.scale.length) {
|
|
161
|
-
scale[axis.name] = transform.scale[i];
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
else if (transform.type === "translation") {
|
|
166
|
-
metadata.axes.forEach((axis, i) => {
|
|
167
|
-
if (i < transform.translation.length) {
|
|
168
|
-
translation[axis.name] = transform.translation[i];
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
const dims = metadata.axes.map((axis) => axis.name);
|
|
174
|
-
const axesUnits = metadata.axes.reduce((acc, axis) => {
|
|
175
|
-
if (axis.unit) {
|
|
176
|
-
acc[axis.name] = axis.unit;
|
|
177
|
-
}
|
|
178
|
-
return acc;
|
|
179
|
-
}, {});
|
|
180
|
-
const ngffImage = new ngff_image_js_1.NgffImage({
|
|
181
|
-
data: zarrArray,
|
|
182
|
-
dims,
|
|
183
|
-
scale,
|
|
184
|
-
translation,
|
|
185
|
-
name: metadata.name,
|
|
186
|
-
axesUnits: Object.keys(axesUnits).length > 0 ? axesUnits : undefined,
|
|
187
|
-
computedCallbacks: undefined,
|
|
188
|
-
});
|
|
189
|
-
images.push(ngffImage);
|
|
190
|
-
}
|
|
191
|
-
return new multiscales_js_1.Multiscales({
|
|
192
|
-
images,
|
|
193
|
-
metadata,
|
|
194
|
-
scaleFactors: undefined,
|
|
195
|
-
method: undefined,
|
|
196
|
-
chunks: undefined,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
catch (error) {
|
|
200
|
-
throw new Error(`Failed to read OME-Zarr: ${error instanceof Error ? error.message : String(error)}`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
async function readArrayData(storePath, arrayPath, selection) {
|
|
204
|
-
try {
|
|
205
|
-
const store = new zarr.FetchStore(storePath);
|
|
206
|
-
const root = zarr.root(store);
|
|
207
|
-
// Try to open as zarr v2 first, then v3 if that fails
|
|
208
|
-
let zarrArray;
|
|
209
|
-
try {
|
|
210
|
-
zarrArray = await zarr.open.v2(root.resolve(arrayPath), {
|
|
211
|
-
kind: "array",
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
catch (v2Error) {
|
|
215
|
-
try {
|
|
216
|
-
zarrArray = await zarr.open.v3(root.resolve(arrayPath), {
|
|
217
|
-
kind: "array",
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
catch (v3Error) {
|
|
221
|
-
throw new Error(`Failed to open zarr array ${arrayPath} as either v2 or v3 format. v2 error: ${v2Error}. v3 error: ${v3Error}`);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
if (selection) {
|
|
225
|
-
return await zarr.get(zarrArray, selection);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
return await zarr.get(zarrArray);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
catch (error) {
|
|
232
|
-
throw new Error(`Failed to read array data: ${error instanceof Error ? error.message : String(error)}`);
|
|
233
|
-
}
|
|
234
|
-
}
|
package/script/io/hcs.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { HCSPlate } from "../types/hcs.js";
|
|
2
|
-
export interface FromHcsZarrOptions {
|
|
3
|
-
validate?: boolean;
|
|
4
|
-
wellCacheSize?: number;
|
|
5
|
-
imageCacheSize?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface ToHcsZarrOptions {
|
|
8
|
-
compressionLevel?: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Read an HCS plate from an OME-Zarr NGFF store.
|
|
12
|
-
*/
|
|
13
|
-
export declare function fromHcsZarr(store: string | object, options?: FromHcsZarrOptions): HCSPlate;
|
|
14
|
-
/**
|
|
15
|
-
* Write an HCS plate to an OME-Zarr NGFF store.
|
|
16
|
-
*/
|
|
17
|
-
export declare function toHcsZarr(plate: HCSPlate, store: string | object, _options?: ToHcsZarrOptions): void;
|
|
18
|
-
//# sourceMappingURL=hcs.d.ts.map
|
package/script/io/hcs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hcs.d.ts","sourceRoot":"","sources":["../../src/io/hcs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,iBAAiB,CAAC;AAG/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAE/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,GAAE,kBAAuB,GAC/B,QAAQ,CAkCV;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,GAAE,gBAAqB,GAC9B,IAAI,CAaN"}
|
package/script/io/hcs.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fromHcsZarr = fromHcsZarr;
|
|
4
|
-
exports.toHcsZarr = toHcsZarr;
|
|
5
|
-
const hcs_js_1 = require("../types/hcs.js");
|
|
6
|
-
/**
|
|
7
|
-
* Read an HCS plate from an OME-Zarr NGFF store.
|
|
8
|
-
*/
|
|
9
|
-
function fromHcsZarr(store, options = {}) {
|
|
10
|
-
const { validate = false, wellCacheSize, imageCacheSize } = options;
|
|
11
|
-
if (validate) {
|
|
12
|
-
console.warn("HCS validation not yet implemented");
|
|
13
|
-
}
|
|
14
|
-
if (typeof store !== "string") {
|
|
15
|
-
throw new Error("Non-string store types not yet supported");
|
|
16
|
-
}
|
|
17
|
-
// For now, create a mock implementation
|
|
18
|
-
// This will be properly implemented when the zarrita API integration is complete
|
|
19
|
-
const plateMetadata = {
|
|
20
|
-
columns: [{ name: "1" }, { name: "2" }],
|
|
21
|
-
rows: [{ name: "A" }, { name: "B" }],
|
|
22
|
-
wells: [
|
|
23
|
-
{ path: "A/1", rowIndex: 0, columnIndex: 0 },
|
|
24
|
-
{ path: "A/2", rowIndex: 0, columnIndex: 1 },
|
|
25
|
-
{ path: "B/1", rowIndex: 1, columnIndex: 0 },
|
|
26
|
-
{ path: "B/2", rowIndex: 1, columnIndex: 1 },
|
|
27
|
-
],
|
|
28
|
-
version: "0.4",
|
|
29
|
-
acquisitions: [{ id: 0, name: "Test Acquisition" }],
|
|
30
|
-
field_count: 2,
|
|
31
|
-
name: "Test Plate",
|
|
32
|
-
};
|
|
33
|
-
return new hcs_js_1.HCSPlate({
|
|
34
|
-
store,
|
|
35
|
-
metadata: plateMetadata,
|
|
36
|
-
wellCacheSize,
|
|
37
|
-
imageCacheSize,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Write an HCS plate to an OME-Zarr NGFF store.
|
|
42
|
-
*/
|
|
43
|
-
function toHcsZarr(plate, store, _options = {}) {
|
|
44
|
-
if (typeof store !== "string") {
|
|
45
|
-
throw new Error("Non-string store types not yet supported");
|
|
46
|
-
}
|
|
47
|
-
// Mock implementation for now
|
|
48
|
-
console.log(`HCS plate structure would be created at ${store}`);
|
|
49
|
-
console.log(`Plate: ${plate.name}`);
|
|
50
|
-
console.log(`Wells: ${plate.wells.length}`);
|
|
51
|
-
console.log(`Rows: ${plate.rows.length}, Columns: ${plate.columns.length}`);
|
|
52
|
-
if (plate.acquisitions) {
|
|
53
|
-
console.log(`Acquisitions: ${plate.acquisitions.length}`);
|
|
54
|
-
}
|
|
55
|
-
}
|