Skip to main content

Crate spatialrust

Crate spatialrust 

Source
Expand description

SpatialRust meta crate.

Re-exports the stable public API surface. Application code should depend on this crate unless it needs direct access to a specific sub-crate.

Re-exports§

pub use spatialrust_core as core;
pub use spatialrust_features as features;
pub use spatialrust_filtering as filtering;
pub use spatialrust_gpu as gpu;
pub use spatialrust_io as io;
pub use spatialrust_math as math;
pub use spatialrust_metrics as metrics;
pub use spatialrust_pipeline as pipeline;
pub use spatialrust_registration as registration;
pub use spatialrust_search as search;
pub use spatialrust_segmentation as segmentation;
pub use spatialrust_transform as transform;
pub use spatialrust_voxelize as voxelize;

Structs§

Aabb
Axis-aligned bounding box used by CropBox.
BoundaryConfig
Configuration for BoundaryDetector.
BoundaryDetector
Tangent-plane boundary point detector. The input cloud must carry normals.
BoundaryResult
Result of boundary detection.
BruteForceIndex
Reference index using brute-force search for correctness tests.
CauchyKernel
Cauchy robust kernel.
CloudDistances
A bundle of directed and symmetric cloud-to-cloud distance statistics.
CopcBounds
Axis-aligned bounds for COPC spatial queries.
CopcFileInfo
Metadata exposed from a COPC header without loading point data.
CopcQuery
Spatial query parameters for partial COPC reads.
CopcWriterParams
Cov3
3x3 symmetric covariance matrix.
CovarianceAccumulator3
Accumulates mean and covariance for 3D points.
CpuDevice
Default CPU device.
CropBox
Keeps (or, when invert is set, drops) points inside an axis-aligned box.
CylinderModel
Cylinder model: all surface points are radius from the axis line.
DbscanConfig
Configuration for DBSCAN density-based clustering.
DbscanResult
Result of DBSCAN clustering.
DbscanSegmenter
DBSCAN density-based segmenter.
EuclideanClusterConfig
Configuration for Euclidean clustering.
EuclideanClusterExtractor
Euclidean region-growing cluster extractor.
EuclideanClusterResult
Result of Euclidean clustering.
FarthestPointSampling
Farthest Point Sampling downsampler.
FarthestPointSamplingConfig
Configuration for FarthestPointSampling.
FpfhRansacConfig
Configuration for FpfhRansacRegistration.
FpfhRansacRegistration
FPFH + RANSAC global registration.
FrameId
Coordinate frame identifier.
GicpConfig
Configuration for Generalized ICP (plane-to-plane).
GicpRegistration
Generalized ICP registration.
GpuNormalEstimator
GPU-accelerated normal estimator.
GroundConfig
Configuration for GroundSegmenter.
GroundSegmentation
Result of ground segmentation.
GroundSegmenter
Grid-based ground segmenter.
HttpByteSource
Random-access COPC byte source backed by HTTP range requests.
HuberKernel
Huber robust kernel.
IcpConfig
Configuration for point-to-point ICP.
IcpRegistration
Point-to-point ICP registration.
Isometry3
Proper rigid transform: rotation + translation without scale/shear.
IssKeypointConfig
Configuration for IssKeypointDetector.
IssKeypointDetector
Intrinsic Shape Signatures keypoint detector.
IssKeypointResult
Result of ISS keypoint detection.
KdTree
Cache-friendly KD-tree for 3D point clouds.
KdTreeNeighborhood
KD-tree backed neighborhood provider.
Mat3
3x3 matrix stored in row-major order.
Mat4
4x4 matrix stored in row-major order.
MlsConfig
Configuration for MlsSmoothing.
MlsSmoothing
Moving Least Squares smoothing filter.
MultiPlaneConfig
Configuration for MultiPlaneSegmenter.
MultiPlaneSegmentation
Result of multi-plane segmentation.
MultiPlaneSegmenter
Sequential RANSAC multi-plane segmenter.
MvpIcpConfig
Configuration for optional ICP in the MVP pipeline.
MvpPipeline
Builder-style MVP pipeline runner.
MvpPipelineConfig
Full configuration for the MVP pipeline.
MvpPipelineResult
Output of a completed MVP pipeline run.
NdtConfig
Configuration for NDT (Normal Distributions Transform) registration.
NdtRegistration
NDT registration (point-to-distribution).
Neighbor
One neighbor search result.
NeighborGraph
A directed neighborhood graph over a point cloud.
NormalEstimationConfig
Configuration for covariance-based normal estimation.
NormalEstimationResult
Result metadata for normal estimation.
NormalEstimator
Covariance-based normal estimator.
NormalOrientationConfig
Configuration for orient_normals_consistent.
Obb
Oriented bounding box recovered from the principal axes of a cloud.
OccupancyGrid
A dense 3D grid in row-major (z, y, x) order.
PassThrough
Keeps (or drops) points whose value in a named field falls within a range.
PlaneModel
Plane model in Hessian form: normal · p + d = 0 with unit normal.
PointCloud
Schema-aware columnar point cloud stored on a device.
PointCloudBuilder
Builds point clouds field-by-field.
PointField
One column in a point cloud schema.
PointSchema
Schema describing the columns of a point cloud.
PointToPlaneIcp
Point-to-plane ICP registration.
PointToPlaneIcpConfig
Configuration for point-to-plane ICP.
Pose3
Pose with optional translation covariance.
PrimitiveSegmentation
Result of fitting a primitive, partitioning the cloud into inliers/outliers.
Quat
Unit quaternion representing a 3D rotation.
RadiusOutlierConfig
Configuration for RadiusOutlierRemoval.
RadiusOutlierRemoval
Radius Outlier Removal (ROR).
RangeImage
A dense range image in row-major order (row * width + col).
RangeImageConfig
Configuration for range_image.
RansacCylinderSegmenter
RANSAC cylinder segmenter. The input cloud must carry normals.
RansacPlaneConfig
Configuration for RANSAC plane segmentation.
RansacPlaneSegmentation
Result of RANSAC plane segmentation.
RansacPlaneSegmenter
RANSAC-based dominant plane segmenter.
RansacPrimitiveConfig
Shared RANSAC controls for primitive fitting.
RansacSphereSegmenter
RANSAC sphere segmenter.
RegionGrowingConfig
Configuration for normal-based region growing segmentation.
RegionGrowingResult
Result of region growing segmentation.
RegionGrowingSegmenter
Normal-based region growing segmenter.
RegistrationResult
Result of a registration run.
SpatialMetadata
Spatial metadata attached to point clouds and maps.
SphereModel
Sphere model: all surface points are radius from center.
StandardSchemas
Standard schemas used by typed views and IO adapters.
StatisticalOutlierConfig
Configuration for StatisticalOutlierRemoval.
StatisticalOutlierRemoval
Statistical Outlier Removal (SOR).
SymmetricEigen3
Result of a symmetric 3x3 eigendecomposition.
Timestamp
Timestamp in nanoseconds since an arbitrary epoch.
Transform3
Rigid transform represented as a 4x4 matrix.
TransformAabb
Axis-aligned bounding box.
TukeyKernel
Tukey biweight robust kernel.
Vec2
2D vector.
Vec3
3D vector.
Vec4
4D vector.
VoxelGridConfig
Configuration for voxelize.
VoxelGridDownsample
Voxel-grid downsampling filter.
VoxelGridDownsampleConfig
Configuration for voxel-grid downsampling.

