6#include "../../rect.hpp"
21 template <
class AccessTrait>
24 template <
class OTHER_ACCESSTRAIT>
25 friend class BlockBase;
42 explicit BlockBase(
const AccessTrait &access,
Size2D<int> size)
62 template <
class OTHER_ACCESSTRAIT>
63 explicit BlockBase(
const BlockBase<OTHER_ACCESSTRAIT> &other,
Rect<int> aoi)
65 , access_(other.access_.NewMoved(aoi))
67 if (aoi.Left() < 0 || aoi.Right() >= other.
Size().
Width() || aoi.Top() < 0
75 BlockBase(
const BlockBase &other)
noexcept =
default;
76 BlockBase &operator=(
const BlockBase &other)
noexcept =
default;
77 BlockBase(BlockBase &&other)
noexcept =
default;
78 BlockBase &operator=(BlockBase &&other)
noexcept =
default;
79 ~BlockBase() =
default;
87 CVB_FORCE_INLINE
const AccessTrait &
Access() const noexcept
87 CVB_FORCE_INLINE
const AccessTrait &
Access() const noexcept {
…}
97 CVB_FORCE_INLINE AccessTrait &
Access() noexcept
97 CVB_FORCE_INLINE AccessTrait &
Access() noexcept {
…}
109 CVB_FORCE_INLINE
size_t Length() const noexcept
111 return static_cast<size_t>(size_.Width()) *
static_cast<size_t>(size_.Height());
109 CVB_FORCE_INLINE
size_t Length() const noexcept {
…}
129 CVB_FORCE_INLINE
int Width() const noexcept
131 return size_.Width();
129 CVB_FORCE_INLINE
int Width() const noexcept {
…}
139 CVB_FORCE_INLINE
int Height() const noexcept
141 return size_.Height();
139 CVB_FORCE_INLINE
int Height() const noexcept {
…}
152 return size_.Width() > 0 && size_.Height() > 0 && access_.Valid();
CVB_FORCE_INLINE AccessTrait & Access() noexcept
Gets the pixel access.
Definition decl_block_base.hpp:97
CVB_FORCE_INLINE Size2D< int > Size() const noexcept
Gets the size of this block.
Definition decl_block_base.hpp:119
bool Valid() const noexcept
Gets whether this block is valid.
Definition decl_block_base.hpp:150
CVB_FORCE_INLINE const AccessTrait & Access() const noexcept
Gets the pixel access.
Definition decl_block_base.hpp:87
CVB_FORCE_INLINE int Width() const noexcept
Gets the width of this block.
Definition decl_block_base.hpp:129
CVB_FORCE_INLINE size_t Length() const noexcept
Gets the total number of pixels in this block.
Definition decl_block_base.hpp:109
CVB_FORCE_INLINE int Height() const noexcept
Gets the height of this block.
Definition decl_block_base.hpp:139
Rectangle object.
Definition rect.hpp:24
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
T Height() const noexcept
Gets the vertical component of the size.
Definition size_2d.hpp:77
T Width() const noexcept
Gets the horizontal component of the size.
Definition size_2d.hpp:57
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17