Zivid C++ API 2.13.1+18e79e79-1
Zivid::Settings2D Class Reference

Settings used when capturing 2D images with a Zivid camera. More...

#include <Zivid/Settings2D.h>

Classes

class  Acquisition
 Settings for a single acquisition. More...
 
class  Acquisitions
 List of acquisitions. Note that the Zivid SDK only supports a single acquisition per capture in 2D mode. More...
 
class  Processing
 Processing related settings. More...
 
class  Sampling
 Sampling settings. More...
 

Public Types

using Descendants
 

Public Member Functions

 Settings2D ()
 Default constructor.
 
 Settings2D (const std::string &fileName)
 Construct Settings2D by loading from file.
 
std::string serialize () const
 Serialize to a string.
 
template<typename... Args>
 Settings2D (Args &&...args)
 Constructor taking variadic number of arguments.
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
 
template<typename... Args>
Settings2D copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
 
const Acquisitionsacquisitions () const
 Get Acquisitions.
 
Acquisitionsacquisitions ()
 Get Acquisitions.
 
Settings2Dset (const Acquisitions &value)
 Set Acquisitions.
 
const Processingprocessing () const
 Get Processing.
 
Processingprocessing ()
 Get Processing.
 
Settings2Dset (const Processing &value)
 Set Processing.
 
Settings2Dset (const Processing::Color &value)
 Set Processing::Color.
 
Settings2Dset (const Processing::Color::Balance &value)
 Set Processing::Color::Balance.
 
Settings2Dset (const Processing::Color::Balance::Blue &value)
 Set Processing::Color::Balance::Blue.
 
Settings2Dset (const Processing::Color::Balance::Green &value)
 Set Processing::Color::Balance::Green.
 
Settings2Dset (const Processing::Color::Balance::Red &value)
 Set Processing::Color::Balance::Red.
 
Settings2Dset (const Processing::Color::Gamma &value)
 Set Processing::Color::Gamma.
 
const Samplingsampling () const
 Get Sampling.
 
Samplingsampling ()
 Get Sampling.
 
Settings2Dset (const Sampling &value)
 Set Sampling.
 
Settings2Dset (const Sampling::Color &value)
 Set Sampling::Color.
 
Settings2Dset (const Sampling::Pixel &value)
 Set Sampling::Pixel.
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Acquisitions >::value, int >::type = 0>
const Settings2D::Acquisitionsget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing >::value, int >::type = 0>
const Settings2D::Processingget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color >::value, int >::type = 0>
const Settings2D::Processing::Colorget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance >::value, int >::type = 0>
const Settings2D::Processing::Color::Balanceget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Blue >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Blueget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Green >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Greenget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Red >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Redget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Gamma >::value, int >::type = 0>
const Settings2D::Processing::Color::Gammaget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling >::value, int >::type = 0>
const Settings2D::Samplingget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling::Color >::value, int >::type = 0>
const Settings2D::Sampling::Colorget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling::Pixel >::value, int >::type = 0>
const Settings2D::Sampling::Pixelget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const Settings2D::Acquisitionsget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings2D::Processingget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings2D::Samplingget () const
 
template<typename F >
void forEach (const F &f) const
 Run the given function on each direct member with the value of the member as parameter.
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter.
 
bool operator== (const Settings2D &other) const
 Equality operator.
 
bool operator!= (const Settings2D &other) const
 Inequality operator.
 
std::string toString () const
 Get the value as string.
 
void save (const std::string &fileName) const
 Save to the given file.
 
void load (const std::string &fileName)
 Load from the given file.
 

Static Public Member Functions

static ZIVID_NODISCARD Settings2D fromSerialized (const std::string &value)
 Construct a new Settings2D instance from a previously serialized string.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node.
 
static constexpr const char * path { "" }
 The full path for this value.
 
