IDS peak IPL v1.18.0
Loading...
Searching...
No Matches
peak::common::IImageView Class Referenceabstract

Interface for viewing image pixel data from arbitrary sources. More...

#include <peak_common/types/peak_common_iimageview.hpp>

Public Member Functions

virtual ~IImageView ()=default
virtual PEAK_COMMON_NO_DISCARD const uint8_t * GetData () const =0
 Returns a pointer to the start of the first line that contains valid image data (read-only).
virtual PEAK_COMMON_NO_DISCARD uint8_t * GetData ()=0
 Returns a pointer to the start of the first line that contains valid image data (read-write).
virtual PEAK_COMMON_NO_DISCARD std::size_t GetLineStartOffset () const =0
 Returns the byte offset to the first pixel of a line.
virtual PEAK_COMMON_NO_DISCARD std::size_t GetSizeInBytes () const =0
 Returns the total size of the image data in bytes.
virtual PEAK_COMMON_NO_DISCARD peak::common::PixelFormat GetPixelFormat () const =0
 Returns the pixel format used by the image.
virtual PEAK_COMMON_NO_DISCARD peak::common::PixelFormatInfo GetPixelFormatInfo () const =0
 Returns a helper object describing the pixel format in detail.
virtual PEAK_COMMON_NO_DISCARD Size GetSize () const =0
 Returns the overall size of the image (width × height).
virtual PEAK_COMMON_NO_DISCARD uint32_t GetWidth () const =0
 Returns the width of the image in pixels.
virtual PEAK_COMMON_NO_DISCARD uint32_t GetHeight () const =0
 Returns the height of the image in pixels.
virtual PEAK_COMMON_NO_DISCARD size_t GetBitsPerPixel () const =0
 Returns the number of bits that each pixel occupies.
virtual PEAK_COMMON_NO_DISCARD size_t GetBytesPerLine () const =0
 Returns the number of bytes in a single image row.
virtual PEAK_COMMON_NO_DISCARD std::shared_ptr< peak::common::Metadata > GetMetadata ()=0
 Returns the metadata object which can be used to retrieve or set metadata belonging to the image.
virtual PEAK_COMMON_NO_DISCARD std::shared_ptr< const peak::common::Metadata > GetMetadata () const =0
 Returns the metadata object which can be used to retrieve metadata belonging to the image.

Detailed Description

Interface for viewing image pixel data from arbitrary sources.

This interface defines a standard way to access image properties and raw pixel data, enabling interoperability with different image processing libraries or backends.

Note
The interface does not own the image memory. Lifetime management must be handled externally.
Since
ids_peak_common 1.0

Constructor & Destructor Documentation

◆ ~IImageView()

virtual peak::common::IImageView::~IImageView ( )
virtualdefault

Member Function Documentation

◆ GetBitsPerPixel()

virtual PEAK_COMMON_NO_DISCARD size_t peak::common::IImageView::GetBitsPerPixel ( ) const
pure virtual

Returns the number of bits that each pixel occupies.

Returns
Bits per pixel.
Since
ids_peak_common 1.0

◆ GetBytesPerLine()

virtual PEAK_COMMON_NO_DISCARD size_t peak::common::IImageView::GetBytesPerLine ( ) const
pure virtual

Returns the number of bytes in a single image row.

Returns
Bytes per line, including any padding.
Since
ids_peak_common 1.0

◆ GetData() [1/2]

virtual PEAK_COMMON_NO_DISCARD const uint8_t * peak::common::IImageView::GetData ( ) const
pure virtual

Returns a pointer to the start of the first line that contains valid image data (read-only).

Returns
Pointer to the raw pixel data.
Since
ids_peak_common 1.0

◆ GetData() [2/2]

virtual PEAK_COMMON_NO_DISCARD uint8_t * peak::common::IImageView::GetData ( )
pure virtual

Returns a pointer to the start of the first line that contains valid image data (read-write).

Returns
Pointer to the raw pixel data.
Since
ids_peak_common 1.0

◆ GetHeight()

virtual PEAK_COMMON_NO_DISCARD uint32_t peak::common::IImageView::GetHeight ( ) const
pure virtual

Returns the height of the image in pixels.

Returns
Number of rows in the image.
Since
ids_peak_common 1.0

◆ GetLineStartOffset()

virtual PEAK_COMMON_NO_DISCARD std::size_t peak::common::IImageView::GetLineStartOffset ( ) const
pure virtual

Returns the byte offset to the first pixel of a line.

Returns
Line offset in bytes.
Since
ids_peak_common 1.2

◆ GetMetadata() [1/2]

virtual PEAK_COMMON_NO_DISCARD std::shared_ptr< const peak::common::Metadata > peak::common::IImageView::GetMetadata ( ) const
pure virtual

Returns the metadata object which can be used to retrieve metadata belonging to the image.

Returns
Pointer to the metadata object
Since
ids_peak_common 1.0

◆ GetMetadata() [2/2]

virtual PEAK_COMMON_NO_DISCARD std::shared_ptr< peak::common::Metadata > peak::common::IImageView::GetMetadata ( )
pure virtual

Returns the metadata object which can be used to retrieve or set metadata belonging to the image.

Returns
Pointer to the metadata object
Since
ids_peak_common 1.0

◆ GetPixelFormat()

virtual PEAK_COMMON_NO_DISCARD peak::common::PixelFormat peak::common::IImageView::GetPixelFormat ( ) const
pure virtual

Returns the pixel format used by the image.

Returns
The PixelFormat of the image stored in the buffer.
Since
ids_peak_common 1.0

◆ GetPixelFormatInfo()

virtual PEAK_COMMON_NO_DISCARD peak::common::PixelFormatInfo peak::common::IImageView::GetPixelFormatInfo ( ) const
pure virtual

Returns a helper object describing the pixel format in detail.

The PixelFormatInfo class provides methods to inspect the layout, size, channel count, channel order, and other attributes of the format returned by GetPixelFormat().

Returns
An instance of PixelFormatInfo for querying format details.
Since
ids_peak_common 1.0

◆ GetSize()

virtual PEAK_COMMON_NO_DISCARD Size peak::common::IImageView::GetSize ( ) const
pure virtual

Returns the overall size of the image (width × height).

Returns
Size object containing width and height in pixels.
Since
ids_peak_common 1.0

◆ GetSizeInBytes()

virtual PEAK_COMMON_NO_DISCARD std::size_t peak::common::IImageView::GetSizeInBytes ( ) const
pure virtual

Returns the total size of the image data in bytes.

Returns
Number of bytes occupied by the image in the buffer.
Since
ids_peak_common 1.0

◆ GetWidth()

virtual PEAK_COMMON_NO_DISCARD uint32_t peak::common::IImageView::GetWidth ( ) const
pure virtual

Returns the width of the image in pixels.

Returns
Number of pixels per row.
Since
ids_peak_common 1.0

The documentation for this class was generated from the following file: