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

Add identity to image coordinateTransformations schema #152

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion 0.4/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ to the current zarr group. The "path"s MUST be ordered from largest (i.e. highes

Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes".
Each dictionary in "datasets" MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level.
The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `translation` or `scale`.
The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of types defined in [[#trafo-md]].
They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis.
It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it MUST be listed after `scale` to ensure that it is given in physical coordinates.
The length of the `scale` and `translation` array MUST be the same as the length of "axes".
Expand Down
12 changes: 12 additions & 0 deletions 0.4/schemas/image.schema
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@
"maxContains": 1,
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"identity"
]
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions 0.4/tests/image_suite.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
{
"path": "path/to/0",
"coordinateTransformations": [
{
"type": "identity"
},
{
"type": "scale",
"scale": [
Expand Down
2 changes: 1 addition & 1 deletion latest/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ to the current zarr group. The "path"s MUST be ordered from largest (i.e. highes

Each "datasets" dictionary MUST have the same number of dimensions and MUST NOT have more than 5 dimensions. The number of dimensions and order MUST correspond to number and order of "axes".
Each dictionary in "datasets" MUST contain the field "coordinateTransformations", which contains a list of transformations that map the data coordinates to the physical coordinates (as specified by "axes") for this resolution level.
The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `translation` or `scale`.
The transformations are defined according to [[#trafo-md]]. The transformation MUST only be of type `identity`, `translation` or `scale`.
They MUST contain exactly one `scale` transformation that specifies the pixel size in physical units or time duration. If scaling information is not available or applicable for one of the axes, the value MUST express the scaling factor between the current resolution and the first resolution for the given axis, defaulting to 1.0 if there is no downsampling along the axis.
It MAY contain exactly one `translation` that specifies the offset from the origin in physical units. If `translation` is given it MUST be listed after `scale` to ensure that it is given in physical coordinates.
The length of the `scale` and `translation` array MUST be the same as the length of "axes".
Expand Down
12 changes: 12 additions & 0 deletions latest/schemas/image.schema
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@
"maxContains": 1,
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"identity"
]
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions latest/tests/image_suite.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
{
"path": "path/to/0",
"coordinateTransformations": [
{
"type": "identity"
},
{
"type": "scale",
"scale": [
Expand Down
Loading