Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT > Class Template Reference

Octree pointcloud compression class More...

#include <pcl/compression/octree_pointcloud_compression.h>

Inheritance diagram for pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef OctreePointCloud
< PointT, LeafT, OctreeT >
::PointCloud 
PointCloud
typedef OctreePointCloud
< PointT, LeafT, OctreeT >
::PointCloudPtr 
PointCloudPtr
typedef OctreePointCloud
< PointT, LeafT, OctreeT >
::PointCloudConstPtr 
PointCloudConstPtr
typedef OctreePointCloud
< PointT, LeafT, OctreeT >
::OctreeKey 
OctreeKey
typedef OctreeT::OctreeLeaf OctreeLeaf
typedef PointCloudCompression
< PointT, LeafT,
Octree2BufBase< int, LeafT > > 
RealTimeStreamCompression
typedef PointCloudCompression
< PointT, LeafT,
OctreeLowMemBase< int, LeafT > > 
SinglePointCloudCompressionLowMemory

Public Member Functions

 PointCloudCompression (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.
virtual ~PointCloudCompression ()
 Empty deconstructor.
void setOutputCloud (const PointCloudPtr &cloud_arg)
 Provide a pointer to the output data set.
PointCloudPtr getOutputCloud ()
 Get a pointer to the output point cloud dataset.
void encodePointCloud (const PointCloudConstPtr &cloud_arg, std::ostream &compressedTreeDataOut_arg)
 Encode point cloud to output stream.
void decodePointCloud (std::istream &compressedTreeDataIn_arg, PointCloudPtr &cloud_arg)
 Decode point cloud from input stream.

Protected Member Functions

void writeFrameHeader (std::ostream &compressedTreeDataOut_arg)
 Write frame information to output stream.
void readFrameHeader (std::istream &compressedTreeDataIn_arg)
 Read frame information to output stream.
void entropyEncoding (std::ostream &compressedTreeDataOut_arg)
 Apply entropy encoding to encoded information and output to binary stream.
void entropyDecoding (std::istream &compressedTreeDataIn_arg)
 Entropy decoding of input binary stream and output to information vectors.
virtual void serializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg)
 Encode leaf node information during serialization.
virtual void deserializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg)
 Decode leaf nodes information during deserialization.

Protected Attributes

PointCloudPtr output_
 Pointer to output point cloud dataset.
std::vector< char > binaryTreeDataVector_
 Vector for storing binary tree structure.
std::vector< char > binaryColorTreeVector_
 Interator on binary tree structure vector.
std::vector< unsigned int > pointCountDataVector_
 Vector for storing points per voxel information.
std::vector< unsigned int >
::const_iterator 
pointCountDataVectorIterator_
 Interator on points per voxel vector.
ColorCoding< PointT > colorCoder_
 Color coding instance.
PointCoding< PointT > pointCoder_
 Point coding instance.
StaticRangeCoder entropyCoder_
 Static range coder instance.
bool doVoxelGridEnDecoding_
unsigned int iFrameRate_
unsigned int iFrameCounter_
unsigned int frameID_
unsigned long pointCount_
bool iFrame_
bool doColorEncoding_
bool cloudWithColor_
bool dataWithColor_
unsigned char pointColorOffset_
bool bShowStatistics
unsigned long compressedPointDataLen_
unsigned long compressedColorDataLen_

Static Protected Attributes

static const char * frameHeaderIdentifier_ = "<PCL-COMPRESSED>"

Detailed Description

template<typename PointT, typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
class pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >

Octree pointcloud compression class

Note:
This class enables compression and decompression of point cloud data based on octree data structures.
typename: PointT: type of point used in pointcloud
Author:
Julius Kammerl (julius@kammerl.de)

Definition at line 61 of file octree_pointcloud_compression.h.


Member Typedef Documentation

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef OctreePointCloud<PointT, LeafT, OctreeT>::OctreeKey pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::OctreeKey
template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef OctreeT::OctreeLeaf pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::OctreeLeaf
template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef OctreePointCloud<PointT, LeafT, OctreeT>::PointCloud pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::PointCloud
template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef OctreePointCloud<PointT, LeafT, OctreeT>::PointCloudConstPtr pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::PointCloudConstPtr
template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef OctreePointCloud<PointT, LeafT, OctreeT>::PointCloudPtr pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::PointCloudPtr
template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef PointCloudCompression<PointT, LeafT, Octree2BufBase<int, LeafT> > pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::RealTimeStreamCompression

Definition at line 74 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
typedef PointCloudCompression<PointT, LeafT, OctreeLowMemBase<int, LeafT> > pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::SinglePointCloudCompressionLowMemory

Definition at line 75 of file octree_pointcloud_compression.h.


Constructor & Destructor Documentation

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::PointCloudCompression ( 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 
) [inline]

Constructor.

Parameters:
compressionProfile_arg,: define compression profile
octreeResolution_arg,: octree resolution at lowest octree level
pointResolution_arg,: precision of point coordinates
doVoxelGridDownDownSampling_arg,: voxel grid filtering
iFrameRate_arg,: i-frame encoding rate
doColorEncoding_arg,: enable/disable color coding
colorBitResolution_arg,: color bit depth
showStatistics_arg,: output compression statistics

