Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
pcl::NormalSpaceSampling< PointT, NormalT > Class Template Reference

NormalSpaceSampling samples the input point cloud in the space of normal directions computed at every point. More...

#include <normal_space.h>

Inheritance diagram for pcl::NormalSpaceSampling< PointT, NormalT >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< const NormalSpaceSampling
< PointT, NormalT > > 
ConstPtr
typedef boost::shared_ptr
< NormalSpaceSampling< PointT,
NormalT > > 
Ptr

Public Member Functions

void getBins (unsigned int &binsx, unsigned int &binsy, unsigned int &binsz) const
 Get the number of bins in x, y and z direction.
NormalsConstPtr getNormals () const
 Get the normals computed on the input point cloud.
unsigned int getSample () const
 Get the value of the internal sample parameter.
unsigned int getSeed () const
 Get the value of the internal seed parameter.
 NormalSpaceSampling ()
 Empty constructor.
void setBins (unsigned int binsx, unsigned int binsy, unsigned int binsz)
 Set the number of bins in x, y and z direction.
void setNormals (const NormalsConstPtr &normals)
 Set the normals computed on the input point cloud.
void setSample (unsigned int sample)
 Set number of indices to be sampled.
void setSeed (unsigned int seed)
 Set seed of random function.
 ~NormalSpaceSampling ()
 Destructor.

Protected Member Functions

void applyFilter (PointCloud &output)
 Sample of point indices into a separate PointCloud.
void applyFilter (std::vector< int > &indices)
 Sample of point indices.
bool initCompute ()
 This method should get called before starting the actual computation.

Protected Attributes

unsigned int binsx_
 Number of bins in x direction.
unsigned int binsy_
 Number of bins in y direction.
unsigned int binsz_
 Number of bins in z direction.
NormalsConstPtr input_normals_
 The normals computed at each point in the input cloud.
unsigned int sample_
 Number of indices that will be returned.
unsigned int seed_
 Random number seed.

Private Types

typedef pcl::PointCloud
< NormalT >::ConstPtr 
NormalsConstPtr
typedef FilterIndices< PointT >
::PointCloud 
PointCloud
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointCloud::Ptr PointCloudPtr

Private Member Functions

unsigned int findBin (const float *normal, unsigned int nbins)
 Finds the bin number of the input normal, returns the bin number.
bool isEntireBinSampled (boost::dynamic_bitset<> &array, unsigned int start_index, unsigned int length)
 Checks of the entire bin is sampled, returns true or false.

Private Attributes

boost::variate_generator
< boost::mt19937,
boost::uniform_int< uint32_t > > * 
rng_uniform_distribution_
 Uniform random distribution.

Detailed Description

template<typename PointT, typename NormalT>
class pcl::NormalSpaceSampling< PointT, NormalT >

NormalSpaceSampling samples the input point cloud in the space of normal directions computed at every point.

Definition at line 52 of file normal_space.h.


Member Typedef Documentation

template<typename PointT, typename NormalT>
typedef boost::shared_ptr<const NormalSpaceSampling<PointT, NormalT> > pcl::NormalSpaceSampling< PointT, NormalT >::ConstPtr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 71 of file normal_space.h.

template<typename PointT, typename NormalT>
typedef pcl::PointCloud<NormalT>::ConstPtr pcl::NormalSpaceSampling< PointT, NormalT >::NormalsConstPtr [private]

Definition at line 66 of file normal_space.h.

template<typename PointT, typename NormalT>
typedef FilterIndices<PointT>::PointCloud pcl::NormalSpaceSampling< PointT, NormalT >::PointCloud [private]

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 63 of file normal_space.h.

template<typename PointT, typename NormalT>
typedef PointCloud::ConstPtr pcl::NormalSpaceSampling< PointT, NormalT >::PointCloudConstPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 65 of file normal_space.h.

template<typename PointT, typename NormalT>
typedef PointCloud::Ptr pcl::NormalSpaceSampling< PointT, NormalT >::PointCloudPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 64 of file normal_space.h.

template<typename PointT, typename NormalT>
typedef boost::shared_ptr<NormalSpaceSampling<PointT, NormalT> > pcl::NormalSpaceSampling< PointT, NormalT >::Ptr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 70 of file normal_space.h.


Constructor & Destructor Documentation

template<typename PointT, typename NormalT>
pcl::NormalSpaceSampling< PointT, NormalT >::NormalSpaceSampling ( ) [inline]

Empty constructor.

Definition at line 74 of file normal_space.h.

template<typename PointT, typename NormalT>
pcl::NormalSpaceSampling< PointT, NormalT >::~NormalSpaceSampling ( ) [inline]

Destructor.

Definition at line 87 of file normal_space.h.


Member Function Documentation

template<typename PointT , typename NormalT >
void pcl::NormalSpaceSampling< PointT, NormalT >::applyFilter ( PointCloud output) [protected, virtual]

Sample of point indices into a separate PointCloud.

Parameters:
[out]outputthe resultant point cloud

Implements pcl::Filter< PointT >.

Definition at line 73 of file normal_space.hpp.

