Loading...
Searching...
No Matches
pcl::SegmentDifferences< PointT > Class Template Reference
Module segmentation

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

## Protected Member Functions

virtual std::string | getClassName () const
| Class getName method.
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.
Protected Member Functions inherited from pcl::PCLBase< PointT >
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.

## Protected Attributes

KdTreePtr | tree_ {nullptr}
| A pointer to the spatial search object.
PointCloudConstPtr | target_ {nullptr}
| The input target point cloud dataset.
double | distance_threshold_ {0.0}
| The distance tolerance (squared) as a measure in the L2 Euclidean space between corresponding points.
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
bool | use_indices_
| Set to true if point indices are used.
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

## 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 72 of file segment_differences.h.

## Member Typedef Documentation

## KdTree

template<typename PointT>

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

Definition at line 81 of file segment_differences.h.

## KdTreePtr

template<typename PointT>

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

Definition at line 82 of file segment_differences.h.

## PointCloud

template<typename PointT>

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

Definition at line 77 of file segment_differences.h.

## PointCloudConstPtr

template<typename PointT>

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

Definition at line 79 of file segment_differences.h.

## PointCloudPtr

template<typename PointT>

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

Definition at line 78 of file segment_differences.h.

## PointIndicesConstPtr

template<typename PointT>

using pcl::SegmentDifferences< PointT >::PointIndicesConstPtr = PointIndices::ConstPtr

Definition at line 85 of file segment_differences.h.

## PointIndicesPtr

template<typename PointT>

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

Definition at line 84 of file segment_differences.h.

## Constructor & Destructor Documentation

## SegmentDifferences()

template<typename PointT>

pcl::SegmentDifferences< PointT >::SegmentDifferences | ( |  | ) |

default

Empty constructor.

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

Referenced by segment().

## getClassName()

template<typename PointT>

virtual std::string pcl::SegmentDifferences< PointT >::getClassName | ( |  | ) | const

inline protected virtual

Class getName method.

Definition at line 152 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 124 of file segment_differences.h.

References distance_threshold_.

## getSearchMethod()

template<typename PointT>

KdTreePtr pcl::SegmentDifferences< PointT >::getSearchMethod | ( |  | ) |

inline

Get a pointer to the search method used.

Definition at line 110 of file segment_differences.h.

References tree_.

## getTargetCloud()

template<typename PointT>

PointCloudConstPtr const pcl::SegmentDifferences< PointT >::getTargetCloud | ( |  | ) |

inline

Get a pointer to the input target point cloud dataset.

Definition at line 100 of file segment_differences.h.

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

Referenced by segment().

## segment()

template<typename PointT>

void pcl::SegmentDifferences< PointT >::segment | ( | PointCloud & | output | ) |

Segment differences between two input point clouds.

Parameters

  output | the resultant difference between the two point clouds as a PointCloud

Definition at line 91 of file segment_differences.hpp.

References pcl::PointCloud< PointT >::clear(), deinitCompute(), distance_threshold_, pcl::getPointCloudDifference(), pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, initCompute(), input_, target_, tree_, 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_threshold | the squared distance tolerance as a measure in L2 Euclidean space

Definition at line 118 of file segment_differences.h.

References distance_threshold_.

## setSearchMethod()

template<typename PointT>

void pcl::SegmentDifferences< PointT >::setSearchMethod | ( | const KdTreePtr & | tree | ) |

inline

Provide a pointer to the search object.

Parameters

  tree | a pointer to the spatial search object.

Definition at line 106 of file segment_differences.h.

References 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

  cloud | the target PointCloud dataset

Definition at line 96 of file segment_differences.h.

References target_.

## Member Data Documentation

## distance_threshold_

template<typename PointT>

double pcl::SegmentDifferences< PointT >::distance_threshold_ {0.0}

protected

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

Definition at line 148 of file segment_differences.h.

Referenced by getDistanceThreshold(), segment(), and 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.

Referenced by segment().

## target_

template<typename PointT>

PointCloudConstPtr pcl::SegmentDifferences< PointT >::target_ {nullptr}

protected

The input target point cloud dataset.

Definition at line 143 of file segment_differences.h.

Referenced by getTargetCloud(), segment(), and setTargetCloud().

## tree_

template<typename PointT>

KdTreePtr pcl::SegmentDifferences< PointT >::tree_ {nullptr}

protected

A pointer to the spatial search object.

Definition at line 140 of file segment_differences.h.

Referenced by getSearchMethod(), segment(), and setSearchMethod().

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

- pcl/segmentation/segment_differences.h
- pcl/segmentation/impl/segment_differences.hpp