Skip to content

Commit b727e37

Browse files
authored
Merge pull request #2 from BioImageTools/host-manifests-and-docs
feat: host manifests and docs
2 parents 96e9c4c + 102ada9 commit b727e37

22 files changed

Lines changed: 796 additions & 161 deletions

README.md

Lines changed: 127 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Returns whether a single viewer is compatible with the given metadata.
8080

8181
#### `validateViewer(viewer: ViewerManifest, metadata: OmeZarrMetadata): ValidationResult`
8282

83-
Returns full validation details (compatible flag, errors, warnings) for a single viewer against the given metadata.
83+
Returns full validation details (`dataCompatible`, `dataFeaturesSupported`, errors, warnings) for a single viewer against the given metadata.
8484

8585
### Types
8686

@@ -92,16 +92,133 @@ The library exports TypeScript types for all data structures:
9292
- `ValidationError`, `ValidationWarning` - Detailed validation messages
9393
- `AxisMetadata`, `MultiscaleMetadata` - Nested metadata types
9494

95-
## Manifest Specification (DRAFT)
95+
## Icons
9696

97-
| Attribute | Description |
98-
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99-
| ome_zarr_versions | List of OME-NGFF versions which are supported by the tool. When a Zarr group with multiscales metadata containing a version listed here is given to the tool, the tool promises to do something useful. However, it may not support every feature of the specification. |
100-
| rfcs_supported | List of supported RFC numbers which have been implemented on top of the released OME-NGFF versions listed in ome_zarr_versions. Given test data produced for a given RFC listed here, the tool promises to do something useful. However, it may not support every feature of the RFC. |
101-
| bioformats2raw_layout | A tool that advertises support for this will be able to open a Zarr that implements this transitional layout. |
102-
| omero_metadata | A tool that advertises support for this will be able to open a Zarr that implements this transitional metadata, for example by defaulting channel colors with the provided color values. |
103-
| labels | A tool that advertises support will open pixel-annotation metadata found in the "labels" group. |
104-
| hcs_plates | A tool that advertises support will open high content screening datasets found in the "plate" group. |
97+
Icons for canonical viewers are hosted in the [`public/icons/`](public/icons/) directory and served via GitHub Pages at:
98+
99+
```
100+
https://raw.githubusercontent.com/bioimagetools/capability-manifest/host-manifests-and-docs/public/icons/{slug}.png
101+
```
102+
103+
where `{slug}` is the viewer name lowercased with spaces replaced by hyphens (e.g. `"OME-Zarr Validator"``ome-zarr-validator.png`). Consumers can derive this URL automatically and fall back to a local placeholder when the icon is unavailable.
104+
105+
The `logo` field in the `viewer` section is an optional override for cases where this convention does not apply.
106+
107+
## Canonical Manifests
108+
109+
This repository hosts canonical capability manifests for well-known OME-Zarr viewers in the [`manifests/`](manifests/) directory:
110+
111+
| Manifest | Viewer | OME-Zarr Versions |
112+
| --- | --- | --- |
113+
| [neuroglancer.yaml](manifests/neuroglancer.yaml) | Neuroglancer | 0.4, 0.5 |
114+
| [avivator.yaml](manifests/avivator.yaml) | Avivator (Viv) | 0.4 |
115+
| [validator.yaml](manifests/validator.yaml) | OME-Zarr Validator | 0.4, 0.5 |
116+
| [vole.yaml](manifests/vole.yaml) | Vol-E | 0.4, 0.5 |
117+
118+
Consumers can load these manifests by URL directly from GitHub (raw content URLs) or host copies on their own infrastructure.
119+
120+
Viewer developers are encouraged to maintain their own manifests and submit PRs to update the canonical versions here when capabilities change.
121+
122+
## Manifest Schema (DRAFT)
123+
124+
A capability manifest is a YAML file with two top-level sections: `viewer` and `capabilities`.
125+
126+
### `viewer` Section
127+
128+
Identifies the tool and provides a URL template for launching it.
129+
130+
| Field | Type | Required | Description |
131+
| --- | --- | --- | --- |
132+
| `name` | string | yes | Human-readable name of the viewer |
133+
| `version` | string | yes | Version of the viewer these capabilities describe |
134+
| `repo` | string | no | URL of the source code repository |
135+
| `logo` | string | no | URL to a logo image for the viewer. Optional override — consumers may derive a logo URL by convention (see [Icons](#icons)). Omit if the conventional path applies. |
136+
| `template_url` | string | no | URL template for opening a dataset. Use `{DATA_URL}` as a placeholder for the dataset URL — consumers replace it at runtime with the actual OME-Zarr location |
137+
138+
Example:
139+
140+
```yaml
141+
viewer:
142+
name: "Neuroglancer"
143+
version: "2.41.2"
144+
repo: "https://github.com/google/neuroglancer"
145+
template_url: https://neuroglancer-demo.appspot.com/#!{"layers":[{"name":"image","source":"{DATA_URL}","type":"image"}]}
146+
```
147+
148+
### `capabilities` Section
149+
150+
Describes which OME-Zarr features the tool supports. All fields are optional — omitting a field means the capability is unknown/undeclared.
151+
152+
| Field | Type | Description |
153+
| --- | --- | --- |
154+
| `ome_zarr_versions` | number[] | OME-NGFF specification versions the tool can load (e.g. `[0.4, 0.5]`). When a dataset's multiscales metadata contains a version listed here, the tool should be able to open it. |
155+
| `compression_codecs` | string[] | Compression codecs the tool can decode (e.g. `["blosc", "zstd", "gzip"]`). An empty array `[]` means the tool does not declare codec support — compatibility is unknown rather than unsupported. |
156+
| `rfcs_supported` | number[] | RFC numbers implemented on top of the released OME-NGFF versions. Given test data for a listed RFC, the tool should handle it. |
157+
| `axes` | boolean | Whether axis names and units from the metadata are respected |
158+
| `scale` | boolean | Whether scaling factors on multiscale datasets are respected |
159+
| `translation` | boolean | Whether translation offsets (including subpixel offsets for lower scale levels) are respected |
160+
| `channels` | boolean | Whether the tool supports datasets with multiple channels (c axis) |
161+
| `timepoints` | boolean | Whether the tool supports datasets with multiple timepoints (t axis) |
162+
| `labels` | boolean | Whether pixel-annotation metadata in the "labels" group is loaded |
163+
| `hcs_plates` | boolean | Whether high content screening datasets in the "plate" group are loaded |
164+
| `bioformats2raw_layout` | boolean | Whether the tool can open Zarr stores using the bioformats2raw transitional layout |
165+
| `omero_metadata` | boolean | Whether the tool uses OMERO metadata (e.g. to set default channel colors) |
166+
167+
Example:
168+
169+
```yaml
170+
capabilities:
171+
ome_zarr_versions: [0.4, 0.5]
172+
compression_codecs: ["blosc", "zstd", "gzip"]
173+
rfcs_supported: []
174+
axes: true
175+
scale: true
176+
translation: true
177+
channels: true
178+
timepoints: true
179+
labels: false
180+
hcs_plates: false
181+
bioformats2raw_layout: false
182+
omero_metadata: true
183+
```
184+
185+
### How `validateViewer()` Uses the Manifest
186+
187+
The `validateViewer()` function checks a manifest's declared capabilities against a dataset's `OmeZarrMetadata` and returns a `ValidationResult`:
188+
189+
```typescript
190+
interface ValidationResult {
191+
dataCompatible: boolean; // true if no errors (viewer can open the data)
192+
dataFeaturesSupported: boolean; // true if no warnings (viewer fully supports all data features)
193+
errors: ValidationError[]; // hard failures — data will not load
194+
warnings: ValidationWarning[]; // soft issues — data loads but features may be missing
195+
}
196+
```
197+
198+
Capabilities fall into two levels:
199+
200+
- **Data compatibility** (`errors`): Hard requirements. If unmet, the viewer cannot open or render the data at all — it should not be shown.
201+
- **Data support** (`warnings`): Soft requirements. If unmet, the viewer can still open the data but may not display certain features — it should still be shown, with warnings logged or surfaced to the user.
202+
203+
The checks performed, in order:
204+
205+
| Check | Metadata field | Manifest field | Level | Result if mismatch |
206+
| --- | --- | --- | --- | --- |
207+
| OME-Zarr version | `version` or `multiscales[0].version` | `ome_zarr_versions` | **Compatibility** | **Error** — viewer cannot load this version |
208+
| Compression codec | `compressor.id` | `compression_codecs` | **Compatibility** | **Error** if codec not listed; **Warning** if viewer declares no codecs (unknown support) |
209+
| Axes metadata | `axes` | `axes` | **Support** | **Warning** — axis names/units may be ignored |
210+
| Channel support | `axes` contains c/channel | `channels` | **Support** | **Warning** — multi-channel data may not render correctly |
211+
| Timepoint support | `axes` contains t/time | `timepoints` | **Support** | **Warning** — time-series data may not render correctly |
212+
| Labels | `labels` array non-empty | `labels` | **Support** | **Warning** — labels won't be displayed |
213+
| HCS plates | `plate` present | `hcs_plates` | **Support** | **Warning** — plate layout won't be shown |
214+
| OMERO metadata | `omero` present | `omero_metadata` | **Support** | **Warning** — channel colors etc. won't be applied |
215+
| Scale transforms | `multiscales[].datasets[].coordinateTransformations` type `scale` | `scale` | **Support** | **Warning** — scaling factors may be ignored |
216+
| Translation offsets | `multiscales[].datasets[].coordinateTransformations` type `translation` | `translation` | **Support** | **Warning** — coordinate offsets may be ignored |
217+
| bioformats2raw layout | `bioformats2raw_layout` | `bioformats2raw_layout` | **Support** | **Warning** — layout may not be traversed correctly |
218+
219+
> **Note on `rfcs_supported`:** Although `rfcs_supported` is a hard compatibility requirement (it determines whether a viewer can parse RFC-mandated metadata structures), no validation check is currently implemented. OME-NGFF metadata does not yet expose which RFCs a dataset requires — this is a spec-level gap. When the spec defines a `rfcs_required` field, the validator will compare it against `viewer.capabilities.rfcs_supported` and produce an error on mismatch.
220+
221+
A viewer is considered **data-compatible** (`dataCompatible: true`) when there are zero errors — it should be shown to the user. `dataFeaturesSupported` is `false` when there are warnings, indicating the viewer can open the data but may not display all features.
105222

106223
## Prototype
107224

manifests/avivator.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
viewer:
2+
name: "Avivator"
3+
version: "0.16.1"
4+
repo: "https://github.com/hms-dbmi/viv"
5+
template_url: "https://avivator.gehlenborglab.org/?image_url={DATA_URL}"
6+
7+
capabilities:
8+
# Enumeration of OME-Zarr versions that can be loaded
9+
ome_zarr_versions: [0.4]
10+
11+
compression_codecs: ["blosc", "gzip"]
12+
13+
# Which additional RFCs are supported?
14+
rfcs_supported: []
15+
16+
# Are axis names and units respected?
17+
axes: true
18+
19+
# Are scaling factors respected on multiscales?
20+
scale: true
21+
22+
# Are translation factors respected on multiscales (including subpixel offsets for lower scale levels)?
23+
translation: true
24+
25+
# Does the tool support multiple channels?
26+
channels: true
27+
28+
# Does the tool support multiple timepoints?
29+
timepoints: true
30+
31+
# Are labels loaded when available?
32+
labels: false
33+
34+
# Are HCS plates loaded when available?
35+
hcs_plates: false
36+
37+
# Does the viewer handle multiple images in a bioformats2raw layout?
38+
bioformats2raw_layout: false
39+
40+
# Is the OMERO metadata used to e.g. color the channels?
41+
omero_metadata: true

manifests/neuroglancer.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
viewer:
2+
name: "Neuroglancer"
3+
version: "2.41.2"
4+
repo: "https://github.com/google/neuroglancer"
5+
template_url: https://neuroglancer-demo.appspot.com/#!{"layers":[{"name":"image","source":"{DATA_URL}","type":"image"}]}
6+
7+
capabilities:
8+
# Enumeration of OME-Zarr versions that can be loaded
9+
ome_zarr_versions: [0.4, 0.5]
10+
11+
compression_codecs: ["blosc", "zstd", "zlib", "lz4", "gzip"]
12+
13+
# Which additional RFCs are supported?
14+
rfcs_supported: []
15+
16+
# Are axis names and units respected?
17+
axes: true
18+
19+
# Are scaling factors respected on multiscales?
20+
scale: true
21+
22+
# Are translation factors respected on multiscales (including subpixel offsets for lower scale levels)?
23+
translation: true
24+
25+
# Does the tool support multiple channels?
26+
channels: true
27+
28+
# Does the tool support multiple timepoints?
29+
timepoints: true
30+
31+
# Are labels loaded when available?
32+
labels: false
33+
34+
# Are HCS plates loaded when available?
35+
hcs_plates: false
36+
37+
# Does the viewer handle multiple images in a bioformats2raw layout?
38+
bioformats2raw_layout: false
39+
40+
# Is the OMERO metadata used to e.g. color the channels?
41+
omero_metadata: true

manifests/validator.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
viewer:
2+
name: "OME-Zarr Validator"
3+
version: "1.0.0"
4+
repo: "https://github.com/ome/ome-ngff-validator"
5+
template_url: "https://ome.github.io/ome-ngff-validator/?source={DATA_URL}"
6+
7+
capabilities:
8+
# Enumeration of OME-Zarr versions that can be loaded
9+
ome_zarr_versions: [0.4, 0.5]
10+
11+
compression_codecs: []
12+
13+
# Which additional RFCs are supported?
14+
rfcs_supported: []
15+
16+
# Are axis names and units respected?
17+
axes: true
18+
19+
# Are scaling factors respected on multiscales?
20+
scale: true
21+
22+
# Are translation factors respected on multiscales (including subpixel offsets for lower scale levels)?
23+
translation: true
24+
25+
# Does the tool support multiple channels?
26+
channels: true
27+
28+
# Does the tool support multiple timepoints?
29+
timepoints: true
30+
31+
# Are labels loaded when available?
32+
labels: true
33+
34+
# Are HCS plates loaded when available?
35+
hcs_plates: true
36+
37+
# Does the viewer handle multiple images in a bioformats2raw layout?
38+
bioformats2raw_layout: false
39+
40+
# Is the OMERO metadata used to e.g. color the channels?
41+
omero_metadata: true

manifests/vole.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
viewer:
2+
name: "Vol-E"
3+
version: "1.0.0"
4+
repo: "https://github.com/allen-cell-animated/volume-viewer"
5+
template_url: "https://volumeviewer.allencell.org/viewer?url={DATA_URL}"
6+
7+
capabilities:
8+
# Enumeration of OME-Zarr versions that can be loaded
9+
ome_zarr_versions: [0.4, 0.5]
10+
11+
compression_codecs: []
12+
13+
# Which additional RFCs are supported?
14+
rfcs_supported: []
15+
16+
# Are axis names and units respected?
17+
axes: true
18+
19+
# Are scaling factors respected on multiscales?
20+
scale: true
21+
22+
# Are translation factors respected on multiscales (including subpixel offsets for lower scale levels)?
23+
translation: true
24+
25+
# Does the tool support multiple channels?
26+
channels: true
27+
28+
# Does the tool support multiple timepoints?
29+
timepoints: true
30+
31+
# Are labels loaded when available?
32+
labels: false
33+
34+
# Are HCS plates loaded when available?
35+
hcs_plates: false
36+
37+
# Does the viewer handle multiple images in a bioformats2raw layout?
38+
bioformats2raw_layout: false
39+
40+
# Is the OMERO metadata used to e.g. color the channels?
41+
omero_metadata: false

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bioimagetools/capability-manifest",
3-
"version": "0.3.3",
3+
"version": "0.5.0",
44
"description": "Library to determine OME-Zarr viewer compatibility based on capability manifests",
55
"type": "module",
66
"main": "./dist/index.js",

public/icons/avivator.png

5.69 KB
Loading

public/icons/neuroglancer.png

38.2 KB
Loading
434 Bytes
Loading

0 commit comments

Comments
 (0)