Fledge
An open source edge computing platform for industrial users
dpimage.h
1 #ifndef _DPIMAGE_H
2 #define _DPIMAGE_H
3 /*
4  * Fledge datapoint image
5  *
6  * Copyright (c) 2021 Dianomic Systems
7  *
8  * Released under the Apache 2.0 Licence
9  *
10  * Author: Mark Riddoch
11  */
12 
21 class DPImage {
22  public:
23  DPImage() : m_width(0), m_height(0), m_depth(0), m_pixels(0), m_byteSize(0) {};
24  DPImage(int width, int height, int depth, void *data);
25  DPImage(const DPImage& rhs);
26  DPImage& operator=(const DPImage& rhs);
27  ~DPImage();
31  int getHeight() { return m_height; };
35  int getWidth() { return m_width; };
39  int getDepth() { return m_depth; };
43  void *getData() { return m_pixels; };
44  protected:
45  int m_width;
46  int m_height;
47  int m_depth;
48  void *m_pixels;
49  int m_byteSize;
50 };
51 
52 #endif
~DPImage()
Destructor for the image.
Definition: image.cpp:94
int getHeight()
Return the height of the image.
Definition: dpimage.h:31
int getDepth()
Return the depth of the image in bits.
Definition: dpimage.h:39
Simple Image class that will be used within data points to store image data.
Definition: dpimage.h:21
DPImage & operator=(const DPImage &rhs)
Assignment operator.
Definition: image.cpp:68
void * getData()
Return a pointer to the raw data of the image.
Definition: dpimage.h:43
int getWidth()
Return the width of the image.
Definition: dpimage.h:35