CVB++ 14.1
PlaneTraits< PLANE_T > Class Template Reference

#include <global.hpp>

Detailed Description

template<class PLANE_T>
class Cvb::PlaneTraits< PLANE_T >
Template Parameters
PLANE_TThe plane type to provide the traits for.

Provides the following concept for supported plane types:

using PlaneT = PLANE_T;
using TypeList = DispatchableTypeList<...>;
static constexpr bool HasVpat = ..;
static int GetWidth(const PlaneT &plane);
// Throws if GetRank < 2.
static int GetHeight(const PlaneT &plane);
static Cvb::DataType GetDataType(const PlaneT &plane);
static int GetRank(const PlaneT &);
// only available if HasVpat == true:
static Cvb::Vpat GetVpat(const PlaneT &plane);
// only available if HasVpat == false:
static std::ptrdiff_t GetXInc(const PlaneT &plane);
// only available if HasVpat == false:
static std::ptrdiff_t GetYInc(const PlaneT &plane);
// only available if HasVpat == false:
static std::uint8_t* GetBasePtr(const Plane &plane)
Data type description for an image plane.
Definition: data_type.hpp:28
Plane information container.
Definition: decl_plane.hpp:28
Virtual Pixel Access Table.
Definition: decl_vpat.hpp:24

Providing this for custom plane types allows using the Visit(As) infrastructure with those planes.