halcon_image.h
Go to the documentation of this file.
1 
18 #include <sensor_msgs/Image.h>
19 #include <halconcpp/HalconCpp.h>
20 #include <stdexcept>
21 
22 namespace halcon_bridge {
23 
24  class Exception: public std::runtime_error {
25  public:
26  Exception(const std::string& description) :
27  std::runtime_error(description) {
28  }
29  };
30 
31 
32  class HalconImage;
33 
35 
41  class HalconImage {
42  public:
43  std_msgs::Header header;
44  std::string encoding;
45  HalconCpp::HImage *image;
46 
47  ~HalconImage();
48 
54  sensor_msgs::ImagePtr toImageMsg() const;
55 
62  void toImageMsg(sensor_msgs::Image& ros_image) const;
63  };
64 
65 
72  HalconImagePtr toHalconCopy(const sensor_msgs::ImageConstPtr& source);
73 
80  HalconImagePtr toHalconCopy(const sensor_msgs::Image& source);
81 
82 
83 
84 }
Exception(const std::string &description)
Definition: halcon_image.h:26
Image message class that is interoperable with sensor_msgs/Image but uses a HImage representation for...
Definition: halcon_image.h:41
HalconImagePtr toHalconCopy(const sensor_msgs::ImageConstPtr &source)
Convert a sensor_msgs::Image message to a Halcon-compatible HImage, copying the image data...
boost::shared_ptr< HalconImage > HalconImagePtr
Definition: halcon_image.h:32
std_msgs::Header header
Definition: halcon_image.h:43
HalconCpp::HImage * image
Definition: halcon_image.h:45


asr_halcon_bridge
Author(s): Allgeyer Tobias
autogenerated on Fri Jun 19 2020 03:54:32