napari-zenapi-streaming 0.0.1__tar.gz → 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. napari_zenapi_streaming-0.0.2/CHANGELOG.md +64 -0
  2. {napari_zenapi_streaming-0.0.1/src/napari_zenapi_streaming.egg-info → napari_zenapi_streaming-0.0.2}/PKG-INFO +72 -11
  3. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/README.md +70 -9
  4. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/pyproject.toml +2 -2
  5. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_config.py +2 -3
  6. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_omezarr.py +153 -79
  7. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_pipeline.py +3 -22
  8. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_stream2omezarr.py +19 -71
  9. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_ui.py +124 -37
  10. napari_zenapi_streaming-0.0.2/src/napari_zen_streaming/ZEN_utils.py +141 -0
  11. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/__init__.py +1 -1
  12. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_display_completion.py +29 -0
  13. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_experiment_stream_filter.py +0 -1
  14. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_initial_experiment_selection.py +2 -0
  15. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_live_preview.py +223 -3
  16. napari_zenapi_streaming-0.0.2/src/napari_zen_streaming/_tests/test_omezarr_viewer.py +132 -0
  17. napari_zenapi_streaming-0.0.2/src/napari_zen_streaming/_tests/test_runtime_pixel_type.py +160 -0
  18. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_scene_mosaic.py +131 -3
  19. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2/src/napari_zenapi_streaming.egg-info}/PKG-INFO +72 -11
  20. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zenapi_streaming.egg-info/SOURCES.txt +1 -0
  21. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zenapi_streaming.egg-info/requires.txt +1 -1
  22. napari_zenapi_streaming-0.0.1/CHANGELOG.md +0 -29
  23. napari_zenapi_streaming-0.0.1/src/napari_zen_streaming/ZEN_utils.py +0 -170
  24. napari_zenapi_streaming-0.0.1/src/napari_zen_streaming/_tests/test_runtime_pixel_type.py +0 -105
  25. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/LICENSE +0 -0
  26. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/MANIFEST.in +0 -0
  27. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/setup.cfg +0 -0
  28. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/ZEN_init.py +0 -0
  29. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_logging.py +0 -0
  30. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_scene_geometry.py +0 -0
  31. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/__init__.py +0 -0
  32. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_config.py +0 -0
  33. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_experiment_xml.py +0 -0
  34. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_hcs_ui_option.py +0 -0
  35. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_logging.py +0 -0
  36. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_progress_reporting.py +0 -0
  37. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_tests/test_scene_geometry.py +0 -0
  38. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/_widget.py +0 -0
  39. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/main.py +0 -0
  40. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/misc.py +0 -0
  41. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zen_streaming/napari.yaml +0 -0
  42. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zenapi_streaming.egg-info/dependency_links.txt +0 -0
  43. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zenapi_streaming.egg-info/entry_points.txt +0 -0
  44. {napari_zenapi_streaming-0.0.1 → napari_zenapi_streaming-0.0.2}/src/napari_zenapi_streaming.egg-info/top_level.txt +0 -0
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ ## 0.0.2 - 2026-11-17
4
+
5
+ ### Added
6
+
7
+ - Stream-only viewing in both Display workflows: show incoming native pixels
8
+ with channel filtering, without retaining acquisition history or assembling
9
+ a final mosaic. The final frame remains visible.
10
+
11
+ ### Changed
12
+
13
+ - Require OME-Zarr 0.6 or newer for reading; reject older and prerelease
14
+ metadata with an explicit conversion message.
15
+ - Finalize all streaming output as OME-Zarr 0.6 using a real coordinate-model
16
+ conversion, including collection/HCS containers and retained source tiles.
17
+ Finalization preserves pixel chunks and custom provenance.
18
+ - Generate 0.6 pyramids and read axes/scales from coordinate-system metadata.
19
+ - Require `ngff-zarr>=0.51.0` for released 0.6 conversion and validation.
20
+
21
+ ### Fixed
22
+
23
+ - Read Display-mode pixel types from the API's nested
24
+ `frame_data.pixel_data.pixel_type` field. Regression tests now use actual
25
+ ZEN API frame messages for both GRAY8 and GRAY16.
26
+ - Open completed OME-ZARR collections from their advertised image paths,
27
+ avoiding a `napari-ome-zarr` collection-reader crash when companion XML is
28
+ absent. Preserve reader-provided channel-aware axis labels and existing
29
+ user-layer names.
30
+ - Experiment controls scroll automatically when the plugin dock is too small
31
+ to show all settings.
32
+ - Display mode preserves runtime GRAY8/GRAY16 pixel types and original
33
+ intensities through live preview and final scene assembly, instead of
34
+ independently normalizing tiles to 8-bit.
35
+ - Final display contrast uses the whole channel mosaic, and full-history
36
+ live updates no longer reset contrast for each incoming tile.
37
+
38
+ ## 0.0.1 - 2026-11-01
39
+
40
+ Initial alpha release.
41
+
42
+ ### Added
43
+
44
+ - Live ZEN API streaming into napari, with watch and start-selected modes.
45
+ - Latest-frame preview and per-channel scene mosaics.
46
+ - Configured OME-Zarr streaming through the plugin and standalone CLI.
47
+ - Automatic experiment startup or an armed writer for manual startup in ZEN.
48
+ - HCS plate output from exported well metadata, with generic layout fallback.
49
+ - Raw GRAY8/GRAY16 output, compression, scene mosaics, and optional pyramids.
50
+ - Acquisition completeness reports and preservation of partial output.
51
+ - User-owned gateway configuration and logging.
52
+ - Output-folder access checks before connecting or starting acquisition.
53
+ - Python streaming example with experiment selection and startup overrides.
54
+ - Python 3.12-3.14 support and PyQt6-based cross-platform CI.
55
+
56
+ ### Known Limitations
57
+
58
+ - Live acquisition requires ZEN Blue and its ZEN API Gateway on Windows.
59
+ - Compatible `zen_api` and `zen_api_utils` wheels must be installed separately.
60
+ - OME-Zarr streaming supports only 2D GRAY8 and GRAY16 frames.
61
+ - Display mode retains frames in memory and normalizes preview intensities;
62
+ use configured OME-Zarr output for raw quantitative data.
63
+ - Remote Linux clients are experimental; automated tests do not establish
64
+ acquisition throughput or completeness on real hardware.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: napari-zenapi-streaming
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: ZEN API streaming plugin for napari
5
5
  Author-email: "Krijn H. van der Steen" <k.h.vandersteen@umcutrecht.nl>, Sebastian Rhode <sebastian.rhode@zeiss.com>
