40 #ifndef PCL_OUTOFCORE_RAM_CONTAINER_IMPL_H_ 41 #define PCL_OUTOFCORE_RAM_CONTAINER_IMPL_H_ 47 #include <pcl/outofcore/octree_ram_container.h> 53 template<
typename Po
intT>
56 template<
typename Po
intT>
59 template<
typename Po
intT>
void 62 if (!container_.empty ())
64 FILE* fxyz = fopen (path.string ().c_str (),
"we");
69 const PointT& p = container_[i];
74 ss << p.x <<
"\t" << p.y <<
"\t" << p.z <<
"\n";
76 fwrite (ss.str ().c_str (), 1, ss.str ().size (), fxyz);
79 assert ( fclose (fxyz) == 0 );
85 template<
typename Po
intT>
void 88 container_.insert (container_.end (), start, start + count);
93 template<
typename Po
intT>
void 102 container_.insert (container_.end (), temp.begin (), temp.end ());
107 template<
typename Po
intT>
void 112 memcpy (v.data (), container_.data () + start, count *
sizeof(
PointT));
117 template<
typename Po
intT>
void 120 const double percent,
125 std::lock_guard<std::mutex> lock (rng_mutex_);
127 std::uniform_int_distribution < std::uint64_t > buffdist (start, start + count);
132 v.push_back (container_[buffstart]);
141 #endif //PCL_OUTOFCORE_RAM_CONTAINER_IMPL_H_ void readRange(const std::uint64_t start, const std::uint64_t count, AlignedPointTVector &v)
typename OutofcoreAbstractNodeContainer< PointT >::AlignedPointTVector AlignedPointTVector
void insertRange(const PointT *start, const std::uint64_t count)
inserts count number of points into container; uses the container_ type's insert function ...
static std::mutex rng_mutex_
void convertToXYZ(const boost::filesystem::path &path)
Writes ascii x,y,z point data to path.string().c_str()
void readRangeSubSample(const std::uint64_t start, const std::uint64_t count, const double percent, AlignedPointTVector &v)
grab percent*count random points.
A point structure representing Euclidean xyz coordinates, and the RGB color.