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

SegmentDifferences obtains the difference between two spatially aligned point clouds and returns the difference between them for a maximum given distance threshold. More...

#include <pcl/segmentation/segment_differences.h>

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

Public Types

using PointCloud = pcl::PointCloud< PointT >
 
using PointCloudPtr = typename PointCloud::Ptr
 
using PointCloudConstPtr = typename PointCloud::ConstPtr
 
using KdTree = pcl::search::Search< PointT >
 
using KdTreePtr = typename KdTree::Ptr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 
- Public Types inherited from pcl::PCLBase< PointT >
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

 SegmentDifferences ()
 Empty constructor. More...
 
void setTargetCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the target dataset against which we compare the input cloud given in setInputCloud. More...
 
const PointCloudConstPtr getTargetCloud ()
 Get a pointer to the input target point cloud dataset. More...
 
void setSearchMethod (const KdTreePtr &tree)
 Provide a pointer to the search object. More...
 
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used. More...
 
void setDistanceThreshold (double sqr_threshold)
 Set the maximum distance tolerance (squared) between corresponding points in the two input datasets. More...
 
double getDistanceThreshold ()
 Get the squared distance tolerance between corresponding points as a measure in the L2 Euclidean space. More...
 
void segment (PointCloud &output)
 Segment differences between two input point clouds. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointT >
 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 PointToperator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

virtual std::string getClassName () const
 Class getName method. More...
 
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 Member Functions inherited from pcl::PCLBase< PointT >
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

KdTreePtr tree_
 A pointer to the spatial search object. More...
 
PointCloudConstPtr target_
 The input target point cloud dataset. More...
 
double distance_threshold_
 The distance tolerance (squared) as a measure in the L2 Euclidean space between corresponding points. More...
 
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointT >
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::SegmentDifferences< PointT >

SegmentDifferences obtains the difference between two spatially aligned point clouds and returns the difference between them for a maximum given distance threshold.

Author
Radu Bogdan Rusu

Definition at line 84 of file segment_differences.h.

Member Typedef Documentation

◆ KdTree

template<typename PointT >
using pcl::SegmentDifferences< PointT >::KdTree = pcl::search::Search<PointT>

Definition at line 93 of file segment_differences.h.

◆ KdTreePtr

template<typename PointT >
using pcl::SegmentDifferences< PointT >::KdTreePtr = typename KdTree::Ptr

Definition at line 94 of file segment_differences.h.

◆ PointCloud

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

Definition at line 89 of file segment_differences.h.

◆ PointCloudConstPtr

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

Definition at line 91 of file segment_differences.h.

◆ PointCloudPtr

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

Definition at line 90 of file segment_differences.h.

◆ PointIndicesConstPtr

Definition at line 97 of file segment_differences.h.

◆ PointIndicesPtr

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

Definition at line 96 of file segment_differences.h.

Constructor & Destructor Documentation

◆ SegmentDifferences()

template<typename PointT >
pcl::SegmentDifferences< PointT >::SegmentDifferences ( )
inline

Empty constructor.

Definition at line 100 of file segment_differences.h.

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

◆ getClassName()

template<typename PointT >
virtual std::string pcl::SegmentDifferences< PointT >::getClassName ( ) const
inlineprotectedvirtual

Class getName method.

Definition at line 166 of file segment_differences.h.

◆ getDistanceThreshold()

template<typename PointT >
double pcl::SegmentDifferences< PointT >::getDistanceThreshold ( )
inline

Get the squared distance tolerance between corresponding points as a measure in the L2 Euclidean space.

Definition at line 138 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::distance_threshold_.

◆ getSearchMethod()

template<typename PointT >
KdTreePtr pcl::SegmentDifferences< PointT >::getSearchMethod ( )
inline

Get a pointer to the search method used.

Definition at line 124 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::tree_.

◆ getTargetCloud()

template<typename PointT >
const PointCloudConstPtr pcl::SegmentDifferences< PointT >::getTargetCloud ( )
inline

Get a pointer to the input target point cloud dataset.

Definition at line 114 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::target_.

◆ 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.

◆ segment()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::segment ( PointCloud output)

Segment differences between two input point clouds.

Parameters
outputthe resultant difference between the two point clouds as a PointCloud

Definition at line 89 of file segment_differences.hpp.

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

◆ setDistanceThreshold()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setDistanceThreshold ( double  sqr_threshold)
inline

Set the maximum distance tolerance (squared) between corresponding points in the two input datasets.

Parameters
sqr_thresholdthe squared distance tolerance as a measure in L2 Euclidean space

Definition at line 132 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::distance_threshold_.

◆ setSearchMethod()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setSearchMethod ( const KdTreePtr tree)
inline

Provide a pointer to the search object.

Parameters
treea pointer to the spatial search object.

Definition at line 120 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::tree_.

◆ setTargetCloud()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setTargetCloud ( const PointCloudConstPtr cloud)
inline

Provide a pointer to the target dataset against which we compare the input cloud given in setInputCloud.

Parameters
cloudthe target PointCloud dataset

Definition at line 110 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::target_.

Member Data Documentation

◆ distance_threshold_

template<typename PointT >
double pcl::SegmentDifferences< PointT >::distance_threshold_
protected

The distance tolerance (squared) as a measure in the L2 Euclidean space between corresponding points.

Definition at line 162 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getDistanceThreshold(), and pcl::SegmentDifferences< PointT >::setDistanceThreshold().

◆ indices_

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

A pointer to the vector of point indices to use.

Definition at line 150 of file pcl_base.h.

◆ input_

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

The input point cloud dataset.

Definition at line 147 of file pcl_base.h.

◆ target_

template<typename PointT >
PointCloudConstPtr pcl::SegmentDifferences< PointT >::target_
protected

The input target point cloud dataset.

Definition at line 157 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getTargetCloud(), and pcl::SegmentDifferences< PointT >::setTargetCloud().

◆ tree_

template<typename PointT >
KdTreePtr pcl::SegmentDifferences< PointT >::tree_
protected

A pointer to the spatial search object.

Definition at line 154 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getSearchMethod(), and pcl::SegmentDifferences< PointT >::setSearchMethod().


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