40 friend class ImageIterator;
41 friend class ConstImageIterator;
226 std::vector<
unsigned char> _pixelValues;
233 return ImageIterator{*
this};
238 return ConstImageIterator{*
this};
243 return _info.getWidth();
248 return _info.getStride();
253 return _info.getHeight();
258 return _info.getSize();
263 return static_cast<unsigned int>(_pixelValues.size());
268 return _pixelValues.empty();
273 return _info.getColorFormat();
278 return _info.getWidthAlignment();
288 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 class that realize the iteration over the pixels of false color images.
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:266
OTC_SDK_API Image clone() const noexcept
Returns a complete copy of this image.
Definition Image.h:281
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:246
OTC_SDK_API int getHeight() const noexcept
Returns the height of the image in pixels.
Definition Image.h:251
OTC_SDK_API Pixel getPixel(int x, int y) const
Returns the pixel at the given coordinates.
OTC_SDK_API ImageIterator getIterator() noexcept
Returns an iterator with read and write access.
Definition Image.h:231
OTC_SDK_API int getSizeInBytes() const noexcept
Returns the size of the internal storage in bytes.
Definition Image.h:261
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:276
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:241
OTC_SDK_API int getSize() const noexcept
Returns the size of the image as total number of pixels.
Definition Image.h:256
OTC_SDK_API ConstImageIterator getConstIterator() const noexcept
Returns an iterator with read access.
Definition Image.h:236
OTC_SDK_API ColorFormat getColorFormat() const noexcept
Returns the color format.
Definition Image.h:271
OTC_SDK_API const unsigned char * getData() const noexcept
Returns a pointer to the first element of the internal array.
Definition Image.h:286
Represents a pixel with three color channels and 8 bits of color depth.
Definition Pixel.h:22
Main SDK namespace.
Definition DeviceInfo.h:23
ColorFormat
Represents the different available color formats.
Definition ImageInfo.h:32
WidthAlignment
Represents the different available width alignments.
Definition ImageInfo.h:47