Point Cloud Library (PCL) 1.15.0
Loading...
Searching...
No Matches
pcl::PCLBase< pcl::PCLPointCloud2 > Class Reference

#include <pcl/pcl_base.h>

+ Inheritance diagram for pcl::PCLBase< pcl::PCLPointCloud2 >:
+ Collaboration diagram for pcl::PCLBase< pcl::PCLPointCloud2 >:

Public Types

using PCLPointCloud2 = pcl::PCLPointCloud2
 
using PCLPointCloud2Ptr = PCLPointCloud2::Ptr
 
using PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 
using PointCloud
 
using PointCloudPtr
 
using PointCloudConstPtr
 
using PointIndicesPtr
 
using PointIndicesConstPtr
 

Public Member Functions

 PCLBase ()
 Empty constructor.
 
virtual ~PCLBase ()=default
 destructor.
 
void setInputCloud (const PCLPointCloud2ConstPtr &cloud)
 Provide a pointer to the input dataset.
 
PCLPointCloud2ConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset.
 
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
 
IndicesPtr const getIndices () const
 Get a pointer to the vector of indices used.
 
 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 pcl::PCLPointCloud2operator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code.
 

Protected Member Functions

bool initCompute ()
 
bool deinitCompute ()
 
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

PCLPointCloud2ConstPtr 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.
 
std::vector< uindex_tfield_sizes_
 The size of each individual field.
 
index_t x_idx_
 The x-y-z fields indices.
 
index_t y_idx_
 
index_t z_idx_
 
std::string x_field_name_
 The desired x-y-z field names.
 
std::string y_field_name_
 
std::string z_field_name_
 
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

Definition at line 181 of file pcl_base.h.

Member Typedef Documentation

◆ PCLPointCloud2

Definition at line 184 of file pcl_base.h.

◆ PCLPointCloud2ConstPtr

using pcl::PCLBase< pcl::PCLPointCloud2 >::PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr

Definition at line 186 of file pcl_base.h.

◆ PCLPointCloud2Ptr

using pcl::PCLBase< pcl::PCLPointCloud2 >::PCLPointCloud2Ptr = PCLPointCloud2::Ptr

Definition at line 185 of file pcl_base.h.

◆ PointCloud

Definition at line 72 of file pcl_base.h.

◆ PointCloudConstPtr

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointCloudConstPtr

Definition at line 74 of file pcl_base.h.

◆ PointCloudPtr

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointCloudPtr

Definition at line 73 of file pcl_base.h.

◆ PointIndicesConstPtr [1/2]

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointIndicesConstPtr

Definition at line 77 of file pcl_base.h.

◆ PointIndicesConstPtr [2/2]

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointIndicesConstPtr = PointIndices::ConstPtr

Definition at line 189 of file pcl_base.h.

◆ PointIndicesPtr [1/2]

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointIndicesPtr

Definition at line 76 of file pcl_base.h.

◆ PointIndicesPtr [2/2]

using pcl::PCLBase< pcl::PCLPointCloud2 >::PointIndicesPtr = PointIndices::Ptr

Definition at line 188 of file pcl_base.h.

Constructor & Destructor Documentation

◆ PCLBase() [1/3]

Empty constructor.

◆ ~PCLBase() [1/2]

virtual pcl::PCLBase< pcl::PCLPointCloud2 >::~PCLBase ( )
virtualdefault

destructor.

◆ PCLBase() [2/3]

Empty constructor.

Definition at line 80 of file pcl_base.hpp.

◆ PCLBase() [3/3]

Copy constructor.

Definition at line 83 of file pcl_base.hpp.

◆ ~PCLBase() [2/2]

