Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 35 additions & 29 deletions schemas/scene.schema
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
71 changes: 71 additions & 0 deletions tests/attributes/spec/valid/scene/scene.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"ome": {
"version": "0.6.dev4",
"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"
}
]
}
]
}
}
}
Loading