Interface for all publishers relating to images, point clouds or other stereo-camera data. More...
#include <genicam2ros_publisher.h>
Public Member Functions | |
void | clearNodemap () |
Clear nodemap. More... | |
GenICam2RosPublisher (const std::string &_frame_id) | |
virtual void | publish (const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat)=0 |
Offers a buffer for publication. More... | |
virtual void | requiresComponents (int &components, bool &color)=0 |
Adds components and if color images are required to the given values. More... | |
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 bool | used ()=0 |
Returns true if there are subscribers to the topic. More... | |
virtual | ~GenICam2RosPublisher () |
Static Public Attributes | |
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 | |
std::string | frame_id |
std::shared_ptr< GenApi::CNodeMapRef > | nodemap |
std::function< void()> | sub_callback |
Private Member Functions | |
GenICam2RosPublisher & | operator= (const GenICam2RosPublisher &) |
Interface for all publishers relating to images, point clouds or other stereo-camera data.
Definition at line 53 of file genicam2ros_publisher.h.
|
inline |
frame_id_prefix | prefix for frame ids in published ros messages |
Definition at line 70 of file genicam2ros_publisher.h.
|
inlinevirtual |
Definition at line 74 of file genicam2ros_publisher.h.
|
inline |
Clear nodemap.
Definition at line 91 of file genicam2ros_publisher.h.
|
private |
|
pure virtual |
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). |
Implemented in rc::CameraInfoPublisher, rc::DisparityColorPublisher, rc::DisparityPublisher, rc::ErrorDepthPublisher, rc::ErrorDisparityPublisher, rc::ImagePublisher, rc::Points2Publisher, rc::CameraParamPublisher, rc::ConfidencePublisher, and rc::DepthPublisher.
|
pure virtual |
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. |
Implemented in rc::CameraInfoPublisher, rc::DisparityColorPublisher, rc::DisparityPublisher, rc::ErrorDepthPublisher, rc::ErrorDisparityPublisher, rc::ImagePublisher, rc::Points2Publisher, rc::CameraParamPublisher, rc::ConfidencePublisher, and rc::DepthPublisher.
|
inline |
Set nodemap to be used.
Definition at line 82 of file genicam2ros_publisher.h.
|
inline |
Called by publisher if subscription changed.
Definition at line 133 of file genicam2ros_publisher.h.
|
inline |
Called by publisher if subscription changed.
Definition at line 145 of file genicam2ros_publisher.h.
|
pure virtual |
Returns true if there are subscribers to the topic.
Implemented in rc::CameraInfoPublisher, rc::DisparityColorPublisher, rc::DisparityPublisher, rc::ErrorDepthPublisher, rc::ErrorDisparityPublisher, rc::ImagePublisher, rc::Points2Publisher, rc::CameraParamPublisher, rc::ConfidencePublisher, and rc::DepthPublisher.
|
static |
Definition at line 63 of file genicam2ros_publisher.h.
|
static |
Definition at line 62 of file genicam2ros_publisher.h.
|
static |
Definition at line 64 of file genicam2ros_publisher.h.
|
static |
Definition at line 60 of file genicam2ros_publisher.h.
|
static |
Definition at line 61 of file genicam2ros_publisher.h.
|
protected |
Definition at line 154 of file genicam2ros_publisher.h.
|
protected |
Definition at line 156 of file genicam2ros_publisher.h.
|
protected |
Definition at line 155 of file genicam2ros_publisher.h.