12. Geometry Types¶
A store lists its geometries in the root object’s geometry_types. No
geometry has root fields of its own; they differ in links_convention
and in which arrays and link families a level carries. The snippets are
zarr_vectors objects written by the reference implementation, cut
where marked ... (fields: §8).
12.1 Point Clouds¶
Arrays:
vertices/; optionallyvertex_fragments/(required for multi-fragment chunks),vertex_attributes/<name>/,object_index/(when points are objects, e.g. nuclei) andgroups.links_convention: irrelevant, and may be omitted (default"implicit_sequential"). Nolinks/0/family; a pyramid’slinks/+1/andlinks/-1/may still appear.Spatial indexing: per-bin fragments let a reader slice to single bins (§6.3). A 3-D level may use octree chunks.
Multi-resolution: each surviving object becomes one centroid metavertex per coarse bin.
{"kind": "root", "geometry_types": ["point_cloud"],
"chunk_shape": [200.0, 200.0, 200.0], "base_bin_shape": [50.0, 50.0, 50.0], ...}
12.2 Meshes¶
Faces:
link_width = 3for triangles, 4 for quads, and so on;links_convention = "explicit".Volume cells: a volume mesh stores one solid cell per record and declares it with the family’s
element(tetra,pyramid,wedge,hexahedron; §10.6.6), so a 4-wide record is a tetrahedron rather than a quad. Several types share a family aselement: "mixed", padded to the widest. Its boundary surface is the cell faces that belong to one cell only.Raw (
verticesencoding: "raw"): positions invertices/; faces inside a chunk inlinks/0/0.0.0_0.0.0/, partitioned bylink_fragments/.Draco (
encoding: "draco"): eachverticescell is one Draco bitstream holding positions and intra-chunk faces; there is nolinks/0/0.0.0_0.0.0/.Cross-chunk faces: records at a non-zero offsets segment, two offsets joined by
_—0.0.+1_0.0.+1straddles the+zseam,0.0.+1_0.+1.0spans three chunks.Winding MUST survive: either
directed = true(no sort, no permutation index) or an undirected canonical family whose non-intra records carryperm_idx(§10.6.5).Multi-resolution: decimation or per-object metavertices, with chunk-scale growth at coarse levels. A raw level may set
link_fragments_aligned: truewhen link fragmentkholds exactly the faces whose first vertex is in vertex fragmentk.Volume pyramids: a coarse level of a volume mesh has its own cells; fine cells are not carried down, since a fine cell is far smaller than a coarse bin. Two ways to make them:
On the bin lattice (
coarsening_method: "per_object"): for each object, every 2 × 2 × 2 block of bins the object fills becomes onehexahedron(from hexahedra) or sixtetra(from other elements) joining those bins’ metavertices. Each metavertex on the coarse boundary moves to the centroid of the fine boundary vertices in its bin, which keeps faces of the volume in place (edges and corners round off by up to a bin). A move that would invert a cell is undone; cells still inverted are dropped. The volume is filled without gaps.Decimated elsewhere (
coarsening_method: "manual"): any valid mesh of the same objects, written as the level. Itsparent_level,bin_shapeandbin_ratioare recorded as for a built level, andlinks/±deltaMAY link each parent vertex to the nearest vertex of the same object.
Either way the levels are joined by object ids and cross-level vertex links (§10.8), not by cells: a cell’s vertices are all on one level.
Surface pyramids (
per_object): vertex clustering. Each face is re-pointed at its vertices’ bin metavertices; faces left with a repeated metavertex collapse, and faces over the same metavertices are kept once.Per-face and per-cell attributes come down with them: a coarse face takes the fine faces that clustered onto it, a coarse cell the fine cells whose centroid lies in its block. Floating-point values are averaged, weighted by area or volume; integer and boolean values take the value with the most area or volume.
{"kind": "links_family", "level_delta": 0, "link_width": 3, "directed": false,
"store": "canonical", "sid_ndim": 3, "num_links": 800, "num_physical_records": 800}
A tetrahedral volume mesh:
{"kind": "links_family", "level_delta": 0, "link_width": 4, "directed": false,
"store": "canonical", "sid_ndim": 3, "element": "tetra",
"num_links": 162, "num_physical_records": 162}
12.3 Skeletons¶
Arrays:
vertices/,vertex_fragments/, and usually alinks/0/family of parent edges; per-vertexradius,vertex_typeand so on.link_width = 2, not 1.link_width = 1writes theselfsegment, a bare reference with no offsets, so it cannot name a second chunk; it suits a cross-level parent pointer (delta ≠ 0). A parent edge that may cross a chunk boundary needs both endpoints located.Parent→child order MUST survive:
directed = truestores it verbatim; an undirected canonical family addsperm_idxto each cross-chunk record.links_convention:"explicit"writes every parent edge;"implicit_sequential_with_branches"(recommended) makesparent_of(i) = i - 1implicit, solinks/0/0.0.0holds only branch links and links across fragment boundaries (~50 rows for a 10k-vertex neuron with 50 branches). Edges that leave a chunk are always written.Cross-chunk parent: parent in chunk A, child one step along
+z→ one record(parent_vi, child_vi)in thelinks/0/0.0.+1cell at A.Multi-resolution: path simplification keeping branch points.
A skeleton written whole has an undirected family with perm_idx on its
cross-chunk arrays; one streamed chunk by chunk has "directed": true:
{"kind": "root", "geometry_types": ["skeleton"],
"links_convention": "implicit_sequential_with_branches", ...}
{"kind": "links", "dtype": "int64", "offsets": [[0, 0, 1]], "has_perm": true,
"link_width": 2, "level_delta": 0, "nonempty_chunks": [...]}
12.4 Streamlines / Polylines¶
Arrays:
vertices/,vertex_fragments/(one fragment per segment per chunk). No intra-chunk link array.lineis the two-vertex case;polylineandstreamlineshare one layout.links_convention:"implicit_sequential"— vertexiconnects toi + 1within a fragment.Cross-chunk continuation: a
link_width = 2record inlinks/0/<offsets>, in chunk A’s cell, joins a segment’s last vertex in A to the next segment’s first vertex. Order MUST survive, as for skeletons. A store whose streamlines each sit in one chunk has nolinks/group.Objects: one per streamline; mode-2 manifest blocks chain shared segments (
shared_fragments), mode 0 / 1 otherwise.Multi-resolution: fewer points per streamline at coarser levels.
{"kind": "root", "geometry_types": ["streamline"], "links_convention": "implicit_sequential",
"cross_level_storage": "implicit",
"format_capabilities": ["preserved_object_ids", "shared_fragments", "multiscale_links"], ...}
12.5 Custom Geometries¶
Writers may add a non-canonical entry to geometry_types; readers
should treat unknown types as raw vertex and link arrays. A custom
geometry uses the existing node kinds
(§3.7), since a
reader SHOULD reject a kind it does not recognise. Any link_width
and record semantics are allowed. Level-4 checks
(§13.1) apply
only to the canonical types.