Zivid C++ API 2.13.1+18e79e79-1
Zivid::Settings::Sampling::Color Class Reference

Choose how to sample colors for the point cloud. The rgb option gives a 2D image with full colors. The grayscale option gives a grayscale (r=g=b) 2D image, which can be acquired faster than full colors. The disabled option gives no colors and can allow for even faster captures. More...

#include <Zivid/Settings.h>

Public Types

enum class  ValueType { rgb , disabled , grayscale }
 The type of the underlying value. More...
 

Public Member Functions

 Color ()=default
 Default constructor.
 
constexpr Color (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 Color &other) const
 Comparison operator.
 
bool operator!= (const Color &other) const
 Comparison operator.
 

Static Public Member Functions

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

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue
 The type of this node.
 
static constexpr const char * path { "Sampling/Color" }
 The full path for this value.
 
static constexpr const char * name { "Color" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 
static const Color rgb
 rgb
 
static const Color disabled
 disabled
 
static const Color grayscale
 grayscale
 

Friends

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

Detailed Description

Choose how to sample colors for the point cloud. The rgb option gives a 2D image with full colors. The grayscale option gives a grayscale (r=g=b) 2D image, which can be acquired faster than full colors. The disabled option gives no colors and can allow for even faster captures.

The grayscale option is not available on all camera models.

Member Enumeration Documentation

◆ ValueType

The type of the underlying value.

Enumerator
rgb 
disabled 
grayscale 

Constructor & Destructor Documentation

◆ Color() [1/2]

Zivid::Settings::Sampling::Color::Color ( )
default

Default constructor.

◆ Color() [2/2]

Zivid::Settings::Sampling::Color::Color ( ValueType value)
inlineexplicitconstexpr

Constructor.

Member Function Documentation

◆ hasValue()

bool Zivid::Settings::Sampling::Color::hasValue ( ) const

Check if the value is set.

◆ operator!=()

bool Zivid::Settings::Sampling::Color::operator!= ( const Color & other) const
inline

Comparison operator.

◆ operator==()

bool Zivid::Settings::Sampling::Color::operator== ( const Color & other) const
inline

Comparison operator.

◆ reset()

void Zivid::Settings::Sampling::Color::reset ( )

Reset the node to unset state.

◆ toString()

std::string Zivid::Settings::Sampling::Color::toString ( ) const

Get the value as string.

◆ validValues()

static std::set< ValueType > Zivid::Settings::Sampling::Color::validValues ( )
inlinestatic

All valid values of Color.

◆ value()

ValueType Zivid::Settings::Sampling::Color::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< Color >

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

◆ operator<< [1/2]

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

Operator to serialize the value to a stream.

◆ operator<< [2/2]

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

Operator to serialize ValueType to a stream.

Member Data Documentation

◆ description

const char* Zivid::Settings::Sampling::Color::description
staticconstexpr
Initial value:
{
R"description(Choose how to sample colors for the point cloud. The `rgb` option gives a 2D image
with full colors. The `grayscale` option gives a grayscale (r=g=b) 2D image, which
can be acquired faster than full colors. The `disabled` option gives no colors and
can allow for even faster captures.
The `grayscale` option is not available on all camera models.
)description"
}

The description for this value.

◆ disabled

const Color Zivid::Settings::Sampling::Color::disabled
static

disabled

◆ grayscale

const Color Zivid::Settings::Sampling::Color::grayscale
static

grayscale

◆ name

const char* Zivid::Settings::Sampling::Color::name { "Color" }
staticconstexpr

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::Settings::Sampling::Color::nodeType = DataModel::NodeType::leafValue
staticconstexpr

The type of this node.

◆ path

const char* Zivid::Settings::Sampling::Color::path { "Sampling/Color" }
staticconstexpr

The full path for this value.

◆ rgb

const Color Zivid::Settings::Sampling::Color::rgb
static

rgb


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