40#include <pcl/filters/filter_indices.h>
41#include <boost/dynamic_bitset.hpp>
50 template<
typename Po
intT,
typename NormalT>
69 using Ptr = shared_ptr<NormalSpaceSampling<PointT, NormalT> >;
70 using ConstPtr = shared_ptr<const NormalSpaceSampling<PointT, NormalT> >;
80 ,
sample_ (std::numeric_limits<unsigned int>::max ())
81 ,
seed_ (static_cast<unsigned int> (time (nullptr)))
120 setBins (
unsigned int binsx,
unsigned int binsy,
unsigned int binsz)
133 getBins (
unsigned int& binsx,
unsigned int& binsy,
unsigned int& binsz)
const
147 inline NormalsConstPtr
180 findBin (
const float *normal);
188 isEntireBinSampled (boost::dynamic_bitset<> &array,
unsigned int start_index,
unsigned int length);
195#ifdef PCL_NO_PRECOMPILE
196#include <pcl/filters/impl/normal_space.hpp>
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.
const std::string & getClassName() const
Get a string representation of the name of this class.
std::string filter_name_
The filter name.
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.
FilterIndices(bool extract_removed_indices=false)
Constructor.
pcl::PointCloud< PointT > PointCloud
unsigned int getSeed() const
Get the value of the internal seed parameter.
NormalsConstPtr getNormals() const
Get the normals computed on the input point cloud.
unsigned int binsy_
Number of bins in y direction.
void setSeed(unsigned int seed)
Set seed of random function.
NormalsConstPtr input_normals_
The normals computed at each point in the input cloud.
void setBins(unsigned int binsx, unsigned int binsy, unsigned int binsz)
Set the number of bins in x, y and z direction.
NormalSpaceSampling()
Empty constructor.
unsigned int seed_
Random number seed.
unsigned int getSample() const
Get the value of the internal sample parameter.
void applyFilter(Indices &indices) override
Sample of point indices.
unsigned int binsz_
Number of bins in z direction.
void setNormals(const NormalsConstPtr &normals)
Set the normals computed on the input point cloud.
NormalSpaceSampling(bool extract_removed_indices)
Constructor.
void setSample(unsigned int sample)
Set number of indices to be sampled.
unsigned int sample_
Number of indices that will be returned.
shared_ptr< const NormalSpaceSampling< PointT, NormalT > > ConstPtr
void getBins(unsigned int &binsx, unsigned int &binsy, unsigned int &binsz) const
Get the number of bins in x, y and z direction.
unsigned int binsx_
Number of bins in x direction.
shared_ptr< NormalSpaceSampling< PointT, NormalT > > Ptr
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
IndicesAllocator<> Indices
Type used for indices in PCL.