#include <image_publisher.h>
Public Member Functions | |
ImagePublisher (image_transport::ImageTransport &it, const std::string &frame_id, bool left, bool color, bool out1_filter, std::function< void()> &sub_changed) | |
void | publish (const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat) override |
Offers a buffer for publication. More... | |
void | requiresComponents (int &components, bool &color) override |
Adds components and if color images are required to the given values. More... | |
bool | used () override |
Returns true if there are subscribers to the topic. More... | |
Public Member Functions inherited from rc::GenICam2RosPublisher | |
void | clearNodemap () |
Clear nodemap. More... | |
GenICam2RosPublisher (const std::string &_frame_id) | |
void | setNodemap (const std::shared_ptr< GenApi::CNodeMapRef > &_nodemap) |
Set nodemap to be used. More... | |
void | subChanged (const ros::SingleSubscriberPublisher &pub) |
Called by publisher if subscription changed. More... | |
void | subChangedIt (const image_transport::SingleSubscriberPublisher &pub) |
Called by publisher if subscription changed. More... | |
virtual | ~GenICam2RosPublisher () |
Private Member Functions | |
ImagePublisher (const ImagePublisher &) | |
ImagePublisher & | operator= (const ImagePublisher &) |
Private Attributes | |
bool | color |
bool | left |
image_transport::Publisher | pub |
image_transport::Publisher | pub_out1_high |
image_transport::Publisher | pub_out1_low |
Additional Inherited Members | |
Static Public Attributes inherited from rc::GenICam2RosPublisher | |
static const int | ComponentConfidence = 8 |
static const int | ComponentDisparity = 4 |
static const int | ComponentError = 16 |
static const int | ComponentIntensity = 1 |
static const int | ComponentIntensityCombined = 2 |
Protected Attributes inherited from rc::GenICam2RosPublisher | |
std::string | frame_id |
std::shared_ptr< GenApi::CNodeMapRef > | nodemap |
std::function< void()> | sub_callback |
Definition at line 45 of file image_publisher.h.
rc::ImagePublisher::ImagePublisher | ( | image_transport::ImageTransport & | it, |
const std::string & | frame_id, | ||
bool | left, | ||
bool | color, | ||
bool | out1_filter, | ||
std::function< void()> & | sub_changed | ||
) |
Definition at line 44 of file image_publisher.cpp.
|
private |
|
private |
|
overridevirtual |
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.
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). |
Implements rc::GenICam2RosPublisher.
Definition at line 105 of file image_publisher.cpp.
|
overridevirtual |
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.
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. |
Implements rc::GenICam2RosPublisher.
Definition at line 87 of file image_publisher.cpp.
|
overridevirtual |
Returns true if there are subscribers to the topic.
Implements rc::GenICam2RosPublisher.
Definition at line 82 of file image_publisher.cpp.
|
private |
Definition at line 61 of file image_publisher.h.
|
private |
Definition at line 60 of file image_publisher.h.
|
private |
Definition at line 63 of file image_publisher.h.
|
private |
Definition at line 65 of file image_publisher.h.
|
private |
Definition at line 64 of file image_publisher.h.