From 565a6cdb52e10c66aaae43ce8cf9e41149e2126b Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 17 Jun 2026 14:30:35 +0100 Subject: [PATCH 1/3] scene.coordinateTransformations path optional for input and output --- schemas/scene.schema | 64 ++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/schemas/scene.schema b/schemas/scene.schema index 6c409a85..ee39ed35 100644 --- a/schemas/scene.schema +++ b/schemas/scene.schema @@ -16,37 +16,43 @@ }, "coordinateTransformations": { "$comment": "Merge general coordinate transformations with constraints for scene metadata", - "allOf": [ - { - "$ref": "coordinate_transformations.schema", - "description": "General coordinate transformations defining spatial relationships between coordinate systems" - }, - { - "type": "array", - "items": { - "allOf": [ - { + "type": "array", + "minItems": 1, + "items": { + "allOf": [ + { + "$ref": "coordinate_transformations.schema#/$defs/coordinateTransformation", + "description": "Parameters of any possible transform" + }, + { + "type": "object", + "description": "Transformations between two coordinate systems referenced by name in the same metadata document", + "properties": { + "input": { + "type": "object", "properties": { - "input": { - "allOf": [ - {"$ref": "coordinate_transformations.schema#/$defs/inputOutput"}, - {"required": ["name"]} - ] - }, - "output": { - "allOf": [ - {"$ref": "coordinate_transformations.schema#/$defs/inputOutput"}, - {"required": ["name"]} - ] - } - } + "name": {"type": "string"}, + "path": {"type": "string"} + }, + "required": ["name"], + "additionalProperties": false, + "description": "Must reference a coordinate system defined in the same metadata document (path empty)" + }, + "output": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "path": {"type": "string"} + }, + "required": ["name"], + "additionalProperties": false, + "description": "Must reference a coordinate system defined in the same metadata document (path empty)" } - ] - }, - "description": "Constrained input/output for coordinate transformations in scene metadata" - } - ] - + }, + "required": ["input", "output"] + } + ] + } }, "arrayCoordinateSystem": { "type": "object", From 1fe9135b82410508e6ece8aab729715b710a4cf8 Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Wed, 17 Jun 2026 17:12:09 +0200 Subject: [PATCH 2/3] tests: add json to example to CI --- tests/attributes/spec/valid/scene/scene.json | 71 ++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tests/attributes/spec/valid/scene/scene.json diff --git a/tests/attributes/spec/valid/scene/scene.json b/tests/attributes/spec/valid/scene/scene.json new file mode 100644 index 00000000..50b1cf44 --- /dev/null +++ b/tests/attributes/spec/valid/scene/scene.json @@ -0,0 +1,71 @@ +{ + "ome": { + "version": "0.6.dev3", + "scene": { + "coordinateTransformations": [ + { + "input": {"path": "4995115_cropped_400_100_400_400_rot10.zarr", "name": "rotated"}, + "output": {"name": "translated_x50"}, + "name": "translate_tile_to_stitched_position", + "type": "translation", + "translation": [ + 0, + 0, + 30.608878192215265, + 11.21775638443053 + ] + }, + { + "input": {"path": "4995115_cropped_700_700_400_400_rot45.zarr", "name": "rotated"}, + "output": {"name": "translated_x50"}, + "name": "translate_tile_to_stitched_position", + "type": "translation", + "translation": [ + 0, + 0, + 91.8266345766458, + 41.8266345766458 + ] + }, + { + "input": {"name": "translated_x50"}, + "output": {"path": "4995115_full.zarr", "name": "physical"}, + "name": "translate_tile_to_stitched_position", + "type": "translation", + "translation": [ + 0, + 0, + 0, + 50 + ] + } + ], + "coordinateSystems": [ + { + "name": "translated_x50", + "axes": [ + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + } +} \ No newline at end of file From 5dfbecdb2e6acbcc0c614bf09325716b0ac77417 Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Wed, 17 Jun 2026 18:51:18 +0200 Subject: [PATCH 3/3] tests: correct version in metadata --- tests/attributes/spec/valid/scene/scene.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/attributes/spec/valid/scene/scene.json b/tests/attributes/spec/valid/scene/scene.json index 50b1cf44..eae5a2de 100644 --- a/tests/attributes/spec/valid/scene/scene.json +++ b/tests/attributes/spec/valid/scene/scene.json @@ -1,6 +1,6 @@ { "ome": { - "version": "0.6.dev3", + "version": "0.6.dev4", "scene": { "coordinateTransformations": [ {