Skip to content

volume_grid: the Segmentation tab, labels on the slices, class surfaces in 3D (P9) - #1452

Merged
transfix merged 19 commits into
masterfrom
p9/volume-grid-segment
Nov 24, 2026
Merged

transfix merged 19 commits into
masterfrom
p9/volume-grid-segment

Conversation

@transfix

Copy link
Copy Markdown
Owner

P9 of the VolumeRover library ports (docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md §4, §5, §7): volume_grid v2, the Segmentation tab. The grid's segment request segments its volume from its point classes (GenSeg's fast marching, P5), draws the labels on the slices, puts each class's surface in the 3D view, and the tab saves the classes through the app.

What it adds

Core (no GL), ports lane natively and wasm-mt

  • cvc::class_surfaces (inc/cvc/volume/class_surfaces.h): the surface of every class of a label volume in one marching-cubes pass. A cell holding several classes adds a piece to each, so 252 capsomers cost one pass. Vertices sit at grid-edge midpoints, shared within a class; surfaces close at the volume's faces; Taubin smoothing keeps each class's volume; normals point out. It is a resumable stepper (reading, extracting, smoothing, normals), with its job and a parameter table.
  • cvc::volume_grid_segment_stepper (inc/cvc/volume/volume_grid_segment.h): segment_stepper, then class_surfaces_stepper on its labels, as one stepper with one progress bar and one Stop. A few times a second it keeps the labels so far (new segment_stepper::labels_so_far, read while classifying and marching).
  • Also in that header:
    • the tab's view table: show, opacity, show_surfaces, surface_opacity, make_surfaces, live;
    • result rows coloured as the seeding point classes (critical points: feature gold, background blue and hidden);
    • color_labels, a slice's see-through layer;
    • grid.segment.* keys kept in grid sessions.

Node (VolumeGridSegmentation, owned by VolumeGridNode; a few one-line hooks in the node)

  • request: segment runs it on the grid's in-memory volume, seeded by the shown classes, as a sliced task publishing the §1.9 job keys under grid.*. stop keeps the last result, and a new volume clears it.
  • Each plane gets a labels child: a nearest-texel quad, pushed back in depth less than the slice so points and lines stay on top. It shows the labels so far while the fronts advance, then the result.
  • Each class's surface goes in a segments group under <id>_surfaces, which slice views hide.
  • Data channel: grid.segment.labels, grid.segment.classes (class volumes named after the classes), grid.segment.border and grid.segment.surfaces.<n>. The classes are listed as rows under grid.segment.rows; editing a row's colour or visible redraws or hides that class.
  • A document's segment: props seed the keys, and request: runs one request once the volume is there.
  • register_cvcgl_extensions now installs the segmentation intrinsics per app (D1 found that no host did).

save_segments goes through the app, as P8 part 3 did for its files.

  • The tab's Save classes is (data-save <grid>.grid.segment.classes FILE "volume"). The volume encoder now writes a list of volumes as one file's variables: a .rawv like VolumeGridRover's SegTmp.rawv, one variable per class, named after it.
  • Save labels writes the labels.
  • The node writes no file.

Component and Ariadne

  • volume_grid_segmentation.ari: the volume_grid_segmentation window and the volume_grid_segmentation_tab controls. volume_grid.ari includes the controls as its Segmentation tab (tab: on the include, so no extra nesting level).
  • The color: widget takes fmt: hex: one #rrggbb field beside the swatch (Backend::color_hex; other backends fall back to the default picker). Both volume_grid class tables use it.

pycvc and DSL

  • pycvc: class_surfaces (keywords, result, job), segment_class_rows, read_segment_rows / write_segment_rows, color_labels (numpy), volume_grid_segment_view_params, volume_grid_segment_job.
  • DSL: segment.surfaces in its three forms (waiting, -async, -start).

Demo, golden, web

  • examples/ariadne/documents/volume_grid_segment.ari segments VolRover's Visible Human CT (examples/data/fem/vh4.rawiv). Seeds sit on the spine and in each arm; above 72, the spine gets 10,744 voxels and the arms 6,404 and 3,946. A Bones view shows the class surfaces. It is in the gallery as volume_grid_segment_ari, with a thumbnail.
  • Golden: src/cvcGL/test/golden/volume_grid_segment.ari.
  • arigl-web smoke case volume_grid_segment.ari: a scripted pick, then segment on the page, waiting for the status line.

Tests

Local results, Windows MSVC Release:

  • class_surfaces_test 15, volume_grid_segment_test 10, segmentation_intrinsics_test 15 (incl. segment.surfaces, cooperative and threaded), segmentation_test 18 (+3 skipped without the real maps), volume_grid_test 21, ariadne_data_test 16, ariadne_runtime_test 349, ariadne_loader_test 251.
  • cvcgl_volume_grid_segment 54 checks, threaded. Run with CVC_SLICED_THREADING=cooperative CVC_REQUIRE_RENDER=1 it does 56, including the labels so far drawn while marching and the offscreen render of the label colours.
  • cvcgl_volume_grid 79, cvcgl_ariadne_volume_grid 17, cvcgl_ariadne_views 56, cvcgl_contour_lab 57, cvcgl_multi_app.
  • wasm-mt under node: class_surfaces_test 15, volume_grid_segment_test 10, volume_grid_test 21, segmentation_intrinsics_test 15.
  • pycvc: pycvc_volume_grid_segment, plus pycvc_segmentation, pycvc_jobs, pycvc_volume_grid, pycvc_params, pycvc_volume_slice and pycvc_point_classes.
  • The arigl-web smoke document run natively with arigl snapshot prints volume_grid segment: segmented: 1 classes, 28224 voxels labelled, 1 surfaces (17760 triangles).
  • No-singleton checks: two apps and two threads in the core, cvcGL and pycvc tests. No allowlist lines were added.

Not verified locally:

  • Golden PNGs. volume_grid_segment.png is new, and volume_grid.png / volume_grid_quad.png change, since the tab bar gains Segmentation. All three come from this PR's llvmpipe artifact, as P8's did. Locally only the new tab differs from the committed volume_grid golden, apart from the GPU-only crosshair pixels P8 recorded.
  • The arigl-web smoke case in headless Chrome, Linux, macOS, and the sanitizer lanes. The new tests are in SAN_CXX_TESTS (ci.yml stays CRLF; one line changed).

Found

  • cvcgl_ariadne_volume_grid overflowed Windows' default 1 MB stack (0xC00000FD) once the component nested one level deeper. It now has the 8 MB document-host stack every host and cvcgl_ari_golden have (cvc_document_host_stack).
  • On vh4 the bone and soft-tissue intensities overlap (bone about 85-105, tissue 45-70). A bone seed and a tissue seed above 45 do not split there: the bone class floods the body. A bone-only threshold (72) gives one class per bone, which is what the demo uses.

Overlaps

These PRs touch the same files: #1443 and #1446 (the P8 session's) and #1451 (P10's Contours tab).

  • In VolumeGridNode, volume_grid.ari, extensions.cpp, the CMake lists and the docs, the hunks sit side by side and both sides are kept.
  • With P10 it was agreed that stop goes to each tab's own job, and that P10's tile job publishes under grid.tile.*.
  • Whichever lands second merges master in.

cvc::class_surfaces: the surface of every class of a label volume in one
marching-cubes pass (midpoint vertices shared within a class, closed at the
volume's faces), Taubin smoothing and outward normals, as a resumable
stepper with its job and a parameter table.

cvc::volume_grid_segment_stepper: segment_stepper, then class_surfaces on
its labels, as one stepper with one progress bar and one Stop, keeping the
labels so far for the slices while it marches
(segment_stepper::labels_so_far). The Segmentation tab's view table, its
rows (coloured as the seeding point classes), color_labels for the slice
layer, and grid.segment.* in grid sessions.

Tests: class_surfaces_test, volume_grid_segment_test (ports lane).
…ss surfaces) (P9)

VolumeGridSegmentation, owned by VolumeGridNode: grid.request `segment`
runs volume_grid_segment_stepper on the grid's volume, seeded by its shown
point classes, as a sliced task (the §1.9 job keys under grid.*); `stop`
keeps the last result; a new volume clears it. The labels draw on each
plane as a see-through `labels` layer (live while the fronts advance), and
each class's surface in a `segments` group under the grid's surfaces. The
result is on the data channel (grid.segment.labels, classes, border,
surfaces.<n>), its classes as rows under grid.segment.rows; parameters
from the seeded_segmentation, view and class_surface tables, seeded from a
document's segment: props.

Component volume_grid_segmentation.ari, the volume_grid component's
Segmentation tab. Ariadne's volume encoder writes a list of volumes as one
file's variables (Save classes: VolumeGridRover's SegTmp.rawv).
register_cvcgl_extensions installs the segmentation intrinsics per app;
segment.surfaces (class_surfaces) joins segment.seeded.

