Public Types | Public Member Functions | Private Member Functions | Private Attributes
Selection Class Reference

This class serves as a sort of mask for performing operations on a point cloud. It keeps track of the indices of identified/selected points and provides methods for accessing those indices and modifying them. More...

#include <selection.h>

Inheritance diagram for Selection:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::set< unsigned int >
::const_iterator 
const_iterator
typedef std::set< unsigned int >
::const_reverse_iterator 
const_reverse_iterator
typedef std::set< unsigned int >
::iterator 
iterator

Public Member Functions

void addIndex (unsigned int index)
 Adds the index of the selected point to the selection table.
void addIndex (const IndexVector &indices)
 Adds a vector of indices of the selected points to the table.
void addIndexRange (unsigned int start, unsigned int num)
 Adds a range of consecutive indices into the selection table.
const_iterator begin () const
 Get the begin iterator of the selection.
void clear ()
 Removes all the indices from the selection table.
bool empty () const
 Returns true if no point is selected.
const_iterator end () const
 Get the end iterator of the selection.
std::string getStat () const
 Get the statistics of the selected points in string.
void invertSelect ()
 Invert selection.
bool isSelected (unsigned int index) const
 Returns true if the passed index is selected.
Selectionoperator= (const Selection &selection)
 Equal operator.
const_reverse_iterator rbegin () const
 Get the begin iterator of the selection.
void removeIndex (unsigned int index)
 Removes the index of a point from the selection table.
void removeIndex (const IndexVector &indices)
 Removes a vector of indices from the table.
void removeIndexRange (unsigned int start, unsigned int num)
 Removes a range of consecutive indices into the selection table.
const_reverse_iterator rend () const
 Get the end iterator of the selection.
 Selection (ConstCloudPtr cloud_ptr, bool register_stats=false)
 Constructor.
 Selection (const Selection &copy)
 Copy constructor.
unsigned int size () const
 Returns the number of points in the selection.
 ~Selection ()
 Destructor.

Private Member Functions

 Selection ()
 Default constructor - object is not default constructable.

Private Attributes

ConstCloudPtr cloud_ptr_
 a pointer to the cloud
std::set< unsigned int > selected_indices_
 A set of unique indices that have been selected in the cloud.

Detailed Description

This class serves as a sort of mask for performing operations on a point cloud. It keeps track of the indices of identified/selected points and provides methods for accessing those indices and modifying them.

Definition at line 52 of file selection.h.


Member Typedef Documentation

typedef std::set<unsigned int>::const_iterator Selection::const_iterator

Definition at line 130 of file selection.h.

Definition at line 147 of file selection.h.

typedef std::set<unsigned int>::iterator Selection::iterator

Definition at line 129 of file selection.h.


Constructor & Destructor Documentation

Selection::Selection ( ConstCloudPtr  cloud_ptr,
bool  register_stats = false 
) [inline]

Constructor.

Parameters:
cloud_ptrA pointer to the const cloud object for which this object is to maintain selections.

Definition at line 58 of file selection.h.

Selection::Selection ( const Selection copy) [inline]

Copy constructor.

Parameters:
copyThe selection object to be copied

Definition at line 67 of file selection.h.

Selection::~Selection ( ) [inline]

Destructor.

Definition at line 73 of file selection.h.

Selection::Selection ( ) [inline, private]

Default constructor - object is not default constructable.

Definition at line 195 of file selection.h.


Member Function Documentation

void Selection::addIndex ( unsigned int  index)

Adds the index of the selected point to the selection table.

Parameters:
indexThe index of the point that is selected.
Precondition:
Assumes the passed index is valid with respect to the current cloud.

Definition at line 55 of file selection.cpp.

void Selection::addIndex ( const IndexVector indices)

Adds a vector of indices of the selected points to the table.

Parameters:
indicesA vector of indices of points to be added to the table.
Precondition:
Assumes the passed index is valid with respect to the current cloud.

Definition at line 67 of file selection.cpp.

void Selection::addIndexRange ( unsigned int  start,
unsigned int  num 
)

Adds a range of consecutive indices into the selection table.

Parameters:
startthe first index in the range.
numthe total number of indices in the range.
Precondition:
Assumes the passed index is valid with respect to the current cloud.

Definition at line 81 of file selection.cpp.

const_iterator Selection::begin ( ) const [inline]

Get the begin iterator of the selection.

Definition at line 134 of file selection.h.

void Selection::clear ( ) [inline]

Removes all the indices from the selection table.

Reimplemented from Statistics.

Definition at line 124 of file selection.h.

bool Selection::empty ( ) const [inline]

Returns true if no point is selected.

Definition at line 170 of file selection.h.

const_iterator Selection::end ( ) const [inline]

Get the end iterator of the selection.

Definition at line 141 of file selection.h.

std::string Selection::getStat ( ) const [virtual]

Get the statistics of the selected points in string.

Implements Statistics.

Definition at line 119 of file selection.cpp.

Invert selection.

Make the unselected points selected and deselect the previously selected points.

Definition at line 106 of file selection.cpp.

bool Selection::isSelected ( unsigned int  index) const

Returns true if the passed index is selected.

Definition at line 95 of file selection.cpp.

Selection & Selection::operator= ( const Selection selection)

Equal operator.

Parameters:
selectiona const reference to a selection object whose properties will be copied.

Definition at line 47 of file selection.cpp.

Get the begin iterator of the selection.

Definition at line 151 of file selection.h.

void Selection::removeIndex ( unsigned int  index)

Removes the index of a point from the selection table.

Parameters:
indexThe index of the point to be removed from the table.

Definition at line 61 of file selection.cpp.

void Selection::removeIndex ( const IndexVector indices)

Removes a vector of indices from the table.

Parameters:
indicesA vector of indices of points to be removed from the table.

Definition at line 73 of file selection.cpp.

void Selection::removeIndexRange ( unsigned int  start,
unsigned int  num 
)

Removes a range of consecutive indices into the selection table.

Parameters:
startthe first index in the range.
numthe total number of indices in the range.

Definition at line 88 of file selection.cpp.

Get the end iterator of the selection.

Definition at line 158 of file selection.h.

unsigned int Selection::size ( ) const [inline]

Returns the number of points in the selection.

Definition at line 178 of file selection.h.


Member Data Documentation

a pointer to the cloud

Definition at line 200 of file selection.h.

std::set<unsigned int> Selection::selected_indices_ [private]

A set of unique indices that have been selected in the cloud.

Definition at line 203 of file selection.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:38:53