Access trait for contiguous linear CVB image planes. More...
#include <cvb/vpat.hpp>
Inherits ValueAccessBase< ArrayAccess >.
Classes | |
class | Column |
A single column. More... | |
class | Row |
A single row. More... | |
Public Member Functions | |
ArrayAccess () noexcept=default | |
ArrayAccess (const ArrayAccess &other) noexcept=default | |
Default copy ctor. More... | |
ArrayAccess & | operator= (const ArrayAccess &other) noexcept=default |
Default copy operator. More... | |
LinearAccessData | NewMoved (const Rect< int > newAoi) const noexcept |
Creates a new, moved linear access object. More... | |
ArrayAccess | NewMoved (int idx) const noexcept |
Creates a new, moved array access object. More... | |
CVB_FORCE_INLINE std::uint8_t * | BasePtr () const noexcept |
Gets the address of the first pixel of the plane. More... | |
CVB_FORCE_INLINE std::intptr_t | XInc () const noexcept |
Gets the offset to the next pixel on this line in this plane. More... | |
CVB_FORCE_INLINE std::intptr_t | YInc () const noexcept |
Gets the offset to the next pixel on the next line in this plane. More... | |
CVB_FORCE_INLINE int | Width () const noexcept |
Gets the width of the buffer, this access operates on. More... | |
bool | Valid () const noexcept |
Gets whether this linear access object is valid. More... | |
operator bool () const noexcept | |
Gets whether this linear access object is valid. More... | |
CVB_FORCE_INLINE const void * | operator() (int x, int y) const noexcept |
Coordinate pixel access operator. More... | |
CVB_FORCE_INLINE void * | operator() (int x, int y) noexcept |
Coordinate pixel access operator. More... | |
CVB_FORCE_INLINE const void * | operator[] (int idx) const noexcept |
Index pixel access operator. More... | |
CVB_FORCE_INLINE void * | operator[] (int idx) noexcept |
Index pixel access operator. More... | |
Row | RowAt (int y) const noexcept |
Gets the ArrayAccess::Row at y. More... | |
Column | ColumnAt (int x) const noexcept |
Gets the ArrayAccess::Column at x. More... | |
Public Member Functions inherited from ValueAccessBase< ArrayAccess > | |
const Type & | Value (int x, int y) const noexcept |
Gets a pixel value at a given position. More... | |
Type & | Value (int x, int y) noexcept |
Gets a settable pixel value at a given position. More... | |
const Type & | Value (Point2D< int > position) const noexcept |
Gets a pixel value at a given position. More... | |
Type & | Value (Point2D< int > position) noexcept |
Gets a settable pixel value at a given position. More... | |
Static Public Member Functions | |
template<class PLANE_T > | |
static ArrayAccess | FromPlane (const PLANE_T &plane) noexcept |
Tries to get a valid ArrayAccess trait from the given plane. More... | |
static ArrayAccess | FromLinearAccess (const LinearAccessData &access, Size2D< int > size) noexcept |
Tries to get a valid ArrayAccess trait from the given access. More... | |
static ArrayAccess | FromVpat (const Vpat &access, Size2D< int > size, DataType dataType) noexcept |
Tries to get a valid ArrayAccess trait from the given VPAT access. More... | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const ArrayAccess &lhs, const ArrayAccess &rhs) noexcept |
Inequality operator. More... | |
bool | operator== (const ArrayAccess &lhs, const ArrayAccess &rhs) noexcept |
Equality operator. More... | |
template<class... ACCESSES> | |
bool | IsInterleaved (size_t bytesPerPixel, const ArrayAccess &access0, const ArrayAccess &access1, const ACCESSES &... accs) noexcept |
Returns whether the ArrayAccesses are directly interleaved. More... | |
Access trait for contiguous linear CVB image planes.
|
defaultnoexcept |
Default ctor of invalid access data.
|
defaultnoexcept |
|
inlinenoexcept |
Gets the address of the first pixel of the plane.
|
inlinenoexcept |
Gets the ArrayAccess::Column at x.
[in] | x | Pixel column. |
|
inlinestaticnoexcept |
Tries to get a valid ArrayAccess trait from the given access.
[in] | access | Linear access to analyze. |
|
inlinestaticnoexcept |
Tries to get a valid ArrayAccess trait from the given plane.
Can be extended to support custom plane types T by implementing Cvb::PlaneTraits<T>.
PLANE_T | The type of the plane to get the access from. |
[in] | plane | Plane to access. |
|
inlinestaticnoexcept |
Tries to get a valid ArrayAccess trait from the given VPAT access.
[in] | access | Base address in conjunction with VPAT. |
[in] | size | Image dimensions of the given VPAT access. |
[in] | dataType | Data type of the image of the given vpat. |
|
inlinenoexcept |
Creates a new, moved linear access object.
[in] | newAoi | Offset and new size in pixels to move this access to. |
|
inlinenoexcept |
Creates a new, moved array access object.
[in] | idx | Offset in pixels to move this array access to. |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
Coordinate pixel access operator.
[in] | x | X coordinate coefficient in pixels. |
[in] | y | Y coordinate coefficient in pixels. |
|
inlinenoexcept |
Coordinate pixel access operator.
[in] | x | X coordinate coefficient in pixels. |
[in] | y | Y coordinate coefficient in pixels. |
|
defaultnoexcept |
|
inlinenoexcept |
Index pixel access operator.
[in] | idx | Index of the pixel. |
|
inlinenoexcept |
Index pixel access operator.
[in] | idx | Index of the pixel. |
|
inlinenoexcept |
Gets the ArrayAccess::Row at y.
[in] | y | Pixel row. |
|
inlinenoexcept |
|
inlinenoexcept |
Gets the width of the buffer, this access operates on.
|
inlinenoexcept |
Gets the offset to the next pixel on this line in this plane.
|
inlinenoexcept |
Gets the offset to the next pixel on the next line in this plane.
|
related |
Returns whether the ArrayAccesses are directly interleaved.
[in] | bytesPerPixel | The number of bytes required per pixel. |
[in] | access0 | First ArrayAccess to test. |
[in] | access1 | Second ArrayAccess to test. |
[in] | accs | Arbitrary number of other ArrayAccesses. |
|
related |
Inequality operator.
[in] | lhs | Left hand side operand. |
[in] | rhs | Right hand side operand. |
|
related |
Equality operator.
[in] | lhs | Left hand side operand. |
[in] | rhs | Right hand side operand. |