Skip to content

Commit 18d95a2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into no-array-cs
2 parents 6236d70 + 01bc83c commit 18d95a2

File tree

3 files changed

+66
-47
lines changed

3 files changed

+66
-47
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
NGFF is an initiative by the bioimaging community to develop imaging format specifications to
44
address issues of scalability and interoperability.
55

6-
This repository contains the central [specification text](./specification.md),
6+
This repository contains the central [specification text](./index.md),
77
a comprehensive list of [metadata examples](./examples)
88
as well as [json schemas](./schemas) to validate written ome-zarr image data.
99

index.md

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Note that the number of dimensions is variable between 2 and 5 and that axis nam
8383
│ ├── zarr.json # All image arrays must be up to 5-dimensional
8484
│ │ # with the axis of type time before type channel, before spatial axes.
8585
│ │
86-
│ └─ ... # Chunks are stored conforming to the Zarr array specification and
86+
│ └─ ... # Chunks are stored conforming to the Zarr array specification and
8787
│ # metadata as specified in the array's `zarr.json`.
8888
8989
└── labels
@@ -132,7 +132,7 @@ A well group SHOULD NOT be present if there are no images in the well.
132132
│ │ ├── 0 # First field of view of well A1
133133
│ │ │ │
134134
│ │ │ ├── zarr.json # Implements "multiscales", "omero"
135-
│ │ │ ├── s0 # Resolution levels
135+
│ │ │ ├── s0 # Resolution levels
136136
│ │ │ ├── ...
137137
│ │ │ └── labels # Labels (optional)
138138
│ │ └── ... # Other fields of view
@@ -201,10 +201,10 @@ object that MUST contain a `version` key, the value of which MUST be a string sp
201201
### "coordinateSystems" metadata
202202
(coordinate-systems-md)=
203203

