55 template <
typename Po
intInT,
typename DataT = Po
intInT>
57 template <
typename T,
typename U,
typename V>
61 using NeighborListT = std::list<OctreePointCloudAdjacencyContainer<PointInT, DataT>*>;
67 return (neighbors_.begin());
72 return (neighbors_.end());
78 return neighbors_.size();
93 return neighbors_.size();
134 return (neighbors_.begin());
139 return (neighbors_.end());
147 new_container->setNeighbors(this->neighbors_);
148 new_container->setPointCounter(this->num_points_);
149 return new_container;
174 num_points_ = points_arg;
192 neighbors_.push_back(neighbor);
201 for (
auto neighb_it = neighbors_.begin(); neighb_it != neighbors_.end();
203 if (*neighb_it == neighbor) {
204 neighbors_.erase(neighb_it);
216 neighbors_ = neighbor_arg;
Octree container class that can serve as a base to construct own leaf node container classes.
Octree adjacency leaf container class- stores a list of pointers to neighbors, number of points added...
DataT & getData()
Returns a reference to the data member to access it without copying.
const_iterator cend() const
void setNeighbors(const NeighborListT &neighbor_arg)
Sets the whole neighbor set.
void addPoint(const PointInT &)
Add new point to container- this just counts points.
void addNeighbor(OctreePointCloudAdjacencyContainer *neighbor)
Add new neighbor to voxel.
virtual OctreePointCloudAdjacencyContainer * deepCopy() const
deep copy function
void removeNeighbor(OctreePointCloudAdjacencyContainer *neighbor)
Remove neighbor from neighbor set.
const_iterator cbegin() const
typename NeighborListT::const_iterator const_iterator
uindex_t getSize() const override
virtual method to get size of container
uindex_t getPointCounter() const
Gets the number of points contributing to this leaf.
std::size_t getNumNeighbors() const
Returns the number of neighbors this leaf has.
void reset() override
Clear the voxel centroid.
typename NeighborListT::iterator iterator
void setPointCounter(uindex_t points_arg)
Sets the number of points contributing to this leaf.
OctreePointCloudAdjacencyContainer()
Class initialization.
std::list< OctreePointCloudAdjacencyContainer< PointInT, DataT > * > NeighborListT
void computeData()
Function for working on data added.
~OctreePointCloudAdjacencyContainer() override=default
Empty class deconstructor.
void setData(const DataT &data_arg)
Sets the data member.
Octree pointcloud voxel class which maintains adjacency information for its voxels.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.