Point Cloud Library (PCL)  1.3.1
Public Member Functions | Public Attributes
pcl::RandomSample Class Reference

RandomSample applies a random sampling with uniform probability. More...

#include <pcl/filters/random_sample.h>

Inheritance diagram for pcl::RandomSample:
Inheritance graph
[legend]
Collaboration diagram for pcl::RandomSample:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RandomSample ()
 Empty constructor.
void setSample (unsigned int sample)
 Set number of indices to be sampled.
unsigned int getSample ()
 Get the value of the internal sample parameter.
void setSeed (unsigned int seed)
 Set seed of random function.
unsigned int getSeed ()
 Get the value of the internal seed parameter.
virtual void filter (PointCloud &output)
void filter (std::vector< int > &indices)
 Calls the filtering method and returns the filtered point cloud indices.

Public Attributes

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

Detailed Description

RandomSample applies a random sampling with uniform probability.

Based off http://www.keithschwarz.com/interesting/code/?dir=random-sample Runs in O(n)

Author:
Justin Rosen

Constructor & Destructor Documentation

pcl::RandomSample::RandomSample ( ) [inline]

Empty constructor.

Definition at line 67 of file random_sample.h.


Member Function Documentation

virtual void pcl::FilterIndices::filter ( PointCloud output) [inline, virtual, inherited]

Calls the filtering method and returns the filtered dataset in output.

Parameters:
outputthe resultant filtered point cloud dataset

Definition at line 73 of file filter_indices.h.

void pcl::FilterIndices::filter ( std::vector< int > &  indices) [inline, inherited]

Calls the filtering method and returns the filtered point cloud indices.

Parameters:
indicesthe resultant filtered point cloud indices

Definition at line 83 of file filter_indices.h.

unsigned int pcl::RandomSample::getSample ( ) [inline]

Get the value of the internal sample parameter.

Definition at line 84 of file random_sample.h.

unsigned int pcl::RandomSample::getSeed ( ) [inline]

Get the value of the internal seed parameter.

Definition at line 101 of file random_sample.h.

void pcl::RandomSample::setSample ( unsigned int  sample) [inline]

Set number of indices to be sampled.

Parameters:
sample

Definition at line 76 of file random_sample.h.

void pcl::RandomSample::setSeed ( unsigned int  seed) [inline]

Set seed of random function.

Parameters:
seed

Definition at line 93 of file random_sample.h.


Member Data Documentation

Number of indices that will be returned.

Definition at line 107 of file random_sample.h.

Random number seed.

Definition at line 109 of file random_sample.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines