Point Cloud Library (PCL)  1.8.1-dev
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::SamplingSurfaceNormal< PointT > Class Template Reference

SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N points, and samples points randomly within each grid. More...

#include <pcl/filters/sampling_surface_normal.h>

+ Inheritance diagram for pcl::SamplingSurfaceNormal< PointT >:

Public Types

typedef boost::shared_ptr
< SamplingSurfaceNormal
< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const SamplingSurfaceNormal
< PointT > > 
ConstPtr
 
- Public Types inherited from pcl::Filter< PointT >
typedef boost::shared_ptr
< Filter< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const Filter< PointT > > 
ConstPtr
 
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
- Public Types inherited from pcl::PCLBase< PointT >
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr
< PointIndices
PointIndicesPtr
 
typedef boost::shared_ptr
< PointIndices const > 
PointIndicesConstPtr
 

Public Member Functions

 SamplingSurfaceNormal ()
 Empty constructor. More...
 
void setSample (unsigned int sample)
 Set maximum number of samples in each grid. More...
 
unsigned int getSample () const
 Get the value of the internal sample parameter. More...
 
void setSeed (unsigned int seed)
 Set seed of random function. More...
 
unsigned int getSeed () const
 Get the value of the internal seed parameter. More...
 
void setRatio (float ratio)
 Set ratio of points to be sampled in each grid. More...
 
float getRatio () const
 Get the value of the internal ratio parameter. More...
 
- Public Member Functions inherited from pcl::Filter< PointT >
 Filter (bool extract_removed_indices=false)
 Empty constructor. More...
 
virtual ~Filter ()
 Empty destructor. More...
 
IndicesConstPtr const getRemovedIndices ()
 Get the point indices being removed. More...
 
void getRemovedIndices (PointIndices &pi)
 Get the point indices being removed. More...
 
void filter (PointCloud &output)
 Calls the filtering method and returns the filtered dataset in output. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointT >
 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset. More...
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

void applyFilter (PointCloud &output)
 Sample of point indices into a separate PointCloud. More...
 
- Protected Member Functions inherited from pcl::Filter< PointT >
const std::string & getClassName () const
 Get a string representation of the name of this class. More...
 
- Protected Member Functions inherited from pcl::PCLBase< PointT >
bool initCompute ()
 This method should get called before starting the actual computation. More...
 
bool deinitCompute ()
 This method should get called after finishing the actual computation. More...
 

Protected Attributes

unsigned int sample_
 Maximum number of samples in each grid. More...
 
unsigned int seed_
 Random number seed. More...
 
float ratio_
 Ratio of points to be sampled in each grid. More...
 
- Protected Attributes inherited from pcl::Filter< PointT >
IndicesPtr removed_indices_
 Indices of the points that are removed. More...
 
std::string filter_name_
 The filter name. More...
 
bool extract_removed_indices_
 Set to true if we want to return the indices of the removed points. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
bool use_indices_
 Set to true if point indices are used. More...
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...
 

Detailed Description

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

SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N points, and samples points randomly within each grid.

Normal is computed using the N points of each grid. All points sampled within a grid are assigned the same normal.

Author
Aravindhan K Krishnan. This code is ported from libpointmatcher (https://github.com/ethz-asl/libpointmatcher)

Definition at line 55 of file sampling_surface_normal.h.

Member Typedef Documentation

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

Definition at line 71 of file sampling_surface_normal.h.

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

Definition at line 70 of file sampling_surface_normal.h.

Constructor & Destructor Documentation

template<typename PointT >
pcl::SamplingSurfaceNormal< PointT >::SamplingSurfaceNormal ( )
inline

Member Function Documentation

template<typename PointT >
void pcl::SamplingSurfaceNormal< PointT >::applyFilter ( PointCloud output)
protectedvirtual

Sample of point indices into a separate PointCloud.

Parameters
[out]outputthe resultant point cloud

Implements pcl::Filter< PointT >.

Definition at line 48 of file sampling_surface_normal.hpp.

References pcl::PointCloud< T >::height, pcl::PointCloud< T >::points, and pcl::PointCloud< T >::width.

template<typename PointT >
float pcl::SamplingSurfaceNormal< PointT >::getRatio ( ) const
inline

Get the value of the internal ratio parameter.

Definition at line 125 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::ratio_.

template<typename PointT >
unsigned int pcl::SamplingSurfaceNormal< PointT >::getSample ( ) const
inline

Get the value of the internal sample parameter.

Definition at line 92 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::sample_.

template<typename PointT >
unsigned int pcl::SamplingSurfaceNormal< PointT >::getSeed ( ) const
inline

Get the value of the internal seed parameter.

Definition at line 109 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::seed_.

template<typename PointT >
void pcl::SamplingSurfaceNormal< PointT >::setRatio ( float  ratio)
inline

Set ratio of points to be sampled in each grid.

Parameters
[in]ratiosample the ratio of points to be sampled in each grid

Definition at line 118 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::ratio_.

template<typename PointT >
void pcl::SamplingSurfaceNormal< PointT >::setSample ( unsigned int  sample)
inline

Set maximum number of samples in each grid.

Parameters
[in]samplemaximum number of samples in each grid

Definition at line 85 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::sample_.

template<typename PointT >
void pcl::SamplingSurfaceNormal< PointT >::setSeed ( unsigned int  seed)
inline

Set seed of random function.

Parameters
[in]seedthe input seed

Definition at line 101 of file sampling_surface_normal.h.

References pcl::SamplingSurfaceNormal< PointT >::seed_.

Member Data Documentation

template<typename PointT >
float pcl::SamplingSurfaceNormal< PointT >::ratio_
protected

Ratio of points to be sampled in each grid.

Definition at line 137 of file sampling_surface_normal.h.

Referenced by pcl::SamplingSurfaceNormal< PointT >::getRatio(), and pcl::SamplingSurfaceNormal< PointT >::setRatio().

template<typename PointT >
unsigned int pcl::SamplingSurfaceNormal< PointT >::sample_
protected

Maximum number of samples in each grid.

Definition at line 133 of file sampling_surface_normal.h.

Referenced by pcl::SamplingSurfaceNormal< PointT >::getSample(), and pcl::SamplingSurfaceNormal< PointT >::setSample().

template<typename PointT >
unsigned int pcl::SamplingSurfaceNormal< PointT >::seed_
protected

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