Repository navigation
cvc segment, pycvc.segment_seeded and segment.seeded (P5 part 3) - #1252
Merged
Merged
Conversation
The surfaces of the GenSeg port (docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md §1.4, §1.6, §5), on top of part 1. - segment.seeded with its -async and -start forms through cvc/core/job_intrinsics.h (inc/cvc/volume/segmentation_intrinsics.h): inputs a volume and point classes, each a data object or a state path; the result dict holds the labels and class volumes as data objects, the border as point classes, the names, counts and warnings. install_segmentation_intrinsics adds it to one app's Ariadne lanes. segmentation_intrinsics_test (T10) in CVC_PORT_TESTS and SAN_CXX_TESTS. - cvc segment: flags from the param table, --seeds (.vgr/.pts) or --seed name:i,j,k, the legacy --tlow / --thigh on the 0..255 scale; writes the labels, <stem>_class_NN<ext> and --border. cvc_cli_test's Segment* tests (T12). - pycvc: segment_seeded with keywords (an enum by name), the result with a zero-copy uint8 view of the labels, class volumes and a border array; segment_seeded_job (pycvc_jobs.i); test_pycvc_segmentation.py (T11).
transfix
enabled auto-merge
November 15, 2026 04:54
#1171 (P1 part 3: skeleton.compute, cvc skeleton, pycvc) added its job to pycvc_jobs.i and its CLI tests to cvc_cli_test.cpp where this branch adds segment_seeded_job and the cvc segment tests. Both kept, segmentation first.
transfix
added a commit
that referenced
this pull request
Nov 16, 2026
…#1253, #1255, #1256, #1264, #1268, #1271, #1273, #1277) - ci.yml: the sanitizer list keeps this branch's tests (stream_test, net_ws_client_test, ariadne_host_test) and master's segmentation_intrinsics_test. - STATE_EXEC_THREADED.md: the room-call verbs (room-run is #1273's) and #1252's segment.seeded provider in the provider table, both registered without a kind. room-call's async functions stay on the app's host: a reply settles on the relay client's reader thread through host.finish, so moving them to *ictx.host needs a finisher first.
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.
P5 part 3 of docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md: the surfaces of the GenSeg port. These are
cvc segment, pycvc, andsegment.seededwith its-asyncand-startforms (§1.4, §1.6, §5).Stacked on #1248 (part 1); review the last commit (809dcc1). It doesn't depend on part 2 (#1250, the clean-up). The two touch different files and merge in either order.
DSL:
segment.seeded(T10)inc/cvc/volume/segmentation_intrinsics.hregisters the op through the generic job forms ofcvc/core/job_intrinsics.h(P0b):volis acvc::volumeandclassesacvc::point_classes, each a data object or a state path to a node's data channel.paramsis a dict of the table's fields;(params.defaults "segment.seeded")lists them.labels: a data object holding the UChar volume;classes: a list of volume data objects;border: apoint_classeswith one class, "border", sopoint-classes.pointsreads it;class_names,class_voxels,automatic_seeds,classified_seeds, the normalised thresholds andwarnings.install_segmentation_intrinsics(app)adds it to one app's Ariadne lanes (keycvc.segment), as P0d's installers do.segmentation_intrinsics_test, inCVC_PORT_TESTS(the wasm-mt node lane) andSAN_CXX_TESTS:params.defaults;job.canceland a kill part-way through;segment.seeded-startunder the default action limits, the frames continuing while it runs (160³), its progress keys rising, and the result landing attarget.result.CLI:
cvc segment(T12)--t-low,--t-high,--normalized-thresholds,--gamma,--automatic,--variable,--timestep,--class-volumes). The legacy--tlow/--thightake VolumeGridRover's integers on the 0..255 scale and turn on--normalized-thresholds.--seeds,.vgror.pts; a.ptsfile gets the volume's grid) or from--seed name:i,j,k.-o, the class volumes to<stem>_class_NN<ext>, and the border voxels to--border fileas "i j k" lines.--seconds nreports progress.cvc_cli_test'sSegment*: help, two blobs with every output read back, the legacy flags with a.vgrfile, and bad input (no seeds, a seed outside, a bad gamma, a malformed--seed).pycvc (T11)
bindings/pycvc/pycvc_segmentation.iwraps the header:pycvc.segment_seeded(vol, seeds, t_low=..., automatic="none", ...)takes keywords from the table; an enum can be given by name. The GIL is released during the call.labels_array(), a zero-copy uint8 numpy view, pluslabels,classes(volumes sharing their voxels),class_names,class_voxels,border_array()andwarnings.pycvc.segment_seeded_jobis the job, through the genericPYCVC_RESULT_JOB. Bad input raisesValueError.test_pycvc_segmentation.pycovers keywords and the params class, the numpy views, another thread ticking during a call, bad input, and the job's steps and cancel. The browser pycvc builds from the samepycvc.i.Checked locally
segmentation_test(18),segmentation_intrinsics_test(9),cvc_cli_test --gtest_filter=*Segment*(4) and ctestpycvc_segmentationall pass.segmentation_intrinsics_testpasses (9).Notes
segmentation_intrinsics_testis added toSAN_CXX_TESTS. No CI job is added or renamed.#include <cvc/core/param_cli.h>tosrc/cvc-cli/main.cppand lines next to mine inpycvc.i,pycvc_jobs.i, the pycvc test list,port_tests.cmakeandcvc_cli_test.cpp. Whichever merges second needs a small merge.result_job, a finished-starttask'sstatuskey shows its last progress note ("writing 99%") rather than "done"; P1: skeleton.compute, cvc skeleton and pycvc (skeleton port, part 3) #1171'sresult_job.hchange fixes that for every port. These tests checkbusyand the result instead.Merges on Joe's OK, after part 1.