src.pipeline.state.simple_pipeline_state

Classes

SimplePipelineState(**kwargs)

class src.pipeline.state.simple_pipeline_state.SimplePipelineState(**kwargs)
Author:

Alberto M. Esmoris Pena

Simple pipeline state that accounts for current point cloud, feature names, and model.

Variables:
  • pcloud (PointCloud) – The point cloud corresponding to the current pipeline state.

  • base_pcloud (PointCloud) – The pcloud given during initialization. While pcloud can be updated during iterations, base_pcloud is used as a baseline point cloud defining the initial value of any iteration.

  • model (Model) – The model corresponding to the current pipeline state.

  • base_model (Model) – The model given during initialization. While model can be updated during iterations, base_model is used as a baseline model defining the initial value of any iteration.

  • fnames (list) – The list of strings representing the feature names.

  • base_fnames (list) – The fnames given during initialization. While fnames can be updated during iterations, base_fnames is used as a baseline list of feature names defining the initial value of any iteration.

  • preds (np.ndarray) – The predictions corresponding to the current pipeline state.

  • base_preds (np.ndarray) – The preds given during initialization. While preds can be updated during iterations, base_preds is used as a baseline list of predictions defining the initial value of any iteration.

  • curves (list of dict or None) – Optional list of in-memory polylines produced by an upstream Clusterer that exposes a get_curves_dict hook. Each entry is a dict carrying the polyline vertices under 'points' (Nx3 np.ndarray in world coordinates) plus per-feature metadata (CURVE_ID, SEG_ID, …). Stays None for pipelines whose Clusterer does not emit curves.

  • base_curves (list of dict or None) – The curves given during initialization. Mirrors the other base_* attributes so iteration runs reset to the original value.

__init__(**kwargs)

Handle the initialization of a simple pipeline state.

See :class`.PipelineState` and meth:npu.pipeline.state.pipeline_state.PipelineState.__init__.

prepare_iter(**kwargs)

See npu.pipeline.state.pipeline_state.PipelineState.prepare_iter().

update_pcloud(comp, new_pcloud)

Handle the update of the point cloud.

Parameters:
Returns:

Nothing but the pipeline state itself is updated.

update_model(comp, new_model)

Handle the update of the model.

Parameters:
  • comp – The component that updated the model.

  • new_model – The new model.

Returns:

Nothing but the pipeline state itself is updated.

update_preds(comp, new_preds)

Handle the update of the predictions.

Parameters:
  • comp – The component that updated the predictions.

  • new_preds – The new predictions.

Returns:

Nothing but the pipeline state itself is updated.

update_curves(comp, new_curves)

Handle the update of the in-memory curves.

Parameters:
  • comp – The component that produced the curves.

  • new_curves (list of dict or None) – The new list of curve dicts (each entry carries the polyline vertices and per-feature metadata). None is allowed and simply leaves self.curves unchanged so non-curve Clusterers stay benign.

Returns:

Nothing but the pipeline state itself is updated.