Expand description
Default output hooks: receive events and produce the file output of cumulus3d stream.
| Hook | Events received | Output |
|---|---|---|
TimelineSink | events that have text (table below) | timeline.txt (epoch seconds.nanoseconds text) |
RunLogSink | events that have text, Log, Finished | run.log (+ standard output), DONE |
ZonePlySink | ZonePreview, ZoneRefined (dense true) | full/preview/preview_KK_posLO-HI.ply, full/refined/refined_KK_posLO-HI.ply |
ModelSink | ZoneArrived, ZonePreview, ZoneAdjusted, ZoneRefinedPose, AllRefinedDone | work/models/{snap,preview,ba,refined}_K/, work/models/chain/ |
SnapshotSink | zone events, AllRefinedDone | aligned/, snapshots/event_NN_TTTT.Ts_KIND_K.ply, snapshots/manifest.json, snapshots/timeline.txt, final_frame/, live/, run.log summary |
Event -> timeline text conversion table (Event::timeline_text, TIMELINE_TABLE):
| Event | Text |
|---|---|
Started { positions: Some(N) } | start NPOS=N |
ModelInitialized { registered: N } | init_model Registered images: N |
BaseAdopted { zone: K } | adopt refined K as base |
PositionDone { position: P, registered: R, expected: E } | pos P registered R/E |
ZoneArrived { range: K [LO,HI) } | region K arrived pos[LO,HI) |
ZonePreview { range: K } | preview K ready |
RefineStarted { zone: K } | refined K ba_start |
ZoneRefinedPose { range: K, registered: N, mean_reproj_px: X } | refined K pose_ready Registered images: N Mean reprojection error: X(6 decimal places)px (including the trailing space) |
ZoneRefined { range: K } | refined K ready |
AllPositionsDone | all positions done |
AllRefinedDone | all refined done |
Ordering: the hooks of one output folder must be bundled in a single DefaultSinks and handled in event order.
In an asynchronous pipeline the order between per-kind lanes is not guaranteed, so use attach (a single on_any).
default_sinks (a per-kind list) is for synchronous mode (Pipeline::sync(true)) or direct calls.
Structs§
- Default
Sinks - The default hook bundle of one output folder (handled in the order timeline -> run.log -> full PLY -> models -> snapshots).
- Model
Sink --save-models: per-zone sparse models underwork/models/.ZoneArrived→snap_K,ZonePreview→preview_K,ZoneAdjusted→ba_K,ZoneRefinedPose→refined_K,AllRefinedDone→chain.- RunLog
- Shared handle to run.log. Several hooks (such as
SnapshotSink, which writes a summary) write to the same file. - RunLog
Sink run.log: timeline text is[HH:MM:SS] text,Logas is (with the time prefix ifstamped),Finishedis followed by theDONEfile after the per-stage times (including the hook-measuredpost) and the final chain model summary.Warning/Errorcome together with aLogof the same content, so they are not written separately.- Sink
Options - Default hook settings.
- SinkSet
- Which default hooks to enable (
DefaultSinks::with_set). - Snapshot
Sink - Hook for alignment, masking, per-event snapshots, manifest and re-anchoring (final_frame). It collects zone results and
builds them all at once with
post::run_zonesatAllRefinedDone. Times are seconds relative toStarted(or the first received event if absent). - Timeline
Sink timeline.txt: for every event that has text, one lineepoch seconds.nanoseconds text(time =meta.at).- Zone
PlySink full/preview/preview_KK_posLO-HI.ply,full/refined/refined_KK_posLO-HI.ply(x y z nx ny nz red green blue). Events whosedenseis false (no densification or failed) are not written.
Constants§
- TIMELINE_
TABLE - Event kinds that produce timeline text (conversion rules in
Event::timeline_text).
Traits§
- Sink
- A hook that receives events and produces output.
Functions§
- any_
hook - One hook as an all-event hook (
on_any). It filters and handles only the kinds it accepts. - attach
- Attach the default hooks to a pipeline (a single
on_any, so the order is preserved even in asynchronous mode). - default_
sinks - The default hooks as a per-kind list (sharing state). For a synchronous pipeline (
sync(true)) or direct calls. - hooks
- One hook as a per-kind hook list (sharing the same state). Use it only in synchronous mode if ordering between kinds is needed.
Type Aliases§
- Hook
- One hook (the shape passed to the pipeline’s
.on/.on_any).