template<typename PointT , typename NormalT >
void pcl::NormalSpaceSampling< PointT, NormalT >::applyFilter ( std::vector< int > &  indices) [protected, virtual]

Sample of point indices.

Parameters:
[out]indicesthe resultant point cloud indices

Implements pcl::FilterIndices< PointT >.

Definition at line 177 of file normal_space.hpp.

template<typename PointT , typename NormalT >
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::findBin ( const float *  normal,
unsigned int  nbins 
) [private]

Finds the bin number of the input normal, returns the bin number.

Parameters:
[in]normalthe input normal
[in]nbinstotal number of bins

Definition at line 113 of file normal_space.hpp.

template<typename PointT, typename NormalT>
void pcl::NormalSpaceSampling< PointT, NormalT >::getBins ( unsigned int &  binsx,
unsigned int &  binsy,
unsigned int &  binsz 
) const [inline]

Get the number of bins in x, y and z direction.

Parameters:
[out]binsxnumber of bins in x direction
[out]binsynumber of bins in y direction
[out]binsznumber of bins in z direction

Definition at line 136 of file normal_space.h.

template<typename PointT, typename NormalT>
NormalsConstPtr pcl::NormalSpaceSampling< PointT, NormalT >::getNormals ( ) const [inline]

Get the normals computed on the input point cloud.

Definition at line 151 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::getSample ( ) const [inline]

Get the value of the internal sample parameter.

Definition at line 102 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::getSeed ( ) const [inline]

Get the value of the internal seed parameter.

Definition at line 114 of file normal_space.h.

template<typename PointT , typename NormalT >
bool pcl::NormalSpaceSampling< PointT, NormalT >::initCompute ( ) [protected]

This method should get called before starting the actual computation.

Internally, initCompute() does the following:

  • checks if an input dataset is given, and returns false otherwise
  • checks whether a set of input indices has been given. Returns true if yes.
  • if no input indices have been given, a fake set is created, which will be used until:
    • either a new set is given via setIndices(), or
    • a new cloud is given that has a different set of points. This will trigger an update on the set of fake indices

Reimplemented from pcl::PCLBase< PointT >.

Definition at line 49 of file normal_space.hpp.

template<typename PointT , typename NormalT >
bool pcl::NormalSpaceSampling< PointT, NormalT >::isEntireBinSampled ( boost::dynamic_bitset<> &  array,
unsigned int  start_index,
unsigned int  length 
) [private]

Checks of the entire bin is sampled, returns true or false.

Parameters:
[out]arrayflag which says whether a point is sampled or not
[in]start_indexthe index to the first point of the bin in array.
[in]lengthnumber of points in the bin

Definition at line 99 of file normal_space.hpp.

template<typename PointT, typename NormalT>
void pcl::NormalSpaceSampling< PointT, NormalT >::setBins ( unsigned int  binsx,
unsigned int  binsy,
unsigned int  binsz 
) [inline]

Set the number of bins in x, y and z direction.

Parameters:
[in]binsxnumber of bins in x direction
[in]binsynumber of bins in y direction
[in]binsznumber of bins in z direction

Definition at line 123 of file normal_space.h.

template<typename PointT, typename NormalT>
void pcl::NormalSpaceSampling< PointT, NormalT >::setNormals ( const NormalsConstPtr normals) [inline]

Set the normals computed on the input point cloud.

Parameters:
[in]normalsthe normals computed for the input cloud

Definition at line 147 of file normal_space.h.

template<typename PointT, typename NormalT>
void pcl::NormalSpaceSampling< PointT, NormalT >::setSample ( unsigned int  sample) [inline]

Set number of indices to be sampled.

Parameters:
[in]samplethe number of sample indices

Definition at line 97 of file normal_space.h.

template<typename PointT, typename NormalT>
void pcl::NormalSpaceSampling< PointT, NormalT >::setSeed ( unsigned int  seed) [inline]

Set seed of random function.

Parameters:
[in]seedthe input seed

Definition at line 109 of file normal_space.h.


Member Data Documentation

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::binsx_ [protected]

Number of bins in x direction.

Definition at line 160 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::binsy_ [protected]

Number of bins in y direction.

Definition at line 162 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::binsz_ [protected]

Number of bins in z direction.

Definition at line 164 of file normal_space.h.

template<typename PointT, typename NormalT>
NormalsConstPtr pcl::NormalSpaceSampling< PointT, NormalT >::input_normals_ [protected]

The normals computed at each point in the input cloud.

Definition at line 167 of file normal_space.h.

template<typename PointT, typename NormalT>
boost::variate_generator<boost::mt19937, boost::uniform_int<uint32_t> >* pcl::NormalSpaceSampling< PointT, NormalT >::rng_uniform_distribution_ [private]

Uniform random distribution.

Definition at line 201 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::sample_ [protected]

Number of indices that will be returned.

Definition at line 155 of file normal_space.h.

template<typename PointT, typename NormalT>
unsigned int pcl::NormalSpaceSampling< PointT, NormalT >::seed_ [protected]

Random number seed.

Definition at line 157 of file normal_space.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:42:29