Skip to content

0.5.0: BIL's BrAinPI OME-Zarr and Neuroglancer views - #1

Merged
aaronkanzer merged 1 commit into
mainfrom
brainpi
Oct 2, 2026
Merged

aaronkanzer merged 1 commit into
mainfrom
brainpi

Conversation

@aaronkanzer

Copy link
Copy Markdown
Member

At the suggestion of a BIL maintainer: surface BrAinPI, BIL's on-the-fly OME-Zarr and Neuroglancer service.

  • DatasetDetail.brainpiroot / brainpidata / has_brainpi from the metadata record (28 percent of datasets list files; mostly Imaris).
  • brainpi_links(), brainpi_views(), brainpi_paths(), first_omezarr(), disk_path(). View URLs always come from the service: /bil/data/ is served under a bil_data/ prefix, so nothing is string-assembled.
  • open_zarr() and thumbnail() fall back to the BrAinPI OME-Zarr view when the download server has nothing this package reads. An Imaris-only dataset previews in 3 s instead of raising.
  • zarr_levels() survives a store with no directory listing.
  • CLI: scigantic-bil views <target>.

Verified live 2026-10-02 (see CHANGELOG). Seven new live tests; mypy strict clean.

BIL runs BrAinPI (brainapi.brainimagelibrary.org), which serves Imaris,
.omehans, TeraFly and OME-Zarr files as OME-Zarr pyramids and
Neuroglancer precomputed on the fly. Each /retrieve record lists the
files BIL curates for it (Assets.brainpiroot, Assets.brainpidata; 28
percent of datasets in a 1,500-dataset sample, mostly Imaris).

- DatasetDetail.brainpiroot / brainpidata / has_brainpi.
- brainpi_links(path | url | FileEntry): the views BrAinPI offers for one
  file, from the service's own answer, cached. The URLs are not a prefix
  of the disk path (/bil/data/ becomes bil_data/), so none are built
  here. brainpi_views(dataset), brainpi_paths(detail),
  first_omezarr(dataset), disk_path(url).
- open_zarr() and thumbnail() fall back to the first BrAinPI OME-Zarr
  view when the download server holds nothing this package reads; an
  Imaris-only MORF dataset previews in 3 s instead of raising.
- zarr_levels() tolerates a store with no directory listing (a BrAinPI
  view) and probes the declared levels.
- CLI: scigantic-bil views <id | /bil/path | url>.

Checked live 2026-10-02: the listed files are BIL's curation, not the
service's limit. A single TIFF is served as a 2-D pyramid of that slice
and an unlisted OME-Zarr store is served; a directory of slices and a
missing file get nothing. A .jp2 view answered neither in 120 s nor
410 s, so JPEG 2000 views are returned as links and never opened
automatically.
@aaronkanzer
aaronkanzer merged commit 090677c into main Oct 2, 2026
6 checks passed
@aaronkanzer
aaronkanzer deleted the brainpi branch October 2, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant