@fideus-labs/ngff-zarr 0.2.4 → 0.2.6
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.js +1 -0
- 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 +23 -7
- 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 +35 -26
- 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.d.ts +14 -0
- package/esm/methods/itkwasm.d.ts.map +1 -0
- package/esm/methods/itkwasm.js +18 -0
- package/esm/methods/itkwasm.js.map +1 -0
- package/esm/mod.js +1 -0
- package/esm/mod.js.map +1 -0
- package/esm/process/to_multiscales-browser.js +1 -0
- package/esm/process/to_multiscales-browser.js.map +1 -0
- package/esm/process/to_multiscales-node.js +1 -0
- package/esm/process/to_multiscales-node.js.map +1 -0
- package/esm/process/to_multiscales-shared.js +1 -0
- 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 +23 -34
- 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/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 -16
- package/script/browser-mod.d.ts.map +0 -1
- package/script/browser-mod.js +0 -51
- 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_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/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/process/to_multiscales-browser.d.ts +0 -17
- package/script/process/to_multiscales-browser.d.ts.map +0 -1
- package/script/process/to_multiscales-browser.js +0 -17
- package/script/process/to_multiscales-node.d.ts +0 -18
- package/script/process/to_multiscales-node.d.ts.map +0 -1
- package/script/process/to_multiscales-node.js +0 -21
- package/script/process/to_multiscales-shared.d.ts +0 -28
- package/script/process/to_multiscales-shared.d.ts.map +0 -1
- package/script/process/to_multiscales-shared.js +0 -66
- 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
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// SPDX-FileCopyrightText: Copyright (c) Fideus Labs LLC
|
|
3
|
-
// SPDX-License-Identifier: MIT
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.toNgffImage = void 0;
|
|
6
|
-
exports.toMultiscales = toMultiscales;
|
|
7
|
-
const itkwasm_node_js_1 = require("../methods/itkwasm-node.js");
|
|
8
|
-
const to_multiscales_shared_js_1 = require("./to_multiscales-shared.js");
|
|
9
|
-
// Re-export types and utilities for convenience
|
|
10
|
-
var to_ngff_image_js_1 = require("../io/to_ngff_image.js");
|
|
11
|
-
Object.defineProperty(exports, "toNgffImage", { enumerable: true, get: function () { return to_ngff_image_js_1.toNgffImage; } });
|
|
12
|
-
/**
|
|
13
|
-
* Generate multiple resolution scales for an NgffImage (Node version)
|
|
14
|
-
*
|
|
15
|
-
* @param image - Input NgffImage
|
|
16
|
-
* @param options - Configuration options
|
|
17
|
-
* @returns Multiscales object
|
|
18
|
-
*/
|
|
19
|
-
async function toMultiscales(image, options = {}) {
|
|
20
|
-
return await (0, to_multiscales_shared_js_1.toMultiscalesCore)(image, options, itkwasm_node_js_1.downsampleItkWasm);
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities for to_multiscales implementations
|
|
3
|
-
* This module contains types and helper functions used by both
|
|
4
|
-
* browser and Node versions of toMultiscales.
|
|
5
|
-
*/
|
|
6
|
-
import { NgffImage } from "../types/ngff_image.js";
|
|
7
|
-
import { Multiscales } from "../types/multiscales.js";
|
|
8
|
-
import { Methods } from "../types/methods.js";
|
|
9
|
-
export interface ToMultiscalesOptions {
|
|
10
|
-
scaleFactors?: (Record<string, number> | number)[];
|
|
11
|
-
method?: Methods;
|
|
12
|
-
chunks?: number | number[] | Record<string, number>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Downsampling function type for ITK-Wasm implementations
|
|
16
|
-
*/
|
|
17
|
-
export type DownsampleFunction = (image: NgffImage, scaleFactors: (Record<string, number> | number)[], smoothing: "gaussian" | "bin_shrink" | "label_image") => Promise<NgffImage[]>;
|
|
18
|
-
/**
|
|
19
|
-
* Generate multiple resolution scales for an NgffImage
|
|
20
|
-
* This is the core implementation used by both browser and Node versions.
|
|
21
|
-
*
|
|
22
|
-
* @param image - Input NgffImage
|
|
23
|
-
* @param options - Configuration options
|
|
24
|
-
* @param downsampleItkWasm - The platform-specific downsampling function
|
|
25
|
-
* @returns Multiscales object
|
|
26
|
-
*/
|
|
27
|
-
export declare function toMultiscalesCore(image: NgffImage, options: ToMultiscalesOptions, downsampleItkWasm: DownsampleFunction): Promise<Multiscales>;
|
|
28
|
-
//# sourceMappingURL=to_multiscales-shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"to_multiscales-shared.d.ts","sourceRoot":"","sources":["../../src/process/to_multiscales-shared.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,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;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,EACjD,SAAS,EAAE,UAAU,GAAG,YAAY,GAAG,aAAa,KACjD,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;AAE1B;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,oBAAoB,EAC7B,iBAAiB,EAAE,kBAAkB,GACpC,OAAO,CAAC,WAAW,CAAC,CAqEtB"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// SPDX-FileCopyrightText: Copyright (c) Fideus Labs LLC
|
|
3
|
-
// SPDX-License-Identifier: MIT
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.toMultiscalesCore = toMultiscalesCore;
|
|
6
|
-
const methods_js_1 = require("../types/methods.js");
|
|
7
|
-
const factory_js_1 = require("../utils/factory.js");
|
|
8
|
-
const method_metadata_js_1 = require("../utils/method_metadata.js");
|
|
9
|
-
/**
|
|
10
|
-
* Generate multiple resolution scales for an NgffImage
|
|
11
|
-
* This is the core implementation used by both browser and Node versions.
|
|
12
|
-
*
|
|
13
|
-
* @param image - Input NgffImage
|
|
14
|
-
* @param options - Configuration options
|
|
15
|
-
* @param downsampleItkWasm - The platform-specific downsampling function
|
|
16
|
-
* @returns Multiscales object
|
|
17
|
-
*/
|
|
18
|
-
async function toMultiscalesCore(image, options, downsampleItkWasm) {
|
|
19
|
-
const { scaleFactors = [2, 4], method = methods_js_1.Methods.ITKWASM_GAUSSIAN, chunks: _chunks, } = options;
|
|
20
|
-
let images;
|
|
21
|
-
// Check if we should perform actual downsampling
|
|
22
|
-
if (method === methods_js_1.Methods.ITKWASM_GAUSSIAN ||
|
|
23
|
-
method === methods_js_1.Methods.ITKWASM_BIN_SHRINK ||
|
|
24
|
-
method === methods_js_1.Methods.ITKWASM_LABEL_IMAGE) {
|
|
25
|
-
// Perform actual downsampling using ITK-Wasm
|
|
26
|
-
const smoothing = method === methods_js_1.Methods.ITKWASM_GAUSSIAN
|
|
27
|
-
? "gaussian"
|
|
28
|
-
: method === methods_js_1.Methods.ITKWASM_BIN_SHRINK
|
|
29
|
-
? "bin_shrink"
|
|
30
|
-
: "label_image";
|
|
31
|
-
images = await downsampleItkWasm(image, scaleFactors, smoothing);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// Fallback: create only the base image (no actual downsampling)
|
|
35
|
-
images = [image];
|
|
36
|
-
}
|
|
37
|
-
// Create axes from image dimensions
|
|
38
|
-
const axes = image.dims.map((dim) => {
|
|
39
|
-
if (dim === "x" || dim === "y" || dim === "z") {
|
|
40
|
-
return (0, factory_js_1.createAxis)(dim, "space", image.axesUnits?.[dim]);
|
|
41
|
-
}
|
|
42
|
-
else if (dim === "c") {
|
|
43
|
-
return (0, factory_js_1.createAxis)(dim, "channel");
|
|
44
|
-
}
|
|
45
|
-
else if (dim === "t") {
|
|
46
|
-
return (0, factory_js_1.createAxis)(dim, "time");
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
throw new Error(`Unsupported dimension: ${dim}`);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
// Create datasets for all images
|
|
53
|
-
const datasets = images.map((img, index) => {
|
|
54
|
-
return (0, factory_js_1.createDataset)(`scale${index}`, img.dims.map((dim) => img.scale[dim]), img.dims.map((dim) => img.translation[dim]));
|
|
55
|
-
});
|
|
56
|
-
// Create metadata with method information
|
|
57
|
-
const methodMetadata = (0, method_metadata_js_1.getMethodMetadata)(method);
|
|
58
|
-
const metadata = (0, factory_js_1.createMetadata)(axes, datasets, image.name);
|
|
59
|
-
// The 'type' field, part of the OME-Zarr specification, in metadata is used here to
|
|
60
|
-
// record the downsampling method applied to generate multiscale images for provenance.
|
|
61
|
-
metadata.type = method;
|
|
62
|
-
if (methodMetadata) {
|
|
63
|
-
metadata.metadata = methodMetadata;
|
|
64
|
-
}
|
|
65
|
-
return (0, factory_js_1.createMultiscales)(images, metadata, scaleFactors, method);
|
|
66
|
-
}
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const CoordinateSystemSchema: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
axes: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
-
name: z.ZodLiteral<"c">;
|
|
6
|
-
type: z.ZodLiteral<"channel">;
|
|
7
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
-
name: z.ZodEnum<{
|
|
9
|
-
x: "x";
|
|
10
|
-
y: "y";
|
|
11
|
-
z: "z";
|
|
12
|
-
}>;
|
|
13
|
-
type: z.ZodLiteral<"space">;
|
|
14
|
-
unit: z.ZodEnum<{
|
|
15
|
-
angstrom: "angstrom";
|
|
16
|
-
attometer: "attometer";
|
|
17
|
-
centimeter: "centimeter";
|
|
18
|
-
decimeter: "decimeter";
|
|
19
|
-
exameter: "exameter";
|
|
20
|
-
femtometer: "femtometer";
|
|
21
|
-
foot: "foot";
|
|
22
|
-
gigameter: "gigameter";
|
|
23
|
-
hectometer: "hectometer";
|
|
24
|
-
inch: "inch";
|
|
25
|
-
kilometer: "kilometer";
|
|
26
|
-
megameter: "megameter";
|
|
27
|
-
meter: "meter";
|
|
28
|
-
micrometer: "micrometer";
|
|
29
|
-
mile: "mile";
|
|
30
|
-
millimeter: "millimeter";
|
|
31
|
-
nanometer: "nanometer";
|
|
32
|
-
parsec: "parsec";
|
|
33
|
-
petameter: "petameter";
|
|
34
|
-
picometer: "picometer";
|
|
35
|
-
terameter: "terameter";
|
|
36
|
-
yard: "yard";
|
|
37
|
-
yoctometer: "yoctometer";
|
|
38
|
-
yottameter: "yottameter";
|
|
39
|
-
zeptometer: "zeptometer";
|
|
40
|
-
zettameter: "zettameter";
|
|
41
|
-
}>;
|
|
42
|
-
orientation: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<{
|
|
43
|
-
type: "anatomical";
|
|
44
|
-
value: "left-to-right" | "right-to-left" | "anterior-to-posterior" | "posterior-to-anterior" | "inferior-to-superior" | "superior-to-inferior" | "dorsal-to-ventral" | "ventral-to-dorsal" | "dorsal-to-palmar" | "palmar-to-dorsal" | "dorsal-to-plantar" | "plantar-to-dorsal" | "rostral-to-caudal" | "caudal-to-rostral" | "cranial-to-caudal" | "caudal-to-cranial" | "proximal-to-distal" | "distal-to-proximal";
|
|
45
|
-
}, unknown, z.core.$ZodTypeInternals<{
|
|
46
|
-
type: "anatomical";
|
|
47
|
-
value: "left-to-right" | "right-to-left" | "anterior-to-posterior" | "posterior-to-anterior" | "inferior-to-superior" | "superior-to-inferior" | "dorsal-to-ventral" | "ventral-to-dorsal" | "dorsal-to-palmar" | "palmar-to-dorsal" | "dorsal-to-plantar" | "plantar-to-dorsal" | "rostral-to-caudal" | "caudal-to-rostral" | "cranial-to-caudal" | "caudal-to-cranial" | "proximal-to-distal" | "distal-to-proximal";
|
|
48
|
-
}, unknown>>, z.ZodNull]>>;
|
|
49
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
-
name: z.ZodLiteral<"t">;
|
|
51
|
-
type: z.ZodLiteral<"time">;
|
|
52
|
-
unit: z.ZodEnum<{
|
|
53
|
-
attosecond: "attosecond";
|
|
54
|
-
centisecond: "centisecond";
|
|
55
|
-
day: "day";
|
|
56
|
-
decisecond: "decisecond";
|
|
57
|
-
exasecond: "exasecond";
|
|
58
|
-
femtosecond: "femtosecond";
|
|
59
|
-
gigasecond: "gigasecond";
|
|
60
|
-
hectosecond: "hectosecond";
|
|
61
|
-
hour: "hour";
|
|
62
|
-
kilosecond: "kilosecond";
|
|
63
|
-
megasecond: "megasecond";
|
|
64
|
-
microsecond: "microsecond";
|
|
65
|
-
millisecond: "millisecond";
|
|
66
|
-
minute: "minute";
|
|
67
|
-
nanosecond: "nanosecond";
|
|
68
|
-
petasecond: "petasecond";
|
|
69
|
-
picosecond: "picosecond";
|
|
70
|
-
second: "second";
|
|
71
|
-
terasecond: "terasecond";
|
|
72
|
-
yoctosecond: "yoctosecond";
|
|
73
|
-
yottasecond: "yottasecond";
|
|
74
|
-
zeptosecond: "zeptosecond";
|
|
75
|
-
zettasecond: "zettasecond";
|
|
76
|
-
}>;
|
|
77
|
-
}, z.core.$strip>]>>;
|
|
78
|
-
}, z.core.$strip>;
|
|
79
|
-
export declare const IdentityTransformationSchema: z.ZodType<{
|
|
80
|
-
type: "identity";
|
|
81
|
-
input?: string | string[] | undefined;
|
|
82
|
-
output?: string | string[] | undefined;
|
|
83
|
-
name?: string | undefined;
|
|
84
|
-
}>;
|
|
85
|
-
export declare const MapAxisTransformationSchema: z.ZodType<{
|
|
86
|
-
type: "mapAxis";
|
|
87
|
-
mapAxis: Record<string, string>;
|
|
88
|
-
input?: string | string[] | undefined;
|
|
89
|
-
output?: string | string[] | undefined;
|
|
90
|
-
name?: string | undefined;
|
|
91
|
-
}>;
|
|
92
|
-
export declare const TranslationTransformationSchema: z.ZodType<{
|
|
93
|
-
type: "translation";
|
|
94
|
-
translation?: number[] | undefined;
|
|
95
|
-
path?: string | undefined;
|
|
96
|
-
input?: string | string[] | undefined;
|
|
97
|
-
output?: string | string[] | undefined;
|
|
98
|
-
name?: string | undefined;
|
|
99
|
-
}>;
|
|
100
|
-
export declare const ScaleTransformationSchema: z.ZodType<{
|
|
101
|
-
type: "scale";
|
|
102
|
-
scale?: number[] | undefined;
|
|
103
|
-
path?: string | undefined;
|
|
104
|
-
input?: string | string[] | undefined;
|
|
105
|
-
output?: string | string[] | undefined;
|
|
106
|
-
name?: string | undefined;
|
|
107
|
-
}>;
|
|
108
|
-
export declare const AffineTransformationSchema: z.ZodType<{
|
|
109
|
-
type: "affine";
|
|
110
|
-
affine?: number[][] | undefined;
|
|
111
|
-
path?: string | undefined;
|
|
112
|
-
input?: string | string[] | undefined;
|
|
113
|
-
output?: string | string[] | undefined;
|
|
114
|
-
name?: string | undefined;
|
|
115
|
-
}>;
|
|
116
|
-
export declare const RotationTransformationSchema: z.ZodType<{
|
|
117
|
-
type: "rotation";
|
|
118
|
-
rotation?: number[] | undefined;
|
|
119
|
-
path?: string | undefined;
|
|
120
|
-
input?: string | string[] | undefined;
|
|
121
|
-
output?: string | string[] | undefined;
|
|
122
|
-
name?: string | undefined;
|
|
123
|
-
}>;
|
|
124
|
-
type BaseCoordinateTransformation = {
|
|
125
|
-
type: "identity" | "mapAxis" | "translation" | "scale" | "affine" | "rotation";
|
|
126
|
-
input?: string | string[] | undefined;
|
|
127
|
-
output?: string | string[] | undefined;
|
|
128
|
-
name?: string | undefined;
|
|
129
|
-
mapAxis?: Record<string, string> | undefined;
|
|
130
|
-
translation?: number[] | undefined;
|
|
131
|
-
path?: string | undefined;
|
|
132
|
-
scale?: number[] | undefined;
|
|
133
|
-
affine?: number[][] | undefined;
|
|
134
|
-
rotation?: number[] | undefined;
|
|
135
|
-
};
|
|
136
|
-
export declare const SequenceTransformationSchema: z.ZodType<{
|
|
137
|
-
type: "sequence";
|
|
138
|
-
transformations: BaseCoordinateTransformation[];
|
|
139
|
-
input?: string | string[] | undefined;
|
|
140
|
-
output?: string | string[] | undefined;
|
|
141
|
-
name?: string | undefined;
|
|
142
|
-
}>;
|
|
143
|
-
export declare const InverseTransformationSchema: z.ZodType<{
|
|
144
|
-
type: "inverseOf";
|
|
145
|
-
transformation: BaseCoordinateTransformation;
|
|
146
|
-
input?: string | string[] | undefined;
|
|
147
|
-
output?: string | string[] | undefined;
|
|
148
|
-
name?: string | undefined;
|
|
149
|
-
}>;
|
|
150
|
-
export declare const BijectionTransformationSchema: z.ZodType<{
|
|
151
|
-
type: "bijection";
|
|
152
|
-
forward: BaseCoordinateTransformation;
|
|
153
|
-
inverse: BaseCoordinateTransformation;
|
|
154
|
-
input?: string | string[] | undefined;
|
|
155
|
-
output?: string | string[] | undefined;
|
|
156
|
-
name?: string | undefined;
|
|
157
|
-
}>;
|
|
158
|
-
export declare const ByDimensionTransformationSchema: z.ZodType<{
|
|
159
|
-
type: "byDimension";
|
|
160
|
-
transformations: BaseCoordinateTransformation[];
|
|
161
|
-
input?: string | string[] | undefined;
|
|
162
|
-
output?: string | string[] | undefined;
|
|
163
|
-
name?: string | undefined;
|
|
164
|
-
}>;
|
|
165
|
-
export declare const CoordinateTransformationSchema: z.ZodType<{
|
|
166
|
-
type: "identity";
|
|
167
|
-
input?: string | string[] | undefined;
|
|
168
|
-
output?: string | string[] | undefined;
|
|
169
|
-
name?: string | undefined;
|
|
170
|
-
} | {
|
|
171
|
-
type: "mapAxis";
|
|
172
|
-
mapAxis: Record<string, string>;
|
|
173
|
-
input?: string | string[] | undefined;
|
|
174
|
-
output?: string | string[] | undefined;
|
|
175
|
-
name?: string | undefined;
|
|
176
|
-
} | {
|
|
177
|
-
type: "translation";
|
|
178
|
-
translation?: number[] | undefined;
|
|
179
|
-
path?: string | undefined;
|
|
180
|
-
input?: string | string[] | undefined;
|
|
181
|
-
output?: string | string[] | undefined;
|
|
182
|
-
name?: string | undefined;
|
|
183
|
-
} | {
|
|
184
|
-
type: "scale";
|
|
185
|
-
scale?: number[] | undefined;
|
|
186
|
-
path?: string | undefined;
|
|
187
|
-
input?: string | string[] | undefined;
|
|
188
|
-
output?: string | string[] | undefined;
|
|
189
|
-
name?: string | undefined;
|
|
190
|
-
} | {
|
|
191
|
-
type: "affine";
|
|
192
|
-
affine?: number[][] | undefined;
|
|
193
|
-
path?: string | undefined;
|
|
194
|
-
input?: string | string[] | undefined;
|
|
195
|
-
output?: string | string[] | undefined;
|
|
196
|
-
name?: string | undefined;
|
|
197
|
-
} | {
|
|
198
|
-
type: "rotation";
|
|
199
|
-
rotation?: number[] | undefined;
|
|
200
|
-
path?: string | undefined;
|
|
201
|
-
input?: string | string[] | undefined;
|
|
202
|
-
output?: string | string[] | undefined;
|
|
203
|
-
name?: string | undefined;
|
|
204
|
-
} | {
|
|
205
|
-
type: "sequence";
|
|
206
|
-
transformations: BaseCoordinateTransformation[];
|
|
207
|
-
input?: string | string[] | undefined;
|
|
208
|
-
output?: string | string[] | undefined;
|
|
209
|
-
name?: string | undefined;
|
|
210
|
-
} | {
|
|
211
|
-
type: "inverseOf";
|
|
212
|
-
transformation: BaseCoordinateTransformation;
|
|
213
|
-
input?: string | string[] | undefined;
|
|
214
|
-
output?: string | string[] | undefined;
|
|
215
|
-
name?: string | undefined;
|
|
216
|
-
} | {
|
|
217
|
-
type: "bijection";
|
|
218
|
-
forward: BaseCoordinateTransformation;
|
|
219
|
-
inverse: BaseCoordinateTransformation;
|
|
220
|
-
input?: string | string[] | undefined;
|
|
221
|
-
output?: string | string[] | undefined;
|
|
222
|
-
name?: string | undefined;
|
|
223
|
-
} | {
|
|
224
|
-
type: "byDimension";
|
|
225
|
-
transformations: BaseCoordinateTransformation[];
|
|
226
|
-
input?: string | string[] | undefined;
|
|
227
|
-
output?: string | string[] | undefined;
|
|
228
|
-
name?: string | undefined;
|
|
229
|
-
}>;
|
|
230
|
-
export declare const ArrayCoordinateSystemSchema: z.ZodObject<{
|
|
231
|
-
name: z.ZodString;
|
|
232
|
-
axes: z.ZodArray<z.ZodObject<{
|
|
233
|
-
name: z.ZodString;
|
|
234
|
-
type: z.ZodLiteral<"array">;
|
|
235
|
-
}, z.core.$strip>>;
|
|
236
|
-
}, z.core.$strip>;
|
|
237
|
-
export type CoordinateSystem = z.infer<typeof CoordinateSystemSchema>;
|
|
238
|
-
export type IdentityTransformation = z.infer<typeof IdentityTransformationSchema>;
|
|
239
|
-
export type MapAxisTransformation = z.infer<typeof MapAxisTransformationSchema>;
|
|
240
|
-
export type TranslationTransformation = z.infer<typeof TranslationTransformationSchema>;
|
|
241
|
-
export type ScaleTransformation = z.infer<typeof ScaleTransformationSchema>;
|
|
242
|
-
export type AffineTransformation = z.infer<typeof AffineTransformationSchema>;
|
|
243
|
-
export type RotationTransformation = z.infer<typeof RotationTransformationSchema>;
|
|
244
|
-
export type SequenceTransformation = z.infer<typeof SequenceTransformationSchema>;
|
|
245
|
-
export type InverseTransformation = z.infer<typeof InverseTransformationSchema>;
|
|
246
|
-
export type BijectionTransformation = z.infer<typeof BijectionTransformationSchema>;
|
|
247
|
-
export type ByDimensionTransformation = z.infer<typeof ByDimensionTransformationSchema>;
|
|
248
|
-
export type CoordinateTransformation = z.infer<typeof CoordinateTransformationSchema>;
|
|
249
|
-
export type ArrayCoordinateSystem = z.infer<typeof ArrayCoordinateSystemSchema>;
|
|
250
|
-
export {};
|
|
251
|
-
//# sourceMappingURL=coordinate_systems.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate_systems.d.ts","sourceRoot":"","sources":["../../src/schemas/coordinate_systems.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGjC,CAAC;AAGH,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC;IACnD,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,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C,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayCoordinateSystemSchema = exports.CoordinateTransformationSchema = exports.ByDimensionTransformationSchema = exports.BijectionTransformationSchema = exports.InverseTransformationSchema = exports.SequenceTransformationSchema = exports.RotationTransformationSchema = exports.AffineTransformationSchema = exports.ScaleTransformationSchema = exports.TranslationTransformationSchema = exports.MapAxisTransformationSchema = exports.IdentityTransformationSchema = exports.CoordinateSystemSchema = void 0;
|
|
4
|
-
// SPDX-FileCopyrightText: Copyright (c) Fideus Labs LLC
|
|
5
|
-
// SPDX-License-Identifier: MIT
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
|
-
const rfc4_js_1 = require("./rfc4.js");
|
|
8
|
-
// RFC5: Coordinate Systems and Transformations
|
|
9
|
-
// Coordinate System schema
|
|
10
|
-
exports.CoordinateSystemSchema = zod_1.z.object({
|
|
11
|
-
name: zod_1.z.string().min(1), // MUST be non-empty and unique
|
|
12
|
-
axes: zod_1.z.array(rfc4_js_1.AxisSchema), // Array of axes that define the coordinate system
|
|
13
|
-
});
|
|
14
|
-
// Identity transformation
|
|
15
|
-
exports.IdentityTransformationSchema = zod_1.z.object({
|
|
16
|
-
type: zod_1.z.literal("identity"),
|
|
17
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
18
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
19
|
-
name: zod_1.z.string().optional(),
|
|
20
|
-
});
|
|
21
|
-
// Map Axis transformation (axis permutation)
|
|
22
|
-
exports.MapAxisTransformationSchema = zod_1.z.object({
|
|
23
|
-
type: zod_1.z.literal("mapAxis"),
|
|
24
|
-
mapAxis: zod_1.z.record(zod_1.z.string(), zod_1.z.string()), // Dictionary mapping axis names
|
|
25
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
26
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
27
|
-
name: zod_1.z.string().optional(),
|
|
28
|
-
});
|
|
29
|
-
// Translation transformation
|
|
30
|
-
exports.TranslationTransformationSchema = zod_1.z
|
|
31
|
-
.object({
|
|
32
|
-
type: zod_1.z.literal("translation"),
|
|
33
|
-
translation: zod_1.z.array(zod_1.z.number()).optional(),
|
|
34
|
-
path: zod_1.z.string().optional(), // For binary data
|
|
35
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
36
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
37
|
-
name: zod_1.z.string().optional(),
|
|
38
|
-
})
|
|
39
|
-
.refine((data) => data.translation !== undefined || data.path !== undefined, {
|
|
40
|
-
message: "Either translation array or path must be provided",
|
|
41
|
-
});
|
|
42
|
-
// Scale transformation
|
|
43
|
-
exports.ScaleTransformationSchema = zod_1.z
|
|
44
|
-
.object({
|
|
45
|
-
type: zod_1.z.literal("scale"),
|
|
46
|
-
scale: zod_1.z.array(zod_1.z.number()).optional(),
|
|
47
|
-
path: zod_1.z.string().optional(), // For binary data
|
|
48
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
49
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
50
|
-
name: zod_1.z.string().optional(),
|
|
51
|
-
})
|
|
52
|
-
.refine((data) => data.scale !== undefined || data.path !== undefined, {
|
|
53
|
-
message: "Either scale array or path must be provided",
|
|
54
|
-
});
|
|
55
|
-
// Affine transformation
|
|
56
|
-
exports.AffineTransformationSchema = zod_1.z
|
|
57
|
-
.object({
|
|
58
|
-
type: zod_1.z.literal("affine"),
|
|
59
|
-
affine: zod_1.z.array(zod_1.z.array(zod_1.z.number())).optional(), // 2D array for matrix
|
|
60
|
-
path: zod_1.z.string().optional(), // For binary data
|
|
61
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
62
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
63
|
-
name: zod_1.z.string().optional(),
|
|
64
|
-
})
|
|
65
|
-
.refine((data) => data.affine !== undefined || data.path !== undefined, {
|
|
66
|
-
message: "Either affine matrix or path must be provided",
|
|
67
|
-
});
|
|
68
|
-
// Rotation transformation
|
|
69
|
-
exports.RotationTransformationSchema = zod_1.z
|
|
70
|
-
.object({
|
|
71
|
-
type: zod_1.z.literal("rotation"),
|
|
72
|
-
rotation: zod_1.z.array(zod_1.z.number()).optional(),
|
|
73
|
-
path: zod_1.z.string().optional(), // For binary data
|
|
74
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
75
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
76
|
-
name: zod_1.z.string().optional(),
|
|
77
|
-
})
|
|
78
|
-
.refine((data) => data.rotation !== undefined || data.path !== undefined, {
|
|
79
|
-
message: "Either rotation array or path must be provided",
|
|
80
|
-
});
|
|
81
|
-
const BaseCoordinateTransformationSchema = zod_1.z.union([
|
|
82
|
-
exports.IdentityTransformationSchema,
|
|
83
|
-
exports.MapAxisTransformationSchema,
|
|
84
|
-
exports.TranslationTransformationSchema,
|
|
85
|
-
exports.ScaleTransformationSchema,
|
|
86
|
-
exports.AffineTransformationSchema,
|
|
87
|
-
exports.RotationTransformationSchema,
|
|
88
|
-
]);
|
|
89
|
-
// Sequence transformation (for chaining transformations)
|
|
90
|
-
exports.SequenceTransformationSchema = zod_1.z.object({
|
|
91
|
-
type: zod_1.z.literal("sequence"),
|
|
92
|
-
transformations: zod_1.z.array(BaseCoordinateTransformationSchema),
|
|
93
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
94
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
95
|
-
name: zod_1.z.string().optional(),
|
|
96
|
-
});
|
|
97
|
-
// Inverse transformation
|
|
98
|
-
exports.InverseTransformationSchema = zod_1.z.object({
|
|
99
|
-
type: zod_1.z.literal("inverseOf"),
|
|
100
|
-
transformation: BaseCoordinateTransformationSchema,
|
|
101
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
102
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
103
|
-
name: zod_1.z.string().optional(),
|
|
104
|
-
});
|
|
105
|
-
// Bijection transformation (forward and inverse)
|
|
106
|
-
exports.BijectionTransformationSchema = zod_1.z.object({
|
|
107
|
-
type: zod_1.z.literal("bijection"),
|
|
108
|
-
forward: BaseCoordinateTransformationSchema,
|
|
109
|
-
inverse: BaseCoordinateTransformationSchema,
|
|
110
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
111
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
112
|
-
name: zod_1.z.string().optional(),
|
|
113
|
-
});
|
|
114
|
-
// By dimension transformation
|
|
115
|
-
exports.ByDimensionTransformationSchema = zod_1.z.object({
|
|
116
|
-
type: zod_1.z.literal("byDimension"),
|
|
117
|
-
transformations: zod_1.z.array(BaseCoordinateTransformationSchema),
|
|
118
|
-
input: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
119
|
-
output: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
120
|
-
name: zod_1.z.string().optional(),
|
|
121
|
-
});
|
|
122
|
-
// Complete coordinate transformation schema (union of all types)
|
|
123
|
-
exports.CoordinateTransformationSchema = zod_1.z.union([
|
|
124
|
-
exports.IdentityTransformationSchema,
|
|
125
|
-
exports.MapAxisTransformationSchema,
|
|
126
|
-
exports.TranslationTransformationSchema,
|
|
127
|
-
exports.ScaleTransformationSchema,
|
|
128
|
-
exports.AffineTransformationSchema,
|
|
129
|
-
exports.RotationTransformationSchema,
|
|
130
|
-
exports.SequenceTransformationSchema,
|
|
131
|
-
exports.InverseTransformationSchema,
|
|
132
|
-
exports.BijectionTransformationSchema,
|
|
133
|
-
exports.ByDimensionTransformationSchema,
|
|
134
|
-
]);
|
|
135
|
-
// Array coordinate system schema
|
|
136
|
-
exports.ArrayCoordinateSystemSchema = zod_1.z.object({
|
|
137
|
-
name: zod_1.z.string().min(1),
|
|
138
|
-
axes: zod_1.z.array(zod_1.z.object({
|
|
139
|
-
name: zod_1.z.string(),
|
|
140
|
-
type: zod_1.z.literal("array"),
|
|
141
|
-
})),
|
|
142
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from "./units.js";
|
|
2
|
-
export * from "./methods.js";
|
|
3
|
-
export { type AnatomicalOrientation, AnatomicalOrientationSchema, type AnatomicalOrientationValues, AnatomicalOrientationValuesSchema, type Axes as RFC4Axes, type AxesNames, AxesNamesSchema, AxesSchema as RFC4AxesSchema, type Axis as RFC4Axis, AxisSchema as RFC4AxisSchema, type AxisType, AxisTypeSchema, type BaseAxis, BaseAxisSchema, type ChannelAxis, ChannelAxisSchema, type Orientation, OrientationSchema, type SpaceAxesNames, SpaceAxesNamesSchema, type SpaceAxis, SpaceAxisSchema, type SpaceUnit, SpaceUnitSchema, type TimeAxis, TimeAxisSchema, type TimeUnit, TimeUnitSchema, } from "./rfc4.js";
|
|
4
|
-
export * from "./coordinate_systems.js";
|
|
5
|
-
export { AxisSchema, DatasetSchema, IdentitySchema, MetadataSchema, OmeroChannelSchema, OmeroSchema, OmeroWindowSchema, ScaleSchema, TransformSchema, TranslationSchema, } from "./zarr_metadata.js";
|
|
6
|
-
export { AxisSchemaV05, type AxisV05, type CoordinateTransformation as OmeZarrCoordinateTransformation, DatasetSchemaV01, DatasetSchemaV05, type DatasetV01, type DatasetV05, type Image, ImageSchema, ImageSchemaV01, ImageSchemaV05, type ImageV01, type ImageV05, type LabelColor, LabelColorSchema, type LabelProperty, LabelPropertySchema, LabelSchemaV04, type LabelV04, type Multiscales, MultiscalesSchema, MultiscalesSchemaV01, MultiscalesSchemaV05, type MultiscalesV01, type MultiscalesV05, type OmeMetadata, OmeMetadataSchema, type Omero as OmeZarrOmero, type OmeroChannel as OmeZarrOmeroChannel, OmeroChannelSchema as OmeZarrOmeroChannelSchema, OmeroSchema as OmeZarrOmeroSchema, type OmeroWindow as OmeZarrOmeroWindow, OmeroWindowSchema as OmeZarrOmeroWindowSchema, type OmeSeries, OmeSeriesSchema, OmeZarrCoordinateTransformationSchema, type OmeZarrMetadata, OmeZarrMetadataSchema, type OmeZarrVersion, OmeZarrVersion01Schema, OmeZarrVersion02Schema, OmeZarrVersion03Schema, OmeZarrVersion04Schema, OmeZarrVersion05Schema, OmeZarrVersionSchema, type PlateAcquisition, PlateAcquisitionSchema, type PlateColumn, PlateColumnSchema, type PlateRow, PlateRowSchema, PlateSchemaV05, type PlateV05, type PlateWell, PlateWellSchema, type WellImage, WellImageSchema, WellSchemaV05, type WellV05, } from "./ome_zarr.js";
|
|
7
|
-
export * from "./ngff_image.js";
|
|
8
|
-
export * from "./multiscales.js";
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAG7B,OAAO,EACL,KAAK,qBAAqB,EAC1B,2BAA2B,EAE3B,KAAK,2BAA2B,EAChC,iCAAiC,EACjC,KAAK,IAAI,IAAI,QAAQ,EACrB,KAAK,SAAS,EACd,eAAe,EACf,UAAU,IAAI,cAAc,EAC5B,KAAK,IAAI,IAAI,QAAQ,EACrB,UAAU,IAAI,cAAc,EAC5B,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,SAAS,EACd,eAAe,EACf,KAAK,SAAS,EACd,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,QAAQ,EACb,cAAc,GACf,MAAM,WAAW,CAAC;AAGnB,cAAc,yBAAyB,CAAC;AAGxC,OAAO,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG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