@fideus-labs/ngff-zarr 0.19.0 → 0.22.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/README.md +1 -1
- package/esm/io/from_ngff_zarr-browser.d.ts +1 -1
- package/esm/io/from_ngff_zarr-browser.d.ts.map +1 -1
- package/esm/io/from_ngff_zarr-browser.js +33 -0
- package/esm/io/from_ngff_zarr-browser.js.map +1 -1
- package/esm/io/from_ngff_zarr.d.ts +1 -1
- package/esm/io/from_ngff_zarr.d.ts.map +1 -1
- package/esm/io/from_ngff_zarr.js +14 -6
- package/esm/io/from_ngff_zarr.js.map +1 -1
- package/esm/io/to_ngff_zarr-browser.d.ts +1 -5
- package/esm/io/to_ngff_zarr-browser.d.ts.map +1 -1
- package/esm/io/to_ngff_zarr-browser.js +55 -34
- package/esm/io/to_ngff_zarr-browser.js.map +1 -1
- package/esm/io/to_ngff_zarr.d.ts +2 -5
- package/esm/io/to_ngff_zarr.d.ts.map +1 -1
- package/esm/io/to_ngff_zarr.js +58 -37
- package/esm/io/to_ngff_zarr.js.map +1 -1
- package/esm/io/to_ngff_zarr_ozx_common.d.ts +8 -9
- package/esm/io/to_ngff_zarr_ozx_common.d.ts.map +1 -1
- package/esm/io/to_ngff_zarr_ozx_common.js +22 -18
- package/esm/io/to_ngff_zarr_ozx_common.js.map +1 -1
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/esm/mod.js.map +1 -1
- package/esm/process/to_multiscales-shared.d.ts +9 -0
- package/esm/process/to_multiscales-shared.d.ts.map +1 -1
- package/esm/process/to_multiscales-shared.js +19 -3
- package/esm/process/to_multiscales-shared.js.map +1 -1
- package/esm/schemas/coordinate_systems.d.ts +2 -2
- package/esm/schemas/rfc4.d.ts +9 -9
- package/esm/schemas/rfc4.d.ts.map +1 -1
- package/esm/schemas/rfc4.js +6 -0
- package/esm/schemas/rfc4.js.map +1 -1
- package/esm/types/rfc4.d.ts +15 -5
- package/esm/types/rfc4.d.ts.map +1 -1
- package/esm/types/rfc4.js +37 -6
- package/esm/types/rfc4.js.map +1 -1
- package/esm/types/supported_versions.d.ts +23 -1
- package/esm/types/supported_versions.d.ts.map +1 -1
- package/esm/types/supported_versions.js +27 -1
- package/esm/types/supported_versions.js.map +1 -1
- package/esm/types/zarr_metadata.d.ts +93 -1
- package/esm/types/zarr_metadata.d.ts.map +1 -1
- package/esm/types/zarr_metadata.js +30 -0
- package/esm/types/zarr_metadata.js.map +1 -1
- package/esm/utils/from_zarr_attrs.d.ts +12 -0
- package/esm/utils/from_zarr_attrs.d.ts.map +1 -1
- package/esm/utils/from_zarr_attrs.js +239 -3
- package/esm/utils/from_zarr_attrs.js.map +1 -1
- package/esm/utils/parse_metadata.d.ts.map +1 -1
- package/esm/utils/parse_metadata.js +7 -1
- package/esm/utils/parse_metadata.js.map +1 -1
- package/esm/utils/rfc4_validation.d.ts.map +1 -1
- package/esm/utils/rfc4_validation.js +23 -1
- package/esm/utils/rfc4_validation.js.map +1 -1
- package/esm/utils/structural_validation.d.ts +46 -0
- package/esm/utils/structural_validation.d.ts.map +1 -1
- package/esm/utils/structural_validation.js +69 -0
- package/esm/utils/structural_validation.js.map +1 -1
- package/esm/utils/v06_metadata.d.ts +44 -0
- package/esm/utils/v06_metadata.d.ts.map +1 -0
- package/esm/utils/v06_metadata.js +293 -0
- package/esm/utils/v06_metadata.js.map +1 -0
- package/package.json +1 -1
package/esm/types/rfc4.js
CHANGED
|
@@ -50,6 +50,18 @@ export var AnatomicalOrientationValues;
|
|
|
50
50
|
AnatomicalOrientationValues["ProximalToDistal"] = "proximal-to-distal";
|
|
51
51
|
// Describes the directional orientation from the periphery of an anatomical structure or limb to the center of the body
|
|
52
52
|
AnatomicalOrientationValues["DistalToProximal"] = "distal-to-proximal";
|
|
53
|
+
// Describes the directional orientation from the outer surface (superficial) to the inner depth (deep) of a layered tissue such as skin, gut, or cortex
|
|
54
|
+
AnatomicalOrientationValues["SuperficialToDeep"] = "superficial-to-deep";
|
|
55
|
+
// Describes the directional orientation from the inner depth (deep) to the outer surface (superficial) of a layered tissue such as skin, gut, or cortex
|
|
56
|
+
AnatomicalOrientationValues["DeepToSuperficial"] = "deep-to-superficial";
|
|
57
|
+
// Describes the directional orientation from the apical surface (apical) to the basal surface (basal) of an epithelial layer or polarized cell structure
|
|
58
|
+
AnatomicalOrientationValues["ApicalToBasal"] = "apical-to-basal";
|
|
59
|
+
// Describes the directional orientation from the basal surface (basal) to the apical surface (apical) of an epithelial layer or polarized cell structure
|
|
60
|
+
AnatomicalOrientationValues["BasalToApical"] = "basal-to-apical";
|
|
61
|
+
// Describes the directional orientation from the tip (apex) to the broad base (base) of an organ such as the heart or lung
|
|
62
|
+
AnatomicalOrientationValues["ApexToBase"] = "apex-to-base";
|
|
63
|
+
// Describes the directional orientation from the broad base (base) to the tip (apex) of an organ such as the heart or lung
|
|
64
|
+
AnatomicalOrientationValues["BaseToApex"] = "base-to-apex";
|
|
53
65
|
})(AnatomicalOrientationValues || (AnatomicalOrientationValues = {}));
|
|
54
66
|
/**
|
|
55
67
|
* Create an anatomical orientation object.
|
|
@@ -86,6 +98,31 @@ export const RAS = {
|
|
|
86
98
|
y: createAnatomicalOrientation(AnatomicalOrientationValues.PosteriorToAnterior),
|
|
87
99
|
z: createAnatomicalOrientation(AnatomicalOrientationValues.InferiorToSuperior),
|
|
88
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Preset anatomical orientation coordinate systems, keyed by lowercased name.
|
|
103
|
+
*/
|
|
104
|
+
const ORIENTATION_PRESETS = {
|
|
105
|
+
lps: LPS,
|
|
106
|
+
ras: RAS,
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Resolve an anatomical orientation preset name to per-axis orientations.
|
|
110
|
+
*
|
|
111
|
+
* @param name - A preset coordinate-system name: "LPS" or "RAS" (case-insensitive)
|
|
112
|
+
* @returns A mapping of spatial axis name to AnatomicalOrientation
|
|
113
|
+
* @throws Error if the name is not a recognized preset
|
|
114
|
+
*/
|
|
115
|
+
export function orientationFromName(name) {
|
|
116
|
+
const preset = ORIENTATION_PRESETS[name.toLowerCase()];
|
|
117
|
+
if (preset === undefined) {
|
|
118
|
+
const supported = Object.keys(ORIENTATION_PRESETS)
|
|
119
|
+
.map((p) => p.toUpperCase())
|
|
120
|
+
.join(", ");
|
|
121
|
+
throw new Error(`Unknown anatomical orientation preset: "${name}". ` +
|
|
122
|
+
`Supported presets: ${supported}.`);
|
|
123
|
+
}
|
|
124
|
+
return { ...preset };
|
|
125
|
+
}
|
|
89
126
|
/**
|
|
90
127
|
* Convert ITK LPS coordinate system to anatomical orientation.
|
|
91
128
|
*
|
|
@@ -218,12 +255,6 @@ export function anatomicalOrientationToItkDirection(orientation) {
|
|
|
218
255
|
}
|
|
219
256
|
return undefined;
|
|
220
257
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Check if RFC 4 is enabled in the list of enabled RFCs.
|
|
223
|
-
*/
|
|
224
|
-
export function isRfc4Enabled(enabledRfcs) {
|
|
225
|
-
return enabledRfcs !== undefined && enabledRfcs.includes(4);
|
|
226
|
-
}
|
|
227
258
|
/**
|
|
228
259
|
* Add anatomical orientation to an axis object.
|
|
229
260
|
*
|
package/esm/types/rfc4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfc4.js","sourceRoot":"","sources":["../../src/types/rfc4.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,+BAA+B;AAC/B;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"rfc4.js","sourceRoot":"","sources":["../../src/types/rfc4.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,+BAA+B;AAC/B;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAiDX;AAjDD,WAAY,2BAA2B;IACrC,wHAAwH;IACxH,4DAA6B,CAAA;I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G,qBAAqB,CAAC,MAAM,EACxC,SAAS,EAAE,EACX,CAAC;QACD,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;QACpD,IAAI,WAAW,KAAK,GAAG,EAAE,CAAC;YACxB,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACtB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACnB,OAAO,GAAG,CAAC;QACb,CAAC;QACD,IAAI,WAAW,KAAK,GAAG,EAAE,CAAC;YACxB,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACtB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACpB,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC5C,QAAiC,EACjC,WAAkC;IAElC,OAAO;QACL,GAAG,QAAQ;QACX,WAAW,EAAE;YACX,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,KAAK,EAAE,WAAW,CAAC,KAAK;SACzB;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mCAAmC,CACjD,QAAiC;IAEjC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;IACxD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -7,8 +7,23 @@ export declare enum NgffVersion {
|
|
|
7
7
|
V03 = "0.3",
|
|
8
8
|
V04 = "0.4",
|
|
9
9
|
V05 = "0.5",
|
|
10
|
-
|
|
10
|
+
V06 = "0.6",
|
|
11
|
+
/**
|
|
12
|
+
* Draft development version of the OME-Zarr v0.6 (RFC-5) spec. Stores are
|
|
13
|
+
* tagged on disk with this string while the spec is still in development;
|
|
14
|
+
* see {@link V06_ONDISK_VERSION}. Temporary — tracks the upstream dev release.
|
|
15
|
+
*/
|
|
16
|
+
V06dev4 = "0.6.dev4",
|
|
17
|
+
LATEST = "0.6.dev4"
|
|
11
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* The on-disk `ome.version` string written for OME-Zarr v0.6. The v0.6 / RFC-5
|
|
21
|
+
* spec is still a draft, so stores are tagged with the development version
|
|
22
|
+
* `0.6.dev4` even though the library's public `version` option is `"0.6"`.
|
|
23
|
+
* This is a temporary shim that tracks the upstream spec's dev releases;
|
|
24
|
+
* mirrors the Python port writing `"0.6.dev4"` for a requested version `"0.6"`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const V06_ONDISK_VERSION: NgffVersion;
|
|
12
27
|
/**
|
|
13
28
|
* Supported NGFF specification versions
|
|
14
29
|
*/
|
|
@@ -17,4 +32,11 @@ export declare const SUPPORTED_VERSIONS: readonly NgffVersion[];
|
|
|
17
32
|
* Check if a version string is supported
|
|
18
33
|
*/
|
|
19
34
|
export declare function isSupportedVersion(version: string): version is NgffVersion;
|
|
35
|
+
/**
|
|
36
|
+
* Whether an `ome.version` string identifies an OME-Zarr v0.6 store, including
|
|
37
|
+
* draft development versions such as `0.6.dev4`. Mirrors the Python port's
|
|
38
|
+
* `version.startswith("0.6")` check so a store written by either implementation
|
|
39
|
+
* reads back as v0.6.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isV06Version(version: string): boolean;
|
|
20
42
|
//# sourceMappingURL=supported_versions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported_versions.d.ts","sourceRoot":"","sources":["../../src/types/supported_versions.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,
|
|
1
|
+
{"version":3,"file":"supported_versions.d.ts","sourceRoot":"","sources":["../../src/types/supported_versions.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX;;;;OAIG;IACH,OAAO,aAAa;IACpB,MAAM,aAAa;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAiC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,WAAW,EAQ3C,CAAC;AAEX;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,WAAW,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -10,8 +10,23 @@ export var NgffVersion;
|
|
|
10
10
|
NgffVersion["V03"] = "0.3";
|
|
11
11
|
NgffVersion["V04"] = "0.4";
|
|
12
12
|
NgffVersion["V05"] = "0.5";
|
|
13
|
-
NgffVersion["
|
|
13
|
+
NgffVersion["V06"] = "0.6";
|
|
14
|
+
/**
|
|
15
|
+
* Draft development version of the OME-Zarr v0.6 (RFC-5) spec. Stores are
|
|
16
|
+
* tagged on disk with this string while the spec is still in development;
|
|
17
|
+
* see {@link V06_ONDISK_VERSION}. Temporary — tracks the upstream dev release.
|
|
18
|
+
*/
|
|
19
|
+
NgffVersion["V06dev4"] = "0.6.dev4";
|
|
20
|
+
NgffVersion["LATEST"] = "0.6.dev4";
|
|
14
21
|
})(NgffVersion || (NgffVersion = {}));
|
|
22
|
+
/**
|
|
23
|
+
* The on-disk `ome.version` string written for OME-Zarr v0.6. The v0.6 / RFC-5
|
|
24
|
+
* spec is still a draft, so stores are tagged with the development version
|
|
25
|
+
* `0.6.dev4` even though the library's public `version` option is `"0.6"`.
|
|
26
|
+
* This is a temporary shim that tracks the upstream spec's dev releases;
|
|
27
|
+
* mirrors the Python port writing `"0.6.dev4"` for a requested version `"0.6"`.
|
|
28
|
+
*/
|
|
29
|
+
export const V06_ONDISK_VERSION = NgffVersion.V06dev4;
|
|
15
30
|
/**
|
|
16
31
|
* Supported NGFF specification versions
|
|
17
32
|
*/
|
|
@@ -21,6 +36,8 @@ export const SUPPORTED_VERSIONS = [
|
|
|
21
36
|
NgffVersion.V03,
|
|
22
37
|
NgffVersion.V04,
|
|
23
38
|
NgffVersion.V05,
|
|
39
|
+
NgffVersion.V06,
|
|
40
|
+
NgffVersion.V06dev4,
|
|
24
41
|
];
|
|
25
42
|
/**
|
|
26
43
|
* Check if a version string is supported
|
|
@@ -28,4 +45,13 @@ export const SUPPORTED_VERSIONS = [
|
|
|
28
45
|
export function isSupportedVersion(version) {
|
|
29
46
|
return Object.values(NgffVersion).includes(version);
|
|
30
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Whether an `ome.version` string identifies an OME-Zarr v0.6 store, including
|
|
50
|
+
* draft development versions such as `0.6.dev4`. Mirrors the Python port's
|
|
51
|
+
* `version.startswith("0.6")` check so a store written by either implementation
|
|
52
|
+
* reads back as v0.6.
|
|
53
|
+
*/
|
|
54
|
+
export function isV06Version(version) {
|
|
55
|
+
return version.startsWith("0.6");
|
|
56
|
+
}
|
|
31
57
|
//# sourceMappingURL=supported_versions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported_versions.js","sourceRoot":"","sources":["../../src/types/supported_versions.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,+BAA+B;AAE/B;;GAEG;AAEH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"supported_versions.js","sourceRoot":"","sources":["../../src/types/supported_versions.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,+BAA+B;AAE/B;;GAEG;AAEH,MAAM,CAAN,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX;;;;OAIG;IACH,mCAAoB,CAAA;IACpB,kCAAmB,CAAA;AACrB,CAAC,EAdW,WAAW,KAAX,WAAW,QActB;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAgB,WAAW,CAAC,OAAO,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,GAAG;IACf,WAAW,CAAC,OAAO;CACX,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,OAAsB,CAAC,CAAC;AACrE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -2,6 +2,12 @@ import type { AxesType, SupportedDims, Units } from "./units.js";
|
|
|
2
2
|
import { NgffVersion } from "./supported_versions.js";
|
|
3
3
|
import type { NgffImage } from "./ngff_image.js";
|
|
4
4
|
import type { AnatomicalOrientation } from "./rfc4.js";
|
|
5
|
+
/**
|
|
6
|
+
* Name of the implicit coordinate system generated for a multiscale image,
|
|
7
|
+
* matching the Python port. Datasets map their array index space into this
|
|
8
|
+
* system via a scale + translation sequence.
|
|
9
|
+
*/
|
|
10
|
+
export declare const INTRINSIC_COORDINATE_SYSTEM_NAME = "intrinsic";
|
|
5
11
|
/**
|
|
6
12
|
* Orientation metadata for spatial axes (RFC 4).
|
|
7
13
|
* This interface represents the serialized form in the zarr metadata.
|
|
@@ -16,18 +22,81 @@ export interface Axis {
|
|
|
16
22
|
unit: Units | undefined;
|
|
17
23
|
orientation?: AxisOrientation | AnatomicalOrientation | undefined;
|
|
18
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* RFC 5 / OME-Zarr v0.6 coordinate-system reference used by the `input` and
|
|
27
|
+
* `output` fields of a transformation. Mirrors the Python
|
|
28
|
+
* `CoordinateSystemIdentifier` dataclass and the spec `inputOutput` object: a
|
|
29
|
+
* transformation references either a coordinate system by `name` or a dataset
|
|
30
|
+
* array by `path`.
|
|
31
|
+
*/
|
|
32
|
+
export interface CoordinateSystemIdentifier {
|
|
33
|
+
path?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* RFC 5 / OME-Zarr v0.6 coordinate system: a named set of axes. The implicit
|
|
38
|
+
* "intrinsic" coordinate system is generated for the multiscale image.
|
|
39
|
+
*/
|
|
40
|
+
export interface CoordinateSystem {
|
|
41
|
+
name: string;
|
|
42
|
+
axes: Axis[];
|
|
43
|
+
}
|
|
19
44
|
export interface Identity {
|
|
20
45
|
type: "identity";
|
|
46
|
+
input?: CoordinateSystemIdentifier;
|
|
47
|
+
output?: CoordinateSystemIdentifier;
|
|
48
|
+
name?: string;
|
|
21
49
|
}
|
|
22
50
|
export interface Scale {
|
|
23
51
|
scale: number[];
|
|
24
52
|
type: "scale";
|
|
53
|
+
input?: CoordinateSystemIdentifier;
|
|
54
|
+
output?: CoordinateSystemIdentifier;
|
|
55
|
+
name?: string;
|
|
25
56
|
}
|
|
26
57
|
export interface Translation {
|
|
27
58
|
translation: number[];
|
|
28
59
|
type: "translation";
|
|
60
|
+
input?: CoordinateSystemIdentifier;
|
|
61
|
+
output?: CoordinateSystemIdentifier;
|
|
62
|
+
name?: string;
|
|
63
|
+
}
|
|
64
|
+
/** RFC 5 rotation transformation (v0.6). */
|
|
65
|
+
export interface Rotation {
|
|
66
|
+
rotation: number[][];
|
|
67
|
+
type: "rotation";
|
|
68
|
+
path?: string;
|
|
69
|
+
input?: CoordinateSystemIdentifier;
|
|
70
|
+
output?: CoordinateSystemIdentifier;
|
|
71
|
+
name?: string;
|
|
72
|
+
}
|
|
73
|
+
/** RFC 5 affine transformation (v0.6). */
|
|
74
|
+
export interface Affine {
|
|
75
|
+
affine: number[][];
|
|
76
|
+
type: "affine";
|
|
77
|
+
path?: string;
|
|
78
|
+
input?: CoordinateSystemIdentifier;
|
|
79
|
+
output?: CoordinateSystemIdentifier;
|
|
80
|
+
name?: string;
|
|
81
|
+
}
|
|
82
|
+
/** RFC 5 sequence transformation, chaining sub-transformations (v0.6). */
|
|
83
|
+
export interface TransformSequence {
|
|
84
|
+
transformations: V06Transform[];
|
|
85
|
+
type: "sequence";
|
|
86
|
+
input?: CoordinateSystemIdentifier;
|
|
87
|
+
output?: CoordinateSystemIdentifier;
|
|
88
|
+
name?: string;
|
|
29
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Simple per-dataset transform used by the v0.4/v0.5 in-memory model and as the
|
|
92
|
+
* extracted scale/translation of a v0.6 dataset.
|
|
93
|
+
*/
|
|
30
94
|
export type Transform = Scale | Translation;
|
|
95
|
+
/**
|
|
96
|
+
* Full RFC 5 / v0.6 transformation union. Used for top-level multiscale
|
|
97
|
+
* `coordinateTransformations` and the per-dataset `sequence` on the wire.
|
|
98
|
+
*/
|
|
99
|
+
export type V06Transform = Identity | Scale | Translation | Rotation | Affine | TransformSequence;
|
|
31
100
|
export interface Dataset {
|
|
32
101
|
path: string;
|
|
33
102
|
coordinateTransformations: Transform[];
|
|
@@ -59,12 +128,31 @@ export interface MethodMetadata {
|
|
|
59
128
|
export interface MetadataInterface {
|
|
60
129
|
axes: Axis[];
|
|
61
130
|
datasets: Dataset[];
|
|
62
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Top-level multiscale transformations. For v0.4/v0.5 these are simple
|
|
133
|
+
* {@link Transform}s; for RFC 5 / v0.6 they may be any {@link V06Transform}
|
|
134
|
+
* (rotation, affine, sequence, ...) referencing coordinate systems.
|
|
135
|
+
*/
|
|
136
|
+
coordinateTransformations: V06Transform[] | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* RFC 5 / OME-Zarr v0.6 coordinate systems. Populated when reading a v0.6
|
|
139
|
+
* store and by `toMultiscales` (the implicit "intrinsic" system). Unused when
|
|
140
|
+
* serializing v0.4/v0.5, where axes live on the multiscale entry directly.
|
|
141
|
+
*/
|
|
142
|
+
coordinateSystems?: CoordinateSystem[];
|
|
63
143
|
omero: Omero | undefined;
|
|
64
144
|
name: string;
|
|
65
145
|
version: string;
|
|
66
146
|
type?: string;
|
|
67
147
|
metadata?: MethodMetadata;
|
|
148
|
+
/**
|
|
149
|
+
* Unrecognized keys that leaked into the `multiscales[]` entry (a malformed
|
|
150
|
+
* or double-namespaced v0.5 document). Captured verbatim so the v0.5
|
|
151
|
+
* namespacing rules (`zarr-format`, `ome-namespace`) can flag them; mirrors
|
|
152
|
+
* the Rust port's `#[serde(flatten)]` `extra` passthrough. It is a read-side
|
|
153
|
+
* validation aid only and is never serialized back to the store.
|
|
154
|
+
*/
|
|
155
|
+
extra?: Record<string, unknown>;
|
|
68
156
|
}
|
|
69
157
|
/**
|
|
70
158
|
* Result from parsing zarr attributes
|
|
@@ -97,4 +185,8 @@ export declare function validateColor(color: string): void;
|
|
|
97
185
|
export declare function createScale(scale: number[]): Scale;
|
|
98
186
|
export declare function createTranslation(translation: number[]): Translation;
|
|
99
187
|
export declare function createIdentity(): Identity;
|
|
188
|
+
export declare function createRotation(rotation: number[][]): Rotation;
|
|
189
|
+
export declare function createAffine(affine: number[][]): Affine;
|
|
190
|
+
export declare function createTransformSequence(transformations: V06Transform[]): TransformSequence;
|
|
191
|
+
export declare function createCoordinateSystem(name: string, axes: Axis[]): CoordinateSystem;
|
|
100
192
|
//# sourceMappingURL=zarr_metadata.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zarr_metadata.d.ts","sourceRoot":"","sources":["../../src/types/zarr_metadata.ts"],"names":[],"mappings":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EpE;AAED,wBAAgB,cAAc,IAAI,QAAQ,CAEzC;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,QAAQ,CAE7D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAEvD;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,YAAY,EAAE,GAC9B,iBAAiB,CAEnB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,EAAE,GACX,gBAAgB,CAElB"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { NgffVersion } from "./supported_versions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Name of the implicit coordinate system generated for a multiscale image,
|
|
4
|
+
* matching the Python port. Datasets map their array index space into this
|
|
5
|
+
* system via a scale + translation sequence.
|
|
6
|
+
*/
|
|
7
|
+
export const INTRINSIC_COORDINATE_SYSTEM_NAME = "intrinsic";
|
|
2
8
|
/**
|
|
3
9
|
* Supported dimension names for backward compatibility
|
|
4
10
|
*/
|
|
@@ -28,6 +34,18 @@ export function createMetadataWithVersion(metadata, targetVersion) {
|
|
|
28
34
|
version: "0.5",
|
|
29
35
|
};
|
|
30
36
|
}
|
|
37
|
+
else if (version === NgffVersion.V06) {
|
|
38
|
+
// The in-memory model is version-agnostic (axes + per-dataset scale and
|
|
39
|
+
// translation); v0.6 additionally exposes coordinate systems. Synthesize
|
|
40
|
+
// the implicit "intrinsic" system from the axes when one is not present, so
|
|
41
|
+
// a value converted to v0.6 carries the field the writer expects.
|
|
42
|
+
return {
|
|
43
|
+
...metadata,
|
|
44
|
+
version: "0.6",
|
|
45
|
+
coordinateSystems: metadata.coordinateSystems ??
|
|
46
|
+
[{ name: INTRINSIC_COORDINATE_SYSTEM_NAME, axes: metadata.axes }],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
31
49
|
else {
|
|
32
50
|
throw new Error(`Unsupported version conversion: ${metadata.version} -> ${version}`);
|
|
33
51
|
}
|
|
@@ -52,4 +70,16 @@ export function createTranslation(translation) {
|
|
|
52
70
|
export function createIdentity() {
|
|
53
71
|
return { type: "identity" };
|
|
54
72
|
}
|
|
73
|
+
export function createRotation(rotation) {
|
|
74
|
+
return { rotation: rotation.map((row) => [...row]), type: "rotation" };
|
|
75
|
+
}
|
|
76
|
+
export function createAffine(affine) {
|
|
77
|
+
return { affine: affine.map((row) => [...row]), type: "affine" };
|
|
78
|
+
}
|
|
79
|
+
export function createTransformSequence(transformations) {
|
|
80
|
+
return { transformations: [...transformations], type: "sequence" };
|
|
81
|
+
}
|
|
82
|
+
export function createCoordinateSystem(name, axes) {
|
|
83
|
+
return { name, axes: [...axes] };
|
|
84
|
+
}
|
|
55
85
|
//# sourceMappingURL=zarr_metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zarr_metadata.js","sourceRoot":"","sources":["../../src/types/zarr_metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"zarr_metadata.js","sourceRoot":"","sources":["../../src/types/zarr_metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,WAAW,CAAC;AA+L5D;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA6B;IACtD,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;CACK,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAA2B,EAC3B,aAAmC;IAEnC,MAAM,OAAO,GAAG,OAAO,aAAa,KAAK,QAAQ;QAC/C,CAAC,CAAE,aAA6B;QAChC,CAAC,CAAC,aAAa,CAAC;IAElB,IAAI,OAAO,KAAK,WAAW,CAAC,GAAG,EAAE,CAAC;QAChC,OAA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C,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,QAAoB;IACjD,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAkB;IAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,eAA+B;IAE/B,OAAO,EAAE,eAAe,EAAE,CAAC,GAAG,eAAe,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,IAAY;IAEZ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -18,4 +18,16 @@ export declare function fromZarrAttrsV04(rootAttrs: Record<string, unknown>, sto
|
|
|
18
18
|
* is at the root level (as written by toNgffZarr).
|
|
19
19
|
*/
|
|
20
20
|
export declare function fromZarrAttrsV05(rootAttrs: Record<string, unknown>, store: MemoryStore | zarr.FetchStore | zarr.Readable, validate?: boolean): Promise<FromZarrAttrsResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Parse Metadata and NgffImages from OME-Zarr v0.6 (RFC 5) root attributes.
|
|
23
|
+
*
|
|
24
|
+
* Unlike v0.4/v0.5, a v0.6 multiscale entry carries `coordinateSystems` instead
|
|
25
|
+
* of a top-level `axes` list, and maps each dataset's array index space into the
|
|
26
|
+
* implicit "intrinsic" system through a `sequence` of scale + translation. This
|
|
27
|
+
* reader recovers the version-agnostic in-memory model (axes + per-dataset scale
|
|
28
|
+
* and translation) while preserving the coordinate systems and any top-level
|
|
29
|
+
* transformations for round-tripping. Mirrors the Python
|
|
30
|
+
* `v06.zarr_metadata.Metadata._from_zarr_attrs`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function fromZarrAttrsV06(rootAttrs: Record<string, unknown>, store: MemoryStore | zarr.FetchStore | zarr.Readable, validate?: boolean): Promise<FromZarrAttrsResult>;
|
|
21
33
|
//# sourceMappingURL=from_zarr_attrs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"from_zarr_attrs.d.ts","sourceRoot":"","sources":["../../src/utils/from_zarr_attrs.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"from_zarr_attrs.d.ts","sourceRoot":"","sources":["../../src/utils/from_zarr_attrs.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAIV,mBAAmB,EAOpB,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA4H3D;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EACpD,QAAQ,UAAQ,GACf,OAAO,CAAC,mBAAmB,CAAC,CAkU9B;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EACpD,QAAQ,UAAQ,GACf,OAAO,CAAC,mBAAmB,CAAC,CAuC9B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EACpD,QAAQ,UAAQ,GACf,OAAO,CAAC,mBAAmB,CAAC,CAmO9B"}
|