Zivid C++ API 2.17.1+7516d437-1
Zivid::Settings2D::Sampling Class Reference

Sampling settings. More...

#include <Zivid/Settings2D.h>

Classes

class  Color
 Choose how to sample colors for the 2D image. More...
class  Interval
 Sampling interval controls the interval between successive sensor operations (e.g., structured light pattern projection and image exposure), aligned to external frequencies (e.g., 50 Hz, 60 Hz grid) or to other devices (e.g., barcode scanners at 100 Hz). The requested interval is a target: the sensor operations will happen at this rate if the it can fit the chosen exposure time plus some processing overhead. Otherwise, the sampling interval is rounded up to the nearest suitable integer multiple (e.g., n * 10 ms for 100 Hz and n * 8.33 ms for 120 Hz). More...
class  Pixel
 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...

Public Types

using Descendants

Public Member Functions

 Sampling ()
 Default constructor.
template<typename... Args>
 Sampling (Args &&...args)
 Constructor taking variadic number of arguments.
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
template<typename... Args>
Sampling copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
const Colorcolor () const
 Get Color.
Colorcolor ()
 Get Color.
Samplingset (const Color &value)
 Set Color.
const Intervalinterval () const
 Get Interval.
Intervalinterval ()
 Get Interval.
Samplingset (const Interval &value)
 Set Interval.
Samplingset (const Interval::Duration &value)
 Set Interval::Duration.
Samplingset (const Interval::Enabled &value)
 Set Interval::Enabled.
const Pixelpixel () const
 Get Pixel.
Pixelpixel ()
 Get Pixel.
Samplingset (const Pixel &value)
 Set Pixel.
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::Interval >::value, int >::type = 0>
const Settings2D::Sampling::Intervalget () const
template<typename T, typename std::enable_if< std::is_same< T, Settings2D::Sampling::Interval::Duration >::value, int >::type = 0>
const Settings2D::Sampling::Interval::Durationget () const
template<typename T, typename std::enable_if< std::is_same< T, Settings2D::Sampling::Interval::Enabled >::value, int >::type = 0>
const Settings2D::Sampling::Interval::Enabledget () 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::Sampling::Colorget () const
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings2D::Sampling::Intervalget () const
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings2D::Sampling::Pixelget () 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 Sampling &other) const
 Equality operator.
bool operator!= (const Sampling &other) const
 Inequality operator.
std::string toString () const
 Get the value as string.

Static Public Attributes

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

Friends

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

Detailed Description

Sampling settings.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
Choose how to sample colors for the 2D image.
Definition Settings2D.h:2880
Duration between successive sensor operations, in microseconds. The effective interval might be round...
Definition Settings2D.h:3040
Enable or disable sampling interval.
Definition Settings2D.h:3155
Sampling interval controls the interval between successive sensor operations (e.g....
Definition Settings2D.h:3010
Set the pixel sampling to use for the 2D capture. This setting defines how the camera sensor is sampl...
Definition Settings2D.h:3460

Constructor & Destructor Documentation

◆ Sampling() [1/2]

Zivid::Settings2D::Sampling::Sampling ( )

Default constructor.

◆ Sampling() [2/2]

template<typename... Args>
Zivid::Settings2D::Sampling::Sampling ( 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 Sampling then invoking set(args).

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

Member Function Documentation

◆ color() [1/2]

Color & Zivid::Settings2D::Sampling::color ( )
inline

Get Color.

◆ color() [2/2]

const Color & Zivid::Settings2D::Sampling::color ( ) const
inline

Get Color.

◆ copyWith()

template<typename... Args>
Sampling Zivid::Settings2D::Sampling::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 Sampling 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 Sampling. These types can be provided:

◆ forEach() [1/2]

template<typename F>
void Zivid::Settings2D::Sampling::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::Sampling::forEach ( const F & f) const
inline

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

◆ get() [1/8]

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

◆ get() [2/8]

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

◆ get() [3/8]

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

◆ get() [4/8]

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

◆ get() [5/8]

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

◆ get() [6/8]

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

◆ get() [7/8]

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

◆ get() [8/8]

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

◆ interval() [1/2]

Interval & Zivid::Settings2D::Sampling::interval ( )
inline

Get Interval.

◆ interval() [2/2]

const Interval & Zivid::Settings2D::Sampling::interval ( ) const
inline

Get Interval.

◆ operator!=()

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

Inequality operator.

◆ operator==()

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

Equality operator.

◆ pixel() [1/2]

Pixel & Zivid::Settings2D::Sampling::pixel ( )
inline

Get Pixel.

◆ pixel() [2/2]

const Pixel & Zivid::Settings2D::Sampling::pixel ( ) const
inline

Get Pixel.

◆ set() [1/6]

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

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

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

◆ set() [2/6]

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

Set Color.

◆ set() [3/6]

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

Set Interval.

◆ set() [4/6]

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

◆ set() [5/6]

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

◆ set() [6/6]

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

Set Pixel.

◆ toString()

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

Get the value as string.

◆ DataModel::Detail::Befriend< Sampling >

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

◆ operator<<

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

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

const char* Zivid::Settings2D::Sampling::description
staticconstexpr
Initial value:
{ R"description(Sampling settings.
)description" }

The description for this value.

◆ name

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

The name of this value.

◆ nodeType

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

The type of this node.

◆ path

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

The full path for this value.


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