Point Cloud Library (PCL)  1.9.1-dev
PCLImage.h
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <ostream>
6 
7 #ifdef USE_ROS
8  #error USE_ROS setup requires PCL to compile against ROS message headers, which is now deprecated
9 #endif
10 
11 // Include the correct Header path here
12 #include <pcl/PCLHeader.h>
13 
14 namespace pcl
15 {
16  struct PCLImage
17  {
18  PCLImage () : height (0), width (0),
19  is_bigendian (0), step (0)
20  {}
21 
23 
24  std::uint32_t height;
25  std::uint32_t width;
26  std::string encoding;
27 
28  std::uint8_t is_bigendian;
29  std::uint32_t step;
30 
31  std::vector<std::uint8_t> data;
32 
33  using Ptr = boost::shared_ptr< ::pcl::PCLImage>;
34  using ConstPtr = boost::shared_ptr<const ::pcl::PCLImage>;
35  }; // struct PCLImage
36 
37  using PCLImagePtr = boost::shared_ptr< ::pcl::PCLImage>;
38  using PCLImageConstPtr = boost::shared_ptr<const ::pcl::PCLImage>;
39 
40  inline std::ostream& operator<<(std::ostream& s, const ::pcl::PCLImage & v)
41  {
42  s << "header: " << std::endl;
43  s << v.header;
44  s << "height: ";
45  s << " " << v.height << std::endl;
46  s << "width: ";
47  s << " " << v.width << std::endl;
48  s << "encoding: ";
49  s << " " << v.encoding << std::endl;
50  s << "is_bigendian: ";
51  s << " " << v.is_bigendian << std::endl;
52  s << "step: ";
53  s << " " << v.step << std::endl;
54  s << "data[]" << std::endl;
55  for (std::size_t i = 0; i < v.data.size (); ++i)
56  {
57  s << " data[" << i << "]: ";
58  s << " " << v.data[i] << std::endl;
59  }
60  return (s);
61  }
62 } // namespace pcl
boost::shared_ptr< const ::pcl::PCLImage > PCLImageConstPtr
Definition: PCLImage.h:38
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
boost::shared_ptr< ::pcl::PCLImage > PCLImagePtr
Definition: PCLImage.h:37
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
std::uint32_t height
Definition: PCLImage.h:24
std::vector< std::uint8_t > data
Definition: PCLImage.h:31
boost::shared_ptr< ::pcl::PCLImage > Ptr
Definition: PCLImage.h:33
std::uint32_t width
Definition: PCLImage.h:25
boost::shared_ptr< const ::pcl::PCLImage > ConstPtr
Definition: PCLImage.h:34
std::string encoding
Definition: PCLImage.h:26
::pcl::PCLHeader header
Definition: PCLImage.h:22
std::uint8_t is_bigendian
Definition: PCLImage.h:28
std::uint32_t step
Definition: PCLImage.h:29