Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef PCL_OCTREE_CHANGEDETECTOR_H
00040 #define PCL_OCTREE_CHANGEDETECTOR_H
00041
00042 #include "octree_pointcloud.h"
00043
00044 namespace pcl
00045 {
00046 namespace octree
00047 {
00048
00050
00058
00059 template<typename PointT,
00060 typename LeafContainerT = OctreeContainerPointIndices,
00061 typename BranchContainerT = OctreeContainerEmpty >
00062
00063 class OctreePointCloudChangeDetector : public OctreePointCloud<PointT,
00064 LeafContainerT, BranchContainerT, Octree2BufBase<LeafContainerT, BranchContainerT> >
00065
00066 {
00067
00068 public:
00069
00073 OctreePointCloudChangeDetector (const double resolution_arg) :
00074 OctreePointCloud<PointT, LeafContainerT, BranchContainerT,
00075 Octree2BufBase<LeafContainerT, BranchContainerT> > (resolution_arg)
00076 {
00077 }
00078
00080 virtual ~OctreePointCloudChangeDetector ()
00081 {
00082 }
00083
00089 std::size_t getPointIndicesFromNewVoxels (std::vector<int> &indicesVector_arg,
00090 const int minPointsPerLeaf_arg = 0)
00091 {
00092
00093 std::vector<OctreeContainerPointIndices*> leaf_containers;
00094 this->serializeNewLeafs (leaf_containers);
00095
00096 std::vector<OctreeContainerPointIndices*>::iterator it;
00097 std::vector<OctreeContainerPointIndices*>::const_iterator it_end = leaf_containers.end();
00098
00099 for (it=leaf_containers.begin(); it!=it_end; ++it)
00100 {
00101 if ((*it)->getSize()>=minPointsPerLeaf_arg)
00102 (*it)->getPointIndices(indicesVector_arg);
00103 }
00104
00105 return (indicesVector_arg.size ());
00106 }
00107 };
00108 }
00109 }
00110
00111 #define PCL_INSTANTIATE_OctreePointCloudChangeDetector(T) template class PCL_EXPORTS pcl::octree::OctreePointCloudChangeDetector<T>;
00112
00113 #endif
00114