38 #ifndef PCL_FILTERS_NORMAL_SUBSAMPLE_H_ 39 #define PCL_FILTERS_NORMAL_SUBSAMPLE_H_ 41 #include <pcl/filters/boost.h> 42 #include <pcl/filters/filter_indices.h> 51 template<
typename Po
intT,
typename NormalT>
70 typedef boost::shared_ptr<NormalSpaceSampling<PointT, NormalT> >
Ptr;
71 typedef boost::shared_ptr<const NormalSpaceSampling<PointT, NormalT> >
ConstPtr;
75 :
sample_ (
std::numeric_limits<unsigned int>::max ())
76 ,
seed_ (static_cast<unsigned int> (time (NULL)))
81 , rng_uniform_distribution_ (NULL)
89 if (rng_uniform_distribution_ != NULL)
90 delete rng_uniform_distribution_;
123 setBins (
unsigned int binsx,
unsigned int binsy,
unsigned int binsz)
136 getBins (
unsigned int& binsx,
unsigned int& binsy,
unsigned int& binsz)
const 150 inline NormalsConstPtr
190 findBin (
const float *normal,
unsigned int nbins);
198 isEntireBinSampled (boost::dynamic_bitset<> &array,
unsigned int start_index,
unsigned int length);
201 boost::variate_generator<boost::mt19937, boost::uniform_int<uint32_t> > *rng_uniform_distribution_;
205 #ifdef PCL_NO_PRECOMPILE 206 #include <pcl/filters/impl/normal_space.hpp> 209 #endif //#ifndef PCL_FILTERS_NORMAL_SPACE_SUBSAMPLE_H_ NormalsConstPtr getNormals() const
Get the normals computed on the input point cloud.
void setBins(unsigned int binsx, unsigned int binsy, unsigned int binsz)
Set the number of bins in x, y and z direction.
unsigned int binsx_
Number of bins in x direction.
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< NormalSpaceSampling< PointT, NormalT > > Ptr
unsigned int binsy_
Number of bins in y direction.
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 binsz_
Number of bins in z direction.
unsigned int seed_
Random number seed.
NormalSpaceSampling samples the input point cloud in the space of normal directions computed at every...
boost::shared_ptr< PointCloud< PointT > > Ptr
FilterIndices represents the base class for filters that are about binary point removal.
unsigned int sample_
Number of indices that will be returned.
PointCloud::Ptr PointCloudPtr
unsigned int getSample() const
Get the value of the internal sample parameter.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points. ...
~NormalSpaceSampling()
Destructor.
NormalsConstPtr input_normals_
The normals computed at each point in the input cloud.
void applyFilter(PointCloud &output)
Sample of point indices into a separate PointCloud.
void setSeed(unsigned int seed)
Set seed of random function.
void setSample(unsigned int sample)
Set number of indices to be sampled.
std::string filter_name_
The filter name.
NormalSpaceSampling()
Empty constructor.
void setNormals(const NormalsConstPtr &normals)
Set the normals computed on the input point cloud.
unsigned int getSeed() const
Get the value of the internal seed parameter.
boost::shared_ptr< const NormalSpaceSampling< PointT, NormalT > > ConstPtr