Definition at line 87 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
virtual pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::~PointCloudCompression (  )  [inline, virtual]

Empty deconstructor.

Definition at line 137 of file octree_pointcloud_compression.h.


Member Function Documentation

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::decodePointCloud ( std::istream &  compressedTreeDataIn_arg,
PointCloudPtr cloud_arg 
)

Decode point cloud from input stream.

Parameters:
compressedTreeDataIn_arg,: binary input stream containing compressed data
cloud_arg,: reference to decoded point cloud

Definition at line 175 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::deserializeLeafCallback ( OctreeLeaf leaf_arg,
const OctreeKey key_arg 
) [protected, virtual]

Decode leaf nodes information during deserialization.

Parameters:
leaf_arg,: reference to new leaf node
key_arg,: octree key of new leaf node

Definition at line 544 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::encodePointCloud ( const PointCloudConstPtr cloud_arg,
std::ostream &  compressedTreeDataOut_arg 
)

Encode point cloud to output stream.

Parameters:
cloud_arg,: point cloud to be compressed
compressedTreeDataOut_arg,: binary output stream containing compressed data

Definition at line 60 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::entropyDecoding ( std::istream &  compressedTreeDataIn_arg  )  [protected]

Entropy decoding of input binary stream and output to information vectors.

Parameters:
compressedTreeDataIn_arg,: binary input stream

Definition at line 330 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::entropyEncoding ( std::ostream &  compressedTreeDataOut_arg  )  [protected]

Apply entropy encoding to encoded information and output to binary stream.

Parameters:
compressedTreeDataOut_arg,: binary output stream

Definition at line 266 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
PointCloudPtr pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::getOutputCloud (  )  [inline]

Get a pointer to the output point cloud dataset.

Returns:
pointer to pointcloud output class.

Definition at line 157 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::readFrameHeader ( std::istream &  compressedTreeDataIn_arg  )  [protected]

Read frame information to output stream.

Parameters:
compressedTreeDataIn_arg,: binary input stream

Definition at line 444 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::serializeLeafCallback ( OctreeLeaf leaf_arg,
const OctreeKey key_arg 
) [protected, virtual]

Encode leaf node information during serialization.

Parameters:
leaf_arg,: reference to new leaf node
key_arg,: octree key of new leaf node

Definition at line 502 of file octree_pointcloud_compression.hpp.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::setOutputCloud ( const PointCloudPtr cloud_arg  )  [inline]

Provide a pointer to the output data set.

Parameters:
cloud_arg,: the boost shared pointer to a PointCloud message

Definition at line 145 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT , typename OctreeT >
void pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::writeFrameHeader ( std::ostream &  compressedTreeDataOut_arg  )  [protected]

Write frame information to output stream.

Parameters:
compressedTreeDataOut_arg,: binary output stream

Definition at line 390 of file octree_pointcloud_compression.hpp.


Member Data Documentation

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
std::vector<char> pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::binaryColorTreeVector_ [protected]

Interator on binary tree structure vector.

Definition at line 223 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
std::vector<char> pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::binaryTreeDataVector_ [protected]

Vector for storing binary tree structure.

Definition at line 220 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::bShowStatistics [protected]

Definition at line 253 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::cloudWithColor_ [protected]

Definition at line 248 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
ColorCoding<PointT> pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::colorCoder_ [protected]

Color coding instance.

Definition at line 232 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned long pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::compressedColorDataLen_ [protected]

Definition at line 255 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned long pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::compressedPointDataLen_ [protected]

Definition at line 254 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::dataWithColor_ [protected]

Definition at line 249 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::doColorEncoding_ [protected]

Definition at line 247 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::doVoxelGridEnDecoding_ [protected]

Definition at line 240 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
StaticRangeCoder pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::entropyCoder_ [protected]

Static range coder instance.

Definition at line 238 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
const char * pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::frameHeaderIdentifier_ = "<PCL-COMPRESSED>" [static, protected]

Definition at line 258 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned int pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::frameID_ [protected]

Definition at line 243 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
bool pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::iFrame_ [protected]

Definition at line 245 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned int pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::iFrameCounter_ [protected]

Definition at line 242 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned int pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::iFrameRate_ [protected]

Definition at line 241 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
PointCloudPtr pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::output_ [protected]

Pointer to output point cloud dataset.

Definition at line 217 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
PointCoding<PointT> pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::pointCoder_ [protected]

Point coding instance.

Definition at line 235 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned char pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::pointColorOffset_ [protected]

Definition at line 250 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
unsigned long pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::pointCount_ [protected]

Definition at line 244 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
std::vector<unsigned int> pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::pointCountDataVector_ [protected]

Vector for storing points per voxel information.

Definition at line 226 of file octree_pointcloud_compression.h.

template<typename PointT , typename LeafT = OctreeLeafDataTVector<int>, typename OctreeT = Octree2BufBase<int, OctreeLeafDataTVector<int> >>
std::vector<unsigned int>::const_iterator pcl::octree::PointCloudCompression< PointT, LeafT, OctreeT >::pointCountDataVectorIterator_ [protected]

Interator on points per voxel vector.

Definition at line 229 of file octree_pointcloud_compression.h.


The documentation for this class was generated from the following files: