Launch a Neuroglancer viewer for 3D data stored in a Zarr file.
Project description
This repository contains scripts that launch a Neuroglancer viewer to visualize 3D data stored in a Zarr file, making it accessible via a web browser.
Using Neuroglancer with Zarr files is particularly useful for viewing very large datasets, because the lazy loading scheme prevents the entire array from being loaded into memory.
open-zarr-file-remote— run the viewer on a remote machine and view it locally via an SSH tunnel.open-zarr-file_local— run the viewer on the same machine you'll view it on (no SSH tunnel needed).
Remote use: open-zarr-file-remote
In this example, I am using port 9090:
- Create the SSH tunnel
ssh -L 9090:localhost:9090 -Y my-remote-machine
- Run the script (the port must match the SSH tunnel port)
open-zarr-file-remote 9090 /path/to/file.zarr
- This script will print the URL where you can access the neuroglancer viewer on your local machine. It will look something like this:
Open in browser: http://localhost:9090/v/14a31d6d2d4d11d95fa35f51daadc97da9100571/. Open the link in your browser on your local machine.
Local use: open-zarr-file-local
When the zarr file lives on the same machine you'll view it on, no SSH tunnel or port is needed — neuroglancer picks a free port itself:
open-zarr-file-local /path/to/file.zarr
The script will print a URL like Open in browser: http://127.0.0.1:46789/v/14a31d6d2d4d11d95fa35f51daadc97da9100571/. Open it in your browser.
Optional resolution argument
Both scripts accept an optional voxel resolution (in nanometers) as the last argument. For example:
open-zarr-file-remote 9090 /path/to/file.zarr 10
open-zarr-file-local /path/to/file.zarr 10
Input file types
This package expects data in the zarr format. Zarr version 3 and zarr version 2 are supported. If using zarr version 2, the data must be saved with name 'data'.
Example of how to save zarr v2 files:
import zarr
root = zarr.open_group("/path/to/file.zarr", mode='w', zarr_format=2)
root.create_array('data', data=array)
neuroglancer-volume-viewer works with zarr files saved using methods from the pyxalign package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neuroglancer_volume_viewer-0.1.1.tar.gz.
File metadata
- Download URL: neuroglancer_volume_viewer-0.1.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88cde51d43439c564e3cc835dc4edb509b5368a5949b9859e959709325c3e231
|
|
| MD5 |
3b47dba4cb1774ca7d6d5844be9facd7
|
|
| BLAKE2b-256 |
86ca108bf89cba366290d7e951989de874fa98d774bc9e0b9ae400883b1d6c04
|
File details
Details for the file neuroglancer_volume_viewer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: neuroglancer_volume_viewer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a73dca4f91fa30a40afe1759bb9641701084bf35ed20898064a887aad81eb89d
|
|
| MD5 |
7c43066ccbe21a97d0fefbdd8add52dc
|
|
| BLAKE2b-256 |
ff1a514ed5642190e2cb96c052329d2255f268f28a416aff4e0ea97a4b250a96
|