Skip to content

Commit f9943fb

Browse files
authored
Merge pull request #2 from BioImageTools/xarray_sandbox
Add notebook that explores linking ngff transformations with xarray functional coordinates
2 parents 78c7243 + 1c8e493 commit f9943fb

File tree

12 files changed

+5940
-1542
lines changed

12 files changed

+5940
-1542
lines changed
15 MB
Binary file not shown.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"shape": [
3+
60,
4+
2,
5+
256,
6+
256
7+
],
8+
"data_type": "uint16",
9+
"chunk_grid": {
10+
"name": "regular",
11+
"configuration": {
12+
"chunk_shape": [
13+
60,
14+
2,
15+
256,
16+
256
17+
]
18+
}
19+
},
20+
"chunk_key_encoding": {
21+
"name": "default",
22+
"configuration": {
23+
"separator": "/"
24+
}
25+
},
26+
"fill_value": 0,
27+
"codecs": [
28+
{
29+
"name": "bytes",
30+
"configuration": {
31+
"endian": "little"
32+
}
33+
}
34+
],
35+
"attributes": {},
36+
"zarr_format": 3,
37+
"node_type": "array",
38+
"storage_transformers": []
39+
}
15 MB
Binary file not shown.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"shape": [
3+
60,
4+
2,
5+
128,
6+
128
7+
],
8+
"data_type": "float64",
9+
"chunk_grid": {
10+
"name": "regular",
11+
"configuration": {
12+
"chunk_shape": [
13+
60,
14+
2,
15+
128,
16+
128
17+
]
18+
}
19+
},
20+
"chunk_key_encoding": {
21+
"name": "default",
22+
"configuration": {
23+
"separator": "/"
24+
}
25+
},
26+
"fill_value": "NaN",
27+
"codecs": [
28+
{
29+
"name": "bytes",
30+
"configuration": {
31+
"endian": "little"
32+
}
33+
}
34+
],
35+
"attributes": {},
36+
"zarr_format": 3,
37+
"node_type": "array",
38+
"storage_transformers": []
39+
}
3.75 MB
Binary file not shown.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"shape": [
3+
60,
4+
2,
5+
64,
6+
64
7+
],
8+
"data_type": "float64",
9+
"chunk_grid": {
10+
"name": "regular",
11+
"configuration": {
12+
"chunk_shape": [
13+
60,
14+
2,
15+
64,
16+
64
17+
]
18+
}
19+
},
20+
"chunk_key_encoding": {
21+
"name": "default",
22+
"configuration": {
23+
"separator": "/"
24+
}
25+
},
26+
"fill_value": "NaN",
27+
"codecs": [
28+
{
29+
"name": "bytes",
30+
"configuration": {
31+
"endian": "little"
32+
}
33+
}
34+
],
35+
"attributes": {},
36+
"zarr_format": 3,
37+
"node_type": "array",
38+
"storage_transformers": []
39+
}
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
{
2+
"attributes": {
3+
"ome": {
4+
"version": "0.6",
5+
"multiscales": [
6+
{
7+
"coordinateSystems": [
8+
{
9+
"name": "physical",
10+
"axes": [
11+
{
12+
"name": "z",
13+
"type": "space",
14+
"discrete": null,
15+
"unit": "um",
16+
"longName": null
17+
},
18+
{
19+
"name": "c",
20+
"type": "channel",
21+
"discrete": true,
22+
"unit": null,
23+
"longName": null
24+
},
25+
{
26+
"name": "y",
27+
"type": "space",
28+
"discrete": null,
29+
"unit": "um",
30+
"longName": null
31+
},
32+
{
33+
"name": "x",
34+
"type": "space",
35+
"discrete": null,
36+
"unit": "um",
37+
"longName": null
38+
}
39+
]
40+
},
41+
{
42+
"name": "world",
43+
"axes": [
44+
{
45+
"name": "z",
46+
"type": "space",
47+
"discrete": null,
48+
"unit": "um",
49+
"longName": null
50+
},
51+
{
52+
"name": "c",
53+
"type": "channel",
54+
"discrete": true,
55+
"unit": null,
56+
"longName": null
57+
},
58+
{
59+
"name": "y",
60+
"type": "space",
61+
"discrete": null,
62+
"unit": "um",
63+
"longName": null
64+
},
65+
{
66+
"name": "x",
67+
"type": "space",
68+
"discrete": null,
69+
"unit": "um",
70+
"longName": null
71+
}
72+
]
73+
}
74+
],
75+
"datasets": [
76+
{
77+
"path": "level0",
78+
"coordinateTransformations": [
79+
{
80+
"type": "sequence",
81+
"input": "level0",
82+
"output": "physical",
83+
"name": null,
84+
"transformations": [
85+
{
86+
"type": "scale",
87+
"input": null,
88+
"output": null,
89+
"name": null,
90+
"scale": [
91+
0.5,
92+
1.0,
93+
0.2,
94+
0.2
95+
],
96+
"path": null
97+
},
98+
{
99+
"type": "translation",
100+
"input": null,
101+
"output": null,
102+
"name": null,
103+
"translation": [
104+
0.0,
105+
0.0,
106+
0.0,
107+
0.0
108+
],
109+
"path": null
110+
}
111+
]
112+
}
113+
]
114+
},
115+
{
116+
"path": "level1",
117+
"coordinateTransformations": [
118+
{
119+
"type": "sequence",
120+
"input": "level1",
121+
"output": "physical",
122+
"name": null,
123+
"transformations": [
124+
{
125+
"type": "scale",
126+
"input": null,
127+
"output": null,
128+
"name": null,
129+
"scale": [
130+
1.0,
131+
1.0,
132+
0.4,
133+
0.4
134+
],
135+
"path": null
136+
},
137+
{
138+
"type": "translation",
139+
"input": null,
140+
"output": null,
141+
"name": null,
142+
"translation": [
143+
0.0,
144+
0.0,
145+
0.1,
146+
0.1
147+
],
148+
"path": null
149+
}
150+
]
151+
}
152+
]
153+
},
154+
{
155+
"path": "level2",
156+
"coordinateTransformations": [
157+
{
158+
"type": "sequence",
159+
"input": "level2",
160+
"output": "physical",
161+
"name": null,
162+
"transformations": [
163+
{
164+
"type": "scale",
165+
"input": null,
166+
"output": null,
167+
"name": null,
168+
"scale": [
169+
2.0,
170+
1.0,
171+
0.8,
172+
0.8
173+
],
174+
"path": null
175+
},
176+
{
177+
"type": "translation",
178+
"input": null,
179+
"output": null,
180+
"name": null,
181+
"translation": [
182+
0.0,
183+
0.0,
184+
0.30000000000000004,
185+
0.30000000000000004
186+
],
187+
"path": null
188+
}
189+
]
190+
}
191+
]
192+
}
193+
],
194+
"coordinateTransformations": [
195+
{
196+
"type": "rotation",
197+
"input": "physical",
198+
"output": "world",
199+
"name": null,
200+
"rotation": [
201+
[
202+
1.0,
203+
0.0,
204+
0.0,
205+
0.0
206+
],
207+
[
208+
0.0,
209+
1.0,
210+
0.0,
211+
0.0
212+
],
213+
[
214+
0.0,
215+
0.0,
216+
0.7071067811865476,
217+
-0.7071067811865475
218+
],
219+
[
220+
0.0,
221+
0.0,
222+
0.7071067811865475,
223+
0.7071067811865476
224+
]
225+
],
226+
"path": null
227+
}
228+
],
229+
"metadata": null,
230+
"name": "Example_Image",
231+
"type": null
232+
}
233+
]
234+
}
235+
},
236+
"zarr_format": 3,
237+
"consolidated_metadata": null,
238+
"node_type": "group"
239+
}

pyproject.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,19 @@ optional-dependencies.doc = [
5353
"sphinxcontrib-bibtex>=1",
5454
"sphinxext-opengraph",
5555
]
56-
optional-dependencies.sandbox = [
57-
"jupyter",
58-
]
5956
optional-dependencies.test = [
6057
"coverage>=7.10",
6158
"pytest",
6259
]
60+
optional-dependencies.sandbox = [
61+
"jupyter",
62+
"dask-image",
63+
"scikit-image",
64+
"xarray",
65+
"networkx",
66+
"matplotlib",
67+
"ipympl",
68+
]
6369
# https://docs.pypi.org/project_metadata/#project-urls
6470
urls.Documentation = "https://ngff-transformations.readthedocs.io/"
6571
urls.Homepage = "https://github.com/BioImageTools/ngff-transformations"

0 commit comments

Comments
 (0)