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.

PREPARE / METADATA AND ARRAY GRAPHS maps adapts requests regions reads bytes Local imageCZI, TIFF, ... refkv + Zarrreferences + OME Lazy napari layersDask arrays Original bytesstay on disk Zarr + codecsdecode on demand VIEW / PIXEL READS
  1. Select a local source; no converted image is required.
  2. refkv describes the source as reference-backed Zarr with OME image metadata.
  3. The plugin builds lazy layers without scanning their pixels.
  4. Viewing triggers source reads and decoding; decoded arrays exist in memory, not as a converted file.
Fig. 1Virtualization avoids a persistent pixel copy, not the memory and decoding needed to display an image.

Open path

Raw images and archives meet at the same reader.

select raw imageselect VZIPwrap referencesexpose referencesfind OME imagessupply live CZI factorsroute supported CZIkeep other formatsstack compatible scenesselect layerLocal inputzarrifyrefkv.zarr.openZarr groupLazy layersCZI assemblynapari image layersMetadata inspectorselect raw imageselect VZIPwrap referencesexpose referencesfind OME imagessupply live CZI factorsroute supported CZIkeep other formatsstack compatible scenesselect layerLocal inputzarrifyrefkv.zarr.openZarr groupLazy layersCZI assemblynapari image layersMetadata inspector
Fig. 2Only a raw CZI supplies the live calibration summary used for new tile assembly.

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.

CZI-only assembly. Other formats bypass this extra path. They can still display images and pyramids already exposed by refkv, but this plugin does not yet assemble their separate irregular tile arrays.

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

Image file or VZIP archive / Browse
[ ] Save VZIP archive
Open

Progress and status

Selected layer metadata

Zarr structure / Metadata

Filter properties
source
series / channel
ome
zarr_structure
czi_assembly (when present)
reader_warning (when present)

Plugin dock

  1. Select the source; a dock drop only selects it.
  2. Optionally choose a VZIP destination.
  3. Click Open; a worker prepares the lazy layer data.
  4. 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.

Fig. 3The opener and inspector share one dock but retain separate jobs; this is a schematic, not a screenshot.

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.

indexes saves still references original source Original filekeep unchanged Reference layoutin memory VZIP archiveoptional file Not a portable, self-contained pixel backup.
Fig. 4Saving preserves refkv's reference layout, not the plugin's runtime CZI mosaic or live pyramid-factor summary.

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.

Supported path

OME images + usable codecs

mapsOMELayers
Incomplete CZI

Unsupported tiles remain

Warning
Explicit failure

No supported OME image

No image layer
Fig. 5A pyramid alone is not evidence that native resolution or every source tile is displayed.

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.

Experimental software. Validate scientific results independently, especially overlap regions and views with warnings.

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.