pub struct PointCloud<P: Point> { /* private fields */ }Expand description
Main point cloud container that owns point data
This structure provides ownership-based point cloud management with efficient parallel processing capabilities.
Implementations§
Source§impl<P: Point> PointCloud<P>
impl<P: Point> PointCloud<P>
Sourcepub fn from_points(points: Vec<P>) -> Self
pub fn from_points(points: Vec<P>) -> Self
Create a point cloud from a vector of points
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a point cloud with specified capacity
Sourcepub fn from_points_and_metadata(points: Vec<P>, metadata: Metadata) -> Self
pub fn from_points_and_metadata(points: Vec<P>, metadata: Metadata) -> Self
Create a point cloud from points and metadata
Sourcepub fn points_mut(&mut self) -> &mut Vec<P>
pub fn points_mut(&mut self) -> &mut Vec<P>
Get a mutable reference to the points vector
Sourcepub fn metadata_mut(&mut self) -> &mut Metadata
pub fn metadata_mut(&mut self) -> &mut Metadata
Get a mutable reference to the metadata
Sourcepub fn extend<I>(&mut self, points: I)where
I: IntoIterator<Item = P>,
pub fn extend<I>(&mut self, points: I)where
I: IntoIterator<Item = P>,
Add multiple points to the cloud
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut P>
pub fn get_mut(&mut self, index: usize) -> Option<&mut P>
Get a mutable reference to a point by index
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity to fit the current number of points
Sourcepub fn par_iter_mut(&mut self) -> IterMut<'_, P>
pub fn par_iter_mut(&mut self) -> IterMut<'_, P>
Create a parallel mutable iterator over the points
Sourcepub fn map<F, Q>(self, mapper: F) -> PointCloud<Q>
pub fn map<F, Q>(self, mapper: F) -> PointCloud<Q>
Transform points using a mapping function
Sourcepub fn bounding_box(&self) -> Option<([f32; 3], [f32; 3])>
pub fn bounding_box(&self) -> Option<([f32; 3], [f32; 3])>
Calculate the bounding box of the point cloud
Sourcepub fn crop(self, min_bounds: [f32; 3], max_bounds: [f32; 3]) -> Self
pub fn crop(self, min_bounds: [f32; 3], max_bounds: [f32; 3]) -> Self
Crop the point cloud to a bounding box
Convert to shared ownership using Arc
Trait Implementations§
Source§impl<P: Clone + Point> Clone for PointCloud<P>
impl<P: Clone + Point> Clone for PointCloud<P>
Source§fn clone(&self) -> PointCloud<P>
fn clone(&self) -> PointCloud<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Point> Default for PointCloud<P>
impl<P: Point> Default for PointCloud<P>
Source§impl<'de, P> Deserialize<'de> for PointCloud<P>where
P: Deserialize<'de> + Point,
impl<'de, P> Deserialize<'de> for PointCloud<P>where
P: Deserialize<'de> + Point,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P: Point> FeatureExt<P> for PointCloud<P>
impl<P: Point> FeatureExt<P> for PointCloud<P>
Source§impl<P: Point> FilterExt<P> for PointCloud<P>
impl<P: Point> FilterExt<P> for PointCloud<P>
Source§fn voxel_downsample(self, voxel_size: f32) -> PointCloud<P>
fn voxel_downsample(self, voxel_size: f32) -> PointCloud<P>
Apply voxel downsampling
Source§fn remove_outliers(
self,
k_neighbors: usize,
std_dev_threshold: f32,
) -> Result<PointCloud<P>>
fn remove_outliers( self, k_neighbors: usize, std_dev_threshold: f32, ) -> Result<PointCloud<P>>
Remove statistical outliers
Source§fn remove_radius_outliers(
self,
radius: f32,
min_neighbors: usize,
) -> PointCloud<P>
fn remove_radius_outliers( self, radius: f32, min_neighbors: usize, ) -> PointCloud<P>
Remove radius outliers
Source§fn pass_through(
self,
axis: Axis,
min_value: f32,
max_value: f32,
) -> PointCloud<P>
fn pass_through( self, axis: Axis, min_value: f32, max_value: f32, ) -> PointCloud<P>
Apply pass-through filter
Source§impl<P: Point> FromIterator<P> for PointCloud<P>
impl<P: Point> FromIterator<P> for PointCloud<P>
Source§fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, P: Point> IntoIterator for &'a PointCloud<P>
impl<'a, P: Point> IntoIterator for &'a PointCloud<P>
Source§impl<'a, P: Point> IntoIterator for &'a mut PointCloud<P>
impl<'a, P: Point> IntoIterator for &'a mut PointCloud<P>
Source§impl<P: Point> IntoIterator for PointCloud<P>
impl<P: Point> IntoIterator for PointCloud<P>
Source§impl<P: Point> RegistrationExt<P> for PointCloud<P>
impl<P: Point> RegistrationExt<P> for PointCloud<P>
Source§fn icp_register(
&self,
target: &PointCloud<P>,
max_iterations: usize,
tolerance: f32,
) -> Result<Transform>
fn icp_register( &self, target: &PointCloud<P>, max_iterations: usize, tolerance: f32, ) -> Result<Transform>
Perform ICP registration with another point cloud
Source§fn transform(self, transform: &Transform) -> PointCloud<P>
fn transform(self, transform: &Transform) -> PointCloud<P>
Apply transformation to the point cloud
Source§impl<P: Point> SegmentationExt<P> for PointCloud<P>
impl<P: Point> SegmentationExt<P> for PointCloud<P>
Auto Trait Implementations§
impl<P> Freeze for PointCloud<P>
impl<P> RefUnwindSafe for PointCloud<P>where
P: RefUnwindSafe,
impl<P> Send for PointCloud<P>
impl<P> Sync for PointCloud<P>
impl<P> Unpin for PointCloud<P>where
P: Unpin,
impl<P> UnwindSafe for PointCloud<P>where
P: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more