Zivid C++ API 2.8.1+dd4dffea-1
Defining the Future of 3D Machine Vision
Settings.h
Go to the documentation of this file.
1
2
3/*******************************************************************************
4
5 * This file is part of the Zivid 3D Camera API
6
7 *
8
9 * Copyright 2015-2022 (C) Zivid AS
10
11 * All rights reserved.
12
13 *
14
15 * Zivid Software License, v1.0
16
17 *
18
19 * Redistribution and use in source and binary forms, with or without
20
21 * modification, are permitted provided that the following conditions are met:
22
23 *
24
25 * 1. Redistributions of source code must retain the above copyright notice,
26
27 * this list of conditions and the following disclaimer.
28
29 *
30
31 * 2. Redistributions in binary form must reproduce the above copyright notice,
32
33 * this list of conditions and the following disclaimer in the documentation
34
35 * and/or other materials provided with the distribution.
36
37 *
38
39 * 3. Neither the name of Zivid AS nor the names of its contributors may be used
40
41 * to endorse or promote products derived from this software without specific
42
43 * prior written permission.
44
45 *
46
47 * 4. This software, with or without modification, must not be used with any
48
49 * other 3D camera than from Zivid AS.
50
51 *
52
53 * 5. Any software provided in binary form under this license must not be
54
55 * reverse engineered, decompiled, modified and/or disassembled.
56
57 *
58
59 * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
60
61 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
62
63 * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
64
65 * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
66
67 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
68
69 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
70
71 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
72
73 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
74
75 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
76
77 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78
79 *
80
81 * Contact: Zivid Customer Success Team <customersuccess@zivid.com>
82
83 * Info: http://www.zivid.com
84
85 ******************************************************************************/
86
87
88
89#pragma once
90
91#include <array>
92#include <chrono>
93#include <cmath>
94#include <ctime>
95#include <iomanip>
96#include <memory>
97#include <set>
98#include <sstream>
99#include <string>
100#include <tuple>
101#include <utility>
102#include <vector>
103
109#include "Zivid/Range.h"
110
111#ifdef _MSC_VER
112# pragma warning(push)
113# pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
114#endif
115
116namespace Zivid
117{
118
121 {
122 public:
125
127 static constexpr const char *path{ "" };
128
130 static constexpr const char *name{ "Settings" };
131
133 static constexpr const char *description{
134 R"description(Settings used when capturing with a Zivid camera)description"
135 };
136
137 static constexpr size_t version{ 12 };
138
139#ifndef NO_DOC
140 template<size_t>
141 struct Version;
142
143 using LatestVersion = Zivid::Settings;
144
145 // Short identifier. This value is not guaranteed to be universally unique
146 // Todo(ZIVID-2808): Move this to internal DataModelExt header
147 static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
148
149#endif
150
153 {
154 public:
157
159 static constexpr const char *path{ "Acquisition" };
160
162 static constexpr const char *name{ "Acquisition" };
163
165 static constexpr const char *description{ R"description(Settings for a single acquisition)description" };
166
171 {
172 public:
175
177 static constexpr const char *path{ "Acquisition/Aperture" };
178
180 static constexpr const char *name{ "Aperture" };
181
183 static constexpr const char *description{
184 R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
185the effective aperture diameter).
186)description"
187 };
188
190 using ValueType = double;
191
193 static constexpr Range<double> validRange()
194 {
195 return { 1.4, 32.0 };
196 }
197
199 Aperture() = default;
200
202 explicit constexpr Aperture(double value)
203 : m_opt{ verifyValue(value) }
204 {}
205
210 double value() const;
211
213 bool hasValue() const;
214
216 void reset();
217
219 std::string toString() const;
220
222 bool operator==(const Aperture &other) const
223 {
224 return m_opt == other.m_opt;
225 }
226
228 bool operator!=(const Aperture &other) const
229 {
230 return m_opt != other.m_opt;
231 }
232
234 bool operator<(const Aperture &other) const
235 {
236 return m_opt < other.m_opt;
237 }
238
240 bool operator>(const Aperture &other) const
241 {
242 return m_opt > other.m_opt;
243 }
244
246 friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
247 {
248 return stream << value.toString();
249 }
250
251 private:
252 void setFromString(const std::string &value);
253
254 constexpr ValueType static verifyValue(const ValueType &value)
255 {
256 return validRange().isInRange(value)
257 ? value
258 : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
259 + std::to_string(validRange().min()) + ", "
260 + std::to_string(validRange().max()) + "]" };
261 }
262
263 Zivid::DataModel::Detail::Optional<double> m_opt;
264
265 friend struct DataModel::Detail::Befriend<Aperture>;
266 };
267
280 {
281 public:
284
286 static constexpr const char *path{ "Acquisition/Brightness" };
287
289 static constexpr const char *name{ "Brightness" };
290
292 static constexpr const char *description{
293 R"description(Brightness controls the light output from the projector.
294
295Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
296or in case of high levels of ambient lighting.
297
298When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
299can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated
300over a 10 second period. This limitation is enforced automatically by the camera. Calling capture
301when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a
302duration of time to cool down, before capture will start.
303)description"
304 };
305
307 using ValueType = double;
308
310 static constexpr Range<double> validRange()
311 {
312 return { 0, 1.8 };
313 }
314
316 Brightness() = default;
317
319 explicit constexpr Brightness(double value)
320 : m_opt{ verifyValue(value) }
321 {}
322
327 double value() const;
328
330 bool hasValue() const;
331
333 void reset();
334
336 std::string toString() const;
337
339 bool operator==(const Brightness &other) const
340 {
341 return m_opt == other.m_opt;
342 }
343
345 bool operator!=(const Brightness &other) const
346 {
347 return m_opt != other.m_opt;
348 }
349
351 bool operator<(const Brightness &other) const
352 {
353 return m_opt < other.m_opt;
354 }
355
357 bool operator>(const Brightness &other) const
358 {
359 return m_opt > other.m_opt;
360 }
361
363 friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
364 {
365 return stream << value.toString();
366 }
367
368 private:
369 void setFromString(const std::string &value);
370
371 constexpr ValueType static verifyValue(const ValueType &value)
372 {
373 return validRange().isInRange(value)
374 ? value
375 : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
376 + " } is not in range [" + std::to_string(validRange().min())
377 + ", " + std::to_string(validRange().max()) + "]" };
378 }
379
380 Zivid::DataModel::Detail::Optional<double> m_opt;
381
382 friend struct DataModel::Detail::Befriend<Brightness>;
383 };
384
387 {
388 public:
391
393 static constexpr const char *path{ "Acquisition/ExposureTime" };
394
396 static constexpr const char *name{ "ExposureTime" };
397
399 static constexpr const char *description{
400 R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
401 };
402
404 using ValueType = std::chrono::microseconds;
405
408 {
409 return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
410 }
411
413 ExposureTime() = default;
414
416 explicit constexpr ExposureTime(std::chrono::microseconds value)
417 : m_opt{ verifyValue(value) }
418 {}
419
424 std::chrono::microseconds value() const;
425
427 bool hasValue() const;
428
430 void reset();
431
433 std::string toString() const;
434
436 bool operator==(const ExposureTime &other) const
437 {
438 return m_opt == other.m_opt;
439 }
440
442 bool operator!=(const ExposureTime &other) const
443 {
444 return m_opt != other.m_opt;
445 }
446
448 bool operator<(const ExposureTime &other) const
449 {
450 return m_opt < other.m_opt;
451 }
452
454 bool operator>(const ExposureTime &other) const
455 {
456 return m_opt > other.m_opt;
457 }
458
460 friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
461 {
462 return stream << value.toString();
463 }
464
465 private:
466 void setFromString(const std::string &value);
467
468 constexpr ValueType static verifyValue(const ValueType &value)
469 {
470 return validRange().isInRange(value)
471 ? value
472 : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
473 + " } is not in range ["
474 + std::to_string(validRange().min().count()) + ", "
475 + std::to_string(validRange().max().count()) + "]" };
476 }
477
478 Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
479
480 friend struct DataModel::Detail::Befriend<ExposureTime>;
481 };
482
485 {
486 public:
489
491 static constexpr const char *path{ "Acquisition/Gain" };
492
494 static constexpr const char *name{ "Gain" };
495
497 static constexpr const char *description{ R"description(Analog gain in the camera)description" };
498
500 using ValueType = double;
501
503 static constexpr Range<double> validRange()
504 {
505 return { 1, 16 };
506 }
507
509 Gain() = default;
510
512 explicit constexpr Gain(double value)
513 : m_opt{ verifyValue(value) }
514 {}
515
520 double value() const;
521
523 bool hasValue() const;
524
526 void reset();
527
529 std::string toString() const;
530
532 bool operator==(const Gain &other) const
533 {
534 return m_opt == other.m_opt;
535 }
536
538 bool operator!=(const Gain &other) const
539 {
540 return m_opt != other.m_opt;
541 }
542
544 bool operator<(const Gain &other) const
545 {
546 return m_opt < other.m_opt;
547 }
548
550 bool operator>(const Gain &other) const
551 {
552 return m_opt > other.m_opt;
553 }
554
556 friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
557 {
558 return stream << value.toString();
559 }
560
561 private:
562 void setFromString(const std::string &value);
563
564 constexpr ValueType static verifyValue(const ValueType &value)
565 {
566 return validRange().isInRange(value)
567 ? value
568 : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
569 + std::to_string(validRange().min()) + ", "
570 + std::to_string(validRange().max()) + "]" };
571 }
572
573 Zivid::DataModel::Detail::Optional<double> m_opt;
574
575 friend struct DataModel::Detail::Befriend<Gain>;
576 };
577
578 using Descendants = std::tuple<
583
586
601#ifndef NO_DOC
602 template<
603 typename... Args,
604 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
605 typename std::enable_if<
606 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
607 value,
608 int>::type = 0>
609#else
610 template<typename... Args>
611#endif
612 explicit Acquisition(Args &&...args)
613 {
614 using namespace Zivid::Detail::TypeTraits;
615
616 static_assert(
617 AllArgsDecayedAreUnique<Args...>::value,
618 "Found duplicate types among the arguments passed to Acquisition(...). "
619 "Types should be listed at most once.");
620
621 set(std::forward<Args>(args)...);
622 }
623
637#ifndef NO_DOC
638 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
639#else
640 template<typename... Args>
641#endif
642 void set(Args &&...args)
643 {
644 using namespace Zivid::Detail::TypeTraits;
645
646 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
647 static_assert(
648 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
649
650 static_assert(
651 AllArgsDecayedAreUnique<Args...>::value,
652 "Found duplicate types among the arguments passed to set(...). "
653 "Types should be listed at most once.");
654
655 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
656 }
657
672#ifndef NO_DOC
673 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
674#else
675 template<typename... Args>
676#endif
677 Acquisition copyWith(Args &&...args) const
678 {
679 using namespace Zivid::Detail::TypeTraits;
680
681 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
682 static_assert(
683 AllArgsAreDescendantNodes::value,
684 "All arguments passed to copyWith(...) must be descendant nodes.");
685
686 static_assert(
687 AllArgsDecayedAreUnique<Args...>::value,
688 "Found duplicate types among the arguments passed to copyWith(...). "
689 "Types should be listed at most once.");
690
691 auto copy{ *this };
692 copy.set(std::forward<Args>(args)...);
693 return copy;
694 }
695
697 const Aperture &aperture() const
698 {
699 return m_aperture;
700 }
701
704 {
705 return m_aperture;
706 }
707
709 Acquisition &set(const Aperture &value)
710 {
711 m_aperture = value;
712 return *this;
713 }
714
716 const Brightness &brightness() const
717 {
718 return m_brightness;
719 }
720
723 {
724 return m_brightness;
725 }
726
729 {
730 m_brightness = value;
731 return *this;
732 }
733
736 {
737 return m_exposureTime;
738 }
739
742 {
743 return m_exposureTime;
744 }
745
748 {
749 m_exposureTime = value;
750 return *this;
751 }
752
754 const Gain &gain() const
755 {
756 return m_gain;
757 }
758
761 {
762 return m_gain;
763 }
764
766 Acquisition &set(const Gain &value)
767 {
768 m_gain = value;
769 return *this;
770 }
771
772 template<
773 typename T,
774 typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
776 {
777 return m_aperture;
778 }
779
780 template<
781 typename T,
782 typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
784 {
785 return m_brightness;
786 }
787
788 template<
789 typename T,
790 typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
792 {
793 return m_exposureTime;
794 }
795
796 template<
797 typename T,
798 typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
800 {
801 return m_gain;
802 }
803
804 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
806 {
807 return m_aperture;
808 }
809
810 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
812 {
813 return m_brightness;
814 }
815
816 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
818 {
819 return m_exposureTime;
820 }
821
822 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
824 {
825 return m_gain;
826 }
827
829 template<typename F>
830 void forEach(const F &f) const
831 {
832 f(m_aperture);
833 f(m_brightness);
834 f(m_exposureTime);
835 f(m_gain);
836 }
837
839 template<typename F>
840 void forEach(const F &f)
841 {
842 f(m_aperture);
843 f(m_brightness);
844 f(m_exposureTime);
845 f(m_gain);
846 }
847
849 bool operator==(const Acquisition &other) const;
850
852 bool operator!=(const Acquisition &other) const;
853
855 std::string toString() const;
856
858 friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
859 {
860 return stream << value.toString();
861 }
862
863 private:
864 void setFromString(const std::string &value);
865
866 void setFromString(const std::string &fullPath, const std::string &value);
867
868 std::string getString(const std::string &fullPath) const;
869
870 Aperture m_aperture;
871 Brightness m_brightness;
872 ExposureTime m_exposureTime;
873 Gain m_gain;
874
875 friend struct DataModel::Detail::Befriend<Acquisition>;
876 };
877
880 {
881 public:
884
886 static constexpr const char *path{ "Acquisitions" };
887
889 static constexpr const char *name{ "Acquisitions" };
890
892 static constexpr const char *description{ R"description(List of Acquisition objects)description" };
893
895 using ValueType = std::vector<Settings::Acquisition>;
896
899 {
900 return { 0, std::numeric_limits<ValueType::size_type>::max() };
901 }
902
904 Acquisitions() = default;
905
907 explicit Acquisitions(std::vector<Settings::Acquisition> value)
908 : m_value{ std::move(value) }
909 {}
910
912 explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
913 : Acquisitions{ ValueType{ value } }
914 {}
915
917 const std::vector<Settings::Acquisition> &value() const;
918
920 std::string toString() const;
921
923 std::size_t size() const noexcept;
924
926 bool isEmpty() const noexcept;
927
933 template<typename... Args>
934 void emplaceBack(Args &&...args)
935 {
936 m_value.emplace_back(std::forward<Args>(args)...);
937 }
938
944 Settings::Acquisition &at(std::size_t pos);
945
951 const Settings::Acquisition &at(std::size_t pos) const;
952
959
965 const Settings::Acquisition &operator[](std::size_t pos) const;
966
968 template<typename F>
969 void forEach(const F &f)
970 {
971 for(auto &child : m_value)
972 {
973 f(child);
974 }
975 }
976
978 template<typename F>
979 void forEach(const F &f) const
980 {
981 for(const auto &child : m_value)
982 {
983 f(child);
984 }
985 }
986
988 bool operator==(const Acquisitions &other) const
989 {
990 return m_value == other.m_value;
991 }
992
994 bool operator!=(const Acquisitions &other) const
995 {
996 return m_value != other.m_value;
997 }
998
1000 friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
1001 {
1002 return stream << value.toString();
1003 }
1004
1005 private:
1006 void setFromString(const std::string &value);
1007
1008 std::vector<Settings::Acquisition> m_value{};
1009
1010 friend struct DataModel::Detail::Befriend<Acquisitions>;
1011 };
1012
1021 {
1022 public:
1025
1027 static constexpr const char *path{ "Diagnostics" };
1028
1030 static constexpr const char *name{ "Diagnostics" };
1031
1033 static constexpr const char *description{
1034 R"description(When Diagnostics is enabled, extra diagnostic information is recorded during capture. This extra
1035information is included when saving the frame to a .zdf file, and will help Zivid's support team
1036to provide better assistance.
1037
1038Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the
1039.zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid's support team.
1040)description"
1041 };
1042
1045 {
1046 public:
1049
1051 static constexpr const char *path{ "Diagnostics/Enabled" };
1052
1054 static constexpr const char *name{ "Enabled" };
1055
1057 static constexpr const char *description{ R"description(Enable diagnostics)description" };
1058
1060 using ValueType = bool;
1061 static const Enabled yes;
1062 static const Enabled no;
1063
1065 static std::set<bool> validValues()
1066 {
1067 return { false, true };
1068 }
1069
1071 Enabled() = default;
1072
1074 explicit constexpr Enabled(bool value)
1075 : m_opt{ value }
1076 {}
1077
1082 bool value() const;
1083
1085 bool hasValue() const;
1086
1088 void reset();
1089
1091 std::string toString() const;
1092
1094 bool operator==(const Enabled &other) const
1095 {
1096 return m_opt == other.m_opt;
1097 }
1098
1100 bool operator!=(const Enabled &other) const
1101 {
1102 return m_opt != other.m_opt;
1103 }
1104
1106 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1107 {
1108 return stream << value.toString();
1109 }
1110
1111 private:
1112 void setFromString(const std::string &value);
1113
1114 Zivid::DataModel::Detail::Optional<bool> m_opt;
1115
1116 friend struct DataModel::Detail::Befriend<Enabled>;
1117 };
1118
1119 using Descendants = std::tuple<Settings::Diagnostics::Enabled>;
1120
1123
1135#ifndef NO_DOC
1136 template<
1137 typename... Args,
1138 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1139 typename std::enable_if<
1140 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1141 value,
1142 int>::type = 0>
1143#else
1144 template<typename... Args>
1145#endif
1146 explicit Diagnostics(Args &&...args)
1147 {
1148 using namespace Zivid::Detail::TypeTraits;
1149
1150 static_assert(
1151 AllArgsDecayedAreUnique<Args...>::value,
1152 "Found duplicate types among the arguments passed to Diagnostics(...). "
1153 "Types should be listed at most once.");
1154
1155 set(std::forward<Args>(args)...);
1156 }
1157
1168#ifndef NO_DOC
1169 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1170#else
1171 template<typename... Args>
1172#endif
1173 void set(Args &&...args)
1174 {
1175 using namespace Zivid::Detail::TypeTraits;
1176
1177 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1178 static_assert(
1179 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1180
1181 static_assert(
1182 AllArgsDecayedAreUnique<Args...>::value,
1183 "Found duplicate types among the arguments passed to set(...). "
1184 "Types should be listed at most once.");
1185
1186 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1187 }
1188
1200#ifndef NO_DOC
1201 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1202#else
1203 template<typename... Args>
1204#endif
1205 Diagnostics copyWith(Args &&...args) const
1206 {
1207 using namespace Zivid::Detail::TypeTraits;
1208
1209 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1210 static_assert(
1211 AllArgsAreDescendantNodes::value,
1212 "All arguments passed to copyWith(...) must be descendant nodes.");
1213
1214 static_assert(
1215 AllArgsDecayedAreUnique<Args...>::value,
1216 "Found duplicate types among the arguments passed to copyWith(...). "
1217 "Types should be listed at most once.");
1218
1219 auto copy{ *this };
1220 copy.set(std::forward<Args>(args)...);
1221 return copy;
1222 }
1223
1225 const Enabled &isEnabled() const
1226 {
1227 return m_enabled;
1228 }
1229
1232 {
1233 return m_enabled;
1234 }
1235
1237 Diagnostics &set(const Enabled &value)
1238 {
1239 m_enabled = value;
1240 return *this;
1241 }
1242
1243 template<
1244 typename T,
1245 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
1247 {
1248 return m_enabled;
1249 }
1250
1251 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1253 {
1254 return m_enabled;
1255 }
1256
1258 template<typename F>
1259 void forEach(const F &f) const
1260 {
1261 f(m_enabled);
1262 }
1263
1265 template<typename F>
1266 void forEach(const F &f)
1267 {
1268 f(m_enabled);
1269 }
1270
1272 bool operator==(const Diagnostics &other) const;
1273
1275 bool operator!=(const Diagnostics &other) const;
1276
1278 std::string toString() const;
1279
1281 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
1282 {
1283 return stream << value.toString();
1284 }
1285
1286 private:
1287 void setFromString(const std::string &value);
1288
1289 void setFromString(const std::string &fullPath, const std::string &value);
1290
1291 std::string getString(const std::string &fullPath) const;
1292
1293 Enabled m_enabled;
1294
1295 friend struct DataModel::Detail::Befriend<Diagnostics>;
1296 };
1297
1300 {
1301 public:
1304
1306 static constexpr const char *path{ "Experimental" };
1307
1309 static constexpr const char *name{ "Experimental" };
1310
1312 static constexpr const char *description{
1313 R"description(Experimental features. These settings may be changed, renamed, moved or deleted in the future.)description"
1314 };
1315
1326 {
1327 public:
1330
1332 static constexpr const char *path{ "Experimental/Engine" };
1333
1335 static constexpr const char *name{ "Engine" };
1336
1338 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1339
1340The Phase Engine is the current default Zivid Vision Engine.
1341
1342The Stripe Engine uses anti-reflection technology to suppress interreflection artifacts
1343and improve data quality on shiny objects like cylinders and chrome-plated parts.
1344Additional acquisition and processing time are required for the Stripe Engine.
1345The Stripe Engine is currently experimental, and may be changed and improved in the future.
1346)description" };
1347
1349 enum class ValueType
1350 {
1351 phase,
1352 stripe
1353 };
1354 static const Engine phase;
1355 static const Engine stripe;
1356
1358 static std::set<ValueType> validValues()
1359 {
1360 return { ValueType::phase, ValueType::stripe };
1361 }
1362
1364 Engine() = default;
1365
1367 explicit constexpr Engine(ValueType value)
1368 : m_opt{ verifyValue(value) }
1369 {}
1370
1376
1378 bool hasValue() const;
1379
1381 void reset();
1382
1384 std::string toString() const;
1385
1387 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1388 {
1389 return stream << Engine{ value }.toString();
1390 }
1391
1393 bool operator==(const Engine &other) const
1394 {
1395 return m_opt == other.m_opt;
1396 }
1397
1399 bool operator!=(const Engine &other) const
1400 {
1401 return m_opt != other.m_opt;
1402 }
1403
1405 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1406 {
1407 return stream << value.toString();
1408 }
1409
1410 private:
1411 void setFromString(const std::string &value);
1412
1413 constexpr ValueType static verifyValue(const ValueType &value)
1414 {
1415 return value == ValueType::phase || value == ValueType::stripe
1416 ? value
1417 : throw std::invalid_argument{
1418 "Invalid value: Engine{ "
1419 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1420 };
1421 }
1422
1423 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1424
1425 friend struct DataModel::Detail::Befriend<Engine>;
1426 };
1427
1428 using Descendants = std::tuple<Settings::Experimental::Engine>;
1429
1432
1444#ifndef NO_DOC
1445 template<
1446 typename... Args,
1447 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1448 typename std::enable_if<
1449 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1450 value,
1451 int>::type = 0>
1452#else
1453 template<typename... Args>
1454#endif
1455 explicit Experimental(Args &&...args)
1456 {
1457 using namespace Zivid::Detail::TypeTraits;
1458
1459 static_assert(
1460 AllArgsDecayedAreUnique<Args...>::value,
1461 "Found duplicate types among the arguments passed to Experimental(...). "
1462 "Types should be listed at most once.");
1463
1464 set(std::forward<Args>(args)...);
1465 }
1466
1477#ifndef NO_DOC
1478 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1479#else
1480 template<typename... Args>
1481#endif
1482 void set(Args &&...args)
1483 {
1484 using namespace Zivid::Detail::TypeTraits;
1485
1486 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1487 static_assert(
1488 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1489
1490 static_assert(
1491 AllArgsDecayedAreUnique<Args...>::value,
1492 "Found duplicate types among the arguments passed to set(...). "
1493 "Types should be listed at most once.");
1494
1495 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1496 }
1497
1509#ifndef NO_DOC
1510 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1511#else
1512 template<typename... Args>
1513#endif
1514 Experimental copyWith(Args &&...args) const
1515 {
1516 using namespace Zivid::Detail::TypeTraits;
1517
1518 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1519 static_assert(
1520 AllArgsAreDescendantNodes::value,
1521 "All arguments passed to copyWith(...) must be descendant nodes.");
1522
1523 static_assert(
1524 AllArgsDecayedAreUnique<Args...>::value,
1525 "Found duplicate types among the arguments passed to copyWith(...). "
1526 "Types should be listed at most once.");
1527
1528 auto copy{ *this };
1529 copy.set(std::forward<Args>(args)...);
1530 return copy;
1531 }
1532
1534 const Engine &engine() const
1535 {
1536 return m_engine;
1537 }
1538
1541 {
1542 return m_engine;
1543 }
1544
1546 Experimental &set(const Engine &value)
1547 {
1548 m_engine = value;
1549 return *this;
1550 }
1551
1552 template<
1553 typename T,
1554 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
1556 {
1557 return m_engine;
1558 }
1559
1560 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1562 {
1563 return m_engine;
1564 }
1565
1567 template<typename F>
1568 void forEach(const F &f) const
1569 {
1570 f(m_engine);
1571 }
1572
1574 template<typename F>
1575 void forEach(const F &f)
1576 {
1577 f(m_engine);
1578 }
1579
1581 bool operator==(const Experimental &other) const;
1582
1584 bool operator!=(const Experimental &other) const;
1585
1587 std::string toString() const;
1588
1590 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
1591 {
1592 return stream << value.toString();
1593 }
1594
1595 private:
1596 void setFromString(const std::string &value);
1597
1598 void setFromString(const std::string &fullPath, const std::string &value);
1599
1600 std::string getString(const std::string &fullPath) const;
1601
1602 Engine m_engine;
1603
1604 friend struct DataModel::Detail::Befriend<Experimental>;
1605 };
1606
1609 {
1610 public:
1613
1615 static constexpr const char *path{ "Processing" };
1616
1618 static constexpr const char *name{ "Processing" };
1619
1621 static constexpr const char *description{
1622 R"description(Settings related to processing of a capture, including filters and color balance)description"
1623 };
1624
1627 {
1628 public:
1631
1633 static constexpr const char *path{ "Processing/Color" };
1634
1636 static constexpr const char *name{ "Color" };
1637
1639 static constexpr const char *description{ R"description(Color settings)description" };
1640
1643 {
1644 public:
1647
1649 static constexpr const char *path{ "Processing/Color/Balance" };
1650
1652 static constexpr const char *name{ "Balance" };
1653
1655 static constexpr const char *description{ R"description(Color balance settings)description" };
1656
1659 {
1660 public:
1663
1665 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1666
1668 static constexpr const char *name{ "Blue" };
1669
1671 static constexpr const char *description{
1672 R"description(Digital gain applied to blue channel)description"
1673 };
1674
1676 using ValueType = double;
1677
1679 static constexpr Range<double> validRange()
1680 {
1681 return { 1.0, 8.0 };
1682 }
1683
1685 Blue() = default;
1686
1688 explicit constexpr Blue(double value)
1689 : m_opt{ verifyValue(value) }
1690 {}
1691
1696 double value() const;
1697
1699 bool hasValue() const;
1700
1702 void reset();
1703
1705 std::string toString() const;
1706
1708 bool operator==(const Blue &other) const
1709 {
1710 return m_opt == other.m_opt;
1711 }
1712
1714 bool operator!=(const Blue &other) const
1715 {
1716 return m_opt != other.m_opt;
1717 }
1718
1720 bool operator<(const Blue &other) const
1721 {
1722 return m_opt < other.m_opt;
1723 }
1724
1726 bool operator>(const Blue &other) const
1727 {
1728 return m_opt > other.m_opt;
1729 }
1730
1732 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1733 {
1734 return stream << value.toString();
1735 }
1736
1737 private:
1738 void setFromString(const std::string &value);
1739
1740 constexpr ValueType static verifyValue(const ValueType &value)
1741 {
1742 return validRange().isInRange(value)
1743 ? value
1744 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1745 + " } is not in range ["
1746 + std::to_string(validRange().min()) + ", "
1747 + std::to_string(validRange().max()) + "]" };
1748 }
1749
1750 Zivid::DataModel::Detail::Optional<double> m_opt;
1751
1752 friend struct DataModel::Detail::Befriend<Blue>;
1753 };
1754
1757 {
1758 public:
1761
1763 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1764
1766 static constexpr const char *name{ "Green" };
1767
1769 static constexpr const char *description{
1770 R"description(Digital gain applied to green channel)description"
1771 };
1772
1774 using ValueType = double;
1775
1777 static constexpr Range<double> validRange()
1778 {
1779 return { 1.0, 8.0 };
1780 }
1781
1783 Green() = default;
1784
1786 explicit constexpr Green(double value)
1787 : m_opt{ verifyValue(value) }
1788 {}
1789
1794 double value() const;
1795
1797 bool hasValue() const;
1798
1800 void reset();
1801
1803 std::string toString() const;
1804
1806 bool operator==(const Green &other) const
1807 {
1808 return m_opt == other.m_opt;
1809 }
1810
1812 bool operator!=(const Green &other) const
1813 {
1814 return m_opt != other.m_opt;
1815 }
1816
1818 bool operator<(const Green &other) const
1819 {
1820 return m_opt < other.m_opt;
1821 }
1822
1824 bool operator>(const Green &other) const
1825 {
1826 return m_opt > other.m_opt;
1827 }
1828
1830 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1831 {
1832 return stream << value.toString();
1833 }
1834
1835 private:
1836 void setFromString(const std::string &value);
1837
1838 constexpr ValueType static verifyValue(const ValueType &value)
1839 {
1840 return validRange().isInRange(value)
1841 ? value
1842 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1843 + " } is not in range ["
1844 + std::to_string(validRange().min()) + ", "
1845 + std::to_string(validRange().max()) + "]" };
1846 }
1847
1848 Zivid::DataModel::Detail::Optional<double> m_opt;
1849
1850 friend struct DataModel::Detail::Befriend<Green>;
1851 };
1852
1855 {
1856 public:
1859
1861 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1862
1864 static constexpr const char *name{ "Red" };
1865
1867 static constexpr const char *description{
1868 R"description(Digital gain applied to red channel)description"
1869 };
1870
1872 using ValueType = double;
1873
1875 static constexpr Range<double> validRange()
1876 {
1877 return { 1.0, 8.0 };
1878 }
1879
1881 Red() = default;
1882
1884 explicit constexpr Red(double value)
1885 : m_opt{ verifyValue(value) }
1886 {}
1887
1892 double value() const;
1893
1895 bool hasValue() const;
1896
1898 void reset();
1899
1901 std::string toString() const;
1902
1904 bool operator==(const Red &other) const
1905 {
1906 return m_opt == other.m_opt;
1907 }
1908
1910 bool operator!=(const Red &other) const
1911 {
1912 return m_opt != other.m_opt;
1913 }
1914
1916 bool operator<(const Red &other) const
1917 {
1918 return m_opt < other.m_opt;
1919 }
1920
1922 bool operator>(const Red &other) const
1923 {
1924 return m_opt > other.m_opt;
1925 }
1926
1928 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1929 {
1930 return stream << value.toString();
1931 }
1932
1933 private:
1934 void setFromString(const std::string &value);
1935
1936 constexpr ValueType static verifyValue(const ValueType &value)
1937 {
1938 return validRange().isInRange(value)
1939 ? value
1940 : throw std::out_of_range{ "Red{ " + std::to_string(value)
1941 + " } is not in range ["
1942 + std::to_string(validRange().min()) + ", "
1943 + std::to_string(validRange().max()) + "]" };
1944 }
1945
1946 Zivid::DataModel::Detail::Optional<double> m_opt;
1947
1948 friend struct DataModel::Detail::Befriend<Red>;
1949 };
1950
1951 using Descendants = std::tuple<
1955
1958
1972#ifndef NO_DOC
1973 template<
1974 typename... Args,
1975 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1976 typename std::enable_if<
1977 Zivid::Detail::TypeTraits::
1978 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1979 int>::type = 0>
1980#else
1981 template<typename... Args>
1982#endif
1983 explicit Balance(Args &&...args)
1984 {
1985 using namespace Zivid::Detail::TypeTraits;
1986
1987 static_assert(
1988 AllArgsDecayedAreUnique<Args...>::value,
1989 "Found duplicate types among the arguments passed to Balance(...). "
1990 "Types should be listed at most once.");
1991
1992 set(std::forward<Args>(args)...);
1993 }
1994
2007#ifndef NO_DOC
2008 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2009#else
2010 template<typename... Args>
2011#endif
2012 void set(Args &&...args)
2013 {
2014 using namespace Zivid::Detail::TypeTraits;
2015
2016 using AllArgsAreDescendantNodes =
2017 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2018 static_assert(
2019 AllArgsAreDescendantNodes::value,
2020 "All arguments passed to set(...) must be descendant nodes.");
2021
2022 static_assert(
2023 AllArgsDecayedAreUnique<Args...>::value,
2024 "Found duplicate types among the arguments passed to set(...). "
2025 "Types should be listed at most once.");
2026
2027 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2028 }
2029
2043#ifndef NO_DOC
2044 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2045#else
2046 template<typename... Args>
2047#endif
2048 Balance copyWith(Args &&...args) const
2049 {
2050 using namespace Zivid::Detail::TypeTraits;
2051
2052 using AllArgsAreDescendantNodes =
2053 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2054 static_assert(
2055 AllArgsAreDescendantNodes::value,
2056 "All arguments passed to copyWith(...) must be descendant nodes.");
2057
2058 static_assert(
2059 AllArgsDecayedAreUnique<Args...>::value,
2060 "Found duplicate types among the arguments passed to copyWith(...). "
2061 "Types should be listed at most once.");
2062
2063 auto copy{ *this };
2064 copy.set(std::forward<Args>(args)...);
2065 return copy;
2066 }
2067
2069 const Blue &blue() const
2070 {
2071 return m_blue;
2072 }
2073
2076 {
2077 return m_blue;
2078 }
2079
2081 Balance &set(const Blue &value)
2082 {
2083 m_blue = value;
2084 return *this;
2085 }
2086
2088 const Green &green() const
2089 {
2090 return m_green;
2091 }
2092
2095 {
2096 return m_green;
2097 }
2098
2100 Balance &set(const Green &value)
2101 {
2102 m_green = value;
2103 return *this;
2104 }
2105
2107 const Red &red() const
2108 {
2109 return m_red;
2110 }
2111
2114 {
2115 return m_red;
2116 }
2117
2119 Balance &set(const Red &value)
2120 {
2121 m_red = value;
2122 return *this;
2123 }
2124
2125 template<
2126 typename T,
2127 typename std::enable_if<
2128 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2129 int>::type = 0>
2131 {
2132 return m_blue;
2133 }
2134
2135 template<
2136 typename T,
2137 typename std::enable_if<
2138 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2139 int>::type = 0>
2141 {
2142 return m_green;
2143 }
2144
2145 template<
2146 typename T,
2147 typename std::
2148 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2150 {
2151 return m_red;
2152 }
2153
2154 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2156 {
2157 return m_blue;
2158 }
2159
2160 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2162 {
2163 return m_green;
2164 }
2165
2166 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2168 {
2169 return m_red;
2170 }
2171
2173 template<typename F>
2174 void forEach(const F &f) const
2175 {
2176 f(m_blue);
2177 f(m_green);
2178 f(m_red);
2179 }
2180
2182 template<typename F>
2183 void forEach(const F &f)
2184 {
2185 f(m_blue);
2186 f(m_green);
2187 f(m_red);
2188 }
2189
2191 bool operator==(const Balance &other) const;
2192
2194 bool operator!=(const Balance &other) const;
2195
2197 std::string toString() const;
2198
2200 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2201 {
2202 return stream << value.toString();
2203 }
2204
2205 private:
2206 void setFromString(const std::string &value);
2207
2208 void setFromString(const std::string &fullPath, const std::string &value);
2209
2210 std::string getString(const std::string &fullPath) const;
2211
2212 Blue m_blue;
2213 Green m_green;
2214 Red m_red;
2215
2216 friend struct DataModel::Detail::Befriend<Balance>;
2217 };
2218
2221 {
2222 public:
2225
2227 static constexpr const char *path{ "Processing/Color/Experimental" };
2228
2230 static constexpr const char *name{ "Experimental" };
2231
2233 static constexpr const char *description{
2234 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2235 };
2236
2260 {
2261 public:
2264
2266 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2267
2269 static constexpr const char *name{ "Mode" };
2270
2272 static constexpr const char *description{
2273 R"description(This setting controls how the color image is computed.
2274
2275`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2276single-acquisition captures and multi-acquisition captures when all the acquisitions have
2277identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2278multi-acquisition HDR captures with differing acquisition settings.
2279
2280`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2281the capture consists of more than one acquisition, then the remaining acquisitions are not used
2282for the color image. No tone mapping is performed. This option provides the most control of
2283the color image, and the color values will be consistent over repeated captures with the same
2284settings.
2285
2286`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2287HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2288image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2289applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2290normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2291mode the color values can be inconsistent over repeated captures if you move, add or remove
2292objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2293mode.
2294)description"
2295 };
2296
2298 enum class ValueType
2299 {
2300 automatic,
2301 useFirstAcquisition,
2302 toneMapping
2303 };
2304 static const Mode automatic;
2306 static const Mode toneMapping;
2307
2309 static std::set<ValueType> validValues()
2310 {
2311 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2312 }
2313
2315 Mode() = default;
2316
2318 explicit constexpr Mode(ValueType value)
2319 : m_opt{ verifyValue(value) }
2320 {}
2321
2327
2329 bool hasValue() const;
2330
2332 void reset();
2333
2335 std::string toString() const;
2336
2338 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2339 {
2340 return stream << Mode{ value }.toString();
2341 }
2342
2344 bool operator==(const Mode &other) const
2345 {
2346 return m_opt == other.m_opt;
2347 }
2348
2350 bool operator!=(const Mode &other) const
2351 {
2352 return m_opt != other.m_opt;
2353 }
2354
2356 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2357 {
2358 return stream << value.toString();
2359 }
2360
2361 private:
2362 void setFromString(const std::string &value);
2363
2364 constexpr ValueType static verifyValue(const ValueType &value)
2365 {
2366 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2367 || value == ValueType::toneMapping
2368 ? value
2369 : throw std::invalid_argument{
2370 "Invalid value: Mode{ "
2371 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2372 + " }"
2373 };
2374 }
2375
2376 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2377
2378 friend struct DataModel::Detail::Befriend<Mode>;
2379 };
2380
2381 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2382
2385
2397#ifndef NO_DOC
2398 template<
2399 typename... Args,
2400 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2401 typename std::enable_if<
2402 Zivid::Detail::TypeTraits::
2403 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2404 int>::type = 0>
2405#else
2406 template<typename... Args>
2407#endif
2408 explicit Experimental(Args &&...args)
2409 {
2410 using namespace Zivid::Detail::TypeTraits;
2411
2412 static_assert(
2413 AllArgsDecayedAreUnique<Args...>::value,
2414 "Found duplicate types among the arguments passed to Experimental(...). "
2415 "Types should be listed at most once.");
2416
2417 set(std::forward<Args>(args)...);
2418 }
2419
2430#ifndef NO_DOC
2431 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2432#else
2433 template<typename... Args>
2434#endif
2435 void set(Args &&...args)
2436 {
2437 using namespace Zivid::Detail::TypeTraits;
2438
2439 using AllArgsAreDescendantNodes =
2440 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2441 static_assert(
2442 AllArgsAreDescendantNodes::value,
2443 "All arguments passed to set(...) must be descendant nodes.");
2444
2445 static_assert(
2446 AllArgsDecayedAreUnique<Args...>::value,
2447 "Found duplicate types among the arguments passed to set(...). "
2448 "Types should be listed at most once.");
2449
2450 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2451 }
2452
2464#ifndef NO_DOC
2465 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2466#else
2467 template<typename... Args>
2468#endif
2469 Experimental copyWith(Args &&...args) const
2470 {
2471 using namespace Zivid::Detail::TypeTraits;
2472
2473 using AllArgsAreDescendantNodes =
2474 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2475 static_assert(
2476 AllArgsAreDescendantNodes::value,
2477 "All arguments passed to copyWith(...) must be descendant nodes.");
2478
2479 static_assert(
2480 AllArgsDecayedAreUnique<Args...>::value,
2481 "Found duplicate types among the arguments passed to copyWith(...). "
2482 "Types should be listed at most once.");
2483
2484 auto copy{ *this };
2485 copy.set(std::forward<Args>(args)...);
2486 return copy;
2487 }
2488
2490 const Mode &mode() const
2491 {
2492 return m_mode;
2493 }
2494
2497 {
2498 return m_mode;
2499 }
2500
2502 Experimental &set(const Mode &value)
2503 {
2504 m_mode = value;
2505 return *this;
2506 }
2507
2508 template<
2509 typename T,
2510 typename std::enable_if<
2511 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2512 int>::type = 0>
2514 {
2515 return m_mode;
2516 }
2517
2518 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2520 {
2521 return m_mode;
2522 }
2523
2525 template<typename F>
2526 void forEach(const F &f) const
2527 {
2528 f(m_mode);
2529 }
2530
2532 template<typename F>
2533 void forEach(const F &f)
2534 {
2535 f(m_mode);
2536 }
2537
2539 bool operator==(const Experimental &other) const;
2540
2542 bool operator!=(const Experimental &other) const;
2543
2545 std::string toString() const;
2546
2548 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2549 {
2550 return stream << value.toString();
2551 }
2552
2553 private:
2554 void setFromString(const std::string &value);
2555
2556 void setFromString(const std::string &fullPath, const std::string &value);
2557
2558 std::string getString(const std::string &fullPath) const;
2559
2560 Mode m_mode;
2561
2562 friend struct DataModel::Detail::Befriend<Experimental>;
2563 };
2564
2569 {
2570 public:
2573
2575 static constexpr const char *path{ "Processing/Color/Gamma" };
2576
2578 static constexpr const char *name{ "Gamma" };
2579
2581 static constexpr const char *description{
2582 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2583greater than 1 makes the colors darker.
2584)description"
2585 };
2586
2588 using ValueType = double;
2589
2591 static constexpr Range<double> validRange()
2592 {
2593 return { 0.25, 1.5 };
2594 }
2595
2597 Gamma() = default;
2598
2600 explicit constexpr Gamma(double value)
2601 : m_opt{ verifyValue(value) }
2602 {}
2603
2608 double value() const;
2609
2611 bool hasValue() const;
2612
2614 void reset();
2615
2617 std::string toString() const;
2618
2620 bool operator==(const Gamma &other) const
2621 {
2622 return m_opt == other.m_opt;
2623 }
2624
2626 bool operator!=(const Gamma &other) const
2627 {
2628 return m_opt != other.m_opt;
2629 }
2630
2632 bool operator<(const Gamma &other) const
2633 {
2634 return m_opt < other.m_opt;
2635 }
2636
2638 bool operator>(const Gamma &other) const
2639 {
2640 return m_opt > other.m_opt;
2641 }
2642
2644 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2645 {
2646 return stream << value.toString();
2647 }
2648
2649 private:
2650 void setFromString(const std::string &value);
2651
2652 constexpr ValueType static verifyValue(const ValueType &value)
2653 {
2654 return validRange().isInRange(value)
2655 ? value
2656 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2657 + std::to_string(validRange().min()) + ", "
2658 + std::to_string(validRange().max()) + "]" };
2659 }
2660
2661 Zivid::DataModel::Detail::Optional<double> m_opt;
2662
2663 friend struct DataModel::Detail::Befriend<Gamma>;
2664 };
2665
2666 using Descendants = std::tuple<
2674
2677
2695#ifndef NO_DOC
2696 template<
2697 typename... Args,
2698 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2699 typename std::enable_if<
2700 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2701 value,
2702 int>::type = 0>
2703#else
2704 template<typename... Args>
2705#endif
2706 explicit Color(Args &&...args)
2707 {
2708 using namespace Zivid::Detail::TypeTraits;
2709
2710 static_assert(
2711 AllArgsDecayedAreUnique<Args...>::value,
2712 "Found duplicate types among the arguments passed to Color(...). "
2713 "Types should be listed at most once.");
2714
2715 set(std::forward<Args>(args)...);
2716 }
2717
2734#ifndef NO_DOC
2735 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2736#else
2737 template<typename... Args>
2738#endif
2739 void set(Args &&...args)
2740 {
2741 using namespace Zivid::Detail::TypeTraits;
2742
2743 using AllArgsAreDescendantNodes =
2744 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2745 static_assert(
2746 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2747
2748 static_assert(
2749 AllArgsDecayedAreUnique<Args...>::value,
2750 "Found duplicate types among the arguments passed to set(...). "
2751 "Types should be listed at most once.");
2752
2753 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2754 }
2755
2773#ifndef NO_DOC
2774 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2775#else
2776 template<typename... Args>
2777#endif
2778 Color copyWith(Args &&...args) const
2779 {
2780 using namespace Zivid::Detail::TypeTraits;
2781
2782 using AllArgsAreDescendantNodes =
2783 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2784 static_assert(
2785 AllArgsAreDescendantNodes::value,
2786 "All arguments passed to copyWith(...) must be descendant nodes.");
2787
2788 static_assert(
2789 AllArgsDecayedAreUnique<Args...>::value,
2790 "Found duplicate types among the arguments passed to copyWith(...). "
2791 "Types should be listed at most once.");
2792
2793 auto copy{ *this };
2794 copy.set(std::forward<Args>(args)...);
2795 return copy;
2796 }
2797
2799 const Balance &balance() const
2800 {
2801 return m_balance;
2802 }
2803
2806 {
2807 return m_balance;
2808 }
2809
2811 Color &set(const Balance &value)
2812 {
2813 m_balance = value;
2814 return *this;
2815 }
2816
2818 Color &set(const Balance::Blue &value)
2819 {
2820 m_balance.set(value);
2821 return *this;
2822 }
2823
2825 Color &set(const Balance::Green &value)
2826 {
2827 m_balance.set(value);
2828 return *this;
2829 }
2830
2832 Color &set(const Balance::Red &value)
2833 {
2834 m_balance.set(value);
2835 return *this;
2836 }
2837
2840 {
2841 return m_experimental;
2842 }
2843
2846 {
2847 return m_experimental;
2848 }
2849
2851 Color &set(const Experimental &value)
2852 {
2853 m_experimental = value;
2854 return *this;
2855 }
2856
2859 {
2860 m_experimental.set(value);
2861 return *this;
2862 }
2863
2865 const Gamma &gamma() const
2866 {
2867 return m_gamma;
2868 }
2869
2872 {
2873 return m_gamma;
2874 }
2875
2877 Color &set(const Gamma &value)
2878 {
2879 m_gamma = value;
2880 return *this;
2881 }
2882
2883 template<
2884 typename T,
2885 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
2886 0>
2888 {
2889 return m_balance;
2890 }
2891
2892 template<
2893 typename T,
2894 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
2895 type = 0>
2897 {
2898 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
2899 }
2900
2901 template<
2902 typename T,
2903 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
2904 type = 0>
2906 {
2907 return m_balance.get<Settings::Processing::Color::Balance::Green>();
2908 }
2909
2910 template<
2911 typename T,
2912 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
2913 type = 0>
2915 {
2916 return m_balance.get<Settings::Processing::Color::Balance::Red>();
2917 }
2918
2919 template<
2920 typename T,
2921 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
2922 type = 0>
2924 {
2925 return m_experimental;
2926 }
2927
2928 template<
2929 typename T,
2930 typename std::enable_if<
2931 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2932 int>::type = 0>
2934 {
2935 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
2936 }
2937
2938 template<
2939 typename T,
2940 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
2942 {
2943 return m_gamma;
2944 }
2945
2946 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2948 {
2949 return m_balance;
2950 }
2951
2952 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2954 {
2955 return m_experimental;
2956 }
2957
2958 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2960 {
2961 return m_gamma;
2962 }
2963
2965 template<typename F>
2966 void forEach(const F &f) const
2967 {
2968 f(m_balance);
2969 f(m_experimental);
2970 f(m_gamma);
2971 }
2972
2974 template<typename F>
2975 void forEach(const F &f)
2976 {
2977 f(m_balance);
2978 f(m_experimental);
2979 f(m_gamma);
2980 }
2981
2983 bool operator==(const Color &other) const;
2984
2986 bool operator!=(const Color &other) const;
2987
2989 std::string toString() const;
2990
2992 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
2993 {
2994 return stream << value.toString();
2995 }
2996
2997 private:
2998 void setFromString(const std::string &value);
2999
3000 void setFromString(const std::string &fullPath, const std::string &value);
3001
3002 std::string getString(const std::string &fullPath) const;
3003
3004 Balance m_balance;
3005 Experimental m_experimental;
3006 Gamma m_gamma;
3007
3008 friend struct DataModel::Detail::Befriend<Color>;
3009 };
3010
3013 {
3014 public:
3017
3019 static constexpr const char *path{ "Processing/Filters" };
3020
3022 static constexpr const char *name{ "Filters" };
3023
3025 static constexpr const char *description{ R"description(Filters)description" };
3026
3029 {
3030 public:
3033
3035 static constexpr const char *path{ "Processing/Filters/Experimental" };
3036
3038 static constexpr const char *name{ "Experimental" };
3039
3041 static constexpr const char *description{
3042 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
3043 };
3044
3051 {
3052 public:
3055
3057 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
3058
3060 static constexpr const char *name{ "ContrastDistortion" };
3061
3063 static constexpr const char *description{
3064 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
3065or high contrast. These artifacts are caused by blurring in the lens. The filter
3066works best when aperture values are chosen such that the camera has quite good focus.
3067The filter also supports removing the points that experience a large correction.
3068)description"
3069 };
3070
3073 {
3074 public:
3077
3079 static constexpr const char *path{
3080 "Processing/Filters/Experimental/ContrastDistortion/Correction"
3081 };
3082
3084 static constexpr const char *name{ "Correction" };
3085
3087 static constexpr const char *description{ R"description(Correction)description" };
3088
3091 {
3092 public:
3095
3097 static constexpr const char *path{
3098 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
3099 };
3100
3102 static constexpr const char *name{ "Enabled" };
3103
3105 static constexpr const char *description{ R"description(Enabled)description" };
3106
3108 using ValueType = bool;
3109 static const Enabled yes;
3110 static const Enabled no;
3111
3113 static std::set<bool> validValues()
3114 {
3115 return { false, true };
3116 }
3117
3119 Enabled() = default;
3120
3122 explicit constexpr Enabled(bool value)
3123 : m_opt{ value }
3124 {}
3125
3130 bool value() const;
3131
3133 bool hasValue() const;
3134
3136 void reset();
3137
3139 std::string toString() const;
3140
3142 bool operator==(const Enabled &other) const
3143 {
3144 return m_opt == other.m_opt;
3145 }
3146
3148 bool operator!=(const Enabled &other) const
3149 {
3150 return m_opt != other.m_opt;
3151 }
3152
3154 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3155 {
3156 return stream << value.toString();
3157 }
3158
3159 private:
3160 void setFromString(const std::string &value);
3161
3162 Zivid::DataModel::Detail::Optional<bool> m_opt;
3163
3164 friend struct DataModel::Detail::Befriend<Enabled>;
3165 };
3166
3169 {
3170 public:
3173
3175 static constexpr const char *path{
3176 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
3177 };
3178
3180 static constexpr const char *name{ "Strength" };
3181
3183 static constexpr const char *description{
3184 R"description(Higher values gives more correction.)description"
3185 };
3186
3188 using ValueType = double;
3189
3191 static constexpr Range<double> validRange()
3192 {
3193 return { 0.0, 1.0 };
3194 }
3195
3197 Strength() = default;
3198
3200 explicit constexpr Strength(double value)
3201 : m_opt{ verifyValue(value) }
3202 {}
3203
3208 double value() const;
3209
3211 bool hasValue() const;
3212
3214 void reset();
3215
3217 std::string toString() const;
3218
3220 bool operator==(const Strength &other) const
3221 {
3222 return m_opt == other.m_opt;
3223 }
3224
3226 bool operator!=(const Strength &other) const
3227 {
3228 return m_opt != other.m_opt;
3229 }
3230
3232 bool operator<(const Strength &other) const
3233 {
3234 return m_opt < other.m_opt;
3235 }
3236
3238 bool operator>(const Strength &other) const
3239 {
3240 return m_opt > other.m_opt;
3241 }
3242
3244 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
3245 {
3246 return stream << value.toString();
3247 }
3248
3249 private:
3250 void setFromString(const std::string &value);
3251
3252 constexpr ValueType static verifyValue(const ValueType &value)
3253 {
3254 return validRange().isInRange(value)
3255 ? value
3256 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
3257 + " } is not in range ["
3258 + std::to_string(validRange().min()) + ", "
3259 + std::to_string(validRange().max()) + "]" };
3260 }
3261
3262 Zivid::DataModel::Detail::Optional<double> m_opt;
3263
3264 friend struct DataModel::Detail::Befriend<Strength>;
3265 };
3266
3267 using Descendants = std::tuple<
3270
3273
3286#ifndef NO_DOC
3287 template<
3288 typename... Args,
3289 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3290 typename std::enable_if<
3291 Zivid::Detail::TypeTraits::
3292 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3293 int>::type = 0>
3294#else
3295 template<typename... Args>
3296#endif
3297 explicit Correction(Args &&...args)
3298 {
3299 using namespace Zivid::Detail::TypeTraits;
3300
3301 static_assert(
3302 AllArgsDecayedAreUnique<Args...>::value,
3303 "Found duplicate types among the arguments passed to Correction(...). "
3304 "Types should be listed at most once.");
3305
3306 set(std::forward<Args>(args)...);
3307 }
3308
3320#ifndef NO_DOC
3321 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3322#else
3323 template<typename... Args>
3324#endif
3325 void set(Args &&...args)
3326 {
3327 using namespace Zivid::Detail::TypeTraits;
3328
3329 using AllArgsAreDescendantNodes =
3330 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3331 static_assert(
3332 AllArgsAreDescendantNodes::value,
3333 "All arguments passed to set(...) must be descendant nodes.");
3334
3335 static_assert(
3336 AllArgsDecayedAreUnique<Args...>::value,
3337 "Found duplicate types among the arguments passed to set(...). "
3338 "Types should be listed at most once.");
3339
3340 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3341 }
3342
3355#ifndef NO_DOC
3356 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3357#else
3358 template<typename... Args>
3359#endif
3360 Correction copyWith(Args &&...args) const
3361 {
3362 using namespace Zivid::Detail::TypeTraits;
3363
3364 using AllArgsAreDescendantNodes =
3365 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3366 static_assert(
3367 AllArgsAreDescendantNodes::value,
3368 "All arguments passed to copyWith(...) must be descendant nodes.");
3369
3370 static_assert(
3371 AllArgsDecayedAreUnique<Args...>::value,
3372 "Found duplicate types among the arguments passed to copyWith(...). "
3373 "Types should be listed at most once.");
3374
3375 auto copy{ *this };
3376 copy.set(std::forward<Args>(args)...);
3377 return copy;
3378 }
3379
3381 const Enabled &isEnabled() const
3382 {
3383 return m_enabled;
3384 }
3385
3388 {
3389 return m_enabled;
3390 }
3391
3393 Correction &set(const Enabled &value)
3394 {
3395 m_enabled = value;
3396 return *this;
3397 }
3398
3400 const Strength &strength() const
3401 {
3402 return m_strength;
3403 }
3404
3407 {
3408 return m_strength;
3409 }
3410
3412 Correction &set(const Strength &value)
3413 {
3414 m_strength = value;
3415 return *this;
3416 }
3417
3418 template<
3419 typename T,
3420 typename std::enable_if<
3421 std::is_same<
3422 T,
3423 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
3424 Enabled>::value,
3425 int>::type = 0>
3427 get() const
3428 {
3429 return m_enabled;
3430 }
3431
3432 template<
3433 typename T,
3434 typename std::enable_if<
3435 std::is_same<
3436 T,
3437 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
3438 Strength>::value,
3439 int>::type = 0>
3441 &
3442 get() const
3443 {
3444 return m_strength;
3445 }
3446
3447 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3449 get() const
3450 {
3451 return m_enabled;
3452 }
3453
3454 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3456 &
3457 get() const
3458 {
3459 return m_strength;
3460 }
3461
3463 template<typename F>
3464 void forEach(const F &f) const
3465 {
3466 f(m_enabled);
3467 f(m_strength);
3468 }
3469
3471 template<typename F>
3472 void forEach(const F &f)
3473 {
3474 f(m_enabled);
3475 f(m_strength);
3476 }
3477
3479 bool operator==(const Correction &other) const;
3480
3482 bool operator!=(const Correction &other) const;
3483
3485 std::string toString() const;
3486
3488 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
3489 {
3490 return stream << value.toString();
3491 }
3492
3493 private:
3494 void setFromString(const std::string &value);
3495
3496 void setFromString(const std::string &fullPath, const std::string &value);
3497
3498 std::string getString(const std::string &fullPath) const;
3499
3500 Enabled m_enabled;
3501 Strength m_strength;
3502
3503 friend struct DataModel::Detail::Befriend<Correction>;
3504 };
3505
3508 {
3509 public:
3512
3514 static constexpr const char *path{
3515 "Processing/Filters/Experimental/ContrastDistortion/Removal"
3516 };
3517
3519 static constexpr const char *name{ "Removal" };
3520
3522 static constexpr const char *description{ R"description(Removal)description" };
3523
3526 {
3527 public:
3530
3532 static constexpr const char *path{
3533 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
3534 };
3535
3537 static constexpr const char *name{ "Enabled" };
3538
3540 static constexpr const char *description{ R"description(Enabled)description" };
3541
3543 using ValueType = bool;
3544 static const Enabled yes;
3545 static const Enabled no;
3546
3548 static std::set<bool> validValues()
3549 {
3550 return { false, true };
3551 }
3552
3554 Enabled() = default;
3555
3557 explicit constexpr Enabled(bool value)
3558 : m_opt{ value }
3559 {}
3560
3565 bool value() const;
3566
3568 bool hasValue() const;
3569
3571 void reset();
3572
3574 std::string toString() const;
3575
3577 bool operator==(const Enabled &other) const
3578 {
3579 return m_opt == other.m_opt;
3580 }
3581
3583 bool operator!=(const Enabled &other) const
3584 {
3585 return m_opt != other.m_opt;
3586 }
3587
3589 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3590 {
3591 return stream << value.toString();
3592 }
3593
3594 private:
3595 void setFromString(const std::string &value);
3596
3597 Zivid::DataModel::Detail::Optional<bool> m_opt;
3598
3599 friend struct DataModel::Detail::Befriend<Enabled>;
3600 };
3601
3604 {
3605 public:
3608
3610 static constexpr const char *path{
3611 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
3612 };
3613
3615 static constexpr const char *name{ "Threshold" };
3616
3618 static constexpr const char *description{
3619 R"description(Higher values remove more points.)description"
3620 };
3621
3623 using ValueType = double;
3624
3626 static constexpr Range<double> validRange()
3627 {
3628 return { 0.0, 1.0 };
3629 }
3630
3632 Threshold() = default;
3633
3635 explicit constexpr Threshold(double value)
3636 : m_opt{ verifyValue(value) }
3637 {}
3638
3643 double value() const;
3644
3646 bool hasValue() const;
3647
3649 void reset();
3650
3652 std::string toString() const;
3653
3655 bool operator==(const Threshold &other) const
3656 {
3657 return m_opt == other.m_opt;
3658 }
3659
3661 bool operator!=(const Threshold &other) const
3662 {
3663 return m_opt != other.m_opt;
3664 }
3665
3667 bool operator<(const Threshold &other) const
3668 {
3669 return m_opt < other.m_opt;
3670 }
3671
3673 bool operator>(const Threshold &other) const
3674 {
3675 return m_opt > other.m_opt;
3676 }
3677
3679 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
3680 {
3681 return stream << value.toString();
3682 }
3683
3684 private:
3685 void setFromString(const std::string &value);
3686
3687 constexpr ValueType static verifyValue(const ValueType &value)
3688 {
3689 return validRange().isInRange(value)
3690 ? value
3691 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
3692 + " } is not in range ["
3693 + std::to_string(validRange().min()) + ", "
3694 + std::to_string(validRange().max()) + "]" };
3695 }
3696
3697 Zivid::DataModel::Detail::Optional<double> m_opt;
3698
3699 friend struct DataModel::Detail::Befriend<Threshold>;
3700 };
3701
3702 using Descendants = std::tuple<
3705
3708
3721#ifndef NO_DOC
3722 template<
3723 typename... Args,
3724 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3725 typename std::enable_if<
3726 Zivid::Detail::TypeTraits::
3727 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3728 int>::type = 0>
3729#else
3730 template<typename... Args>
3731#endif
3732 explicit Removal(Args &&...args)
3733 {
3734 using namespace Zivid::Detail::TypeTraits;
3735
3736 static_assert(
3737 AllArgsDecayedAreUnique<Args...>::value,
3738 "Found duplicate types among the arguments passed to Removal(...). "
3739 "Types should be listed at most once.");
3740
3741 set(std::forward<Args>(args)...);
3742 }
3743
3755#ifndef NO_DOC
3756 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3757#else
3758 template<typename... Args>
3759#endif
3760 void set(Args &&...args)
3761 {
3762 using namespace Zivid::Detail::TypeTraits;
3763
3764 using AllArgsAreDescendantNodes =
3765 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3766 static_assert(
3767 AllArgsAreDescendantNodes::value,
3768 "All arguments passed to set(...) must be descendant nodes.");
3769
3770 static_assert(
3771 AllArgsDecayedAreUnique<Args...>::value,
3772 "Found duplicate types among the arguments passed to set(...). "
3773 "Types should be listed at most once.");
3774
3775 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3776 }
3777
3790#ifndef NO_DOC
3791 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3792#else
3793 template<typename... Args>
3794#endif
3795 Removal copyWith(Args &&...args) const
3796 {
3797 using namespace Zivid::Detail::TypeTraits;
3798
3799 using AllArgsAreDescendantNodes =
3800 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3801 static_assert(
3802 AllArgsAreDescendantNodes::value,
3803 "All arguments passed to copyWith(...) must be descendant nodes.");
3804
3805 static_assert(
3806 AllArgsDecayedAreUnique<Args...>::value,
3807 "Found duplicate types among the arguments passed to copyWith(...). "
3808 "Types should be listed at most once.");
3809
3810 auto copy{ *this };
3811 copy.set(std::forward<Args>(args)...);
3812 return copy;
3813 }
3814
3816 const Enabled &isEnabled() const
3817 {
3818 return m_enabled;
3819 }
3820
3823 {
3824 return m_enabled;
3825 }
3826
3828 Removal &set(const Enabled &value)
3829 {
3830 m_enabled = value;
3831 return *this;
3832 }
3833
3835 const Threshold &threshold() const
3836 {
3837 return m_threshold;
3838 }
3839
3842 {
3843 return m_threshold;
3844 }
3845
3847 Removal &set(const Threshold &value)
3848 {
3849 m_threshold = value;
3850 return *this;
3851 }
3852
3853 template<
3854 typename T,
3855 typename std::enable_if<
3856 std::is_same<
3857 T,
3858 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
3859 Enabled>::value,
3860 int>::type = 0>
3862 get() const
3863 {
3864 return m_enabled;
3865 }
3866
3867 template<
3868 typename T,
3869 typename std::enable_if<
3870 std::is_same<
3871 T,
3872 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
3873 Threshold>::value,
3874 int>::type = 0>
3876 get() const
3877 {
3878 return m_threshold;
3879 }
3880
3881 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3883 get() const
3884 {
3885 return m_enabled;
3886 }
3887
3888 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3890 get() const
3891 {
3892 return m_threshold;
3893 }
3894
3896 template<typename F>
3897 void forEach(const F &f) const
3898 {
3899 f(m_enabled);
3900 f(m_threshold);
3901 }
3902
3904 template<typename F>
3905 void forEach(const F &f)
3906 {
3907 f(m_enabled);
3908 f(m_threshold);
3909 }
3910
3912 bool operator==(const Removal &other) const;
3913
3915 bool operator!=(const Removal &other) const;
3916
3918 std::string toString() const;
3919
3921 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3922 {
3923 return stream << value.toString();
3924 }
3925
3926 private:
3927 void setFromString(const std::string &value);
3928
3929 void setFromString(const std::string &fullPath, const std::string &value);
3930
3931 std::string getString(const std::string &fullPath) const;
3932
3933 Enabled m_enabled;
3934 Threshold m_threshold;
3935
3936 friend struct DataModel::Detail::Befriend<Removal>;
3937 };
3938
3939 using Descendants = std::tuple<
3946
3949
3966#ifndef NO_DOC
3967 template<
3968 typename... Args,
3969 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3970 typename std::enable_if<
3971 Zivid::Detail::TypeTraits::
3972 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3973 int>::type = 0>
3974#else
3975 template<typename... Args>
3976#endif
3977 explicit ContrastDistortion(Args &&...args)
3978 {
3979 using namespace Zivid::Detail::TypeTraits;
3980
3981 static_assert(
3982 AllArgsDecayedAreUnique<Args...>::value,
3983 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
3984 "Types should be listed at most once.");
3985
3986 set(std::forward<Args>(args)...);
3987 }
3988
4004#ifndef NO_DOC
4005 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4006#else
4007 template<typename... Args>
4008#endif
4009 void set(Args &&...args)
4010 {
4011 using namespace Zivid::Detail::TypeTraits;
4012
4013 using AllArgsAreDescendantNodes =
4014 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4015 static_assert(
4016 AllArgsAreDescendantNodes::value,
4017 "All arguments passed to set(...) must be descendant nodes.");
4018
4019 static_assert(
4020 AllArgsDecayedAreUnique<Args...>::value,
4021 "Found duplicate types among the arguments passed to set(...). "
4022 "Types should be listed at most once.");
4023
4024 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4025 }
4026
4043#ifndef NO_DOC
4044 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4045#else
4046 template<typename... Args>
4047#endif
4048 ContrastDistortion copyWith(Args &&...args) const
4049 {
4050 using namespace Zivid::Detail::TypeTraits;
4051
4052 using AllArgsAreDescendantNodes =
4053 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4054 static_assert(
4055 AllArgsAreDescendantNodes::value,
4056 "All arguments passed to copyWith(...) must be descendant nodes.");
4057
4058 static_assert(
4059 AllArgsDecayedAreUnique<Args...>::value,
4060 "Found duplicate types among the arguments passed to copyWith(...). "
4061 "Types should be listed at most once.");
4062
4063 auto copy{ *this };
4064 copy.set(std::forward<Args>(args)...);
4065 return copy;
4066 }
4067
4069 const Correction &correction() const
4070 {
4071 return m_correction;
4072 }
4073
4076 {
4077 return m_correction;
4078 }
4079
4082 {
4083 m_correction = value;
4084 return *this;
4085 }
4086
4089 {
4090 m_correction.set(value);
4091 return *this;
4092 }
4093
4096 {
4097 m_correction.set(value);
4098 return *this;
4099 }
4100
4102 const Removal &removal() const
4103 {
4104 return m_removal;
4105 }
4106
4109 {
4110 return m_removal;
4111 }
4112
4115 {
4116 m_removal = value;
4117 return *this;
4118 }
4119
4122 {
4123 m_removal.set(value);
4124 return *this;
4125 }
4126
4129 {
4130 m_removal.set(value);
4131 return *this;
4132 }
4133
4134 template<
4135 typename T,
4136 typename std::enable_if<
4137 std::is_same<
4138 T,
4140 int>::type = 0>
4142 {
4143 return m_correction;
4144 }
4145
4146 template<
4147 typename T,
4148 typename std::enable_if<
4149 std::is_same<
4150 T,
4151 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4152 Enabled>::value,
4153 int>::type = 0>
4155 get() const
4156 {
4157 return m_correction.get<
4159 }
4160
4161 template<
4162 typename T,
4163 typename std::enable_if<
4164 std::is_same<
4165 T,
4166 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4167 Strength>::value,
4168 int>::type = 0>
4170 get() const
4171 {
4172 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
4173 Correction::Strength>();
4174 }
4175
4176 template<
4177 typename T,
4178 typename std::enable_if<
4179 std::is_same<
4180 T,
4182 int>::type = 0>
4184 {
4185 return m_removal;
4186 }
4187
4188 template<
4189 typename T,
4190 typename std::enable_if<
4191 std::is_same<
4192 T,
4194 value,
4195 int>::type = 0>
4197 const
4198 {
4199 return m_removal.get<
4201 }
4202
4203 template<
4204 typename T,
4205 typename std::enable_if<
4206 std::is_same<
4207 T,
4208 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4209 Threshold>::value,
4210 int>::type = 0>
4212 const
4213 {
4214 return m_removal.get<
4216 }
4217
4218 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4220 {
4221 return m_correction;
4222 }
4223
4224 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4226 {
4227 return m_removal;
4228 }
4229
4231 template<typename F>
4232 void forEach(const F &f) const
4233 {
4234 f(m_correction);
4235 f(m_removal);
4236 }
4237
4239 template<typename F>
4240 void forEach(const F &f)
4241 {
4242 f(m_correction);
4243 f(m_removal);
4244 }
4245
4247 bool operator==(const ContrastDistortion &other) const;
4248
4250 bool operator!=(const ContrastDistortion &other) const;
4251
4253 std::string toString() const;
4254
4256 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
4257 {
4258 return stream << value.toString();
4259 }
4260
4261 private:
4262 void setFromString(const std::string &value);
4263
4264 void setFromString(const std::string &fullPath, const std::string &value);
4265
4266 std::string getString(const std::string &fullPath) const;
4267
4268 Correction m_correction;
4269 Removal m_removal;
4270
4271 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
4272 };
4273
4274 using Descendants = std::tuple<
4282
4285
4303#ifndef NO_DOC
4304 template<
4305 typename... Args,
4306 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4307 typename std::enable_if<
4308 Zivid::Detail::TypeTraits::
4309 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4310 int>::type = 0>
4311#else
4312 template<typename... Args>
4313#endif
4314 explicit Experimental(Args &&...args)
4315 {
4316 using namespace Zivid::Detail::TypeTraits;
4317
4318 static_assert(
4319 AllArgsDecayedAreUnique<Args...>::value,
4320 "Found duplicate types among the arguments passed to Experimental(...). "
4321 "Types should be listed at most once.");
4322
4323 set(std::forward<Args>(args)...);
4324 }
4325
4342#ifndef NO_DOC
4343 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4344#else
4345 template<typename... Args>
4346#endif
4347 void set(Args &&...args)
4348 {
4349 using namespace Zivid::Detail::TypeTraits;
4350
4351 using AllArgsAreDescendantNodes =
4352 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4353 static_assert(
4354 AllArgsAreDescendantNodes::value,
4355 "All arguments passed to set(...) must be descendant nodes.");
4356
4357 static_assert(
4358 AllArgsDecayedAreUnique<Args...>::value,
4359 "Found duplicate types among the arguments passed to set(...). "
4360 "Types should be listed at most once.");
4361
4362 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4363 }
4364
4382#ifndef NO_DOC
4383 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4384#else
4385 template<typename... Args>
4386#endif
4387 Experimental copyWith(Args &&...args) const
4388 {
4389 using namespace Zivid::Detail::TypeTraits;
4390
4391 using AllArgsAreDescendantNodes =
4392 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4393 static_assert(
4394 AllArgsAreDescendantNodes::value,
4395 "All arguments passed to copyWith(...) must be descendant nodes.");
4396
4397 static_assert(
4398 AllArgsDecayedAreUnique<Args...>::value,
4399 "Found duplicate types among the arguments passed to copyWith(...). "
4400 "Types should be listed at most once.");
4401
4402 auto copy{ *this };
4403 copy.set(std::forward<Args>(args)...);
4404 return copy;
4405 }
4406
4409 {
4410 return m_contrastDistortion;
4411 }
4412
4415 {
4416 return m_contrastDistortion;
4417 }
4418
4421 {
4422 m_contrastDistortion = value;
4423 return *this;
4424 }
4425
4428 {
4429 m_contrastDistortion.set(value);
4430 return *this;
4431 }
4432
4435 {
4436 m_contrastDistortion.set(value);
4437 return *this;
4438 }
4439
4442 {
4443 m_contrastDistortion.set(value);
4444 return *this;
4445 }
4446
4449 {
4450 m_contrastDistortion.set(value);
4451 return *this;
4452 }
4453
4456 {
4457 m_contrastDistortion.set(value);
4458 return *this;
4459 }
4460
4463 {
4464 m_contrastDistortion.set(value);
4465 return *this;
4466 }
4467
4468 template<
4469 typename T,
4470 typename std::enable_if<
4471 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
4472 int>::type = 0>
4474 {
4475 return m_contrastDistortion;
4476 }
4477
4478 template<
4479 typename T,
4480 typename std::enable_if<
4481 std::is_same<
4482 T,
4484 int>::type = 0>
4486 {
4487 return m_contrastDistortion
4489 }
4490
4491 template<
4492 typename T,
4493 typename std::enable_if<
4494 std::is_same<
4495 T,
4497 value,
4498 int>::type = 0>
4500 const
4501 {
4502 return m_contrastDistortion.get<
4504 }
4505
4506 template<
4507 typename T,
4508 typename std::enable_if<
4509 std::is_same<
4510 T,
4512 value,
4513 int>::type = 0>
4515 const
4516 {
4517 return m_contrastDistortion.get<
4519 }
4520
4521 template<
4522 typename T,
4523 typename std::enable_if<
4524 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
4525 value,
4526 int>::type = 0>
4528 {
4529 return m_contrastDistortion
4531 }
4532
4533 template<
4534 typename T,
4535 typename std::enable_if<
4536 std::is_same<
4537 T,
4539 value,
4540 int>::type = 0>
4542 {
4543 return m_contrastDistortion
4545 }
4546
4547 template<
4548 typename T,
4549 typename std::enable_if<
4550 std::is_same<
4551 T,
4553 value,
4554 int>::type = 0>
4556 const
4557 {
4558 return m_contrastDistortion
4560 }
4561
4562 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4564 {
4565 return m_contrastDistortion;
4566 }
4567
4569 template<typename F>
4570 void forEach(const F &f) const
4571 {
4572 f(m_contrastDistortion);
4573 }
4574
4576 template<typename F>
4577 void forEach(const F &f)
4578 {
4579 f(m_contrastDistortion);
4580 }
4581
4583 bool operator==(const Experimental &other) const;
4584
4586 bool operator!=(const Experimental &other) const;
4587
4589 std::string toString() const;
4590
4592 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
4593 {
4594 return stream << value.toString();
4595 }
4596
4597 private:
4598 void setFromString(const std::string &value);
4599
4600 void setFromString(const std::string &fullPath, const std::string &value);
4601
4602 std::string getString(const std::string &fullPath) const;
4603
4604 ContrastDistortion m_contrastDistortion;
4605
4606 friend struct DataModel::Detail::Befriend<Experimental>;
4607 };
4608
4611 {
4612 public:
4615
4617 static constexpr const char *path{ "Processing/Filters/Noise" };
4618
4620 static constexpr const char *name{ "Noise" };
4621
4623 static constexpr const char *description{
4624 R"description(Contains a filter that removes points with low signal-to-noise ratio (SNR))description"
4625 };
4626
4629 {
4630 public:
4633
4635 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
4636
4638 static constexpr const char *name{ "Removal" };
4639
4641 static constexpr const char *description{
4642 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold)description"
4643 };
4644
4647 {
4648 public:
4651
4653 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
4654
4656 static constexpr const char *name{ "Enabled" };
4657
4659 static constexpr const char *description{
4660 R"description(Enable or disable the SNR filter)description"
4661 };
4662
4664 using ValueType = bool;
4665 static const Enabled yes;
4666 static const Enabled no;
4667
4669 static std::set<bool> validValues()
4670 {
4671 return { false, true };
4672 }
4673
4675 Enabled() = default;
4676
4678 explicit constexpr Enabled(bool value)
4679 : m_opt{ value }
4680 {}
4681
4686 bool value() const;
4687
4689 bool hasValue() const;
4690
4692 void reset();
4693
4695 std::string toString() const;
4696
4698 bool operator==(const Enabled &other) const
4699 {
4700 return m_opt == other.m_opt;
4701 }
4702
4704 bool operator!=(const Enabled &other) const
4705 {
4706 return m_opt != other.m_opt;
4707 }
4708
4710 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4711 {
4712 return stream << value.toString();
4713 }
4714
4715 private:
4716 void setFromString(const std::string &value);
4717
4718 Zivid::DataModel::Detail::Optional<bool> m_opt;
4719
4720 friend struct DataModel::Detail::Befriend<Enabled>;
4721 };
4722
4725 {
4726 public:
4729
4731 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
4732
4734 static constexpr const char *name{ "Threshold" };
4735
4737 static constexpr const char *description{
4738 R"description(Discard points with signal-to-noise ratio (SNR) below the given value)description"
4739 };
4740
4742 using ValueType = double;
4743
4745 static constexpr Range<double> validRange()
4746 {
4747 return { 0.0, 100.0 };
4748 }
4749
4751 Threshold() = default;
4752
4754 explicit constexpr Threshold(double value)
4755 : m_opt{ verifyValue(value) }
4756 {}
4757
4762 double value() const;
4763
4765 bool hasValue() const;
4766
4768 void reset();
4769
4771 std::string toString() const;
4772
4774 bool operator==(const Threshold &other) const
4775 {
4776 return m_opt == other.m_opt;
4777 }
4778
4780 bool operator!=(const Threshold &other) const
4781 {
4782 return m_opt != other.m_opt;
4783 }
4784
4786 bool operator<(const Threshold &other) const
4787 {
4788 return m_opt < other.m_opt;
4789 }
4790
4792 bool operator>(const Threshold &other) const
4793 {
4794 return m_opt > other.m_opt;
4795 }
4796
4798 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4799 {
4800 return stream << value.toString();
4801 }
4802
4803 private:
4804 void setFromString(const std::string &value);
4805
4806 constexpr ValueType static verifyValue(const ValueType &value)
4807 {
4808 return validRange().isInRange(value)
4809 ? value
4810 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4811 + " } is not in range ["
4812 + std::to_string(validRange().min()) + ", "
4813 + std::to_string(validRange().max()) + "]" };
4814 }
4815
4816 Zivid::DataModel::Detail::Optional<double> m_opt;
4817
4818 friend struct DataModel::Detail::Befriend<Threshold>;
4819 };
4820
4821 using Descendants = std::tuple<
4824
4827
4840#ifndef NO_DOC
4841 template<
4842 typename... Args,
4843 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4844 typename std::enable_if<
4845 Zivid::Detail::TypeTraits::
4846 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4847 int>::type = 0>
4848#else
4849 template<typename... Args>
4850#endif
4851 explicit Removal(Args &&...args)
4852 {
4853 using namespace Zivid::Detail::TypeTraits;
4854
4855 static_assert(
4856 AllArgsDecayedAreUnique<Args...>::value,
4857 "Found duplicate types among the arguments passed to Removal(...). "
4858 "Types should be listed at most once.");
4859
4860 set(std::forward<Args>(args)...);
4861 }
4862
4874#ifndef NO_DOC
4875 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4876#else
4877 template<typename... Args>
4878#endif
4879 void set(Args &&...args)
4880 {
4881 using namespace Zivid::Detail::TypeTraits;
4882
4883 using AllArgsAreDescendantNodes =
4884 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4885 static_assert(
4886 AllArgsAreDescendantNodes::value,
4887 "All arguments passed to set(...) must be descendant nodes.");
4888
4889 static_assert(
4890 AllArgsDecayedAreUnique<Args...>::value,
4891 "Found duplicate types among the arguments passed to set(...). "
4892 "Types should be listed at most once.");
4893
4894 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4895 }
4896
4909#ifndef NO_DOC
4910 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4911#else
4912 template<typename... Args>
4913#endif
4914 Removal copyWith(Args &&...args) const
4915 {
4916 using namespace Zivid::Detail::TypeTraits;
4917
4918 using AllArgsAreDescendantNodes =
4919 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4920 static_assert(
4921 AllArgsAreDescendantNodes::value,
4922 "All arguments passed to copyWith(...) must be descendant nodes.");
4923
4924 static_assert(
4925 AllArgsDecayedAreUnique<Args...>::value,
4926 "Found duplicate types among the arguments passed to copyWith(...). "
4927 "Types should be listed at most once.");
4928
4929 auto copy{ *this };
4930 copy.set(std::forward<Args>(args)...);
4931 return copy;
4932 }
4933
4935 const Enabled &isEnabled() const
4936 {
4937 return m_enabled;
4938 }
4939
4942 {
4943 return m_enabled;
4944 }
4945
4947 Removal &set(const Enabled &value)
4948 {
4949 m_enabled = value;
4950 return *this;
4951 }
4952
4954 const Threshold &threshold() const
4955 {
4956 return m_threshold;
4957 }
4958
4961 {
4962 return m_threshold;
4963 }
4964
4966 Removal &set(const Threshold &value)
4967 {
4968 m_threshold = value;
4969 return *this;
4970 }
4971
4972 template<
4973 typename T,
4974 typename std::enable_if<
4975 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
4976 int>::type = 0>
4978 {
4979 return m_enabled;
4980 }
4981
4982 template<
4983 typename T,
4984 typename std::enable_if<
4985 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
4986 int>::type = 0>
4988 {
4989 return m_threshold;
4990 }
4991
4992 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4994 {
4995 return m_enabled;
4996 }
4997
4998 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5000 {
5001 return m_threshold;
5002 }
5003
5005 template<typename F>
5006 void forEach(const F &f) const
5007 {
5008 f(m_enabled);
5009 f(m_threshold);
5010 }
5011
5013 template<typename F>
5014 void forEach(const F &f)
5015 {
5016 f(m_enabled);
5017 f(m_threshold);
5018 }
5019
5021 bool operator==(const Removal &other) const;
5022
5024 bool operator!=(const Removal &other) const;
5025
5027 std::string toString() const;
5028
5030 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5031 {
5032 return stream << value.toString();
5033 }
5034
5035 private:
5036 void setFromString(const std::string &value);
5037
5038 void setFromString(const std::string &fullPath, const std::string &value);
5039
5040 std::string getString(const std::string &fullPath) const;
5041
5042 Enabled m_enabled;
5043 Threshold m_threshold;
5044
5045 friend struct DataModel::Detail::Befriend<Removal>;
5046 };
5047
5048 using Descendants = std::tuple<
5052
5055
5069#ifndef NO_DOC
5070 template<
5071 typename... Args,
5072 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5073 typename std::enable_if<
5074 Zivid::Detail::TypeTraits::
5075 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5076 int>::type = 0>
5077#else
5078 template<typename... Args>
5079#endif
5080 explicit Noise(Args &&...args)
5081 {
5082 using namespace Zivid::Detail::TypeTraits;
5083
5084 static_assert(
5085 AllArgsDecayedAreUnique<Args...>::value,
5086 "Found duplicate types among the arguments passed to Noise(...). "
5087 "Types should be listed at most once.");
5088
5089 set(std::forward<Args>(args)...);
5090 }
5091
5104#ifndef NO_DOC
5105 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5106#else
5107 template<typename... Args>
5108#endif
5109 void set(Args &&...args)
5110 {
5111 using namespace Zivid::Detail::TypeTraits;
5112
5113 using AllArgsAreDescendantNodes =
5114 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5115 static_assert(
5116 AllArgsAreDescendantNodes::value,
5117 "All arguments passed to set(...) must be descendant nodes.");
5118
5119 static_assert(
5120 AllArgsDecayedAreUnique<Args...>::value,
5121 "Found duplicate types among the arguments passed to set(...). "
5122 "Types should be listed at most once.");
5123
5124 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5125 }
5126
5140#ifndef NO_DOC
5141 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5142#else
5143 template<typename... Args>
5144#endif
5145 Noise copyWith(Args &&...args) const
5146 {
5147 using namespace Zivid::Detail::TypeTraits;
5148
5149 using AllArgsAreDescendantNodes =
5150 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5151 static_assert(
5152 AllArgsAreDescendantNodes::value,
5153 "All arguments passed to copyWith(...) must be descendant nodes.");
5154
5155 static_assert(
5156 AllArgsDecayedAreUnique<Args...>::value,
5157 "Found duplicate types among the arguments passed to copyWith(...). "
5158 "Types should be listed at most once.");
5159
5160 auto copy{ *this };
5161 copy.set(std::forward<Args>(args)...);
5162 return copy;
5163 }
5164
5166 const Removal &removal() const
5167 {
5168 return m_removal;
5169 }
5170
5173 {
5174 return m_removal;
5175 }
5176
5178 Noise &set(const Removal &value)
5179 {
5180 m_removal = value;
5181 return *this;
5182 }
5183
5186 {
5187 m_removal.set(value);
5188 return *this;
5189 }
5190
5193 {
5194 m_removal.set(value);
5195 return *this;
5196 }
5197
5198 template<
5199 typename T,
5200 typename std::enable_if<
5201 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
5202 int>::type = 0>
5204 {
5205 return m_removal;
5206 }
5207
5208 template<
5209 typename T,
5210 typename std::enable_if<
5211 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
5212 int>::type = 0>
5214 {
5216 }
5217
5218 template<
5219 typename T,
5220 typename std::enable_if<
5221 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
5222 int>::type = 0>
5224 {
5226 }
5227
5228 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5230 {
5231 return m_removal;
5232 }
5233
5235 template<typename F>
5236 void forEach(const F &f) const
5237 {
5238 f(m_removal);
5239 }
5240
5242 template<typename F>
5243 void forEach(const F &f)
5244 {
5245 f(m_removal);
5246 }
5247
5249 bool operator==(const Noise &other) const;
5250
5252 bool operator!=(const Noise &other) const;
5253
5255 std::string toString() const;
5256
5258 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
5259 {
5260 return stream << value.toString();
5261 }
5262
5263 private:
5264 void setFromString(const std::string &value);
5265
5266 void setFromString(const std::string &fullPath, const std::string &value);
5267
5268 std::string getString(const std::string &fullPath) const;
5269
5270 Removal m_removal;
5271
5272 friend struct DataModel::Detail::Befriend<Noise>;
5273 };
5274
5277 {
5278 public:
5281
5283 static constexpr const char *path{ "Processing/Filters/Outlier" };
5284
5286 static constexpr const char *name{ "Outlier" };
5287
5289 static constexpr const char *description{
5290 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points)description"
5291 };
5292
5295 {
5296 public:
5299
5301 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
5302
5304 static constexpr const char *name{ "Removal" };
5305
5307 static constexpr const char *description{
5308 R"description(Discard point if Euclidean distance to neighboring points is above a threshold)description"
5309 };
5310
5313 {
5314 public:
5317
5319 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
5320
5322 static constexpr const char *name{ "Enabled" };
5323
5325 static constexpr const char *description{
5326 R"description(Enable or disable the outlier filter)description"
5327 };
5328
5330 using ValueType = bool;
5331 static const Enabled yes;
5332 static const Enabled no;
5333
5335 static std::set<bool> validValues()
5336 {
5337 return { false, true };
5338 }
5339
5341 Enabled() = default;
5342
5344 explicit constexpr Enabled(bool value)
5345 : m_opt{ value }
5346 {}
5347
5352 bool value() const;
5353
5355 bool hasValue() const;
5356
5358 void reset();
5359
5361 std::string toString() const;
5362
5364 bool operator==(const Enabled &other) const
5365 {
5366 return m_opt == other.m_opt;
5367 }
5368
5370 bool operator!=(const Enabled &other) const
5371 {
5372 return m_opt != other.m_opt;
5373 }
5374
5376 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5377 {
5378 return stream << value.toString();
5379 }
5380
5381 private:
5382 void setFromString(const std::string &value);
5383
5384 Zivid::DataModel::Detail::Optional<bool> m_opt;
5385
5386 friend struct DataModel::Detail::Befriend<Enabled>;
5387 };
5388
5391 {
5392 public:
5395
5397 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
5398
5400 static constexpr const char *name{ "Threshold" };
5401
5403 static constexpr const char *description{
5404 R"description(Discard point if Euclidean distance to neighboring points is above the given value)description"
5405 };
5406
5408 using ValueType = double;
5409
5411 static constexpr Range<double> validRange()
5412 {
5413 return { 0.0, 100.0 };
5414 }
5415
5417 Threshold() = default;
5418
5420 explicit constexpr Threshold(double value)
5421 : m_opt{ verifyValue(value) }
5422 {}
5423
5428 double value() const;
5429
5431 bool hasValue() const;
5432
5434 void reset();
5435
5437 std::string toString() const;
5438
5440 bool operator==(const Threshold &other) const
5441 {
5442 return m_opt == other.m_opt;
5443 }
5444
5446 bool operator!=(const Threshold &other) const
5447 {
5448 return m_opt != other.m_opt;
5449 }
5450
5452 bool operator<(const Threshold &other) const
5453 {
5454 return m_opt < other.m_opt;
5455 }
5456
5458 bool operator>(const Threshold &other) const
5459 {
5460 return m_opt > other.m_opt;
5461 }
5462
5464 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
5465 {
5466 return stream << value.toString();
5467 }
5468
5469 private:
5470 void setFromString(const std::string &value);
5471
5472 constexpr ValueType static verifyValue(const ValueType &value)
5473 {
5474 return validRange().isInRange(value)
5475 ? value
5476 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
5477 + " } is not in range ["
5478 + std::to_string(validRange().min()) + ", "
5479 + std::to_string(validRange().max()) + "]" };
5480 }
5481
5482 Zivid::DataModel::Detail::Optional<double> m_opt;
5483
5484 friend struct DataModel::Detail::Befriend<Threshold>;
5485 };
5486
5487 using Descendants = std::tuple<
5490
5493
5506#ifndef NO_DOC
5507 template<
5508 typename... Args,
5509 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5510 typename std::enable_if<
5511 Zivid::Detail::TypeTraits::
5512 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5513 int>::type = 0>
5514#else
5515 template<typename... Args>
5516#endif
5517 explicit Removal(Args &&...args)
5518 {
5519 using namespace Zivid::Detail::TypeTraits;
5520
5521 static_assert(
5522 AllArgsDecayedAreUnique<Args...>::value,
5523 "Found duplicate types among the arguments passed to Removal(...). "
5524 "Types should be listed at most once.");
5525
5526 set(std::forward<Args>(args)...);
5527 }
5528
5540#ifndef NO_DOC
5541 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5542#else
5543 template<typename... Args>
5544#endif
5545 void set(Args &&...args)
5546 {
5547 using namespace Zivid::Detail::TypeTraits;
5548
5549 using AllArgsAreDescendantNodes =
5550 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5551 static_assert(
5552 AllArgsAreDescendantNodes::value,
5553 "All arguments passed to set(...) must be descendant nodes.");
5554
5555 static_assert(
5556 AllArgsDecayedAreUnique<Args...>::value,
5557 "Found duplicate types among the arguments passed to set(...). "
5558 "Types should be listed at most once.");
5559
5560 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5561 }
5562
5575#ifndef NO_DOC
5576 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5577#else
5578 template<typename... Args>
5579#endif
5580 Removal copyWith(Args &&...args) const
5581 {
5582 using namespace Zivid::Detail::TypeTraits;
5583
5584 using AllArgsAreDescendantNodes =
5585 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5586 static_assert(
5587 AllArgsAreDescendantNodes::value,
5588 "All arguments passed to copyWith(...) must be descendant nodes.");
5589
5590 static_assert(
5591 AllArgsDecayedAreUnique<Args...>::value,
5592 "Found duplicate types among the arguments passed to copyWith(...). "
5593 "Types should be listed at most once.");
5594
5595 auto copy{ *this };
5596 copy.set(std::forward<Args>(args)...);
5597 return copy;
5598 }
5599
5601 const Enabled &isEnabled() const
5602 {
5603 return m_enabled;
5604 }
5605
5608 {
5609 return m_enabled;
5610 }
5611
5613 Removal &set(const Enabled &value)
5614 {
5615 m_enabled = value;
5616 return *this;
5617 }
5618
5620 const Threshold &threshold() const
5621 {
5622 return m_threshold;
5623 }
5624
5627 {
5628 return m_threshold;
5629 }
5630
5632 Removal &set(const Threshold &value)
5633 {
5634 m_threshold = value;
5635 return *this;
5636 }
5637
5638 template<
5639 typename T,
5640 typename std::enable_if<
5641 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5642 int>::type = 0>
5644 {
5645 return m_enabled;
5646 }
5647
5648 template<
5649 typename T,
5650 typename std::enable_if<
5651 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5652 int>::type = 0>
5654 {
5655 return m_threshold;
5656 }
5657
5658 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5660 {
5661 return m_enabled;
5662 }
5663
5664 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5666 {
5667 return m_threshold;
5668 }
5669
5671 template<typename F>
5672 void forEach(const F &f) const
5673 {
5674 f(m_enabled);
5675 f(m_threshold);
5676 }
5677
5679 template<typename F>
5680 void forEach(const F &f)
5681 {
5682 f(m_enabled);
5683 f(m_threshold);
5684 }
5685
5687 bool operator==(const Removal &other) const;
5688
5690 bool operator!=(const Removal &other) const;
5691
5693 std::string toString() const;
5694
5696 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5697 {
5698 return stream << value.toString();
5699 }
5700
5701 private:
5702 void setFromString(const std::string &value);
5703
5704 void setFromString(const std::string &fullPath, const std::string &value);
5705
5706 std::string getString(const std::string &fullPath) const;
5707
5708 Enabled m_enabled;
5709 Threshold m_threshold;
5710
5711 friend struct DataModel::Detail::Befriend<Removal>;
5712 };
5713
5714 using Descendants = std::tuple<
5718
5721
5735#ifndef NO_DOC
5736 template<
5737 typename... Args,
5738 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5739 typename std::enable_if<
5740 Zivid::Detail::TypeTraits::
5741 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5742 int>::type = 0>
5743#else
5744 template<typename... Args>
5745#endif
5746 explicit Outlier(Args &&...args)
5747 {
5748 using namespace Zivid::Detail::TypeTraits;
5749
5750 static_assert(
5751 AllArgsDecayedAreUnique<Args...>::value,
5752 "Found duplicate types among the arguments passed to Outlier(...). "
5753 "Types should be listed at most once.");
5754
5755 set(std::forward<Args>(args)...);
5756 }
5757
5770#ifndef NO_DOC
5771 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5772#else
5773 template<typename... Args>
5774#endif
5775 void set(Args &&...args)
5776 {
5777 using namespace Zivid::Detail::TypeTraits;
5778
5779 using AllArgsAreDescendantNodes =
5780 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5781 static_assert(
5782 AllArgsAreDescendantNodes::value,
5783 "All arguments passed to set(...) must be descendant nodes.");
5784
5785 static_assert(
5786 AllArgsDecayedAreUnique<Args...>::value,
5787 "Found duplicate types among the arguments passed to set(...). "
5788 "Types should be listed at most once.");
5789
5790 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5791 }
5792
5806#ifndef NO_DOC
5807 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5808#else
5809 template<typename... Args>
5810#endif
5811 Outlier copyWith(Args &&...args) const
5812 {
5813 using namespace Zivid::Detail::TypeTraits;
5814
5815 using AllArgsAreDescendantNodes =
5816 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5817 static_assert(
5818 AllArgsAreDescendantNodes::value,
5819 "All arguments passed to copyWith(...) must be descendant nodes.");
5820
5821 static_assert(
5822 AllArgsDecayedAreUnique<Args...>::value,
5823 "Found duplicate types among the arguments passed to copyWith(...). "
5824 "Types should be listed at most once.");
5825
5826 auto copy{ *this };
5827 copy.set(std::forward<Args>(args)...);
5828 return copy;
5829 }
5830
5832 const Removal &removal() const
5833 {
5834 return m_removal;
5835 }
5836
5839 {
5840 return m_removal;
5841 }
5842
5844 Outlier &set(const Removal &value)
5845 {
5846 m_removal = value;
5847 return *this;
5848 }
5849
5852 {
5853 m_removal.set(value);
5854 return *this;
5855 }
5856
5859 {
5860 m_removal.set(value);
5861 return *this;
5862 }
5863
5864 template<
5865 typename T,
5866 typename std::enable_if<
5867 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
5868 int>::type = 0>
5870 {
5871 return m_removal;
5872 }
5873
5874 template<
5875 typename T,
5876 typename std::enable_if<
5877 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5878 int>::type = 0>
5880 {
5882 }
5883
5884 template<
5885 typename T,
5886 typename std::enable_if<
5887 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5888 int>::type = 0>
5890 {
5892 }
5893
5894 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5896 {
5897 return m_removal;
5898 }
5899
5901 template<typename F>
5902 void forEach(const F &f) const
5903 {
5904 f(m_removal);
5905 }
5906
5908 template<typename F>
5909 void forEach(const F &f)
5910 {
5911 f(m_removal);
5912 }
5913
5915 bool operator==(const Outlier &other) const;
5916
5918 bool operator!=(const Outlier &other) const;
5919
5921 std::string toString() const;
5922
5924 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
5925 {
5926 return stream << value.toString();
5927 }
5928
5929 private:
5930 void setFromString(const std::string &value);
5931
5932 void setFromString(const std::string &fullPath, const std::string &value);
5933
5934 std::string getString(const std::string &fullPath) const;
5935
5936 Removal m_removal;
5937
5938 friend struct DataModel::Detail::Befriend<Outlier>;
5939 };
5940
5943 {
5944 public:
5947
5949 static constexpr const char *path{ "Processing/Filters/Reflection" };
5950
5952 static constexpr const char *name{ "Reflection" };
5953
5955 static constexpr const char *description{
5956 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials))description"
5957 };
5958
5961 {
5962 public:
5965
5967 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
5968
5970 static constexpr const char *name{ "Removal" };
5971
5973 static constexpr const char *description{
5974 R"description(Discard points likely introduced by reflections (useful for shiny materials))description"
5975 };
5976
5979 {
5980 public:
5983
5985 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
5986
5988 static constexpr const char *name{ "Enabled" };
5989
5991 static constexpr const char *description{
5992 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate)description"
5993 };
5994
5996 using ValueType = bool;
5997 static const Enabled yes;
5998 static const Enabled no;
5999
6001 static std::set<bool> validValues()
6002 {
6003 return { false, true };
6004 }
6005
6007 Enabled() = default;
6008
6010 explicit constexpr Enabled(bool value)
6011 : m_opt{ value }
6012 {}
6013
6018 bool value() const;
6019
6021 bool hasValue() const;
6022
6024 void reset();
6025
6027 std::string toString() const;
6028
6030 bool operator==(const Enabled &other) const
6031 {
6032 return m_opt == other.m_opt;
6033 }
6034
6036 bool operator!=(const Enabled &other) const
6037 {
6038 return m_opt != other.m_opt;
6039 }
6040
6042 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6043 {
6044 return stream << value.toString();
6045 }
6046
6047 private:
6048 void setFromString(const std::string &value);
6049
6050 Zivid::DataModel::Detail::Optional<bool> m_opt;
6051
6052 friend struct DataModel::Detail::Befriend<Enabled>;
6053 };
6054
6057 {
6058 public:
6061
6063 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Experimental" };
6064
6066 static constexpr const char *name{ "Experimental" };
6067
6069 static constexpr const char *description{
6070 R"description(Experimental reflection filter related settings)description"
6071 };
6072
6082 {
6083 public:
6086
6088 static constexpr const char *path{
6089 "Processing/Filters/Reflection/Removal/Experimental/Mode"
6090 };
6091
6093 static constexpr const char *name{ "Mode" };
6094
6096 static constexpr const char *description{
6097 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
6098on thinner objects, generally removes more reflection artifacts and processes faster than
6099the Global filter. The Global filter is generally better at removing outlier points in
6100the point cloud. It is advised to use the Outlier filter together with the Local
6101Reflection filter.
6102
6103Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
6104)description"
6105 };
6106
6108 enum class ValueType
6109 {
6110 global,
6111 local
6112 };
6113 static const Mode global;
6114 static const Mode local;
6115
6117 static std::set<ValueType> validValues()
6118 {
6119 return { ValueType::global, ValueType::local };
6120 }
6121
6123 Mode() = default;
6124
6126 explicit constexpr Mode(ValueType value)
6127 : m_opt{ verifyValue(value) }
6128 {}
6129
6135
6137 bool hasValue() const;
6138
6140 void reset();
6141
6143 std::string toString() const;
6144
6146 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
6147 {
6148 return stream << Mode{ value }.toString();
6149 }
6150
6152 bool operator==(const Mode &other) const
6153 {
6154 return m_opt == other.m_opt;
6155 }
6156
6158 bool operator!=(const Mode &other) const
6159 {
6160 return m_opt != other.m_opt;
6161 }
6162
6164 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
6165 {
6166 return stream << value.toString();
6167 }
6168
6169 private:
6170 void setFromString(const std::string &value);
6171
6172 constexpr ValueType static verifyValue(const ValueType &value)
6173 {
6174 return value == ValueType::global || value == ValueType::local
6175 ? value
6176 : throw std::invalid_argument{
6177 "Invalid value: Mode{ "
6178 + std::to_string(
6179 static_cast<std::underlying_type<ValueType>::type>(value))
6180 + " }"
6181 };
6182 }
6183
6184 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
6185
6186 friend struct DataModel::Detail::Befriend<Mode>;
6187 };
6188
6190 std::tuple<Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>;
6191
6194
6206#ifndef NO_DOC
6207 template<
6208 typename... Args,
6209 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6210 typename std::enable_if<
6211 Zivid::Detail::TypeTraits::
6212 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6213 int>::type = 0>
6214#else
6215 template<typename... Args>
6216#endif
6217 explicit Experimental(Args &&...args)
6218 {
6219 using namespace Zivid::Detail::TypeTraits;
6220
6221 static_assert(
6222 AllArgsDecayedAreUnique<Args...>::value,
6223 "Found duplicate types among the arguments passed to Experimental(...). "
6224 "Types should be listed at most once.");
6225
6226 set(std::forward<Args>(args)...);
6227 }
6228
6239#ifndef NO_DOC
6240 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6241#else
6242 template<typename... Args>
6243#endif
6244 void set(Args &&...args)
6245 {
6246 using namespace Zivid::Detail::TypeTraits;
6247
6248 using AllArgsAreDescendantNodes =
6249 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6250 static_assert(
6251 AllArgsAreDescendantNodes::value,
6252 "All arguments passed to set(...) must be descendant nodes.");
6253
6254 static_assert(
6255 AllArgsDecayedAreUnique<Args...>::value,
6256 "Found duplicate types among the arguments passed to set(...). "
6257 "Types should be listed at most once.");
6258
6259 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6260 }
6261
6273#ifndef NO_DOC
6274 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6275#else
6276 template<typename... Args>
6277#endif
6278 Experimental copyWith(Args &&...args) const
6279 {
6280 using namespace Zivid::Detail::TypeTraits;
6281
6282 using AllArgsAreDescendantNodes =
6283 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6284 static_assert(
6285 AllArgsAreDescendantNodes::value,
6286 "All arguments passed to copyWith(...) must be descendant nodes.");
6287
6288 static_assert(
6289 AllArgsDecayedAreUnique<Args...>::value,
6290 "Found duplicate types among the arguments passed to copyWith(...). "
6291 "Types should be listed at most once.");
6292
6293 auto copy{ *this };
6294 copy.set(std::forward<Args>(args)...);
6295 return copy;
6296 }
6297
6299 const Mode &mode() const
6300 {
6301 return m_mode;
6302 }
6303
6306 {
6307 return m_mode;
6308 }
6309
6311 Experimental &set(const Mode &value)
6312 {
6313 m_mode = value;
6314 return *this;
6315 }
6316
6317 template<
6318 typename T,
6319 typename std::enable_if<
6320 std::is_same<
6321 T,
6323 int>::type = 0>
6325 {
6326 return m_mode;
6327 }
6328
6329 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6331 {
6332 return m_mode;
6333 }
6334
6336 template<typename F>
6337 void forEach(const F &f) const
6338 {
6339 f(m_mode);
6340 }
6341
6343 template<typename F>
6344 void forEach(const F &f)
6345 {
6346 f(m_mode);
6347 }
6348
6350 bool operator==(const Experimental &other) const;
6351
6353 bool operator!=(const Experimental &other) const;
6354
6356 std::string toString() const;
6357
6359 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
6360 {
6361 return stream << value.toString();
6362 }
6363
6364 private:
6365 void setFromString(const std::string &value);
6366
6367 void setFromString(const std::string &fullPath, const std::string &value);
6368
6369 std::string getString(const std::string &fullPath) const;
6370
6371 Mode m_mode;
6372
6373 friend struct DataModel::Detail::Befriend<Experimental>;
6374 };
6375
6376 using Descendants = std::tuple<
6380
6383
6397#ifndef NO_DOC
6398 template<
6399 typename... Args,
6400 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6401 typename std::enable_if<
6402 Zivid::Detail::TypeTraits::
6403 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6404 int>::type = 0>
6405#else
6406 template<typename... Args>
6407#endif
6408 explicit Removal(Args &&...args)
6409 {
6410 using namespace Zivid::Detail::TypeTraits;
6411
6412 static_assert(
6413 AllArgsDecayedAreUnique<Args...>::value,
6414 "Found duplicate types among the arguments passed to Removal(...). "
6415 "Types should be listed at most once.");
6416
6417 set(std::forward<Args>(args)...);
6418 }
6419
6432#ifndef NO_DOC
6433 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6434#else
6435 template<typename... Args>
6436#endif
6437 void set(Args &&...args)
6438 {
6439 using namespace Zivid::Detail::TypeTraits;
6440
6441 using AllArgsAreDescendantNodes =
6442 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6443 static_assert(
6444 AllArgsAreDescendantNodes::value,
6445 "All arguments passed to set(...) must be descendant nodes.");
6446
6447 static_assert(
6448 AllArgsDecayedAreUnique<Args...>::value,
6449 "Found duplicate types among the arguments passed to set(...). "
6450 "Types should be listed at most once.");
6451
6452 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6453 }
6454
6468#ifndef NO_DOC
6469 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6470#else
6471 template<typename... Args>
6472#endif
6473 Removal copyWith(Args &&...args) const
6474 {
6475 using namespace Zivid::Detail::TypeTraits;
6476
6477 using AllArgsAreDescendantNodes =
6478 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6479 static_assert(
6480 AllArgsAreDescendantNodes::value,
6481 "All arguments passed to copyWith(...) must be descendant nodes.");
6482
6483 static_assert(
6484 AllArgsDecayedAreUnique<Args...>::value,
6485 "Found duplicate types among the arguments passed to copyWith(...). "
6486 "Types should be listed at most once.");
6487
6488 auto copy{ *this };
6489 copy.set(std::forward<Args>(args)...);
6490 return copy;
6491 }
6492
6494 const Enabled &isEnabled() const
6495 {
6496 return m_enabled;
6497 }
6498
6501 {
6502 return m_enabled;
6503 }
6504
6506 Removal &set(const Enabled &value)
6507 {
6508 m_enabled = value;
6509 return *this;
6510 }
6511
6514 {
6515 return m_experimental;
6516 }
6517
6520 {
6521 return m_experimental;
6522 }
6523
6525 Removal &set(const Experimental &value)
6526 {
6527 m_experimental = value;
6528 return *this;
6529 }
6530
6533 {
6534 m_experimental.set(value);
6535 return *this;
6536 }
6537
6538 template<
6539 typename T,
6540 typename std::enable_if<
6541 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6542 int>::type = 0>
6544 {
6545 return m_enabled;
6546 }
6547
6548 template<
6549 typename T,
6550 typename std::enable_if<
6551 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::
6552 value,
6553 int>::type = 0>
6555 {
6556 return m_experimental;
6557 }
6558
6559 template<
6560 typename T,
6561 typename std::enable_if<
6562 std::is_same<
6563 T,
6565 int>::type = 0>
6567 {
6568 return m_experimental
6570 }
6571
6572 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6574 {
6575 return m_enabled;
6576 }
6577
6578 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6580 {
6581 return m_experimental;
6582 }
6583
6585 template<typename F>
6586 void forEach(const F &f) const
6587 {
6588 f(m_enabled);
6589 f(m_experimental);
6590 }
6591
6593 template<typename F>
6594 void forEach(const F &f)
6595 {
6596 f(m_enabled);
6597 f(m_experimental);
6598 }
6599
6601 bool operator==(const Removal &other) const;
6602
6604 bool operator!=(const Removal &other) const;
6605
6607 std::string toString() const;
6608
6610 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6611 {
6612 return stream << value.toString();
6613 }
6614
6615 private:
6616 void setFromString(const std::string &value);
6617
6618 void setFromString(const std::string &fullPath, const std::string &value);
6619
6620 std::string getString(const std::string &fullPath) const;
6621
6622 Enabled m_enabled;
6623 Experimental m_experimental;
6624
6625 friend struct DataModel::Detail::Befriend<Removal>;
6626 };
6627
6628 using Descendants = std::tuple<
6633
6636
6651#ifndef NO_DOC
6652 template<
6653 typename... Args,
6654 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6655 typename std::enable_if<
6656 Zivid::Detail::TypeTraits::
6657 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6658 int>::type = 0>
6659#else
6660 template<typename... Args>
6661#endif
6662 explicit Reflection(Args &&...args)
6663 {
6664 using namespace Zivid::Detail::TypeTraits;
6665
6666 static_assert(
6667 AllArgsDecayedAreUnique<Args...>::value,
6668 "Found duplicate types among the arguments passed to Reflection(...). "
6669 "Types should be listed at most once.");
6670
6671 set(std::forward<Args>(args)...);
6672 }
6673
6687#ifndef NO_DOC
6688 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6689#else
6690 template<typename... Args>
6691#endif
6692 void set(Args &&...args)
6693 {
6694 using namespace Zivid::Detail::TypeTraits;
6695
6696 using AllArgsAreDescendantNodes =
6697 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6698 static_assert(
6699 AllArgsAreDescendantNodes::value,
6700 "All arguments passed to set(...) must be descendant nodes.");
6701
6702 static_assert(
6703 AllArgsDecayedAreUnique<Args...>::value,
6704 "Found duplicate types among the arguments passed to set(...). "
6705 "Types should be listed at most once.");
6706
6707 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6708 }
6709
6724#ifndef NO_DOC
6725 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6726#else
6727 template<typename... Args>
6728#endif
6729 Reflection copyWith(Args &&...args) const
6730 {
6731 using namespace Zivid::Detail::TypeTraits;
6732
6733 using AllArgsAreDescendantNodes =
6734 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6735 static_assert(
6736 AllArgsAreDescendantNodes::value,
6737 "All arguments passed to copyWith(...) must be descendant nodes.");
6738
6739 static_assert(
6740 AllArgsDecayedAreUnique<Args...>::value,
6741 "Found duplicate types among the arguments passed to copyWith(...). "
6742 "Types should be listed at most once.");
6743
6744 auto copy{ *this };
6745 copy.set(std::forward<Args>(args)...);
6746 return copy;
6747 }
6748
6750 const Removal &removal() const
6751 {
6752 return m_removal;
6753 }
6754
6757 {
6758 return m_removal;
6759 }
6760
6762 Reflection &set(const Removal &value)
6763 {
6764 m_removal = value;
6765 return *this;
6766 }
6767
6770 {
6771 m_removal.set(value);
6772 return *this;
6773 }
6774
6777 {
6778 m_removal.set(value);
6779 return *this;
6780 }
6781
6784 {
6785 m_removal.set(value);
6786 return *this;
6787 }
6788
6789 template<
6790 typename T,
6791 typename std::enable_if<
6792 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
6793 int>::type = 0>
6795 {
6796 return m_removal;
6797 }
6798
6799 template<
6800 typename T,
6801 typename std::enable_if<
6802 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6803 int>::type = 0>
6805 {
6807 }
6808
6809 template<
6810 typename T,
6811 typename std::enable_if<
6812 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
6813 int>::type = 0>
6815 {
6817 }
6818
6819 template<
6820 typename T,
6821 typename std::enable_if<
6822 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::
6823 value,
6824 int>::type = 0>
6826 {
6828 }
6829
6830 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6832 {
6833 return m_removal;
6834 }
6835
6837 template<typename F>
6838 void forEach(const F &f) const
6839 {
6840 f(m_removal);
6841 }
6842
6844 template<typename F>
6845 void forEach(const F &f)
6846 {
6847 f(m_removal);
6848 }
6849
6851 bool operator==(const Reflection &other) const;
6852
6854 bool operator!=(const Reflection &other) const;
6855
6857 std::string toString() const;
6858
6860 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
6861 {
6862 return stream << value.toString();
6863 }
6864
6865 private:
6866 void setFromString(const std::string &value);
6867
6868 void setFromString(const std::string &fullPath, const std::string &value);
6869
6870 std::string getString(const std::string &fullPath) const;
6871
6872 Removal m_removal;
6873
6874 friend struct DataModel::Detail::Befriend<Reflection>;
6875 };
6876
6879 {
6880 public:
6883
6885 static constexpr const char *path{ "Processing/Filters/Smoothing" };
6886
6888 static constexpr const char *name{ "Smoothing" };
6889
6891 static constexpr const char *description{ R"description(Smoothing filters)description" };
6892
6895 {
6896 public:
6899
6901 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
6902
6904 static constexpr const char *name{ "Gaussian" };
6905
6907 static constexpr const char *description{
6908 R"description(Gaussian smoothing of the point cloud)description"
6909 };
6910
6913 {
6914 public:
6917
6919 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
6920
6922 static constexpr const char *name{ "Enabled" };
6923
6925 static constexpr const char *description{
6926 R"description(Enable or disable the smoothing filter)description"
6927 };
6928
6930 using ValueType = bool;
6931 static const Enabled yes;
6932 static const Enabled no;
6933
6935 static std::set<bool> validValues()
6936 {
6937 return { false, true };
6938 }
6939
6941 Enabled() = default;
6942
6944 explicit constexpr Enabled(bool value)
6945 : m_opt{ value }
6946 {}
6947
6952 bool value() const;
6953
6955 bool hasValue() const;
6956
6958 void reset();
6959
6961 std::string toString() const;
6962
6964 bool operator==(const Enabled &other) const
6965 {
6966 return m_opt == other.m_opt;
6967 }
6968
6970 bool operator!=(const Enabled &other) const
6971 {
6972 return m_opt != other.m_opt;
6973 }
6974
6976 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6977 {
6978 return stream << value.toString();
6979 }
6980
6981 private:
6982 void setFromString(const std::string &value);
6983
6984 Zivid::DataModel::Detail::Optional<bool> m_opt;
6985
6986 friend struct DataModel::Detail::Befriend<Enabled>;
6987 };
6988
6991 {
6992 public:
6995
6997 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
6998
7000 static constexpr const char *name{ "Sigma" };
7001
7003 static constexpr const char *description{
7004 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients))description"
7005 };
7006
7008 using ValueType = double;
7009
7011 static constexpr Range<double> validRange()
7012 {
7013 return { 0.5, 5 };
7014 }
7015
7017 Sigma() = default;
7018
7020 explicit constexpr Sigma(double value)
7021 : m_opt{ verifyValue(value) }
7022 {}
7023
7028 double value() const;
7029
7031 bool hasValue() const;
7032
7034 void reset();
7035
7037 std::string toString() const;
7038
7040 bool operator==(const Sigma &other) const
7041 {
7042 return m_opt == other.m_opt;
7043 }
7044
7046 bool operator!=(const Sigma &other) const
7047 {
7048 return m_opt != other.m_opt;
7049 }
7050
7052 bool operator<(const Sigma &other) const
7053 {
7054 return m_opt < other.m_opt;
7055 }
7056
7058 bool operator>(const Sigma &other) const
7059 {
7060 return m_opt > other.m_opt;
7061 }
7062
7064 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
7065 {
7066 return stream << value.toString();
7067 }
7068
7069 private:
7070 void setFromString(const std::string &value);
7071
7072 constexpr ValueType static verifyValue(const ValueType &value)
7073 {
7074 return validRange().isInRange(value)
7075 ? value
7076 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
7077 + " } is not in range ["
7078 + std::to_string(validRange().min()) + ", "
7079 + std::to_string(validRange().max()) + "]" };
7080 }
7081
7082 Zivid::DataModel::Detail::Optional<double> m_opt;
7083
7084 friend struct DataModel::Detail::Befriend<Sigma>;
7085 };
7086
7087 using Descendants = std::tuple<
7090
7093
7106#ifndef NO_DOC
7107 template<
7108 typename... Args,
7109 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7110 typename std::enable_if<
7111 Zivid::Detail::TypeTraits::
7112 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7113 int>::type = 0>
7114#else
7115 template<typename... Args>
7116#endif
7117 explicit Gaussian(Args &&...args)
7118 {
7119 using namespace Zivid::Detail::TypeTraits;
7120
7121 static_assert(
7122 AllArgsDecayedAreUnique<Args...>::value,
7123 "Found duplicate types among the arguments passed to Gaussian(...). "
7124 "Types should be listed at most once.");
7125
7126 set(std::forward<Args>(args)...);
7127 }
7128
7140#ifndef NO_DOC
7141 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7142#else
7143 template<typename... Args>
7144#endif
7145 void set(Args &&...args)
7146 {
7147 using namespace Zivid::Detail::TypeTraits;
7148
7149 using AllArgsAreDescendantNodes =
7150 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7151 static_assert(
7152 AllArgsAreDescendantNodes::value,
7153 "All arguments passed to set(...) must be descendant nodes.");
7154
7155 static_assert(
7156 AllArgsDecayedAreUnique<Args...>::value,
7157 "Found duplicate types among the arguments passed to set(...). "
7158 "Types should be listed at most once.");
7159
7160 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7161 }
7162
7175#ifndef NO_DOC
7176 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7177#else
7178 template<typename... Args>
7179#endif
7180 Gaussian copyWith(Args &&...args) const
7181 {
7182 using namespace Zivid::Detail::TypeTraits;
7183
7184 using AllArgsAreDescendantNodes =
7185 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7186 static_assert(
7187 AllArgsAreDescendantNodes::value,
7188 "All arguments passed to copyWith(...) must be descendant nodes.");
7189
7190 static_assert(
7191 AllArgsDecayedAreUnique<Args...>::value,
7192 "Found duplicate types among the arguments passed to copyWith(...). "
7193 "Types should be listed at most once.");
7194
7195 auto copy{ *this };
7196 copy.set(std::forward<Args>(args)...);
7197 return copy;
7198 }
7199
7201 const Enabled &isEnabled() const
7202 {
7203 return m_enabled;
7204 }
7205
7208 {
7209 return m_enabled;
7210 }
7211
7213 Gaussian &set(const Enabled &value)
7214 {
7215 m_enabled = value;
7216 return *this;
7217 }
7218
7220 const Sigma &sigma() const
7221 {
7222 return m_sigma;
7223 }
7224
7227 {
7228 return m_sigma;
7229 }
7230
7232 Gaussian &set(const Sigma &value)
7233 {
7234 m_sigma = value;
7235 return *this;
7236 }
7237
7238 template<
7239 typename T,
7240 typename std::enable_if<
7241 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7242 int>::type = 0>
7244 {
7245 return m_enabled;
7246 }
7247
7248 template<
7249 typename T,
7250 typename std::enable_if<
7251 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7252 int>::type = 0>
7254 {
7255 return m_sigma;
7256 }
7257
7258 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7260 {
7261 return m_enabled;
7262 }
7263
7264 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7266 {
7267 return m_sigma;
7268 }
7269
7271 template<typename F>
7272 void forEach(const F &f) const
7273 {
7274 f(m_enabled);
7275 f(m_sigma);
7276 }
7277
7279 template<typename F>
7280 void forEach(const F &f)
7281 {
7282 f(m_enabled);
7283 f(m_sigma);
7284 }
7285
7287 bool operator==(const Gaussian &other) const;
7288
7290 bool operator!=(const Gaussian &other) const;
7291
7293 std::string toString() const;
7294
7296 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
7297 {
7298 return stream << value.toString();
7299 }
7300
7301 private:
7302 void setFromString(const std::string &value);
7303
7304 void setFromString(const std::string &fullPath, const std::string &value);
7305
7306 std::string getString(const std::string &fullPath) const;
7307
7308 Enabled m_enabled;
7309 Sigma m_sigma;
7310
7311 friend struct DataModel::Detail::Befriend<Gaussian>;
7312 };
7313
7314 using Descendants = std::tuple<
7318
7321
7335#ifndef NO_DOC
7336 template<
7337 typename... Args,
7338 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7339 typename std::enable_if<
7340 Zivid::Detail::TypeTraits::
7341 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7342 int>::type = 0>
7343#else
7344 template<typename... Args>
7345#endif
7346 explicit Smoothing(Args &&...args)
7347 {
7348 using namespace Zivid::Detail::TypeTraits;
7349
7350 static_assert(
7351 AllArgsDecayedAreUnique<Args...>::value,
7352 "Found duplicate types among the arguments passed to Smoothing(...). "
7353 "Types should be listed at most once.");
7354
7355 set(std::forward<Args>(args)...);
7356 }
7357
7370#ifndef NO_DOC
7371 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7372#else
7373 template<typename... Args>
7374#endif
7375 void set(Args &&...args)
7376 {
7377 using namespace Zivid::Detail::TypeTraits;
7378
7379 using AllArgsAreDescendantNodes =
7380 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7381 static_assert(
7382 AllArgsAreDescendantNodes::value,
7383 "All arguments passed to set(...) must be descendant nodes.");
7384
7385 static_assert(
7386 AllArgsDecayedAreUnique<Args...>::value,
7387 "Found duplicate types among the arguments passed to set(...). "
7388 "Types should be listed at most once.");
7389
7390 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7391 }
7392
7406#ifndef NO_DOC
7407 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7408#else
7409 template<typename... Args>
7410#endif
7411 Smoothing copyWith(Args &&...args) const
7412 {
7413 using namespace Zivid::Detail::TypeTraits;
7414
7415 using AllArgsAreDescendantNodes =
7416 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7417 static_assert(
7418 AllArgsAreDescendantNodes::value,
7419 "All arguments passed to copyWith(...) must be descendant nodes.");
7420
7421 static_assert(
7422 AllArgsDecayedAreUnique<Args...>::value,
7423 "Found duplicate types among the arguments passed to copyWith(...). "
7424 "Types should be listed at most once.");
7425
7426 auto copy{ *this };
7427 copy.set(std::forward<Args>(args)...);
7428 return copy;
7429 }
7430
7432 const Gaussian &gaussian() const
7433 {
7434 return m_gaussian;
7435 }
7436
7439 {
7440 return m_gaussian;
7441 }
7442
7444 Smoothing &set(const Gaussian &value)
7445 {
7446 m_gaussian = value;
7447 return *this;
7448 }
7449
7452 {
7453 m_gaussian.set(value);
7454 return *this;
7455 }
7456
7459 {
7460 m_gaussian.set(value);
7461 return *this;
7462 }
7463
7464 template<
7465 typename T,
7466 typename std::enable_if<
7467 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
7468 int>::type = 0>
7470 {
7471 return m_gaussian;
7472 }
7473
7474 template<
7475 typename T,
7476 typename std::enable_if<
7477 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7478 int>::type = 0>
7480 {
7482 }
7483
7484 template<
7485 typename T,
7486 typename std::enable_if<
7487 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7488 int>::type = 0>
7490 {
7492 }
7493
7494 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7496 {
7497 return m_gaussian;
7498 }
7499
7501 template<typename F>
7502 void forEach(const F &f) const
7503 {
7504 f(m_gaussian);
7505 }
7506
7508 template<typename F>
7509 void forEach(const F &f)
7510 {
7511 f(m_gaussian);
7512 }
7513
7515 bool operator==(const Smoothing &other) const;
7516
7518 bool operator!=(const Smoothing &other) const;
7519
7521 std::string toString() const;
7522
7524 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
7525 {
7526 return stream << value.toString();
7527 }
7528
7529 private:
7530 void setFromString(const std::string &value);
7531
7532 void setFromString(const std::string &fullPath, const std::string &value);
7533
7534 std::string getString(const std::string &fullPath) const;
7535
7536 Gaussian m_gaussian;
7537
7538 friend struct DataModel::Detail::Befriend<Smoothing>;
7539 };
7540
7541 using Descendants = std::tuple<
7567
7570
7606#ifndef NO_DOC
7607 template<
7608 typename... Args,
7609 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7610 typename std::enable_if<
7611 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
7612 value,
7613 int>::type = 0>
7614#else
7615 template<typename... Args>
7616#endif
7617 explicit Filters(Args &&...args)
7618 {
7619 using namespace Zivid::Detail::TypeTraits;
7620
7621 static_assert(
7622 AllArgsDecayedAreUnique<Args...>::value,
7623 "Found duplicate types among the arguments passed to Filters(...). "
7624 "Types should be listed at most once.");
7625
7626 set(std::forward<Args>(args)...);
7627 }
7628
7663#ifndef NO_DOC
7664 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7665#else
7666 template<typename... Args>
7667#endif
7668 void set(Args &&...args)
7669 {
7670 using namespace Zivid::Detail::TypeTraits;
7671
7672 using AllArgsAreDescendantNodes =
7673 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7674 static_assert(
7675 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
7676
7677 static_assert(
7678 AllArgsDecayedAreUnique<Args...>::value,
7679 "Found duplicate types among the arguments passed to set(...). "
7680 "Types should be listed at most once.");
7681
7682 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7683 }
7684
7720#ifndef NO_DOC
7721 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7722#else
7723 template<typename... Args>
7724#endif
7725 Filters copyWith(Args &&...args) const
7726 {
7727 using namespace Zivid::Detail::TypeTraits;
7728
7729 using AllArgsAreDescendantNodes =
7730 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7731 static_assert(
7732 AllArgsAreDescendantNodes::value,
7733 "All arguments passed to copyWith(...) must be descendant nodes.");
7734
7735 static_assert(
7736 AllArgsDecayedAreUnique<Args...>::value,
7737 "Found duplicate types among the arguments passed to copyWith(...). "
7738 "Types should be listed at most once.");
7739
7740 auto copy{ *this };
7741 copy.set(std::forward<Args>(args)...);
7742 return copy;
7743 }
7744
7747 {
7748 return m_experimental;
7749 }
7750
7753 {
7754 return m_experimental;
7755 }
7756
7758 Filters &set(const Experimental &value)
7759 {
7760 m_experimental = value;
7761 return *this;
7762 }
7763
7766 {
7767 m_experimental.set(value);
7768 return *this;
7769 }
7770
7773 {
7774 m_experimental.set(value);
7775 return *this;
7776 }
7777
7780 {
7781 m_experimental.set(value);
7782 return *this;
7783 }
7784
7787 {
7788 m_experimental.set(value);
7789 return *this;
7790 }
7791
7794 {
7795 m_experimental.set(value);
7796 return *this;
7797 }
7798
7801 {
7802 m_experimental.set(value);
7803 return *this;
7804 }
7805
7808 {
7809 m_experimental.set(value);
7810 return *this;
7811 }
7812
7814 const Noise &noise() const
7815 {
7816 return m_noise;
7817 }
7818
7821 {
7822 return m_noise;
7823 }
7824
7826 Filters &set(const Noise &value)
7827 {
7828 m_noise = value;
7829 return *this;
7830 }
7831
7834 {
7835 m_noise.set(value);
7836 return *this;
7837 }
7838
7841 {
7842 m_noise.set(value);
7843 return *this;
7844 }
7845
7848 {
7849 m_noise.set(value);
7850 return *this;
7851 }
7852
7854 const Outlier &outlier() const
7855 {
7856 return m_outlier;
7857 }
7858
7861 {
7862 return m_outlier;
7863 }
7864
7866 Filters &set(const Outlier &value)
7867 {
7868 m_outlier = value;
7869 return *this;
7870 }
7871
7874 {
7875 m_outlier.set(value);
7876 return *this;
7877 }
7878
7881 {
7882 m_outlier.set(value);
7883 return *this;
7884 }
7885
7888 {
7889 m_outlier.set(value);
7890 return *this;
7891 }
7892
7894 const Reflection &reflection() const
7895 {
7896 return m_reflection;
7897 }
7898
7901 {
7902 return m_reflection;
7903 }
7904
7906 Filters &set(const Reflection &value)
7907 {
7908 m_reflection = value;
7909 return *this;
7910 }
7911
7914 {
7915 m_reflection.set(value);
7916 return *this;
7917 }
7918
7921 {
7922 m_reflection.set(value);
7923 return *this;
7924 }
7925
7928 {
7929 m_reflection.set(value);
7930 return *this;
7931 }
7932
7935 {
7936 m_reflection.set(value);
7937 return *this;
7938 }
7939
7941 const Smoothing &smoothing() const
7942 {
7943 return m_smoothing;
7944 }
7945
7948 {
7949 return m_smoothing;
7950 }
7951
7953 Filters &set(const Smoothing &value)
7954 {
7955 m_smoothing = value;
7956 return *this;
7957 }
7958
7961 {
7962 m_smoothing.set(value);
7963 return *this;
7964 }
7965
7968 {
7969 m_smoothing.set(value);
7970 return *this;
7971 }
7972
7975 {
7976 m_smoothing.set(value);
7977 return *this;
7978 }
7979
7980 template<
7981 typename T,
7982 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
7983 type = 0>
7985 {
7986 return m_experimental;
7987 }
7988
7989 template<
7990 typename T,
7991 typename std::enable_if<
7992 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
7993 int>::type = 0>
7995 {
7997 }
7998
7999 template<
8000 typename T,
8001 typename std::enable_if<
8002 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
8003 value,
8004 int>::type = 0>
8006 {
8007 return m_experimental
8009 }
8010
8011 template<
8012 typename T,
8013 typename std::enable_if<
8014 std::is_same<
8015 T,
8017 value,
8018 int>::type = 0>
8020 {
8021 return m_experimental
8023 }
8024
8025 template<
8026 typename T,
8027 typename std::enable_if<
8028 std::is_same<
8029 T,
8031 value,
8032 int>::type = 0>
8034 {
8035 return m_experimental
8037 }
8038
8039 template<
8040 typename T,
8041 typename std::enable_if<
8042 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
8043 value,
8044 int>::type = 0>
8046 {
8047 return m_experimental
8049 }
8050
8051 template<
8052 typename T,
8053 typename std::enable_if<
8054 std::is_same<
8055 T,
8057 int>::type = 0>
8059 {
8060 return m_experimental
8062 }
8063
8064 template<
8065 typename T,
8066 typename std::enable_if<
8067 std::is_same<
8068 T,
8070 int>::type = 0>
8072 {
8073 return m_experimental
8075 }
8076
8077 template<
8078 typename T,
8079 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
8080 0>
8082 {
8083 return m_noise;
8084 }
8085
8086 template<
8087 typename T,
8088 typename std::
8089 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
8091 {
8093 }
8094
8095 template<
8096 typename T,
8097 typename std::enable_if<
8098 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
8099 int>::type = 0>
8101 {
8103 }
8104
8105 template<
8106 typename T,
8107 typename std::enable_if<
8108 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
8109 int>::type = 0>
8111 {
8113 }
8114
8115 template<
8116 typename T,
8117 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
8118 0>
8120 {
8121 return m_outlier;
8122 }
8123
8124 template<
8125 typename T,
8126 typename std::enable_if<
8127 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8128 int>::type = 0>
8130 {
8132 }
8133
8134 template<
8135 typename T,
8136 typename std::enable_if<
8137 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8138 int>::type = 0>
8140 {
8142 }
8143
8144 template<
8145 typename T,
8146 typename std::enable_if<
8147 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8148 int>::type = 0>
8150 {
8152 }
8153
8154 template<
8155 typename T,
8156 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
8157 type = 0>
8159 {
8160 return m_reflection;
8161 }
8162
8163 template<
8164 typename T,
8165 typename std::enable_if<
8166 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
8167 int>::type = 0>
8169 {
8171 }
8172
8173 template<
8174 typename T,
8175 typename std::enable_if<
8176 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8177 int>::type = 0>
8179 {
8181 }
8182
8183 template<
8184 typename T,
8185 typename std::enable_if<
8186 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
8187 int>::type = 0>
8189 {
8191 }
8192
8193 template<
8194 typename T,
8195 typename std::enable_if<
8196 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
8197 int>::type = 0>
8199 {
8201 }
8202
8203 template<
8204 typename T,
8205 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
8206 type = 0>
8208 {
8209 return m_smoothing;
8210 }
8211
8212 template<
8213 typename T,
8214 typename std::enable_if<
8215 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
8216 int>::type = 0>
8218 {
8220 }
8221
8222 template<
8223 typename T,
8224 typename std::enable_if<
8225 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
8226 int>::type = 0>
8228 {
8230 }
8231
8232 template<
8233 typename T,
8234 typename std::enable_if<
8235 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
8236 int>::type = 0>
8238 {
8240 }
8241
8242 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8244 {
8245 return m_experimental;
8246 }
8247
8248 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8250 {
8251 return m_noise;
8252 }
8253
8254 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
8256 {
8257 return m_outlier;
8258 }
8259
8260 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
8262 {
8263 return m_reflection;
8264 }
8265
8266 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
8268 {
8269 return m_smoothing;
8270 }
8271
8273 template<typename F>
8274 void forEach(const F &f) const
8275 {
8276 f(m_experimental);
8277 f(m_noise);
8278 f(m_outlier);
8279 f(m_reflection);
8280 f(m_smoothing);
8281 }
8282
8284 template<typename F>
8285 void forEach(const F &f)
8286 {
8287 f(m_experimental);
8288 f(m_noise);
8289 f(m_outlier);
8290 f(m_reflection);
8291 f(m_smoothing);
8292 }
8293
8295 bool operator==(const Filters &other) const;
8296
8298 bool operator!=(const Filters &other) const;
8299
8301 std::string toString() const;
8302
8304 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
8305 {
8306 return stream << value.toString();
8307 }
8308
8309 private:
8310 void setFromString(const std::string &value);
8311
8312 void setFromString(const std::string &fullPath, const std::string &value);
8313
8314 std::string getString(const std::string &fullPath) const;
8315
8316 Experimental m_experimental;
8317 Noise m_noise;
8318 Outlier m_outlier;
8319 Reflection m_reflection;
8320 Smoothing m_smoothing;
8321
8322 friend struct DataModel::Detail::Befriend<Filters>;
8323 };
8324
8325 using Descendants = std::tuple<
8360
8363
8408#ifndef NO_DOC
8409 template<
8410 typename... Args,
8411 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8412 typename std::enable_if<
8413 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
8414 value,
8415 int>::type = 0>
8416#else
8417 template<typename... Args>
8418#endif
8419 explicit Processing(Args &&...args)
8420 {
8421 using namespace Zivid::Detail::TypeTraits;
8422
8423 static_assert(
8424 AllArgsDecayedAreUnique<Args...>::value,
8425 "Found duplicate types among the arguments passed to Processing(...). "
8426 "Types should be listed at most once.");
8427
8428 set(std::forward<Args>(args)...);
8429 }
8430
8474#ifndef NO_DOC
8475 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8476#else
8477 template<typename... Args>
8478#endif
8479 void set(Args &&...args)
8480 {
8481 using namespace Zivid::Detail::TypeTraits;
8482
8483 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8484 static_assert(
8485 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
8486
8487 static_assert(
8488 AllArgsDecayedAreUnique<Args...>::value,
8489 "Found duplicate types among the arguments passed to set(...). "
8490 "Types should be listed at most once.");
8491
8492 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8493 }
8494
8539#ifndef NO_DOC
8540 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8541#else
8542 template<typename... Args>
8543#endif
8544 Processing copyWith(Args &&...args) const
8545 {
8546 using namespace Zivid::Detail::TypeTraits;
8547
8548 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8549 static_assert(
8550 AllArgsAreDescendantNodes::value,
8551 "All arguments passed to copyWith(...) must be descendant nodes.");
8552
8553 static_assert(
8554 AllArgsDecayedAreUnique<Args...>::value,
8555 "Found duplicate types among the arguments passed to copyWith(...). "
8556 "Types should be listed at most once.");
8557
8558 auto copy{ *this };
8559 copy.set(std::forward<Args>(args)...);
8560 return copy;
8561 }
8562
8564 const Color &color() const
8565 {
8566 return m_color;
8567 }
8568
8571 {
8572 return m_color;
8573 }
8574
8576 Processing &set(const Color &value)
8577 {
8578 m_color = value;
8579 return *this;
8580 }
8581
8584 {
8585 m_color.set(value);
8586 return *this;
8587 }
8588
8591 {
8592 m_color.set(value);
8593 return *this;
8594 }
8595
8598 {
8599 m_color.set(value);
8600 return *this;
8601 }
8602
8605 {
8606 m_color.set(value);
8607 return *this;
8608 }
8609
8612 {
8613 m_color.set(value);
8614 return *this;
8615 }
8616
8619 {
8620 m_color.set(value);
8621 return *this;
8622 }
8623
8626 {
8627 m_color.set(value);
8628 return *this;
8629 }
8630
8632 const Filters &filters() const
8633 {
8634 return m_filters;
8635 }
8636
8639 {
8640 return m_filters;
8641 }
8642
8644 Processing &set(const Filters &value)
8645 {
8646 m_filters = value;
8647 return *this;
8648 }
8649
8652 {
8653 m_filters.set(value);
8654 return *this;
8655 }
8656
8659 {
8660 m_filters.set(value);
8661 return *this;
8662 }
8663
8666 {
8667 m_filters.set(value);
8668 return *this;
8669 }
8670
8673 {
8674 m_filters.set(value);
8675 return *this;
8676 }
8677
8680 {
8681 m_filters.set(value);
8682 return *this;
8683 }
8684
8687 {
8688 m_filters.set(value);
8689 return *this;
8690 }
8691
8694 {
8695 m_filters.set(value);
8696 return *this;
8697 }
8698
8701 {
8702 m_filters.set(value);
8703 return *this;
8704 }
8705
8708 {
8709 m_filters.set(value);
8710 return *this;
8711 }
8712
8715 {
8716 m_filters.set(value);
8717 return *this;
8718 }
8719
8722 {
8723 m_filters.set(value);
8724 return *this;
8725 }
8726
8729 {
8730 m_filters.set(value);
8731 return *this;
8732 }
8733
8736 {
8737 m_filters.set(value);
8738 return *this;
8739 }
8740
8743 {
8744 m_filters.set(value);
8745 return *this;
8746 }
8747
8750 {
8751 m_filters.set(value);
8752 return *this;
8753 }
8754
8757 {
8758 m_filters.set(value);
8759 return *this;
8760 }
8761
8764 {
8765 m_filters.set(value);
8766 return *this;
8767 }
8768
8771 {
8772 m_filters.set(value);
8773 return *this;
8774 }
8775
8778 {
8779 m_filters.set(value);
8780 return *this;
8781 }
8782
8785 {
8786 m_filters.set(value);
8787 return *this;
8788 }
8789
8792 {
8793 m_filters.set(value);
8794 return *this;
8795 }
8796
8799 {
8800 m_filters.set(value);
8801 return *this;
8802 }
8803
8806 {
8807 m_filters.set(value);
8808 return *this;
8809 }
8810
8813 {
8814 m_filters.set(value);
8815 return *this;
8816 }
8817
8820 {
8821 m_filters.set(value);
8822 return *this;
8823 }
8824
8825 template<
8826 typename T,
8827 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8829 {
8830 return m_color;
8831 }
8832
8833 template<
8834 typename T,
8835 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8837 {
8838 return m_color.get<Settings::Processing::Color::Balance>();
8839 }
8840
8841 template<
8842 typename T,
8843 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
8844 0>
8846 {
8847 return m_color.get<Settings::Processing::Color::Balance::Blue>();
8848 }
8849
8850 template<
8851 typename T,
8852 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
8853 type = 0>
8855 {
8856 return m_color.get<Settings::Processing::Color::Balance::Green>();
8857 }
8858
8859 template<
8860 typename T,
8861 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
8862 0>
8864 {
8865 return m_color.get<Settings::Processing::Color::Balance::Red>();
8866 }
8867
8868 template<
8869 typename T,
8870 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
8871 0>
8873 {
8875 }
8876
8877 template<
8878 typename T,
8879 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
8880 type = 0>
8882 {
8884 }
8885
8886 template<
8887 typename T,
8888 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
8890 {
8891 return m_color.get<Settings::Processing::Color::Gamma>();
8892 }
8893
8894 template<
8895 typename T,
8896 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
8898 {
8899 return m_filters;
8900 }
8901
8902 template<
8903 typename T,
8904 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
8905 type = 0>
8907 {
8909 }
8910
8911 template<
8912 typename T,
8913 typename std::enable_if<
8914 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
8915 int>::type = 0>
8917 {
8919 }
8920
8921 template<
8922 typename T,
8923 typename std::enable_if<
8924 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
8925 int>::type = 0>
8927 {
8929 }
8930
8931 template<
8932 typename T,
8933 typename std::enable_if<
8934 std::is_same<
8935 T,
8937 int>::type = 0>
8939 {
8940 return m_filters
8942 }
8943
8944 template<
8945 typename T,
8946 typename std::enable_if<
8947 std::is_same<
8948 T,
8950 int>::type = 0>
8952 {
8953 return m_filters
8955 }
8956
8957 template<
8958 typename T,
8959 typename std::enable_if<
8960 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
8961 int>::type = 0>
8963 {
8965 }
8966
8967 template<
8968 typename T,
8969 typename std::enable_if<
8970 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
8971 value,
8972 int>::type = 0>
8974 {
8975 return m_filters
8977 }
8978
8979 template<
8980 typename T,
8981 typename std::enable_if<
8982 std::is_same<
8983 T,
8985 int>::type = 0>
8987 {
8988 return m_filters
8990 }
8991
8992 template<
8993 typename T,
8994 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
8996 {
8997 return m_filters.get<Settings::Processing::Filters::Noise>();
8998 }
8999
9000 template<
9001 typename T,
9002 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
9003 type = 0>
9005 {
9007 }
9008
9009 template<
9010 typename T,
9011 typename std::enable_if<
9012 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
9013 int>::type = 0>
9015 {
9017 }
9018
9019 template<
9020 typename T,
9021 typename std::enable_if<
9022 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
9023 int>::type = 0>
9025 {
9027 }
9028
9029 template<
9030 typename T,
9031 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
9033 {
9034 return m_filters.get<Settings::Processing::Filters::Outlier>();
9035 }
9036
9037 template<
9038 typename T,
9039 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
9040 type = 0>
9042 {
9044 }
9045
9046 template<
9047 typename T,
9048 typename std::enable_if<
9049 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
9050 int>::type = 0>
9052 {
9054 }
9055
9056 template<
9057 typename T,
9058 typename std::enable_if<
9059 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
9060 int>::type = 0>
9062 {
9064 }
9065
9066 template<
9067 typename T,
9068 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
9069 0>
9071 {
9073 }
9074
9075 template<
9076 typename T,
9077 typename std::enable_if<
9078 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9079 int>::type = 0>
9081 {
9083 }
9084
9085 template<
9086 typename T,
9087 typename std::enable_if<
9088 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9089 int>::type = 0>
9091 {
9093 }
9094
9095 template<
9096 typename T,
9097 typename std::enable_if<
9098 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
9099 int>::type = 0>
9101 {
9103 }
9104
9105 template<
9106 typename T,
9107 typename std::enable_if<
9108 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
9109 int>::type = 0>
9111 {
9113 }
9114
9115 template<
9116 typename T,
9117 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
9118 0>
9120 {
9122 }
9123
9124 template<
9125 typename T,
9126 typename std::enable_if<
9127 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9128 int>::type = 0>
9130 {
9132 }
9133
9134 template<
9135 typename T,
9136 typename std::enable_if<
9137 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9138 int>::type = 0>
9140 {
9142 }
9143
9144 template<
9145 typename T,
9146 typename std::enable_if<
9147 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9148 int>::type = 0>
9150 {
9152 }
9153
9154 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9156 {
9157 return m_color;
9158 }
9159
9160 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9162 {
9163 return m_filters;
9164 }
9165
9167 template<typename F>
9168 void forEach(const F &f) const
9169 {
9170 f(m_color);
9171 f(m_filters);
9172 }
9173
9175 template<typename F>
9176 void forEach(const F &f)
9177 {
9178 f(m_color);
9179 f(m_filters);
9180 }
9181
9183 bool operator==(const Processing &other) const;
9184
9186 bool operator!=(const Processing &other) const;
9187
9189 std::string toString() const;
9190
9192 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
9193 {
9194 return stream << value.toString();
9195 }
9196
9197 private:
9198 void setFromString(const std::string &value);
9199
9200 void setFromString(const std::string &fullPath, const std::string &value);
9201
9202 std::string getString(const std::string &fullPath) const;
9203
9204 Color m_color;
9205 Filters m_filters;
9206
9207 friend struct DataModel::Detail::Befriend<Processing>;
9208 };
9209
9210 using Descendants = std::tuple<
9251
9254
9256 explicit Settings(const std::string &fileName);
9257
9308#ifndef NO_DOC
9309 template<
9310 typename... Args,
9311 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9312 typename std::enable_if<
9313 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9314 int>::type = 0>
9315#else
9316 template<typename... Args>
9317#endif
9318 explicit Settings(Args &&...args)
9319 {
9320 using namespace Zivid::Detail::TypeTraits;
9321
9322 static_assert(
9323 AllArgsDecayedAreUnique<Args...>::value,
9324 "Found duplicate types among the arguments passed to Settings(...). "
9325 "Types should be listed at most once.");
9326
9327 set(std::forward<Args>(args)...);
9328 }
9329
9379#ifndef NO_DOC
9380 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9381#else
9382 template<typename... Args>
9383#endif
9384 void set(Args &&...args)
9385 {
9386 using namespace Zivid::Detail::TypeTraits;
9387
9388 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9389 static_assert(
9390 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
9391
9392 static_assert(
9393 AllArgsDecayedAreUnique<Args...>::value,
9394 "Found duplicate types among the arguments passed to set(...). "
9395 "Types should be listed at most once.");
9396
9397 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9398 }
9399
9450#ifndef NO_DOC
9451 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9452#else
9453 template<typename... Args>
9454#endif
9455 Settings copyWith(Args &&...args) const
9456 {
9457 using namespace Zivid::Detail::TypeTraits;
9458
9459 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9460 static_assert(
9461 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
9462
9463 static_assert(
9464 AllArgsDecayedAreUnique<Args...>::value,
9465 "Found duplicate types among the arguments passed to copyWith(...). "
9466 "Types should be listed at most once.");
9467
9468 auto copy{ *this };
9469 copy.set(std::forward<Args>(args)...);
9470 return copy;
9471 }
9472
9475 {
9476 return m_acquisitions;
9477 }
9478
9481 {
9482 return m_acquisitions;
9483 }
9484
9487 {
9488 m_acquisitions = value;
9489 return *this;
9490 }
9491
9494 {
9495 return m_diagnostics;
9496 }
9497
9500 {
9501 return m_diagnostics;
9502 }
9503
9505 Settings &set(const Diagnostics &value)
9506 {
9507 m_diagnostics = value;
9508 return *this;
9509 }
9510
9513 {
9514 m_diagnostics.set(value);
9515 return *this;
9516 }
9517
9520 {
9521 return m_experimental;
9522 }
9523
9526 {
9527 return m_experimental;
9528 }
9529
9532 {
9533 m_experimental = value;
9534 return *this;
9535 }
9536
9539 {
9540 m_experimental.set(value);
9541 return *this;
9542 }
9543
9545 const Processing &processing() const
9546 {
9547 return m_processing;
9548 }
9549
9552 {
9553 return m_processing;
9554 }
9555
9557 Settings &set(const Processing &value)
9558 {
9559 m_processing = value;
9560 return *this;
9561 }
9562
9565 {
9566 m_processing.set(value);
9567 return *this;
9568 }
9569
9572 {
9573 m_processing.set(value);
9574 return *this;
9575 }
9576
9579 {
9580 m_processing.set(value);
9581 return *this;
9582 }
9583
9586 {
9587 m_processing.set(value);
9588 return *this;
9589 }
9590
9593 {
9594 m_processing.set(value);
9595 return *this;
9596 }
9597
9600 {
9601 m_processing.set(value);
9602 return *this;
9603 }
9604
9607 {
9608 m_processing.set(value);
9609 return *this;
9610 }
9611
9614 {
9615 m_processing.set(value);
9616 return *this;
9617 }
9618
9621 {
9622 m_processing.set(value);
9623 return *this;
9624 }
9625
9628 {
9629 m_processing.set(value);
9630 return *this;
9631 }
9632
9635 {
9636 m_processing.set(value);
9637 return *this;
9638 }
9639
9642 {
9643 m_processing.set(value);
9644 return *this;
9645 }
9646
9649 {
9650 m_processing.set(value);
9651 return *this;
9652 }
9653
9656 {
9657 m_processing.set(value);
9658 return *this;
9659 }
9660
9663 {
9664 m_processing.set(value);
9665 return *this;
9666 }
9667
9670 {
9671 m_processing.set(value);
9672 return *this;
9673 }
9674
9677 {
9678 m_processing.set(value);
9679 return *this;
9680 }
9681
9684 {
9685 m_processing.set(value);
9686 return *this;
9687 }
9688
9691 {
9692 m_processing.set(value);
9693 return *this;
9694 }
9695
9698 {
9699 m_processing.set(value);
9700 return *this;
9701 }
9702
9705 {
9706 m_processing.set(value);
9707 return *this;
9708 }
9709
9712 {
9713 m_processing.set(value);
9714 return *this;
9715 }
9716
9719 {
9720 m_processing.set(value);
9721 return *this;
9722 }
9723
9726 {
9727 m_processing.set(value);
9728 return *this;
9729 }
9730
9733 {
9734 m_processing.set(value);
9735 return *this;
9736 }
9737
9740 {
9741 m_processing.set(value);
9742 return *this;
9743 }
9744
9747 {
9748 m_processing.set(value);
9749 return *this;
9750 }
9751
9754 {
9755 m_processing.set(value);
9756 return *this;
9757 }
9758
9761 {
9762 m_processing.set(value);
9763 return *this;
9764 }
9765
9768 {
9769 m_processing.set(value);
9770 return *this;
9771 }
9772
9775 {
9776 m_processing.set(value);
9777 return *this;
9778 }
9779
9782 {
9783 m_processing.set(value);
9784 return *this;
9785 }
9786
9789 {
9790 m_processing.set(value);
9791 return *this;
9792 }
9793
9796 {
9797 m_processing.set(value);
9798 return *this;
9799 }
9800
9801 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
9803 {
9804 return m_acquisitions;
9805 }
9806
9807 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
9809 {
9810 return m_diagnostics;
9811 }
9812
9813 template<
9814 typename T,
9815 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
9817 {
9818 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
9819 }
9820
9821 template<typename T, typename std::enable_if<std::is_same<T, Settings::Experimental>::value, int>::type = 0>
9823 {
9824 return m_experimental;
9825 }
9826
9827 template<
9828 typename T,
9829 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
9831 {
9832 return m_experimental.get<Settings::Experimental::Engine>();
9833 }
9834
9835 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
9837 {
9838 return m_processing;
9839 }
9840
9841 template<
9842 typename T,
9843 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
9845 {
9846 return m_processing.get<Settings::Processing::Color>();
9847 }
9848
9849 template<
9850 typename T,
9851 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
9853 {
9854 return m_processing.get<Settings::Processing::Color::Balance>();
9855 }
9856
9857 template<
9858 typename T,
9859 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
9861 {
9862 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
9863 }
9864
9865 template<
9866 typename T,
9867 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
9869 {
9870 return m_processing.get<Settings::Processing::Color::Balance::Green>();
9871 }
9872
9873 template<
9874 typename T,
9875 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
9877 {
9878 return m_processing.get<Settings::Processing::Color::Balance::Red>();
9879 }
9880
9881 template<
9882 typename T,
9883 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
9885 {
9886 return m_processing.get<Settings::Processing::Color::Experimental>();
9887 }
9888
9889 template<
9890 typename T,
9891 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
9892 type = 0>
9894 {
9895 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
9896 }
9897
9898 template<
9899 typename T,
9900 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
9902 {
9903 return m_processing.get<Settings::Processing::Color::Gamma>();
9904 }
9905
9906 template<
9907 typename T,
9908 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
9910 {
9911 return m_processing.get<Settings::Processing::Filters>();
9912 }
9913
9914 template<
9915 typename T,
9916 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
9918 {
9919 return m_processing.get<Settings::Processing::Filters::Experimental>();
9920 }
9921
9922 template<
9923 typename T,
9924 typename std::enable_if<
9925 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9926 int>::type = 0>
9928 {
9930 }
9931
9932 template<
9933 typename T,
9934 typename std::enable_if<
9935 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9936 int>::type = 0>
9938 {
9940 }
9941
9942 template<
9943 typename T,
9944 typename std::enable_if<
9945 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
9946 value,
9947 int>::type = 0>
9949 {
9950 return m_processing
9952 }
9953
9954 template<
9955 typename T,
9956 typename std::enable_if<
9957 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
9958 value,
9959 int>::type = 0>
9961 {
9962 return m_processing
9964 }
9965
9966 template<
9967 typename T,
9968 typename std::enable_if<
9969 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9970 int>::type = 0>
9972 {
9974 }
9975
9976 template<
9977 typename T,
9978 typename std::enable_if<
9979 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
9980 value,
9981 int>::type = 0>
9983 {
9984 return m_processing
9986 }
9987
9988 template<
9989 typename T,
9990 typename std::enable_if<
9991 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
9992 value,
9993 int>::type = 0>
9995 {
9996 return m_processing
9998 }
9999
10000 template<
10001 typename T,
10002 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
10004 {
10005 return m_processing.get<Settings::Processing::Filters::Noise>();
10006 }
10007
10008 template<
10009 typename T,
10010 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
10011 0>
10013 {
10015 }
10016
10017 template<
10018 typename T,
10019 typename std::enable_if<
10020 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10021 int>::type = 0>
10023 {
10025 }
10026
10027 template<
10028 typename T,
10029 typename std::enable_if<
10030 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10031 int>::type = 0>
10033 {
10035 }
10036
10037 template<
10038 typename T,
10039 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
10041 {
10042 return m_processing.get<Settings::Processing::Filters::Outlier>();
10043 }
10044
10045 template<
10046 typename T,
10047 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
10048 type = 0>
10050 {
10052 }
10053
10054 template<
10055 typename T,
10056 typename std::enable_if<
10057 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10058 int>::type = 0>
10060 {
10062 }
10063
10064 template<
10065 typename T,
10066 typename std::enable_if<
10067 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10068 int>::type = 0>
10070 {
10072 }
10073
10074 template<
10075 typename T,
10076 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
10078 {
10079 return m_processing.get<Settings::Processing::Filters::Reflection>();
10080 }
10081
10082 template<
10083 typename T,
10084 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
10085 type = 0>
10087 {
10089 }
10090
10091 template<
10092 typename T,
10093 typename std::enable_if<
10094 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
10095 int>::type = 0>
10097 {
10099 }
10100
10101 template<
10102 typename T,
10103 typename std::enable_if<
10104 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
10105 int>::type = 0>
10107 {
10109 }
10110
10111 template<
10112 typename T,
10113 typename std::enable_if<
10114 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
10115 int>::type = 0>
10117 {
10119 }
10120
10121 template<
10122 typename T,
10123 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
10125 {
10126 return m_processing.get<Settings::Processing::Filters::Smoothing>();
10127 }
10128
10129 template<
10130 typename T,
10131 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
10132 type = 0>
10134 {
10136 }
10137
10138 template<
10139 typename T,
10140 typename std::enable_if<
10141 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10142 int>::type = 0>
10144 {
10146 }
10147
10148 template<
10149 typename T,
10150 typename std::enable_if<
10151 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10152 int>::type = 0>
10154 {
10156 }
10157
10158 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
10160 {
10161 return m_acquisitions;
10162 }
10163
10164 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
10166 {
10167 return m_diagnostics;
10168 }
10169
10170 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
10172 {
10173 return m_experimental;
10174 }
10175
10176 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
10178 {
10179 return m_processing;
10180 }
10181
10183 template<typename F>
10184 void forEach(const F &f) const
10185 {
10186 f(m_acquisitions);
10187 f(m_diagnostics);
10188 f(m_experimental);
10189 f(m_processing);
10190 }
10191
10193 template<typename F>
10194 void forEach(const F &f)
10195 {
10196 f(m_acquisitions);
10197 f(m_diagnostics);
10198 f(m_experimental);
10199 f(m_processing);
10200 }
10201
10203 bool operator==(const Settings &other) const;
10204
10206 bool operator!=(const Settings &other) const;
10207
10209 std::string toString() const;
10210
10212 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
10213 {
10214 return stream << value.toString();
10215 }
10216
10218 void save(const std::string &fileName) const;
10219
10221 void load(const std::string &fileName);
10222
10223 private:
10224 void setFromString(const std::string &value);
10225
10226 void setFromString(const std::string &fullPath, const std::string &value);
10227
10228 std::string getString(const std::string &fullPath) const;
10229
10230 Acquisitions m_acquisitions;
10231 Diagnostics m_diagnostics;
10232 Experimental m_experimental;
10233 Processing m_processing;
10234
10235 friend struct DataModel::Detail::Befriend<Settings>;
10236 };
10237
10238#ifndef NO_DOC
10239 template<>
10240 struct Settings::Version<12>
10241 {
10242 using Type = Settings;
10243 };
10244#endif
10245
10246} // namespace Zivid
10247
10248#ifdef _MSC_VER
10249# pragma warning(pop)
10250#endif
10251
10252#ifndef NO_DOC
10253# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
10254namespace std // NOLINT
10255{
10256
10257 template<>
10258 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
10259 {};
10260
10261 template<size_t i>
10262 struct tuple_element<i, Zivid::Settings::Diagnostics>
10263 {
10264 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
10265
10266 using type // NOLINT
10267 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
10268 };
10269
10270 template<>
10271 struct tuple_size<Zivid::Settings::Experimental> : integral_constant<size_t, 1>
10272 {};
10273
10274 template<size_t i>
10275 struct tuple_element<i, Zivid::Settings::Experimental>
10276 {
10277 static_assert(i < tuple_size<Zivid::Settings::Experimental>::value, "Index must be less than 1");
10278
10279 using type // NOLINT
10280 = decltype(declval<Zivid::Settings::Experimental>().get<i>());
10281 };
10282
10283 template<>
10284 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 2>
10285 {};
10286
10287 template<size_t i>
10288 struct tuple_element<i, Zivid::Settings::Processing>
10289 {
10290 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 2");
10291
10292 using type // NOLINT
10293 = decltype(declval<Zivid::Settings::Processing>().get<i>());
10294 };
10295
10296 template<>
10297 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
10298 {};
10299
10300 template<size_t i>
10301 struct tuple_element<i, Zivid::Settings::Processing::Color>
10302 {
10303 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
10304
10305 using type // NOLINT
10306 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
10307 };
10308
10309 template<>
10310 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
10311 {};
10312
10313 template<size_t i>
10314 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
10315 {
10316 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
10317
10318 using type // NOLINT
10319 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
10320 };
10321
10322 template<>
10323 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
10324 {};
10325
10326 template<size_t i>
10327 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
10328 {
10329 static_assert(
10330 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
10331 "Index must be less than 1");
10332
10333 using type // NOLINT
10334 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
10335 };
10336
10337 template<>
10338 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 5>
10339 {};
10340
10341 template<size_t i>
10342 struct tuple_element<i, Zivid::Settings::Processing::Filters>
10343 {
10344 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 5");
10345
10346 using type // NOLINT
10347 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
10348 };
10349
10350 template<>
10351 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
10352 {};
10353
10354 template<size_t i>
10355 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
10356 {
10357 static_assert(
10358 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
10359 "Index must be less than 1");
10360
10361 using type // NOLINT
10362 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
10363 };
10364
10365 template<>
10366 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
10367 : integral_constant<size_t, 2>
10368 {};
10369
10370 template<size_t i>
10371 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
10372 {
10373 static_assert(
10374 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10375 "Index must be less than 2");
10376
10377 using type // NOLINT
10378 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
10379 };
10380
10381 template<>
10382 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
10383 : integral_constant<size_t, 2>
10384 {};
10385
10386 template<size_t i>
10387 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
10388 {
10389 static_assert(
10390 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
10391 "Index must be less than 2");
10392
10393 using type // NOLINT
10394 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
10395 .get<i>());
10396 };
10397
10398 template<>
10399 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
10400 : integral_constant<size_t, 2>
10401 {};
10402
10403 template<size_t i>
10404 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
10405 {
10406 static_assert(
10407 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
10408 "Index must be less than 2");
10409
10410 using type // NOLINT
10411 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
10412 .get<i>());
10413 };
10414
10415 template<>
10416 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 1>
10417 {};
10418
10419 template<size_t i>
10420 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
10421 {
10422 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 1");
10423
10424 using type // NOLINT
10425 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
10426 };
10427
10428 template<>
10429 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
10430 {};
10431
10432 template<size_t i>
10433 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
10434 {
10435 static_assert(
10436 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
10437 "Index must be less than 2");
10438
10439 using type // NOLINT
10440 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
10441 };
10442
10443 template<>
10444 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
10445 {};
10446
10447 template<size_t i>
10448 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
10449 {
10450 static_assert(
10451 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
10452 "Index must be less than 1");
10453
10454 using type // NOLINT
10455 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
10456 };
10457
10458 template<>
10459 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
10460 {};
10461
10462 template<size_t i>
10463 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
10464 {
10465 static_assert(
10466 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
10467 "Index must be less than 2");
10468
10469 using type // NOLINT
10470 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
10471 };
10472
10473 template<>
10474 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
10475 {};
10476
10477 template<size_t i>
10478 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
10479 {
10480 static_assert(
10481 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
10482 "Index must be less than 1");
10483
10484 using type // NOLINT
10485 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
10486 };
10487
10488 template<>
10489 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
10490 {};
10491
10492 template<size_t i>
10493 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
10494 {
10495 static_assert(
10496 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
10497 "Index must be less than 2");
10498
10499 using type // NOLINT
10500 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
10501 };
10502
10503 template<>
10504 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>
10505 : integral_constant<size_t, 1>
10506 {};
10507
10508 template<size_t i>
10509 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>
10510 {
10511 static_assert(
10512 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
10513 "Index must be less than 1");
10514
10515 using type // NOLINT
10516 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>().get<i>());
10517 };
10518
10519 template<>
10520 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
10521 {};
10522
10523 template<size_t i>
10524 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
10525 {
10526 static_assert(
10527 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
10528 "Index must be less than 1");
10529
10530 using type // NOLINT
10531 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
10532 };
10533
10534 template<>
10535 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
10536 {};
10537
10538 template<size_t i>
10539 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
10540 {
10541 static_assert(
10542 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
10543 "Index must be less than 2");
10544
10545 using type // NOLINT
10546 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
10547 };
10548
10549 template<>
10550 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 4>
10551 {};
10552
10553 template<size_t i>
10554 struct tuple_element<i, Zivid::Settings>
10555 {
10556 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 4");
10557
10558 using type // NOLINT
10559 = decltype(declval<Zivid::Settings>().get<i>());
10560 };
10561
10562} // namespace std
10563# endif
10564#endif
10565
10566// If we have access to the DataModel library, automatically include internal DataModel
10567// header. This header is necessary for serialization and deserialization.
10568#if defined(__has_include) && !defined(NO_DOC)
10569# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelSerializationMetaData.h")
10570# include "Zivid/SettingsInternal.h"
10571# endif
10572#endif
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:101
Class describing a range of values for a given type T
Definition: Range.h:102
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition: Settings.h:171
bool operator<(const Aperture &other) const
Comparison operator
Definition: Settings.h:234
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream
Definition: Settings.h:246
double value() const
Get the value
std::string toString() const
Get the value as string
bool operator>(const Aperture &other) const
Comparison operator
Definition: Settings.h:240
bool operator==(const Aperture &other) const
Comparison operator
Definition: Settings.h:222
bool operator!=(const Aperture &other) const
Comparison operator
Definition: Settings.h:228
Aperture()=default
Default constructor
constexpr Aperture(double value)
Constructor
Definition: Settings.h:202
double ValueType
The type of the underlying value
Definition: Settings.h:190
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Aperture
Definition: Settings.h:193
bool hasValue() const
Check if the value is set
Brightness controls the light output from the projector.
Definition: Settings.h:280
bool operator!=(const Brightness &other) const
Comparison operator
Definition: Settings.h:345
bool operator<(const Brightness &other) const
Comparison operator
Definition: Settings.h:351
bool operator>(const Brightness &other) const
Comparison operator
Definition: Settings.h:357
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Brightness
Definition: Settings.h:310
std::string toString() const
Get the value as string
double value() const
Get the value
friend std::ostream & operator<<(std::ostream &stream, const Brightness &value)
Operator to serialize the value to a stream
Definition: Settings.h:363
constexpr Brightness(double value)
Constructor
Definition: Settings.h:319
bool hasValue() const
Check if the value is set
Brightness()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:307
bool operator==(const Brightness &other) const
Comparison operator
Definition: Settings.h:339
Exposure time for each single image in the measurement. Affects frame rate.
Definition: Settings.h:387
bool operator<(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:448
ExposureTime()=default
Default constructor
bool hasValue() const
Check if the value is set
void reset()
Reset the node to unset state
std::string toString() const
Get the value as string
bool operator>(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:454
std::chrono::microseconds ValueType
The type of the underlying value
Definition: Settings.h:404
bool operator==(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:436
bool operator!=(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:442
std::chrono::microseconds value() const
Get the value
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ExposureTime
Definition: Settings.h:407
constexpr ExposureTime(std::chrono::microseconds value)
Constructor
Definition: Settings.h:416
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream
Definition: Settings.h:460
Analog gain in the camera
Definition: Settings.h:485
bool operator==(const Gain &other) const
Comparison operator
Definition: Settings.h:532
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream
Definition: Settings.h:556
constexpr Gain(double value)
Constructor
Definition: Settings.h:512
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Gain
Definition: Settings.h:503
double value() const
Get the value
Gain()=default
Default constructor
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:500
std::string toString() const
Get the value as string
bool operator!=(const Gain &other) const
Comparison operator
Definition: Settings.h:538
bool operator>(const Gain &other) const
Comparison operator
Definition: Settings.h:550
bool operator<(const Gain &other) const
Comparison operator
Definition: Settings.h:544
Settings for a single acquisition
Definition: Settings.h:153
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:830
Acquisition & set(const Aperture &value)
Set Aperture
Definition: Settings.h:709
const Aperture & aperture() const
Get Aperture
Definition: Settings.h:697
Gain & gain()
Get Gain
Definition: Settings.h:760
const Settings::Acquisition::Aperture & get() const
Definition: Settings.h:775
Brightness & brightness()
Get Brightness
Definition: Settings.h:722
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream
Definition: Settings.h:858
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition: Settings.h:582
bool operator==(const Acquisition &other) const
Equality operator
const Settings::Acquisition::ExposureTime & get() const
Definition: Settings.h:791
bool operator!=(const Acquisition &other) const
Inequality operator
const ExposureTime & exposureTime() const
Get ExposureTime
Definition: Settings.h:735
Acquisition & set(const Brightness &value)
Set Brightness
Definition: Settings.h:728
Acquisition & set(const ExposureTime &value)
Set ExposureTime
Definition: Settings.h:747
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:642
const Brightness & brightness() const
Get Brightness
Definition: Settings.h:716
const Settings::Acquisition::Gain & get() const
Definition: Settings.h:799
Acquisition & set(const Gain &value)
Set Gain
Definition: Settings.h:766
Acquisition copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:677
Aperture & aperture()
Get Aperture
Definition: Settings.h:703
const Settings::Acquisition::Brightness & get() const
Definition: Settings.h:783
Acquisition(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:612
ExposureTime & exposureTime()
Get ExposureTime
Definition: Settings.h:741
const Gain & gain() const
Get Gain
Definition: Settings.h:754
Acquisition()
Default constructor
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: Settings.h:840
List of Acquisition objects
Definition: Settings.h:880
bool operator!=(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:994
const std::vector< Settings::Acquisition > & value() const
Get the value
std::string toString() const
Get the value as string
void forEach(const F &f) const
Run the given function on each element in the list
Definition: Settings.h:979
const Settings::Acquisition & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list
bool operator==(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:988
Acquisitions()=default
Default constructor
Acquisitions(std::initializer_list< Settings::Acquisition > value)
Constructor
Definition: Settings.h:912
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream
Definition: Settings.h:1000
void forEach(const F &f)
Run the given function on each element in the list
Definition: Settings.h:969
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor
Definition: Settings.h:907
std::vector< Settings::Acquisition > ValueType
The type of the underlying value
Definition: Settings.h:895
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions
Definition: Settings.h:898
const Settings::Acquisition & operator[](std::size_t pos) const
Returns a const reference to the element at position pos in the list
Settings::Acquisition & at(std::size_t pos)
Returns a reference to the element at position pos in the list
std::size_t size() const noexcept
Get the size of the list
Settings::Acquisition & operator[](std::size_t pos)
Returns a reference to the element at position pos in the list
Enable diagnostics
Definition: Settings.h:1045
static const Enabled no
Off/disabled.
Definition: Settings.h:1062
bool hasValue() const
Check if the value is set
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:1065
void reset()
Reset the node to unset state
Enabled()=default
Default constructor
bool ValueType
The type of the underlying value
Definition: Settings.h:1060
static const Enabled yes
On/enabled.
Definition: Settings.h:1061
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:1094
bool value() const
Get the value
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:1106
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:1074
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:1100
std::string toString() const
Get the value as string
When Diagnostics is enabled, extra diagnostic information is recorded during capture....
Definition: Settings.h:1021
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream
Definition: Settings.h:1281
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1259
std::tuple< Settings::Diagnostics::Enabled > Descendants
Definition: Settings.h:1119
std::string toString() const
Get the value as string
Diagnostics copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:1205
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1266
Diagnostics()
Default constructor
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:1231
bool operator==(const Diagnostics &other) const
Equality operator
Diagnostics(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1146
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1173
const Settings::Diagnostics::Enabled & get() const
Definition: Settings.h:1246
bool operator!=(const Diagnostics &other) const
Inequality operator
Diagnostics & set(const Enabled &value)
Set Enabled
Definition: Settings.h:1237
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:1225
Set the Zivid Vision Engine to use.
Definition: Settings.h:1326
ValueType value() const
Get the value
static const Engine phase
phase
Definition: Settings.h:1354
bool hasValue() const
Check if the value is set
ValueType
The type of the underlying value
Definition: Settings.h:1350
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream
Definition: Settings.h:1405
static std::set< ValueType > validValues()
All valid values of Engine
Definition: Settings.h:1358
std::string toString() const
Get the value as string
bool operator==(const Engine &other) const
Comparison operator
Definition: Settings.h:1393
Engine()=default
Default constructor
bool operator!=(const Engine &other) const
Comparison operator
Definition: Settings.h:1399
constexpr Engine(ValueType value)
Constructor
Definition: Settings.h:1367
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:1387
static const Engine stripe
stripe
Definition: Settings.h:1355
void reset()
Reset the node to unset state
Experimental features. These settings may be changed, renamed, moved or deleted in the future.
Definition: Settings.h:1300
Engine & engine()
Get Engine
Definition: Settings.h:1540
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1482
Experimental copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:1514
std::string toString() const
Get the value as string
bool operator!=(const Experimental &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:1590
const Settings::Experimental::Engine & get() const
Definition: Settings.h:1555
std::tuple< Settings::Experimental::Engine > Descendants
Definition: Settings.h:1428
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1568
bool operator==(const Experimental &other) const
Equality operator
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1455
Experimental()
Default constructor
Experimental & set(const Engine &value)
Set Engine
Definition: Settings.h:1546
const Engine & engine() const
Get Engine
Definition: Settings.h:1534
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1575
Digital gain applied to blue channel
Definition: Settings.h:1659
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream
Definition: Settings.h:1732
void reset()
Reset the node to unset state
bool operator==(const Blue &other) const
Comparison operator
Definition: Settings.h:1708
std::string toString() const
Get the value as string
bool operator<(const Blue &other) const
Comparison operator
Definition: Settings.h:1720
constexpr Blue(double value)
Constructor
Definition: Settings.h:1688
bool operator!=(const Blue &other) const
Comparison operator
Definition: Settings.h:1714
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1676
bool operator>(const Blue &other) const
Comparison operator
Definition: Settings.h:1726
static constexpr Range< double > validRange()
The range of valid values for Blue
Definition: Settings.h:1679
Digital gain applied to green channel
Definition: Settings.h:1757
void reset()
Reset the node to unset state
bool operator>(const Green &other) const
Comparison operator
Definition: Settings.h:1824
bool hasValue() const
Check if the value is set
friend std::ostream & operator<<(std::ostream &stream, const Green &value)
Operator to serialize the value to a stream
Definition: Settings.h:1830
double ValueType
The type of the underlying value
Definition: Settings.h:1774
constexpr Green(double value)
Constructor
Definition: Settings.h:1786
bool operator==(const Green &other) const
Comparison operator
Definition: Settings.h:1806
bool operator!=(const Green &other) const
Comparison operator
Definition: Settings.h:1812
std::string toString() const
Get the value as string
bool operator<(const Green &other) const
Comparison operator
Definition: Settings.h:1818
static constexpr Range< double > validRange()
The range of valid values for Green
Definition: Settings.h:1777
Digital gain applied to red channel
Definition: Settings.h:1855
bool operator!=(const Red &other) const
Comparison operator
Definition: Settings.h:1910
constexpr Red(double value)
Constructor
Definition: Settings.h:1884
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream
Definition: Settings.h:1928
double ValueType
The type of the underlying value
Definition: Settings.h:1872
static constexpr Range< double > validRange()
The range of valid values for Red
Definition: Settings.h:1875
bool operator==(const Red &other) const
Comparison operator
Definition: Settings.h:1904
bool operator<(const Red &other) const
Comparison operator
Definition: Settings.h:1916
void reset()
Reset the node to unset state
bool operator>(const Red &other) const
Comparison operator
Definition: Settings.h:1922
bool hasValue() const
Check if the value is set
std::string toString() const
Get the value as string
Color balance settings
Definition: Settings.h:1643
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2012
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2174
bool operator!=(const Balance &other) const
Inequality operator
Balance & set(const Red &value)
Set Red
Definition: Settings.h:2119
Green & green()
Get Green
Definition: Settings.h:2094
std::string toString() const
Get the value as string
Balance(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1983
Red & red()
Get Red
Definition: Settings.h:2113
bool operator==(const Balance &other) const
Equality operator
Balance copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:2048
Balance & set(const Blue &value)
Set Blue
Definition: Settings.h:2081
Blue & blue()
Get Blue
Definition: Settings.h:2075
const Red & red() const
Get Red
Definition: Settings.h:2107
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition: Settings.h:1954
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2183
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:2140
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:2149
Balance & set(const Green &value)
Set Green
Definition: Settings.h:2100
const Green & green() const
Get Green
Definition: Settings.h:2088
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream
Definition: Settings.h:2200
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:2130
const Blue & blue() const
Get Blue
Definition: Settings.h:2069
This setting controls how the color image is computed.
Definition: Settings.h:2260
static const Mode toneMapping
toneMapping
Definition: Settings.h:2306
std::string toString() const
Get the value as string
static const Mode automatic
automatic
Definition: Settings.h:2304
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream
Definition: Settings.h:2356
void reset()
Reset the node to unset state
static const Mode useFirstAcquisition
useFirstAcquisition
Definition: Settings.h:2305
bool operator!=(const Mode &other) const
Comparison operator
Definition: Settings.h:2350
bool operator==(const Mode &other) const
Comparison operator
Definition: Settings.h:2344
ValueType
The type of the underlying value
Definition: Settings.h:2299
bool hasValue() const
Check if the value is set
constexpr Mode(ValueType value)
Constructor
Definition: Settings.h:2318
static std::set< ValueType > validValues()
All valid values of Mode
Definition: Settings.h:2309
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:2338
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition: Settings.h:2221
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition: Settings.h:2381
bool operator!=(const Experimental &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:2548
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2533
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2408
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2435
std::string toString() const
Get the value as string
Experimental & set(const Mode &value)
Set Mode
Definition: Settings.h:2502
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2526
bool operator==(const Experimental &other) const
Equality operator
Mode & mode()
Get Mode
Definition: Settings.h:2496
const Mode & mode() const
Get Mode
Definition: Settings.h:2490
const Settings::Processing::Color::Experimental::Mode & get() const
Definition: Settings.h:2513
Experimental copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:2469
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition: Settings.h:2569
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream
Definition: Settings.h:2644
double value() const
Get the value
bool operator>(const Gamma &other) const
Comparison operator
Definition: Settings.h:2638
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Gamma
Definition: Settings.h:2591
Gamma()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:2588
bool hasValue() const
Check if the value is set
constexpr Gamma(double value)
Constructor
Definition: Settings.h:2600
bool operator!=(const Gamma &other) const
Comparison operator
Definition: Settings.h:2626
bool operator<(const Gamma &other) const
Comparison operator
Definition: Settings.h:2632
std::string toString() const
Get the value as string
bool operator==(const Gamma &other) const
Comparison operator
Definition: Settings.h:2620
Color settings
Definition: Settings.h:1627
Color & set(const Gamma &value)
Set Gamma
Definition: Settings.h:2877
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:2941
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:2914
bool operator==(const Color &other) const
Equality operator
Color & set(const Experimental::Mode &value)
Set Experimental::Mode
Definition: Settings.h:2858
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:2905
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2739
Color & set(const Experimental &value)
Set Experimental
Definition: Settings.h:2851
Color & set(const Balance &value)
Set Balance
Definition: Settings.h:2811
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream
Definition: Settings.h:2992
const Balance & balance() const
Get Balance
Definition: Settings.h:2799
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:2839
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2975
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:2923
Color & set(const Balance::Green &value)
Set Balance::Green
Definition: Settings.h:2825
Experimental & experimental()
Get Experimental
Definition: Settings.h:2845
std::string toString() const
Get the value as string
bool operator!=(const Color &other) const
Inequality operator
std::tuple< Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma > Descendants
Definition: Settings.h:2673
Color & set(const Balance::Blue &value)
Set Balance::Blue
Definition: Settings.h:2818
Gamma & gamma()
Get Gamma
Definition: Settings.h:2871
Color copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:2778
const Settings::Processing::Color::Experimental::Mode & get() const
Definition: Settings.h:2933
Color & set(const Balance::Red &value)
Set Balance::Red
Definition: Settings.h:2832
const Gamma & gamma() const
Get Gamma
Definition: Settings.h:2865
Color(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2706
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:2887
Balance & balance()
Get Balance
Definition: Settings.h:2805
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2966
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:2896
bool ValueType
The type of the underlying value
Definition: Settings.h:3108
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3113
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3122
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3154
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3142
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3148
Higher values gives more correction.
Definition: Settings.h:3169
double ValueType
The type of the underlying value
Definition: Settings.h:3188
bool operator>(const Strength &other) const
Comparison operator
Definition: Settings.h:3238
bool operator!=(const Strength &other) const
Comparison operator
Definition: Settings.h:3226
constexpr Strength(double value)
Constructor
Definition: Settings.h:3200
static constexpr Range< double > validRange()
The range of valid values for Strength
Definition: Settings.h:3191
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream
Definition: Settings.h:3244
bool operator<(const Strength &other) const
Comparison operator
Definition: Settings.h:3232
bool operator==(const Strength &other) const
Comparison operator
Definition: Settings.h:3220
bool operator==(const Correction &other) const
Equality operator
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3464
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3381
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:3442
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition: Settings.h:3269
Correction copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:3360
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:3427
bool operator!=(const Correction &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Correction &value)
Operator to send the value as string to a stream
Definition: Settings.h:3488
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3325
Correction & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3393
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3472
Correction & set(const Strength &value)
Set Strength
Definition: Settings.h:3412
const Strength & strength() const
Get Strength
Definition: Settings.h:3400
Correction(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3297
static const Enabled yes
On/enabled.
Definition: Settings.h:3544
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3557
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3583
bool ValueType
The type of the underlying value
Definition: Settings.h:3543
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3548
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3589
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3577
static const Enabled no
Off/disabled.
Definition: Settings.h:3545
Higher values remove more points.
Definition: Settings.h:3604
constexpr Threshold(double value)
Constructor
Definition: Settings.h:3635
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:3661
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:3667
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:3626
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:3655
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:3673
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:3679
double ValueType
The type of the underlying value
Definition: Settings.h:3623
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3897
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3760
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:3921
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:3835
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:3847
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3732
bool operator!=(const Removal &other) const
Inequality operator
Removal copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:3795
Threshold & threshold()
Get Threshold
Definition: Settings.h:3841
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3828
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:3862
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:3704
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3816
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:3876
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3905
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition: Settings.h:3051
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:4121
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled
Definition: Settings.h:4088
ContrastDistortion & set(const Correction &value)
Set Correction
Definition: Settings.h:4081
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4232
bool operator!=(const ContrastDistortion &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const ContrastDistortion &value)
Operator to send the value as string to a stream
Definition: Settings.h:4256
ContrastDistortion copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:4048
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:3945
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength
Definition: Settings.h:4095
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4009
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4240
ContrastDistortion & set(const Removal &value)
Set Removal
Definition: Settings.h:4114
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4211
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4183
const Removal & removal() const
Get Removal
Definition: Settings.h:4102
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4155
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4141
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4170
Removal & removal()
Get Removal
Definition: Settings.h:4108
bool operator==(const ContrastDistortion &other) const
Equality operator
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:4128
const Correction & correction() const
Get Correction
Definition: Settings.h:4069
ContrastDistortion(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3977
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4196
Correction & correction()
Get Correction
Definition: Settings.h:4075
Experimental filters. These may be renamed, moved or deleted in the future.
Definition: Settings.h:3029
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4577
ContrastDistortion & contrastDistortion()
Get ContrastDistortion
Definition: Settings.h:4414
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4527
Experimental copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:4387
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4314
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion
Definition: Settings.h:4420
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold
Definition: Settings.h:4462
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4347
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength
Definition: Settings.h:4441
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:4592
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4514
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4570
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal
Definition: Settings.h:4448
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:4473
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4485
bool operator!=(const Experimental &other) const
Inequality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4555
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled
Definition: Settings.h:4434
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion
Definition: Settings.h:4408
std::string toString() const
Get the value as string
bool operator==(const Experimental &other) const
Equality operator
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:4281
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction
Definition: Settings.h:4427
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled
Definition: Settings.h:4455
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4499
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4541
Enable or disable the SNR filter
Definition: Settings.h:4647
static const Enabled yes
On/enabled.
Definition: Settings.h:4665
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:4704
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:4698
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:4669
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:4678
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:4710
static const Enabled no
Off/disabled.
Definition: Settings.h:4666
bool ValueType
The type of the underlying value
Definition: Settings.h:4664
std::string toString() const
Get the value as string
Discard points with signal-to-noise ratio (SNR) below the given value
Definition: Settings.h:4725
constexpr Threshold(double value)
Constructor
Definition: Settings.h:4754
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:4774
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:4745
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:4798
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:4792
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:4786
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:4742
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:4780
Discard points with signal-to-noise ratio (SNR) values below a threshold
Definition: Settings.h:4629
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4851
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5030
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:4935
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:4954
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:4823
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5014
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:4947
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:4966
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4879
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:4987
Threshold & threshold()
Get Threshold
Definition: Settings.h:4960
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5006
Removal copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:4914
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:4941
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:4977
Contains a filter that removes points with low signal-to-noise ratio (SNR)
Definition: Settings.h:4611
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5236
std::string toString() const
Get the value as string
Removal & removal()
Get Removal
Definition: Settings.h:5172
Noise(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5080
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:5192
Noise copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:5145
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5243
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:5223
std::tuple< Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:5051
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:5185
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5109
bool operator!=(const Noise &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Noise &value)
Operator to send the value as string to a stream
Definition: Settings.h:5258
const Removal & removal() const
Get Removal
Definition: Settings.h:5166
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:5213
bool operator==(const Noise &other) const
Equality operator
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:5203
Noise & set(const Removal &value)
Set Removal
Definition: Settings.h:5178
Enable or disable the outlier filter
Definition: Settings.h:5313
bool ValueType
The type of the underlying value
Definition: Settings.h:5330
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5370
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5344
static const Enabled no
Off/disabled.
Definition: Settings.h:5332
std::string toString() const
Get the value as string
static const Enabled yes
On/enabled.
Definition: Settings.h:5331
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5376
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5335
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5364
Discard point if Euclidean distance to neighboring points is above the given value
Definition: Settings.h:5391
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:5411
constexpr Threshold(double value)
Constructor
Definition: Settings.h:5420
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:5452
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:5440
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:5446
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:5464
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:5458
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:5408
Discard point if Euclidean distance to neighboring points is above a threshold
Definition: Settings.h:5295
bool operator!=(const Removal &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5696
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5601
Removal copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:5580
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5613
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5607
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:5632
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5643
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5517
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5653
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5489
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:5620
Threshold & threshold()
Get Threshold
Definition: Settings.h:5626
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: Settings.h:5672
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5545
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5680
Contains a filter that removes points with large Euclidean distance to neighboring points
Definition: Settings.h:5277
const Removal & removal() const
Get Removal
Definition: Settings.h:5832
Outlier(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5746
Outlier & set(const Removal &value)
Set Removal
Definition: Settings.h:5844
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5909
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: Settings.h:5902
bool operator!=(const Outlier &other) const
Inequality operator
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:5858
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:5851
Removal & removal()
Get Removal
Definition: Settings.h:5838
Outlier copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:5811
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream
Definition: Settings.h:5924
bool operator==(const Outlier &other) const
Equality operator
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5889
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:5869
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5879
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5775
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5717
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition: Settings.h:5979
bool ValueType
The type of the underlying value
Definition: Settings.h:5996
static const Enabled yes
On/enabled.
Definition: Settings.h:5997
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6036
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6010
std::string toString() const
Get the value as string
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:6042
static const Enabled no
Off/disabled.
Definition: Settings.h:5998
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6030
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6001
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition: Settings.h:6082
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream
Definition: Settings.h:6164
static const Mode global
global
Definition: Settings.h:6113
constexpr Mode(ValueType value)
Constructor
Definition: Settings.h:6126
bool operator==(const Mode &other) const
Comparison operator
Definition: Settings.h:6152
bool operator!=(const Mode &other) const
Comparison operator
Definition: Settings.h:6158
ValueType
The type of the underlying value
Definition: Settings.h:6109
static std::set< ValueType > validValues()
All valid values of Mode
Definition: Settings.h:6117
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:6146
Experimental reflection filter related settings
Definition: Settings.h:6057
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6217
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6344
bool operator!=(const Experimental &other) const
Inequality operator
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6337
Experimental copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:6278
std::tuple< Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition: Settings.h:6190
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:6359
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:6324
bool operator==(const Experimental &other) const
Equality operator
const Mode & mode() const
Get Mode
Definition: Settings.h:6299
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6244
Experimental & set(const Mode &value)
Set Mode
Definition: Settings.h:6311
Discard points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:5961
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:6513
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:6500
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:6610
std::string toString() const
Get the value as string
bool operator==(const Removal &other) const
Equality operator
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:6543
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6437
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition: Settings.h:6379
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6586
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:6566
Removal copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:6473
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6408
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:6506
Removal & set(const Experimental &value)
Set Experimental
Definition: Settings.h:6525
Experimental & experimental()
Get Experimental
Definition: Settings.h:6519
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6594
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:6494
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition: Settings.h:6554
bool operator!=(const Removal &other) const
Inequality operator
Removal & set(const Experimental::Mode &value)
Set Experimental::Mode
Definition: Settings.h:6532
Contains a filter that removes points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:5943
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:6825
Reflection & set(const Removal::Experimental &value)
Set Removal::Experimental
Definition: Settings.h:6776
bool operator!=(const Reflection &other) const
Inequality operator
bool operator==(const Reflection &other) const
Equality operator
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition: Settings.h:6632
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition: Settings.h:6814
Removal & removal()
Get Removal
Definition: Settings.h:6756
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6692
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream
Definition: Settings.h:6860
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6845
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6838
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:6769
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:6804
Reflection(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6662
std::string toString() const
Get the value as string
Reflection & set(const Removal::Experimental::Mode &value)
Set Removal::Experimental::Mode
Definition: Settings.h:6783
const Removal & removal() const
Get Removal
Definition: Settings.h:6750
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:6794
Reflection & set(const Removal &value)
Set Removal
Definition: Settings.h:6762
Reflection copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:6729
Enable or disable the smoothing filter
Definition: Settings.h:6913
bool ValueType
The type of the underlying value
Definition: Settings.h:6930
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6935
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6970
static const Enabled yes
On/enabled.
Definition: Settings.h:6931
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6964
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:6976
static const Enabled no
Off/disabled.
Definition: Settings.h:6932
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6944
std::string toString() const
Get the value as string
Higher values result in smoother point clouds (Standard deviation of the filter coefficients)
Definition: Settings.h:6991
double ValueType
The type of the underlying value
Definition: Settings.h:7008
bool operator!=(const Sigma &other) const
Comparison operator
Definition: Settings.h:7046
bool operator>(const Sigma &other) const
Comparison operator
Definition: Settings.h:7058
constexpr Sigma(double value)
Constructor
Definition: Settings.h:7020
static constexpr Range< double > validRange()
The range of valid values for Sigma
Definition: Settings.h:7011
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream
Definition: Settings.h:7064
bool operator==(const Sigma &other) const
Comparison operator
Definition: Settings.h:7040
std::string toString() const
Get the value as string
bool operator<(const Sigma &other) const
Comparison operator
Definition: Settings.h:7052
Gaussian smoothing of the point cloud
Definition: Settings.h:6895
Gaussian(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7117
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:7207
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7272
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7253
Gaussian & set(const Enabled &value)
Set Enabled
Definition: Settings.h:7213
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream
Definition: Settings.h:7296
const Sigma & sigma() const
Get Sigma
Definition: Settings.h:7220
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7089
bool operator==(const Gaussian &other) const
Equality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:7201
bool operator!=(const Gaussian &other) const
Inequality operator
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7243
Gaussian copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:7180
Gaussian & set(const Sigma &value)
Set Sigma
Definition: Settings.h:7232
Sigma & sigma()
Get Sigma
Definition: Settings.h:7226
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7145
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7280
Smoothing filters
Definition: Settings.h:6879
Smoothing copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:7411
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7375
Smoothing & set(const Gaussian &value)
Set Gaussian
Definition: Settings.h:7444
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7317
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7479
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7509
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma
Definition: Settings.h:7458
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled
Definition: Settings.h:7451
bool operator!=(const Smoothing &other) const
Inequality operator
const Gaussian & gaussian() const
Get Gaussian
Definition: Settings.h:7432
Smoothing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7346
std::string toString() const
Get the value as string
bool operator==(const Smoothing &other) const
Equality operator
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:7469
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7502
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7489
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream
Definition: Settings.h:7524
Gaussian & gaussian()
Get Gaussian
Definition: Settings.h:7438
Filters
Definition: Settings.h:3013
bool operator!=(const Filters &other) const
Inequality operator
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:8129
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled
Definition: Settings.h:7920
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8285
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:8139
std::tuple< Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7566
Filters copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:7725
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:8071
std::string toString() const
Get the value as string
Filters & set(const Reflection::Removal::Experimental &value)
Set Reflection::Removal::Experimental
Definition: Settings.h:7927
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:8100
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition: Settings.h:8188
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:8207
Filters & set(const Reflection::Removal::Experimental::Mode &value)
Set Reflection::Removal::Experimental::Mode
Definition: Settings.h:7934
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:8168
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:8158
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold
Definition: Settings.h:7887
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7786
Filters & set(const Experimental &value)
Set Experimental
Definition: Settings.h:7758
Outlier & outlier()
Get Outlier
Definition: Settings.h:7860
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal
Definition: Settings.h:7873
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:7746
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion
Definition: Settings.h:7765
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream
Definition: Settings.h:8304
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:8178
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:8119
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:7994
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:8237
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7668
const Reflection & reflection() const
Get Reflection
Definition: Settings.h:7894
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:7984
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold
Definition: Settings.h:7847
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:8227
Filters & set(const Reflection &value)
Set Reflection
Definition: Settings.h:7906
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:8033
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal
Definition: Settings.h:7793
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8274
Filters & set(const Outlier &value)
Set Outlier
Definition: Settings.h:7866
const Noise & noise() const
Get Noise
Definition: Settings.h:7814
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction
Definition: Settings.h:7772
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:8019
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal
Definition: Settings.h:7913
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:8090
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled
Definition: Settings.h:7840
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled
Definition: Settings.h:7967
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:8081
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7807
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian
Definition: Settings.h:7960
bool operator==(const Filters &other) const
Equality operator
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled
Definition: Settings.h:7880
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:8058
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:8198
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:8045
Filters(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7617
Noise & noise()
Get Noise
Definition: Settings.h:7820
Filters & set(const Smoothing &value)
Set Smoothing
Definition: Settings.h:7953
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7779
Filters & set(const Noise::Removal &value)
Set Noise::Removal
Definition: Settings.h:7833
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:8149
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:8110
Smoothing & smoothing()
Get Smoothing
Definition: Settings.h:7947
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:8217
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7800
const Outlier & outlier() const
Get Outlier
Definition: Settings.h:7854
Reflection & reflection()
Get Reflection
Definition: Settings.h:7900
Filters & set(const Noise &value)
Set Noise
Definition: Settings.h:7826
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma
Definition: Settings.h:7974
const Smoothing & smoothing() const
Get Smoothing
Definition: Settings.h:7941
Experimental & experimental()
Get Experimental
Definition: Settings.h:7752
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:8005
Settings related to processing of a capture, including filters and color balance
Definition: Settings.h:1609
const Settings::Processing::Color::Experimental::Mode & get() const
Definition: Settings.h:8881
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:8962
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:9129
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:9090
Processing & set(const Color::Experimental &value)
Set Color::Experimental
Definition: Settings.h:8611
Processing & set(const Color &value)
Set Color
Definition: Settings.h:8576
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8863
Processing & set(const Color::Balance &value)
Set Color::Balance
Definition: Settings.h:8583
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian
Definition: Settings.h:8805
Processing copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:8544
Filters & filters()
Get Filters
Definition: Settings.h:8638
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:8812
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:8889
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:8686
Processing()
Default constructor
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:9119
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:8700
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8854
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal
Definition: Settings.h:8742
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:8693
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream
Definition: Settings.h:9192
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:8973
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:9080
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:9024
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:9149
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:9014
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue
Definition: Settings.h:8590
Color & color()
Get Color
Definition: Settings.h:8570
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition: Settings.h:9100
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:9139
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection
Definition: Settings.h:8763
Processing & set(const Filters::Noise &value)
Set Filters::Noise
Definition: Settings.h:8707
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:9032
const Settings::Processing::Filters & get() const
Definition: Settings.h:8897
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:8679
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled
Definition: Settings.h:8721
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing
Definition: Settings.h:8798
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8836
const Filters & filters() const
Get Filters
Definition: Settings.h:8632
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:9176
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:8819
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal
Definition: Settings.h:8714
Processing & set(const Filters::Reflection::Removal::Experimental &value)
Set Filters::Reflection::Removal::Experimental
Definition: Settings.h:8784
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled
Definition: Settings.h:8749
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold
Definition: Settings.h:8728
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8845
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental
Definition: Settings.h:8651
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:9004
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold
Definition: Settings.h:8756
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green
Definition: Settings.h:8597
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:8872
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:8951
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier
Definition: Settings.h:8735
std::tuple< Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:8359
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:8938
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode
Definition: Settings.h:8618
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled
Definition: Settings.h:8777
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:8672
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:9061
Processing & set(const Filters::Reflection::Removal::Experimental::Mode &value)
Set Filters::Reflection::Removal::Experimental::Mode
Definition: Settings.h:8791
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal
Definition: Settings.h:8770
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:9110
Processing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:8419
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:8665
const Settings::Processing::Color & get() const
Definition: Settings.h:8828
bool operator==(const Processing &other) const
Equality operator
const Color & color() const
Get Color
Definition: Settings.h:8564
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion
Definition: Settings.h:8658
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:9070
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:9051
Processing & set(const Filters &value)
Set Filters
Definition: Settings.h:8644
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red
Definition: Settings.h:8604
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:8995
bool operator!=(const Processing &other) const
Inequality operator
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:8906
Processing & set(const Color::Gamma &value)
Set Color::Gamma
Definition: Settings.h:8625
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:8479
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:8986
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:8926
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:8916
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:9168
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:9041
Settings used when capturing with a Zivid camera
Definition: Settings.h:121
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:10059
Settings(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:9318
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:10040
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:9852
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:9669
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:9519
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:9876
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode
Definition: Settings.h:9606
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing
Definition: Settings.h:9774
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:10012
Settings copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:9455
const Processing & processing() const
Get Processing
Definition: Settings.h:9545
const Settings::Experimental & get() const
Definition: Settings.h:9822
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:9901
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:9971
Settings & set(const Processing &value)
Set Processing
Definition: Settings.h:9557
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:9994
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled
Definition: Settings.h:9725
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:9676
Settings & set(const Experimental::Engine &value)
Set Experimental::Engine
Definition: Settings.h:9538
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian
Definition: Settings.h:9781
Settings & set(const Diagnostics &value)
Set Diagnostics
Definition: Settings.h:9505
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:9982
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise
Definition: Settings.h:9683
void load(const std::string &fileName)
Load from the given file
const Settings::Acquisitions & get() const
Definition: Settings.h:9802
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:9917
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:10049
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:10153
Settings & set(const Processing::Filters::Reflection::Removal::Experimental &value)
Set Processing::Filters::Reflection::Removal::Experimental
Definition: Settings.h:9760
const Settings::Diagnostics & get() const
Definition: Settings.h:9808
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:10143
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance
Definition: Settings.h:9571
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:10022
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:9937
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:10184
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:9868
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:9788
const Settings::Processing & get() const
Definition: Settings.h:9836
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection
Definition: Settings.h:9739
const Settings::Experimental::Engine & get() const
Definition: Settings.h:9830
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:10194
Settings()
Default constructor
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:9927
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold
Definition: Settings.h:9732
const Settings::Processing::Color::Experimental::Mode & get() const
Definition: Settings.h:9893
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:9655
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:9960
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:9860
const Acquisitions & acquisitions() const
Get Acquisitions
Definition: Settings.h:9474
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:9384
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:10077
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental
Definition: Settings.h:9627
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:10124
const Settings::Processing::Filters & get() const
Definition: Settings.h:9909
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental
Definition: Settings.h:9599
void save(const std::string &fileName) const
Save to the given file
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:9884
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:9662
Settings & set(const Processing::Color &value)
Set Processing::Color
Definition: Settings.h:9564
Experimental & experimental()
Get Experimental
Definition: Settings.h:9525
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier
Definition: Settings.h:9711
bool operator==(const Settings &other) const
Equality operator
Acquisitions & acquisitions()
Get Acquisitions
Definition: Settings.h:9480
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal
Definition: Settings.h:9746
Settings(const std::string &fileName)
Construct Settings by loading from file
Settings & set(const Processing::Color::Balance::Red &value)
Set Processing::Color::Balance::Red
Definition: Settings.h:9592
Diagnostics & diagnostics()
Get Diagnostics
Definition: Settings.h:9499
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:10032
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition: Settings.h:10106
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled
Definition: Settings.h:9753
Processing & processing()
Get Processing
Definition: Settings.h:9551
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled
Definition: Settings.h:9512
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:10003
const Settings::Diagnostics::Enabled & get() const
Definition: Settings.h:9816
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:9948
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion
Definition: Settings.h:9634
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma
Definition: Settings.h:9613
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold
Definition: Settings.h:9704
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:9648
Settings & set(const Processing::Filters::Reflection::Removal::Experimental::Mode &value)
Set Processing::Filters::Reflection::Removal::Experimental::Mode
Definition: Settings.h:9767
Settings & set(const Acquisitions &value)
Set Acquisitions
Definition: Settings.h:9486
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:9795
const Diagnostics & diagnostics() const
Get Diagnostics
Definition: Settings.h:9493
bool operator!=(const Settings &other) const
Inequality operator
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal
Definition: Settings.h:9690
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal
Definition: Settings.h:9718
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled
Definition: Settings.h:9697
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:9641
const Settings::Processing::Color & get() const
Definition: Settings.h:9844
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:10096
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:10086
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green
Definition: Settings.h:9585
Settings & set(const Processing::Filters &value)
Set Processing::Filters
Definition: Settings.h:9620
Settings & set(const Experimental &value)
Set Experimental
Definition: Settings.h:9531
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:10069
std::tuple< Settings::Acquisitions, Settings::Diagnostics, Settings::Diagnostics::Enabled, Settings::Experimental, Settings::Experimental::Engine, Settings::Processing, Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:9250
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue
Definition: Settings.h:9578
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:10133
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream
Definition: Settings.h:10212
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition: Settings.h:10116
NodeType
Definition: NodeType.h:100
Ret validRange(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:206
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99