Zivid C++ API  1.8.1+6967bc1b-1
Defining the Future of 3D Machine Vision
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::Settings2D Class Reference

2D Capture settings More...

#include <Zivid/Settings2D.h>

Classes

class  Brightness
 Brightness controls the light output from the projector. More...
 
class  ExposureTime
 Exposure time for the image. More...
 
class  Gain
 Analog gain in the camera More...
 
class  Iris
 Iris (aperture) setting for the camera More...
 

Public Member Functions

 ~Settings2D ()
 Destructor More...
 
 Settings2D (const Settings2D &other)
 Copy constructor More...
 
Settings2Doperator= (const Settings2D &other)
 Assignment operator More...
 
 Settings2D (Settings2D &&other) noexcept
 Move constructor More...
 
Settings2Doperator= (Settings2D &&other) noexcept
 Move assignment operator More...
 
 Settings2D ()=default
 Default constructor More...
 
void set (const std::string &fullPath, const std::string &value)
 Set a value from string by specifying the path More...
 
std::string getString (const std::string &fullPath) const
 Get a value as string by specifying the path More...
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Brightness >::value, int >::type = 0>
const Settings2D::Brightnessget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::ExposureTime >::value, int >::type = 0>
const Settings2D::ExposureTimeget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Gain >::value, int >::type = 0>
const Settings2D::Gainget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings2D::Iris >::value, int >::type = 0>
const Settings2D::Irisget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const Settings2D::Brightnessget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings2D::ExposureTimeget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings2D::Gainget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const Settings2D::Irisget () const
 
 Settings2D (const Brightness &brightness, const ExposureTime &exposureTime, const Gain &gain, const Iris &iris)
 Constructor More...
 
Settings2Dset (const Brightness &value)
 Set Brightness More...
 
const Brightnessbrightness () const
 Get Brightness More...
 
Settings2Dset (const ExposureTime &value)
 Set ExposureTime More...
 
const ExposureTimeexposureTime () const
 Get ExposureTime More...
 
Settings2Dset (const Gain &value)
 Set Gain More...
 
const Gaingain () const
 Get Gain More...
 
Settings2Dset (const Iris &value)
 Set Iris More...
 
const Irisiris () const
 Get Iris More...
 
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 More...
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter More...
 
template<typename F >
void traverseValues (const F &f) const
 Traverse the entire tree using the given function with the value of the member as parameter More...
 
template<typename F >
void traverseValues (const F &f)
 Traverse all members using the given function with the value of the member as parameter More...
 
std::string toString () const
 Get the value as string More...
 
void setFromString (const std::string &value)
 Set from the given string More...
 
bool operator== (const Settings2D &other) const
 Equality operator More...
 
bool operator!= (const Settings2D &other) const
 Inequality operator More...
 
 Settings2D (const std::string &fileName)
 Construct object by loading from file More...
 
void save (const std::string &fileName) const
 Save to the given file More...
 
void load (const std::string &fileName)
 Load from the given file More...
 

Static Public Attributes

static constexpr size_t version { 1 }
 
static constexpr bool isContainer { true }
 Whether this node contains child values More...
 
static constexpr const char * path { "" }
 The full path for this value More...
 
static constexpr const char * name { "Settings2D" }
 The name of this value More...
 
static constexpr const char * description { R"description(2D Capture settings)description" }
 The description for this value More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const Settings2D &value)
 Operator to send the value as string to a stream More...
 
std::istream & operator>> (std::istream &stream, Settings2D &value)
 Operator to set the value from a stream More...
 

Detailed Description

2D Capture settings

Constructor & Destructor Documentation

◆ ~Settings2D()

Zivid::Settings2D::~Settings2D ( )

Destructor

◆ Settings2D() [1/5]

Zivid::Settings2D::Settings2D ( const Settings2D other)

Copy constructor

◆ Settings2D() [2/5]

Zivid::Settings2D::Settings2D ( Settings2D &&  other)
noexcept

Move constructor

◆ Settings2D() [3/5]

Zivid::Settings2D::Settings2D ( )
default

Default constructor

◆ Settings2D() [4/5]

Zivid::Settings2D::Settings2D ( const Brightness brightness,
const ExposureTime exposureTime,
const Gain gain,
const Iris iris 
)
explicit

Constructor

◆ Settings2D() [5/5]

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

Construct object by loading from file

Member Function Documentation

◆ brightness()

const Brightness& Zivid::Settings2D::brightness ( ) const
inline

◆ exposureTime()

const ExposureTime& Zivid::Settings2D::exposureTime ( ) const
inline

◆ 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

◆ gain()

const Gain& Zivid::Settings2D::gain ( ) const
inline

Get Gain

◆ get() [1/8]

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

◆ get() [2/8]

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

◆ get() [3/8]

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

◆ get() [4/8]

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

◆ get() [5/8]

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

◆ get() [6/8]

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

◆ get() [7/8]

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

◆ get() [8/8]

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

◆ getString()

std::string Zivid::Settings2D::getString ( const std::string &  fullPath) const

Get a value as string by specifying the path

◆ iris()

const Iris& Zivid::Settings2D::iris ( ) const
inline

Get Iris

◆ 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=() [1/2]

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

Assignment operator

◆ operator=() [2/2]

Settings2D& Zivid::Settings2D::operator= ( Settings2D &&  other)
noexcept

Move assignment operator

◆ operator==()

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

Equality operator

◆ save()

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

Save to the given file

◆ set() [1/5]

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

◆ set() [2/5]

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

◆ set() [3/5]

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

Set Gain

◆ set() [4/5]

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

Set Iris

◆ set() [5/5]

void Zivid::Settings2D::set ( const std::string &  fullPath,
const std::string &  value 
)

Set a value from string by specifying the path

◆ setFromString()

void Zivid::Settings2D::setFromString ( const std::string &  value)

Set from the given string

◆ toString()

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

Get the value as string

◆ traverseValues() [1/2]

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

Traverse all members using the given function with the value of the member as parameter

◆ traverseValues() [2/2]

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

Traverse the entire tree using the given function with the value of the member as parameter

Friends And Related Function Documentation

◆ operator<<

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

Operator to send the value as string to a stream

◆ operator>>

std::istream& operator>> ( std::istream &  stream,
Settings2D value 
)
friend

Operator to set the value from a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::Settings2D::description { R"description(2D Capture settings)description" }
staticconstexpr

The description for this value

◆ isContainer

constexpr bool Zivid::Settings2D::isContainer { true }
staticconstexpr

Whether this node contains child values

◆ name

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

The name of this value

◆ path

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

The full path for this value

◆ version

constexpr size_t Zivid::Settings2D::version { 1 }
staticconstexpr

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