Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neuroglancer Local

A small, dependency-free macOS app for opening supported datasets from your local filesystem in Neuroglancer.

Double-click the app, choose a volume, and it starts a loopback-only HTTP server and opens Neuroglancer in a native visualization window. Volume files never leave the Mac.

Supported local data

  • Neuroglancer Precomputed directories (a dataset root containing info)
  • Zarr v2/v3 and OME-Zarr directories (.zarr, .zarray, .zgroup, or zarr.json). Plain Zarr groups open each child array as a layer.
  • N5 directories (.n5 or attributes.json)
  • NIfTI .nii and .nii.gz files
  • TIFF and OME-TIFF (.tif, .tiff, .ome.tif, .ome.tiff)
  • HDF5 (.h5, .hdf5, .hdf), with automatic or explicit dataset-key selection
  • NumPy (.npy, .npz)
  • MRC (.mrc, .map, .rec)
  • PNG, JPEG, and BMP images (shown as a one-slice volume)

Precomputed, Zarr/OME-Zarr, N5, and NIfTI are streamed directly through the loopback server. The other formats use a small bundled Python adapter based on Neuroglancer's LocalVolume API. Compressed TIFF, NPZ, and segmentation inputs may be loaded fully into memory; for very large data, a chunked format is preferable.

Build the app

Requirements:

  • macOS 13 or newer
  • Apple Command Line Tools (xcode-select --install)
  • Node.js 22 or newer (only for the first build of the bundled Neuroglancer web client)
  • Python 3.10 or newer (only to build the bundled file-format adapter)

Run:

./scripts/build_app.sh

The result is dist/Neuroglancer Local.app. Move it to /Applications if desired. The built app contains its helper runtime and does not require Python, Node.js, or an internet connection when used.

The build pins Neuroglancer 2.41.2, copies its production client into the app bundle, and ad-hoc signs the result for local use.

Use it

  1. Double-click Neuroglancer Local.app and choose the first volume.
  2. Click +, press Command-O, or drop more files or dataset directories anywhere in the viewer to add them as layers. The picker also supports selecting multiple volumes at once.
  3. Click New Visualization… or press Command-N to start an independent Neuroglancer session in a new window; existing visualizations stay open.
  4. For TIFF/HDF5/NumPy/MRC files, confirm whether each volume is an image or segmentation and enter the voxel size in z,y,x order. HDF5 and NPZ array keys are optional; common keys are detected automatically.
  5. Use Open in Browser if you prefer Chrome, Firefox, or Safari.

The most recently added path at the top of the window is editable. Paste or type another path and press Return to add it to the current visualization.

Some Zarr writers use um in dimension_units, while Neuroglancer requires the SI symbol µm. The local server fixes that metadata only in its HTTP response; it never changes the original dataset.

The file server binds to 127.0.0.1 on a random available port. It supports HTTP byte-range requests, which are required for efficient access to formats such as NIfTI and sharded Precomputed data.

Verify

swiftc Sources/Dataset.swift Tests/DatasetDescriptorTests.swift -o .build/dataset-tests
./.build/dataset-tests
./scripts/smoke_test.sh
./scripts/bridge_smoke_test.sh

The smoke tests verify that the built app serves the bundled client, local dataset metadata, byte ranges, and representative NPY, TIFF, HDF5, and MRC volumes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages