Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lvr2::PointsetSurface< BaseVecT > Class Template Referenceabstract

An interface class to wrap all functionality that is needed to generate a surface approximation from point cloud data. More...

#include <PointsetSurface.hpp>

Inheritance diagram for lvr2::PointsetSurface< BaseVecT >:
Inheritance graph
[legend]

Public Member Functions

virtual void calculateSurfaceNormals ()=0
 Calculates surface normals for each data point in the given PointBuffeer. If the buffer alreay contains normal information it will be overwritten with the new normals. More...
 
virtual pair< typename BaseVecT::CoordType, typename BaseVecT::CoordType > distance (BaseVecT v) const =0
 Returns the distance of vertex v from the nearest tangent plane. More...
 
const BoundingBox< BaseVecT > & getBoundingBox () const
 Returns the bounding box of the point set. More...
 
virtual Normal< float > getInterpolatedNormal (const BaseVecT &position) const
 Interpolates a surface normal at the given position. More...
 
virtual PointBufferPtr pointBuffer () const
 Returns the internal point buffer. After a call of calculateSurfaceNormals the buffer will contain normal information. More...
 
std::shared_ptr< SearchTree< BaseVecT > > searchTree () const
 Returns a pointer to the search tree. More...
 
void setKd (int k)
 Sets the number of points that is used for distance evaluation, i.e. an average of the distance to the k nearest data points is given (useful in noisy data sets). More...
 
void setKi (int k)
 If k is > 0, each normal will be averaged with its k neighbors. More...
 
void setKn (int k)
 Sets the size of the k-neighborhood that is used for normal estimation. More...
 

Protected Member Functions

 PointsetSurface (PointBufferPtr pointcloud)
 Constructor. Stores the given buffer pointer. If the point buffer does not contain surface normals, you will have to call calculateSurfaceNormals before the first call . More...
 
 PointsetSurface ()
 

Protected Attributes

BoundingBox< BaseVecT > m_boundingBox
 The bounding box of the point cloud. More...
 
int m_kd
 The number of points used for distance function evaluation. More...
 
int m_ki
 The number of points used for normal interpolation. More...
 
int m_kn
 The number of points used for normal estimation. More...
 
PointBufferPtr m_pointBuffer
 The point cloud used for surface approximation. More...
 
std::shared_ptr< SearchTree< BaseVecT > > m_searchTree
 The search tree that is built from the point cloud data. More...
 

Detailed Description

template<typename BaseVecT>
class lvr2::PointsetSurface< BaseVecT >

An interface class to wrap all functionality that is needed to generate a surface approximation from point cloud data.

Classes that implement this interface can be used for Marching Cubes based mesh generation algorithms in via the SurfaceReconstruction interface.

Definition at line 61 of file PointsetSurface.hpp.

Constructor & Destructor Documentation

◆ PointsetSurface() [1/2]

template<typename BaseVecT>
lvr2::PointsetSurface< BaseVecT >::PointsetSurface ( PointBufferPtr  pointcloud)
protected

Constructor. Stores the given buffer pointer. If the point buffer does not contain surface normals, you will have to call calculateSurfaceNormals before the first call .

◆ PointsetSurface() [2/2]

template<typename BaseVecT>
lvr2::PointsetSurface< BaseVecT >::PointsetSurface ( )
inlineprotected

Definition at line 139 of file PointsetSurface.hpp.

Member Function Documentation

◆ calculateSurfaceNormals()

template<typename BaseVecT>
virtual void lvr2::PointsetSurface< BaseVecT >::calculateSurfaceNormals ( )
pure virtual

Calculates surface normals for each data point in the given PointBuffeer. If the buffer alreay contains normal information it will be overwritten with the new normals.

Implemented in lvr2::AdaptiveKSearchSurface< BaseVecT >.

◆ distance()

template<typename BaseVecT>
virtual pair<typename BaseVecT::CoordType, typename BaseVecT::CoordType> lvr2::PointsetSurface< BaseVecT >::distance ( BaseVecT  v) const
pure virtual

Returns the distance of vertex v from the nearest tangent plane.

Parameters
pA grid point
Returns
The first value is the projected distance from the query point to the isosurface. The second value is the euclidian distance to the nearest data point.

Implemented in lvr2::AdaptiveKSearchSurface< BaseVecT >.

◆ getBoundingBox()

template<typename BaseVecT>
const BoundingBox<BaseVecT>& lvr2::PointsetSurface< BaseVecT >::getBoundingBox ( ) const

Returns the bounding box of the point set.

◆ getInterpolatedNormal()

template<typename BaseVecT>
virtual Normal<float> lvr2::PointsetSurface< BaseVecT >::getInterpolatedNormal ( const BaseVecT &  position) const
virtual

Interpolates a surface normal at the given position.

Parameters
positionthe position to calculate a normal for
Returns
The normal

◆ pointBuffer()

template<typename BaseVecT>
virtual PointBufferPtr lvr2::PointsetSurface< BaseVecT >::pointBuffer ( ) const
virtual

Returns the internal point buffer. After a call of calculateSurfaceNormals the buffer will contain normal information.

◆ searchTree()

template<typename BaseVecT>
std::shared_ptr<SearchTree<BaseVecT> > lvr2::PointsetSurface< BaseVecT >::searchTree ( ) const

Returns a pointer to the search tree.

◆ setKd()

template<typename BaseVecT>
void lvr2::PointsetSurface< BaseVecT >::setKd ( int  k)
inline

Sets the number of points that is used for distance evaluation, i.e. an average of the distance to the k nearest data points is given (useful in noisy data sets).

Definition at line 128 of file PointsetSurface.hpp.

◆ setKi()

template<typename BaseVecT>
void lvr2::PointsetSurface< BaseVecT >::setKi ( int  k)
inline

If k is > 0, each normal will be averaged with its k neighbors.

Definition at line 114 of file PointsetSurface.hpp.

◆ setKn()

template<typename BaseVecT>
void lvr2::PointsetSurface< BaseVecT >::setKn ( int  k)
inline

Sets the size of the k-neighborhood that is used for normal estimation.

Definition at line 120 of file PointsetSurface.hpp.

Member Data Documentation

◆ m_boundingBox

template<typename BaseVecT>
BoundingBox<BaseVecT> lvr2::PointsetSurface< BaseVecT >::m_boundingBox
protected

The bounding box of the point cloud.

Definition at line 148 of file PointsetSurface.hpp.

◆ m_kd

template<typename BaseVecT>
int lvr2::PointsetSurface< BaseVecT >::m_kd
protected

The number of points used for distance function evaluation.

Definition at line 157 of file PointsetSurface.hpp.

◆ m_ki

template<typename BaseVecT>
int lvr2::PointsetSurface< BaseVecT >::m_ki
protected

The number of points used for normal interpolation.

Definition at line 154 of file PointsetSurface.hpp.

◆ m_kn

template<typename BaseVecT>
int lvr2::PointsetSurface< BaseVecT >::m_kn
protected

The number of points used for normal estimation.

Definition at line 151 of file PointsetSurface.hpp.

◆ m_pointBuffer

template<typename BaseVecT>
PointBufferPtr lvr2::PointsetSurface< BaseVecT >::m_pointBuffer
protected

The point cloud used for surface approximation.

Definition at line 139 of file PointsetSurface.hpp.

◆ m_searchTree

template<typename BaseVecT>
std::shared_ptr<SearchTree<BaseVecT> > lvr2::PointsetSurface< BaseVecT >::m_searchTree
protected

The search tree that is built from the point cloud data.

Definition at line 145 of file PointsetSurface.hpp.


The documentation for this class was generated from the following file:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:12