IDS peak genericC++ v1.15.0
Loading...
Searching...
No Matches
peak_common_iimageview.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
16
17#include <cstddef>
18#include <cstdint>
19#include <memory>
20
21namespace peak
22{
23namespace common
24{
25
26class Metadata;
27
42{
43public:
44 virtual ~IImageView() = default;
45
52 PEAK_COMMON_NO_DISCARD virtual const uint8_t* GetData() const = 0;
53
60 PEAK_COMMON_NO_DISCARD virtual uint8_t* GetData() = 0;
61
68 PEAK_COMMON_NO_DISCARD virtual std::size_t GetLineStartOffset() const = 0;
69
76 PEAK_COMMON_NO_DISCARD virtual std::size_t GetSizeInBytes() const = 0;
77
85
98
106
113 PEAK_COMMON_NO_DISCARD virtual uint32_t GetWidth() const = 0;
114
121 PEAK_COMMON_NO_DISCARD virtual uint32_t GetHeight() const = 0;
122
129 PEAK_COMMON_NO_DISCARD virtual size_t GetBitsPerPixel() const = 0;
130
137 PEAK_COMMON_NO_DISCARD virtual size_t GetBytesPerLine() const = 0;
138
145 PEAK_COMMON_NO_DISCARD virtual std::shared_ptr<peak::common::Metadata> GetMetadata() = 0;
146
153 PEAK_COMMON_NO_DISCARD virtual std::shared_ptr<const peak::common::Metadata> GetMetadata() const = 0;
154};
155
156} // namespace common
157} // namespace peak
Interface for viewing image pixel data from arbitrary sources.
Definition peak_common_iimageview.hpp:42
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 std::size_t GetSizeInBytes() const =0
Returns the total size of the image data in bytes.
virtual ~IImageView()=default
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::size_t GetLineStartOffset() const =0
Returns the byte offset to the first pixel of a line.
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 size_t GetBitsPerPixel() const =0
Returns the number of bits that each pixel occupies.
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 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 peak::common::PixelFormat GetPixelFormat() const =0
Returns the pixel format used by the image.
virtual PEAK_COMMON_NO_DISCARD uint32_t GetHeight() const =0
Returns the height of the image in pixels.
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.
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.
Type-safe container for image acquisition metadata.
Definition peak_common_metadata.hpp:45
Provides information and utility functions for pixel formats.
Definition peak_common_pixel_format.hpp:224
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.h:86
detail::SizeT< uint32_t > Size
Size with unsigned 32-bit integer dimensions.
Definition peak_common_size.hpp:273
PixelFormat
Enum listing all supported pixel formats and their internal IDs.
Definition peak_common_pixel_format.hpp:51
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33
Enum holding the possible pixel format names.