53 template<
typename Po
intT>
129 encodePoints (
const typename std::vector<int>& indexVector_arg,
const double* referencePoint_arg,
130 PointCloudConstPtr inputCloud_arg)
132 std::size_t len = indexVector_arg.size ();
135 for (std::size_t i = 0; i < len; i++)
137 unsigned char diffX, diffY, diffZ;
140 const int& idx = indexVector_arg[i];
141 const PointT& idxPoint = (*inputCloud_arg)[idx];
144 diffX =
static_cast<unsigned char> (std::max (-127, std::min<int>(127,
static_cast<int> ((idxPoint.x - referencePoint_arg[0]) /
pointCompressionResolution_))));
145 diffY =
static_cast<unsigned char> (std::max (-127, std::min<int>(127,
static_cast<int> ((idxPoint.y - referencePoint_arg[1]) /
pointCompressionResolution_))));
146 diffZ =
static_cast<unsigned char> (std::max (-127, std::min<int>(127,
static_cast<int> ((idxPoint.z - referencePoint_arg[2]) /
pointCompressionResolution_))));
162 decodePoints (PointCloudPtr outputCloud_arg,
const double* referencePoint_arg, std::size_t beginIdx_arg,
163 std::size_t endIdx_arg)
165 assert (beginIdx_arg <= endIdx_arg);
167 unsigned int pointCount =
static_cast<unsigned int> (endIdx_arg - beginIdx_arg);
170 for (std::size_t i = 0; i < pointCount; i++)
178 PointT& point = (*outputCloud_arg)[beginIdx_arg + i];
204 #define PCL_INSTANTIATE_ColorCoding(T) template class PCL_EXPORTS pcl::octree::ColorCoding<T>;