Image.h
Go to the documentation of this file.00001 #ifndef PCL_MESSAGE_IMAGE_H
00002 #define PCL_MESSAGE_IMAGE_H
00003 #include <string>
00004 #include <vector>
00005 #include <ostream>
00006
00007
00008 #include "std_msgs/Header.h"
00009
00010 namespace sensor_msgs
00011 {
00012 struct Image
00013 {
00014 Image () : header (), height (0), width (0), encoding (),
00015 is_bigendian (0), step (0), data ()
00016 {}
00017
00018 ::std_msgs::Header header;
00019
00020 pcl::uint32_t height;
00021 pcl::uint32_t width;
00022 std::string encoding;
00023
00024 pcl::uint8_t is_bigendian;
00025 pcl::uint32_t step;
00026
00027 std::vector<pcl::uint8_t> data;
00028
00029 typedef boost::shared_ptr< ::sensor_msgs::Image> Ptr;
00030 typedef boost::shared_ptr< ::sensor_msgs::Image const> ConstPtr;
00031 };
00032
00033 typedef boost::shared_ptr< ::sensor_msgs::Image> ImagePtr;
00034 typedef boost::shared_ptr< ::sensor_msgs::Image const> ImageConstPtr;
00035
00036 inline std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::Image & v)
00037 {
00038 s << "header: " << std::endl;
00039 s << v.header;
00040 s << "height: ";
00041 s << " " << v.height << std::endl;
00042 s << "width: ";
00043 s << " " << v.width << std::endl;
00044 s << "encoding: ";
00045 s << " " << v.encoding << std::endl;
00046 s << "is_bigendian: ";
00047 s << " " << v.is_bigendian << std::endl;
00048 s << "step: ";
00049 s << " " << v.step << std::endl;
00050 s << "data[]" << std::endl;
00051 for (size_t i = 0; i < v.data.size (); ++i)
00052 {
00053 s << " data[" << i << "]: ";
00054 s << " " << v.data[i] << std::endl;
00055 }
00056 return (s);
00057 }
00058 }
00059
00060 #endif // PCL_MESSAGE_IMAGE_H
00061