W3cubDocs

/PointCloudLibrary

PCL base class. More...

#include <pcl/pcl_base.h>

Public Types

using PointCloud = pcl::PointCloud< PointT >
using PointCloudPtr = typename PointCloud::Ptr
using PointCloudConstPtr = typename PointCloud::ConstPtr
using PointIndicesPtr = PointIndices::Ptr
using PointIndicesConstPtr = PointIndices::ConstPtr

Public Member Functions

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...
const PointCloudConstPtr 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...
const IndicesConstPtr getIndices () const
Get a pointer to the vector of indices used. More...
const PointT & operator[] (std::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 69 of file pcl_base.h.

Member Typedef Documentation

PointCloud

template<typename PointT >
using pcl::PCLBase< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 72 of file pcl_base.h.

PointCloudConstPtr

template<typename PointT >
using pcl::PCLBase< PointT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 74 of file pcl_base.h.

PointCloudPtr

template<typename PointT >
using pcl::PCLBase< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 73 of file pcl_base.h.

PointIndicesConstPtr

template<typename PointT >
using pcl::PCLBase< PointT >::PointIndicesConstPtr = PointIndices::ConstPtr

Definition at line 77 of file pcl_base.h.

PointIndicesPtr

template<typename PointT >
using pcl::PCLBase< PointT >::PointIndicesPtr = PointIndices::Ptr

Definition at line 76 of file pcl_base.h.

Constructor & Destructor Documentation

PCLBase() [1/2]

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

Empty constructor.

Definition at line 46 of file pcl_base.hpp.

PCLBase() [2/2]

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

Copy constructor.

Definition at line 55 of file pcl_base.hpp.

~PCLBase()

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

Destructor.

Member Function Documentation

deinitCompute()

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< PointInT >::filter(), and pcl::Filter< pcl::PointXYZRGBL >::filter().

getIndices() [1/2]

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

Get a pointer to the vector of indices used.

Definition at line 129 of file pcl_base.h.

getIndices() [2/2]

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

Get a pointer to the vector of indices used.

Definition at line 133 of file pcl_base.h.

getInputCloud()

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

Get a pointer to the input point cloud dataset.

Definition at line 96 of file pcl_base.h.

initCompute()

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 138 of file pcl_base.hpp.

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

operator[]()

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

Override PointCloud operator[] to shorten code.

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

Definition at line 140 of file pcl_base.h.

setIndices() [1/4]

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] indices a pointer to the indices that represent the input data.

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

Definition at line 81 of file pcl_base.hpp.

setIndices() [2/4]

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] indices a pointer to the indices that represent the input data.

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

Definition at line 72 of file pcl_base.hpp.

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

setIndices() [3/4]

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] indices a pointer to the indices that represent the input data.

Reimplemented in pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 90 of file pcl_base.hpp.

setIndices() [4/4]

template<typename PointT >
void pcl::PCLBase< PointT >::setIndices ( std::size_t row_start,
std::size_t col_start,
std::size_t nb_rows,
std::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_start the offset on rows
[in] col_start the offset on columns
[in] nb_rows the number of rows to be considered row_start included
[in] nb_cols the number of columns to be considered col_start included

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

Definition at line 99 of file pcl_base.hpp.

setInputCloud()

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

Provide a pointer to the input dataset.

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

Reimplemented in pcl::GrabCut< PointT >, pcl::NormalEstimation< PointInT, PointNT >, pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >, pcl::MinCutSegmentation< PointT >, and pcl::MomentOfInertiaEstimation< PointT >.

Definition at line 65 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< pcl::PointXYZI >::getExistingData(), pcl::kinfuLS::WorldModel< pcl::PointXYZI >::getWorldAsCubes(), pcl::NormalDistributionsTransform< PointSource, PointTarget >::init(), pcl::OrganizedMultiPlaneSegmentation< pcl::PointXYZRGBA, pcl::Normal, pcl::Label >::segment(), pcl::MomentOfInertiaEstimation< PointT >::setInputCloud(), pcl::PCA< PointT >::setInputCloud(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setInputCloud(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::setInputSource(), pcl::Registration< PointSource, PointTarget >::setInputSource(), pcl::HypothesisVerification< ModelT, SceneT >::setSceneCloud(), pcl::kinfuLS::WorldModel< pcl::PointXYZI >::setSliceAsNans(), and pcl::ism::ImplicitShapeModelEstimation< FeatureSize, PointT, NormalT >::simplifyCloud().

Member Data Documentation

fake_indices_

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 156 of file pcl_base.h.

indices_

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

input_

use_indices_

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

Set to true if point indices are used.

Definition at line 153 of file pcl_base.h.

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


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

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_p_c_l_base.html