Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
05977bd
feat: add image class
jo-mueller Jan 21, 2026
c64d653
feat: added reader
jo-mueller Feb 8, 2026
22b11d8
feat: pass labels to multiscales writer function
jo-mueller Mar 3, 2026
c92a30d
fix: do not use v06 yet
jo-mueller Mar 3, 2026
ee80edc
test: add testcases for class-based writer
jo-mueller Mar 4, 2026
46cf756
refactor: write scales to zarr group scale<idx>
jo-mueller Mar 4, 2026
5d97ea9
fix: remove 0.6 conversion from reader
jo-mueller Mar 5, 2026
fa638cc
fix: accept storage options and scale_factors as list[dicts]
jo-mueller Mar 5, 2026
2085929
tests: calculate expected shape correctly from array shapes
jo-mueller Mar 6, 2026
0444af9
deps: add ome-zarr-models-py (latest) to dependencies
jo-mueller Mar 10, 2026
83027e0
fix: use correct scale folder convention
jo-mueller Mar 10, 2026
ebc8171
tests: add writing labels to tests
jo-mueller Mar 10, 2026
6effadc
feat: add labels as class attribute
jo-mueller Mar 10, 2026
3429b78
tests: add tests for ingestion of image and data reading
jo-mueller Mar 10, 2026
4f5749a
refactor: use image classes under the hood
jo-mueller Mar 12, 2026
49ccb71
refactor: rename `dims` property to `axes` for consistency
jo-mueller Mar 18, 2026
0a393ef
doc: Add image class to docs
jo-mueller Mar 18, 2026
9e96c89
chore: make sure loaded image has a name that's not None
jo-mueller Mar 19, 2026
242def2
feat: add `scale` argument to entrypoints
jo-mueller Mar 11, 2026
8fd027c
tests: add test for writing scale w/o coordinate transformations
jo-mueller Mar 12, 2026
f173e88
feat: add `axes_units` kwarg to entrypoints
jo-mueller Mar 25, 2026
127dfc4
enh: add backwards compatibility for reading 0.1/0.2/0.3
jo-mueller Apr 7, 2026
8330ccb
enh: support omero metadata
jo-mueller Apr 7, 2026
78f70bf
enh: support image-label metadata
jo-mueller Apr 7, 2026
8db9822
refactor: Move image classes into submodule
jo-mueller Apr 8, 2026
ee90670
tests: add reader tests for new classes
jo-mueller Apr 8, 2026
92ae111
tests: remove reference to v06 coordinate systems
jo-mueller Mar 10, 2026
4d72e3a
feat: return delayed objects
jo-mueller Mar 12, 2026
4f49ad8
fix: default to not using deprecated Scaler
jo-mueller Mar 31, 2026
b3892c3
enh: do not delay writing metadata
jo-mueller Mar 31, 2026
ee738fc
enh: pass scale and units to writer
jo-mueller Mar 31, 2026
c68f784
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
d219470
fix: fix rebase-introduced errors
jo-mueller Apr 8, 2026
cc96984
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
68ffe2f
chore: use absolute imports
jo-mueller Apr 8, 2026
6330cdc
chore: add coordinatetransformations deprecation warning
jo-mueller Apr 8, 2026
4d76318
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
df41528
refactor: move utility functions into utils.py
jo-mueller Apr 8, 2026
906c112
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
73a4c3f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
fa1145d
fix: update written metadata on write
jo-mueller Apr 10, 2026
3dfad13
chore: reconcile test parametrization
jo-mueller Apr 10, 2026
538cd43
chore: reconcile tests
jo-mueller Apr 10, 2026
062e0a4
feat: Add images to attributes that are displayed in _repr_
jo-mueller Apr 21, 2026
ca3133c
fix: retrieve omero metadata correctly for 0.4
jo-mueller Apr 21, 2026
ed8e4f9
fix: get image-label metadata from top-level attrs in 0.4
jo-mueller Apr 21, 2026
2d257fa
chore: reconcile branches
jo-mueller Apr 21, 2026
85d15c4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 21, 2026
24768d6
feat: add omero/labels handling to 0.1/0.2/0.3 ome-zarr
jo-mueller Apr 30, 2026
1bcb6f5
chore: improve error message
jo-mueller Apr 30, 2026
7af8ca5
tests: add test for legacy import
jo-mueller Apr 30, 2026
e836d4e
chore: precommit fixes
jo-mueller Apr 30, 2026
f23bd36
fix: do not shadow image-label writing by omero metadata
jo-mueller May 4, 2026
164f524
feat: handle image-label/omero metadata version on write
jo-mueller May 4, 2026
75695fd
feat: cover omero/image-label metadata in writer test
jo-mueller May 4, 2026
5f5aa45
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 4, 2026
4e424bd
feat: allow appending to Multiscales
jo-mueller May 4, 2026
847cf08
tests: add tests for omero and labels metadata roundtrip
jo-mueller May 4, 2026
15b1b5a
doc: update class import in docs
jo-mueller May 4, 2026
d576201
docs: add more docs for label handling
jo-mueller May 4, 2026
ae3d38d
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller May 4, 2026
061271f
chore: typos
jo-mueller May 4, 2026
50a826c
docs: Document class-based API and direct read/write side-by-side
jo-mueller May 6, 2026
3917247
Merge branch 'master' into introduce-image-class
jo-mueller May 6, 2026
9d532d6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 6, 2026
18b7618
docs: fix class API references and reran notebooks
jo-mueller May 6, 2026
447546c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 6, 2026
3494b73
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 6, 2026
7066de7
Delete test.ipynb
jo-mueller May 11, 2026
81c942b
Merge remote-tracking branch 'upstream/master' into introduce-image-c…
jo-mueller May 13, 2026
0156fd1
fix: fix function args
jo-mueller May 13, 2026
2b4844f
Apply suggestions from code review
jo-mueller May 13, 2026
1cd20ac
refactor: move legacy reader in subfunction
jo-mueller May 15, 2026
4efc92a
feat: set all fields of image classes on read
jo-mueller May 15, 2026
31476fb
chore: consolidate import types
jo-mueller May 15, 2026
6f873a0
feat: add test for axis/data shape missmatch
jo-mueller May 15, 2026
4a782df
feat: allow method to be None (may be unknown on import from remote)
jo-mueller May 15, 2026
13e9731
chore: remove duplicate code
jo-mueller May 15, 2026
6fe665a
feat: fix label append in labels metadata
jo-mueller May 15, 2026
0cb1a67
tests: add 0.3 with only 3 axes to test data
jo-mueller May 15, 2026
8c4c5a5
feat: **metadata kwargs for passage of omero and image-label emtadata
jo-mueller May 15, 2026
a924e25
doc: fix 0.4 writing in docs
jo-mueller May 15, 2026
264335d
docs: sync filename between code and markdown text
jo-mueller May 15, 2026
53d22b8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 15, 2026
0507c76
feat: better safeguardagainst wrong downsampling method for labels
jo-mueller May 15, 2026
0d08149
feat: add typing to legacy function
jo-mueller May 15, 2026
b558ea7
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller May 15, 2026
56bf8e5
chore: mypy type safety
jo-mueller May 15, 2026
8ab91e1
feat: add setters for labels, omero and image-labels attributes
jo-mueller May 16, 2026
e9e2910
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2026
ea02db6
refactor: Refactor into OMEZarrImage, OMEZarrMultiscale and OMEZarrLa…
jo-mueller May 22, 2026
918cf2f
docs: Update docs
jo-mueller May 22, 2026
1ee9609
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2026
175b9cb
feat: feet omero and image-label into classes for old API backwards c…
jo-mueller May 22, 2026
e0b6ab4
feat: make legacy import detect image-label, too
jo-mueller May 22, 2026
1a9aeb6
refactor: remove references to ngff
jo-mueller May 22, 2026
f70815e
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller May 22, 2026
1c43597
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2026
4db6707
chore: clean debug statement in test
jo-mueller May 22, 2026
5b51eb1
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller May 22, 2026
1847608
fix: precommit fixes
jo-mueller May 26, 2026
2ddd584
refactor: remove commented out old code
jo-mueller May 26, 2026
5740332
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2026
4172b50
chore: pre-commit fixes
jo-mueller May 26, 2026
ecc158d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2026
6f05d85
fix: roll back bad refactor
jo-mueller May 26, 2026
df27972
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller May 26, 2026
cadc335
chore: better exception catch and typing
jo-mueller May 26, 2026
c5b68fd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2026
b533ce2
refactor: move channels-specific kwargs into derived class
jo-mueller May 26, 2026
594118b
feat: strengthen validation and verbosity of scale/axes/etc wrangling
jo-mueller May 27, 2026
70f5b31
docs: improve docstrings
jo-mueller May 27, 2026
e2217a5
docs: update classes autodoc
jo-mueller May 27, 2026
5f965a7
docs: expand parameters documented in basic write notebook
jo-mueller May 28, 2026
0db8af6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 28, 2026
d746027
chore: precommit fix
jo-mueller May 28, 2026
0007494
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 28, 2026
aec4cda
tests: add more tests for omero metadata kwargs
jo-mueller May 28, 2026
3203e0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 28, 2026
d9b7202
feat: make color channel active by default
jo-mueller May 30, 2026
ab2416c
refactor: remove redundant validation block
jo-mueller May 30, 2026
1f75eba
docs: demo more features in basic writing
jo-mueller May 30, 2026
18feea5
refactor: remove duplicate ome-zarr-models from test deps
jo-mueller May 30, 2026
d9392f4
docs/refactor: update pyramid customization notebook
jo-mueller May 30, 2026
d560b26
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 30, 2026
9bcb082
feat: omero version key only in 0.4
jo-mueller Jun 1, 2026
e02b79b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 1, 2026
2d5b39e
feat: no hex strings
jo-mueller Jun 1, 2026
e36ed5e
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller Jun 1, 2026
7c5143b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 1, 2026
7a5f28e
feat: add escape for non-multiscale groups
jo-mueller Jun 1, 2026
ebacff7
Merge branch 'introduce-image-class' of https://github.com/jo-mueller…
jo-mueller Jun 1, 2026
95a7b48
feat: allow channel metadata for single/zero channel images
jo-mueller Jun 1, 2026
5b4aa53
fix: adjust dimensions written in old write function
jo-mueller Jun 3, 2026
3c0f8d8
feat: hard-remove prepending #
jo-mueller Jun 8, 2026
9967971
feat: remove # from color defaults
jo-mueller Jun 8, 2026
e7b7f06
Update docs/source/basic/write_image.ipynb
jo-mueller Jun 8, 2026
cd2dfdd
Update ome_zarr/classes/image.py
jo-mueller Jun 9, 2026
44e1071
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 9, 2026
09388e7
docs: add metadata to documented attributes
jo-mueller Jun 11, 2026
171ec55
docs: fix rendering of image classes
jo-mueller Jun 11, 2026
d9bad78
chore: used clean type check rather then assertion
jo-mueller Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ parts:

