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

ProjectInliers uses a model and a set of inlier indices from a PointCloud to project them into a separate PointCloud. More...

#include <pcl/filters/project_inliers.h>

Inheritance diagram for pcl::ProjectInliers< pcl::PCLPointCloud2 >:
Collaboration diagram for pcl::ProjectInliers< pcl::PCLPointCloud2 >:

Public Types

using Ptr
using ConstPtr
Public Types inherited from pcl::Filter< pcl::PCLPointCloud2 >
using Ptr = shared_ptr<Filter<pcl::PCLPointCloud2> >
using ConstPtr = shared_ptr<const Filter<pcl::PCLPointCloud2> >
using PCLPointCloud2 = pcl::PCLPointCloud2
using PCLPointCloud2Ptr = PCLPointCloud2::Ptr
using PCLPointCloud2ConstPtr = PCLPointCloud2::ConstPtr
using PointCloud
using PointCloudPtr
using PointCloudConstPtr
Public Types inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
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

Public Member Functions

 ProjectInliers ()
 Empty constructor.
 ~ProjectInliers () override=default
 Empty destructor.
void setModelType (int model)
 The type of model to use (user given parameter).
int getModelType () const
 Get the type of SAC model used.
void setModelCoefficients (const ModelCoefficientsConstPtr &model)
 Provide a pointer to the model coefficients.
ModelCoefficientsConstPtr getModelCoefficients () const
 Get a pointer to the model coefficients.
void setCopyAllFields (bool val)
 Set whether all fields should be copied, or only the XYZ.
bool getCopyAllFields () const
 Get whether all fields are being copied (true), or only XYZ (false).
void setCopyAllData (bool val)
 Set whether all data will be returned, or only the projected inliers.
bool getCopyAllData () const
 Get whether all data is being copied (true), or only the projected inliers (false).
Public Member Functions inherited from pcl::Filter< pcl::PCLPointCloud2 >
 Filter (bool extract_removed_indices=false)
 Empty constructor.
IndicesConstPtr const getRemovedIndices () const
 Get the point indices being removed.
void getRemovedIndices (PointIndices &pi)
 Get the point indices being removed.
void filter (PCLPointCloud2 &output)
 Calls the filtering method and returns the filtered dataset in output.
Public Member Functions inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
 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.
const pcl::PCLPointCloud2operator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code.

Protected Member Functions

void applyFilter (PCLPointCloud2 &output) override
 Abstract filter method.
Protected Member Functions inherited from pcl::Filter< pcl::PCLPointCloud2 >
const std::string & getClassName () const
 Get a string representation of the name of this class.
Protected Member Functions inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
bool initCompute ()
bool deinitCompute ()

Protected Attributes

int model_type_ {0}
 The type of model to use (user given parameter).
bool copy_all_data_ {false}
 True if all data will be returned, false if only the projected inliers.
bool copy_all_fields_ {true}
 True if all fields will be returned, false if only XYZ.
ModelCoefficientsConstPtr model_
 A pointer to the vector of model coefficients.
Protected Attributes inherited from pcl::Filter< pcl::PCLPointCloud2 >
IndicesPtr removed_indices_
 Indices of the points that are removed.
bool extract_removed_indices_
 Set to true if we want to return the indices of the removed points.
std::string filter_name_
 The filter name.
Protected Attributes inherited from pcl::PCLBase< pcl::PCLPointCloud2 >
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_

Detailed Description

ProjectInliers uses a model and a set of inlier indices from a PointCloud to project them into a separate PointCloud.

Author
Radu Bogdan Rusu

Definition at line 164 of file project_inliers.h.

Member Typedef Documentation

◆ ConstPtr

Definition at line 70 of file project_inliers.h.

◆ Ptr

Definition at line 69 of file project_inliers.h.

Constructor & Destructor Documentation

◆ ProjectInliers()

pcl::ProjectInliers< pcl::PCLPointCloud2 >::ProjectInliers ( )
inline

Empty constructor.

Definition at line 177 of file project_inliers.h.

