38 #ifndef PCL_FILTERS_IMPL_SHADOW_POINTS_FILTER_H_
39 #define PCL_FILTERS_IMPL_SHADOW_POINTS_FILTER_H_
41 #include <pcl/filters/shadowpoints.h>
46 template<
typename Po
intT,
typename NormalT>
void
49 assert (input_normals_ != NULL);
50 output.
points.resize (input_->points.size ());
51 if (extract_removed_indices_)
52 removed_indices_->resize (input_->points.size ());
56 for (
unsigned int i = 0; i < input_->points.size (); i++)
58 const NormalT &normal = input_normals_->points[i];
59 const PointT &pt = input_->points[i];
60 float val = fabsf (normal.normal_x * pt.x + normal.normal_y * pt.y + normal.normal_z * pt.z);
62 if ( (val >= threshold_) ^ negative_)
66 if (extract_removed_indices_)
67 (*removed_indices_)[ri++] = i;
71 pt_new.x = pt_new.y = pt_new.z = user_filter_value_;
77 removed_indices_->resize (ri);
79 output.
height =
static_cast<uint32_t
> (output.
points.size ());
83 template<
typename Po
intT,
typename NormalT>
void
86 assert (input_normals_ != NULL);
87 indices.resize (input_->points.size ());
88 if (extract_removed_indices_)
89 removed_indices_->resize (indices_->size ());
93 for (std::vector<int>::const_iterator idx = indices_->begin (); idx != indices_->end (); ++idx)
95 const NormalT &normal = input_normals_->points[*idx];
96 const PointT &pt = input_->points[*idx];
98 float val = fabsf (normal.normal_x * pt.x + normal.normal_y * pt.y + normal.normal_z * pt.z);
100 if ( (val >= threshold_) ^ negative_)
102 else if (extract_removed_indices_)
103 (*removed_indices_)[z++] = *idx;
106 removed_indices_->resize (z);
109 #define PCL_INSTANTIATE_ShadowPoints(T,NT) template class PCL_EXPORTS pcl::ShadowPoints<T,NT>;
111 #endif // PCL_FILTERS_IMPL_NORMAL_SPACE_SAMPLE_H_
A point structure representing normal coordinates and the surface curvature estimate.
std::vector< PointT, Eigen::aligned_allocator< PointT > > points
The point data.
uint32_t height
The point cloud height (if organized as an image-structure).
uint32_t width
The point cloud width (if organized as an image-structure).
void applyFilter(PointCloud &output)
Sample of point indices into a separate PointCloud.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
A point structure representing Euclidean xyz coordinates, and the RGB color.