pub struct NodeBuilder { /* private fields */ }Expand description
Records a node configuration; NodeBuilder::build checks it and creates the node on a host.
The reconstruction settings are a Plan (same fields and TOML as crate::declare); the input folder is the
image root, positions/stride are not used (input is declared live), and GPS comes with each set.
Implementations§
Source§impl NodeBuilder
impl NodeBuilder
Sourcepub fn plan(self, plan: Plan) -> Self
pub fn plan(self, plan: Plan) -> Self
Replaces the reconstruction settings with a plan (e.g. read from TOML). Input positions/stride and
the GPS file are ignored; sinks are ignored (use NodeBuilder::output).
Sourcepub fn images(self, dir: impl Into<PathBuf>) -> Self
pub fn images(self, dir: impl Into<PathBuf>) -> Self
Image folder: file payloads are relative to it, in-memory payloads are spooled inside it.
Sourcepub fn cameras<S: Into<String>>(self, cams: impl IntoIterator<Item = S>) -> Self
pub fn cameras<S: Into<String>>(self, cams: impl IntoIterator<Item = S>) -> Self
Cameras of one synchronized set, in position order.
Sourcepub fn align(self, frame: AlignFrame) -> Self
pub fn align(self, frame: AlignFrame) -> Self
Coordinate alignment (ENU needs GPS fixes in the sets).
Sourcepub fn fixed_enu_origin(self, on: bool) -> Self
pub fn fixed_enu_origin(self, on: bool) -> Self
Fixes the ENU origin at the first GPS fix.
Sourcepub fn match_backend(self, name: &str) -> Self
pub fn match_backend(self, name: &str) -> Self
Descriptor matching backend (cpu | cuda).
Sourcepub fn incremental_triangulation(self, on: bool) -> Self
pub fn incremental_triangulation(self, on: bool) -> Self
Triangulate only newly registered images.
Sourcepub fn reconcile(self, p: ReconcilePolicy) -> Self
pub fn reconcile(self, p: ReconcilePolicy) -> Self
Reconciliation policy (default ReconcilePolicy::AppendOnly).
Sourcepub fn backpressure(self, b: Backpressure) -> Self
pub fn backpressure(self, b: Backpressure) -> Self
Producer queue policy for ReconNode::spawn (default Block { max_pending: 8 }).
Sourcepub fn source(self, id: impl Into<String>) -> Self
pub fn source(self, id: impl Into<String>) -> Self
Accept only this source id (default: the first declared source).
Sourcepub fn spool(self, rel: impl Into<PathBuf>) -> Self
pub fn spool(self, rel: impl Into<PathBuf>) -> Self
Spool folder for in-memory payloads, relative to the image folder (default .live).
Sourcepub fn output(self, dir: impl Into<PathBuf>, opts: SinkOptions) -> Self
pub fn output(self, dir: impl Into<PathBuf>, opts: SinkOptions) -> Self
Writes the standard output files (timeline, run.log, zone PLYs, snapshots) to dir.
Sourcepub fn on<F>(self, kind: EventKind, f: F) -> Self
pub fn on<F>(self, kind: EventKind, f: F) -> Self
Hook for one event kind (Pipeline::on). FrameDecoded turns frame decoding on.
Sourcepub fn on_event<F>(self, f: F) -> Self
pub fn on_event<F>(self, f: F) -> Self
Hook for every event (Pipeline::on_any).
Sourcepub fn on_frame<F>(self, f: F) -> Self
pub fn on_frame<F>(self, f: F) -> Self
Decoded input frames (Pipeline::on_frame); turns frame decoding on.
Sourcepub fn on_zone_preview<F>(self, f: F) -> Self
pub fn on_zone_preview<F>(self, f: F) -> Self
Zone preview clouds (Pipeline::on_zone_preview).
Sourcepub fn on_zone_refined<F>(self, f: F) -> Self
pub fn on_zone_refined<F>(self, f: F) -> Self
Zone refined clouds (Pipeline::on_zone_refined).
Sourcepub fn on_message<F>(self, f: F) -> Self
pub fn on_message<F>(self, f: F) -> Self
Warnings and errors (Pipeline::on_message); includes reconciliation warnings.
Sourcepub fn event_policy(self, kind: EventKind, p: QueuePolicy) -> Self
pub fn event_policy(self, kind: EventKind, p: QueuePolicy) -> Self
Per-kind hook queue policy (Pipeline::policy), e.g. LatestPerKey for ZonePreview.
Sourcepub fn sync_hooks(self, on: bool) -> Self
pub fn sync_hooks(self, on: bool) -> Self
Runs hooks synchronously on the composing thread (Pipeline::sync).
Sourcepub fn build(self, host: &CompositionHost) -> Result<ReconNode, ComposeError>
pub fn build(self, host: &CompositionHost) -> Result<ReconNode, ComposeError>
Checks the configuration, creates the session and pipeline, and registers the node on host.
Creates the image folder’s spool folder; nothing else is written until frames are declared.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NodeBuilder
impl !Sync for NodeBuilder
impl !UnwindSafe for NodeBuilder
impl Freeze for NodeBuilder
impl Send for NodeBuilder
impl Unpin for NodeBuilder
impl UnsafeUnpin for NodeBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.