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 ())
66 std::uint64_t
num = size ();
67 for (std::uint64_t i = 0; i <
num; i++)
69 const PointT& p = container_[i];
74 ss << p.x <<
"\t" << p.y <<
"\t" << p.z <<
"\n";
85 template<
typename Po
intT>
void
88 container_.insert (container_.end (), start, start + count);
93 template<
typename Po
intT>
void
98 for (std::uint64_t i = 0; i < count; i++)
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
119 const std::uint64_t count,
123 std::uint64_t
samplesize =
static_cast<std::uint64_t
> (
percent *
static_cast<double> (count));
125 std::lock_guard<std::mutex> lock (rng_mutex_);
127 std::uniform_int_distribution < std::uint64_t >
buffdist (start, start + count);
129 for (std::uint64_t i = 0; i <
samplesize; i++)
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
void readRange(const std::uint64_t start, const std::uint64_t count, AlignedPointTVector &v)
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.
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_
typename OutofcoreAbstractNodeContainer< PointT >::AlignedPointTVector AlignedPointTVector
A point structure representing Euclidean xyz coordinates, and the RGB color.