Enums§

AttributeAggregation
Attribute aggregation policy for non-position fields.
DType
Supported scalar dtypes for point fields.
DeviceKind
Device kind supported by SpatialRust execution.
ExecutionPolicy
Execution policy for spatial algorithms.
FieldSemantic
Semantic meaning of a point field.
IoError
IO-specific error type for SpatialRust.
LasWriteFormat
Output encoding for LAS writers.
LeastSquaresResult
Result of a small dense linear solve.
MvpRegistrationMethod
Registration backend used by the MVP pipeline’s optional alignment step.
PcdWriteFormat
Output encoding for PCD writers.
PlyWriteFormat
Output encoding for PLY writers.
PointBuffer
Typed column buffer for one point field.
PointCloudFileFormat
Supported point cloud file formats detected from file extensions.
SpatialError
Core error type for SpatialRust.
UpAxis
Which axis points “up” (its minimum defines local ground height).
VoxelAggregationMode
Voxel aggregation strategy.
VoxelFill
How a voxel’s value is filled from the points that fall in it.

Constants§

FPFH_DESCRIPTOR_LEN
Length of an FPFH descriptor (33: three 11-bin angular histograms).

Traits§

Device
Minimal device abstraction defined in core and extended by spatialrust-gpu.
FeatureEstimator
Computes point-wise features from an input point cloud.
HasIntensity
Capability trait for point clouds with intensity values.
HasNormals3
Capability trait for point clouds with surface normals.
HasPositions3
Capability trait for point clouds with 3D positions.
NearestNeighborIndex
Exact nearest neighbor queries.
NeighborhoodProvider
Neighborhood query abstraction for feature estimation.
PointCloudFilter
Point cloud filter interface.
PointCloudRegistration
Common trait for point cloud registration algorithms.
PointCloudSegmenter
Common trait for point cloud segmentation algorithms.
RadiusSearchIndex
Radius search queries.
Real
Floating-point scalar used by spatial algorithms.
RobustKernel
Robust loss kernel used by registration and estimation algorithms.
Scalar
Numeric types supported by SpatialRust math primitives.
SpatialAlgorithm
Common trait implemented by spatial algorithms.
SpatialIndex
Common spatial index operations.
TransformPoint
Trait for types that can transform 3D points.

Functions§

apply_transform
Applies a 4×4 affine transform to a cloud’s positions (and normals, if present — normals are rotated by the linear part and renormalized).
approx_eq
Returns whether two values are approximately equal.
approx_eq_f64
Returns whether two values are approximately equal.
bounding_box
Axis-aligned bounding box of a cloud.
brute_force_knn
Finds up to k nearest neighbors by brute force.
brute_force_radius
Finds all neighbors within radius by brute force.
centroid
Centroid (mean position) of a cloud.
chamfer_distance
Symmetric Chamfer distance between two clouds (sum of mean squared NN distances in both directions). Lower is better; zero for identical clouds.
cloud_distances
Computes directed NN distance statistics between a and b in both directions with a single KD-tree per side.
copc_level_for_resolution
Computes the shallowest octree level whose spacing is at most resolution.
detect_point_cloud_format
Detects a point cloud format from a file path extension.
estimate_rigid_transform
Estimates the rigid transform that best maps source onto target.
extract_indices
Extracts a sub-cloud containing only the selected point indices.
extract_mask
Extracts points where mask[index] is true.
f32_eps
Default tolerance for f32 comparisons.
f64_eps
Default tolerance for f64 comparisons.
fpfh_descriptors
Computes an FPFH descriptor for every point in cloud.
hausdorff_distance
Symmetric Hausdorff distance between two clouds (the largest NN distance in either direction). Captures the worst-case discrepancy.
knn_graph
Builds a directed k-nearest-neighbor graph: an edge from every point to each of its k nearest neighbors (excluding itself).
merge_clouds
Concatenates clouds that share an identical schema into one cloud.
normalize_unit_sphere
Recenters a cloud and scales it so its farthest point is at unit distance — the canonical normalization for learned point-cloud models.
orient_normal_towards_viewpoint
Orients a normal to point towards the viewpoint when possible.
orient_normals_consistent
Re-orients a cloud’s normals so neighboring normals agree in sign.
oriented_bounding_box
Oriented bounding box via principal component analysis of the positions.
radius_graph
Builds a directed radius graph: an edge from every point to each other point within radius.
range_image
Projects a cloud into a spherical range image, keeping the nearest range per pixel. Points outside the vertical field of view are dropped.
read_copc
Reads all points from a COPC file on disk.
read_copc_file
Reads all points from a COPC file on disk.
read_copc_file_in_bounds
Reads points inside a bounding box at full available detail.
read_copc_file_info
Reads COPC header metadata without loading points.
read_copc_file_with_query
Reads points using a spatial bounds and optional LOD limit.
read_copc_url
Reads all points from a remote COPC URL.
read_copc_url_info
Reads COPC header metadata from a remote URL without loading points.
read_copc_url_with_query
Reads points from a remote COPC URL using an optional spatial query.
read_e57
Reads all scans from an E57 file and merges them into one point cloud.
read_e57_file
Reads all scans from an E57 file and merges them into one point cloud.
read_las
Reads a complete LAS/LAZ stream.
read_las_file
Reads a LAS/LAZ file from disk.
read_pcd
Reads a complete PCD file from any buffered reader.
read_pcd_file
Reads a PCD file from disk.
read_ply
Reads a complete PLY file from any buffered reader.
read_ply_file
Reads a PLY file from disk.
read_point_cloud_file
Reads a point cloud from disk, dispatching on the file extension.
read_point_cloud_file_with_format
Reads a point cloud using an explicit format.
recenter
Translates a cloud so its centroid sits at the origin.
scale_cloud
Uniformly scales a cloud about the origin by factor.
smallest_eigenvector
Returns the eigenvector for the smallest eigenvalue.
solve_linear_system
Solves A x = b for square n x n systems using Gaussian elimination with partial pivoting.
symmetric_eigen3
Computes eigenvalues and eigenvectors of a symmetric 3x3 matrix.
transform_point_cloud
Applies a rigid transform to point positions and normals in a point cloud copy.
voxelize
Voxelizes a cloud into a dense occupancy / count grid.
with_labels
Adds or replaces a per-point label field on a point cloud copy.
write_copc
Writes a point cloud to a COPC file on disk.
write_copc_file
Writes a point cloud to a COPC file on disk.
write_copc_file_with_params
Writes a point cloud to a COPC file using custom octree builder parameters.
write_e57
Writes a point cloud to an E57 file on disk.
write_e57_file
Writes a point cloud to an E57 file on disk.
write_las
Writes a point cloud to a LAS/LAZ stream and returns the inner writer.
write_las_file
Writes a point cloud to a LAS/LAZ file on disk.
write_pcd
Writes a point cloud to a PCD stream.
write_pcd_file
Writes a point cloud to a PCD file on disk.
write_ply
Writes a point cloud to a PLY stream.
write_ply_file
Writes a point cloud to a PLY file on disk.
write_point_cloud_file
Writes a point cloud to disk, dispatching on the file extension.
write_point_cloud_file_with_format
Writes a point cloud using an explicit format.

Type Aliases§

FpfhDescriptor
A single FPFH descriptor.
SpatialResult
Result type used across SpatialRust crates.