static constexpr const char * name { "Settings2D" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 
static constexpr size_t version { 5 }
 

Friends

struct DataModel::Detail::Befriend< Settings2D >
 
std::ostream & operator<< (std::ostream &stream, const Settings2D &value)
 Operator to send the value as string to a stream.
 

Detailed Description

Settings used when capturing 2D images with a Zivid camera.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
Settings2D::Acquisitions,
Settings2D::Processing,
Settings2D::Processing::Color,
Settings2D::Processing::Color::Balance,
Settings2D::Processing::Color::Balance::Blue,
Settings2D::Processing::Color::Balance::Green,
Settings2D::Processing::Color::Balance::Red,
Settings2D::Processing::Color::Gamma,
Settings2D::Sampling,
Settings2D::Sampling::Color,
Settings2D::Sampling::Pixel>

Constructor & Destructor Documentation

◆ Settings2D() [1/3]

Zivid::Settings2D::Settings2D ( )

Default constructor.

◆ Settings2D() [2/3]

Zivid::Settings2D::Settings2D ( const std::string & fileName)
explicit

Construct Settings2D by loading from file.

◆ Settings2D() [3/3]

template<typename... Args>
Zivid::Settings2D::Settings2D ( Args &&... args)
inlineexplicit

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Settings2D then invoking set(args).

The provided arguments must be descendants of Settings2D. These types can be provided:

Member Function Documentation

◆ acquisitions() [1/2]

Acquisitions & Zivid::Settings2D::acquisitions ( )
inline

◆ acquisitions() [2/2]

const Acquisitions & Zivid::Settings2D::acquisitions ( ) const
inline

◆ copyWith()

template<typename... Args>
Settings2D Zivid::Settings2D::copyWith ( Args &&... args) const
inline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Settings2D object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Settings2D. These types can be provided:

◆ forEach() [1/2]

template<typename F >
void Zivid::Settings2D::forEach ( const F & f)
inline

Run the given function on each direct member with the value of the member as parameter.

◆ forEach() [2/2]

template<typename F >
void Zivid::Settings2D::forEach ( const F & f) const
inline

Run the given function on each direct member with the value of the member as parameter.

◆ fromSerialized()

static ZIVID_NODISCARD Settings2D Zivid::Settings2D::fromSerialized ( const std::string & value)
static

Construct a new Settings2D instance from a previously serialized string.

See also serialize.

◆ get() [1/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Acquisitions >::value, int >::type = 0>
const Settings2D::Acquisitions & Zivid::Settings2D::get ( ) const
inline

◆ get() [2/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing >::value, int >::type = 0>
const Settings2D::Processing & Zivid::Settings2D::get ( ) const
inline

◆ get() [3/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color >::value, int >::type = 0>
const Settings2D::Processing::Color & Zivid::Settings2D::get ( ) const
inline

◆ get() [4/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance & Zivid::Settings2D::get ( ) const
inline

◆ get() [5/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Blue >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Blue & Zivid::Settings2D::get ( ) const
inline

◆ get() [6/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Green >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Green & Zivid::Settings2D::get ( ) const
inline

◆ get() [7/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Balance::Red >::value, int >::type = 0>
const Settings2D::Processing::Color::Balance::Red & Zivid::Settings2D::get ( ) const
inline

◆ get() [8/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Processing::Color::Gamma >::value, int >::type = 0>
const Settings2D::Processing::Color::Gamma & Zivid::Settings2D::get ( ) const
inline

◆ get() [9/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling >::value, int >::type = 0>
const Settings2D::Sampling & Zivid::Settings2D::get ( ) const
inline

◆ get() [10/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling::Color >::value, int >::type = 0>
const Settings2D::Sampling::Color & Zivid::Settings2D::get ( ) const
inline

◆ get() [11/14]

template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Sampling::Pixel >::value, int >::type = 0>
const Settings2D::Sampling::Pixel & Zivid::Settings2D::get ( ) const
inline

◆ get() [12/14]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const Settings2D::Acquisitions & Zivid::Settings2D::get ( ) const
inline

◆ get() [13/14]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings2D::Processing & Zivid::Settings2D::get ( ) const
inline

◆ get() [14/14]

template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings2D::Sampling & Zivid::Settings2D::get ( ) const
inline

◆ load()

void Zivid::Settings2D::load ( const std::string & fileName)

Load from the given file.

◆ operator!=()

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

Inequality operator.

◆ operator==()

bool Zivid::Settings2D::operator== ( const Settings2D & other) const

Equality operator.

◆ processing() [1/2]

Processing & Zivid::Settings2D::processing ( )
inline

Get Processing.

◆ processing() [2/2]

const Processing & Zivid::Settings2D::processing ( ) const
inline

Get Processing.

◆ sampling() [1/2]

Sampling & Zivid::Settings2D::sampling ( )
inline

Get Sampling.

◆ sampling() [2/2]

const Sampling & Zivid::Settings2D::sampling ( ) const
inline

Get Sampling.

◆ save()

void Zivid::Settings2D::save ( const std::string & fileName) const

Save to the given file.

◆ serialize()

std::string Zivid::Settings2D::serialize ( ) const

Serialize to a string.

See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

◆ set() [1/12]

template<typename... Args>
void Zivid::Settings2D::set ( Args &&... args)
inline

◆ set() [2/12]

Settings2D & Zivid::Settings2D::set ( const Acquisitions & value)
inline

◆ set() [3/12]

Settings2D & Zivid::Settings2D::set ( const Processing & value)
inline

Set Processing.

◆ set() [4/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color & value)
inline

◆ set() [5/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color::Balance & value)
inline

◆ set() [6/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color::Balance::Blue & value)
inline

◆ set() [7/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color::Balance::Green & value)
inline

◆ set() [8/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color::Balance::Red & value)
inline

◆ set() [9/12]

Settings2D & Zivid::Settings2D::set ( const Processing::Color::Gamma & value)
inline

◆ set() [10/12]

Settings2D & Zivid::Settings2D::set ( const Sampling & value)
inline

Set Sampling.

◆ set() [11/12]

Settings2D & Zivid::Settings2D::set ( const Sampling::Color & value)
inline

◆ set() [12/12]

Settings2D & Zivid::Settings2D::set ( const Sampling::Pixel & value)
inline

◆ toString()

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

Get the value as string.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< Settings2D >

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

◆ operator<<

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

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

const char* Zivid::Settings2D::description
staticconstexpr
Initial value:
{
R"description(Settings used when capturing 2D images with a Zivid camera.)description"
}

The description for this value.

◆ name

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

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::Settings2D::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node.

◆ path

const char* Zivid::Settings2D::path { "" }
staticconstexpr

The full path for this value.

◆ version

size_t Zivid::Settings2D::version { 5 }
staticconstexpr

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