Zivid C++ API 2.14.0+e4a0c4a9-1
Zivid::Settings2D::Sampling::Pixel Class Reference

Set the pixel sampling to use for the 2D capture. This setting defines how the camera sensor is sampled. When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended. More...

#include <Zivid/Settings2D.h>

Public Types

enum class  ValueType {
  all , blueSubsample2x2 , redSubsample2x2 , blueSubsample4x4 ,
  redSubsample4x4 , by2x2 , by4x4
}
 The type of the underlying value. More...
 

Public Member Functions

 Pixel ()=default
 Default constructor.
 
constexpr Pixel (ValueType value)
 Constructor.
 
ValueType value () const
 Get the value.
 
bool hasValue () const
 Check if the value is set.
 
void reset ()
 Reset the node to unset state.
 
std::string toString () const
 Get the value as string.
 
bool operator== (const Pixel &other) const
 Comparison operator.
 
bool operator!= (const Pixel &other) const
 Comparison operator.
 

Static Public Member Functions

static std::set< ValueTypevalidValues ()
 All valid values of Pixel.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue
 The type of this node.
 
static constexpr const char * path { "Sampling/Pixel" }
 The full path for this value.
 
static constexpr const char * name { "Pixel" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 
static const Pixel all
 all
 
static const Pixel blueSubsample2x2
 blueSubsample2x2
 
static const Pixel redSubsample2x2
 redSubsample2x2
 
static const Pixel blueSubsample4x4
 blueSubsample4x4
 
static const Pixel redSubsample4x4
 redSubsample4x4
 
static const Pixel by2x2
 by2x2
 
static const Pixel by4x4
 by4x4
 

Friends

struct DataModel::Detail::Befriend< Pixel >
 
std::ostream & operator<< (std::ostream &stream, const Pixel::ValueType &value)
 Operator to serialize ValueType to a stream.
 
std::ostream & operator<< (std::ostream &stream, const Pixel &value)
 Operator to serialize the value to a stream.
 

Detailed Description

Set the pixel sampling to use for the 2D capture. This setting defines how the camera sensor is sampled. When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended.

Member Enumeration Documentation

◆ ValueType

The type of the underlying value.

Enumerator
all 
blueSubsample2x2 
redSubsample2x2 
blueSubsample4x4 
redSubsample4x4 
by2x2 
by4x4 

Constructor & Destructor Documentation

◆ Pixel() [1/2]

Zivid::Settings2D::Sampling::Pixel::Pixel ( )
default

Default constructor.

◆ Pixel() [2/2]

Zivid::Settings2D::Sampling::Pixel::Pixel ( ValueType value)
inlineexplicitconstexpr

Constructor.

Member Function Documentation

◆ hasValue()

bool Zivid::Settings2D::Sampling::Pixel::hasValue ( ) const

Check if the value is set.

◆ operator!=()

bool Zivid::Settings2D::Sampling::Pixel::operator!= ( const Pixel & other) const
inline

Comparison operator.

◆ operator==()

bool Zivid::Settings2D::Sampling::Pixel::operator== ( const Pixel & other) const
inline

Comparison operator.

◆ reset()

void Zivid::Settings2D::Sampling::Pixel::reset ( )

Reset the node to unset state.

◆ toString()

std::string Zivid::Settings2D::Sampling::Pixel::toString ( ) const

Get the value as string.

◆ validValues()

static std::set< ValueType > Zivid::Settings2D::Sampling::Pixel::validValues ( )
inlinestatic

All valid values of Pixel.

◆ value()

ValueType Zivid::Settings2D::Sampling::Pixel::value ( ) const

Get the value.

If this object does not contain a value (see hasValue) then this method throws an exception.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< Pixel >

friend struct DataModel::Detail::Befriend< Pixel >
friend

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & stream,
const Pixel & value )
friend

Operator to serialize the value to a stream.

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream & stream,
const Pixel::ValueType & value )
friend

Operator to serialize ValueType to a stream.

Member Data Documentation

◆ all

const Pixel Zivid::Settings2D::Sampling::Pixel::all
static

all

◆ blueSubsample2x2

const Pixel Zivid::Settings2D::Sampling::Pixel::blueSubsample2x2
static

blueSubsample2x2

◆ blueSubsample4x4

const Pixel Zivid::Settings2D::Sampling::Pixel::blueSubsample4x4
static

blueSubsample4x4

◆ by2x2

const Pixel Zivid::Settings2D::Sampling::Pixel::by2x2
static

by2x2

◆ by4x4

const Pixel Zivid::Settings2D::Sampling::Pixel::by4x4
static

by4x4

◆ description

const char* Zivid::Settings2D::Sampling::Pixel::description
staticconstexpr
Initial value:
{
R"description(Set the pixel sampling to use for the 2D capture. This setting defines how the camera sensor is sampled.
When doing 2D+3D capture, picking the same value that is used for 3D is generally recommended.
)description"
}

The description for this value.

◆ name

const char* Zivid::Settings2D::Sampling::Pixel::name { "Pixel" }
staticconstexpr

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::Settings2D::Sampling::Pixel::nodeType = DataModel::NodeType::leafValue
staticconstexpr

The type of this node.

◆ path

const char* Zivid::Settings2D::Sampling::Pixel::path { "Sampling/Pixel" }
staticconstexpr

The full path for this value.

◆ redSubsample2x2

const Pixel Zivid::Settings2D::Sampling::Pixel::redSubsample2x2
static

redSubsample2x2

◆ redSubsample4x4

const Pixel Zivid::Settings2D::Sampling::Pixel::redSubsample4x4
static

redSubsample4x4


The documentation for this class was generated from the following file: