Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::SurfaceReconstruction< PointInT > Class Template Referenceabstract

SurfaceReconstruction represents a base surface reconstruction class. More...

#include <pcl/surface/reconstruction.h>

+ Inheritance diagram for pcl::SurfaceReconstruction< PointInT >:
+ Collaboration diagram for pcl::SurfaceReconstruction< PointInT >:

Public Types

using Ptr = shared_ptr< SurfaceReconstruction< PointInT > >
 
using ConstPtr = shared_ptr< const SurfaceReconstruction< PointInT > >
 
- Public Types inherited from pcl::PCLSurfaceBase< PointInT >
using Ptr = shared_ptr< PCLSurfaceBase< PointInT > >
 
using ConstPtr = shared_ptr< const PCLSurfaceBase< PointInT > >
 
using KdTree = pcl::search::Search< PointInT >
 
using KdTreePtr = typename KdTree::Ptr
 
- Public Types inherited from pcl::PCLBase< PointInT >
using PointCloud = pcl::PointCloud< PointInT >
 
using PointCloudPtr = typename PointCloud::Ptr
 
using PointCloudConstPtr = typename PointCloud::ConstPtr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 

Public Member Functions

 SurfaceReconstruction ()=default
 Constructor. More...
 
 ~SurfaceReconstruction () override=default
 Destructor. More...
 
void reconstruct (pcl::PolygonMesh &output) override
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
 
virtual void reconstruct (pcl::PointCloud< PointInT > &points, std::vector< pcl::Vertices > &polygons)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
 
- Public Member Functions inherited from pcl::PCLSurfaceBase< PointInT >
 PCLSurfaceBase ()
 Empty constructor. More...
 
 ~PCLSurfaceBase () override=default
 Empty destructor. More...
 
void setSearchMethod (const KdTreePtr &tree)
 Provide an optional pointer to a search object. More...
 
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointInT >
 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()=default
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset. More...
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointInT & operator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

virtual void performReconstruction (pcl::PolygonMesh &output)=0
 Abstract surface reconstruction method. More...
 
virtual void performReconstruction (pcl::PointCloud< PointInT > &points, std::vector< pcl::Vertices > &polygons)=0
 Abstract surface reconstruction method. More...
 
- Protected Member Functions inherited from pcl::PCLSurfaceBase< PointInT >
virtual std::string getClassName () const
 Abstract class get name method. More...
 
- Protected Member Functions inherited from pcl::PCLBase< PointInT >
bool initCompute ()
 This method should get called before starting the actual computation. More...
 
bool deinitCompute ()
 This method should get called after finishing the actual computation. More...
 

Protected Attributes

bool check_tree_ {true}
 A flag specifying whether or not the derived reconstruction algorithm needs the search object tree. More...
 
- Protected Attributes inherited from pcl::PCLSurfaceBase< PointInT >
KdTreePtr tree_
 A pointer to the spatial search object. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointInT >
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
bool use_indices_
 Set to true if point indices are used. More...
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...
 

Detailed Description

template<typename PointInT>
class pcl::SurfaceReconstruction< PointInT >

SurfaceReconstruction represents a base surface reconstruction class.

All surface reconstruction methods take in a point cloud and generate a new surface from it, by either re-sampling the data or generating new data altogether. These methods are thus not preserving the topology of the original data.

Note
Reconstruction methods that always preserve the original input point cloud data as the surface vertices and simply construct the mesh on top should inherit from MeshConstruction.
Author
Radu B. Rusu, Michael Dixon, Alexandru E. Ichim

Definition at line 117 of file reconstruction.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointInT >
using pcl::SurfaceReconstruction< PointInT >::ConstPtr = shared_ptr<const SurfaceReconstruction<PointInT> >

Definition at line 121 of file reconstruction.h.

◆ Ptr

template<typename PointInT >
using pcl::SurfaceReconstruction< PointInT >::Ptr = shared_ptr<SurfaceReconstruction<PointInT> >

Definition at line 120 of file reconstruction.h.

Constructor & Destructor Documentation

◆ SurfaceReconstruction()

template<typename PointInT >
pcl::SurfaceReconstruction< PointInT >::SurfaceReconstruction ( )
default

Constructor.

◆ ~SurfaceReconstruction()

template<typename PointInT >
pcl::SurfaceReconstruction< PointInT >::~SurfaceReconstruction ( )
overridedefault

Destructor.

Member Function Documentation

◆ performReconstruction() [1/2]

template<typename PointInT >
virtual void pcl::SurfaceReconstruction< PointInT >::performReconstruction ( pcl::PointCloud< PointInT > &  points,
std::vector< pcl::Vertices > &  polygons 
)
protectedpure virtual

Abstract surface reconstruction method.

Parameters
[out]pointsthe resultant points lying on the surface
[out]polygonsthe resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.

Implemented in pcl::Poisson< PointNT >, pcl::MarchingCubes< PointNT >, and pcl::GridProjection< PointNT >.

◆ performReconstruction() [2/2]

template<typename PointInT >
virtual void pcl::SurfaceReconstruction< PointInT >::performReconstruction ( pcl::PolygonMesh output)
protectedpure virtual

Abstract surface reconstruction method.

Parameters
[out]outputthe output polygonal mesh

Implemented in pcl::Poisson< PointNT >, pcl::MarchingCubes< PointNT >, and pcl::GridProjection< PointNT >.

◆ reconstruct() [1/2]

template<typename PointInT >
void pcl::SurfaceReconstruction< PointInT >::reconstruct ( pcl::PointCloud< PointInT > &  points,
std::vector< pcl::Vertices > &  polygons 
)
virtual

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters
[out]pointsthe resultant points lying on the new surface
[out]polygonsthe resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.

NOTE: usually the number of triangles is around twice the number of vertices

Definition at line 92 of file reconstruction.hpp.

References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, and pcl::PointCloud< PointT >::width.

◆ reconstruct() [2/2]

template<typename PointInT >
void pcl::SurfaceReconstruction< PointInT >::reconstruct ( pcl::PolygonMesh output)
overridevirtual

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters
[out]outputthe resultant reconstructed surface model

NOTE: passing in boost shared pointer with * as const& should be OK here

NOTE: usually the number of triangles is around twice the number of vertices

Implements pcl::PCLSurfaceBase< PointInT >.

Definition at line 52 of file reconstruction.hpp.

References pcl::PolygonMesh::cloud, pcl::PCLPointCloud2::data, pcl::PolygonMesh::header, pcl::PCLPointCloud2::height, pcl::PolygonMesh::polygons, pcl::toPCLPointCloud2(), and pcl::PCLPointCloud2::width.

Member Data Documentation

◆ check_tree_

template<typename PointInT >
bool pcl::SurfaceReconstruction< PointInT >::check_tree_ {true}
protected

A flag specifying whether or not the derived reconstruction algorithm needs the search object tree.

Definition at line 156 of file reconstruction.h.


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