diff --git a/examples/multiscales_strict/multiscales_example.json b/examples/multiscales_strict/multiscales_example.json index 0d16fde9..7659f172 100644 --- a/examples/multiscales_strict/multiscales_example.json +++ b/examples/multiscales_strict/multiscales_example.json @@ -7,6 +7,7 @@ "multiscales": [ { "name": "example", + "uuid": "5a1443a1-5af7-48ec-9115-7272af5c41f2", "coordinateSystems": [ { "name": "intrinsic", diff --git a/examples/multiscales_strict/multiscales_example_relative.json b/examples/multiscales_strict/multiscales_example_relative.json index bc51998c..dd68053f 100644 --- a/examples/multiscales_strict/multiscales_example_relative.json +++ b/examples/multiscales_strict/multiscales_example_relative.json @@ -1,8 +1,8 @@ { "multiscales": [ { - "version": "0.6.dev3", "name": "example", + "uuid": "4b954a85-63f2-48e0-8fb8-f2d436109869", "coordinateSystems" : [ { "name" : "world", diff --git a/examples/multiscales_strict/multiscales_transformations.json b/examples/multiscales_strict/multiscales_transformations.json index 49876785..1b304283 100644 --- a/examples/multiscales_strict/multiscales_transformations.json +++ b/examples/multiscales_strict/multiscales_transformations.json @@ -60,6 +60,7 @@ } ], "name": "image_with_coordinateTransformations", + "uuid": "e3a3177d-2097-4c23-bc1b-9d0e5b934fc3", "type": "foo", "metadata": { "key": "value" diff --git a/index.md b/index.md index 94dd80ae..b4aca95a 100644 --- a/index.md +++ b/index.md @@ -1305,6 +1305,15 @@ which gives the type of downscaling method used to generate the multiscale image It SHOULD contain the field `metadata`, which contains a object with additional information about the downscaling method. +Each `multiscales` object SHOULD contain the field `uuid`, +which is a [RFC 4122](https://www.ietf.org/rfc/rfc4122.txt) compliant string representation of a universally unique identifier, +(e.g., `"urn":"uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"`) +and SHOULD use a compliant generator to minimize potential conflicts. + +The uuid field is used to uniquely assign an identity to objects in the dataset. +Users MAY choose to store identical objects, i.e. with the same uuid, +in multiple filesets with the intent that changes to either may eventually be applied to all copies. + :::{dropdown} Example diff --git a/schemas/image.schema b/schemas/image.schema index 5012c7ee..aab4660b 100644 --- a/schemas/image.schema +++ b/schemas/image.schema @@ -38,6 +38,10 @@ "name": { "type": "string" }, + "uuid": { + "type": "string", + "format": "uuid" + }, "datasets": { "type": "array", "minItems": 1, diff --git a/tests/attributes/spec/invalid/image/multiscales_bad_uuid.json b/tests/attributes/spec/invalid/image/multiscales_bad_uuid.json new file mode 100644 index 00000000..38553411 --- /dev/null +++ b/tests/attributes/spec/invalid/image/multiscales_bad_uuid.json @@ -0,0 +1,73 @@ +{ + "ome": { + "version": "0.6.dev3", + "multiscales": [ + { + "name": "multiscales", + "uuid": 123, + "coordinateSystems": [ + { + "name": "physical", + "axes": [ + { + "type": "space", + "name": "z", + "unit": "micrometer", + "discrete": false + }, + { + "type": "space", + "name": "y", + "unit": "micrometer", + "discrete": false + }, + { + "type": "space", + "name": "x", + "unit": "micrometer", + "discrete": false + } + ] + } + ], + "datasets": [ + { + "path": "array", + "coordinateTransformations": [ + { + "type": "sequence", + "output": "physical", + "input": "array", + "transformations": [ + { + "type": "scale", + "scale": [ + 4, + 3, + 2 + ] + }, + { + "type": "translation", + "translation": [ + 30, + 20, + 10 + ] + } + ], + "name": "transform-name" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "schemas/image.schema" + }, + "valid": false + } +} diff --git a/tests/attributes/spec/valid/image/multiscales_transform_sequence.json b/tests/attributes/spec/valid/image/multiscales_transform_sequence.json index cd45168c..31fdb7a3 100644 --- a/tests/attributes/spec/valid/image/multiscales_transform_sequence.json +++ b/tests/attributes/spec/valid/image/multiscales_transform_sequence.json @@ -4,6 +4,7 @@ "multiscales": [ { "name": "multiscales", + "uuid": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "coordinateSystems": [ { "name": "physical",