Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lodstone

Lodstone is a renderer-neutral engine for view-dependent streaming of multiscale chunked arrays. Given a pyramid, camera, and renderer target, it selects visible levels and chunks, prioritizes them by visual value, and delivers updates without blocking the viewer.

Lodstone is an alpha. The core supports Python 3.11–3.14 and only requires NumPy. Viewer integrations currently use development branches while their streaming APIs stabilize.

Install

pip install lodstone==0.1.0a1
pip install "lodstone[ome-zarr]==0.1.0a1"  # remote OME-Zarr sources

For the runnable viewer demos below, clone Lodstone so the example scripts are available:

git clone --depth 1 https://github.com/kephale/lodstone.git
cd lodstone

All commands use the public ZSNS001 Zebrahub light-sheet dataset at timepoint 400. Clone the viewer repositories next to lodstone, giving this layout:

work/
├── lodstone/
├── napari/
├── ndv/
└── chimerax-ome-zarr/

Run with napari

The napari integration uses a single multiscale layer, bounded resident intervals, partial texture uploads, and a shared Lodstone runtime.

cd ..
git clone --depth 1 --single-branch --branch lodstone-integration \
  https://github.com/kephale/napari.git
cd napari
python3 -m venv .venv
.venv/bin/python -m pip install -e ".[pyqt6,progressive]"
.venv/bin/python -m pip install -e "../lodstone[ome-zarr]"

cd ../lodstone
../napari/.venv/bin/python examples/napari_zebrahub.py \
  --time 400 --ndisplay 3

Add --trace-chunks to log plans, cache hits, source reads, and evictions, or --diagnostic-levels to color pixels by the pyramid level that supplied them.

Lodstone streaming in napari

Run with ndv

Both ndv backends use the same source, planner, runtime, and dense clipmap target. Only the canvas renderer changes.

cd ..
git clone --depth 1 --single-branch --branch lodstone-integration \
  https://github.com/kephale/ndv.git
cd ndv
python3 -m venv .venv
.venv/bin/python -m pip install -e ".[pyqt,vispy,pygfx]"
.venv/bin/python -m pip install -e "../lodstone[ome-zarr]"

cd ../lodstone
../ndv/.venv/bin/python examples/ndv_dense.py \
  --backend vispy --time 400

Close the VisPy window, then run the identical data path with PyGFX:

../ndv/.venv/bin/python examples/ndv_dense.py \
  --backend pygfx --time 400
VisPy PyGFX
ndv with VisPy ndv with PyGFX

Run with ChimeraX

The ChimeraX integration is provided by the OME-Zarr bundle's streaming branch. The commands below use ChimeraX Daily on macOS; adjust CHIMERAX_PYTHON and CHIMERAX for another installation.

cd ..
git clone --depth 1 --single-branch --branch codex/lodstone-streaming \
  https://github.com/kephale/chimerax-ome-zarr.git
cd chimerax-ome-zarr

export CHIMERAX=/Applications/ChimeraX_Daily.app/Contents/bin/ChimeraX
export CHIMERAX_PYTHON=/Applications/ChimeraX_Daily.app/Contents/bin/python3.14

"$CHIMERAX_PYTHON" -m pip install --no-deps --force-reinstall ../lodstone
PYTHONPATH="$PWD" "$CHIMERAX_PYTHON" -m chimerax.core --nogui --exit \
  --cmd "devel build ."
"$CHIMERAX_PYTHON" -m chimerax.core --nogui --exit --cmd \
  "toolshed install $PWD/dist/chimerax_ome_zarr-1.0.0a1-py3-none-any.whl noDeps true reinstall true"

"$CHIMERAX" --cmd \
  "open ngff:https://public.czbiohub.org/royerlab/zebrahub/imaging/single-objective/ZSNS001.ome.zarr streaming true"

Restart ChimeraX after replacing Lodstone or reinstalling the bundle.

Lodstone streaming in ChimeraX

How it fits

Source + View + Target
          │
        Planner
          │
        Stream
  • Source exposes pyramid metadata and asynchronous regional reads.
  • View captures displayed axes, selections, viewport, and camera matrix.
  • Target describes renderer residency and applies completed updates.
  • Planner selects visible levels and chunks within the target budget.
  • Stream owns scheduling, cancellation, caching, batching, and stale-work rejection.

Storage chunks and display tiles are independent. A renderer may request small bricks while a remote Zarr source stores larger chunks; Lodstone coalesces and caches the native reads needed to assemble those updates. Multiple layers can share one Runtime while retaining independent stream state.

Dense viewers can reuse Lodstone's complete coarse-to-fine publication path by implementing the small DenseCanvas and DenseHandle protocols. A host that also implements CameraDenseCanvas receives debounced camera replanning from DenseController; ndv's VisPy and PyGFX canvases are the reference implementations. See Dense host integration for the contract and lifecycle.

See Camera-aware multiscale rendering for the planner math and the roadmap for metadata culling, sharding, and virtual texture residency.

For comparable measurements across hosts and rendering backends, see Performance telemetry. Lodstone records planned, source, delivered, staging, and host-dispatch work; render targets may add GPU upload and presentation metrics without exposing renderer APIs to the core.

Viewer status

Viewer Integration Status
ChimeraX OME-Zarr PR 22 3-D clipmap streaming; visually validated
napari integration PR 34 Image and Labels; visually validated
ndv + VisPy kephale/ndv:lodstone-integration Reference ndv backend; visually validated
ndv + PyGFX kephale/ndv:lodstone-integration Same data path; visually validated
SceneX Lodstone SceneXController Dense 2-D/3-D streaming for VisPy and PyGFX

SceneX views can use the same camera-aware dense path without either project depending on a particular renderer:

from lodstone.adapters import SceneXController

controller = SceneXController(view, source)
controller.update_from_scene()

The controller creates ordinary SceneX Image or Volume models, replans on camera changes, and reports dense data submissions and presentations through the standard Lodstone performance snapshot.

Integrations should pin an exact Lodstone prerelease. Compatibility is claimed only for combinations covered by native tests and visual smoke tests.

Develop

uv run --extra test pytest
uv run --group dev ruff check .
uv run --group dev pyright src

The test suite is network-independent. See CHANGELOG.md, RELEASING.md, and the renderer architecture for deeper reference material.

Metadata

Release files for lodstone 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lodstone 0.1.0a2
File Size Uploaded Provenance
lodstone-0.1.0a2.tar.gz 10.6 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lodstone 0.1.0a2
File Interpreter ABI Platform
lodstone-0.1.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 MB

Release files / lodstone-0.1.0a2.tar.gz

Download URL lodstone-0.1.0a2.tar.gz
Size 10.6 MB
Tags Source
SHA-256 checksum
How to use checksums
83574d91efea162ec2a5bef72c249e10d6aa452927f2b5a50a43a70d1e50e8bc
BLAKE2b-256 checksum
How to use checksums
4a134943b1a346978773a18297d60b84fe66f74d76cbbf62b54ec325aa6f386b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / lodstone-0.1.0a2-py3-none-any.whl

Download URL lodstone-0.1.0a2-py3-none-any.whl
Size 76.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85a9ba38a6eb63f73faa733f70ffc673f97730d78f6882d6d54d9a34249f3b4d
BLAKE2b-256 checksum
How to use checksums
fb3ea5fa1a0634d58397b335b8e09afac2d5eefce3f014d5d7166bef2172a3e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Security for lodstone 0.1.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lodstone-0.1.0a2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page