6#include "decl_point_cloud.hpp"
8#include "../sparse_components_pointers_3d.hpp"
33 class SparsePointCloud :
public PointCloud
35 friend class PointCloud;
40 if (IsDense(guard.Handle()))
51 SparsePointCloud(HandleGuard<PointCloud> &&guard, PrivateTag) noexcept
98 return Internal::DoResCallShareOut<DensePointCloud>([&](
void *&handle) {
99 return CVB_CALL_CAPI(CVC3DConvertSparseToDensePointCloudAutomatic(
Handle(), handle, numDroppedPoints);)
120 size_t numDroppedPoints = 0;
127 return Internal::DoResCallShareOut<SparsePointCloud>([&](
void *&handle) {
128 return CVB_CALL_CAPI(
129 CVC3DCreateCroppedPointCloud(
Handle(), *
reinterpret_cast<const CExports::CVC3DCuboid *
>(&clipBox), handle));
136 return Internal::DoResCallShareOut<SparsePointCloud>([&](
void *&handle) {
137 return CVB_CALL_CAPI(CVC3DCreateFrustumCroppedPointCloud(
138 Handle(), *
reinterpret_cast<const CExports::CVC3DCuboid *
>(&clipBox), theta.
Deg(), phi.
Deg(), handle));
214 auto error = PointCloud::TryPointComponents<T>(rawComponents);
232 auto error = PointCloud::TryPointComponents<T>(rawComponents);
33 class SparsePointCloud :
public PointCloud {
…};
Object for convenient and type - safe handling of angles.
Definition angle.hpp:16
double Deg() const noexcept
Get the value in degrees.
Definition angle.hpp:89
Point components of the point cloud.
Definition components_pointers_3d.hpp:18
3D rectangle in the X, Y and Z domain.
Definition cuboid.hpp:19
An organized dense Cartesian 3D point cloud object.
Definition decl_dense_point_cloud.hpp:35
A plane in 3D space in Hessian normal form.
Definition plane_3d.hpp:19
std::shared_ptr< T > PlaneCrop(const Plane3D &plane, const ValueRange< double > &range, CropRange cropRange) const
Creates a new point cloud where points within or outside a range parallel to given plane are cropped.
Definition decl_point_cloud.hpp:391
static std::shared_ptr< T > FromComposite(CompositePtr object)
Creates a point cloud from a composite.
Definition detail_point_cloud.hpp:27
void * Handle() const noexcept
Returns C-API style handle to Node Object.
Definition decl_point_cloud.hpp:764
Point components of a sparse point cloud.
Definition sparse_components_pointers_3d.hpp:14
bool TryPointComponents(SparseComponentsPointers3D< T > &components) const noexcept
Tries to get the point components from the given point cloud.
Definition decl_sparse_point_cloud.hpp:229
SparseComponentsPointers3D< T > PointComponents() const
Get the point components from the given point cloud.
Definition decl_sparse_point_cloud.hpp:211
DensePointCloudPtr ToDensePointCloud(size_t &numDroppedPoints, ConversionMode conversionMode=ConversionMode::Automatic) const
Creates a dense point cloud from a sparse point cloud.
Definition decl_sparse_point_cloud.hpp:93
SparsePointCloudPtr PlaneCrop(const Plane3D &plane, const ValueRange< double > &range, CropRange cropRange) const
Creates a new point cloud where points within or outside a range parallel to given plane are cropped.
Definition decl_sparse_point_cloud.hpp:167
static SparsePointCloudPtr FromComposite(CompositePtr object)
Creates a sparse point cloud from a composite.
Definition decl_sparse_point_cloud.hpp:72
SparsePointCloudPtr Crop(const Cuboid &clipBox) const
Creates a new point cloud which only consists of the points inside the clip box.
Definition decl_sparse_point_cloud.hpp:125
SparsePointCloudPtr PlaneCrop(const Plane3D &plane, double threshold, CropDirection cropBelowAbove=CropDirection::Below) const
Creates a new point cloud which only consists of the points below or above given plane.
Definition decl_sparse_point_cloud.hpp:199
DensePointCloudPtr ToDensePointCloud(ConversionMode conversionMode=ConversionMode::Automatic) const
Creates a dense point cloud from a sparse point cloud.
Definition decl_sparse_point_cloud.hpp:118
static SparsePointCloudPtr FromDensePointCloud(const DensePointCloud &densePointCloud)
Creates a sparse point cloud from a dense point cloud with confidence plane.
Definition detail_sparse_point_cloud.hpp:10
SparsePointCloudPtr FrustumCrop(const Cuboid &clipBox, Angle theta, Angle phi) const
Creates a new point cloud which only consists of the points inside the clipBox, where the orientation...
Definition decl_sparse_point_cloud.hpp:134
Container for range definitions.
Definition value_range.hpp:17
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
CropRange
Indicates cropping range.
Definition core_3d.hpp:288
std::shared_ptr< SparsePointCloud > SparsePointCloudPtr
Convenience shared pointer for SparsePointCloud.
Definition core_3d.hpp:48
ConversionMode
Mode used by conversion to dense point cloud.
Definition global.hpp:524
@ Automatic
Definition global.hpp:528
CropDirection
Indicates cropping direction.
Definition core_3d.hpp:301
@ Below
Crop below given plane.
Definition core_3d.hpp:305
std::shared_ptr< Composite > CompositePtr
Convenience shared pointer for Composite.
Definition global.hpp:102
std::shared_ptr< DensePointCloud > DensePointCloudPtr
Convenience shared pointer for DensePointCloud.
Definition core_3d.hpp:44
T rethrow_exception(T... args)