38#ifndef PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
39#define PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
41#include <pcl/filters/project_inliers.h>
42#include <pcl/sample_consensus/sac_model_circle.h>
43#include <pcl/sample_consensus/sac_model_cylinder.h>
44#include <pcl/sample_consensus/sac_model_cone.h>
45#include <pcl/sample_consensus/sac_model_line.h>
46#include <pcl/sample_consensus/sac_model_normal_plane.h>
47#include <pcl/sample_consensus/sac_model_normal_sphere.h>
48#include <pcl/sample_consensus/sac_model_parallel_plane.h>
49#include <pcl/sample_consensus/sac_model_normal_parallel_plane.h>
50#include <pcl/sample_consensus/sac_model_parallel_line.h>
51#include <pcl/sample_consensus/sac_model_perpendicular_plane.h>
52#include <pcl/sample_consensus/sac_model_plane.h>
53#include <pcl/sample_consensus/sac_model_sphere.h>
56template <
typename Po
intT>
void
59 if (indices_->empty ())
61 PCL_WARN (
"[pcl::%s::applyFilter] No indices given or empty indices!\n", getClassName ().
c_str ());
70 for (std::size_t i = 0; i < model_->values.size (); ++i)
74 if (!initSACModel (model_type_))
76 PCL_ERROR (
"[pcl::%s::applyFilter] Error initializing the SAC model!\n", getClassName ().
c_str ());
88template <
typename Po
intT>
bool
103 sacmodel_.reset (
new SampleConsensusModelLine<PointT> (input_));
109 sacmodel_.reset (
new SampleConsensusModelCircle2D<PointT> (input_));
115 sacmodel_.reset (
new SampleConsensusModelSphere<PointT> (input_));
121 sacmodel_.reset (
new SampleConsensusModelParallelLine<PointT> (input_));
127 sacmodel_.reset (
new SampleConsensusModelPerpendicularPlane<PointT> (input_));
133 sacmodel_.reset (
new SampleConsensusModelCylinder<PointT, pcl::Normal> (input_));
139 sacmodel_.reset (
new SampleConsensusModelNormalPlane<PointT, pcl::Normal> (input_));
145 sacmodel_.reset (
new SampleConsensusModelCone<PointT, pcl::Normal> (input_));
151 sacmodel_.reset (
new SampleConsensusModelNormalSphere<PointT, pcl::Normal> (input_));
157 sacmodel_.reset (
new SampleConsensusModelNormalParallelPlane<PointT, pcl::Normal> (input_));
163 sacmodel_.reset (
new SampleConsensusModelParallelPlane<PointT> (input_));
168 PCL_ERROR (
"[pcl::%s::initSACModel] No valid model given!\n", getClassName ().c_str ());
175#define PCL_INSTANTIATE_ProjectInliers(T) template class PCL_EXPORTS pcl::ProjectInliers<T>;
Iterator class for point clouds with or without given indices.
ConstCloudIterator(const PointCloud< PointT > &cloud)
ProjectInliers uses a model and a set of inlier indices from a PointCloud to project them into a sepa...
void applyFilter(PointCloud &output) override
Project point indices into a separate PointCloud.
@ SACMODEL_PARALLEL_PLANE
@ SACMODEL_NORMAL_PARALLEL_PLANE
@ SACMODEL_PERPENDICULAR_PLANE