From 7b2b229361706849be32378206ec8a47280ae602 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 20 Oct 2022 17:46:05 -0400 Subject: [PATCH 1/3] Add identity to image coordinateTransformations schema --- 0.4/schemas/image.schema | 12 ++++++++++++ 0.4/tests/image_suite.json | 3 +++ latest/schemas/image.schema | 12 ++++++++++++ latest/tests/image_suite.json | 3 +++ 4 files changed, 30 insertions(+) diff --git a/0.4/schemas/image.schema b/0.4/schemas/image.schema index 59e8e28e..528c8395 100644 --- a/0.4/schemas/image.schema +++ b/0.4/schemas/image.schema @@ -188,6 +188,18 @@ "maxContains": 1, "items": { "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "identity" + ] + } + }, + "required": ["type"] + }, { "type": "object", "properties": { diff --git a/0.4/tests/image_suite.json b/0.4/tests/image_suite.json index f22fa67f..063420d9 100644 --- a/0.4/tests/image_suite.json +++ b/0.4/tests/image_suite.json @@ -101,6 +101,9 @@ { "path": "path/to/0", "coordinateTransformations": [ + { + "type": "identity" + }, { "type": "scale", "scale": [ diff --git a/latest/schemas/image.schema b/latest/schemas/image.schema index 3926c4f4..b0d41d0d 100644 --- a/latest/schemas/image.schema +++ b/latest/schemas/image.schema @@ -188,6 +188,18 @@ "maxContains": 1, "items": { "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "identity" + ] + } + }, + "required": ["type"] + }, { "type": "object", "properties": { diff --git a/latest/tests/image_suite.json b/latest/tests/image_suite.json index 39cb73d5..93d884d4 100644 --- a/latest/tests/image_suite.json +++ b/latest/tests/image_suite.json @@ -101,6 +101,9 @@ { "path": "path/to/0", "coordinateTransformations": [ + { + "type": "identity" + }, { "type": "scale", "scale": [ From 4dfc7d2be520d95cfbeaf096517b9b2d586c5ebe Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 24 Jul 2023 17:05:27 -0400 Subject: [PATCH 2/3] Make supported transformation list in spec consistent Make the list in the overview consistent with the transformation table. --- 0.4/index.bs | 2 +- latest/index.bs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/0.4/index.bs b/0.4/index.bs index d39b2c5f..87945c3b 100644 --- a/0.4/index.bs +++ b/0.4/index.bs @@ -367,7 +367,7 @@ to the current zarr group. The "path"s MUST be ordered from largest (i.e. highes Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes". Each dictionary in "datasets" MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level. -The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `translation` or `scale`. +The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `identity`, `translation` or `scale`. They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis. It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it MUST be listed after `scale` to ensure that it is given in physical coordinates. The length of the `scale` and `translation` array MUST be the same as the length of "axes". diff --git a/latest/index.bs b/latest/index.bs index bb935c48..c2e527e0 100644 --- a/latest/index.bs +++ b/latest/index.bs @@ -370,7 +370,7 @@ to the current zarr group. The "path"s MUST be ordered from largest (i.e. highes Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes". Each dictionary in "datasets" MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level. -The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `translation` or `scale`. +The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `identity`, `translation` or `scale`. They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis. It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it MUST be listed after `scale` to ensure that it is given in physical coordinates. The length of the `scale` and `translation` array MUST be the same as the length of "axes". From 1a55fa1485d2efac6da3b8a734a95ab617b74f44 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 4 Oct 2023 12:28:23 -0400 Subject: [PATCH 3/3] Defer transform type definitions to [[#trafo-md]] table Reduce the number of definitions. --- 0.4/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0.4/index.bs b/0.4/index.bs index 87945c3b..18124013 100644 --- a/0.4/index.bs +++ b/0.4/index.bs @@ -367,7 +367,7 @@ to the current zarr group. The "path"s MUST be ordered from largest (i.e. highes Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes". Each dictionary in "datasets" MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level. -The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `identity`, `translation` or `scale`. +The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of types defined in [[#trafo-md]]. They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis. It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it MUST be listed after `scale` to ensure that it is given in physical coordinates. The length of the `scale` and `translation` array MUST be the same as the length of "axes".