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>

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. | |
| Selection & | operator= (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 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. | |
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.
| typedef std::set<unsigned int>::const_iterator Selection::const_iterator |
Definition at line 130 of file selection.h.
| typedef std::set<unsigned int>::const_reverse_iterator Selection::const_reverse_iterator |
Definition at line 147 of file selection.h.
| typedef std::set<unsigned int>::iterator Selection::iterator |
Definition at line 129 of file selection.h.
| Selection::Selection | ( | ConstCloudPtr | cloud_ptr, |
| bool | register_stats = false |
||
| ) | [inline] |
Constructor.
| cloud_ptr | A 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.
| copy | The 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.
| void Selection::addIndex | ( | unsigned int | index | ) |
Adds the index of the selected point to the selection table.
| index | The index of the point that is selected. |
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.
| indices | A vector of indices of points to be added to the table. |
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.
| start | the first index in the range. |
| num | the total number of indices in the range. |
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.
| void Selection::invertSelect | ( | ) |
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.
Equal operator.
| selection | a const reference to a selection object whose properties will be copied. |
Definition at line 47 of file selection.cpp.
| const_reverse_iterator Selection::rbegin | ( | ) | const [inline] |
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.
| index | The 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.
| indices | A 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.
| start | the first index in the range. |
| num | the total number of indices in the range. |
Definition at line 88 of file selection.cpp.
| const_reverse_iterator Selection::rend | ( | ) | const [inline] |
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.
ConstCloudPtr Selection::cloud_ptr_ [private] |
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.