Expand description
Streaming point cloud processing pipeline.
Enables out-of-core processing of arbitrarily large point clouds by reading and processing data in bounded-size chunks. Only one chunk resides in RAM at a time; the pipeline accumulates lightweight per-chunk state (e.g. a voxel map) that is orders of magnitude smaller than the full dataset.
§Architecture
Source iterator Pipeline stage Output
(file / network / …) ──► process_chunk(&[T]) ──► finalize()
chunk 0 accumulate state
chunk 1 accumulate state
… …
chunk N accumulate state§Provided pipelines
| Type | Description |
|---|---|
StreamingVoxelFilter | Downsamples via a voxel grid; O(voxels) memory |
StreamingStatistics | Accumulates bounding-box and point count |
StreamingCollector | Collects all points (useful for testing) |
§Example
use threecrate_algorithms::streaming::{
StreamingPipeline, StreamingVoxelFilter, StreamingVoxelFilterConfig, run_pipeline,
};
use threecrate_core::Point3f;
let points: Vec<Result<Point3f, _>> = vec![
Ok(Point3f::new(0.0, 0.0, 0.0)),
Ok(Point3f::new(0.05, 0.0, 0.0)),
Ok(Point3f::new(1.0, 1.0, 1.0)),
];
let mut filter = StreamingVoxelFilter::new(StreamingVoxelFilterConfig { voxel_size: 0.1 });
let stats = run_pipeline(&mut filter, points.into_iter(), 2).unwrap();
let cloud = filter.finalize().unwrap();
println!("Downsampled to {} points", cloud.len());Structs§
- Point
Cloud Stats - Accumulated statistics produced by
StreamingStatistics. - RunOptions
- Options for
run_pipeline. - RunStats
- Statistics reported by
run_pipeline. - Streaming
Collector - Streaming pipeline stage that collects all points into a
PointCloud. - Streaming
Statistics - Streaming statistics collector.
- Streaming
Voxel Filter - Streaming voxel-grid downsampler.
- Streaming
Voxel Filter Config - Configuration for
StreamingVoxelFilter.
Traits§
- Streaming
Pipeline - Trait for chunk-based streaming processors.
Functions§
- cloud_
as_ stream - Wrap a
PointCloudas a streaming source ofResult<Point3f>. - run_
pipeline - Drive
pipelineby reading fromsourcein chunks ofchunk_sizeitems. - run_
pipeline_ with_ options - Like
run_pipelinebut accepts explicit options.