68# pragma warning(disable : 4251)
84 static constexpr const char *path{
"" };
87 static constexpr const char *name{
"Settings2D" };
90 static constexpr const char *description{
91 R
"description(Settings used when capturing 2D images with a Zivid camera.)description"
94 static constexpr size_t version{ 4 };
104 static constexpr std::array<uint8_t, 3> binaryId{
's',
't',
'2' };
118 static constexpr const char *path{
"Acquisition" };
121 static constexpr const char *name{
"Acquisition" };
124 static constexpr const char *description{ R
"description(Settings for a single acquisition.)description" };
138 static constexpr const char *path{
"Acquisition/Aperture" };
141 static constexpr const char *name{
"Aperture" };
144 static constexpr const char *description{
145 R
"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
146the effective aperture diameter).
156 return { 1.4, 32.0 };
164 : m_opt{ verifyValue(value) }
185 return m_opt == other.m_opt;
191 return m_opt != other.m_opt;
197 return m_opt < other.m_opt;
203 return m_opt > other.m_opt;
209 return m_opt <= other.m_opt;
215 return m_opt >= other.m_opt;
225 void setFromString(
const std::string &value);
227 constexpr ValueType
static verifyValue(
const ValueType &value)
229 return validRange().isInRange(value)
231 :
throw std::out_of_range{
"Aperture{ " + std::to_string(value) +
" } is not in range ["
232 + std::to_string(validRange().min()) +
", "
233 + std::to_string(validRange().max()) +
"]" };
236 Zivid::DataModel::Detail::Optional<double> m_opt;
238 friend struct DataModel::Detail::Befriend<
Aperture>;
261 static constexpr const char *path{
"Acquisition/Brightness" };
264 static constexpr const char *name{
"Brightness" };
267 static constexpr const char *description{
268 R
"description(Brightness controls the light output from the projector.
270Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
271or in case of high levels of ambient lighting.
273When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
274can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated
275over a 10 second period. This limitation is enforced automatically by the camera. Calling capture
276when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a
277duration of time to cool down, before capture will start.
295 : m_opt{ verifyValue(value) }
316 return m_opt == other.m_opt;
322 return m_opt != other.m_opt;
328 return m_opt < other.m_opt;
334 return m_opt > other.m_opt;
340 return m_opt <= other.m_opt;
346 return m_opt >= other.m_opt;
356 void setFromString(
const std::string &value);
358 constexpr ValueType
static verifyValue(
const ValueType &value)
360 return validRange().isInRange(value)
362 :
throw std::out_of_range{
"Brightness{ " + std::to_string(value)
363 +
" } is not in range [" + std::to_string(validRange().min())
364 +
", " + std::to_string(validRange().max()) +
"]" };
367 Zivid::DataModel::Detail::Optional<double> m_opt;
369 friend struct DataModel::Detail::Befriend<
Brightness>;
382 static constexpr const char *path{
"Acquisition/ExposureTime" };
385 static constexpr const char *name{
"ExposureTime" };
388 static constexpr const char *description{ R
"description(Exposure time for the image.)description" };
396 return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
404 : m_opt{ verifyValue(value) }
411 std::chrono::microseconds
value()
const;
425 return m_opt == other.m_opt;
431 return m_opt != other.m_opt;
437 return m_opt < other.m_opt;
443 return m_opt > other.m_opt;
449 return m_opt <= other.m_opt;
455 return m_opt >= other.m_opt;
465 void setFromString(
const std::string &value);
467 constexpr ValueType
static verifyValue(
const ValueType &value)
469 return validRange().isInRange(value)
471 :
throw std::out_of_range{
"ExposureTime{ " + std::to_string(value.count())
472 +
" } is not in range ["
473 + std::to_string(validRange().min().count()) +
", "
474 + std::to_string(validRange().max().count()) +
"]" };
477 Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
479 friend struct DataModel::Detail::Befriend<
ExposureTime>;
492 static constexpr const char *path{
"Acquisition/Gain" };
495 static constexpr const char *name{
"Gain" };
498 static constexpr const char *description{ R
"description(Analog gain in the camera.)description" };
513 explicit constexpr Gain(
double value)
514 : m_opt{ verifyValue(value) }
535 return m_opt == other.m_opt;
541 return m_opt != other.m_opt;
547 return m_opt < other.m_opt;
553 return m_opt > other.m_opt;
559 return m_opt <= other.m_opt;
565 return m_opt >= other.m_opt;
575 void setFromString(
const std::string &value);
577 constexpr ValueType
static verifyValue(
const ValueType &value)
579 return validRange().isInRange(value)
581 :
throw std::out_of_range{
"Gain{ " + std::to_string(value) +
" } is not in range ["
582 + std::to_string(validRange().min()) +
", "
583 + std::to_string(validRange().max()) +
"]" };
586 Zivid::DataModel::Detail::Optional<double> m_opt;
588 friend struct DataModel::Detail::Befriend<
Gain>;
617 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
618 typename std::enable_if<
619 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
623 template<typename... Args>
627 using namespace Zivid::Detail::TypeTraits;
630 AllArgsDecayedAreUnique<Args...>::value,
631 "Found duplicate types among the arguments passed to Acquisition(...). "
632 "Types should be listed at most once.");
634 set(std::forward<Args>(args)...);
651 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
653 template<typename... Args>
657 using namespace Zivid::Detail::TypeTraits;
659 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
661 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
664 AllArgsDecayedAreUnique<Args...>::value,
665 "Found duplicate types among the arguments passed to set(...). "
666 "Types should be listed at most once.");
668 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
686 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
688 template<typename... Args>
692 using namespace Zivid::Detail::TypeTraits;
694 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
696 AllArgsAreDescendantNodes::value,
697 "All arguments passed to copyWith(...) must be descendant nodes.");
700 AllArgsDecayedAreUnique<Args...>::value,
701 "Found duplicate types among the arguments passed to copyWith(...). "
702 "Types should be listed at most once.");
705 copy.
set(std::forward<Args>(args)...);
743 m_brightness = value;
750 return m_exposureTime;
756 return m_exposureTime;
762 m_exposureTime = value;
787 typename std::enable_if<std::is_same<T, Settings2D::Acquisition::Aperture>::value,
int>::type = 0>
795 typename std::enable_if<std::is_same<T, Settings2D::Acquisition::Brightness>::value,
int>::type = 0>
803 typename std::enable_if<std::is_same<T, Settings2D::Acquisition::ExposureTime>::value,
int>::type = 0>
806 return m_exposureTime;
811 typename std::enable_if<std::is_same<T, Settings2D::Acquisition::Gain>::value,
int>::type = 0>
817 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
823 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
829 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
832 return m_exposureTime;
835 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
877 void setFromString(
const std::string &value);
879 void setFromString(
const std::string &fullPath,
const std::string &value);
881 std::string getString(
const std::string &fullPath)
const;
884 Brightness m_brightness;
885 ExposureTime m_exposureTime;
888 friend struct DataModel::Detail::Befriend<
Acquisition>;
901 static constexpr const char *path{
"Acquisitions" };
904 static constexpr const char *name{
"Acquisitions" };
907 static constexpr const char *description{
908 R
"description(List of acquisitions. Note that the Zivid SDK only supports a single acquisition per capture in 2D mode.)description"
917 return { 0, std::numeric_limits<ValueType::size_type>::max() };
925 : m_value{ std::move(value) }
929 explicit Acquisitions(std::initializer_list<Settings2D::Acquisition> value)
934 const std::vector<Settings2D::Acquisition> &
value()
const;
940 std::size_t
size() const noexcept;
943 bool isEmpty() const noexcept;
950 template<typename... Args>
951 void emplaceBack(Args &&...args)
953 m_value.emplace_back(std::forward<Args>(args)...);
988 for(
auto &child : m_value)
998 for(
const auto &child : m_value)
1005 using Iterator = std::vector<Settings2D::Acquisition>::iterator;
1031 return m_value == other.m_value;
1037 return m_value != other.m_value;
1047 void setFromString(
const std::string &value);
1049 std::vector<Settings2D::Acquisition> m_value{};
1051 friend struct DataModel::Detail::Befriend<
Acquisitions>;
1064 static constexpr const char *path{
"Processing" };
1067 static constexpr const char *name{
"Processing" };
1070 static constexpr const char *description{ R
"description(Processing related settings.)description" };
1082 static constexpr const char *path{
"Processing/Color" };
1085 static constexpr const char *name{
"Color" };
1088 static constexpr const char *description{ R
"description(Color settings.)description" };
1100 static constexpr const char *path{
"Processing/Color/Balance" };
1103 static constexpr const char *name{
"Balance" };
1106 static constexpr const char *description{ R
"description(Color balance settings.)description" };
1118 static constexpr const char *path{
"Processing/Color/Balance/Blue" };
1121 static constexpr const char *name{
"Blue" };
1124 static constexpr const char *description{
1125 R
"description(Digital gain applied to blue channel.)description"
1134 return { 1.0, 8.0 };
1141 explicit constexpr Blue(
double value)
1142 : m_opt{ verifyValue(value) }
1163 return m_opt == other.m_opt;
1169 return m_opt != other.m_opt;
1175 return m_opt < other.m_opt;
1181 return m_opt > other.m_opt;
1187 return m_opt <= other.m_opt;
1193 return m_opt >= other.m_opt;
1203 void setFromString(
const std::string &value);
1205 constexpr ValueType
static verifyValue(
const ValueType &value)
1207 return validRange().isInRange(value)
1209 :
throw std::out_of_range{
"Blue{ " + std::to_string(value)
1210 +
" } is not in range ["
1211 + std::to_string(validRange().min()) +
", "
1212 + std::to_string(validRange().max()) +
"]" };
1215 Zivid::DataModel::Detail::Optional<double> m_opt;
1217 friend struct DataModel::Detail::Befriend<
Blue>;
1230 static constexpr const char *path{
"Processing/Color/Balance/Green" };
1233 static constexpr const char *name{
"Green" };
1236 static constexpr const char *description{
1237 R
"description(Digital gain applied to green channel.)description"
1246 return { 1.0, 8.0 };
1254 : m_opt{ verifyValue(value) }
1275 return m_opt == other.m_opt;
1281 return m_opt != other.m_opt;
1287 return m_opt < other.m_opt;
1293 return m_opt > other.m_opt;
1299 return m_opt <= other.m_opt;
1305 return m_opt >= other.m_opt;
1315 void setFromString(
const std::string &value);
1317 constexpr ValueType
static verifyValue(
const ValueType &value)
1319 return validRange().isInRange(value)
1321 :
throw std::out_of_range{
"Green{ " + std::to_string(value)
1322 +
" } is not in range ["
1323 + std::to_string(validRange().min()) +
", "
1324 + std::to_string(validRange().max()) +
"]" };
1327 Zivid::DataModel::Detail::Optional<double> m_opt;
1329 friend struct DataModel::Detail::Befriend<
Green>;
1342 static constexpr const char *path{
"Processing/Color/Balance/Red" };
1345 static constexpr const char *name{
"Red" };
1348 static constexpr const char *description{
1349 R
"description(Digital gain applied to red channel.)description"
1358 return { 1.0, 8.0 };
1365 explicit constexpr Red(
double value)
1366 : m_opt{ verifyValue(value) }
1387 return m_opt == other.m_opt;
1393 return m_opt != other.m_opt;
1399 return m_opt < other.m_opt;
1405 return m_opt > other.m_opt;
1411 return m_opt <= other.m_opt;
1417 return m_opt >= other.m_opt;
1427 void setFromString(
const std::string &value);
1429 constexpr ValueType
static verifyValue(
const ValueType &value)
1431 return validRange().isInRange(value)
1433 :
throw std::out_of_range{
"Red{ " + std::to_string(value)
1434 +
" } is not in range ["
1435 + std::to_string(validRange().min()) +
", "
1436 + std::to_string(validRange().max()) +
"]" };
1439 Zivid::DataModel::Detail::Optional<double> m_opt;
1441 friend struct DataModel::Detail::Befriend<
Red>;
1468 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1469 typename std::enable_if<
1470 Zivid::Detail::TypeTraits::
1471 AllArgsAreInTuple<
Descendants, typename std::decay<Args>::type...>::value,
1474 template<typename... Args>
1478 using namespace Zivid::Detail::TypeTraits;
1481 AllArgsDecayedAreUnique<Args...>::value,
1482 "Found duplicate types among the arguments passed to Balance(...). "
1483 "Types should be listed at most once.");
1485 set(std::forward<Args>(args)...);
1501 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1503 template<typename... Args>
1507 using namespace Zivid::Detail::TypeTraits;
1509 using AllArgsAreDescendantNodes =
1510 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1512 AllArgsAreDescendantNodes::value,
1513 "All arguments passed to set(...) must be descendant nodes.");
1516 AllArgsDecayedAreUnique<Args...>::value,
1517 "Found duplicate types among the arguments passed to set(...). "
1518 "Types should be listed at most once.");
1520 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1537 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1539 template<typename... Args>
1543 using namespace Zivid::Detail::TypeTraits;
1545 using AllArgsAreDescendantNodes =
1546 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1548 AllArgsAreDescendantNodes::value,
1549 "All arguments passed to copyWith(...) must be descendant nodes.");
1552 AllArgsDecayedAreUnique<Args...>::value,
1553 "Found duplicate types among the arguments passed to copyWith(...). "
1554 "Types should be listed at most once.");
1557 copy.
set(std::forward<Args>(args)...);
1620 typename std::enable_if<
1621 std::is_same<T, Settings2D::Processing::Color::Balance::Blue>::value,
1630 typename std::enable_if<
1631 std::is_same<T, Settings2D::Processing::Color::Balance::Green>::value,
1640 typename std::enable_if<
1641 std::is_same<T, Settings2D::Processing::Color::Balance::Red>::value,
1648 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1654 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1660 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1667 template<
typename F>
1676 template<
typename F>
1700 void setFromString(
const std::string &value);
1702 void setFromString(
const std::string &fullPath,
const std::string &value);
1704 std::string getString(
const std::string &fullPath)
const;
1710 friend struct DataModel::Detail::Befriend<
Balance>;
1725 static constexpr const char *path{
"Processing/Color/Gamma" };
1728 static constexpr const char *name{
"Gamma" };
1731 static constexpr const char *description{
1732 R
"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
1733greater than 1 makes the colors darker.
1743 return { 0.25, 1.5 };
1751 : m_opt{ verifyValue(value) }
1772 return m_opt == other.m_opt;
1778 return m_opt != other.m_opt;
1784 return m_opt < other.m_opt;
1790 return m_opt > other.m_opt;
1796 return m_opt <= other.m_opt;
1802 return m_opt >= other.m_opt;
1812 void setFromString(
const std::string &value);
1814 constexpr ValueType
static verifyValue(
const ValueType &value)
1816 return validRange().isInRange(value)
1818 :
throw std::out_of_range{
"Gamma{ " + std::to_string(value) +
" } is not in range ["
1819 + std::to_string(validRange().min()) +
", "
1820 + std::to_string(validRange().max()) +
"]" };
1823 Zivid::DataModel::Detail::Optional<double> m_opt;
1825 friend struct DataModel::Detail::Befriend<
Gamma>;
1856 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1857 typename std::enable_if<
1858 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
1862 template<typename... Args>
1866 using namespace Zivid::Detail::TypeTraits;
1869 AllArgsDecayedAreUnique<Args...>::value,
1870 "Found duplicate types among the arguments passed to Color(...). "
1871 "Types should be listed at most once.");
1873 set(std::forward<Args>(args)...);
1891 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1893 template<typename... Args>
1897 using namespace Zivid::Detail::TypeTraits;
1899 using AllArgsAreDescendantNodes =
1900 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1902 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
1905 AllArgsDecayedAreUnique<Args...>::value,
1906 "Found duplicate types among the arguments passed to set(...). "
1907 "Types should be listed at most once.");
1909 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1928 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1930 template<typename... Args>
1934 using namespace Zivid::Detail::TypeTraits;
1936 using AllArgsAreDescendantNodes =
1937 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1939 AllArgsAreDescendantNodes::value,
1940 "All arguments passed to copyWith(...) must be descendant nodes.");
1943 AllArgsDecayedAreUnique<Args...>::value,
1944 "Found duplicate types among the arguments passed to copyWith(...). "
1945 "Types should be listed at most once.");
1948 copy.
set(std::forward<Args>(args)...);
1974 m_balance.
set(value);
1981 m_balance.
set(value);
1988 m_balance.
set(value);
2013 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance>::value,
int>::type =
2022 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Blue>::value,
int>::
2032 enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Green>::value,
int>::type = 0>
2040 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Red>::value,
int>::
2049 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Gamma>::value,
int>::type =
2056 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2062 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2069 template<
typename F>
2077 template<
typename F>
2100 void setFromString(
const std::string &value);
2102 void setFromString(
const std::string &fullPath,
const std::string &value);
2104 std::string getString(
const std::string &fullPath)
const;
2109 friend struct DataModel::Detail::Befriend<
Color>;
2142 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
2143 typename std::enable_if<
2144 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
2148 template<typename... Args>
2152 using namespace Zivid::Detail::TypeTraits;
2155 AllArgsDecayedAreUnique<Args...>::value,
2156 "Found duplicate types among the arguments passed to Processing(...). "
2157 "Types should be listed at most once.");
2159 set(std::forward<Args>(args)...);
2178 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
2180 template<typename... Args>
2184 using namespace Zivid::Detail::TypeTraits;
2186 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2188 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
2191 AllArgsDecayedAreUnique<Args...>::value,
2192 "Found duplicate types among the arguments passed to set(...). "
2193 "Types should be listed at most once.");
2195 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
2215 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
2217 template<typename... Args>
2221 using namespace Zivid::Detail::TypeTraits;
2223 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2225 AllArgsAreDescendantNodes::value,
2226 "All arguments passed to copyWith(...) must be descendant nodes.");
2229 AllArgsDecayedAreUnique<Args...>::value,
2230 "Found duplicate types among the arguments passed to copyWith(...). "
2231 "Types should be listed at most once.");
2234 copy.
set(std::forward<Args>(args)...);
2294 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color>::value,
int>::type = 0>
2302 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance>::value,
int>::type = 0>
2310 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Blue>::value,
int>::
2319 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Green>::value,
int>::
2328 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Red>::value,
int>::
2337 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Gamma>::value,
int>::type = 0>
2343 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2350 template<
typename F>
2357 template<
typename F>
2379 void setFromString(
const std::string &value);
2381 void setFromString(
const std::string &fullPath,
const std::string &value);
2383 std::string getString(
const std::string &fullPath)
const;
2387 friend struct DataModel::Detail::Befriend<
Processing>;
2401 static constexpr const char *path{
"Sampling" };
2404 static constexpr const char *name{
"Sampling" };
2407 static constexpr const char *description{ R
"description(Sampling settings.
2421 static constexpr const char *path{
"Sampling/Pixel" };
2424 static constexpr const char *name{
"Pixel" };
2427 static constexpr const char *description{
2428 R
"description(Use this setting to obtain an image that matches a point cloud captured with the equivalent sampling setting.
2450 return { ValueType::all,
2451 ValueType::blueSubsample2x2,
2452 ValueType::redSubsample2x2,
2453 ValueType::blueSubsample4x4,
2454 ValueType::redSubsample4x4 };
2462 : m_opt{ verifyValue(value) }
2489 return m_opt == other.m_opt;
2495 return m_opt != other.m_opt;
2505 void setFromString(
const std::string &value);
2507 constexpr ValueType
static verifyValue(
const ValueType &value)
2509 return value == ValueType::all || value == ValueType::blueSubsample2x2
2510 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
2511 || value == ValueType::redSubsample4x4
2513 :
throw std::invalid_argument{
2514 "Invalid value: Pixel{ "
2515 + std::to_string(
static_cast<std::underlying_type<ValueType>::type
>(value)) +
" }"
2519 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2521 friend struct DataModel::Detail::Befriend<
Pixel>;
2543 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
2544 typename std::enable_if<
2545 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
2549 template<typename... Args>
2553 using namespace Zivid::Detail::TypeTraits;
2556 AllArgsDecayedAreUnique<Args...>::value,
2557 "Found duplicate types among the arguments passed to Sampling(...). "
2558 "Types should be listed at most once.");
2560 set(std::forward<Args>(args)...);
2574 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
2576 template<typename... Args>
2580 using namespace Zivid::Detail::TypeTraits;
2582 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2584 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
2587 AllArgsDecayedAreUnique<Args...>::value,
2588 "Found duplicate types among the arguments passed to set(...). "
2589 "Types should be listed at most once.");
2591 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
2606 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
2608 template<typename... Args>
2612 using namespace Zivid::Detail::TypeTraits;
2614 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2616 AllArgsAreDescendantNodes::value,
2617 "All arguments passed to copyWith(...) must be descendant nodes.");
2620 AllArgsDecayedAreUnique<Args...>::value,
2621 "Found duplicate types among the arguments passed to copyWith(...). "
2622 "Types should be listed at most once.");
2625 copy.
set(std::forward<Args>(args)...);
2650 typename std::enable_if<std::is_same<T, Settings2D::Sampling::Pixel>::value,
int>::type = 0>
2656 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2663 template<
typename F>
2670 template<
typename F>
2692 void setFromString(
const std::string &value);
2694 void setFromString(
const std::string &fullPath,
const std::string &value);
2696 std::string getString(
const std::string &fullPath)
const;
2700 friend struct DataModel::Detail::Befriend<
Sampling>;
2744 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
2745 typename std::enable_if<
2746 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::value,
2749 template<typename... Args>
2753 using namespace Zivid::Detail::TypeTraits;
2756 AllArgsDecayedAreUnique<Args...>::value,
2757 "Found duplicate types among the arguments passed to Settings2D(...). "
2758 "Types should be listed at most once.");
2760 set(std::forward<Args>(args)...);
2783 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
2785 template<typename... Args>
2789 using namespace Zivid::Detail::TypeTraits;
2791 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2793 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
2796 AllArgsDecayedAreUnique<Args...>::value,
2797 "Found duplicate types among the arguments passed to set(...). "
2798 "Types should be listed at most once.");
2800 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
2824 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
2826 template<typename... Args>
2830 using namespace Zivid::Detail::TypeTraits;
2832 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2834 AllArgsAreDescendantNodes::value,
"All arguments passed to copyWith(...) must be descendant nodes.");
2837 AllArgsDecayedAreUnique<Args...>::value,
2838 "Found duplicate types among the arguments passed to copyWith(...). "
2839 "Types should be listed at most once.");
2842 copy.
set(std::forward<Args>(args)...);
2849 return m_acquisitions;
2855 return m_acquisitions;
2861 m_acquisitions = value;
2868 return m_processing;
2874 return m_processing;
2880 m_processing = value;
2887 m_processing.
set(value);
2894 m_processing.
set(value);
2901 m_processing.
set(value);
2908 m_processing.
set(value);
2915 m_processing.
set(value);
2922 m_processing.
set(value);
2948 m_sampling.
set(value);
2952 template<typename T, typename std::enable_if<std::is_same<T, Settings2D::Acquisitions>::value,
int>::type = 0>
2955 return m_acquisitions;
2958 template<typename T, typename std::enable_if<std::is_same<T, Settings2D::Processing>::value,
int>::type = 0>
2961 return m_processing;
2966 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color>::value,
int>::type = 0>
2974 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance>::value,
int>::type = 0>
2982 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Blue>::value,
int>::type =
2991 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Green>::value,
int>::type =
3000 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Balance::Red>::value,
int>::type = 0>
3008 typename std::enable_if<std::is_same<T, Settings2D::Processing::Color::Gamma>::value,
int>::type = 0>
3014 template<typename T, typename std::enable_if<std::is_same<T, Settings2D::Sampling>::value,
int>::type = 0>
3022 typename std::enable_if<std::is_same<T, Settings2D::Sampling::Pixel>::value,
int>::type = 0>
3028 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3031 return m_acquisitions;
3034 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3037 return m_processing;
3040 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3047 template<
typename F>
3056 template<
typename F>
3080 void save(
const std::string &fileName)
const;
3083 void load(
const std::string &fileName);
3086 void setFromString(
const std::string &value);
3088 void setFromString(
const std::string &fullPath,
const std::string &value);
3090 std::string getString(
const std::string &fullPath)
const;
3096 friend struct DataModel::Detail::Befriend<
Settings2D>;
3110 struct Settings2D::Version<4>
3112 using Type = Settings2D;
3119# pragma warning(pop)
3123# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
3128 struct tuple_size<
Zivid::Settings2D::Processing> : integral_constant<size_t, 1>
3132 struct tuple_element<i,
Zivid::Settings2D::Processing>
3134 static_assert(i < tuple_size<Zivid::Settings2D::Processing>::value,
"Index must be less than 1");
3137 =
decltype(declval<Zivid::Settings2D::Processing>().get<i>());
3141 struct tuple_size<
Zivid::Settings2D::Processing::Color> : integral_constant<size_t, 2>
3145 struct tuple_element<i,
Zivid::Settings2D::Processing::Color>
3147 static_assert(i < tuple_size<Zivid::Settings2D::Processing::Color>::value,
"Index must be less than 2");
3150 =
decltype(declval<Zivid::Settings2D::Processing::Color>().get<i>());
3154 struct tuple_size<
Zivid::Settings2D::Processing::Color::Balance> : integral_constant<size_t, 3>
3158 struct tuple_element<i,
Zivid::Settings2D::Processing::Color::Balance>
3161 i < tuple_size<Zivid::Settings2D::Processing::Color::Balance>::value,
3162 "Index must be less than 3");
3165 =
decltype(declval<Zivid::Settings2D::Processing::Color::Balance>().get<i>());
3169 struct tuple_size<
Zivid::Settings2D::Sampling> : integral_constant<size_t, 1>
3173 struct tuple_element<i,
Zivid::Settings2D::Sampling>
3175 static_assert(i < tuple_size<Zivid::Settings2D::Sampling>::value,
"Index must be less than 1");
3178 =
decltype(declval<Zivid::Settings2D::Sampling>().get<i>());
3182 struct tuple_size<
Zivid::Settings2D> : integral_constant<size_t, 3>
3186 struct tuple_element<i,
Zivid::Settings2D>
3188 static_assert(i < tuple_size<Zivid::Settings2D>::value,
"Index must be less than 3");
3191 =
decltype(declval<Zivid::Settings2D>().get<i>());
3200#if defined(__has_include) && !defined(NO_DOC)
3201# if __has_include("Zivid/Settings2DInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
3202# include "Zivid/Settings2DInternal.h"
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Class describing a range of values for a given type T.
Definition Range.h:73
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition Settings2D.h:132
void reset()
Reset the node to unset state.
bool operator!=(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:189
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:219
bool operator<(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:195
constexpr Aperture(double value)
Constructor.
Definition Settings2D.h:163
static constexpr Range< double > validRange()
The range of valid values for Aperture.
Definition Settings2D.h:154
bool operator>=(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:213
bool operator<=(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:207
std::string toString() const
Get the value as string.
double value() const
Get the value.
bool operator>(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:201
Aperture()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings2D.h:151
bool operator==(const Aperture &other) const
Comparison operator.
Definition Settings2D.h:183
bool hasValue() const
Check if the value is set.
Brightness controls the light output from the projector.
Definition Settings2D.h:255
bool operator==(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:314
bool operator<=(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:338
bool operator>(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:332
bool operator<(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:326
static constexpr Range< double > validRange()
The range of valid values for Brightness.
Definition Settings2D.h:285
constexpr Brightness(double value)
Constructor.
Definition Settings2D.h:294
std::string toString() const
Get the value as string.
bool operator!=(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:320
bool operator>=(const Brightness &other) const
Comparison operator.
Definition Settings2D.h:344
friend std::ostream & operator<<(std::ostream &stream, const Brightness &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:350
double value() const
Get the value.
Brightness()=default
Default constructor.
bool hasValue() const
Check if the value is set.
void reset()
Reset the node to unset state.
double ValueType
The type of the underlying value.
Definition Settings2D.h:282
Exposure time for the image.
Definition Settings2D.h:376
bool operator>(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:441
std::chrono::microseconds ValueType
The type of the underlying value.
Definition Settings2D.h:391
bool operator>=(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:453
void reset()
Reset the node to unset state.
constexpr ExposureTime(std::chrono::microseconds value)
Constructor.
Definition Settings2D.h:403
std::chrono::microseconds value() const
Get the value.
bool operator<(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:435
bool operator<=(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:447
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ExposureTime.
Definition Settings2D.h:394
bool operator!=(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:429
std::string toString() const
Get the value as string.
ExposureTime()=default
Default constructor.
bool operator==(const ExposureTime &other) const
Comparison operator.
Definition Settings2D.h:423
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:459
bool hasValue() const
Check if the value is set.
Analog gain in the camera.
Definition Settings2D.h:486
bool operator>(const Gain &other) const
Comparison operator.
Definition Settings2D.h:551
bool operator!=(const Gain &other) const
Comparison operator.
Definition Settings2D.h:539
bool operator==(const Gain &other) const
Comparison operator.
Definition Settings2D.h:533
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:569
double ValueType
The type of the underlying value.
Definition Settings2D.h:501
Gain()=default
Default constructor.
std::string toString() const
Get the value as string.
void reset()
Reset the node to unset state.
constexpr Gain(double value)
Constructor.
Definition Settings2D.h:513
double value() const
Get the value.
bool hasValue() const
Check if the value is set.
bool operator>=(const Gain &other) const
Comparison operator.
Definition Settings2D.h:563
bool operator<=(const Gain &other) const
Comparison operator.
Definition Settings2D.h:557
static constexpr Range< double > validRange()
The range of valid values for Gain.
Definition Settings2D.h:504
bool operator<(const Gain &other) const
Comparison operator.
Definition Settings2D.h:545
Settings for a single acquisition.
Definition Settings2D.h:112
const Settings2D::Acquisition::Gain & get() const
Definition Settings2D.h:812
const ExposureTime & exposureTime() const
Get ExposureTime.
Definition Settings2D.h:748
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:843
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:853
const Settings2D::Acquisition::Aperture & get() const
Definition Settings2D.h:788
ExposureTime & exposureTime()
Get ExposureTime.
Definition Settings2D.h:754
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:871
bool operator!=(const Acquisition &other) const
Inequality operator.
Acquisition & set(const Gain &value)
Set Gain.
Definition Settings2D.h:779
std::string toString() const
Get the value as string.
Acquisition & set(const Aperture &value)
Set Aperture.
Definition Settings2D.h:722
Gain & gain()
Get Gain.
Definition Settings2D.h:773
bool operator==(const Acquisition &other) const
Equality operator.
Acquisition copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:690
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:655
const Settings2D::Acquisition::ExposureTime & get() const
Definition Settings2D.h:804
Acquisition()
Default constructor.
Aperture & aperture()
Get Aperture.
Definition Settings2D.h:716
const Aperture & aperture() const
Get Aperture.
Definition Settings2D.h:710
Acquisition & set(const Brightness &value)
Set Brightness.
Definition Settings2D.h:741
const Brightness & brightness() const
Get Brightness.
Definition Settings2D.h:729
Brightness & brightness()
Get Brightness.
Definition Settings2D.h:735
std::tuple< Settings2D::Acquisition::Aperture, Settings2D::Acquisition::Brightness, Settings2D::Acquisition::ExposureTime, Settings2D::Acquisition::Gain > Descendants
Definition Settings2D.h:591
const Gain & gain() const
Get Gain.
Definition Settings2D.h:767
const Settings2D::Acquisition::Brightness & get() const
Definition Settings2D.h:796
Acquisition & set(const ExposureTime &value)
Set ExposureTime.
Definition Settings2D.h:760
List of acquisitions. Note that the Zivid SDK only supports a single acquisition per capture in 2D mo...
Definition Settings2D.h:895
const Settings2D::Acquisition & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list.
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions.
Definition Settings2D.h:915
Acquisitions(std::initializer_list< Settings2D::Acquisition > value)
Constructor.
Definition Settings2D.h:929
Settings2D::Acquisition & operator[](std::size_t pos)
Returns a reference to the element at position pos in the list.
const Settings2D::Acquisition & operator[](std::size_t pos) const
Returns a const reference to the element at position pos in the list.
Acquisitions(std::vector< Settings2D::Acquisition > value)
Constructor.
Definition Settings2D.h:924
void forEach(const F &f)
Run the given function on each element in the list.
Definition Settings2D.h:986
Settings2D::Acquisition & at(std::size_t pos)
Returns a reference to the element at position pos in the list.
void forEach(const F &f) const
Run the given function on each element in the list.
Definition Settings2D.h:996
std::vector< Settings2D::Acquisition > ValueType
The type of the underlying value.
Definition Settings2D.h:912
Iterator begin() noexcept
Returns an iterator to the first element of the list.
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:1041
std::vector< Settings2D::Acquisition >::iterator Iterator
Iterator type for Acquisitions.
Definition Settings2D.h:1005
std::vector< Settings2D::Acquisition >::const_iterator ConstIterator
Constant iterator type for Acquisitions.
Definition Settings2D.h:1014
std::size_t size() const noexcept
Get the size of the list.
bool operator!=(const Acquisitions &other) const
Comparison operator.
Definition Settings2D.h:1035
Acquisitions()=default
Default constructor.
const std::vector< Settings2D::Acquisition > & value() const
Get the value.
Digital gain applied to blue channel.
Definition Settings2D.h:1112
double value() const
Get the value.
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:1197
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1185
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1161
void reset()
Reset the node to unset state.
double ValueType
The type of the underlying value.
Definition Settings2D.h:1129
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1179
std::string toString() const
Get the value as string.
constexpr Blue(double value)
Constructor.
Definition Settings2D.h:1141
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1167
bool hasValue() const
Check if the value is set.
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings2D.h:1132
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1173
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings2D.h:1191
Blue()=default
Default constructor.
Digital gain applied to green channel.
Definition Settings2D.h:1224
double ValueType
The type of the underlying value.
Definition Settings2D.h:1241
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings2D.h:1244
bool operator==(const Green &other) const
Comparison operator.
Definition Settings2D.h:1273
std::string toString() const
Get the value as string.
constexpr Green(double value)
Constructor.
Definition Settings2D.h:1253
friend std::ostream & operator<<(std::ostream &stream, const Green &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:1309
bool operator<(const Green &other) const
Comparison operator.
Definition Settings2D.h:1285
bool hasValue() const
Check if the value is set.
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings2D.h:1297
Green()=default
Default constructor.
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings2D.h:1303
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings2D.h:1279
bool operator>(const Green &other) const
Comparison operator.
Definition Settings2D.h:1291
double value() const
Get the value.
void reset()
Reset the node to unset state.
Digital gain applied to red channel.
Definition Settings2D.h:1336
double ValueType
The type of the underlying value.
Definition Settings2D.h:1353
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:1421
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings2D.h:1415
Red()=default
Default constructor.
bool operator<(const Red &other) const
Comparison operator.
Definition Settings2D.h:1397
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings2D.h:1409
std::string toString() const
Get the value as string.
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings2D.h:1356
bool hasValue() const
Check if the value is set.
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings2D.h:1391
double value() const
Get the value.
constexpr Red(double value)
Constructor.
Definition Settings2D.h:1365
bool operator==(const Red &other) const
Comparison operator.
Definition Settings2D.h:1385
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings2D.h:1403
Color balance settings.
Definition Settings2D.h:1094
const Settings2D::Processing::Color::Balance::Red & get() const
Definition Settings2D.h:1643
Blue & blue()
Get Blue.
Definition Settings2D.h:1568
bool operator!=(const Balance &other) const
Inequality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:1677
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:1668
std::tuple< Settings2D::Processing::Color::Balance::Blue, Settings2D::Processing::Color::Balance::Green, Settings2D::Processing::Color::Balance::Red > Descendants
Definition Settings2D.h:1444
const Blue & blue() const
Get Blue.
Definition Settings2D.h:1562
bool operator==(const Balance &other) const
Equality operator.
Balance & set(const Blue &value)
Set Blue.
Definition Settings2D.h:1574
Red & red()
Get Red.
Definition Settings2D.h:1606
Green & green()
Get Green.
Definition Settings2D.h:1587
Balance & set(const Green &value)
Set Green.
Definition Settings2D.h:1593
Balance copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:1541
const Green & green() const
Get Green.
Definition Settings2D.h:1581
Balance()
Default constructor.
Balance & set(const Red &value)
Set Red.
Definition Settings2D.h:1612
const Settings2D::Processing::Color::Balance::Green & get() const
Definition Settings2D.h:1633
const Red & red() const
Get Red.
Definition Settings2D.h:1600
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:1505
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:1694
const Settings2D::Processing::Color::Balance::Blue & get() const
Definition Settings2D.h:1623
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings2D.h:1719
double ValueType
The type of the underlying value.
Definition Settings2D.h:1738
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings2D.h:1741
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1788
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1770
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:1806
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1776
bool hasValue() const
Check if the value is set.
std::string toString() const
Get the value as string.
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1782
void reset()
Reset the node to unset state.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1800
constexpr Gamma(double value)
Constructor.
Definition Settings2D.h:1750
Gamma()=default
Default constructor.
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings2D.h:1794
double value() const
Get the value.
Color settings.
Definition Settings2D.h:1076
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:1895
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings2D.h:1979
bool operator!=(const Color &other) const
Inequality operator.
bool operator==(const Color &other) const
Equality operator.
std::string toString() const
Get the value as string.
const Balance & balance() const
Get Balance.
Definition Settings2D.h:1953
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings2D.h:1972
Balance & balance()
Get Balance.
Definition Settings2D.h:1959
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2070
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:2094
const Settings2D::Processing::Color::Gamma & get() const
Definition Settings2D.h:2051
std::tuple< Settings2D::Processing::Color::Balance, Settings2D::Processing::Color::Balance::Blue, Settings2D::Processing::Color::Balance::Green, Settings2D::Processing::Color::Balance::Red, Settings2D::Processing::Color::Gamma > Descendants
Definition Settings2D.h:1828
const Settings2D::Processing::Color::Balance::Green & get() const
Definition Settings2D.h:2033
Gamma & gamma()
Get Gamma.
Definition Settings2D.h:1999
const Settings2D::Processing::Color::Balance::Red & get() const
Definition Settings2D.h:2042
Color copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:1932
const Settings2D::Processing::Color::Balance & get() const
Definition Settings2D.h:2015
Color()
Default constructor.
const Gamma & gamma() const
Get Gamma.
Definition Settings2D.h:1993
const Settings2D::Processing::Color::Balance::Blue & get() const
Definition Settings2D.h:2024
Color & set(const Balance &value)
Set Balance.
Definition Settings2D.h:1965
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2078
Color & set(const Gamma &value)
Set Gamma.
Definition Settings2D.h:2005
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings2D.h:1986
Processing related settings.
Definition Settings2D.h:1058
const Settings2D::Processing::Color & get() const
Definition Settings2D.h:2295
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings2D.h:2286
bool operator!=(const Processing &other) const
Inequality operator.
bool operator==(const Processing &other) const
Equality operator.
Processing & set(const Color &value)
Set Color.
Definition Settings2D.h:2251
const Settings2D::Processing::Color::Balance & get() const
Definition Settings2D.h:2303
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:2373
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2351
Color & color()
Get Color.
Definition Settings2D.h:2245
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:2182
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings2D.h:2265
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings2D.h:2258
const Color & color() const
Get Color.
Definition Settings2D.h:2239
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings2D.h:2279
const Settings2D::Processing::Color::Gamma & get() const
Definition Settings2D.h:2338
const Settings2D::Processing::Color::Balance::Red & get() const
Definition Settings2D.h:2330
Processing copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:2219
const Settings2D::Processing::Color::Balance::Blue & get() const
Definition Settings2D.h:2312
const Settings2D::Processing::Color::Balance::Green & get() const
Definition Settings2D.h:2321
std::string toString() const
Get the value as string.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2358
Processing()
Default constructor.
std::tuple< 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 > Descendants
Definition Settings2D.h:2112
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings2D.h:2272
Use this setting to obtain an image that matches a point cloud captured with the equivalent sampling ...
Definition Settings2D.h:2415
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings2D.h:2445
Pixel()=default
Default constructor.
constexpr Pixel(ValueType value)
Constructor.
Definition Settings2D.h:2461
ValueType
The type of the underlying value.
Definition Settings2D.h:2434
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings2D.h:2493
ValueType value() const
Get the value.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings2D.h:2487
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings2D.h:2443
static const Pixel all
all
Definition Settings2D.h:2441
static std::set< ValueType > validValues()
All valid values of Pixel.
Definition Settings2D.h:2448
std::string toString() const
Get the value as string.
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings2D.h:2442
friend std::ostream & operator<<(std::ostream &stream, const Pixel::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings2D.h:2481
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings2D.h:2499
void reset()
Reset the node to unset state.
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings2D.h:2444
bool hasValue() const
Check if the value is set.
Sampling settings.
Definition Settings2D.h:2395
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2671
bool operator==(const Sampling &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:2578
const Settings2D::Sampling::Pixel & get() const
Definition Settings2D.h:2651
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings2D.h:2642
const Pixel & pixel() const
Get Pixel.
Definition Settings2D.h:2630
Pixel & pixel()
Get Pixel.
Definition Settings2D.h:2636
std::string toString() const
Get the value as string.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:2664
std::tuple< Settings2D::Sampling::Pixel > Descendants
Definition Settings2D.h:2524
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:2686
bool operator!=(const Sampling &other) const
Inequality operator.
Sampling copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:2610
Sampling()
Default constructor.
Settings used when capturing 2D images with a Zivid camera.
Definition Settings2D.h:78
Settings2D & set(const Processing &value)
Set Processing.
Definition Settings2D.h:2878
const Settings2D::Sampling::Pixel & get() const
Definition Settings2D.h:3023
const Settings2D::Processing::Color & get() const
Definition Settings2D.h:2967
Sampling & sampling()
Get Sampling.
Definition Settings2D.h:2933
const Settings2D::Processing::Color::Balance::Red & get() const
Definition Settings2D.h:3001
const Settings2D::Processing::Color::Balance::Green & get() const
Definition Settings2D.h:2993
void save(const std::string &fileName) const
Save to the given file.
const Settings2D::Processing::Color::Balance::Blue & get() const
Definition Settings2D.h:2984
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings2D.h:2847
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:3057
Settings2D & set(const Sampling &value)
Set Sampling.
Definition Settings2D.h:2939
Settings2D(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings2D.h:2751
const Settings2D::Acquisitions & get() const
Definition Settings2D.h:2953
Settings2D()
Default constructor.
const Settings2D::Processing::Color::Gamma & get() const
Definition Settings2D.h:3009
Settings2D & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings2D.h:2859
Settings2D(const std::string &fileName)
Construct Settings2D by loading from file.
const Settings2D::Sampling & get() const
Definition Settings2D.h:3015
void load(const std::string &fileName)
Load from the given file.
const Settings2D::Processing::Color::Balance & get() const
Definition Settings2D.h:2975
Settings2D & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings2D.h:2906
bool operator!=(const Settings2D &other) const
Inequality operator.
Settings2D & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings2D.h:2892
const Settings2D::Processing & get() const
Definition Settings2D.h:2959
Settings2D & set(const Processing::Color::Balance::Red &value)
Set Processing::Color::Balance::Red.
Definition Settings2D.h:2913
void set(Args &&...args)
Set multiple arguments.
Definition Settings2D.h:2787
Processing & processing()
Get Processing.
Definition Settings2D.h:2872
const Processing & processing() const
Get Processing.
Definition Settings2D.h:2866
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::Pixel > Descendants
Definition Settings2D.h:2703
Settings2D copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings2D.h:2828
Settings2D & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings2D.h:2899
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings2D.h:2853
std::string toString() const
Get the value as string.
Settings2D & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings2D.h:2946
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings2D.h:3048
bool operator==(const Settings2D &other) const
Equality operator.
const Sampling & sampling() const
Get Sampling.
Definition Settings2D.h:2927
friend std::ostream & operator<<(std::ostream &stream, const Settings2D &value)
Operator to send the value as string to a stream.
Definition Settings2D.h:3074
Settings2D & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings2D.h:2885
Settings2D & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings2D.h:2920
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:54