Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add UUID field to multiscale objects #115

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion latest/examples/valid_strict/multiscales_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"multiscales": [
{
"version": "0.5-dev",
"uuid": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
"name": "example",
"axes": [
{"name": "t", "type": "time", "unit": "millisecond"},
Expand Down Expand Up @@ -51,4 +52,4 @@
}
}
]
}
}
52 changes: 44 additions & 8 deletions latest/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,50 @@ It MAY contain exactly one `translation` that specifies the offset from the orig
The length of the `scale` and `translation` array MUST be the same as the length of "axes".
The requirements (only `scale` and `translation`, restrictions on order) are in place to provide a simple mapping from data coordinates to physical coordinates while being compatible with the general transformation spec.

Each "multiscales" dictionary MAY contain the field "coordinateTransformations", describing transformations that are applied to all resolution levels in the same manner.
The transformations MUST follow the same rules about allowed types, order, etc. as in "datasets:coordinateTransformations" and are applied after them.
They can for example be used to specify the `scale` for a dimension that is the same for all resolutions.

Each "multiscales" dictionary SHOULD contain the field "name". It SHOULD contain the field "version", which indicates the version of the multiscale metadata of this image (current version is [NGFFVERSION]).

Each "multiscales" dictionary SHOULD contain the field "type", which gives the type of downscaling method used to generate the multiscale image pyramid.
It SHOULD contain the field "metadata", which contains a dictionary with additional information about the downscaling method.
Each "multiscales" dictionary:

<ul>
<li>
MAY contain the field "coordinateTransformations", describing transformations that are applied to all resolution levels in the same manner.
The transformations MUST follow the same rules about allowed types, order, etc. as in "datasets:coordinateTransformations" and are applied after them.
They can for example be used to specify the `scale` for a dimension that is the same for all resolutions.
</li>

<li>
SHOULD contain the field "name" which is informative to users but not sufficient for unique identifiation.
</li>

<li>
<p>
SHOULD contain the field "uuid" which is a
thewtex marked this conversation as resolved.
Show resolved Hide resolved
[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.
</p>
<p>
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.
</p>
</li>

<li>
SHOULD contain the field "version", which indicates the version of the
multiscale metadata of this image (current version is [NGFFVERSION]).
</li>

<li>
SHOULD contain the field "type", which gives the type of downscaling method
used to generate the multiscale image pyramid.
</li>

<li>
SHOULD contain the field "metadata", which contains a dictionary with
additional information about the downscaling method.
</li>

<pre class=include-code>
path: examples/valid_strict/multiscales_example.json
Expand Down
3 changes: 3 additions & 0 deletions latest/schemas/image.schema
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"name": {
"type": "string"
},
"uuid": {
"type": "string"
},
"datasets": {
"type": "array",
"minItems": 1,
Expand Down
4 changes: 2 additions & 2 deletions latest/schemas/strict_image.schema
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"multiscales": {
"items": {
"required": [
"version", "metadata", "type", "name"
"version", "metadata", "type", "name", "uuid"
]
}
}
}
}
]
}
}