Plane information container. More...
#include <cvb/plane.hpp>
Inherits IArray.
Public Member Functions | |
Plane (const ImagePlane &imagePlane, PlaneRole role=PlaneRole::Undefined) | |
Creates a plane from an image plane. More... | |
void * | Handle () const noexcept override |
Classic API image handle. More... | |
int | Rank () const noexcept override |
Gets the number of dimensions of this plane. More... | |
PlaneRole | Role () const noexcept |
Get the meaning of this plane. More... | |
class DataType | DataType () const noexcept override |
Gets the data type of the plane. More... | |
std::intptr_t | Increment (int dimension) const |
Gets the offset in bytes to move to the next element in the given dimension. More... | |
int | Length (int dimension) const |
Gets the number of elements in the given dimension. More... | |
std::uint8_t * | BasePtr () const |
Get the pointer to the first element of this plane. More... | |
virtual void * | Handle () const noexcept=0 |
Classic API image handle. More... | |
virtual class DataType | DataType () const noexcept=0 |
Data type descriptor for this array. More... | |
virtual int | Rank () const noexcept=0 |
Gets the number of dimensions for this array. More... | |
Static Public Member Functions | |
static PlanePtr | FromImagePlane (const ImagePlane &imagePlane, PlaneRole role=PlaneRole::Undefined) |
Creates a plane from an image plane. More... | |
static PlanePtr | FromHandle (HandleGuard< Plane > &&guard) |
Creates a plane from a classic API handle. More... | |
Plane information container.
Plane describes a (not necessarily contiguous) data container.
|
inlineexplicit |
Creates a plane from an image plane.
[in] | imagePlane | The image plane. |
[in] | role | The role of this plane. |
Any | exception derived from std::exception including CvbException. |
The image plane's image shares its buffer ownership with this plane. The image plane must support linear access.
|
inline |
Get the pointer to the first element of this plane.
Any | exception derived from std::exception including CvbException. |
Creates a plane from a classic API handle.
[in] | guard | Life time guard for C-API handle. |
|
inlinestatic |
Creates a plane from an image plane.
[in] | imagePlane | The image plane. |
[in] | role | The role of this plane. |
Any | exception derived from std::exception including CvbException. |
The image plane's imag shares its buffer ownership with this plane. The image plane must support linear access.
|
inlineoverridevirtualnoexcept |
Classic API image handle.
Does | not throw any exception. |
It is normally not necessary to work with this handle.
Implements IArray.
|
inline |
Gets the offset in bytes to move to the next element in the given dimension.
[in] | dimension | Dimension to access the increment for. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Gets the number of elements in the given dimension.
[in] | dimension | Dimension to access the length for. |
Any | exception derived from std::exception including CvbException. |
|
inlineoverridevirtualnoexcept |
Gets the number of dimensions of this plane.
A normal image has two dimensions (width and height) and thus would return two. A sparse point list (e.g. from a Coord3D_ABC8 PFNC buffer) would return a rank of one.
Implements IArray.
|
inlinenoexcept |
Get the meaning of this plane.
Does | not throw any exception. |