References pcl::Filter< pcl::PCLPointCloud2 >::filter_name_.

◆ ~ProjectInliers()

Empty destructor.

Member Function Documentation

◆ applyFilter()

void pcl::ProjectInliers< pcl::PCLPointCloud2 >::applyFilter ( PCLPointCloud2 & output)
overrideprotectedvirtual

Abstract filter method.

The implementation needs to set output.{data, row_step, point_step, width, height, is_dense}.

Parameters
[out]outputthe resultant filtered point cloud

Implements pcl::Filter< pcl::PCLPointCloud2 >.

◆ getCopyAllData()

bool pcl::ProjectInliers< pcl::PCLPointCloud2 >::getCopyAllData ( ) const
inline

Get whether all data is being copied (true), or only the projected inliers (false).

Definition at line 244 of file project_inliers.h.

References copy_all_data_.

◆ getCopyAllFields()

bool pcl::ProjectInliers< pcl::PCLPointCloud2 >::getCopyAllFields ( ) const
inline

Get whether all fields are being copied (true), or only XYZ (false).

Definition at line 228 of file project_inliers.h.

References copy_all_fields_.

◆ getModelCoefficients()

ModelCoefficientsConstPtr pcl::ProjectInliers< pcl::PCLPointCloud2 >::getModelCoefficients ( ) const
inline

Get a pointer to the model coefficients.

Definition at line 212 of file project_inliers.h.

References model_.

◆ getModelType()

int pcl::ProjectInliers< pcl::PCLPointCloud2 >::getModelType ( ) const
inline

Get the type of SAC model used.

Definition at line 196 of file project_inliers.h.

References model_type_.

◆ setCopyAllData()

void pcl::ProjectInliers< pcl::PCLPointCloud2 >::setCopyAllData ( bool val)
inline

Set whether all data will be returned, or only the projected inliers.

Parameters
[in]valtrue if all data should be returned, false if only the projected inliers

Definition at line 237 of file project_inliers.h.

References copy_all_data_.

◆ setCopyAllFields()

void pcl::ProjectInliers< pcl::PCLPointCloud2 >::setCopyAllFields ( bool val)
inline

Set whether all fields should be copied, or only the XYZ.

Parameters
[in]valtrue if all fields will be returned, false if only XYZ

Definition at line 221 of file project_inliers.h.

References copy_all_fields_.

◆ setModelCoefficients()

void pcl::ProjectInliers< pcl::PCLPointCloud2 >::setModelCoefficients ( const ModelCoefficientsConstPtr & model)
inline

Provide a pointer to the model coefficients.

Parameters
[in]modela pointer to the model coefficients

Definition at line 205 of file project_inliers.h.

References model_.

◆ setModelType()

void pcl::ProjectInliers< pcl::PCLPointCloud2 >::setModelType ( int model)
inline

The type of model to use (user given parameter).

Parameters
[in]modelthe model type (check model_types.h)

Definition at line 189 of file project_inliers.h.

References model_type_.

Member Data Documentation

◆ copy_all_data_

bool pcl::ProjectInliers< pcl::PCLPointCloud2 >::copy_all_data_ {false}
protected

True if all data will be returned, false if only the projected inliers.

Default: false.

Definition at line 253 of file project_inliers.h.

Referenced by getCopyAllData(), and setCopyAllData().

◆ copy_all_fields_

bool pcl::ProjectInliers< pcl::PCLPointCloud2 >::copy_all_fields_ {true}
protected

True if all fields will be returned, false if only XYZ.

Default: true.

Definition at line 256 of file project_inliers.h.

Referenced by getCopyAllFields(), and setCopyAllFields().

◆ model_

A pointer to the vector of model coefficients.

Definition at line 259 of file project_inliers.h.

Referenced by getModelCoefficients(), and setModelCoefficients().

◆ model_type_

int pcl::ProjectInliers< pcl::PCLPointCloud2 >::model_type_ {0}
protected

The type of model to use (user given parameter).

Definition at line 250 of file project_inliers.h.

Referenced by getModelType(), and setModelType().


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