YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
ImagePort.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: LGPL-2.1-or-later
5
*/
6
7
#ifndef IMGPORT
8
#define IMGPORT
9
10
#include <
yarp/sig/Image.h
>
11
#include <
yarp/os/BufferedPort.h
>
12
#include <
yarp/os/PortReaderBuffer.h
>
13
#include <
yarp/os/Time.h
>
14
#include <
yarp/conf/numeric.h
>
15
16
#include <string>
17
18
#include <QObject>
19
#include <QVideoFrame>
20
#include "
signalhandler.h
"
21
26
#ifdef YARP_LITTLE_ENDIAN
27
class
InputCallback
:
public
QObject,
public
yarp::os::TypedReaderCallback
<yarp::sig::ImageOf<yarp::sig::PixelBgra> >
28
#else
29
class
InputCallback
:
public
QObject,
public
yarp::os::TypedReaderCallback
<yarp::sig::ImageOf<yarp::sig::PixelRgb> >
30
#endif
31
{
32
33
public
:
34
InputCallback
();
35
~InputCallback
();
36
void
setSignalHandler
(
SignalHandler
*);
37
38
#ifdef YARP_LITTLE_ENDIAN
39
using
yarp::os::TypedReaderCallback
<
yarp::sig::ImageOf<yarp::sig::PixelBgra>
>
::onRead
;
40
void
onRead
(
yarp::sig::ImageOf<yarp::sig::PixelBgra>
&img)
override
;
41
#else
42
using
yarp::os::TypedReaderCallback
<
yarp::sig::ImageOf<yarp::sig::PixelRgb>
>
::onRead
;
43
void
onRead
(
yarp::sig::ImageOf<yarp::sig::PixelRgba>
&img)
override
;
44
#endif
45
46
private
:
47
int
counter;
48
SignalHandler
*sigHandler;
49
};
50
51
#endif
BufferedPort.h
Image.h
PortReaderBuffer.h
Time.h
InputCallback
This class is a callback class that receives the video frame from the YARP backend.
Definition
ImagePort.h:31
InputCallback::onRead
void onRead(yarp::sig::ImageOf< yarp::sig::PixelBgra > &img) override
the function callback
Definition
ImagePort.cpp:30
InputCallback::InputCallback
InputCallback()
Definition
ImagePort.cpp:18
InputCallback::~InputCallback
~InputCallback()
Definition
InputCallback.cpp:44
InputCallback::setSignalHandler
void setSignalHandler(SignalHandler *)
sets the signalhandler to the class
Definition
ImagePort.cpp:84
SignalHandler
The class that handles some signals.
Definition
signalhandler.h:23
yarp::os::BufferedPort< ImageType >::BufferedPort
BufferedPort()
Constructor.
Definition
BufferedPort-inl.h:14
yarp::os::TypedReaderCallback
A callback for typed data from a port.
Definition
TypedReaderCallback.h:27
yarp::sig::ImageOf
Typed image class.
Definition
Image.h:605
numeric.h
signalhandler.h
YARP
3.12.0
src
guis
yarpview
plugin
ImagePort.h
Generated on Tue Jul 1 2025 14:56:29 for YARP by
1.9.8