Skip to content

Commit c0c1121

Browse files
authored
Merge pull request #2 from jo-mueller/omero_metadata_optional
Omero metadata optional
2 parents 4387a7a + facbf73 commit c0c1121

6 files changed

Lines changed: 264 additions & 8 deletions

File tree

index.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,12 +1491,13 @@ if not datasets:
14911491
### "omero" metadata (transitional)
14921492
(omero-md)=
14931493

1494-
[=Transitional=] information specific to the channels of an image and how to render it can be found under the `omero` key in the group-level metadata:
1494+
Information specific to the channels of an image and how to render it
1495+
can be found under the `omero` key in the group-level metadata (i.e., under `"ome" > "omero"`):
14951496

14961497
```json
1497-
"id": 1, # ID in OMERO
1498-
"name": "example.tif", # Name as shown in the UI
1499-
"channels": [ # Array matching the c dimension size
1498+
"id": 1, // ID in OMERO
1499+
"name": "example.tif", // Name as shown in the UI
1500+
"channels": [ // Array matching the c dimension size
15001501
{
15011502
"active": true,
15021503
"coefficient": 1,
@@ -1513,9 +1514,9 @@ if not datasets:
15131514
}
15141515
],
15151516
"rdefs": {
1516-
"defaultT": 0, # First timepoint to show the user
1517-
"defaultZ": 118, # First Z section to show the user
1518-
"model": "color" # "color" or "greyscale"
1517+
"defaultT": 0, // First timepoint to show the user
1518+
"defaultZ": 118, // First Z section to show the user
1519+
"model": "color" // "color" or "greyscale"
15191520
}
15201521
```
15211522

@@ -1525,11 +1526,13 @@ for more information.
15251526
The `omero` metadata is optional, but if present it MUST contain the field `channels`,
15261527
which is an array of objects describing the channels of the image.
15271528
The `channels` array length SHOULD correspond to the size of the respective channels axis, if present.
1528-
Each object in `channels` MAY contain the following fields:
1529+
Each object in `channels` is optional and MAY contain the following fields:
15291530

15301531
- `color` (string) String of 6 hexadecimal digits specifying the color of the channel in RGB format.
15311532
- `label` (string) Channel name.
15321533
- `active` (boolean) Indicates whether the channel should be displayed.
1534+
- `coefficient`: (float) Value to multiply the pixel values of the channel by when rendering.
1535+
- `family`: (string) Used transfer function family for rendering the channel, e.g. "linear", "log", "gamma".
15331536
- `window` (dictionary) Values describing the windowing of the channel.
15341537
If provided, `start` and `end` values MUST be specified.
15351538
All values can be floating-point numbers, but will likely be integers for integer pixel types.

