napari-virtual-reader / general workflow
Keep the pixels in the original file.
Build a virtual OME-Zarr view, then decode source regions when napari requests them.
- Select a local source; no converted image is required.
- refkv describes the source as reference-backed Zarr with OME image metadata.
- The plugin builds lazy layers without scanning their pixels.
- Viewing triggers source reads and decoding; decoded arrays exist in memory, not as a converted file.
Open path
Raw images and archives meet at the same reader.
flowchart TD
Input["Local input"] -->|select raw image| Raw["zarrify"]
Input -->|select VZIP| Archive["refkv.zarr.open"]
Raw -->|wrap references| Store["Zarr group"]
Archive -->|expose references| Store
Store -->|find OME images| Layers["Lazy layers"]
Raw -.->|supply live CZI factors| CZI["CZI assembly"]
Layers -->|route supported CZI| CZI
Layers -->|keep other formats| View["napari image layers"]
CZI -->|stack compatible scenes| View
View -->|select layer| Metadata["Metadata inspector"]
The reader discovers OME-Zarr image groups, maps axes and transforms, and creates a layer per acquisition channel. It preserves stored pyramid levels. It does not create missing resolution levels by downsampling.
Why CZI needs an extra path
refkv can expose irregular or overlapping CZI tiles separately from its regular image levels. Reading only those levels can omit native resolution or show just an overview.
The CZI assembler uses tile coordinates and resolution factors to expose those pieces as aligned image levels. Placement restores the missing view; lazy chunk reads avoid materializing the whole slide. Laziness alone does not solve tile placement.
Colour is not a channel count
CZI packed BGR(A) samples become one RGB(A) layer. Codec-aware ordering retains already-decoded RGB. Scalar fluorescence channels stay separate.
Scenes can share a slider
Compatible CZI scenes stack along S. Different shapes, scales, dtypes, axes or level counts stay separate. Original scene transforms remain in metadata.
Registered filename extensions offer the reader; they do not guarantee that refkv can parse the file or decode its codecs.
User workflow
Choose a file above; inspect the selected layer below.
Open Data as virtual OME-ZARR
Progress and status
Selected layer metadata
Zarr structure / Metadata
source series / channel ome zarr_structure czi_assembly (when present) reader_warning (when present)
Plugin dock
- Select the source; a dock drop only selects it.
- Optionally choose a VZIP destination.
- Click Open; a worker prepares the lazy layer data.
- The Qt thread adds the returned layers.
File > Open or canvas drop
Choose this reader. The same combined dock opens or is reused. These paths do not save an archive automatically.
Inspect without reading pixels
The inspector follows the active layer and uses a metadata-only snapshot. An unrelated layer clears it.
The Zarr tree describes the original reference store. For an assembled CZI, the displayed mosaic can have different shapes and levels; inspect czi_assembly as well.
Persistence
A VZIP saves the map, not the image pixels.
Choose the original CZI for mosaic assembly. Reopened VZIPs may show only regular levels and warn about remaining tiles. Source access must also be permitted by refkv's policy.
Saving stages the archive before publishing it. Replacing an existing destination requires confirmation; a failed write preserves the old archive. Cancelling the save dialog cancels that open action.
Boundaries
Lazy does not mean every file is complete.
OME images + usable codecs
Unsupported tiles remain
No supported OME image
Supported 2D CZI mosaics use deterministic tile placement, not registration or blending. This plugin does not use czitools or libCZI as a fallback.
The incomplete-tile warning is also CZI-specific. No warning for another format is not proof of a complete view.
Remote inputs, non-image tables, arbitrary tensors and stores without OME image metadata are outside the current reader scope. Decode errors propagate; zero-filled mosaic gaps are not an error-recovery mechanism.
Implementation sources
Reader: read_images, _layers, _stack_czi_scenes, read_and_save_image
Dock: preparation worker, Qt delivery and save interaction
Metadata inspector
Editable Mermaid diagram
Describes the current implementation, not a guarantee of upstream format support. Continue with the detailed CZI assembly guide.