scroll-lens / CONNECT.md
SharpMeow's picture
Scroll Lens: Connect your tool accordion; click moves the crosshair by default (merged #117)
5136010 verified
|
Raw History Blame Contribute Delete
4.24 kB

A newer version of the Gradio SDK is available: 6.31.0

Upgrade

Connect your tool: Scroll Lens

The twelve scans Scroll Lens reads are open data, and each one reads straight from its URL in your own tool. The page itself is also an API and an MCP server.

Checked 2026-10-24. Generated from connect.json by kit spaceconnect in ChaseHendrick/Scrolls.

A scan it reads, example PHerc0139 2.399 um

https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr

License: CC BY-NC 4.0 (Vesuvius Challenge open data). The other eleven are listed by list_scans; all are read live, never copied here. Scroll Lens reads level 0.

Python (zarr) (tested 2026-10-24)

# pip install "zarr>=3" fsspec aiohttp
import zarr

root = zarr.open_group("https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr", mode="r")  # OME-Zarr, zarr v2
a = root["3"]  # level 0 is full resolution; level L is 2**L times coarser
print(a.shape, a.dtype, a.chunks)
block = a[4810:4874, 1657:1721, 1657:1721]  # (z, y, x); reads only the chunks it touches

villa's vesuvius package (tested 2026-10-24)

# pip install "vesuvius[volume-only]"
from vesuvius import Volume

v = Volume(type="zarr", path="https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/3")  # one pyramid level
block = v[4810:4874, 1657:1721, 1657:1721]

VC3D (from villa's source)

In VC3D (villa's volume-cartographer), open or create a project, then
File > Attach Remote Zarr... and paste:

https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr

It accepts http, https and s3 OME-Zarr roots.

neuroglancer (tested 2026-10-24)

https://neuroglancer-demo.appspot.com/#!%7B%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22zarr%3A%2F%2Fhttps%3A%2F%2Fvesuvius-challenge-open-data.s3.us-east-1.amazonaws.com%2FPHerc0139%2Fvolumes%2F20260102150214-2.399um-0.2m-78keV-masked.zarr%2F%22%2C%22name%22%3A%22A%20scan%20it%20reads%2C%20example%20PHerc0139%202.399%20um%22%7D%5D%2C%22layout%22%3A%224panel%22%7D

curl (tested 2026-10-24)

curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/.zattrs            # OME multiscales metadata
curl -s https://vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/3/.zarray     # one level: shape, chunks, dtype, codec

Call Scroll Lens from code or an agent

https://huggingface.co/spaces/SharpMeow/scroll-lens

License: Code Apache 2.0; models as listed by list_scans; scans CC BY-NC 4.0. A new point uses the caller's ZeroGPU minutes. Model output, not a reading.

Python /list_gallery (tested 2026-10-24)

# pip install gradio_client
from gradio_client import Client

client = Client("SharpMeow/scroll-lens")
result = client.predict(api_name="/list_gallery")

Python /list_scans (tested 2026-10-24)

# pip install gradio_client
from gradio_client import Client

client = Client("SharpMeow/scroll-lens")
result = client.predict(api_name="/list_scans")

Python /random_point (tested 2026-10-24)

# pip install gradio_client
from gradio_client import Client

client = Client("SharpMeow/scroll-lens")
result = client.predict(scan="PHerc0139", seed=0, api_name="/random_point")

curl /list_gallery (tested 2026-10-24)

URL=https://sharpmeow-scroll-lens.hf.space
EVENT=$(curl -s -X POST $URL/gradio_api/call/list_gallery -H 'Content-Type: application/json' \
  -d '{"data": []}' | python3 -c 'import json,sys; print(json.load(sys.stdin)["event_id"])')
curl -sN $URL/gradio_api/call/list_gallery/$EVENT

MCP (Claude, Cursor and other agents) (tested 2026-10-24)

{
  "mcpServers": {
    "scroll-lens": {
      "url": "https://sharpmeow-scroll-lens.hf.space/gradio_api/mcp/sse"
    }
  }
}

Tool list: https://sharpmeow-scroll-lens.hf.space/gradio_api/mcp/schema