virtual pcl::PCLBase< pcl::PCLPointCloud2 >::~PCLBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ deinitCompute() [1/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::deinitCompute ( )
protected

This method should get called after finishing the actual computation.

Definition at line 173 of file pcl_base.hpp.

◆ deinitCompute() [2/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::deinitCompute ( )
protected

◆ getIndices() [1/3]

IndicesPtr pcl::PCLBase< pcl::PCLPointCloud2 >::getIndices ( )
inline

Get a pointer to the vector of indices used.

Definition at line 129 of file pcl_base.h.

◆ getIndices() [2/3]

IndicesConstPtr const pcl::PCLBase< pcl::PCLPointCloud2 >::getIndices ( ) const
inline

Get a pointer to the vector of indices used.

Definition at line 133 of file pcl_base.h.

◆ getIndices() [3/3]

IndicesPtr const pcl::PCLBase< pcl::PCLPointCloud2 >::getIndices ( ) const
inline

Get a pointer to the vector of indices used.

Definition at line 221 of file pcl_base.h.

References indices_.

◆ getInputCloud() [1/2]

PointCloudConstPtr const pcl::PCLBase< pcl::PCLPointCloud2 >::getInputCloud ( ) const
inline

Get a pointer to the input point cloud dataset.

Definition at line 96 of file pcl_base.h.

◆ getInputCloud() [2/2]

PCLPointCloud2ConstPtr const pcl::PCLBase< pcl::PCLPointCloud2 >::getInputCloud ( ) const
inline

Get a pointer to the input point cloud dataset.

Definition at line 205 of file pcl_base.h.

References input_.

◆ initCompute() [1/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::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.

◆ initCompute() [2/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::initCompute ( )
protected

◆ operator[]()

const pcl::PCLPointCloud2 & pcl::PCLBase< pcl::PCLPointCloud2 >::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]posposition in indices_ vector

Definition at line 140 of file pcl_base.h.

◆ setIndices() [1/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::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.

Definition at line 108 of file pcl_base.hpp.

◆ setIndices() [2/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::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.

Definition at line 102 of file pcl_base.hpp.

◆ setIndices() [3/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::setIndices ( const IndicesPtr & indices)

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.

◆ setIndices() [4/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::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.

Definition at line 114 of file pcl_base.hpp.

◆ setIndices() [5/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::setIndices ( const PointIndicesConstPtr & indices)

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.

◆ setIndices() [6/6]

void pcl::PCLBase< pcl::PCLPointCloud2 >::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_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

Definition at line 125 of file pcl_base.hpp.

◆ setInputCloud() [1/2]

void pcl::PCLBase< pcl::PCLPointCloud2 >::setInputCloud ( const PCLPointCloud2ConstPtr & cloud)

Provide a pointer to the input dataset.

Parameters
cloudthe const boost shared pointer to a PointCloud message

◆ setInputCloud() [2/2]

void pcl::PCLBase< pcl::PCLPointCloud2 >::setInputCloud ( const PointCloudConstPtr & cloud)
virtual

Provide a pointer to the input dataset.

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

Definition at line 92 of file pcl_base.hpp.

Member Data Documentation

◆ fake_indices_ [1/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::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.

◆ fake_indices_ [2/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::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 234 of file pcl_base.h.

◆ field_sizes_

std::vector<uindex_t> pcl::PCLBase< pcl::PCLPointCloud2 >::field_sizes_
protected

The size of each individual field.

Definition at line 237 of file pcl_base.h.

◆ indices_ [1/2]

A pointer to the vector of point indices to use.

Definition at line 150 of file pcl_base.h.

◆ indices_ [2/2]

A pointer to the vector of point indices to use.

Definition at line 228 of file pcl_base.h.

Referenced by pcl::ExtractIndices< pcl::PCLPointCloud2 >::applyFilter(), pcl::ExtractIndices< pcl::PCLPointCloud2 >::applyFilterIndices(), and getIndices().

◆ input_ [1/2]

The input point cloud dataset.

Definition at line 147 of file pcl_base.h.

◆ input_ [2/2]

◆ use_indices_ [1/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::use_indices_
protected

Set to true if point indices are used.

Definition at line 153 of file pcl_base.h.

◆ use_indices_ [2/2]

bool pcl::PCLBase< pcl::PCLPointCloud2 >::use_indices_
protected

Set to true if point indices are used.

Definition at line 231 of file pcl_base.h.

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

◆ x_field_name_

std::string pcl::PCLBase< pcl::PCLPointCloud2 >::x_field_name_
protected

The desired x-y-z field names.

Definition at line 243 of file pcl_base.h.

◆ x_idx_

The x-y-z fields indices.

Definition at line 240 of file pcl_base.h.

◆ y_field_name_

std::string pcl::PCLBase< pcl::PCLPointCloud2 >::y_field_name_
protected

Definition at line 243 of file pcl_base.h.

◆ y_idx_

Definition at line 240 of file pcl_base.h.

◆ z_field_name_

std::string pcl::PCLBase< pcl::PCLPointCloud2 >::z_field_name_
protected

Definition at line 243 of file pcl_base.h.

◆ z_idx_

Definition at line 240 of file pcl_base.h.


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