6
6
  License-Expression: BSD-3-Clause
@@ -30,7 +30,7 @@ Requires-Dist: grpclib
30
30
  Requires-Dist: pydantic
31
31
  Requires-Dist: python-dotenv
32
32
  Requires-Dist: ome-writers[acquire-zarr]
33
- Requires-Dist: ngff-zarr[dask-image]
33
+ Requires-Dist: ngff-zarr[dask-image]>=0.51.0
34
34
  Requires-Dist: zarr>=3
35
35
  Requires-Dist: zen_api<=2026.11.1,>=2026.5.1
36
36
  Requires-Dist: zen_api_utils<0.2,>=0.1.0
@@ -67,21 +67,53 @@ It supports three workflows selectable from the plugin UI:
67
67
  using the standalone writer.
68
68
 
69
69
  Display workflows use the same live reader and restructure received frames
70
- into per-channel scene mosaics. Channel labels are 1-based; the ZEN API filter
70
+ into per-channel scene mosaics. Native GRAY8/GRAY16 pixel types and intensities
71
+ are preserved in both the live preview and final mosaics, without per-tile
72
+ normalization. Final layers use one contrast range per channel across the
73
+ whole mosaic; napari's contrast controls change only rendering, not pixel
74
+ values. No dtype setting or source-code edit is needed.
75
+ Enable **Stream only (no history or mosaic)** in either Display workflow
76
+ to view arriving frames without retaining an acquisition or assembling a
77
+ final image. Only the newest frame in each UI update batch is rendered,
78
+ and the final frame stays visible when streaming stops. The existing
79
+ channel filter works in this mode, including changes while streaming.
80
+ The option is locked during an acquisition; by default it is off, preserving
81
+ the normal final-mosaic workflow. It does not write an OME-ZARR file.
82
+ Channel labels are 1-based; the ZEN API filter
71
83
  uses zero-based indices. The filter defaults to All channels when a
72
84
  previously selected channel is not available in the new mode or experiment.
73
85
 
74
86
  A **standalone CLI** (`ZEN_stream2omezarr.py`) is also available to stream
