55template<
typename Po
intT>
168 const char*
idxPointPtr =
reinterpret_cast<const char*
> (&(*inputCloud_arg)[idx]);
217 const char*
idxPointPtr =
reinterpret_cast<const char*
> (&(*inputCloud_arg)[idx]);
242 const char*
idxPointPtr =
reinterpret_cast<const char*
> (&(*inputCloud_arg)[idx]);
246 diffRed = (
static_cast<unsigned char> (
avgRed)) ^
static_cast<unsigned char> (((
colorInt >> 0) & 0xFF));
380template<
typename Po
intT>
388#define PCL_INSTANTIATE_ColorCoding(T) template class PCL_EXPORTS pcl::octree::ColorCoding<T>;
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
void decodePoints(PointCloudPtr outputCloud_arg, uindex_t beginIdx_arg, uindex_t endIdx_arg, unsigned char rgba_offset_arg)
Decode color information.
void encodeAverageOfPoints(const Indices &indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)
Encode averaged color information for a subset of points from point cloud.
void initializeDecoding()
Initialize decoding of color information.
void setDefaultColor(PointCloudPtr outputCloud_arg, std::size_t beginIdx_arg, std::size_t endIdx_arg, unsigned char rgba_offset_arg)
Set default color to points.
std::vector< char > pointDiffColorDataVector_
Vector for storing differential color information
std::vector< char > pointAvgColorDataVector_
Vector for storing average color information
std::vector< char >::const_iterator pointAvgColorDataVector_Iterator_
Iterator on average color information vector.
void initializeEncoding()
Initialize encoding of color information.
virtual ~ColorCoding()
Empty class constructor.
unsigned char colorBitReduction_
Amount of bits to be removed from color components before encoding.
unsigned char getBitDepth()
Retrieve color bit depth of encoded color information.
ColorCoding()
Constructor.
void encodePoints(const Indices &indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)
Encode color information of a subset of points from point cloud.
std::vector< char >::const_iterator pointDiffColorDataVector_Iterator_
Iterator on differential color information vector.
void setVoxelCount(unsigned int voxelCount_arg)
Set amount of voxels containing point color information and reserve memory.
static const int defaultColor_
std::vector< char > & getAverageDataVector()
Get reference to vector containing averaged color data.
void setBitDepth(unsigned char bitDepth_arg)
Define color bit depth of encoded color information.
void setPointCount(unsigned int pointCount_arg)
Set amount of points within point cloud to be encoded and reserve memory.
std::vector< char > & getDifferentialDataVector()
Get reference to vector containing differential color data.
PointCloudPtr output_
Pointer to output point cloud dataset.
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.