40 #ifndef PCL_OCTREE_POINTCLOUD_ADJACENCY_CONTAINER_H_
41 #define PCL_OCTREE_POINTCLOUD_ADJACENCY_CONTAINER_H_
53 template<
typename Po
intInT,
typename DataT = Po
intInT>
57 typedef std::set<OctreePointCloudAdjacencyContainer*>
NeighborSetT;
59 typedef typename NeighborSetT::iterator
iterator;
61 inline iterator
begin () {
return (neighbors_.begin ()); }
62 inline iterator
end () {
return (neighbors_.end ()); }
63 inline const_iterator
begin ()
const {
return (neighbors_.begin ()); }
64 inline const_iterator
end ()
const {
return (neighbors_.end ()); }
66 inline size_t size ()
const {
return neighbors_.size (); }
134 neighbors_.insert (neighbor);
143 neighbors_.erase (neighbor);
153 return neighbors_.size ();
162 neighbors_ = neighbor_arg;
173 setData (
const DataT& data_arg) { data_ = data_arg;}
187 NeighborSetT neighbors_;
void removeNeighbor(OctreePointCloudAdjacencyContainer *neighbor)
Remove neighbor from neighbor set.
std::pair< iterator, bool > insert(OctreePointCloudAdjacencyContainer *neighbor)
std::set< OctreePointCloudAdjacencyContainer * > NeighborSetT
Octree adjacency leaf container class- stores set of pointers to neighbors, number of points added...
DataT & getData()
Returns a reference to the data member to access it without copying.
int getPointCounter() const
Gets the number of points contributing to this leaf.
void setPointCounter(int points_arg)
Sets the number of points contributing to this leaf.
const_iterator end() const
NeighborSetT::const_iterator const_iterator
virtual ~OctreePointCloudAdjacencyContainer()
Empty class deconstructor.
void addPoint(const PointInT &new_point)
Add new point to container- this just counts points.
void computeData()
Function for working on data added.
void setData(const DataT &data_arg)
Sets the data member.
void setNeighbors(const NeighborSetT &neighbor_arg)
Sets the whole neighbor set.
Octree container class that can serve as a base to construct own leaf node container classes...
const_iterator begin() const
OctreePointCloudAdjacencyContainer()
Class initialization.
virtual size_t getSize()
virtual method to get size of container
NeighborSetT::iterator iterator
size_t getNumNeighbors() const
Returns the number of neighbors this leaf has.
void addNeighbor(OctreePointCloudAdjacencyContainer *neighbor)
Add new neighbor to voxel.
virtual OctreePointCloudAdjacencyContainer * deepCopy() const
deep copy function
virtual void reset()
Clear the voxel centroid.