Repository navigation
contour_lab: the contour tiler in Ariadne, with a demo on a real Reconstruct series (P4) - #1397
Merged
Merged
Conversation
…nstruct series (P4)
Phase P4 of docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md (§3's Ariadne part, §7's P4 row):
the tiler P3b ported (cvc::tile_contours) as a scene node, a component that drives it, and a
demo on a small redistributable Reconstruct series, native and in arigl-web.
- contour_lab (inc/cvc/gl/ariadne/contour_lab_nodes.h, registered by register_cvcgl_extensions):
reads a contour file (source: { file }, any contour format), another node's contour_stack
(source: { node }, its tiler.contours or grid.contours data key) or a stack on a state key's
data channel (source: { state }), and follows a node or state source when it changes. It draws
each component's contours as polylines under <id>_contours (tag contours). request "tile" runs
tile_stepper as a sliced task on the app's scheduler; the surfaces go under <id>_tiles (tag
tiles) and on the data channel at <node>.tiler.surfaces.<component>, the stack at
<node>.tiler.contours. Keys under <node>.tiler: tile_params and read.* (contour_read_params)
from their tables, with their properties; a row per component (name, colour, visible, tile);
view.*, info.*, warnings; and §1.9's job keys, the phase naming the slice pair being tiled
("tiling slices 3 - 4 42%"). Stop ends the tile at its next step and keeps what the node had.
- contour_tiler.ari: the component picker (tile / show / colour per component), the slice range,
the parameters, Tile / Stop / Load, a progress bar labelled with the slice pair; its INDEX.ari
entry, which ariadne_loader_test requires of every shipped component.
- The loader passes source: { node } through to a custom type's props, as { state } and
{ stream }.
- RealizedScene::pending_work: a custom node's work in flight. cvcgl_ari_golden steps until none
is busy before the capture.
- The demo, examples/ariadne/documents/contour_tiler.ari, tiles the Kuwajima 2019 series (CC0,
doi:10.18738/T8/QP43LB): two axons through 72 sections, a third that branches, and two
mitochondria inside one of them (examples/data/contours/kuwajima2019, 216 KB; its README says
where it came from and what was kept; THIRD_PARTY_NOTICES.md cites it). In the gallery as
contour_tiler_ari.
- Golden: src/cvcGL/test/golden/contour_tiler.ari (sections 14 to 33 of the axon with its
mitochondria). Its PNG comes from CI's llvmpipe run, as orthoslicer's did.
- arigl-web: the docset's contour_tiler.ari, served at /apps/tiler/ with a page config that
preloads the series from /apps/data/ (the repository's examples/data); it prints one line once
its three surfaces are up.
- wasm: arigl-web's and libcvc-examples-web's recipes take clipper2, cdt and shewchuk-predicates
(cvc_revision 2), as do deploy-pages' and publish-cvcgl-wasm's gallery builds (the wasm-mt SDK
itself unchanged), so the browser builds have cvc::planar and the tiler.
- Tests: cvcgl_contour_lab (57 checks): rows, keys and their properties, polylines, the tile
equal to tile_contours, untick, stop, colour and visibility, node and state sources, bad input,
the pending-work probe, two apps, and a cooperative run that spans many frames.
Found: in cooperative mode the tiler's first frames (snapping, curating, augmenting) take 50 to
160 ms each in a native Release build: tile_stepper::step runs on across a phase change, and a
curating or augmenting unit is a whole slice or pair. The roadmap's §3 records it; the fix is
P3b's stepper's, not this node's.
CI's first run drew the window 130 px tall, which hid the third component's row behind a scrollbar. At 160 px all three rows show.
Taken from the ari-golden artifact of package-linux / libcvc-release at 1575da9. The libcvc-release-grpc lane wrote the same bytes.
# Conflicts: # src/cvcGL/CMakeLists.txt
transfix
enabled auto-merge (squash)
November 20, 2026 19:59
AFleetIsLaidOutInTeamsAtRallyPoints (FL1a, #1384) stepped 240 times and asked for the fleet to be 5 m east. On OW1's 1/120 s quantum (#1378) those steps are 2.0 s, not the 2.4 s it was written at, and the fleet starting from rest is 4.36 m east by then. Neither PR's CI saw the other, so master has failed it since OW1 merged. It now steps 3 s of the clock (3 / kSimQuantum), about 9 m east. (cherry picked from commit 1cf1081)
transfix
added a commit
that referenced
this pull request
Nov 21, 2026
…eleton branch P4 added RealizedScene::pending_work, a probe per custom node that is true while its work is in flight, for the golden harness to wait on: the same thing as P2's RealizedScene::settling. The merge keeps master's name and drops settling: - scene_realize.h: one pending_work, its comment covering both (a contour_lab's tile, a mesh_lab's skeleton, a result not drawn yet). - mesh_lab registers its probe on pending_work; cvcgl_mesh_skeleton reads it there. - cvcgl_ari_golden: one loop. It steps until no probe has said busy for kMinFrames frames after the one it went idle on (P2's "until done, then kMinFrames more", with P4's restart when a probe goes busy again), under P2's 180 s ceiling. The skeleton golden gets the frames it was taken with; the contour tiler two more, after its scene has settled. - arigl-web and libcvc-examples-web recipes: clipper2, cdt and shewchuk-predicates, with one comment saying the predicates serve the tiler (P4) and the skeleton (P2). - demos.json and arigl_web_smoke.mjs: both demos and both page cases. - ARIADNE.md, the roadmap and skeleton.ari name pending_work.
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase P4 of
docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md(§3's Ariadne part, §7's P4 row). It puts the contour tiler (cvc::tile_contours, ported in P3b) into Ariadne as a scene node, with a component that drives it, and a demo on a small Reconstruct series that may be redistributed. The demo runs natively and in arigl-web.The node:
contour_labDeclared in
inc/cvc/gl/ariadne/contour_lab_nodes.h;register_cvcgl_extensionsregisters it.Sources. It reads one of:
source: { file }, in any contour format;contour_stack,source: { node }, from that node'stiler.contoursorgrid.contoursdata key;source: { state }.It follows a node or state source and loads again when that source changes.
Contours. Each component's contours are drawn as polylines under
<id>_contours(tagcontours).Tiling.
tiler.request = "tile"runstile_stepperas a sliced task on the app's scheduler.<id>_tiles(tagtiles).<node>.tiler.surfaces.<component>and the stack at<node>.tiler.contours.stopends the tile at its next step. The node keeps whatever surfaces it had.Keys under
<node>.tiler:tile_params, andread.*(contour_read_params), seeded from their parameter tables with their unit, range and doc properties;tile(unticked means left out of the next tile);view.*,info.*andwarnings;tiling slices 3 - 4 42%.The component:
contour_tiler.ariIts
INDEX.arientry is in this PR rather than P11, becauseariadne_loader_testfails on any shipped component that INDEX.ari doesn't list.The data: Kuwajima 2019, CC0
examples/data/contours/kuwajima2019(216 KB) is a subset of a real tSEM series from mouse CA1:Source and licence:
THIRD_PARTY_NOTICES.mdcites it.Only the trace files were downloaded, no images. Other candidates I looked at and ruled out:
The demo
examples/ariadne/documents/contour_tiler.aritiles all five objects. In a native Release build that comes to 20,282 triangles with no warnings. It is in the gallery ascontour_tiler_ari, with a thumbnail.Other changes
source: { node }now reaches a custom node type's props, as{ state }and{ stream }already do.RealizedScene::pending_work: custom nodes report work in flight.cvcgl_ari_goldensteps until none is busy before it captures. A document with no such node takes no extra frames.src/cvcGL/test/golden/contour_tiler.ari(sections 14 to 33 of ax010 and its mitochondria). The PNG has to come from CI's llvmpipe run, as orthoslicer's did, so this PR's first run fails that comparison. The PNG follows in a second commit.contour_tiler.ariis served at/apps/tiler/. Its page config preloads the series from/apps/data/, whicharigl_web_smoke.mjsnow maps to the repository'sexamples/data.cvc::planar, and so the tiler.cvc_revision2. All three are on the catalog for wasm and wasm-mt.deploy-pagesandpublish-cvcgl-wasminstall the same three. Inpublish-cvcgl-wasmthey are installed after the wasm-mt SDK is built, so the published SDK does not change.Tests
cvcgl_contour_lab(headless, 57 checks):tile_contourson the same stack;CVC_SLICED_THREADING=cooperative, as single-threaded wasm runs) that spans many frames.Checked locally
On Windows, MSVC Release, with cvc::planar:
cvcgl_contour_labariadne_loader_testcvcgl_ariadne_realizecvcgl_volume_slicecvcgl_ari_goldenon the new document (local variant)arigl snapshotcontour_tiler: 3 surfaces, 4778 trianglesOn this machine's Intel Arc GPU the existing orthoslicer golden is 630 px off in its volren region. That document has no contour_lab, so this PR doesn't change its frames, and its reference image comes from llvmpipe.
Not checked locally:
deploy-pagesandpublish-cvcgl-wasmedits, which run only on deploys and tags.Found: the tiler's first frames in cooperative mode
In cooperative mode, the first frames of a tile (the snapping, curating and augmenting phases) take 50 to 160 ms each in a native Release build. §1.9's slice is 4 ms. There are two causes, both in P3b's stepper rather than this node:
tile_stepper::stepkeeps going across a phase change, so a budget sized on snapping units (one vertex each) gets spent on curating units.The tiling frames themselves stay near 4 ms. The roadmap's §3 records this; it is a follow-up for the stepper.