YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImageColorKey.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026-2026 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_SIG_IMAGE_COLORKEY_H
7#define YARP_SIG_IMAGE_COLORKEY_H
8
9#include <yarp/sig/Image.h>
11
12namespace yarp::sig {
13
15{
16 public:
17 //default constructor
18 ImageColorKey() = default;
19
20 void setValueAsPixelRgb(yarp::sig::PixelRgb v)
21 {
22 value = *reinterpret_cast<int*>(&v);
23 }
24 yarp::sig::PixelRgb getValueAsPixelRgb()
25 {
26 return *reinterpret_cast<yarp::sig::PixelRgb*>(&value);
27 }
28};
29} // namespace yarp::sig
30
31#endif // YARP_SIG_IMAGE_H
yarp::sig::PixelRgb getValueAsPixelRgb()
void setValueAsPixelRgb(yarp::sig::PixelRgb v)
#define YARP_sig_API
Definition api.h:18