IDS peak genericC++ v1.13.0
Loading...
Searching...
No Matches
peak::core::ImageView Class Reference

Implementation of the peak::common::IImageView interface for viewing image pixel data from arbitrary sources. More...

#include <peak/image_view/peak_image_view.hpp>

Inheritance diagram for peak::core::ImageView:
peak::common::IImageView

Public Member Functions

 ImageView (const std::shared_ptr< Buffer > &buffer)
 Construct an ImageView from a Buffer.
 ImageView (const std::shared_ptr< BufferPart > &part)
 Construct an ImageView from a BufferPart.
PEAK_COMMON_NO_DISCARD const uint8_t * GetData () const override
 Get pointer to the first byte of the image (read-only).
PEAK_COMMON_NO_DISCARD uint8_t * GetData () override
 Get pointer to the first byte of the image (read-write).
PEAK_COMMON_NO_DISCARD std::size_t GetSizeInBytes () const override
 Size of the image in bytes.
PEAK_COMMON_NO_DISCARD peak::common::PixelFormat GetPixelFormat () const override
 PixelFormat of the contained image.
PEAK_COMMON_NO_DISCARD peak::common::PixelFormatInfo GetPixelFormatInfo () const override
 Information object for the PixelFormat of the contained image.
PEAK_COMMON_NO_DISCARD peak::common::Size GetSize () const override
 Get the dimensions of the image. I.e. Width, Height, etc.
PEAK_COMMON_NO_DISCARD uint32_t GetWidth () const override
 Width of the image in pixels.
PEAK_COMMON_NO_DISCARD uint32_t GetHeight () const override
 Height of the image in pixels.
PEAK_COMMON_NO_DISCARD size_t GetBitsPerPixel () const override
 The amount of bits in one pixel.
PEAK_COMMON_NO_DISCARD size_t GetBytesPerLine () const override
 The amount of bytes per line.
PEAK_COMMON_NO_DISCARD std::shared_ptr< peak::common::Metadata > GetMetadata () override
 The metadata object belonging to the image.
PEAK_COMMON_NO_DISCARD std::shared_ptr< const peak::common::Metadata > GetMetadata () const override
 The metadata object belonging to the image.
PEAK_COMMON_NO_DISCARD std::shared_ptr< peak::core::Buffer > GetParentBuffer () const
 The parent buffer object, the image view was created from.
Public Member Functions inherited from peak::common::IImageView
virtual ~IImageView ()=default

Detailed Description

Implementation of the peak::common::IImageView 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
This object does not own the image memory. Lifetime management must be handled externally.
Since
1.12

Constructor & Destructor Documentation

◆ ImageView() [1/2]

peak::core::ImageView::ImageView ( const std::shared_ptr< Buffer > & buffer)
inlineexplicit

Construct an ImageView from a Buffer.

Parameters
bufferShared pointer to the source Buffer containing image data.
Since
1.12

◆ ImageView() [2/2]

peak::core::ImageView::ImageView ( const std::shared_ptr< BufferPart > & part)
inlineexplicit

Construct an ImageView from a BufferPart.

Parameters
partShared pointer to the source BufferPart containing image data.
Since
1.12

Member Function Documentation

◆ GetBitsPerPixel()

size_t peak::core::ImageView::GetBitsPerPixel ( ) const
inlineoverridevirtual

The amount of bits in one pixel.

Since
1.12

Implements peak::common::IImageView.

◆ GetBytesPerLine()

size_t peak::core::ImageView::GetBytesPerLine ( ) const
inlineoverridevirtual

The amount of bytes per line.

Since
1.12

Implements peak::common::IImageView.

◆ GetData() [1/2]

const uint8_t * peak::core::ImageView::GetData ( ) const
inlineoverridevirtual

Get pointer to the first byte of the image (read-only).

Returns
Pointer to data.
Since
1.12

Implements peak::common::IImageView.

◆ GetData() [2/2]

uint8_t * peak::core::ImageView::GetData ( )
inlineoverridevirtual

Get pointer to the first byte of the image (read-write).

Returns
Pointer to data.
Since
1.12

Implements peak::common::IImageView.

◆ GetHeight()

uint32_t peak::core::ImageView::GetHeight ( ) const
inlineoverridevirtual

Height of the image in pixels.

Since
1.12

Implements peak::common::IImageView.

◆ GetMetadata() [1/2]

std::shared_ptr< const peak::common::Metadata > peak::core::ImageView::GetMetadata ( ) const
inlineoverridevirtual

The metadata object belonging to the image.

Since
1.12

Implements peak::common::IImageView.

◆ GetMetadata() [2/2]

std::shared_ptr< peak::common::Metadata > peak::core::ImageView::GetMetadata ( )
inlineoverridevirtual

The metadata object belonging to the image.

Since
1.12

Implements peak::common::IImageView.

◆ GetParentBuffer()

std::shared_ptr< peak::core::Buffer > peak::core::ImageView::GetParentBuffer ( ) const
inline

The parent buffer object, the image view was created from.

If the image was created from a buffer part, the parent buffer is the same as returned by BufferPart::ParentBuffer.

Returns
Parent buffer
Exceptions
InternalErrorExceptionAn internal error has occurred.
Since
1.13

◆ GetPixelFormat()

peak::common::PixelFormat peak::core::ImageView::GetPixelFormat ( ) const
inlineoverridevirtual

PixelFormat of the contained image.

Since
1.12

Implements peak::common::IImageView.

◆ GetPixelFormatInfo()

peak::common::PixelFormatInfo peak::core::ImageView::GetPixelFormatInfo ( ) const
inlineoverridevirtual

Information object for the PixelFormat of the contained image.

Since
1.12

Implements peak::common::IImageView.

◆ GetSize()

peak::common::Size peak::core::ImageView::GetSize ( ) const
inlineoverridevirtual

Get the dimensions of the image. I.e. Width, Height, etc.

Since
1.12

Implements peak::common::IImageView.

◆ GetSizeInBytes()

std::size_t peak::core::ImageView::GetSizeInBytes ( ) const
inlineoverridevirtual

Size of the image in bytes.

Returns
Size in bytes.
Since
1.12

Implements peak::common::IImageView.

◆ GetWidth()

uint32_t peak::core::ImageView::GetWidth ( ) const
inlineoverridevirtual

Width of the image in pixels.

Since
1.12

Implements peak::common::IImageView.


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