schemas/image.schema

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
"label": {
144144
"type": "string"
145145
},
146+
"coefficient": {
147+
"type": "number"
148+
},
146149
"family": {
147150
"type": "string"
148151
},
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"ome": {
3+
"version": "0.6.dev3",
4+
"multiscales": [
5+
{
6+
"coordinateSystems": [
7+
{
8+
"name": "physical",
9+
"axes": [
10+
{
11+
"name": "z",
12+
"type": "space",
13+
"unit": "micrometer"
14+
},
15+
{
16+
"name": "y",
17+
"type": "space",
18+
"unit": "micrometer"
19+
},
20+
{
21+
"name": "x",
22+
"type": "space",
23+
"unit": "micrometer"
24+
}
25+
]
26+
}
27+
],
28+
"datasets": [
29+
{
30+
"path": "s0",
31+
"coordinateTransformations": [
32+
{
33+
"scale": [
34+
1,
35+
1,
36+
1
37+
],
38+
"input": "s0",
39+
"output": "physical",
40+
"type": "scale"
41+
}
42+
]
43+
}
44+
]
45+
}
46+
],
47+
"omero": {
48+
}
49+
},
50+
"_conformance": {
51+
"schema": {
52+
"id": "schemas/image.schema"
53+
},
54+
"valid": false
55+
}
56+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"ome": {
3+
"version": "0.6.dev3",
4+
"multiscales": [
5+
{
6+
"coordinateSystems": [
7+
{
8+
"name": "physical",
9+
"axes": [
10+
{
11+
"name": "z",
12+
"type": "space",
13+
"unit": "micrometer"
14+
},
15+
{
16+
"name": "y",
17+
"type": "space",
18+
"unit": "micrometer"
19+
},
20+
{
21+
"name": "x",
22+
"type": "space",
23+
"unit": "micrometer"
24+
}
25+
]
26+
}
27+
],
28+
"datasets": [
29+
{
30+
"path": "s0",
31+
"coordinateTransformations": [
32+
{
33+
"scale": [
34+
1,
35+
1,
36+
1
37+
],
38+
"input": "s0",
39+
"output": "physical",
40+
"type": "scale"
41+
}
42+
]
43+
}
44+
]
45+
}
46+
],
47+
"omero": {
48+
"channels": [
49+
{
50+
"label": "Channel:0",
51+
"color": "#ff0000",
52+
"active": true,
53+
"family": "linear",
54+
"coefficient": 1.0,
55+
"inverted": false,
56+
"window": {
57+
"min": 0,
58+
"max": 255
59+
}
60+
},
61+
{
62+
"label": "Channel:1",
63+
"color": "#00ff00",
64+
"active": true,
65+
"family": "log",
66+
"coefficient": 0.5,
67+
"inverted": true,
68+
"window": {
69+
"min": 0,
70+
"max": 255
71+
}
72+
},
73+
{
74+
"label": "Channel:2",
75+
"color": "#0000ff",
76+
"active": true,
77+
"family": "gamma",
78+
"coefficient": 2.0,
79+
"inverted": false,
80+
"window": {
81+
"min": 0,
82+
"max": 255
83+
}
84+
}
85+
]
86+
}
87+
},
88+
"_conformance": {
89+
"schema": {
90+
"id": "schemas/image.schema"
91+
},
92+
"valid": false
93+
}
94+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"ome": {
3+
"version": "0.6.dev3",
4+
"multiscales": [
5+
{
6+
"coordinateSystems": [
7+
{
8+
"name": "physical",
9+
"axes": [
10+
{
11+
"name": "z",
12+
"type": "space",
13+
"unit": "micrometer"
14+
},
15+
{
16+
"name": "y",
17+
"type": "space",
18+
"unit": "micrometer"
19+
},
20+
{
21+
"name": "x",
22+
"type": "space",
23+
"unit": "micrometer"
24+
}
25+
]
26+
}
27+
],
28+
"datasets": [
29+
{
30+
"path": "s0",
31+
"coordinateTransformations": [
32+
{
33+
"scale": [
34+
1,
35+
1,
36+
1
37+
],
38+
"input": "s0",
39+
"output": "physical",
40+
"type": "scale"
41+
}
42+
]
43+
}
44+
]
45+
}
46+
],
47+
"omero": {
48+
"channels": [
49+
{
50+
"label": "Channel:0",
51+
"color": "#ff0000",
52+
"active": true,
53+
"family": "linear",
54+
"coefficient": 1.0,
55+
"inverted": false,
56+
"window": {
57+
"min": 0,
58+
"start": 100,
59+
"end": 200,
60+
"max": 255
61+
}
62+
},
63+
{
64+
"label": "Channel:1",
65+
"color": "#00ff00",
66+
"active": true,
67+
"family": "log",
68+
"coefficient": 0.5,
69+
"inverted": true,
70+
"window": {
71+
"min": 0,
72+
"start": 50,
73+
"end": 150,
74+
"max": 255
75+
}
76+
},
77+
{
78+
"label": "Channel:2",
79+
"color": "#0000ff",
80+
"active": true,
81+
"family": "gamma",
82+
"coefficient": 2.0,
83+
"inverted": false,
84+
"window": {
85+
"min": 0,
86+
"start": 25,
87+
"end": 125,
88+
"max": 255
89+
}
90+
}
91+
]
92+
}
93+
},
94+
"_conformance": {
95+
"schema": {
96+
"id": "schemas/image.schema"
97+
}
98+
}
99+
}

version_history.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414

1515
- Updated version keys from `0.6.dev2` to `0.6.dev3` everywhere
1616
- style: Homogeneous use of backticks in spec document
17+
- spec: Released requirements for `omero` metadata in the spec document and in schemas.
1718

1819
### Removed
1920

0 commit comments

Comments
 (0)