![]() |
IDS peak ICV v1.1.0
|
#include <peak_icv/types/peak_icv_image.hpp>

Public Member Functions | |
| Image (const peak::common::IImageView &imageView) | |
| Constructs an Image from an IImageView Instance. | |
| Image (const std::string &path) | |
| Constructs an Image from a file path. | |
| Image (const std::string &path, peak::common::PixelFormat name) | |
| Constructs an Image from a file path with a specified pixel format. | |
| Image (peak::common::PixelFormat pixelFormat, uint8_t *buffer, size_t bufferSize, const peak::common::Size &imageSize) | |
| Constructs an Image from a buffer. | |
| Image (peak::common::PixelFormat pixelFormat, const peak::common::Size &imageSize) | |
| Constructs an Image with a given size and pixel format. | |
| Image (const Image &other) | |
| Image (Image &&other) noexcept | |
| Image & | operator= (const Image &other) |
| Image & | operator= (Image &&other) noexcept |
| ~Image () override | |
| bool | operator== (const Image &rhs) const |
| Image | Copy () const |
| Creates a deep copy of the current Image. | |
| peak::common::Size | GetSize () const |
| Provides the size of the image in pixels. | |
| uint8_t * | GetData () const |
| Provides a pointer to the image data buffer. | |
| size_t | GetSizeInBytes () const |
| Provides the size of the image data in bytes. | |
| size_t | GetBytesPerLine () const |
| Computes the number of bytes required to store one line of pixel data (no padding). | |
| peak::common::PixelFormat | GetPixelFormat () const |
| Provides the pixel format of the image. | |
| Region | GetRegion () const |
| Provides the region of the image. | |
| void | SetRegion (const Region ®ion) const |
| Updates the region on the image. | |
| void | ResetRegion () const |
| Resets the region on the image to the complete image. | |
| template<typename DataType > | |
| DataType * | At (size_t x, size_t y) const |
| Provides a pointer to the data at the specified coordinates. | |
| peak::icv::Image | ConvertPixelFormat (peak::common::PixelFormat pixelFormat) const |
| Converts the image to a different pixel format. | |
| peak::icv::Image | ConvertPixelFormatWithFactor (peak::common::PixelFormat pixelFormat, const double factor) const |
| Converts an image into another pixel format with a factor multiplied to every pixel. | |
| void | SetMetadata (const peak::common::Metadata &metadata) |
| Updates the Metadata of an image which is used to store and manage capture information. | |
| peak::common::Metadata | GetMetadata () const |
| Returns the Metadata of an image which contains information about the image capture information. | |
| Image | Subtract (const Image &subtrahend) const |
Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image. | |
| Image | operator- (const Image &subtrahend) const |
Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image. | |
| Image | Crop (const peak::common::Rectangle &rect) const |
| Crops the image to the given rectangle. | |
| Image | Scale (const peak::common::Size &targetImageSize, const Interpolation &interpolation=Interpolation::NearestNeighbor) const |
| Returns an image scaled to the given image size. | |
For detailed information about the use of ids_peak_icv Image refer to the Image Guide.
Definition at line 45 of file peak_icv_image.hpp.
|
inlineexplicit |
Constructs an Image from an IImageView Instance.
This can be a buffer or a possibility to convert other libraries Images into this Image type.
| imageView | Abstract Image source |
Definition at line 111 of file peak_icv_image.ipp.
|
inlineexplicit |
Constructs an Image from a file path.
The following image formats are supported:
|
|
|
|
|
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
| path | The file path to the image. |
Definition at line 118 of file peak_icv_image.ipp.
|
inlineexplicit |
Constructs an Image from a file path with a specified pixel format.
This constructor loads an image from the given file path and forces the use of the specified pixel format. The function attempts to interpret the file using the provided format. If interpretation fails, an exception is thrown. Explicit conversion between image formats must be handled manually by the user.
The following image formats are supported:
|
|
|
|
|
|
|
|
Only the following formats are supported and must match the format used when saving:
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
Definition at line 122 of file peak_icv_image.ipp.
|
inline |
Constructs an Image from a buffer.
| pixelFormat | The pixel format of the image. |
| buffer | The buffer containing image data. |
| bufferSize | The size of the buffer. |
| imageSize | The size of the image in pixels. |
Definition at line 126 of file peak_icv_image.ipp.
|
inline |
Constructs an Image with a given size and pixel format.
| pixelFormat | The pixel format of the image. |
| imageSize | The size of the image in pixels. |
Definition at line 131 of file peak_icv_image.ipp.
Definition at line 139 of file peak_icv_image.ipp.
Definition at line 150 of file peak_icv_image.ipp.
|
inlineoverride |
Definition at line 208 of file peak_icv_image.ipp.
|
inline |
Provides a pointer to the data at the specified coordinates.
| DataType | The type of the data to retrieve. |
| x | The x-coordinate. |
| y | The y-coordinate. |
Definition at line 300 of file peak_icv_image.hpp.
|
inline |
Converts the image to a different pixel format.
If the input image has the same pixel format as the specified pixel format parameter, the image will be copied.
Restrictions:
| pixelFormat | The target pixel format. |
Definition at line 327 of file peak_icv_image.ipp.
|
inline |
Converts an image into another pixel format with a factor multiplied to every pixel.
If the input image has the same pixel format as the specified pixel format parameter, the image will be copied.
Supported conversions: From PixelFormat::Coord3D_C8 or PixelFormat::Coord3D_C16 to PixelFormat::Coord3D_C32f
| pixelFormat | The target pixel format. |
| factor | The multiplication factor |
Definition at line 338 of file peak_icv_image.ipp.
|
inline |
Creates a deep copy of the current Image.
Definition at line 242 of file peak_icv_image.ipp.
|
inline |
Crops the image to the given rectangle.
| OutOfRangeException | The given rectangle is (partly) outside the image. |
Definition at line 399 of file peak_icv_image.ipp.
|
inline |
Computes the number of bytes required to store one line of pixel data (no padding).
This returns the exact number of bytes used for one scanline of pixel data based on the image's width, number of channels, and bits per pixel.
Definition at line 268 of file peak_icv_image.ipp.
|
inline |
Provides a pointer to the image data buffer.
Definition at line 258 of file peak_icv_image.ipp.
|
inline |
Returns the Metadata of an image which contains information about the image capture information.
Definition at line 360 of file peak_icv_image.ipp.
|
inline |
Provides the pixel format of the image.
Definition at line 278 of file peak_icv_image.ipp.
|
inline |
Provides the region of the image.
Definition at line 301 of file peak_icv_image.ipp.
|
inline |
Provides the size of the image in pixels.
Definition at line 253 of file peak_icv_image.ipp.
|
inline |
Provides the size of the image data in bytes.
Definition at line 263 of file peak_icv_image.ipp.
Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image.
This function performs a pixelwise subtraction of the given subtrahend image from the current image. The resulting image is returned as a new Image object. The operation requires that both images have the same pixel format and dimensions.
| subtrahend | The image to subtract from the current image. |
Definition at line 394 of file peak_icv_image.ipp.
Definition at line 159 of file peak_icv_image.ipp.
Definition at line 185 of file peak_icv_image.ipp.
|
inline |
Definition at line 216 of file peak_icv_image.ipp.
|
inline |
Resets the region on the image to the complete image.
Definition at line 320 of file peak_icv_image.ipp.
|
inline |
Returns an image scaled to the given image size.
Internally the scale factors are computed as follows:
These factors determine how the input image is resized to match the desired output dimensions.
| targetImageSize | The image size to which the original image is scaled. |
| interpolation | The interpolation method used to scale the image. |
| NotPossibleException | The given targetImageSize is empty (i.e. width × height == 0). |
| NotSupportedException | The interpolation method is not supported. |
Definition at line 410 of file peak_icv_image.ipp.
|
inline |
Updates the Metadata of an image which is used to store and manage capture information.
| metadata | Metadata to be updated |
Definition at line 349 of file peak_icv_image.ipp.
|
inline |
Updates the region on the image.
Sets a region of interest (ROI) for the specified image handle, which defines a sub-area of the image where operations or analyses are focused. Any points in the region that fall outside the bounds of the image are automatically discarded (clipped).
| region | Region to update |
Definition at line 311 of file peak_icv_image.ipp.
Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image.
This function performs a pixelwise subtraction of the given subtrahend image from the current image. The resulting image is returned as a new Image object. The operation requires that both images have the same pixel format and dimensions.
| subtrahend | The image to subtract from the current image. |
Definition at line 382 of file peak_icv_image.ipp.