Linear access properties. More...
#include <cvb/vpat.hpp>
Inherits ValueAccessBase< LinearAccessData >.
Classes | |
class | Column |
A single column. More... | |
class | Row |
A single row. More... | |
Public Member Functions | |
LinearAccessData () noexcept | |
Creates a default linear access data set. More... | |
LinearAccessData | NewMoved (const Cvb::Rect< int > newAoi) const noexcept |
Creates a new, moved linear access object. More... | |
std::uint8_t * | BasePtr () const noexcept |
Linear access base pointer. More... | |
std::intptr_t | XInc () const noexcept |
X-increment for linear access. More... | |
std::intptr_t | YInc () const noexcept |
Y-increment for linear access. More... | |
CVB_FORCE_INLINE int | Width () const noexcept |
Gets the pixel width of the underlying plane. 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 LinearAccessData::Row at y. More... | |
Column | ColumnAt (int x) const noexcept |
Gets the LinearAccessData::Column at x. More... | |
Public Member Functions inherited from ValueAccessBase< LinearAccessData > | |
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 LinearAccessData | FromPlane (const PLANE_T &plane) noexcept |
Tries to get a valid LinearAccessData from the given plane. More... | |
static LinearAccessData | FromVpat (const Vpat &access, Cvb::Size2D< int > size, Cvb::DataType dataType) noexcept |
Tries to get a valid LinearAccessData trait from the given vpat. More... | |
static LinearAccessData | FromPtr (std::uint8_t *basePtr, std::intptr_t xInc, std::intptr_t yInc, int width) noexcept |
Creates LinearAccessData from the given pointer and increments. More... | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const LinearAccessData &lhs, const LinearAccessData &rhs) noexcept |
Inequality operator. More... | |
bool | operator== (const LinearAccessData &lhs, const LinearAccessData &rhs) noexcept |
Equality operator. More... | |
bool | IsInterleaved (size_t bytesPerPixel, const LinearAccessData &access0, const LinearAccessData &access1) noexcept |
template<class... ACCESSES> | |
bool | IsInterleaved (size_t bytesPerPixel, const LinearAccessData &access0, const LinearAccessData &access1, const ACCESSES &... accs) noexcept |
Linear access properties.
|
inlinedefaultnoexcept |
Creates a default linear access data set.
Does | not throw any exception. |
|
inlinenoexcept |
Linear access base pointer.
Does | not throw any exception. |
Remember, that the increments to be added to the base pointer, are given in bytes, not in pixels. BasePtr by design points to the pixel at location (0,0).
|
inlinenoexcept |
Gets the LinearAccessData::Column at x.
[in] | x | Pixel column. |
|
inlinestaticnoexcept |
Tries to get a valid LinearAccessData 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 |
Creates LinearAccessData from the given pointer and increments.
[in] | basePtr | Base address of the memory. |
[in] | xInc | std::intptr_t X increment in bytes. |
[in] | yInc | std::intptr_t Y increment in bytes. |
[in] | width | int The number of elements in the plane in x direction. |
|
inlinestaticnoexcept |
Tries to get a valid LinearAccessData trait from the given vpat.
[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 linear 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. |
|
inlinenoexcept |
Index pixel access operator.
[in] | idx | Pixel index. |
|
inlinenoexcept |
Index pixel access operator.
[in] | idx | Pixel index. |
|
inlinenoexcept |
Gets the LinearAccessData::Row at y.
[in] | y | Pixel row. |
|
inlinenoexcept |
|
inlinenoexcept |
Gets the pixel width of the underlying plane.
|
inlinenoexcept |
X-increment for linear access.
Does | not throw any exception. |
|
inlinenoexcept |
Y-increment for linear access.
Does | not throw any exception. |
|
related |
Returns whether the LinearAccesses are directly interleaved.
[in] | bytesPerPixel | The number of bytes required per pixel. |
[in] | access0 | First LinearAccessData to test. |
[in] | access1 | Second LinearAccessData to test. |
|
related |
Returns whether the LinearAccesses are directly interleaved.
[in] | bytesPerPixel | The number of bytes required per pixel. |
[in] | access0 | First LinearAccessData to test. |
[in] | access1 | Second LinearAccessData to test. |
[in] | accs | Arbitrary number of other Linear Accesses. |
|
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. |