38 #ifndef PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
39 #define PCL_FILTERS_IMPL_PROJECT_INLIERS_H_
41 #include <pcl/filters/project_inliers.h>
44 template <
typename Po
intT>
void
47 if (indices_->empty ())
49 PCL_WARN (
"[pcl::%s::applyFilter] No indices given or empty indices!\n", getClassName ().c_str ());
57 Eigen::VectorXf model_coefficients (model_->values.size ());
58 for (
size_t i = 0; i < model_->values.size (); ++i)
59 model_coefficients[i] = model_->values[i];
62 if (!initSACModel (model_type_))
64 PCL_ERROR (
"[pcl::%s::segment] Error initializing the SAC model!\n", getClassName ().c_str ());
70 sacmodel_->projectPoints (*indices_, model_coefficients, output,
true);
72 sacmodel_->projectPoints (*indices_, model_coefficients, output,
false);
76 template <
typename Po
intT>
bool
91 sacmodel_.reset (
new SampleConsensusModelLine<PointT> (input_));
97 sacmodel_.reset (
new SampleConsensusModelCircle2D<PointT> (input_));
103 sacmodel_.reset (
new SampleConsensusModelSphere<PointT> (input_));
109 sacmodel_.reset (
new SampleConsensusModelParallelLine<PointT> (input_));
115 sacmodel_.reset (
new SampleConsensusModelPerpendicularPlane<PointT> (input_));
121 sacmodel_.reset (
new SampleConsensusModelCylinder<PointT, pcl::Normal> (input_));
127 sacmodel_.reset (
new SampleConsensusModelNormalPlane<PointT, pcl::Normal> (input_));
133 sacmodel_.reset (
new SampleConsensusModelCone<PointT, pcl::Normal> (input_));
139 sacmodel_.reset (
new SampleConsensusModelNormalSphere<PointT, pcl::Normal> (input_));
145 sacmodel_.reset (
new SampleConsensusModelNormalParallelPlane<PointT, pcl::Normal> (input_));
151 sacmodel_.reset (
new SampleConsensusModelParallelPlane<PointT> (input_));
156 PCL_ERROR (
"[pcl::%s::initSACModel] No valid model given!\n", getClassName ().c_str ());
163 #define PCL_INSTANTIATE_ProjectInliers(T) template class PCL_EXPORTS pcl::ProjectInliers<T>;
165 #endif // PCL_FILTERS_IMPL_PROJECT_INLIERS_H_