ifw-fgf 2.0.0
 
Loading...
Searching...
No Matches
rawImage.hpp
Go to the documentation of this file.
1
8
9#ifndef FGF_COM_RAWIMAGE_HPP_H_
10#define FGF_COM_RAWIMAGE_HPP_H_
11
12#define BOOST_BIND_NO_PLACEHOLDERS
13
14namespace ifw::fgf::common {
15
22 class RawImage {
23
24 public:
30 RawImage(int width, int height, int bpp);
31 RawImage(int width, int height, int bpp, unsigned char* image);
32
33 // Disable copy constructor and assignment
34 RawImage(const RawImage&) = delete;
36 virtual ~RawImage();
37
39 int GetWidth();
40
42 int GetHeight();
43
45 int GetBpp();
46
52 int GetSize();
53
59 unsigned char* GetImage();
60
61 double GetTimestamp();
62
63 void SetTimestamp(const double& timestamp);
64
65 private:
66 bool m_wrapper{false};
67 int m_width{0};
68 int m_height{0};
69 double m_timestamp{0};
70
71 // Bytes per pixel will be deduced from the data type
72 int m_bpp{0};
73 int m_sample{0};
74 unsigned char* m_image{nullptr};
75
76 };
77
78}
79
80#endif // FGF_COM_RAWIMAGE_HPP_H_
int GetBpp()
Get image bytes per pixel.
Definition rawImage.cpp:40
double GetTimestamp()
Definition rawImage.cpp:52
int GetHeight()
Get image height.
Definition rawImage.cpp:36
int GetSize()
Get image size.
Definition rawImage.cpp:44
unsigned char * GetImage()
Get a pointer to the image data.
Definition rawImage.cpp:48
RawImage(const RawImage &)=delete
RawImage & operator=(RawImage &)=delete
int GetWidth()
Get image width.
Definition rawImage.cpp:32
RawImage(int width, int height, int bpp)
Constructor.
Definition rawImage.cpp:11
void SetTimestamp(const double &timestamp)
Definition rawImage.cpp:56
virtual ~RawImage()
Definition rawImage.cpp:26
Definition binarySemaphore.hpp:45