Skip to content

Commit a40b25c

Browse files
schema scene.coordinateTransformations path optional for input and output (#149)
* scene.coordinateTransformations path optional for input and output * tests: add json to example to CI * tests: correct version in metadata * Apply suggestions from code review Co-authored-by: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> * schema: add make input/output required in this context --------- Co-authored-by: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com>
1 parent c2572cd commit a40b25c

2 files changed

Lines changed: 106 additions & 29 deletions

File tree

schemas/scene.schema

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,43 @@
1616
},
1717
"coordinateTransformations": {
1818
"$comment": "Merge general coordinate transformations with constraints for scene metadata",
19-
"allOf": [
20-
{
21-
"$ref": "coordinate_transformations.schema",
22-
"description": "General coordinate transformations defining spatial relationships between coordinate systems"
23-
},
24-
{
25-
"type": "array",
26-
"items": {
27-
"allOf": [
28-
{
19+
"type": "array",
20+
"minItems": 1,
21+
"items": {
22+
"allOf": [
23+
{
24+
"$ref": "coordinate_transformations.schema#/$defs/coordinateTransformation",
25+
"description": "Parameters of any possible transform"
26+
},
27+
{
28+
"type": "object",
29+
"description": "Transformations between two referenced coordinate systems",
30+
"properties": {
31+
"input": {
32+
"type": "object",
33+
"properties": {
34+
"name": {"type": "string"},
35+
"path": {"type": "string"}
36+
},
37+
"required": ["name"],
38+
"additionalProperties": false,
39+
"description": "Must reference a coordinate system defined in the same metadata document (path empty) or in a subgroup (path provided)"
40+
},
41+
"output": {
42+
"type": "object",
2943
"properties": {
30-
"input": {
31-
"allOf": [
32-
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
33-
{"required": ["name"]}
34-
]
35-
},
36-
"output": {
37-
"allOf": [
38-
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
39-
{"required": ["name"]}
40-
]
41-
}
42-
}
44+
"name": {"type": "string"},
45+
"path": {"type": "string"}
46+
},
47+
"required": ["name"],
48+
"additionalProperties": false,
49+
"description": "Must reference a coordinate system defined in the same metadata document (path empty) or in a subgroup (path provided)"
4350
}
44-
]
45-
},
46-
"description": "Constrained input/output for coordinate transformations in scene metadata"
47-
}
48-
]
49-
51+
},
52+
"required": ["input", "output"]
53+
}
54+
]
55+
}
5056
}
5157
},
5258
"type": "object",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"ome": {
3+
"version": "0.6.dev4",
4+
"scene": {
5+
"coordinateTransformations": [
6+
{
7+
"input": {"path": "4995115_cropped_400_100_400_400_rot10.zarr", "name": "rotated"},
8+
"output": {"name": "translated_x50"},
9+
"name": "translate_tile_to_stitched_position",
10+
"type": "translation",
11+
"translation": [
12+
0,
13+
0,
14+
30.608878192215265,
15+
11.21775638443053
16+
]
17+
},
18+
{
19+
"input": {"path": "4995115_cropped_700_700_400_400_rot45.zarr", "name": "rotated"},
20+
"output": {"name": "translated_x50"},
21+
"name": "translate_tile_to_stitched_position",
22+
"type": "translation",
23+
"translation": [
24+
0,
25+
0,
26+
91.8266345766458,
27+
41.8266345766458
28+
]
29+
},
30+
{
31+
"input": {"name": "translated_x50"},
32+
"output": {"path": "4995115_full.zarr", "name": "physical"},
33+
"name": "translate_tile_to_stitched_position",
34+
"type": "translation",
35+
"translation": [
36+
0,
37+
0,
38+
0,
39+
50
40+
]
41+
}
42+
],
43+
"coordinateSystems": [
44+
{
45+
"name": "translated_x50",
46+
"axes": [
47+
{
48+
"name": "c",
49+
"type": "channel"
50+
},
51+
{
52+
"name": "z",
53+
"type": "space",
54+
"unit": "micrometer"
55+
},
56+
{
57+
"name": "y",
58+
"type": "space",
59+
"unit": "micrometer"
60+
},
61+
{
62+
"name": "x",
63+
"type": "space",
64+
"unit": "micrometer"
65+
}
66+
]
67+
}
68+
]
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)