Point Cloud Library (PCL)  1.8.0
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::PCLBase< PointT > Class Template Reference

PCL base class. More...

#include <pcl/pcl_base.h>

+ Inheritance diagram for pcl::PCLBase< PointT >:

Public Types

typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr< PointIndicesPointIndicesPtr
 
typedef boost::shared_ptr< PointIndices const > PointIndicesConstPtr
 

Public Member Functions

 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()
 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 (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const 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 PointToperator[] (size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

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

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 PointT>
class pcl::PCLBase< PointT >

PCL base class.

Implements methods that are used by most PCL algorithms.

Definition at line 68 of file pcl_base.h.

Member Typedef Documentation

template<typename PointT>
typedef pcl::PointCloud<PointT> pcl::PCLBase< PointT >::PointCloud

Definition at line 71 of file pcl_base.h.

template<typename PointT>
typedef PointCloud::ConstPtr pcl::PCLBase< PointT >::PointCloudConstPtr

Definition at line 73 of file pcl_base.h.

template<typename PointT>
typedef PointCloud::Ptr pcl::PCLBase< PointT >::PointCloudPtr

Definition at line 72 of file pcl_base.h.

template<typename PointT>
typedef boost::shared_ptr<PointIndices const> pcl::PCLBase< PointT >::PointIndicesConstPtr

Definition at line 76 of file pcl_base.h.

template<typename PointT>
typedef boost::shared_ptr<PointIndices> pcl::PCLBase< PointT >::PointIndicesPtr

Definition at line 75 of file pcl_base.h.

Constructor & Destructor Documentation

template<typename PointT >
pcl::PCLBase< PointT >::PCLBase ( )

Empty constructor.

Definition at line 46 of file pcl_base.hpp.

template<typename PointT >
pcl::PCLBase< PointT >::PCLBase ( const PCLBase< PointT > &  base)

Copy constructor.

Definition at line 56 of file pcl_base.hpp.

template<typename PointT>
virtual pcl::PCLBase< PointT >::~PCLBase ( )
inlinevirtual

Destructor.

Definition at line 85 of file pcl_base.h.

Member Function Documentation

template<typename PointT >
bool pcl::PCLBase< PointT >::deinitCompute ( )
protected

This method should get called after finishing the actual computation.

Definition at line 174 of file pcl_base.hpp.

Referenced by pcl::FilterIndices< pcl::pcl::PCLPointCloud2 >::filter(), and pcl::Filter< pcl::PointXYZRGBL >::filter().

template<typename PointT>
IndicesPtr const pcl::PCLBase< PointT >::getIndices ( )
inline

Get a pointer to the vector of indices used.

Definition at line 132 of file pcl_base.h.

template<typename PointT>
IndicesConstPtr const pcl::PCLBase< PointT >::getIndices ( ) const
inline

Get a pointer to the vector of indices used.

Definition at line 136 of file pcl_base.h.

template<typename PointT>
PointCloudConstPtr const pcl::PCLBase< PointT >::getInputCloud ( ) const
inline

Get a pointer to the input point cloud dataset.

Definition at line 99 of file pcl_base.h.

template<typename PointT >
bool pcl::PCLBase< PointT >::initCompute ( )
protected

This method should get called before starting the actual computation.

Internally, initCompute() does the following:

  • checks if an input dataset is given, and returns false otherwise
  • checks whether a set of input indices has been given. Returns true if yes.
  • if no input indices have been given, a fake set is created, which will be used until:
    • either a new set is given via setIndices(), or
    • a new cloud is given that has a different set of points. This will trigger an update on the set of fake indices

Definition at line 139 of file pcl_base.hpp.

Referenced by pcl::FilterIndices< pcl::pcl::PCLPointCloud2 >::filter(), and pcl::Filter< pcl::PointXYZRGBL >::filter().

template<typename PointT>
const PointT& pcl::PCLBase< PointT >::operator[] ( size_t  pos) const
inline

Override PointCloud operator[] to shorten code.

Note
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters
[in]posposition in indices_ vector

Definition at line 143 of file pcl_base.h.

template<typename PointT >
void pcl::PCLBase< PointT >::setIndices ( const IndicesPtr indices)
virtual

Provide a pointer to the vector of indices that represents the input data.

Parameters
[in]indicesa pointer to the indices that represent the input data.

Reimplemented in pcl::PCA< PointT >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 73 of file pcl_base.hpp.

Referenced by pcl::people::GroundBasedPeopleDetectionApp< PointT >::compute(), pcl::PCA< PointT >::setIndices(), and pcl::ism::ImplicitShapeModelEstimation< FeatureSize, PointT, NormalT >::simplifyCloud().

template<typename PointT >
void pcl::PCLBase< PointT >::setIndices ( const IndicesConstPtr indices)
virtual

Provide a pointer to the vector of indices that represents the input data.

Parameters
[in]indicesa pointer to the indices that represent the input data.

Reimplemented in pcl::PCA< PointT >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 82 of file pcl_base.hpp.

template<typename PointT >
void pcl::PCLBase< PointT >::setIndices ( const PointIndicesConstPtr indices)
virtual

Provide a pointer to the vector of indices that represents the input data.

Parameters
[in]indicesa pointer to the indices that represent the input data.

Reimplemented in pcl::PCA< PointT >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 91 of file pcl_base.hpp.

template<typename PointT >
void pcl::PCLBase< PointT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
)
virtual

Set the indices for the points laying within an interest region of the point cloud.

Note
you shouldn't call this method on unorganized point clouds!
Parameters
[in]row_startthe offset on rows
[in]col_startthe offset on columns
[in]nb_rowsthe number of rows to be considered row_start included
[in]nb_colsthe number of columns to be considered col_start included

Reimplemented in pcl::PCA< PointT >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 100 of file pcl_base.hpp.

template<typename PointT >
void pcl::PCLBase< PointT >::setInputCloud ( const PointCloudConstPtr cloud)
virtual

Provide a pointer to the input dataset.

Parameters
[in]cloudthe const boost shared pointer to a PointCloud message

Reimplemented in pcl::GrabCut< PointT >, pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >, pcl::Registration< PointSource, PointTarget, Scalar >, pcl::Registration< PointT, PointT, Scalar >, pcl::Registration< PointT, PointT >, pcl::PCA< PointT >, pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 66 of file pcl_base.hpp.

Referenced by pcl::LocalMaximum< PointT >::applyFilterIndices(), pcl::people::GroundBasedPeopleDetectionApp< PointT >::compute(), pcl::GRSDEstimation< PointInT, PointNT, PointOutT >::computeFeature(), pcl::CrfSegmentation< PointT >::createVoxelGrid(), pcl::SIFTKeypoint< PointInT, PointOutT >::detectKeypoints(), pcl::people::GroundBasedPeopleDetectionApp< PointT >::filter(), pcl::kinfuLS::WorldModel< PointT >::getExistingData(), pcl::kinfuLS::WorldModel< PointT >::getWorldAsCubes(), pcl::NormalDistributionsTransform< PointSource, PointTarget >::init(), pcl::OrganizedMultiPlaneSegmentation< PointT, PointNT, PointLT >::segment(), pcl::PCA< PointT >::setInputCloud(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setInputCloud(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::setInputSource(), pcl::Registration< PointSource, PointTarget >::setInputSource(), pcl::HypothesisVerification< ModelT, SceneT >::setSceneCloud(), pcl::kinfuLS::WorldModel< PointT >::setSliceAsNans(), and pcl::ism::ImplicitShapeModelEstimation< FeatureSize, PointT, NormalT >::simplifyCloud().

Member Data Documentation

template<typename PointT>
bool pcl::PCLBase< PointT >::fake_indices_
protected

If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

Definition at line 159 of file pcl_base.h.

template<typename PointT>
IndicesPtr pcl::PCLBase< PointT >::indices_
protected

A pointer to the vector of point indices to use.

Definition at line 153 of file pcl_base.h.

Referenced by pcl::PCLBase< PointXYZRGB >::getIndices(), pcl::PCLBase< PointXYZRGB >::operator[](), and pcl::PCLBase< PointXYZRGB >::~PCLBase().

template<typename PointT>
PointCloudConstPtr pcl::PCLBase< PointT >::input_
protected
template<typename PointT>
bool pcl::PCLBase< PointT >::use_indices_
protected

Set to true if point indices are used.

Definition at line 156 of file pcl_base.h.

Referenced by pcl::ExtractIndices< PointT >::ExtractIndices().


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