Skip to content
Closed
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
41 changes: 10 additions & 31 deletions schemas/coordinate_transformations.schema
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,7 @@
"$id": "https://ngff.openmicroscopy.org/0.6.dev4/schemas/coordinate_transformations.schema",
"title": "Coordinate Transformations",
"description": "OME-Zarr Coordinate transforms.",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"allOf": [
{
"$ref": "#/$defs/coordinateTransformation"
},
{
"type": "object",
"properties": {
"input": {
"allOf": [
{"$ref": "#/$defs/inputOutput"},
{"required": ["path"]}
]
},
"output": {
"allOf": [
{"$ref": "#/$defs/inputOutput"},
{"required": ["name"]}
]
}
},
"required": [
"input",
"output"
]
}
]
},
"$ref": "#/$defs/coordinateTransformations",
"$defs": {
"inputOutput": {
"type": "object",
Expand All @@ -42,6 +12,15 @@
"path": {"type": "string"}
}
},
"coordinateTransformations": {
"description": "JSON array of multiple OME-ZARR transformations",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/$defs/coordinateTransformation"
}
},
"coordinateTransformation": {
"description": "OME-NGFF coordinate transformation.",
"allOf": [
Expand Down
60 changes: 29 additions & 31 deletions schemas/scene.schema
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,36 @@
"description": "Coordinate systems to combine with transforms to define spatial relationships"
},
"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": [
{
"properties": {
"input": {
"allOf": [
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
{"required": ["name"]}
]
},
"output": {
"allOf": [
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
{"required": ["name"]}
]
}
}
}
]
"$comment": "Coordinate transformations defining spatial relationships between coordinate systems",
"type": "array",
"items": {
"allOf": [
{
"$ref": "coordinate_transformations.schema#/$defs/coordinateTransformation"
},
"description": "Constrained input/output for coordinate transformations in scene metadata"
}
]

{
"type": "object",
"properties": {
"input": {
"allOf": [
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
{"required": ["name"]}
]
},
"output": {
"allOf": [
{"$ref": "coordinate_transformations.schema#/$defs/inputOutput"},
{"required": ["name"]}
]
}
},
"required": ["input", "output"]
}
]
},
"minItems": 1,
"uniqueItems": true,
"description": "Coordinate transformations defining spatial relationships between coordinate systems with scene-specific constraints"
},
"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