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. | |
| void * | Handle () const noexcept override |
| Classic API image handle. | |
| int | Rank () const noexcept override |
| Gets the number of dimensions of this plane. | |
| PlaneRole | Role () const noexcept |
| Get the meaning of this plane. | |
| class DataType | DataType () const noexcept override |
| Gets the data type of the plane. | |
| std::intptr_t | Increment (int dimension) const |
| Gets the offset in bytes to move to the next element in the given dimension. | |
| int | Length (int dimension) const |
| Gets the number of elements in the given dimension. | |
| std::uint8_t * | BasePtr () const |
| Get the pointer to the first element of this plane. | |
Static Public Member Functions | |
| static PlanePtr | FromImagePlane (const ImagePlane &imagePlane, PlaneRole role=PlaneRole::Undefined) |
| Creates a plane from an image plane. | |
| static PlanePtr | FromHandle (HandleGuard< Plane > &&guard) |
| Creates a plane from a classic API handle. | |
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. |