38#ifndef PCL_FILTERS_IMPL_SHADOW_POINTS_FILTER_H_
39#define PCL_FILTERS_IMPL_SHADOW_POINTS_FILTER_H_
41#include <pcl/filters/shadowpoints.h>
46template<
typename Po
intT,
typename NormalT>
void
50 output.resize (
input_->size ());
56 for (std::size_t i = 0; i <
input_->size (); i++)
58 const NormalT &normal = (*input_normals_)[i];
59 const PointT &pt = (*input_)[i];
60 const float val = std::abs (normal.normal_x * pt.x + normal.normal_y * pt.y + normal.normal_z * pt.z);
67 (*removed_indices_)[ri++] = i;
70 PointT &pt_new = output[cp++] = pt;
73 output.is_dense =
false;
81 output.width = output.size ();
85template<
typename Po
intT,
typename NormalT>
void
89 indices.resize (
input_->size ());
97 const NormalT &normal = (*input_normals_)[idx];
98 const PointT &pt = (*input_)[idx];
100 float val = std::abs (normal.normal_x * pt.x + normal.normal_y * pt.y + normal.normal_z * pt.z);
105 (*removed_indices_)[z++] = idx;
111#define PCL_INSTANTIATE_ShadowPoints(T,NT) template class PCL_EXPORTS pcl::ShadowPoints<T,NT>;
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.
IndicesPtr removed_indices_
Indices of the points that are removed.
float user_filter_value_
The user given value that the filtered point dimensions should be set to (default = NaN).
bool keep_organized_
False = remove points (default), true = redefine points, keep structure.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
NormalsPtr input_normals_
The normals computed at each point in the input cloud.
void applyFilter(PointCloud &output) override
Sample of point indices into a separate PointCloud.
IndicesAllocator<> Indices
Type used for indices in PCL.