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

RandomSample applies a random sampling with uniform probability. Based off Algorithm A from the paper "Faster Methods for Random Sampling" by Jeffrey Scott Vitter. The algorithm runs in O(N) and results in sorted indices http://www.ittc.ku.edu/~jsv/Papers/Vit84.sampling.pdf More...

#include <random_sample.h>

Inheritance diagram for pcl::RandomSample< PointT >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< const RandomSample< PointT > > 
ConstPtr
typedef boost::shared_ptr
< RandomSample< PointT > > 
Ptr

Public Member Functions

unsigned int getSample ()
 Get the value of the internal sample parameter.
unsigned int getSeed ()
 Get the value of the internal seed parameter.
 RandomSample (bool extract_removed_indices=false)
 Empty constructor.
void setSample (unsigned int sample)
 Set number of indices to be sampled.
void setSeed (unsigned int seed)
 Set seed of random function.

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.
float unifRand ()
 Return a random number fast using a LCG (Linear Congruential Generator) algorithm. See http://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor/ for more information.

Protected Attributes

unsigned int sample_
 Number of indices that will be returned.
unsigned int seed_
 Random number seed.

Private Types

typedef FilterIndices< PointT >
::PointCloud 
PointCloud
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointCloud::Ptr PointCloudPtr

Detailed Description

template<typename PointT>
class pcl::RandomSample< PointT >

RandomSample applies a random sampling with uniform probability. Based off Algorithm A from the paper "Faster Methods for Random Sampling" by Jeffrey Scott Vitter. The algorithm runs in O(N) and results in sorted indices http://www.ittc.ku.edu/~jsv/Papers/Vit84.sampling.pdf

Author:
Justin Rosen

Definition at line 56 of file random_sample.h.


Member Typedef Documentation

template<typename PointT>
typedef boost::shared_ptr< const RandomSample<PointT> > pcl::RandomSample< PointT >::ConstPtr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 75 of file random_sample.h.

template<typename PointT>
typedef FilterIndices<PointT>::PointCloud pcl::RandomSample< PointT >::PointCloud [private]

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 68 of file random_sample.h.

template<typename PointT>
typedef PointCloud::ConstPtr pcl::RandomSample< PointT >::PointCloudConstPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 70 of file random_sample.h.

template<typename PointT>
typedef PointCloud::Ptr pcl::RandomSample< PointT >::PointCloudPtr [private]

Reimplemented from pcl::Filter< PointT >.

Definition at line 69 of file random_sample.h.

template<typename PointT>
typedef boost::shared_ptr< RandomSample<PointT> > pcl::RandomSample< PointT >::Ptr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 74 of file random_sample.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::RandomSample< PointT >::RandomSample ( bool  extract_removed_indices = false) [inline]

Empty constructor.

Definition at line 78 of file random_sample.h.


Member Function Documentation

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

Sample of point indices into a separate PointCloud.

Parameters:
outputthe resultant point cloud

Implements pcl::Filter< PointT >.

Definition at line 48 of file random_sample.hpp.

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

Sample of point indices.

Parameters:
indicesthe resultant point cloud indices

Implements pcl::FilterIndices< PointT >.

Definition at line 93 of file random_sample.hpp.

template<typename PointT>
unsigned int pcl::RandomSample< PointT >::getSample ( ) [inline]

Get the value of the internal sample parameter.

Definition at line 98 of file random_sample.h.

template<typename PointT>
unsigned int pcl::RandomSample< PointT >::getSeed ( ) [inline]

Get the value of the internal seed parameter.

Definition at line 115 of file random_sample.h.

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

Set number of indices to be sampled.

Parameters:
sample

Definition at line 90 of file random_sample.h.

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

Set seed of random function.

Parameters:
seed

Definition at line 107 of file random_sample.h.

template<typename PointT>
float pcl::RandomSample< PointT >::unifRand ( ) [inline, protected]

Return a random number fast using a LCG (Linear Congruential Generator) algorithm. See http://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor/ for more information.

Definition at line 143 of file random_sample.h.


Member Data Documentation

template<typename PointT>
unsigned int pcl::RandomSample< PointT >::sample_ [protected]

Number of indices that will be returned.

Definition at line 123 of file random_sample.h.

template<typename PointT>
unsigned int pcl::RandomSample< PointT >::seed_ [protected]

Random number seed.

Definition at line 125 of file random_sample.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:43:08