206 std::vector<
unsigned char> _pixelValues;
213 return _info.getWidth();
218 return _info.getStride();
223 return _info.getHeight();
228 return _info.getSize();
233 return static_cast<unsigned int>(_pixelValues.size());
238 return _pixelValues.empty();
243 return _info.getColorFormat();
248 return _info.getWidthAlignment();
253 return _pixelValues.data();
258 return _pixelValues.data();
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
Contains the exceptions raised by the SDK.
Contains a class holding detail information about the properties of a false color image.
Contains a class encapsulating a pixel with three color channels and 8 bits of color depth.
Encapsulates all relevant information about a false color image.
Definition ImageInfo.h:57
OTC_SDK_API bool isEmpty() const noexcept
Returns whether the image is empty.
Definition Image.h:236
OTC_SDK_API void copyDataTo(unsigned char *destination, int size) const noexcept
Copies the internally stored pixel values to the given array.
OTC_SDK_API int getStride() const noexcept
Returns the stride of the image in bytes.
Definition Image.h:216
OTC_SDK_API int getHeight() const noexcept
Returns the height of the image in pixels.
Definition Image.h:221
OTC_SDK_API Pixel getPixel(int x, int y) const
Returns the pixel at the given coordinates.
OTC_SDK_API int getSizeInBytes() const noexcept
Returns the size of the internal storage in bytes.
Definition Image.h:231
OTC_SDK_API Pixel getPixel(int index) const
Returns the pixel at the given index.
OTC_SDK_API void clear()
Clears the image.
OTC_SDK_API Image(ColorFormat colorFormat, WidthAlignment widthAlignment) noexcept
Constructor.
OTC_SDK_API void setPixel(int x, int y, const Pixel &pixel)
Sets the pixel at the given coordinates.
OTC_SDK_API void resize(int width, int height)
Resizes the image to the given dimensions.
OTC_SDK_API WidthAlignment getWidthAlignment() const noexcept
Returns the width alignment.
Definition Image.h:246
OTC_SDK_API void setPixel(int index, const Pixel &pixel)
Sets the pixel at the given index.
OTC_SDK_API int getWidth() const noexcept
Returns the width of the image in pixels.
Definition Image.h:211
OTC_SDK_API int getSize() const noexcept
Returns the size of the image as total number of pixels.
Definition Image.h:226
OTC_SDK_API ColorFormat getColorFormat() const noexcept
Returns the color format.
Definition Image.h:241
OTC_SDK_API const unsigned char * getData() const noexcept
Returns a pointer to the first element of the internal array.
Definition Image.h:251
Represents a pixel with three color channels and 8 bits of color depth.
Definition Pixel.h:22
Main SDK namespace.
Definition AlarmChannel.h:21
ColorFormat
Represents the different available color formats.
Definition ImageInfo.h:32
WidthAlignment
Represents the different available width alignments.
Definition ImageInfo.h:47