75
87
  directly to OME-ZARR without napari.
76
88
 
89
+ ![Napari - Streaming Pixel from ZEN via ZEN-API](docs/napari_zenapi_stream1.png)
90
+
91
+ When finished the resulting OME-ZARR, created from the ZEN pixel stream can be shown in Napari.
92
+
93
+ ![Napari - OME-ZARR from ZEN Acquistion](docs/napari_zen.png)
94
+
77
95
  ## Current status
78
96
 
97
+ - Release: **0.0.2** ([release notes](_release_notes/v0.0.2.md)).
79
98
  - Project phase: alpha / MVP
80
99
  - Primary OS target: Windows for ZEN Blue and the ZEN API Gateway
81
100
  - Python target: `>=3.12, <3.15`
82
101
 
102
+ ### What's new in 0.0.2
103
+
104
+ - Original GRAY8/GRAY16 pixels in Display mode, without per-tile stretching.
105
+ - Optional stream-only viewing with channel filtering and no final mosaic.
106
+ - Scrollable experiment controls for smaller plugin docks.
107
+ - OME-Zarr 0.6 output and collection-opening fixes. Reading older OME-Zarr
108
+ acquisitions now requires explicit conversion outside the plugin.
109
+
83
110
  ## Known limitations
84
111
 
112
+ - OME-ZARR readers require released format version **0.6 or newer**, as
113
+ supported by the installed reader. New output is finalized as **0.6**,
114
+ including images, collections, HCS wells, retained source tiles, and
115
+ pyramids. Older acquisitions are rejected with an explicit conversion
116
+ message; they are never upgraded automatically when opened.
85
117
  - ZEN Blue and the ZEN API Gateway are required for live acquisition.
86
118
  Automated tests use simulated responses; they do not establish end-to-end
87
119
  throughput or frame completeness on real hardware. ZEN Blue and its gateway
@@ -95,7 +127,8 @@ directly to OME-ZARR without napari.
95
127
  pixel types are not supported by that output path.
96
128
  - ZEN-started Display mode monitors the global pixel stream without a known
97
129
  experiment ID; run only one acquisition at a time in this mode.
98
- - Display mode retains received frames in memory for final scene assembly.
130
+ - Display mode retains received frames in memory for final scene assembly,
131
+ unless **Stream only (no history or mosaic)** is enabled.
99
132
  Very large or long acquisitions may exceed available RAM; the standalone
100
133
  unconfigured `--experiment` CLI mode also buffers the acquisition.
101
134
  - Out-of-order OME-ZARR frames use a bounded pending buffer. If the stream
@@ -103,9 +136,8 @@ directly to OME-ZARR without napari.
103
136
  skipped rather than recovered from ZEN. The configured writer retains the
104
137
  partial store, writes `acquisition_status.json`, and reports failure
105
138
  instead of success. Inspect the report before using partial output.
106
- - Display mode currently assumes `uint16` input and normalizes every frame
107
- for preview. Its restructured layers are not raw quantitative image data.
108
- Use configured OME-ZARR output to retain raw GRAY8/GRAY16 intensities.
139
+ - Display mode accepts only 2D `GRAY8` and `GRAY16` frames. Retaining native
140
+ `uint16` pixels uses twice the frame-storage memory of an 8-bit preview.
109
141
 
110
142
  ## Features
111
143
 
@@ -120,10 +152,18 @@ directly to OME-ZARR without napari.
120
152
  selected experiment XML. Changing the selection refreshes these values.
121
153
  - OME-ZARR dtype is derived from the runtime frame `PixelType`; the raw
122
154
  payload size is checked before decoding.
155
+ - The streaming backend's temporary metadata is converted to the OME-Zarr
156
+ 0.6 coordinate-system schema and validated before acquisition completion
157
+ is reported. This metadata-only finalization preserves acquired pixels;
158
+ merely changing version labels is not sufficient.
123
159
  - Incoming frames are assigned from live stream metadata. In particular,
124
160
  `FramePosition.s` and `FramePosition.m` select the scene and tile; frame
125
161
  arrival order and XML TileRegion order are not used for assignment.
126
162
  - Thread-safe napari updates via Qt signals/slots.
