ExtractIndices extracts a set of indices from a point cloud. More...
#include <extract_indices.h>
Public Member Functions | |
ExtractIndices (bool extract_removed_indices=false) | |
Constructor. | |
void | filterDirectly (PointCloudPtr &cloud) |
Apply the filter and store the results directly in the input cloud. | |
Protected Types | |
typedef pcl::traits::fieldList < PointT >::type | FieldList |
typedef FilterIndices< PointT > ::PointCloud | PointCloud |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
typedef PointCloud::Ptr | PointCloudPtr |
Protected Member Functions | |
void | applyFilter (PointCloud &output) |
Filtered results are stored in a separate point cloud. | |
void | applyFilter (std::vector< int > &indices) |
Filtered results are indexed by an indices array. | |
void | applyFilterIndices (std::vector< int > &indices) |
Filtered results are indexed by an indices array. |
ExtractIndices extracts a set of indices from a point cloud.
Usage example:
pcl::ExtractIndices<PointType> eifilter (true); // Initializing with true will allow us to extract the removed indices eifilter.setInputCloud (cloud_in); eifilter.setIndices (indices_in); eifilter.filter (*cloud_out); // The resulting cloud_out contains all points of cloud_in that are indexed by indices_in indices_rem = eifilter.getRemovedIndices (); // The indices_rem array indexes all points of cloud_in that are not indexed by indices_in eifilter.setNegative (true); eifilter.filter (*indices_out); // Alternatively: the indices_out array is identical to indices_rem eifilter.setNegative (false); eifilter.setUserFilterValue (1337.0); eifilter.filterDirectly (cloud_in); // This will directly modify cloud_in instead of creating a copy of the cloud // It will overwrite all fields of the filtered points by the user value: 1337
Definition at line 70 of file extract_indices.h.
typedef pcl::traits::fieldList<PointT>::type pcl::ExtractIndices< PointT >::FieldList [protected] |
Definition at line 76 of file extract_indices.h.
typedef FilterIndices<PointT>::PointCloud pcl::ExtractIndices< PointT >::PointCloud [protected] |
Reimplemented from pcl::FilterIndices< PointT >.
Definition at line 73 of file extract_indices.h.
typedef PointCloud::ConstPtr pcl::ExtractIndices< PointT >::PointCloudConstPtr [protected] |
Reimplemented from pcl::Filter< PointT >.
Definition at line 75 of file extract_indices.h.
typedef PointCloud::Ptr pcl::ExtractIndices< PointT >::PointCloudPtr [protected] |
Reimplemented from pcl::Filter< PointT >.
Definition at line 74 of file extract_indices.h.
pcl::ExtractIndices< PointT >::ExtractIndices | ( | bool | extract_removed_indices = false | ) | [inline] |
Constructor.
[in] | extract_removed_indices | Set to true if you want to be able to extract the indices of points being removed (default = false). |
Definition at line 82 of file extract_indices.h.
void pcl::ExtractIndices< PointT >::applyFilter | ( | PointCloud & | output | ) | [protected, virtual] |
Filtered results are stored in a separate point cloud.
[out] | output | The resultant point cloud. |
Implements pcl::Filter< PointT >.
Definition at line 71 of file extract_indices.hpp.
void pcl::ExtractIndices< PointT >::applyFilter | ( | std::vector< int > & | indices | ) | [inline, protected, virtual] |
Filtered results are indexed by an indices array.
[out] | indices | The resultant indices. |
Implements pcl::FilterIndices< PointT >.
Definition at line 122 of file extract_indices.h.
void pcl::ExtractIndices< PointT >::applyFilterIndices | ( | std::vector< int > & | indices | ) | [protected] |
Filtered results are indexed by an indices array.
[out] | indices | The resultant indices. |
Definition at line 102 of file extract_indices.hpp.
void pcl::ExtractIndices< PointT >::filterDirectly | ( | PointCloudPtr & | cloud | ) |
Apply the filter and store the results directly in the input cloud.
This method will save the time and memory copy of an output cloud but can not alter the original size of the input cloud: It operates as though setKeepOrganized() is true and will overwrite the filtered points instead of remove them. All fields of filtered points are replaced with the value set by setUserFilterValue() (default = NaN). This method also automatically alters the input cloud set via setInputCloud(). It does not alter the value of the internal keep organized boolean as set by setKeepOrganized().
in/out] | cloud The point cloud used for input and output. |
Definition at line 48 of file extract_indices.hpp.