40#include <pcl/octree/octree2buf_base.h>
41#include <pcl/octree/octree_pointcloud.h>
42#include "entropy_range_coder.h"
43#include "color_coding.h"
44#include "point_coding.h"
46#include "compression_profiles.h"
300 template<
typename Po
intT,
typename LeafT,
typename BranchT,
typename OctreeT>
Iterator class for point clouds with or without given indices.
PointCloud represents the base class in PCL for storing collections of 3D points.
StaticRangeCoder compression class
Octree pointcloud compression class
void encodePointCloud(const PointCloudConstPtr &cloud_arg, std::ostream &compressed_tree_data_out_arg)
Encode point cloud to output stream.
std::uint64_t compressed_point_data_len_
std::size_t object_count_
void entropyEncoding(std::ostream &compressed_tree_data_out_arg)
Apply entropy encoding to encoded information and output to binary stream.
void syncToHeader(std::istream &compressed_tree_data_in_arg)
Synchronize to frame header.
std::uint64_t point_count_
ColorCoding< PointT > color_coder_
Color coding instance.
const compression_Profiles_e selected_profile_
static const char * frame_header_identifier_
void readFrameHeader(std::istream &compressed_tree_data_in_arg)
Read frame information to output stream.
std::vector< unsignedint >::const_iterator point_count_data_vector_iterator_
Iterator on points per voxel vector.
void writeFrameHeader(std::ostream &compressed_tree_data_out_arg)
Write frame information to output stream.
PointCoding< PointT > point_coder_
Point coding instance.
void addPointIdx(const uindex_t pointIdx_arg) override
Add point at index from input pointcloud dataset to octree.
typename OctreePointCloud< PointT, LeafT, BranchT, OctreeT >::PointCloud PointCloud
typename OctreeT::LeafNode LeafNode
StaticRangeCoder entropy_coder_
Static range coder instance.
typename OctreePointCloud< PointT, LeafT, BranchT, OctreeT >::PointCloudConstPtr PointCloudConstPtr
void setOutputCloud(const PointCloudPtr &cloud_arg)
Provide a pointer to the output data set.
void entropyDecoding(std::istream &compressed_tree_data_in_arg)
Entropy decoding of input binary stream and output to information vectors.
const double point_resolution_
void decodePointCloud(std::istream &compressed_tree_data_in_arg, PointCloudPtr &cloud_arg)
Decode point cloud from input stream.
void deserializeTreeCallback(LeafT &, const OctreeKey &key_arg) override
Decode leaf nodes information during deserialization.
PointCloudPtr getOutputCloud() const
Get a pointer to the output point cloud dataset.
OctreePointCloudCompression(compression_Profiles_e compressionProfile_arg=MED_RES_ONLINE_COMPRESSION_WITH_COLOR, bool showStatistics_arg=false, const double pointResolution_arg=0.001, const double octreeResolution_arg=0.01, bool doVoxelGridDownDownSampling_arg=false, const unsigned int iFrameRate_arg=30, bool doColorEncoding_arg=true, const unsigned char colorBitResolution_arg=6)
Constructor.
std::vector< char > binary_tree_data_vector_
Vector for storing binary tree structure.
const unsigned char color_bit_resolution_
void initialization()
Initialize globals.
std::uint64_t compressed_color_data_len_
std::uint32_t i_frame_counter_
PointCloudPtr output_
Pointer to output point cloud dataset.
std::vector< unsigned int > point_count_data_vector_
Vector for storing points per voxel information
std::uint32_t i_frame_rate_
bool do_voxel_grid_enDecoding_
unsigned char point_color_offset_
void serializeTreeCallback(LeafT &leaf_arg, const OctreeKey &key_arg) override
Encode leaf node information during serialization.
typename OctreePointCloud< PointT, LeafT, BranchT, OctreeT >::PointCloudPtr PointCloudPtr
const double octree_resolution_
~OctreePointCloudCompression()
Empty deconstructor.
typename OctreeT::BranchNode BranchNode
Octree double buffer class
OctreeBranchNode< BranchContainerT > BranchNode
OctreeLeafNode< LeafContainerT > LeafNode
Octree container class that does not store any information.
Octree container class that does store a vector of point indices.
typename PointCloud::Ptr PointCloudPtr
typename PointCloud::ConstPtr PointCloudConstPtr
virtual void addPointIdx(uindex_t point_idx_arg)
Add point at index from input pointcloud dataset to octree.
void setResolution(double resolution_arg)
Set/change the octree voxel resolution.
const struct configurationProfile_t compressionProfiles_[COMPRESSION_PROFILE_COUNT]
@ MED_RES_ONLINE_COMPRESSION_WITH_COLOR
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.
const double octreeResolution