204-
A `coordinateSystem` is a JSON object with a `name` field and a `axes` field.
204+
A coordinate system is a JSON object with a `name` field and a `axes` field.
205205
Every coordinate system:
206206
- MUST contain the field `name`.
207-
The value MUST be a non-empty string that is unique among all entries under `coordinateSystems`.
207+
The value MUST be a non-empty string that is unique among all entries in a `coordinateSystems` array.
208208
- MUST contain the field `axes`, whose value is an array of valid `axes` (see below).
209209
The elements of `axes` correspond to the index of each array dimension and coordinates for points in that coordinate system.
210210
For the below example, the `x` dimension is the last dimension.
@@ -230,7 +230,7 @@ Coordinate Systems metadata example
230230
The axes of a coordinate system (see below) give information
231231
about the types, units, and other properties of the coordinate system's dimensions.
232232
Axis names may contain semantically meaningful information, but can be arbitrary.
233-
As a result, two coordinate systems that have identical axes in the same order
233+
As a result, two coordinate systems that have identical axes in the same order
234234
may not be "the same" in the sense that measurements at the same point
235235
refer to different physical entities and therefore should not be analyzed jointly.
236236
Tasks that require images, annotations, regions of interest, etc.,
@@ -426,7 +426,7 @@ The following transformations are supported:
426426
| [`byDimension`](#bydimension-md) | `"transformations":List[Transformation]`.<br>Transformations in the array MUST have<br>`"input_axes": List[number]`, <br> and `"output_axes": List[number]` | A high dimensional transformation using lower dimensional transformations on subsets of dimensions. |
427427

428428
Implementations SHOULD prefer to store transformations as a sequence of less expressive transformations where possible
429-
(e.g., sequence[translation, rotation], instead of affine transformation with translation/rotation).
429+
(e.g., sequence[translation, rotation], instead of affine transformation with translation/rotation).
430430

431431
:::{dropdown} Example
432432
(spec:example:coordinate_transformation_scale)=
@@ -437,7 +437,7 @@ Implementations SHOULD prefer to store transformations as a sequence of less exp
437437
{ "name": "in", "axes": [{"name": "j"}, {"name": "i"}] },
438438
{ "name": "out", "axes": [{"name": "y"}, {"name": "x"}] }
439439
],
440-
"coordinateTransformations": [
440+
"coordinateTransformations": [
441441
{
442442
"type": "scale",
443443
"scale": [2, 3.12],
@@ -467,15 +467,15 @@ Conforming readers:
467467
- SHOULD be able to apply transformations to images;
468468

469469
Coordinate transformations can be stored in multiple places to reflect different use cases.
470-
470+
471471
- **Inside `multiscales > datasets`**: `coordinateTransformations` herein MUST be restricted
472472
to a single `scale`, `identity` or `sequence` of a scale followed by a translation transformation.
473473
For more information, see [multiscales section below](#multiscales-md).
474474
- **Inside `multiscales > coordinateTransformations`**: Additional transformations for single multiscale images MAY be stored here.
475475
The `coordinateTransformations` field MUST contain an array of valid [transformations](#trafo-types-md).
476476
The input to every one of these transformations MUST be the intrinsic coordinate system.
477477
The output can be another coordinate system defined under `multiscales > coordinateSystems`.
478-
478+
479479
- **Inside `scene > coordinateTransformations`**: Transformations between two or more images
480480
MUST be stored in the attributes of a [`scene` object](#scene-md) in a [scene Zarr group](#scene-format).
481481
In this case, the `input` and `output` values are objects
@@ -506,9 +506,9 @@ where a coordinate is the location/value of that point along its corresponding a
506506
The indexes of axis dimensions correspond to indexes into transformation parameter arrays (see examples).
507507

508508
**Image rendering**: When rendering transformed images and interpolating,
509-
implementations may need the "inverse" transformation - from the fixed
510-
image's to the source image's coordinate system. This transformation may
511-
not explicitly exist, but might be the require computing the inverse
509+
implementations may need the "inverse" transformation - from the fixed
510+
image's to the source image's coordinate system. This transformation may
511+
not explicitly exist, but might be the require computing the inverse
512512
(in closed form) of an explicitly specified forward transformation.
513513

514514
Inverse transformations used for image rendering may be specified
@@ -521,8 +521,8 @@ that the requested operation is unsupported.
521521

522522
:::{dropdown} Example
523523

524-
Implementations SHOULD be able to compute and apply the inverse of some coordinate
525-
transformations when they are computable in closed-form (as the
524+
Implementations SHOULD be able to compute and apply the inverse of some coordinate
525+
transformations when they are computable in closed-form (as the
526526
[Transformation types](#trafo-types-md) section below indicates).
527527
Implementations should be able to render the moving image into the fixed
528528
image by computing the inverse of this transformation.
@@ -535,10 +535,10 @@ image by computing the inverse of this transformation.
535535
}
536536
```
537537

538-
Software libraries that perform image registration often return the transformation
539-
from fixed image coordinates to moving image coordinates, because this "inverse"
538+
Software libraries that perform image registration often return the transformation
539+
from fixed image coordinates to moving image coordinates, because this "inverse"
540540
transformation is most often required when rendering the transformed moving image.
541-
Implementations should be able to render the moving image into the fixed image by
541+
Implementations should be able to render the moving image into the fixed image by
542542
applying this transformation directly.
543543

544544
```json
@@ -549,7 +549,7 @@ applying this transformation directly.
549549
}
550550
```
551551

552-
Implementations are not expected to be able to to render the moving image
552+
Implementations are not expected to be able to to render the moving image
553553
into the fixed image given this transformation. They may attempt
554554
to do so by estimating the transformations' inverse if they choose to.
555555

@@ -683,7 +683,7 @@ When stored as a 2D json array, the inner array contains rows (e.g. `[[1,2,3], [
683683
#### Transformation types
684684
(trafo-types-md)=
685685

686-
Input and output dimensionality may be determined by the coordinate system referred to by the `input` and `output` fields, respectively.
686+
Input and output dimensionality may be determined by the coordinate system referred to by the `input` and `output` fields, respectively.
687687
If the value of `input` is a path to an array, its shape gives the input dimension,
688688
otherwise it is given by the length of `axes` for the coordinate system with the name of the `input`.
689689
If the value of `output` is an array, its shape gives the output dimension,
@@ -794,7 +794,7 @@ The array MUST have length `N`.
794794
defines the function:
795795

796796
```
797-
x = i + 9
797+
x = i + 9
798798
y = j - 1.42
799799
```
800800
:::
@@ -1039,7 +1039,7 @@ of the `i`th output axis. See the example below.
10391039

10401040
`coordinates` and `displacements` transformations are not invertible in general,
10411041
but implementations MAY approximate their inverses.
1042-
Metadata for these coordinate transforms have the following fields:
1042+
Metadata for these coordinate transforms have the following fields:
10431043

10441044
**path**
10451045
: The location of the coordinate array in this (or another) container.
@@ -1093,7 +1093,7 @@ Example metadata for the array data at path `coordinates` above:
10931093
{ "name": "i", "type": "space", "discrete": true },
10941094
{ "name": "c", "type": "coordinate", "discrete": true }
10951095
]
1096-
}
1096+
}
10971097
],
10981098
"coordinateTransformations" : [
10991099
{
@@ -1107,7 +1107,7 @@ Example metadata for the array data at path `coordinates` above:
11071107
If the array in `coordinates` contains the data: `[-9, 9, 0]`, then this metadata defines the function:
11081108

11091109
```
1110-
x =
1110+
x =
11111111
if ( i < 0.5 ) -9
11121112
else if ( i >= 0.5 and i < 1.5 ) 9
11131113
else if ( i >= 1.5 ) 0
@@ -1139,7 +1139,7 @@ Example metadata for the array data at path `displacements` above:
11391139
{ "name": "x", "type": "space", "unit" : "nanometer" },
11401140
{ "name": "d", "type": "displacement", "discrete": true }
11411141
]
1142-
}
1142+
}
11431143
],
11441144
"coordinateTransformations" : [
11451145
{
@@ -1315,18 +1315,18 @@ It is stored in a multiple resolution representation.
13151315
Each `multiscales` object MUST contain the field `coordinateSystems`,
13161316
whose value is an array containing coordinate system metadata
13171317
(see [coordinate systems](#coordinate-systems-md)).
1318+
The following conditions apply to all coordinate systems inside multiscales metadata:
1319+
1320+
- 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`).
1321+
- `axes` MUST contain 2 or 3 entries of `type:space`
1322+
- `axes` MAY contain one additional entry of `type:time`
1323+
- `axes` MAY contain one additional entry of `type:channel` or a null / custom type.
1324+
- `axes` entries MUST be ordered by `type` where the `time` axis must come first (if present),
1325+
followed by the `channel` or custom axis (if present) and the axes of type `space`.
1326+
- If there are three spatial axes where two correspond to the image plane (`yx`)
1327+
and images are stacked along the other (anisotropic) axis (`z`),
1328+
the spatial axes SHOULD be ordered as `zyx`.
13181329

1319-
The following MUST hold for all coordinate systems inside multiscales metadata.
1320-
The length of `axes` must be between 2 and 5
1321-
and MUST be equal to the dimensionality of the Zarr arrays storing the image data (see `datasets:path`).
1322-
The `axes` MUST contain 2 or 3 entries of `type:space`
1323-
and MAY contain one additional entry of `type:time`
1324-
and MAY contain one additional entry of `type:channel` or a null / custom type.
1325-
In addition, the entries MUST be ordered by `type` where the `time` axis must come first (if present),
1326-
followed by the `channel` or custom axis (if present) and the axes of type `space`.
1327-
If there are three spatial axes where two correspond to the image plane (`yx`)
1328-
and images are stacked along the other (anisotropic) axis (`z`),
1329-
the spatial axes SHOULD be ordered as `zyx`.
13301330
Each `multiscales` object MUST contain the field `datasets`,
13311331
which is an array of objects describing the arrays storing the individual resolution levels.
13321332
Each object in `datasets` MUST contain the field `path`,
@@ -1342,7 +1342,7 @@ that maps Zarr array coordinates for this resolution level to the "intrinsic" co
13421342
The transformation is defined according to [transformations metadata](#trafo-types-md).
13431343
The transformation MUST take as input points in the array coordinate system
13441344
corresponding to the Zarr array at location `path`.
1345-
The value of `input` MUST equal the value of `path`,
1345+
The value of `input` MUST equal the value of `path`,
13461346
implementations should always treat the value of `input` as if it were equal to the value of `path`.
13471347
The value of the transformation’s `output` coordinate system MUST be the same for every dataset in a single multiscales.
13481348
This coordinate system (the "intrinsic" coordinate system) will generally be a representation of the image in its native physical coordinate system.
@@ -1365,8 +1365,9 @@ If applications require additional transformations,
13651365
each `multiscales` object MAY contain the field `coordinateTransformations`,
13661366
describing transformations that are applied to all resolution levels in the same manner.
13671367
The value of `input` MUST equal the name of the "intrinsic" coordinate system.
1368-
The value of `output` MUST be the name of the output coordinate System
1369-
which is different from the "intrinsic" coordinate system.
1368+
The value of `output` MUST be the name of a coordinate system
1369+
which is different from the "intrinsic" coordinate system
1370+
and which is defined in the `coordinateSystems` field of the `multiscales` metadata.
13701371

13711372
Each `multiscales` object SHOULD contain the field `name`.
13721373

@@ -1511,7 +1512,7 @@ denoting arbitrary metadata associated with that label.
15111512
Label-value objects within the `properties` array do not need to have the same keys.
15121513

15131514
The value of the `source` key MUST be a JSON object containing information about the original image from which the label image derives.
1514-
This object MAY include a key `image`, whose value MUST be a string specifying the relative path to a Zarr image group.
1515+
This object MAY include a key `image`, whose value MUST be a string specifying the relative path to a Zarr image group.
15151516
The default value is `../../` since most labeled images are stored in a "labels" group that is nested within the original image group.
15161517

15171518

@@ -1618,10 +1619,10 @@ whose value MUST be an array of JSON objects specifying all fields of views for
16181619
Each image object MUST contain a `path` key
16191620
whose value MUST be a string specifying the path to the field of view.
16201621
The `path` MUST be case-sensitive, and MUST NOT be a duplicate of any other `path` in the `images` list.
1621-
The `path` MUST follow [Zarr node name naming conventions](https://github.com/zarr-developers/zarr-specs/blob/main/docs/v3/core/index.rst#node-names) including the recommended limitations of characters to ensure consistency across different storage systems and programming languages.
1622-
Specifically: The `path` MUST NOT consist only of periods (like `.` or `..`) or start with the reserved prefix `__`;
1623-
The `path` MUST NOT be an empty string and MUST NOT contain `/` characters;
1624-
The `path` MUST only use characters in the sets `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`.
1622+
The `path` MUST follow [Zarr node name naming conventions](https://github.com/zarr-developers/zarr-specs/blob/main/docs/v3/core/index.rst#node-names) including the recommended limitations of characters to ensure consistency across different storage systems and programming languages.
1623+
Specifically: The `path` MUST NOT consist only of periods (like `.` or `..`) or start with the reserved prefix `__`;
1624+
The `path` MUST NOT be an empty string and MUST NOT contain `/` characters;
1625+
The `path` MUST only use characters in the sets `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`.
16251626
If multiple acquisitions were performed in the plate,
16261627
it MUST contain an `acquisition` key whose value MUST be an integer identifying the acquisition
16271628
which MUST match one of the acquisition JSON objects defined in the [plate metadata](#plate-md).
@@ -1798,11 +1799,29 @@ but they should be updated in due course.
17981799

17991800
See [Tools](https://ngff.openmicroscopy.org/tools/index.html).
18001801

1802+
## License
1803+
1804+
This specification is derived from the [Community Specification Template](https://www.w3.org/People/Schepers/unoffical_template.html) provided by W3C,
1805+
under [the following terms](https://www.w3.org/copyright/software-license-2023/):
1806+
1807+
> By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
1808+
> Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
1809+
>
1810+
> The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1811+
> Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
1812+
> Notice of any changes or modifications, through a copyright statement on the new code or document such as:
1813+
> "This document includes material copied from or derived from Community Specification Template. Copyright &copy; 2025 W3C&reg; (MIT, ERCIM, Keio, Beihang)."
1814+
1815+
1816+
### Notice of Modifications:
1817+
This specification includes material copied from or derived from the Community Specification Template.
1818+
Copyright &copy; 2025 W3C&reg; (MIT, ERCIM, Keio, Beihang).
1819+
18011820
## Other resources
18021821

18031822
```{toctree}
18041823
:maxdepth: 1
18051824
18061825
examples/index
18071826
schemas/index
1808-
```
1827+
```

pre_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def build_footer():
157157
year = datetime.now().year
158158
footer_content = f"""
159159
<div>
160-
Copyright © 2020-{year}
161-
<a href="https://www.openmicroscopy.org/"><abbr title="Open Microscopy Environment">OME</abbr></a><sup>®</sup>.
160+
Copyright &copy; 2020-{year}
161+
<a href="https://www.openmicroscopy.org/"><abbr title="Open Microscopy Environment">OME</abbr></a><sup>&reg;</sup>.
162162
OME trademark rules apply.
163163
</div>
164164
"""

0 commit comments

Comments
 (0)