- caption: Advanced
chapters:
- file: advanced/labels/index
sections:
- file: advanced/labels/adding_labels
- file: advanced/labels/labels_metadata

- file: advanced/sharding
- file: advanced/build_custom_pyramid
- file: advanced/write_hcs_plate
Expand All @@ -30,6 +35,7 @@ parts:
chapters:
- file: api
sections:
- file: api/image
- file: api/writer
- file: api/reader
- file: api/io
Expand Down
130 changes: 108 additions & 22 deletions docs/source/advanced/build_custom_pyramid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"\n",
"Multi-resolution pyramids are an integral part of ome-zarr image data\n",
"and enable fast rendering of large images.\n",
"The entrypoints to writing ome-zarr images in ome-zarr-py ({py:func}`ome_zarr.writer.write_image` and {py:func}`ome_zarr.writer.write_labels`)\n",
"The entrypoints to writing ome-zarr images in ome-zarr-py ({py:func}`ome_zarr.classes.image.OMEZarrMultiscale`, {py:func}`ome_zarr.writer.write_image` and {py:func}`ome_zarr.writer.write_labels`)\n",
"build these pyramids under the hood as delayed dask arrays based on the settings for the scaling functions and scale factors.\n",
"\n",
"In this example, the downsampling will be applied in all spatial dimensions *except the z dimension*, which will be left at a scale factor of 1.\n",
Expand All @@ -20,36 +20,78 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 1,
"id": "642955b1",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"from ome_zarr import OMEZarrImage, OMEZarrLabels, OMEZarrMultiscale\n",
"from ome_zarr.writer import write_image\n",
"\n",
"scale_factors = [2, 4, 8]\n",
"rng = np.random.default_rng(0)\n",
"data = rng.poisson(lam=10, size=(64, 64, 64)).astype(np.uint8)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a8f0defa",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 16,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import numpy as np\n",
"\n",
"from ome_zarr.writer import write_image\n",
"\n",
"scale_factors = [2, 4, 8]\n",
"rng = np.random.default_rng(0)\n",
"data = rng.poisson(lam=10, size=(64, 64, 64)).astype(np.uint8)\n",
"\n",
"write_image(\n",
" data,\n",
" \"test_ngff_image.ome.zarr\",\n",
" axes=\"zyx\",\n",
" scale_factors=scale_factors,\n",
" )"
")"
]
},
{
"cell_type": "markdown",
"id": "c3f7a5aa",
"metadata": {},
"source": [
"Or, if you choose to work with the {py:class}`ome_zarr.classes.image.OMEZarrMultiscale` and {py:class}`ome_zarr.classes.image.OMEZarrImage` classes directly,\n",
"they accept the same arguments:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d0315903",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ngff_image = OMEZarrImage(data, axes=\"zyx\")\n",
"ngff_multiscales = OMEZarrMultiscale(ngff_image, scale_factors=scale_factors)\n",
"\n",
"ngff_multiscales.to_ome_zarr(\"test_ngff_image_multiscales.ome.zarr\")"
]
},
{
Expand All @@ -66,7 +108,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 4,
"id": "60dcd278",
"metadata": {},
"outputs": [
Expand All @@ -76,7 +118,7 @@
"[]"
]
},
"execution_count": 17,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -108,7 +150,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 5,
"id": "877ab60d",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -136,7 +178,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"id": "859ca482",
"metadata": {},
"outputs": [
Expand All @@ -146,7 +188,7 @@
"[]"
]
},
"execution_count": 19,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -161,6 +203,38 @@
")\n"
]
},
{
"cell_type": "markdown",
"id": "9b33ad31",
"metadata": {},
"source": [
"Again, the {py:class}`ome_zarr.OMEZarrMultiscale` accepts the same argument:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "84c73869",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ngff_image = OMEZarrImage(data, axes=\"zyx\")\n",
"ngff_multiscales = OMEZarrMultiscale(ngff_image, scale_factors=scale_factors, method=\"nearest\")\n",
"\n",
"ngff_multiscales.to_ome_zarr(\"test_ngff_image_multiscales.ome.zarr\")"
]
},
{
"cell_type": "markdown",
"id": "893a1b3b",
Expand All @@ -175,20 +249,32 @@
"you will want to use a method that preserves the label values, such as {py:func}`ome_zarr.scale.Methods.NEAREST`.\n",
"\n",
"See also section on [writing labels](basic:labels)\n",
"```\n",
"\n",
"```"
"If you specifically want to create a labels image, you can use the {py:class}`ome_zarr.classes.image.OMEZarrLabels` class.\n",
"It provides the same functionality as the {py:class}`ome_zarr.classes.image.OMEZarrMultiscale` class, but the downsampling function used under the hood defaults to {py:func}`ome_zarr.scale.Methods.NEAREST`,\n",
"which is typically the most appropriate for labels data.\n",
"\n",
"For more information on writing labels data, see the [labels writing section](advanced/labels/index)."
]
},
{
"cell_type": "markdown",
"id": "fbbeecf3",
"cell_type": "code",
"execution_count": null,
"id": "2e5edc2e",
"metadata": {},
"source": []
"outputs": [],
"source": [
"ngff_image = OMEZarrImage(data, axes=\"zyx\")\n",
"ngff_multiscales = OMEZarrLabels(ngff_image, scale_factors=scale_factors)\n",
"\n",
"ngff_multiscales.to_ome_zarr(\"test_ngff_image_multiscales_labels.ome.zarr\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ngff-spec",
"display_name": "ome-zarr (3.12.12)",
"language": "python",
"name": "python3"
},
Expand Down
Loading
Loading