163
+ - Scrollable experiment controls keep settings accessible in smaller docks.
164
+ - Completed OME-ZARR collections open their advertised scene images directly
165
+ in napari, without requiring companion OME-XML. Reader-provided channel
166
+ splitting, pyramids, scales, and axis labels are preserved.
127
167
  - Configurable startup and timeout behavior from `.env` or CLI.
128
168
 
129
169
  ## Repository layout
@@ -157,6 +197,8 @@ docs/
157
197
  - Access to the ZEN API certificate (`ZenApiPersonalSigningRootCA.pem`)
158
198
  - Python 3.12-3.14 with Qt >=6.7; PyQt6 is used in CI. PyQt5 is not
159
199
  compatible with napari 0.10 or newer.
200
+ - `ngff-zarr>=0.51.0` for released OME-Zarr 0.6 metadata conversion,
201
+ validation, and pyramid generation.
160
202
  - Authorized, compatible `zen_api` and `zen_api_utils` wheels from
161
203
  [ZEISS OAD](https://github.com/zeiss-microscopy/OAD/tree/master/ZEN-API)
162
204
  (neither package is distributed on PyPI)
@@ -208,9 +250,18 @@ without confirming redistribution rights.
208
250
  For a published PyPI release:
209
251
 
210
252
  ```powershell
211
- python -m pip install napari-zenapi-streaming "napari[pyqt6]" "PyQt6>=6.7,<6.10"
253
+ python -m pip install "napari-zenapi-streaming==0.0.2" "napari[pyqt6]" "PyQt6>=6.7,<6.10"
212
254
  ```
213
255
 
256
+ To upgrade an existing environment with compatible ZEN wheels installed:
257
+
258
+ ```powershell
259
+ python -m pip install --upgrade "napari-zenapi-streaming==0.0.2"
260
+ ```
261
+
262
+ Restart napari after upgrading. Version 0.0.2 writes OME-Zarr 0.6 and does not
263
+ automatically migrate older stores. Use a reader that supports 0.6.
264
+
214
265
  From this checkout, install the plugin:
215
266
 
216
267
  ```bash
@@ -448,9 +499,12 @@ Both Display modes use the full async streaming pipeline (`ZEN_pipeline.py`):
448
499
  `FramePosition` metadata, including its S and M indices. By default,
449
500
  **Show only last frame during live** displays a fixed 2D YX layer and
450
501
  replaces it with the newest frame without rebuilding acquisition history.
451
- Every frame remains in sparse storage for final assembly. Uncheck the
502
+ Unless **Stream only (no history or mosaic)** is enabled, every frame
503
+ remains in sparse storage for final assembly. Uncheck the
452
504
  option to restore the more expensive 7D frame-history preview. The option
453
- is frozen during acquisition and re-enabled after scene assembly.
505
+ is frozen during acquisition and re-enabled after completion.
506
+ Stream-only viewing forces the latest-frame preview, retains no history,
507
+ and leaves the last frame visible without assembling a mosaic.
454
508
  2. **Channel filter** – Changing the filter immediately restarts the pipeline
455
509
  reader. Labels are 1-based, while the gRPC request uses zero-based indices.
456
510
  The initial value comes from `ZEN_CHANNEL_INDEX` in `.env`; leave it empty
@@ -460,8 +514,11 @@ Both Display modes use the full async streaming pipeline (`ZEN_pipeline.py`):
460
514
  `is_experiment_running`. Because ZEN can report completion before all
461
515
  gRPC pixel data arrives, the plugin then waits for the XML-derived unique
462
516
  frame count and uses pixel-stream inactivity as a safety fallback.
517
+ Stream-only viewing instead waits for inactivity without retaining
518
+ unique frame coordinates.
463
519
  - ZEN-started experiments: inactivity timeout (`ZEN_RESTRUCTURE_TIMEOUT`).
464
- 4. **Post-processing** – The streaming layer is removed and each scene's M
520
+ 4. **Post-processing** – Unless stream-only viewing is enabled, the streaming
521
+ layer is removed and each scene's M
465
522
  tiles are placed from their streamed stage coordinates into per-channel
466
523
  5D layers (`S, T, Z, Y, X`). In overlap regions, pixels from the tile with
467
524
  the higher M index replace pixels from lower-M tiles.
@@ -530,6 +587,10 @@ Bypasses the pipeline entirely. When **Start** is clicked:
530
587
  the raw tile within S but does not imply a row or column. In overlaps, the
531
588
  highest M index wins, and gaps in irregular scene outlines remain at the
532
589
  array fill value. The `OME/series` list advertises only the scene mosaics.
590
+ Generic mosaics use image subgroups named `scene_0`, `scene_1`, etc.,
591
+ including when there is only one scene. Each subgroup contains that
592
+ scene's assembled image, not one tile. Some external viewers require
593
+ selecting the image subgroup instead of the collection root.
533
594
  **Keep individual source tiles** controls whether the raw tile groups remain
534
595
  after successful mosaic assembly. It is unchecked by default to avoid
535
596
  duplicated pixel storage. For HCS acquisitions, one frame from every M tile
@@ -15,21 +15,53 @@ It supports three workflows selectable from the plugin UI:
15
15
  using the standalone writer.
16
16
 
17
17
  Display workflows use the same live reader and restructure received frames
18
- into per-channel scene mosaics. Channel labels are 1-based; the ZEN API filter
18
+ into per-channel scene mosaics. Native GRAY8/GRAY16 pixel types and intensities
19
+ are preserved in both the live preview and final mosaics, without per-tile
20
+ normalization. Final layers use one contrast range per channel across the
21
+ whole mosaic; napari's contrast controls change only rendering, not pixel
22
+ values. No dtype setting or source-code edit is needed.
23
+ Enable **Stream only (no history or mosaic)** in either Display workflow
24
+ to view arriving frames without retaining an acquisition or assembling a
25
+ final image. Only the newest frame in each UI update batch is rendered,
26
+ and the final frame stays visible when streaming stops. The existing
27
+ channel filter works in this mode, including changes while streaming.
28
+ The option is locked during an acquisition; by default it is off, preserving
29
+ the normal final-mosaic workflow. It does not write an OME-ZARR file.
30
+ Channel labels are 1-based; the ZEN API filter
19
31
  uses zero-based indices. The filter defaults to All channels when a
20
32
  previously selected channel is not available in the new mode or experiment.
21
33
 
22
34
  A **standalone CLI** (`ZEN_stream2omezarr.py`) is also available to stream
23
35
  directly to OME-ZARR without napari.
24
36
 
37
+ ![Napari - Streaming Pixel from ZEN via ZEN-API](docs/napari_zenapi_stream1.png)
38
+
39
+ When finished the resulting OME-ZARR, created from the ZEN pixel stream can be shown in Napari.
40
+
41
+ ![Napari - OME-ZARR from ZEN Acquistion](docs/napari_zen.png)
42
+
25
43
  ## Current status
26
44
 
45
+ - Release: **0.0.2** ([release notes](_release_notes/v0.0.2.md)).
27
46
  - Project phase: alpha / MVP
28
47
  - Primary OS target: Windows for ZEN Blue and the ZEN API Gateway
29
48
  - Python target: `>=3.12, <3.15`
30
49
 
50
+ ### What's new in 0.0.2
51
+
52
+ - Original GRAY8/GRAY16 pixels in Display mode, without per-tile stretching.
53
+ - Optional stream-only viewing with channel filtering and no final mosaic.
54
+ - Scrollable experiment controls for smaller plugin docks.
55
+ - OME-Zarr 0.6 output and collection-opening fixes. Reading older OME-Zarr
56
+ acquisitions now requires explicit conversion outside the plugin.
57
+
31
58
  ## Known limitations
32
59
 
60
+ - OME-ZARR readers require released format version **0.6 or newer**, as
61
+ supported by the installed reader. New output is finalized as **0.6**,
62
+ including images, collections, HCS wells, retained source tiles, and
63
+ pyramids. Older acquisitions are rejected with an explicit conversion
64
+ message; they are never upgraded automatically when opened.
33
65
  - ZEN Blue and the ZEN API Gateway are required for live acquisition.
34
66
  Automated tests use simulated responses; they do not establish end-to-end
35
67
  throughput or frame completeness on real hardware. ZEN Blue and its gateway
@@ -43,7 +75,8 @@ directly to OME-ZARR without napari.
43
75
  pixel types are not supported by that output path.
44
76
  - ZEN-started Display mode monitors the global pixel stream without a known
45
77
  experiment ID; run only one acquisition at a time in this mode.
46
- - Display mode retains received frames in memory for final scene assembly.
78
+ - Display mode retains received frames in memory for final scene assembly,
79
+ unless **Stream only (no history or mosaic)** is enabled.
47
80
  Very large or long acquisitions may exceed available RAM; the standalone
48
81
  unconfigured `--experiment` CLI mode also buffers the acquisition.
49
82
  - Out-of-order OME-ZARR frames use a bounded pending buffer. If the stream
@@ -51,9 +84,8 @@ directly to OME-ZARR without napari.
51
84
  skipped rather than recovered from ZEN. The configured writer retains the
52
85
  partial store, writes `acquisition_status.json`, and reports failure
53
86
  instead of success. Inspect the report before using partial output.
54
- - Display mode currently assumes `uint16` input and normalizes every frame
55
- for preview. Its restructured layers are not raw quantitative image data.
56
- Use configured OME-ZARR output to retain raw GRAY8/GRAY16 intensities.
87
+ - Display mode accepts only 2D `GRAY8` and `GRAY16` frames. Retaining native
88
+ `uint16` pixels uses twice the frame-storage memory of an 8-bit preview.
57
89
 
58
90
  ## Features
59
91
 
@@ -68,10 +100,18 @@ directly to OME-ZARR without napari.
68
100
  selected experiment XML. Changing the selection refreshes these values.
69
101
  - OME-ZARR dtype is derived from the runtime frame `PixelType`; the raw
70
102
  payload size is checked before decoding.
103
+ - The streaming backend's temporary metadata is converted to the OME-Zarr
104
+ 0.6 coordinate-system schema and validated before acquisition completion
105
+ is reported. This metadata-only finalization preserves acquired pixels;
106
+ merely changing version labels is not sufficient.
71
107
  - Incoming frames are assigned from live stream metadata. In particular,
72
108
  `FramePosition.s` and `FramePosition.m` select the scene and tile; frame
73
109
  arrival order and XML TileRegion order are not used for assignment.
74
110
  - Thread-safe napari updates via Qt signals/slots.
111
+ - Scrollable experiment controls keep settings accessible in smaller docks.
112
+ - Completed OME-ZARR collections open their advertised scene images directly
113
+ in napari, without requiring companion OME-XML. Reader-provided channel
114
+ splitting, pyramids, scales, and axis labels are preserved.
75
115
  - Configurable startup and timeout behavior from `.env` or CLI.
76
116
 
77
117
  ## Repository layout
@@ -105,6 +145,8 @@ docs/
105
145
  - Access to the ZEN API certificate (`ZenApiPersonalSigningRootCA.pem`)
106
146
  - Python 3.12-3.14 with Qt >=6.7; PyQt6 is used in CI. PyQt5 is not
107
147
  compatible with napari 0.10 or newer.
148
+ - `ngff-zarr>=0.51.0` for released OME-Zarr 0.6 metadata conversion,
149
+ validation, and pyramid generation.
108
150
  - Authorized, compatible `zen_api` and `zen_api_utils` wheels from
109
151
  [ZEISS OAD](https://github.com/zeiss-microscopy/OAD/tree/master/ZEN-API)
110
152
  (neither package is distributed on PyPI)
@@ -156,9 +198,18 @@ without confirming redistribution rights.
156
198
  For a published PyPI release:
157
199
 
158
200
  ```powershell
159
- python -m pip install napari-zenapi-streaming "napari[pyqt6]" "PyQt6>=6.7,<6.10"
201
+ python -m pip install "napari-zenapi-streaming==0.0.2" "napari[pyqt6]" "PyQt6>=6.7,<6.10"
160
202
  ```
161
203
 
204
+ To upgrade an existing environment with compatible ZEN wheels installed:
205
+
206
+ ```powershell
207
+ python -m pip install --upgrade "napari-zenapi-streaming==0.0.2"
208
+ ```
209
+
210
+ Restart napari after upgrading. Version 0.0.2 writes OME-Zarr 0.6 and does not
211
+ automatically migrate older stores. Use a reader that supports 0.6.
212
+
162
213
  From this checkout, install the plugin:
163
214
 
164
215
  ```bash
@@ -396,9 +447,12 @@ Both Display modes use the full async streaming pipeline (`ZEN_pipeline.py`):
396
447
  `FramePosition` metadata, including its S and M indices. By default,
397
448
  **Show only last frame during live** displays a fixed 2D YX layer and
398
449
  replaces it with the newest frame without rebuilding acquisition history.
399
- Every frame remains in sparse storage for final assembly. Uncheck the
450
+ Unless **Stream only (no history or mosaic)** is enabled, every frame
451
+ remains in sparse storage for final assembly. Uncheck the
400
452
  option to restore the more expensive 7D frame-history preview. The option
401
- is frozen during acquisition and re-enabled after scene assembly.
453
+ is frozen during acquisition and re-enabled after completion.
454
+ Stream-only viewing forces the latest-frame preview, retains no history,
455
+ and leaves the last frame visible without assembling a mosaic.
402
456
  2. **Channel filter** – Changing the filter immediately restarts the pipeline
403
457
  reader. Labels are 1-based, while the gRPC request uses zero-based indices.
404
458
  The initial value comes from `ZEN_CHANNEL_INDEX` in `.env`; leave it empty
@@ -408,8 +462,11 @@ Both Display modes use the full async streaming pipeline (`ZEN_pipeline.py`):
408
462
  `is_experiment_running`. Because ZEN can report completion before all
409
463
  gRPC pixel data arrives, the plugin then waits for the XML-derived unique
410
464
  frame count and uses pixel-stream inactivity as a safety fallback.
465
+ Stream-only viewing instead waits for inactivity without retaining
466
+ unique frame coordinates.
411
467
  - ZEN-started experiments: inactivity timeout (`ZEN_RESTRUCTURE_TIMEOUT`).
412
- 4. **Post-processing** – The streaming layer is removed and each scene's M
468
+ 4. **Post-processing** – Unless stream-only viewing is enabled, the streaming
469
+ layer is removed and each scene's M
413
470
  tiles are placed from their streamed stage coordinates into per-channel
414
471
  5D layers (`S, T, Z, Y, X`). In overlap regions, pixels from the tile with
415
472
  the higher M index replace pixels from lower-M tiles.
@@ -478,6 +535,10 @@ Bypasses the pipeline entirely. When **Start** is clicked:
478
535
  the raw tile within S but does not imply a row or column. In overlaps, the
479
536
  highest M index wins, and gaps in irregular scene outlines remain at the
480
537
  array fill value. The `OME/series` list advertises only the scene mosaics.
538
+ Generic mosaics use image subgroups named `scene_0`, `scene_1`, etc.,
539
+ including when there is only one scene. Each subgroup contains that
540
+ scene's assembled image, not one tile. Some external viewers require
541
+ selecting the image subgroup instead of the collection root.
481
542
  **Keep individual source tiles** controls whether the raw tile groups remain
482
543
  after successful mosaic assembly. It is unchecked by default to avoid
483
544
  duplicated pixel storage. For HCS acquisitions, one frame from every M tile
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "napari-zenapi-streaming"
3
- version = "0.0.1"
3
+ version = "0.0.2"
4
4
  description = "ZEN API streaming plugin for napari"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12, <3.15"
@@ -33,7 +33,7 @@ dependencies = [
33
33
  "pydantic",
34
34
  "python-dotenv",
35
35
  "ome-writers[acquire-zarr]",
36
- "ngff-zarr[dask-image]",
36
+ "ngff-zarr[dask-image]>=0.51.0",
37
37
  "zarr>=3",
38
38
  "zen_api>=2026.5.1,<=2026.11.1",
39
39
  "zen_api_utils>=0.1.0,<0.2",
@@ -99,8 +99,8 @@ def initialize_user_config() -> Path:
99
99
  return config_file
100
100
 
101
101
 
102
- # Raw ZEN stream dtype used by Display mode and legacy paths. The OME-ZARR
103
- # writer derives its dtype from each runtime frame's PixelType instead.
102
+ # Compatibility fallback for legacy OME-ZARR configuration. Frame decoding
103
+ # derives its dtype from each runtime frame's PixelType.
104
104
  DEFAULT_PIXEL_DTYPE = np.dtype(np.uint16)
105
105
 
106
106
 
@@ -117,7 +117,6 @@ class ZENConfig:
117
117
 
118
118
  # Data configuration
119
119
  pixel_dtype: np.dtype = field(default_factory=lambda: DEFAULT_PIXEL_DTYPE)
120
- display_dtype: np.dtype = field(default_factory=lambda: np.dtype(np.uint8))
121
120
 
122
121
  # Processing configuration
123
122
  image_buffer_size: int = 100