Class ImagePublisher
Defined in File image_publisher.hpp
Inheritance Relationships
Base Type
public rc::GenICam2RosPublisher
(Class GenICam2RosPublisher)
Class Documentation
-
class ImagePublisher : public rc::GenICam2RosPublisher
Public Functions
-
ImagePublisher(rclcpp::Node *node, const std::string &frame_id, bool left, bool color, bool out1_filter)
-
virtual bool used() override
Returns true if there are subscribers to the topic.
- Returns:
True if there are subscribers.
-
virtual void requiresComponents(int &components, bool &color) override
Adds components and if color images are required to the given values. Nothing will be changed if there are no subscribers, i.e. used() == false.
- Parameters:
components – Components Flags that will be updated according to the needs of this publisher.
color – Value that will be updated if this publisher needs color.
-
virtual void publish(const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat) override
Offers a buffer for publication. It depends on the the kind of buffer data and the implementation and configuration of the sub-class if the data is published.
- Parameters:
buffer – Buffer with data to be published. The buffer is already attached to the nodemap for accessing the chunk data.
part – Part index of image.
pixelformat – The pixelformat as given by buffer->getPixelFormat(part).
-
ImagePublisher(rclcpp::Node *node, const std::string &frame_id, bool left, bool color, bool out1_filter)