Skip to content

Commit

Permalink
Clarify the reference object for each new paragraph in the multiscale…
Browse files Browse the repository at this point in the history
…s definition
  • Loading branch information
constantinpape committed Jan 26, 2022
1 parent 0419ce1 commit e94a0c1
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions latest/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Metadata about an image can be found under the "multiscales" key in the group-le

"multiscales" contains a list of dictionaries where each entry describes a multiscale image.

Each dictionary MUST contain the field "axes", see [[#axes-md]].
Each "multiscales" dictionary MUST contain the field "axes", see [[#axes-md]].
The length of "axes" must be between 2 and 5 and MUST be equal to the dimensionality of the zarr arrays storing the image data (see "datasets:path").
The "axes" MUST contain 2 or 3 entries of "type:space" and MAY contain one additional entry of "type:time" and MAY contain one additional entry of "type:channel" or a null / custom type.
The order of the entries MUST correspond to the order of dimensions of the zarr arrays. In addition, the entries MUST be ordered by "type" where the "time" axis must come first (if present), followed by the "channel" or custom axis (if present) and the axes of type "space".
Expand All @@ -256,10 +256,11 @@ The values of the "name" fields must be given as a list in the field "_ARRAY_DIM
This ensures compatibility with the [xarray zarr encoding](http://xarray.pydata.org/en/stable/internals/zarr-encoding-spec.html#zarr-encoding).
E.g. for "axes: [{"name": "z"}, {"name": "y"}, {"name": x}]", the zarr arrays must contain "{"_ARRAY_DIMENSIONS": ["z", "y", "x"]}" in their attributes.

It MUST contain the field "datasets", which is a list of dictionaries describing the arrays storing the individual resolution levels.
Each "multiscales" dictionary MUST contain the field "datasets", which is a list of dictionaries describing the arrays storing the individual resolution levels.
Each dictionary in "datasets" MUST contain the field "path", whose value contains the path to the array for this resolution relative
to the current zarr group. The "path"s MUST be ordered from largest (i.e. highest resolution) to smallest.
All arrays 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 "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 MAY contain the field "transformations", 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]]. In addition, the transformation types MUST only be `identity`, `translation` or `scale`.
They MUST contain at most one `scale` transformation per axis that specifies the pixel size in physical units.
Expand All @@ -268,24 +269,20 @@ If both `scale` and `translation` are given `translation` must be listed after `
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.

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

It 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 0.3).

It SHOULD contain the field "type", which gives the type of downscaling method used to generate the multiscale image pyramid.
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 0.4).

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.

```
{
"multiscales": [
{
"version": "0.3",
"version": "0.4",
"name": "example",
"axes": [
{"name": "t", "type": "time", "unit": "millisecond"},
Expand Down

0 comments on commit e94a0c1

Please sign in to comment.