00001
00002 #ifndef COB_OBJECT_DETECTION_MSGS_MESSAGE_MASK_H
00003 #define COB_OBJECT_DETECTION_MSGS_MESSAGE_MASK_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "cob_object_detection_msgs/Rect.h"
00018 #include "sensor_msgs/Image.h"
00019
00020 namespace cob_object_detection_msgs
00021 {
00022 template <class ContainerAllocator>
00023 struct Mask_ {
00024 typedef Mask_<ContainerAllocator> Type;
00025
00026 Mask_()
00027 : roi()
00028 , mask()
00029 {
00030 }
00031
00032 Mask_(const ContainerAllocator& _alloc)
00033 : roi(_alloc)
00034 , mask(_alloc)
00035 {
00036 }
00037
00038 typedef ::cob_object_detection_msgs::Rect_<ContainerAllocator> _roi_type;
00039 ::cob_object_detection_msgs::Rect_<ContainerAllocator> roi;
00040
00041 typedef ::sensor_msgs::Image_<ContainerAllocator> _mask_type;
00042 ::sensor_msgs::Image_<ContainerAllocator> mask;
00043
00044
00045 private:
00046 static const char* __s_getDataType_() { return "cob_object_detection_msgs/Mask"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00049
00050 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00051
00052 private:
00053 static const char* __s_getMD5Sum_() { return "e1240778c6320b394ae629a7eb8c26ba"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00056
00057 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00058
00059 private:
00060 static const char* __s_getMessageDefinition_() { return "# this message is used to mark where an object is present in an image\n\
00061 # this can be done either by a roi region on the image (less precise) or a mask (more precise)\n\
00062 \n\
00063 Rect roi\n\
00064 \n\
00065 # in the case when mask is used, 'roi' specifies the image region and 'mask'\n\
00066 # (which should be of the same size) a binary mask in that region\n\
00067 sensor_msgs/Image mask\n\
00068 \n\
00069 # in the case there is 3D data available, 'indices' are used to index the \n\
00070 # part of the point cloud representing the object\n\
00071 #pcl/PointIndices indices\n\
00072 \n\
00073 ================================================================================\n\
00074 MSG: cob_object_detection_msgs/Rect\n\
00075 int32 x\n\
00076 int32 y\n\
00077 int32 width\n\
00078 int32 height\n\
00079 \n\
00080 ================================================================================\n\
00081 MSG: sensor_msgs/Image\n\
00082 # This message contains an uncompressed image\n\
00083 # (0, 0) is at top-left corner of image\n\
00084 #\n\
00085 \n\
00086 Header header # Header timestamp should be acquisition time of image\n\
00087 # Header frame_id should be optical frame of camera\n\
00088 # origin of frame should be optical center of cameara\n\
00089 # +x should point to the right in the image\n\
00090 # +y should point down in the image\n\
00091 # +z should point into to plane of the image\n\
00092 # If the frame_id here and the frame_id of the CameraInfo\n\
00093 # message associated with the image conflict\n\
00094 # the behavior is undefined\n\
00095 \n\
00096 uint32 height # image height, that is, number of rows\n\
00097 uint32 width # image width, that is, number of columns\n\
00098 \n\
00099 # The legal values for encoding are in file src/image_encodings.cpp\n\
00100 # If you want to standardize a new string format, join\n\
00101 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.\n\
00102 \n\
00103 string encoding # Encoding of pixels -- channel meaning, ordering, size\n\
00104 # taken from the list of strings in src/image_encodings.cpp\n\
00105 \n\
00106 uint8 is_bigendian # is this data bigendian?\n\
00107 uint32 step # Full row length in bytes\n\
00108 uint8[] data # actual matrix data, size is (step * rows)\n\
00109 \n\
00110 ================================================================================\n\
00111 MSG: std_msgs/Header\n\
00112 # Standard metadata for higher-level stamped data types.\n\
00113 # This is generally used to communicate timestamped data \n\
00114 # in a particular coordinate frame.\n\
00115 # \n\
00116 # sequence ID: consecutively increasing ID \n\
00117 uint32 seq\n\
00118 #Two-integer timestamp that is expressed as:\n\
00119 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00120 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00121 # time-handling sugar is provided by the client library\n\
00122 time stamp\n\
00123 #Frame this data is associated with\n\
00124 # 0: no frame\n\
00125 # 1: global frame\n\
00126 string frame_id\n\
00127 \n\
00128 "; }
00129 public:
00130 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00131
00132 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00133
00134 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00135 {
00136 ros::serialization::OStream stream(write_ptr, 1000000000);
00137 ros::serialization::serialize(stream, roi);
00138 ros::serialization::serialize(stream, mask);
00139 return stream.getData();
00140 }
00141
00142 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00143 {
00144 ros::serialization::IStream stream(read_ptr, 1000000000);
00145 ros::serialization::deserialize(stream, roi);
00146 ros::serialization::deserialize(stream, mask);
00147 return stream.getData();
00148 }
00149
00150 ROS_DEPRECATED virtual uint32_t serializationLength() const
00151 {
00152 uint32_t size = 0;
00153 size += ros::serialization::serializationLength(roi);
00154 size += ros::serialization::serializationLength(mask);
00155 return size;
00156 }
00157
00158 typedef boost::shared_ptr< ::cob_object_detection_msgs::Mask_<ContainerAllocator> > Ptr;
00159 typedef boost::shared_ptr< ::cob_object_detection_msgs::Mask_<ContainerAllocator> const> ConstPtr;
00160 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00161 };
00162 typedef ::cob_object_detection_msgs::Mask_<std::allocator<void> > Mask;
00163
00164 typedef boost::shared_ptr< ::cob_object_detection_msgs::Mask> MaskPtr;
00165 typedef boost::shared_ptr< ::cob_object_detection_msgs::Mask const> MaskConstPtr;
00166
00167
00168 template<typename ContainerAllocator>
00169 std::ostream& operator<<(std::ostream& s, const ::cob_object_detection_msgs::Mask_<ContainerAllocator> & v)
00170 {
00171 ros::message_operations::Printer< ::cob_object_detection_msgs::Mask_<ContainerAllocator> >::stream(s, "", v);
00172 return s;}
00173
00174 }
00175
00176 namespace ros
00177 {
00178 namespace message_traits
00179 {
00180 template<class ContainerAllocator> struct IsMessage< ::cob_object_detection_msgs::Mask_<ContainerAllocator> > : public TrueType {};
00181 template<class ContainerAllocator> struct IsMessage< ::cob_object_detection_msgs::Mask_<ContainerAllocator> const> : public TrueType {};
00182 template<class ContainerAllocator>
00183 struct MD5Sum< ::cob_object_detection_msgs::Mask_<ContainerAllocator> > {
00184 static const char* value()
00185 {
00186 return "e1240778c6320b394ae629a7eb8c26ba";
00187 }
00188
00189 static const char* value(const ::cob_object_detection_msgs::Mask_<ContainerAllocator> &) { return value(); }
00190 static const uint64_t static_value1 = 0xe1240778c6320b39ULL;
00191 static const uint64_t static_value2 = 0x4ae629a7eb8c26baULL;
00192 };
00193
00194 template<class ContainerAllocator>
00195 struct DataType< ::cob_object_detection_msgs::Mask_<ContainerAllocator> > {
00196 static const char* value()
00197 {
00198 return "cob_object_detection_msgs/Mask";
00199 }
00200
00201 static const char* value(const ::cob_object_detection_msgs::Mask_<ContainerAllocator> &) { return value(); }
00202 };
00203
00204 template<class ContainerAllocator>
00205 struct Definition< ::cob_object_detection_msgs::Mask_<ContainerAllocator> > {
00206 static const char* value()
00207 {
00208 return "# this message is used to mark where an object is present in an image\n\
00209 # this can be done either by a roi region on the image (less precise) or a mask (more precise)\n\
00210 \n\
00211 Rect roi\n\
00212 \n\
00213 # in the case when mask is used, 'roi' specifies the image region and 'mask'\n\
00214 # (which should be of the same size) a binary mask in that region\n\
00215 sensor_msgs/Image mask\n\
00216 \n\
00217 # in the case there is 3D data available, 'indices' are used to index the \n\
00218 # part of the point cloud representing the object\n\
00219 #pcl/PointIndices indices\n\
00220 \n\
00221 ================================================================================\n\
00222 MSG: cob_object_detection_msgs/Rect\n\
00223 int32 x\n\
00224 int32 y\n\
00225 int32 width\n\
00226 int32 height\n\
00227 \n\
00228 ================================================================================\n\
00229 MSG: sensor_msgs/Image\n\
00230 # This message contains an uncompressed image\n\
00231 # (0, 0) is at top-left corner of image\n\
00232 #\n\
00233 \n\
00234 Header header # Header timestamp should be acquisition time of image\n\
00235 # Header frame_id should be optical frame of camera\n\
00236 # origin of frame should be optical center of cameara\n\
00237 # +x should point to the right in the image\n\
00238 # +y should point down in the image\n\
00239 # +z should point into to plane of the image\n\
00240 # If the frame_id here and the frame_id of the CameraInfo\n\
00241 # message associated with the image conflict\n\
00242 # the behavior is undefined\n\
00243 \n\
00244 uint32 height # image height, that is, number of rows\n\
00245 uint32 width # image width, that is, number of columns\n\
00246 \n\
00247 # The legal values for encoding are in file src/image_encodings.cpp\n\
00248 # If you want to standardize a new string format, join\n\
00249 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.\n\
00250 \n\
00251 string encoding # Encoding of pixels -- channel meaning, ordering, size\n\
00252 # taken from the list of strings in src/image_encodings.cpp\n\
00253 \n\
00254 uint8 is_bigendian # is this data bigendian?\n\
00255 uint32 step # Full row length in bytes\n\
00256 uint8[] data # actual matrix data, size is (step * rows)\n\
00257 \n\
00258 ================================================================================\n\
00259 MSG: std_msgs/Header\n\
00260 # Standard metadata for higher-level stamped data types.\n\
00261 # This is generally used to communicate timestamped data \n\
00262 # in a particular coordinate frame.\n\
00263 # \n\
00264 # sequence ID: consecutively increasing ID \n\
00265 uint32 seq\n\
00266 #Two-integer timestamp that is expressed as:\n\
00267 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00268 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00269 # time-handling sugar is provided by the client library\n\
00270 time stamp\n\
00271 #Frame this data is associated with\n\
00272 # 0: no frame\n\
00273 # 1: global frame\n\
00274 string frame_id\n\
00275 \n\
00276 ";
00277 }
00278
00279 static const char* value(const ::cob_object_detection_msgs::Mask_<ContainerAllocator> &) { return value(); }
00280 };
00281
00282 }
00283 }
00284
00285 namespace ros
00286 {
00287 namespace serialization
00288 {
00289
00290 template<class ContainerAllocator> struct Serializer< ::cob_object_detection_msgs::Mask_<ContainerAllocator> >
00291 {
00292 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00293 {
00294 stream.next(m.roi);
00295 stream.next(m.mask);
00296 }
00297
00298 ROS_DECLARE_ALLINONE_SERIALIZER;
00299 };
00300 }
00301 }
00302
00303 namespace ros
00304 {
00305 namespace message_operations
00306 {
00307
00308 template<class ContainerAllocator>
00309 struct Printer< ::cob_object_detection_msgs::Mask_<ContainerAllocator> >
00310 {
00311 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cob_object_detection_msgs::Mask_<ContainerAllocator> & v)
00312 {
00313 s << indent << "roi: ";
00314 s << std::endl;
00315 Printer< ::cob_object_detection_msgs::Rect_<ContainerAllocator> >::stream(s, indent + " ", v.roi);
00316 s << indent << "mask: ";
00317 s << std::endl;
00318 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.mask);
00319 }
00320 };
00321
00322
00323 }
00324 }
00325
00326 #endif // COB_OBJECT_DETECTION_MSGS_MESSAGE_MASK_H
00327