Test: cvcgl_volume_grid_segment (and its cooperative run).
…, web smoke (P9)

pycvc: class_surfaces (keywords, its result, its job), the tab's rows and
colour layer, its view table, and volume_grid_segment_job (the tab's run as
one job); test_pycvc_volume_grid_segment.py.

segmentation_intrinsics_test covers segment.surfaces in its three forms;
ariadne_data_test the volume encoder's list of volumes (one .rawv,
variables named after the volumes).

Demo examples/ariadne/documents/volume_grid_segment.ari: VolRover's Visible
Human CT (examples/data/fem/vh4.rawiv) with a seed on the spine and in each
arm, segmented above 72 on open, the classes' surfaces in a Bones view; in
the gallery as volume_grid_segment_ari. Golden volume_grid_segment.ari (its
PNG follows from CI's llvmpipe render), arigl-web smoke case
volume_grid_segment.ari (a pick, then segment on the page).

The Segmentation tab: volume_grid_segmentation (a window) and
volume_grid_segmentation_tab (the controls), included with tab: so the tab
adds no nesting level. cvcgl_ariadne_volume_grid gets the 8 MB document
host stack (it overflowed Windows' 1 MB on the deeper component).

Ariadne's color widget takes fmt: hex (one #rrggbb field beside the
swatch, Backend::color_hex); the volume_grid class tables use it.

ci.yml: class_surfaces_test and volume_grid_segment_test join
SAN_CXX_TESTS. Docs: ARIADNE.md (the grid's segmentation keys, the
encoder, the components), the roadmap's "What P9 built".
…op check no longer races a fast cooperative run (P9)

- src/cvcGL/test/golden: volume_grid_segment.png (new), volume_grid.png and volume_grid_quad.png
  (the Segmentation tab, the Point classes table's hex colour fields), from run 44992251035's
  ari-golden-Linux-libcvc-release artifact at 6e568ef.
- cvcgl_volume_grid_segment: on the Linux package runners a cooperative 24^3 run ended within the
  frame after `segment`, before `stop` reached it ("stop ends the run" failed). Between `segment`
  and the next request the test now ticks the nodes without stepping the scheduler, so a
  cooperative run has not begun when `stop` (or a second `segment`) comes.
…olume-grid-segment

# Conflicts:
#	inc/cvc/gl/ariadne/extensions.h
#	src/cvc/tests/port_tests.cmake
#	src/cvcGL/CMakeLists.txt
#	src/cvcGL/ariadne/extensions.cpp
…t rig (P9)

On CI's package-linux lanes the golden's surface views (live mirrors of the main view) were lit by
the document's three_point rig in the Release build and by the default headlight in the Debug one,
so volume_grid_segment.png (from the Release artifact) failed on libcvc-debug: 1.17% of pixels,
all on the surfaces. Rendered locally in Release without the rig, the surfaces look as the Debug
lane drew them. The golden now declares no lights; its PNG follows from this run's artifact.
Taken from run 45042979740's ari-golden-Linux-libcvc-release artifact at
1084dfd, the first run of the golden without the three_point rig.
Both tabs kept: the Contours tab and the Segmentation tab share the node,
its CMake lists, docs and the sanitizer list. `stop` now ends every job the
grid runs (a tile and a segmentation alike), and says "nothing to stop" only
when neither ran; cvcgl_volume_grid_segment checks one stop ending both.
volume_grid.png and volume_grid_quad.png are master's for now: the tab bar
changed on both sides, so they come next from this branch's CI render.
… render (P9)

The tab bar now holds both Contours and Segmentation, and the class
colours show as hex. Taken from run 45078206762's ari-golden-Windows-libcvc-release
artifact; every other document there matched its Linux-made golden within 1.
transfix added a commit that referenced this pull request Nov 23, 2026
…on slow Debug runners (#1462)

CophFleet.TheEnergyAccountStaysAtRoundOffOverALongRun runs the crossing until both agents are
at their goals (767 and 784 ticks). It takes about 4 s in Release and 69.65 s in
package-linux / libcvc-debug on a normal runner (#1413's job 137148518817). A PR's Debug ctest
gives a test without a TIMEOUT of its own 300 s, and on #1452's run 45049798289 (job
137292269354) it timed out on all three tries. On that runner this executable's other cases ran
4.2-4.7 times slower than on #1413's (the golden cases 24 s against 5, the channel-delay test 30
against 7.2), so the long run would have needed about 290-330 s.

The executable gets TIMEOUT 900, as the segmentation action test has for a Debug time of about
100 s: 13 times the normal Debug time, about 2.8 times that slow runner's. The test is
unchanged.

Not shortened in Debug: both agents reaching their goals, with no hit and the energy residual
at round-off, is what the test checks. Not made cheaper: at /Od the learner's updates are about
60 % of the run, the actions 19 % and the exports 15 %, all held bit for bit to GRL-SNAM's G12
golden, so a cheaper step is learner work rather than a test fix.

Checked on Windows with the test built from its sources in a Debug configuration (/Od /Ob0
/RTC1) and this file's cvc_discover_tests wrapper and line: every discovered case has TIMEOUT
900, the eight pass under ctest --timeout 300, and the long run passes under --timeout 5 (the
property wins over the command line). The long run took 17.5 s there, 35 s with the machine
loaded.
…-segment

volume_grid_quad.png conflicted (both sides re-rendered it); kept ours until
CI renders the merged panel.
@transfix
transfix enabled auto-merge (squash) November 23, 2026 06:49
…erge (P9)

The merged panel: the Probe tab's Source combo (#1443) under the five-tab
bar. From run 45106838969's ari-golden-Linux-libcvc-release artifact; the
Windows render of the same run agrees (no pixel beyond 8).
transfix added a commit that referenced this pull request Nov 23, 2026
The closed schema lands after the PRs that add loader keys, so it carries
their keys now:

- notifications: always, as well as a flag (#1450);
- a tray_icon's icon: and auth: (#1450);
- a color picker's fmt: rgb | hex (#1452);
- a load:'s name:, a key or an expression that names the application
  (#1485);
- scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and
  in a scene of its own (#1475).

Master's own new keys need none: #1472's look: wheel:, wheelbase: and
track: sit in world:, which the world rules check, and #1399's region: is
a custom node's own key.

AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs
finds fmt: cmyk and notifications: sometimes.
…p9/volume-grid-segment

VolumeGridNode keeps both the segmentation and the VolumeRenderNode: both
includes, both forward declarations, both ticks; the surfaces group's comment
(header and ARIADNE.md) names the volume, the contours' and the segments.
… into p9/volume-grid-segment

INDEX.ari keeps both new entries (volume_grid_segmentation, http_cache).
volume_grid_contours.png conflicted (#1450 re-rendered it for rows that
flow); kept ours until CI renders the merged panel.
…w keeps its side panel (P9)

With five tabs (Segmentation beside #1451's Contours), volume_grid's side
panel went below its views once its Contours page grew taller than the
window: the vertical scroll bar left 358 px, less than the tabs' least width
(372), so ImGui scrolled them, and the tabs scrolled out of the bar still
counted as the line's width. #1450's flowing row saw the panel run past its
room and moved it to the next line for good. ImGui also spans the bar to the
window's work rect, under the scroll bar (its arrows hidden there), and as
wide as last frame's content in a window that scrolls sideways, which kept
that content too wide frame after frame (a spurious horizontal scroll bar
in volume_grid_segment, the clipped last tab in the earlier goldens).

tab_bar now lays the bar out in the visible room and does not count the
tabs scrolled out of it. 57 ImGui and Ariadne tests pass locally; the
golden harness keeps the panel beside the views.
transfix added a commit that referenced this pull request Nov 24, 2026
)

* Ariadne: a closed .ari schema every load checks, and ari validate

The .ari document's structure gets a formal definition, roadmap section 15,
now docs/ARIADNE.md section 14:

- src/cvc/ariadne/schema/ari.v1.schema.json: one JSON Schema for every
  top-level block, all 35 built-in widget types, the scene, include: and
  load: sites, with descriptions. Every map is closed: an unknown key is an
  error, except x- keys, a custom widget's or node's own keys, and a block an
  app registered or the document declares in customs:. A widget's type is its
  first type key in the loader's order. It keeps to json-schema-validator's
  draft-7 subset.
- CMake embeds it (CvcEmbedText.cmake) for ari_schema_json() and installs it
  under share/libcvc/ariadne/schema/.
- With the validator built in, every load checks the document, its import:ed
  libraries, its load: fragments and each include: expansion (placed in the
  unit's own file), as warnings and LoadResult::schema_issues with line and
  column. The compiled validators live in a cvc::app slot.
- validate_string / validate_file check without loading, the document's own
  units instantiated with their declared args.
- ari validate [--structural-only] [--strict] [--json] and ari schema.
- ci.yml: package-linux's configure assertion also requires the validator.

All 176 shipped documents are valid; reopen_refit.ari gains its missing
meta.min_libcvc. Five loader tests that feed bad values count the loader's own
warnings and check the schema flags the same pointer. New ariadne_schema_test
and ctests for ari validate and ari schema.

* Ariadne schema: scene: clock: hz, the world's rate

OW8 (#1441) gave the scene's clock an hz key: a whole number of ticks a
second from 10 to 240, as sim_rate_valid takes it. The schema takes it the
same way in both clock entries, and ClockBlockTakesAWorldsRate checks that the
schema accepts hz: 60 and flags each rate the loader warns about.

* Ariadne schema: the hosts' blocks in their short forms

wasm: takes a guest's path alone and relay: a relay's URL alone, as
their readers do; a bare server: or world: sets nothing, as theirs do.
The schema took a map only, so WasmWasiTest's `wasm: all.wat`, under
min_libcvc 3.7.13, failed its load on Linux.

* Ariadne schema: the keys the open PRs add to the loader

The closed schema lands after the PRs that add loader keys, so it carries
their keys now:

- notifications: always, as well as a flag (#1450);
- a tray_icon's icon: and auth: (#1450);
- a color picker's fmt: rgb | hex (#1452);
- a load:'s name:, a key or an expression that names the application
  (#1485);
- scene: clock: max_lag:, more than 0 and at most 10 s, in the scene and
  in a scene of its own (#1475).

Master's own new keys need none: #1472's look: wheel:, wheelbase: and
track: sit in world:, which the world rules check, and #1399's region: is
a custom node's own key.

AcceptsWhatTheLoaderTakes takes each new form; FindsEachMistakeWhereItIs
finds fmt: cmyk and notifications: sometimes.
…ender after the tab-bar fix (P9)

The Contours panel stays beside the views, its tabs scrolled behind arrows in
the visible room; the segment window lost its spurious horizontal scroll bar
(one more row shows); quad's right edge moved a few pixels. From run
45274811851's ari-golden-Windows-libcvc-release artifact (Windows and Linux
renders have agreed within 8 on every earlier run).
… ...) into p9/volume-grid-segment

#1464 checks every load against the closed schema, which already takes a
color picker's fmt: rgb | hex. ColorWidgetFmtHexDrawsTheHexPicker counted
every warning of its fmt: hsv load; it now counts the loader's own, as
#1464's loader tests do, and checks that the schema flags that fmt where
it is when the validator is built in.
@transfix
transfix merged commit f32ae43 into master Nov 24, 2026
30 checks passed
@transfix
transfix deleted the p9/volume-grid-segment branch November 24, 2026 12:27
transfix added a commit that referenced this pull request Nov 24, 2026
Conflicts: src/cvcGL/CMakeLists.txt's 8 MB-stack list keeps both sides'
tests; volume_grid, volume_grid_contours and volume_grid_quad take master's
images (#1452 changed their documents) until CI's frames of the merge are
taken.
transfix added a commit that referenced this pull request Nov 24, 2026
volume_grid, volume_grid_contours, volume_grid_quad and #1452's
volume_grid_segment, from CI run 45482759652 (Linux libcvc-release, vtk
9.5.0+cvc.7). Against SH2's previous images only #1452's panel differs (the
Segmentation tab, names and hex colours); against master's, SH2's changes:
a view's overlay text stops at its view, a view drawn in its window's order
covers the tab bar's rule, and the windows show their border and grip.
volume_grid_segment's Bones view is unchanged (within 1).
transfix added a commit that referenced this pull request Nov 25, 2026
…' after #1452, Cmd+Z in the context-menu test

The ci/full run of the first commit (45375289474) passed the six new macOS
goldens on all four lanes and left two failures:

- cvcgl_ari_golden: volren_views (#1498), 882 px beyond +-40. Its four lanes'
  frames are byte-identical, the same picture with box edges and the volren's
  shading a pixel apart. Committed as volren_views.macos.png.
- cvcgl_imgui_context_menu (#1476): "ImGui's undo takes the paste back". The
  test pressed ImGuiMod_Ctrl+Z. With ConfigMacOSXBehaviors (on Apple),
  io.AddKeyEvent swaps Cmd and Ctrl, so that arrives as Super and InputText
  doesn't undo. The test now presses ImGuiMod_Super there, the key a Mac's
  Cmd arrives as, which ImGui turns into its shortcut key. Checked against
  ImGui 1.92.9 with a standalone InputText: with macOS behaviours Ctrl+Z
  leaves 'abc' and Super+Z undoes to 'ab', and the reverse without them.

Master since then has #1452, which re-captured volume_grid, _quad and
_contours for its Segmentation tab and added volume_grid_segment (366 px on
macOS). Their .macos.png are the v4.0.8 tag run's (45478904899) frames,
byte-identical across the four lanes, and the same pictures as the llvmpipe
goldens.
transfix added a commit that referenced this pull request Nov 25, 2026
…ck over them (#1500)

* cvcGL: viewport views drawn into textures, so windows stack over them (shell SH2)

An Ariadne `viewport` widget's view used to be drawn into the window's
frame under all of the UI, with a hole cut in its window's background,
so any window over the view's rect covered it, even one behind the
view's window, and the view's first frame was opaque.

Each view now draws into a texture of its own (Viewport::setTextureSize,
texture()), the widget's size in framebuffer pixels, at the window's own
multisampling and resolved as the window's pixels are; the widget draws
that texture as an image in its window. The window stacks, clips and
scrolls the view like any of its content. The view draws in the window's
render after the widget walk placed it, so its first frame shows it: the
mirror re-syncs and the throttle (refresh_hz) decides as the render
reaches it, and a view made this frame is readied (what it leaves out,
its shadows, its framing) by its widget. Picks, pointer probes and the
wheel map a point on screen to the view's texture
(Viewport::windowToRenderer / rendererToWindow). A scenes: entry's
anchor bakes its shadow maps by drawing one pixel into a texture of its
own. ImGuiBackend::cut_window_background and its background painting go.

Tests: cvcgl_ariadne_view_stacking (a window over a view, a view's
window over another window, the first frame, a clipped and a scrolled
view against the same picture in full, a pick through the scroll), the
view_stacking golden, and the pick and slice-view tests through the new
coordinate mapping. cvcgl_ari_frame_bench measures a document's frame
cost offscreen. The arigl-web CI job now also runs on changes to how a
view draws.

* cvcGL: a mirror's re-sync leaves it alone when nothing it draws changed; docs for SH2

syncMirrorProps took every prop out of a mirror and put it back every
frame, and the next draw of those props was slower for it. With views
now re-synced just before they draw, each view paid that: on
viewer_grid.ari a view's draw took 1.6 ms instead of 0.4. The mirror is
now left alone when it already holds exactly the props and lights it
should draw (same ones, same order), which also takes the cost off the
main view where the old order put it.

ARIADNE.md 5.18: how a view draws (a texture its window shows), its
refresh rate (moving it does not redraw it), a scenes: entry's anchor,
what it costs, and the limits (the view under the UI and the opaque
first frame are gone). The UI-DSL roadmap's render-to-texture tier
notes that rendering a view into a texture is built.

* goldens: view_stacking, and orthoslicer / volume_grid / volume_grid_quad with views drawn into textures

Written under Mesa 25.3.6 llvmpipe (cvcpkg's Windows build; it matches the
grid, menus, scene, widgets and windows goldens to the pixel).

view_stacking is new: a window over a view, a view's window over another
window, a clipped view. The other three change around their views: the
view's window now shows its border, resize grip, scroll bars and tab-bar
separator, which the old background painting around the hole covered, and
in volume_grid a slice view's caption that runs past its view is covered by
the view beside it. Inside the slice views a few nearest-sampled texels at
ties land on the other side under llvmpipe, the view being rasterized at
its texture's origin rather than at its place in the window (none on an
NVIDIA GPU).

* cvcgl_ariadne_volume_grid: project world points to the screen through the view's texture

A view's renderer draws into its texture now, so its display coordinates are
the texture's pixels; the test maps them to the window (rendererToWindow)
before it moves the pointer there, as the pick and slice-view tests do.

* cvcGL: every viewport sends its own lights, where VTK can (UpdateLightingUniformsEveryRender)

The renderers of a window share its shader programs, and VTK 9.5 keeps a
program's light uniforms with only the time they were set
(vtkOpenGLRenderer::UpdateLightingUniforms), not whose lights they are. A
view and the main view draw the same props, so one of them could draw
with the other's lights; which one depended on the order of VTK's
modified times, and differed between Linux and Windows.

cvcpkg's VTK 9.5.0+cvc.7 (cy-pca/cvcpkg#636) adds an opt-in
vtkOpenGLRenderer::UpdateLightingUniformsEveryRender. A compile check
(CVC_VTK_HAS_LIGHTING_UNIFORMS_EVERY_RENDER, as for FinishEveryRender)
finds it, and Viewport turns it on for every renderer it makes: the main
view's, the views', mirrors. An older VTK builds and renders as before.

cvcgl_ariadne_view_stacking compares the main view with a window's view
and without it (a see-through shell around a box the view shows from
its own camera): with the property it checks they match; without it, it
reports how many pixels differ (11,667 of 434,700 here, NVIDIA).
ARIADNE.md 5.18 lists the older-VTK behaviour as a limit.

* cvcgl_ariadne_pick: the module view's pointer maps its renderer's point to the window

master's module-view checks (#1493) took the view's renderer display
point as the window's; the view draws into its texture now, so it goes
through rendererToWindow, as the test's other sections do.

* cvcGL: a window's renderers send their own lights once it has two; goldens on VTK 9.5.0+cvc.7

UpdateLightingUniformsEveryRender moves from Viewport's constructor to
ViewportManager, which turns it on for every renderer of a window once
the window has a second one, and leaves it on when a view goes (the
view's lights may still be in a program). A window that only ever had
one renderer keeps VTK's default: nothing else writes its programs'
lights. With the property on, VTK sends a program's lights in the first
cell-type block that uses it each render; cvcgl_lowmem_fastdraw derives
Fast's trace by deleting empty blocks from the AllCellTypes trace, so
it could not see those uploads move to the next block (its uniform-state
and pixel checks held). Its single-renderer window is back on VTK's
default.

cvcgl_ariadne_view_stacking checks the property is on for both
renderers with a view, and off for the main view alone.

Goldens from CI on vtk 9.5.0+cvc.7 (Linux release and release-grpc,
identical to 1 LSB). Against the same commit on cvc.5 (Windows), only
renderers that drew with another's lights change: the main view in
view_stacking, skeleton and molecule_skeleton, and 23 px of the 3-D view
in volume_grid_contours.

* SceneViews: a view is framed on what it draws, a volren by its volumes' box

A view without show: was framed on whatever its renderer held: the
props ViewportManager primed it with before SceneViews set the view's
filter, until the render re-synced it. With a volren that is the main
view's picture quad, which spans the main camera's frustum (+-145 in
volren_views), so the views framed far out; SH4's golden encodes that,
and its zoom: 1.7 was set against it. The view's own picture of a
volren (VolRenViewActor, bounded by the volumes' box) joins the
renderer only once its first raycast lands, after framing.

- ViewportManager::syncMirror(name): a live mirror's re-sync through
  its filter, now. SceneViews::prepare runs it before framing, so the
  renderer holds what the view will draw (also what it leaves out:
  chrome, tags).
- The bounds of a view without show: take in each volren node it draws
  by its volumes' box, known from the first frame.
- volren_views.ari drops zoom: 1.7: framed on the rods and the volume's
  box, its views look as the golden composed them. The golden itself
  is retaken from CI on vtk 9.5.0+cvc.7 (its rods draw with each view's
  own lights).
- cvcgl_ariadne_node_pick (#1491) maps the view's points through
  rendererToWindow, as the other pick tests do.

Under llvmpipe every other golden's frame is pixel-identical before and
after.

* golden: volren_views on SH2 (views framed on what they draw; vtk 9.5.0+cvc.7)

Its views are framed on the rods and the volume's box (42eed3b), with zoom: 1.7
dropped from the document, so they keep SH4's composition; the windows show
their border and grip over their views; the main view's rods draw with the main
view's own lights. From CI run 45326238844 (Linux libcvc-release); Windows's
frame is within 3 of it.

* ari test: FramesAndTimeout's stuck document gets 4 s, not 1

The timeout counts from before the document loads, and its message names
the test only once the test has started. On a slow runner a Debug build
spent the whole second loading, so the message had no test in it: the
debug lane failed this test on master (f32ae43) and on several branches,
while it passed in about 3 s on others.

* tests: PL-5's pumps are 20 ms, far past a slow step

#1524's package-linux / libcvc-debug failed ExecPool.PL05_ALightGroupIsNotStarved three times: a
message's latency was 2 heavy pumps (1 or 2 of 100), against at most the one in progress. The pool's
virtual time is pump time, and at the default 2 ms budget a step slowed past it (steps of 2-3 ms
were logged in both groups on that runner) ends a light pump before its program takes the message,
which then waits out a heavy pump more. A probe with a 20 us budget shows the same latencies here.

The case now pumps 20 ms with unbounded steps, so every build's heavy pump takes the whole budget and
a light pump outlasts a slow step: 40 of 40 as 4 copies sharing 2 cores, 10 of 10 alone. A steps-only
budget was tried and dropped: a light pump could then run long, and a descheduled one put the light
group tens of heavy pumps behind (latencies of 12 to 107 under the 2-core squeeze).

(cherry picked from commit 67fda68, #1524: the same flake failed
#1500's recipe / ubuntu-22.04 / Debug three times at a651d0c)

* goldens: volume_grid's four on SH2 after #1452 (views in textures)

volume_grid, volume_grid_contours, volume_grid_quad and #1452's
volume_grid_segment, from CI run 45482759652 (Linux libcvc-release, vtk
9.5.0+cvc.7). Against SH2's previous images only #1452's panel differs (the
Segmentation tab, names and hex colours); against master's, SH2's changes:
a view's overlay text stops at its view, a view drawn in its window's order
covers the tab bar's rule, and the windows show their border and grip.
volume_grid_segment's Bones view is unchanged (within 1).

* goldens: macOS images for the documents SH2 re-renders

From ci/full run 45572393826 at 59220fb (package-macos / libcvc-release,
vtk 9.5.0+cvc.7; the debug, release-grpc and release-grpc-static lanes'
frames are within 1 of it).

orthoslicer (a refresh: the view's window shows its border and grip, and
the slices' tied texels), view_stacking (new) and volren_views (new: its
views are framed on what they draw) change with SH2 itself. skeleton,
molecule_skeleton, volume_grid, volume_grid_contours, volume_grid_quad and
volume_grid_segment already failed on master's macOS lane; SH2 re-renders
them too, so their macOS images are taken at SH2's rendering. #1526's
images for these seven are taken at master's and differ from SH2's frames
by 2,414 to 16,792 px; its contour_tiler.macos.png is unaffected.
transfix added a commit that referenced this pull request Nov 25, 2026
…t, ci/full for new goldens (#1526)

* cvcgl_ari_golden: macOS goldens for the six mesh and volume documents added since 11-20

contour_tiler, skeleton, molecule_skeleton, volume_grid, volume_grid_quad and
volume_grid_contours were added between 2026-11-20 and 11-23 with llvmpipe
goldens only. Pull requests skip the macOS package lanes, so none of them was
compared under the Apple Software Renderer before it merged. Since then all
four macOS package lanes have failed cvcgl_ari_golden on master and on the
v4.0.3 to v4.0.6 tags: 1,066 to 4,889 px beyond +-40, with the same counts in
every run.

The macOS frames are the same pictures. Edges of lines, translucent surfaces
and nearest-sampled texels land a pixel apart, as on orthoslicer. On
volume_grid_quad the Probe tab's Min/Max is also one float32 ulp off on the
arm64 runner. The four lanes' frames are byte-identical, so the v4.0.6 tag
run's (45246162146) are committed as <name>.macos.png, as docs/ARIADNE.md
describes. ARIADNE.md now says to run a new golden through ci/full/** before
it merges.

* macOS: volren_views and volume_grid_segment goldens, the volume grids' after #1452, Cmd+Z in the context-menu test

The ci/full run of the first commit (45375289474) passed the six new macOS
goldens on all four lanes and left two failures:

- cvcgl_ari_golden: volren_views (#1498), 882 px beyond +-40. Its four lanes'
  frames are byte-identical, the same picture with box edges and the volren's
  shading a pixel apart. Committed as volren_views.macos.png.
- cvcgl_imgui_context_menu (#1476): "ImGui's undo takes the paste back". The
  test pressed ImGuiMod_Ctrl+Z. With ConfigMacOSXBehaviors (on Apple),
  io.AddKeyEvent swaps Cmd and Ctrl, so that arrives as Super and InputText
  doesn't undo. The test now presses ImGuiMod_Super there, the key a Mac's
  Cmd arrives as, which ImGui turns into its shortcut key. Checked against
  ImGui 1.92.9 with a standalone InputText: with macOS behaviours Ctrl+Z
  leaves 'abc' and Super+Z undoes to 'ab', and the reverse without them.

Master since then has #1452, which re-captured volume_grid, _quad and
_contours for its Segmentation tab and added volume_grid_segment (366 px on
macOS). Their .macos.png are the v4.0.8 tag run's (45478904899) frames,
byte-identical across the four lanes, and the same pictures as the llvmpipe
goldens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant