A dense Cartesian 3D point cloud object. More...
#include <cvb/dense_point_cloud.hpp>
Inherits PointCloud.
Public Member Functions  
SparsePointCloudPtr  ToSparsePointCloud () const 
Creates a sparse point cloud from this dense point cloud with confidence plane. More...  
Cvb::Size2D< int >  LatticeSize () const 
Gets the number of x,y,z(,w) point rows and columns of the given dense PointCloud. More...  
DensePointCloudPtr  Shrink () const 
Creates a new dense point cloud where lines and columns at the borders containing only nonconfident points are removed. More...  
DensePointCloudPtr  Crop (const Cuboid &clipBox) const 
Creates a new point cloud which only consists of the points inside the clip box. More...  
DensePointCloudPtr  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 of the two boundary planes Z=Zmin and Z=Zmax can be modified by angles theta and phi. More...  
DensePointCloudPtr  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. More...  
DensePointCloudPtr  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. More...  
template<class T >  
DenseComponentsPointers3D< T >  PointComponents () const 
Get the point components from the given point cloud. More...  
template<class T >  
bool  TryPointComponents (DenseComponentsPointers3D< T > &components) const noexcept 
Tries to get the point components from the given point cloud. More...  
Public Member Functions inherited from PointCloud  
PointCloudLayout  Layout () const 
Get the layout of the available buffers/planes of the given point cloud. More...  
class DataType  DataType () const 
Gets the DataType of the x,y,z(,w) components of the given PointCloud. More...  
std::size_t  NumPoints () const 
Gets the number of x,y,z(,w) points in the given point cloud. More...  
ComponentsPointers3D  PointComponents () const 
Tries to get the point components from the given point cloud. More...  
template<class T >  
std::size_t  Points (Point3D< T > *&points) const 
Gets the 3D points from the given point cloud. More...  
template<class T >  
std::size_t  PointsH (Point3DH< T > *&pointsH) const 
Tries to get the 3D points from the given point cloud. More...  
Cuboid  CalculateBoundingBox () const 
Calculates the minimum and maximum extent of the point cloud. More...  
Point3D< double >  CalculateCenterOfGravity () const 
Calculates the center of gravity of the point cloud. More...  
Matrix3D  CalculateCovarianceMatrix () const 
Calculates the covariance matrix of the point cloud. More...  
Plane3D  FitPlane () const 
Fits a plane in the points of the point cloud without cropping it. More...  
Plane3D  FitPlane (const Cuboid &aoi) const 
Fits a plane in the points of the point cloud for a specified area of interest. More...  
template<class T >  
std::shared_ptr< T >  Crop (const Cuboid &clipBox) const 
Creates a new point cloud which only consists of the points inside the clip box. More...  
template<class T >  
std::shared_ptr< T >  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 of the two boundary planes Z=Zmin and Z=Zmax can be modified by angles theta and phi. More...  
template<class T >  
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. More...  
template<class T >  
std::shared_ptr< T >  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. More...  
PointCloudPtr  Downsample (DownSampleMode mode, int value) const 
Creates a new point cloud which has several points being removed dependent on the down sample mode and value. More...  
PointCloudPtr  Duplicate () const 
Creates a new point cloud which is a copy this point cloud. More...  
void  Save (const String &fileName) const 
Saves the given point cloud to the file with the given FileName. More...  
PointCloudPtr  Convert (PointCloudFlags flags) const 
Creates a new point cloud, which is a copy from this point cloud, but with possibly different data type and number of components. More...  
PointCloudPtr  Scale (Factors3D factors) const 
Creates a new point cloud with all points being scaled by the given factors. More...  
PointCloudPtr  Transform (const AffineMatrix3D &transformation) const 
Creates a new point cloud with all points being transformed by the given transformation. More...  
PointCloudPtr  Transform (const Matrix3DH &transformation) const 
Creates a new point cloud with all points being transformed by the given transformation. More...  
void  Transform (const AffineMatrix3D &affineTransformation, PointCloud &pointCloud) 
Transforms all points in this point cloud by the given AffineTransformation and stores them in the given point cloud. More...  
void  Transform (const Cvb::Matrix3DH &transformation, PointCloud &pointCloud) 
Transforms all points in this point cloud by the given transformation and stores them in the given point cloud. More...  
std::unique_ptr< Cvb::Image >  RangeMap (ValueRange< double > xRange, ValueRange< double > yRange, Size2D< int > size, double background) const 
Creates a new range map image via linear projection in negative zdirection. More...  
int  PlaneCount () const noexcept 
Gets the number of planes enumerated by this object. More...  
std::vector< PlanePtr >  Planes () const 
Gets all available planes enumerated by this object. More...  
PlanePtr  Plane (int index) const 
Index based plane access. More...  
size_t  MemorySize (PointCloudFlags flags, Cvb::PointCloudFileFormat format) const 
Determines the amount of memory needed for ToMemory. More...  
template<class Point >  
size_t  MemorySize (Cvb::PointCloudFileFormat format) const 
Determines the amount of memory needed for ToMemory. More...  
void  ToMemory (PointCloudFlags flags, Cvb::PointCloudFileFormat format, size_t size, void *buffer) const 
Saves the point cloud to the memory in the given format. More...  
template<class Point >  
void  ToMemory (Cvb::PointCloudFileFormat format, size_t size, std::uint8_t *buffer) const 
Saves the point cloud to the memory in the given format. More...  
void *  Handle () const noexcept 
Returns CAPI style handle to Node Object. More...  
Static Public Member Functions  
static DensePointCloudPtr  FromComposite (CompositePtr object) 
Creates a dense point cloud from a composite. More...  
Static Public Member Functions inherited from PointCloud  
static PointCloudPtr  FromHandle (HandleGuard< PointCloud > &&guard) 
Creates a point cloud from a classic API handle. More...  
template<class T >  
static std::shared_ptr< T >  FromComposite (CompositePtr object) 
Creates a point cloud from a composite. More...  
static PointCloudPtr  FromMemory (void *buffer, size_t size, PointCloudFlags flags, Cvb::PointCloudFileFormat format) 
Creates a point cloud reading memory from buffer. More...  
template<class Point >  
static PointCloudPtr  FromMemory (void *buffer, size_t size, Cvb::PointCloudFileFormat format) 
Creates a point cloud reading memory from buffer. More...  
Additional Inherited Members  
Related Functions inherited from PointCloud  
template<class VISITOR >  
auto  Visit (VISITOR &&visitor, const PointCloud &cloud) 
Creates a Cvb::Block based on the cloud object's access trait and pixel type and calls the given visitor with it. More...  
template<class T , class VISITOR >  
auto  VisitAs (VISITOR &&visitor, const PointCloud &cloud) 
Creates a Cvb::Block based on the cloud object's access trait and given pixel type T and calls the given visitor with it. More...  
A dense Cartesian 3D point cloud object.
A dense point cloud is an ordered set of 3D points, placed on a grid with a given width and height. The advantage of dense clouds is to have immediate neighbor information. The disadvantage is, that you cannot have arbitrary clouds (e.g. an affine transformation breaks the lattice view). Also each xyposition can have only one corresponding zheight.
A dense point cloud has grid / neighbor information available and has a larger memory than a sparse point cloud (due to NaN values / holes).
Each dense point cloud can be converted to a sparse point cloud.

inline 
Creates a new point cloud which only consists of the points inside the clip box.
[in]  clipBox  Cuboid defining the bounds for the points to be copied (min/max are inclusive). 
Any  exception derived from std::exception including CvbException. 

inlinestatic 
Creates a dense point cloud from a composite.
[in]  object  A composite to share. 
Any  exception derived from std::exception including CvbException. 

inline 
Creates a new point cloud which only consists of the points inside the clipBox, where the orientation of the two boundary planes Z=Zmin and Z=Zmax can be modified by angles theta and phi.
For theta, phi = 0,0 the function will give the same result as Crop(). Angle theta tilts the two Zboundary planes towards the (positive) Yaxis. Additionally, phi rotates the tilted Zboundary planes around the Zaxis (for theta=0, phi will have no effect, because it is then just an inplanerotation). The two Zboundary planes will stay parallel, but no longer necessarily orthogonal to the lateral boundary planes. Note, that only the Zboundaries are tilted and not the whole bounding box, i.e. X and Yboundaries will stay the same.
[in]  clipBox  Cuboid defining the bounds for the points to be copied (min/max are inclusive). 
[in]  theta  Tilt angle of the two Zboundary planes Z=Zmin and Z=Zmax towards the positive Yaxis. 
[in]  phi  Rotation angle of the tilted Zboundary planes around the Zaxis. If Theta = 0, Phi will have no effect. 
Any  exception derived from std::exception including CvbException. 

inline 
Gets the number of x,y,z(,w) point rows and columns of the given dense PointCloud.
Any  exception derived from std::exception including CvbException. 

inline 
Creates a new point cloud where points within or outside a range parallel to given plane are cropped.
The plane is defined by the hessian normal form:
Points are cropped within or outside a range parallel to the given plane. The range is defined by range. Note, that Range.Max and Range.Min are applied along normal direction.
In order to define a range around the plane, maximum and minimum range have to be positive and negative respectively.
Cropped points are set nonconfident. Lines and columns at the borders containing only nonconfident points are removed. If the input does not contain a confidence plane, a confidence plane will be added to the cropped point cloud.
[in]  plane  Points parallel to this plane will be cropped. 
[in]  range  Points within or outside this range will be cropped. 
[in]  cropRange  Indicates whether points should be cropped within or outside the range. 
Any  exception derived from std::exception including CvbException. 

inline 
Creates a new point cloud which only consists of the points below or above given plane.
The plane is defined by the hessian normal form:
Above plane means all points with z values greater than the plane are cropped. It makes no difference in which direction the given normal points. The normal is always converted, so that it points up (positive z value). Note, if Normal.Z equals 0, "below" and "above" is undefined and thus no cropping is done. Instead the input point cloud will be duplicated.
[in]  plane  Points beyond this plane will be cropped. 
[in]  threshold  Points below plane plus this value and points above plane minus this value are cropped respectively. This threshold should be set, if plane is calculated via FitPlane(). It ensures, that all points of plane plus noise are cropped. Therefore the threshold is added or substracted depending on whether it should be cropped above or below. 
[in]  cropBelowAbove  Indicates if points should either be cropped below or above plane. 
Any  exception derived from std::exception including CvbException. 

inline 
Get the point components from the given point cloud.
Any  exception derived from std::exception including CvbException. 

inline 
Creates a new dense point cloud where lines and columns at the borders containing only nonconfident points are removed.
Please ensure that your point cloud contains a confidence plane.
Any  exception derived from std::exception including CvbException. 

inline 
Creates a sparse point cloud from this dense point cloud with confidence plane.
Nonconfident points will be removed and the confidence plane is not kept. The new sparse point cloud has the same planes as this dense point cloud (except confidence).

inlinenoexcept 
Tries to get the point components from the given point cloud.
This method does not throw if the point type does not match the point cloud type.
[out]  components  The components pointers. 
Does  not throw any exception. 