18 #ifndef GZ_SENSORS_SEGMENTATIONCAMERASENSOR_HH_
19 #define GZ_SENSORS_SEGMENTATIONCAMERASENSOR_HH_
24 #include <gz/msgs/image.pb.h>
26 #include <gz/common/Event.hh>
27 #include <gz/utils/SuppressWarning.hh>
28 #include <gz/transport/Node.hh>
29 #include <gz/transport/Publisher.hh>
33 #include "gz/sensors/Export.hh"
36 #include "gz/sensors/segmentation_camera/Export.hh"
43 inline namespace GZ_SENSORS_VERSION_NAMESPACE {
45 class SegmentationCameraSensorPrivate;
54 class GZ_SENSORS_SEGMENTATION_CAMERA_VISIBLE
66 public:
virtual bool Load(
const sdf::Sensor &_sdf)
override;
71 public:
virtual bool Load(sdf::ElementPtr _sdf)
override;
75 public:
virtual bool Init()
override;
80 public:
virtual bool Update(
81 const std::chrono::steady_clock::duration &_now)
override;
85 public: rendering::SegmentationCameraPtr SegmentationCamera()
const;
93 public:
void OnNewSegmentationFrame(
const uint8_t * _data,
94 unsigned int _width,
unsigned int _height,
unsigned int _channels,
105 public: gz::common::ConnectionPtr ConnectImageCallback(
110 public:
virtual void SetScene(
111 gz::rendering::ScenePtr _scene)
override;
115 public:
virtual unsigned int ImageWidth()
const override;
119 public:
virtual unsigned int ImageHeight()
const override;
122 public:
virtual bool HasConnections()
const override;
126 private:
bool CreateCamera();
128 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
132 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING