Metadata-Version: 2.5
Name: kiln-render
Version: 0.1.0
Summary: Jupyter widget for Kiln: stream and explore large OME-Zarr volumes in your notebook with WebGPU.
Project-URL: Homepage, https://kilnrender.com
Project-URL: Repository, https://github.com/kilnrender/kiln-jupyter
Author: Martin Panknin
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.9
Requires-Dist: anywidget>=0.9
Provides-Extra: dev
Requires-Dist: jupyterlab; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Description-Content-Type: text/markdown

# kiln-jupyter

Jupyter widget for [Kiln](https://kilnrender.com): stream and explore large OME-Zarr volumes in your notebook with WebGPU.

<img width="1721" height="873" alt="image" src="https://github.com/user-attachments/assets/bf524e41-8428-4995-bc6c-f1deb49f3f76" />


```bash
pip install kiln-render
```

```python
import kiln_render as kiln

v = kiln.view("https://d39zu0xtgv0613.cloudfront.net/chameleon-16bit")
v
```

Every field syncs both ways. Set it from Python to change the view; `camera` also follows the mouse.

```python
v.mode = "mip"
v.auto_contrast()  # fit the window to the data, e.g. after changing url
v.camera  # [rotation x, rotation y, distance, target x, y, z]
```

| Field | Values |
|---|---|
| `url` | OME-Zarr image or Kiln sharded volume URL |
| `mode` | `dvr`, `mip`, `iso`, `slice` |
| `colormap` | `grayscale`, `grayscale-inverted`, `hot`, `cool`, `viridis`, `plasma`, `coolwarm`, `seismic` |
| `window_center`, `window_width` | 0–1; `None` fits it to the data once loaded |
| `up` | volume axis that points up: `x`, `y`, `z`, `-x`, `-y`, `-z` |
| `camera` | orbit state, as in Kiln's `cam` URL parameter |
| `height` | pixels |
| `status` | loading state or error, set by the browser |

See [examples/quickstart.ipynb](https://github.com/kilnrender/kiln-jupyter/blob/main/examples/quickstart.ipynb).

## Requirements

- Works in JupyterLab, VS Code and Google Colab (in Colab: `!pip install kiln-render`).
- A browser with WebGPU, such as Chrome or Edge.
- The browser reads the data, so the URL must be reachable from it and allow cross-origin requests.
- Kiln itself is loaded from jsDelivr at a pinned version (`KILN_URL` in `src/kiln_render/widget.js`), so the browser needs internet access.

## License

Apache-2.0
