Skip to content

Commit daa1f3f

Browse files
committed
DOC: Document how to change OME-Zarr versions
1 parent 1a067e2 commit daa1f3f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/python.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,24 @@ pip install "ngff-zarr[tensorstore]"
214214
nz.to_ngff_zarr('cthead1.ome.zarr', multiscales, use_tensorstore=True)
215215
```
216216

217+
## Convert OME-Zarr versions
218+
219+
To convert from OME-Zarr version 0.4, which uses the Zarr Format Specification
220+
2, to 0.5, which uses the Zarr Format Specification 3, or vice version, specify
221+
the desired version when writing.
222+
223+
```python
224+
# Convert from 0.4 to 0.5
225+
multiscales = from_ngff_zarr('cthead1.ome.zarr')
226+
to_ngff_zarr('cthead1_zarr3.ome.zarr', multiscales, version='0.5')
227+
```
228+
229+
```python
230+
# Convert from 0.5 to 0.4
231+
multiscales = from_ngff_zarr('cthead1.ome.zarr')
232+
to_ngff_zarr('cthead1_zarr2.ome.zarr', multiscales, version='0.4')
233+
```
234+
217235
[dataclass]: https://docs.python.org/3/library/dataclasses.html
218236
[dataclasses]: https://docs.python.org/3/library/dataclasses.html
219237
[Dask arrays]: https://docs.dask.org/en/stable/array.html

0 commit comments

Comments
 (0)