Struct epoint_core::PointData

source ·
pub struct PointData {
    pub data_frame: DataFrame,
}
Expand description

Wrapper around the data frame with type-safe columns.

Fields§

§data_frame: DataFrame

Implementations§

source§

impl PointData

source

pub fn new(data_frame: DataFrame) -> Result<Self, Error>

source

pub fn new_unchecked(data_frame: DataFrame) -> Self

source

pub fn height(&self) -> usize

source§

impl PointData

source§

impl PointData

source§

impl PointData

source§

impl PointData

source

pub fn get_all_points(&self) -> Vec<Point3<f64>>

Returns all points as a vector in the local coordinate frame.

source

pub fn get_frame_ids(&self) -> Result<Vec<FrameId>, Error>

source

pub fn get_all_timestamps(&self) -> Result<Vec<DateTime<Utc>>, Error>

source

pub fn get_all_beam_origins(&self) -> Result<Vec<Point3<f64>>, Error>

Returns all points as a vector in the local coordinate frame.

source

pub fn get_all_colors(&self) -> Result<Vec<Srgb<u16>>, Error>

source

pub fn get_all_spherical_points( &self, ) -> Result<Vec<SphericalPoint3<f64>>, Error>

source§

impl PointData

source

pub fn get_distinct_frame_ids(&self) -> Result<HashSet<FrameId>, Error>

source

pub fn get_median_time(&self) -> Result<DateTime<Utc>, Error>

source

pub fn get_axis_aligned_bounding_box(&self) -> AxisAlignedBoundingBox

Returns the AABB.

source

pub fn get_local_min(&self) -> Point3<f64>

Returns the minimum point of the AABB.

source

pub fn get_local_max(&self) -> Point3<f64>

Returns the maximum point of the AABB.

source

pub fn get_local_center(&self) -> Point3<f64>

Returns the center point of the AABB.

source

pub fn get_id_min(&self) -> Result<Option<u64>, Error>

source

pub fn get_id_max(&self) -> Result<Option<u64>, Error>

source

pub fn get_intensity_min(&self) -> Result<Option<f32>, Error>

source

pub fn get_intensity_max(&self) -> Result<Option<f32>, Error>

source

pub fn derive_convex_hull(&self) -> Option<ConvexPolyhedron>

source§

impl PointData

source

pub fn add_sequential_id(&mut self) -> Result<(), Error>

Adds a sequentially increasing id column, if no column exists.

source

pub fn derive_spherical_points(&mut self) -> Result<(), Error>

Derives spherical points.

source

pub fn add_i64_column( &mut self, name: &str, values: Vec<i64>, ) -> Result<(), Error>

Add a new column to this DataFrame or replace an existing one.

source

pub fn add_u32_column( &mut self, name: &str, values: Vec<u32>, ) -> Result<(), Error>

Add a new column to this DataFrame or replace an existing one.

source

pub fn add_f32_column( &mut self, name: &str, values: Vec<f32>, ) -> Result<(), Error>

Add a new column to this DataFrame or replace an existing one.

source

pub fn add_f64_column( &mut self, name: &str, values: Vec<f64>, ) -> Result<(), Error>

Add a new column to this DataFrame or replace an existing one.

source

pub fn remove_column(&mut self, column: &str) -> Result<(), Error>

Removes a column from the point cloud.

source§

impl PointData

source

pub fn extract_frame_ids(&self) -> Result<Vec<FrameId>, Error>

source

pub fn extract_beam_origins(&self) -> Result<Vec<Point3<f64>>, Error>

source

pub fn extract_timestamps(&self) -> Result<Vec<DateTime<Utc>>, Error>

source

pub fn update_points_in_place( &mut self, points: Vec<Point3<f64>>, ) -> Result<(), Error>

source

pub fn update_beam_origins_in_place( &mut self, beam_origins: Vec<Point3<f64>>, ) -> Result<(), Error>

source

pub fn add_spherical_points( &mut self, spherical_points: Vec<SphericalPoint3<f64>>, ) -> Result<(), Error>

source

pub fn add_unique_frame_id(&mut self, frame_id: FrameId) -> Result<(), Error>

source

pub fn add_frame_ids(&mut self, frame_ids: Vec<FrameId>) -> Result<(), Error>

source

pub fn add_unique_color(&mut self, color: Srgb<u16>) -> Result<(), Error>

source

pub fn add_colors(&mut self, colors: Vec<Srgb<u16>>) -> Result<(), Error>

source

pub fn filter_by_row_indices( &self, row_indices: HashSet<usize>, ) -> Result<PointData, Error>

source

pub fn filter_by_boolean_mask( &self, boolean_mask: &BooleanChunked, ) -> Result<PointData, Error>

source

pub fn filter_by_bounds( &self, bound_min: Point3<f64>, bound_max: Point3<f64>, ) -> Result<Option<PointData>, Error>

source

pub fn filter_by_beam_length( &self, beam_length_min: f64, beam_length_max: f64, ) -> Result<Option<PointData>, Error>

source§

impl PointData

source

pub fn resolve_data_frame( &mut self, reference_frame: &ReferenceFrames, timestamp: &Option<DateTime<Utc>>, frame_id: &FrameId, target_frame_id: &FrameId, ) -> Result<(), Error>

Resolves points to target_frame_id

Expects a data frame with only one

Trait Implementations§

source§

impl Clone for PointData

source§

fn clone(&self) -> PointData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PointData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for PointData

source§

fn eq(&self, other: &PointData) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for PointData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
source§

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromAngle<T> for T

source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

source§

fn into_angle(self) -> U

Performs a conversion into T.
source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> IntoStimulus<T> for T

source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,