Point Cloud Library (PCL)  1.7.0
PCLImage.h
1 #ifndef PCL_MESSAGE_IMAGE_H
2 #define PCL_MESSAGE_IMAGE_H
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 () : header (), height (0), width (0), encoding (),
19  is_bigendian (0), step (0), data ()
20  {}
21 
23 
24  pcl::uint32_t height;
25  pcl::uint32_t width;
26  std::string encoding;
27 
28  pcl::uint8_t is_bigendian;
29  pcl::uint32_t step;
30 
31  std::vector<pcl::uint8_t> data;
32 
33  typedef boost::shared_ptr< ::pcl::PCLImage> Ptr;
34  typedef boost::shared_ptr< ::pcl::PCLImage const> ConstPtr;
35  }; // struct PCLImage
36 
37  typedef boost::shared_ptr< ::pcl::PCLImage> PCLImagePtr;
38  typedef boost::shared_ptr< ::pcl::PCLImage const> PCLImageConstPtr;
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 (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
63 
64 #endif // PCL_MESSAGE_IMAGE_H
65