OpenDaVINCI  4.15.3
CompressedImage.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_DATA_IMAGE_COMPRESSEDIMAGE_H_
21 #define OPENDAVINCI_CORE_DATA_IMAGE_COMPRESSEDIMAGE_H_
22 
23 #include <string>
24 
28 
29 namespace odcore {
30  namespace data {
31  namespace image {
32 
33  using namespace std;
34 
41  public:
43 
54  CompressedImage(const string &name, const uint32_t &width, const uint32_t &height, const uint32_t &bpp, const uint32_t &compressedSize);
55 
56  virtual ~CompressedImage();
57 
63  CompressedImage(const CompressedImage &obj);
64 
71  CompressedImage& operator=(const CompressedImage &obj);
72 
78  const string getName() const;
79 
85  void setName(const string &name);
86 
92  uint32_t getWidth() const;
93 
99  void setWidth(const uint32_t &width);
100 
106  uint32_t getHeight() const;
107 
113  void setHeight(const uint32_t &height);
114 
120  uint32_t getBytesPerPixel() const;
121 
127  void setBytesPerPixel(const uint32_t &bytesPerPixel);
128 
134  uint32_t getSize() const;
135 
141  uint32_t getCompressedSize() const;
142 
148  uint8_t* getRawData() const;
149 
150 
151  virtual ostream& operator<<(ostream &out) const;
152  virtual istream& operator>>(istream &in);
153 
154  virtual int32_t getID() const;
155  virtual const string getShortName() const;
156  virtual const string getLongName() const;
157  virtual const string toString() const;
158  static int32_t ID();
159  static const string ShortName();
160  static const string LongName();
161 
162  public:
163  virtual void accept(odcore::base::Visitor &v);
164 
165  private:
166  string m_name;
167  uint32_t m_width;
168  uint32_t m_height;
169  uint32_t m_bytesPerPixel;
170  uint32_t m_compressedSize;
171  uint8_t *m_imageData;
172  };
173  }
174  }
175 } // odcore::data::image
176 
177 #endif /*OPENDAVINCI_CORE_DATA_IMAGE_COMPRESSEDIMAGE_H_*/
Definition: Visitable.h:34
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Definition: CompressedImage.h:39
Definition: SerializableData.h:36
Definition: Visitor.h:37