Point clouds
Vertices with any attributes you need: cells, nuclei, microscopy and LiDAR points. A box query returns exactly the points inside it.
Point clouds in the specZarr Vectors is a format for N-dimensional vector data on Zarr v3, built to scale. Space is split into chunks, so a reader fetches only the chunks a region touches and separate writers can fill different chunks at once, on a local disk or in S3, GCS or Azure.
pip install zarr-vectorsVertices sit in spatial chunks. Links join them, inside a chunk or across its border. Objects are lists of fragments across chunks. Points, streamlines, skeletons, graphs and meshes differ only in how they use these.
Vertices with any attributes you need: cells, nuclei, microscopy and LiDAR points. A box query returns exactly the points inside it.
Point clouds in the specOrdered vertices per object, as in tractography. A box query returns every whole streamline that passes through it.
Streamlines in the specBranching links per object, such as neurons in connectomics. A link that crosses a chunk border records which neighbouring chunk its other end lives in.
Skeletons in the specVertices and links of any shape. Numbering is local to each chunk, so separate writers can fill different chunks with no global vertex IDs.
Graphs in the Python docsTriangle, quad or tetrahedral faces, stored as links three or four vertices wide, or Draco-encoded chunk by chunk.
Meshes in the specEach coarser level doubles the bin size and merges the vertices in each bin into one at their centroid, so a viewer reads only the level it needs. The levels carry OME-Zarr multiscale metadata, so any viewer can find them.
Create a store, write points, read back one box and build coarser levels. The same calls work for every geometry, on a local disk or in the cloud.
import numpy as np import zarr_vectors as zv schema = zv.Schema( bounds=((0.0, 0.0, 0.0), (1000.0, 1000.0, 1000.0)), kind="point_cloud", layout=zv.Layout(cells=5), ) ds = zv.create("scan.zarrvectors", schema=schema) rng = np.random.default_rng(42) ds.add_points(rng.uniform(0, 1000, size=(100_000, 3)).astype(np.float32)) # reads only the chunks the box touches r = ds.select(bbox=((100, 100, 100), (200, 200, 200))).read() # two coarser levels, each doubling the bin size ds.build_pyramid(factors=[(2.0, 1.0), (2.0, 1.0)])
# a file in, a store out (the format comes from the extension) zvtools convert points.csv points.zv --chunk-shape 250,250,250 # and back out again zvtools convert points.zv points.ply # streamlines, skeletons, meshes and surfaces too zvtools convert tracts.trx tracts.zv zvtools convert neuron.swc neuron.zv zvtools convert surface.gii surface.zv
Store layout, arrays, metadata, spatial indexing, multi-resolution and conformance.
Read the specOpen a store, select a region or a set of objects, read and edit it, and build new stores.
Python docsConvert to and from CSV, PLY, LAS, TRK, TRX, SWC, OBJ, GIfTI, Neuroglancer precomputed and more.
Tools docsngplatform is a workspace around Neuroglancer. It opens Zarr, OME-Zarr and Zarr Vectors datasets in the browser, from cloud storage or from files on your computer.
The format itself: store layout, arrays, metadata, spatial indexing, multi-resolution, cross-chunk links, encodings and conformance. A draft, released to start the conversation.
The metadata layer of the format, proposed as a Zarr convention: a JSON schema and validator for the attributes that mark a node as part of a Zarr Vectors store. It does not define the cell encodings; the specification does.
The Python library: open a store, select a region or a set of objects, read and edit it; build stores with ingest converters, pyramid builders and exporters. Local disk, S3, GCS or Azure.
Converters and workflows on top of zarr-vectors: CSV, PLY, LAS, TRK, TRX, SWC, OBJ, GIfTI, Neuroglancer precomputed and more, with resolution pyramids and the zvtools command line.
A sharding codec that groups neighbouring chunks along an octree's Z-order into objects of bounded size, without changing the chunk grid Zarr sees. Built for point clouds in zarr-vectors.
A workspace around Neuroglancer that shows Zarr, OME-Zarr and Zarr Vectors datasets, with plugins for track filtering, registration, annotation and segmentation. Runs in the browser.
GPU computational fluid dynamics, with every geometry, mesh and result held in Zarr Vectors stores.