Zivid C++ API 2.6.0+fa0036c5-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{ 10 };
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
282 {
283 public:
286
288 static constexpr const char *path{ "Acquisition/Brightness" };
289
291 static constexpr const char *name{ "Brightness" };
292
294 static constexpr const char *description{
295 R"description(Brightness controls the light output from the projector.
296
297Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
298or in case of high levels of ambient lighting. Brightness above 1.0 is supported on Zivid One
299Plus and Zivid Two.
300
301When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
302can capture) will be reduced. For Zivid One Plus the duty cycle in boost mode is 50%. For Zivid
303Two the duty cycle is reduced linearly from 100% at brightness 1.0, to 50% at brightness 1.8.
304The duty cycle is calculated over a 10 second period. This limitation is enforced automatically
305by the camera. Calling capture when the duty cycle limit has been reached will cause the camera
306to first wait (sleep) for a duration of time to cool down, before capture will start.
307)description"
308 };
309
311 using ValueType = double;
312
314 static constexpr Range<double> validRange()
315 {
316 return { 0, 1.8 };
317 }
318
320 Brightness() = default;
321
323 explicit constexpr Brightness(double value)
324 : m_opt{ verifyValue(value) }
325 {}
326
331 double value() const;
332
334 bool hasValue() const;
335
337 void reset();
338
340 std::string toString() const;
341
343 bool operator==(const Brightness &other) const
344 {
345 return m_opt == other.m_opt;
346 }
347
349 bool operator!=(const Brightness &other) const
350 {
351 return m_opt != other.m_opt;
352 }
353
355 bool operator<(const Brightness &other) const
356 {
357 return m_opt < other.m_opt;
358 }
359
361 bool operator>(const Brightness &other) const
362 {
363 return m_opt > other.m_opt;
364 }
365
367 friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
368 {
369 return stream << value.toString();
370 }
371
372 private:
373 void setFromString(const std::string &value);
374
375 constexpr ValueType static verifyValue(const ValueType &value)
376 {
377 return validRange().isInRange(value)
378 ? value
379 : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
380 + " } is not in range [" + std::to_string(validRange().min())
381 + ", " + std::to_string(validRange().max()) + "]" };
382 }
383
384 Zivid::DataModel::Detail::Optional<double> m_opt;
385
386 friend struct DataModel::Detail::Befriend<Brightness>;
387 };
388
391 {
392 public:
395
397 static constexpr const char *path{ "Acquisition/ExposureTime" };
398
400 static constexpr const char *name{ "ExposureTime" };
401
403 static constexpr const char *description{
404 R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
405 };
406
408 using ValueType = std::chrono::microseconds;
409
412 {
413 return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
414 }
415
417 ExposureTime() = default;
418
420 explicit constexpr ExposureTime(std::chrono::microseconds value)
421 : m_opt{ verifyValue(value) }
422 {}
423
428 std::chrono::microseconds value() const;
429
431 bool hasValue() const;
432
434 void reset();
435
437 std::string toString() const;
438
440 bool operator==(const ExposureTime &other) const
441 {
442 return m_opt == other.m_opt;
443 }
444
446 bool operator!=(const ExposureTime &other) const
447 {
448 return m_opt != other.m_opt;
449 }
450
452 bool operator<(const ExposureTime &other) const
453 {
454 return m_opt < other.m_opt;
455 }
456
458 bool operator>(const ExposureTime &other) const
459 {
460 return m_opt > other.m_opt;
461 }
462
464 friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
465 {
466 return stream << value.toString();
467 }
468
469 private:
470 void setFromString(const std::string &value);
471
472 constexpr ValueType static verifyValue(const ValueType &value)
473 {
474 return validRange().isInRange(value)
475 ? value
476 : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
477 + " } is not in range ["
478 + std::to_string(validRange().min().count()) + ", "
479 + std::to_string(validRange().max().count()) + "]" };
480 }
481
482 Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
483
484 friend struct DataModel::Detail::Befriend<ExposureTime>;
485 };
486
489 {
490 public:
493
495 static constexpr const char *path{ "Acquisition/Gain" };
496
498 static constexpr const char *name{ "Gain" };
499
501 static constexpr const char *description{ R"description(Analog gain in the camera)description" };
502
504 using ValueType = double;
505
507 static constexpr Range<double> validRange()
508 {
509 return { 1, 16 };
510 }
511
513 Gain() = default;
514
516 explicit constexpr Gain(double value)
517 : m_opt{ verifyValue(value) }
518 {}
519
524 double value() const;
525
527 bool hasValue() const;
528
530 void reset();
531
533 std::string toString() const;
534
536 bool operator==(const Gain &other) const
537 {
538 return m_opt == other.m_opt;
539 }
540
542 bool operator!=(const Gain &other) const
543 {
544 return m_opt != other.m_opt;
545 }
546
548 bool operator<(const Gain &other) const
549 {
550 return m_opt < other.m_opt;
551 }
552
554 bool operator>(const Gain &other) const
555 {
556 return m_opt > other.m_opt;
557 }
558
560 friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
561 {
562 return stream << value.toString();
563 }
564
565 private:
566 void setFromString(const std::string &value);
567
568 constexpr ValueType static verifyValue(const ValueType &value)
569 {
570 return validRange().isInRange(value)
571 ? value
572 : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
573 + std::to_string(validRange().min()) + ", "
574 + std::to_string(validRange().max()) + "]" };
575 }
576
577 Zivid::DataModel::Detail::Optional<double> m_opt;
578
579 friend struct DataModel::Detail::Befriend<Gain>;
580 };
581
582 using Descendants = std::tuple<
587
590
605#ifndef NO_DOC
606 template<
607 typename... Args,
608 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
609 typename std::enable_if<
610 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
611 value,
612 int>::type = 0>
613#else
614 template<typename... Args>
615#endif
616 explicit Acquisition(Args &&...args)
617 {
618 using namespace Zivid::Detail::TypeTraits;
619
620 static_assert(
621 AllArgsDecayedAreUnique<Args...>::value,
622 "Found duplicate types among the arguments passed to Acquisition(...). "
623 "Types should be listed at most once.");
624
625 set(std::forward<Args>(args)...);
626 }
627
641#ifndef NO_DOC
642 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
643#else
644 template<typename... Args>
645#endif
646 void set(Args &&...args)
647 {
648 using namespace Zivid::Detail::TypeTraits;
649
650 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
651 static_assert(
652 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
653
654 static_assert(
655 AllArgsDecayedAreUnique<Args...>::value,
656 "Found duplicate types among the arguments passed to set(...). "
657 "Types should be listed at most once.");
658
659 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
660 }
661
676#ifndef NO_DOC
677 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
678#else
679 template<typename... Args>
680#endif
681 Acquisition copyWith(Args &&...args) const
682 {
683 using namespace Zivid::Detail::TypeTraits;
684
685 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
686 static_assert(
687 AllArgsAreDescendantNodes::value,
688 "All arguments passed to copyWith(...) must be descendant nodes.");
689
690 static_assert(
691 AllArgsDecayedAreUnique<Args...>::value,
692 "Found duplicate types among the arguments passed to copyWith(...). "
693 "Types should be listed at most once.");
694
695 auto copy{ *this };
696 copy.set(std::forward<Args>(args)...);
697 return copy;
698 }
699
701 const Aperture &aperture() const
702 {
703 return m_aperture;
704 }
705
708 {
709 return m_aperture;
710 }
711
713 Acquisition &set(const Aperture &value)
714 {
715 m_aperture = value;
716 return *this;
717 }
718
720 const Brightness &brightness() const
721 {
722 return m_brightness;
723 }
724
727 {
728 return m_brightness;
729 }
730
733 {
734 m_brightness = value;
735 return *this;
736 }
737
740 {
741 return m_exposureTime;
742 }
743
746 {
747 return m_exposureTime;
748 }
749
752 {
753 m_exposureTime = value;
754 return *this;
755 }
756
758 const Gain &gain() const
759 {
760 return m_gain;
761 }
762
765 {
766 return m_gain;
767 }
768
770 Acquisition &set(const Gain &value)
771 {
772 m_gain = value;
773 return *this;
774 }
775
776 template<
777 typename T,
778 typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
780 {
781 return m_aperture;
782 }
783
784 template<
785 typename T,
786 typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
788 {
789 return m_brightness;
790 }
791
792 template<
793 typename T,
794 typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
796 {
797 return m_exposureTime;
798 }
799
800 template<
801 typename T,
802 typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
804 {
805 return m_gain;
806 }
807
808 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
810 {
811 return m_aperture;
812 }
813
814 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
816 {
817 return m_brightness;
818 }
819
820 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
822 {
823 return m_exposureTime;
824 }
825
826 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
828 {
829 return m_gain;
830 }
831
833 template<typename F>
834 void forEach(const F &f) const
835 {
836 f(m_aperture);
837 f(m_brightness);
838 f(m_exposureTime);
839 f(m_gain);
840 }
841
843 template<typename F>
844 void forEach(const F &f)
845 {
846 f(m_aperture);
847 f(m_brightness);
848 f(m_exposureTime);
849 f(m_gain);
850 }
851
853 bool operator==(const Acquisition &other) const;
854
856 bool operator!=(const Acquisition &other) const;
857
859 std::string toString() const;
860
862 friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
863 {
864 return stream << value.toString();
865 }
866
867 private:
868 void setFromString(const std::string &value);
869
870 void setFromString(const std::string &fullPath, const std::string &value);
871
872 std::string getString(const std::string &fullPath) const;
873
874 Aperture m_aperture;
875 Brightness m_brightness;
876 ExposureTime m_exposureTime;
877 Gain m_gain;
878
879 friend struct DataModel::Detail::Befriend<Acquisition>;
880 };
881
884 {
885 public:
888
890 static constexpr const char *path{ "Acquisitions" };
891
893 static constexpr const char *name{ "Acquisitions" };
894
896 static constexpr const char *description{ R"description(List of Acquisition objects)description" };
897
899 using ValueType = std::vector<Settings::Acquisition>;
900
903 {
904 return { 0, std::numeric_limits<ValueType::size_type>::max() };
905 }
906
908 Acquisitions() = default;
909
911 explicit Acquisitions(std::vector<Settings::Acquisition> value)
912 : m_value{ std::move(value) }
913 {}
914
916 explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
917 : Acquisitions{ ValueType{ value } }
918 {}
919
921 const std::vector<Settings::Acquisition> &value() const;
922
924 std::string toString() const;
925
927 std::size_t size() const noexcept;
928
930 bool isEmpty() const noexcept;
931
937 template<typename... Args>
938 void emplaceBack(Args &&...args)
939 {
940 m_value.emplace_back(std::forward<Args>(args)...);
941 }
942
948 Settings::Acquisition &at(std::size_t pos);
949
955 const Settings::Acquisition &at(std::size_t pos) const;
956
963
969 const Settings::Acquisition &operator[](std::size_t pos) const;
970
972 template<typename F>
973 void forEach(const F &f)
974 {
975 for(auto &child : m_value)
976 {
977 f(child);
978 }
979 }
980
982 template<typename F>
983 void forEach(const F &f) const
984 {
985 for(const auto &child : m_value)
986 {
987 f(child);
988 }
989 }
990
992 bool operator==(const Acquisitions &other) const
993 {
994 return m_value == other.m_value;
995 }
996
998 bool operator!=(const Acquisitions &other) const
999 {
1000 return m_value != other.m_value;
1001 }
1002
1004 friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
1005 {
1006 return stream << value.toString();
1007 }
1008
1009 private:
1010 void setFromString(const std::string &value);
1011
1012 std::vector<Settings::Acquisition> m_value{};
1013
1014 friend struct DataModel::Detail::Befriend<Acquisitions>;
1015 };
1016
1025 {
1026 public:
1029
1031 static constexpr const char *path{ "Diagnostics" };
1032
1034 static constexpr const char *name{ "Diagnostics" };
1035
1037 static constexpr const char *description{
1038 R"description(When Diagnostics is enabled, extra diagnostic information is recorded during capture. This extra
1039information is included when saving the frame to a .zdf file, and will help Zivid's support team
1040to provide better assistance.
1041
1042Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the
1043.zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid's support team.
1044)description"
1045 };
1046
1049 {
1050 public:
1053
1055 static constexpr const char *path{ "Diagnostics/Enabled" };
1056
1058 static constexpr const char *name{ "Enabled" };
1059
1061 static constexpr const char *description{ R"description(Enable diagnostics)description" };
1062
1064 using ValueType = bool;
1065 static const Enabled yes;
1066 static const Enabled no;
1067
1069 static std::set<bool> validValues()
1070 {
1071 return { false, true };
1072 }
1073
1075 Enabled() = default;
1076
1078 explicit constexpr Enabled(bool value)
1079 : m_opt{ value }
1080 {}
1081
1086 bool value() const;
1087
1089 bool hasValue() const;
1090
1092 void reset();
1093
1095 std::string toString() const;
1096
1098 bool operator==(const Enabled &other) const
1099 {
1100 return m_opt == other.m_opt;
1101 }
1102
1104 bool operator!=(const Enabled &other) const
1105 {
1106 return m_opt != other.m_opt;
1107 }
1108
1110 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1111 {
1112 return stream << value.toString();
1113 }
1114
1115 private:
1116 void setFromString(const std::string &value);
1117
1118 Zivid::DataModel::Detail::Optional<bool> m_opt;
1119
1120 friend struct DataModel::Detail::Befriend<Enabled>;
1121 };
1122
1123 using Descendants = std::tuple<Settings::Diagnostics::Enabled>;
1124
1127
1139#ifndef NO_DOC
1140 template<
1141 typename... Args,
1142 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1143 typename std::enable_if<
1144 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1145 value,
1146 int>::type = 0>
1147#else
1148 template<typename... Args>
1149#endif
1150 explicit Diagnostics(Args &&...args)
1151 {
1152 using namespace Zivid::Detail::TypeTraits;
1153
1154 static_assert(
1155 AllArgsDecayedAreUnique<Args...>::value,
1156 "Found duplicate types among the arguments passed to Diagnostics(...). "
1157 "Types should be listed at most once.");
1158
1159 set(std::forward<Args>(args)...);
1160 }
1161
1172#ifndef NO_DOC
1173 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1174#else
1175 template<typename... Args>
1176#endif
1177 void set(Args &&...args)
1178 {
1179 using namespace Zivid::Detail::TypeTraits;
1180
1181 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1182 static_assert(
1183 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1184
1185 static_assert(
1186 AllArgsDecayedAreUnique<Args...>::value,
1187 "Found duplicate types among the arguments passed to set(...). "
1188 "Types should be listed at most once.");
1189
1190 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1191 }
1192
1204#ifndef NO_DOC
1205 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1206#else
1207 template<typename... Args>
1208#endif
1209 Diagnostics copyWith(Args &&...args) const
1210 {
1211 using namespace Zivid::Detail::TypeTraits;
1212
1213 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1214 static_assert(
1215 AllArgsAreDescendantNodes::value,
1216 "All arguments passed to copyWith(...) must be descendant nodes.");
1217
1218 static_assert(
1219 AllArgsDecayedAreUnique<Args...>::value,
1220 "Found duplicate types among the arguments passed to copyWith(...). "
1221 "Types should be listed at most once.");
1222
1223 auto copy{ *this };
1224 copy.set(std::forward<Args>(args)...);
1225 return copy;
1226 }
1227
1229 const Enabled &isEnabled() const
1230 {
1231 return m_enabled;
1232 }
1233
1236 {
1237 return m_enabled;
1238 }
1239
1241 Diagnostics &set(const Enabled &value)
1242 {
1243 m_enabled = value;
1244 return *this;
1245 }
1246
1247 template<
1248 typename T,
1249 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
1251 {
1252 return m_enabled;
1253 }
1254
1255 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1257 {
1258 return m_enabled;
1259 }
1260
1262 template<typename F>
1263 void forEach(const F &f) const
1264 {
1265 f(m_enabled);
1266 }
1267
1269 template<typename F>
1270 void forEach(const F &f)
1271 {
1272 f(m_enabled);
1273 }
1274
1276 bool operator==(const Diagnostics &other) const;
1277
1279 bool operator!=(const Diagnostics &other) const;
1280
1282 std::string toString() const;
1283
1285 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
1286 {
1287 return stream << value.toString();
1288 }
1289
1290 private:
1291 void setFromString(const std::string &value);
1292
1293 void setFromString(const std::string &fullPath, const std::string &value);
1294
1295 std::string getString(const std::string &fullPath) const;
1296
1297 Enabled m_enabled;
1298
1299 friend struct DataModel::Detail::Befriend<Diagnostics>;
1300 };
1301
1304 {
1305 public:
1308
1310 static constexpr const char *path{ "Experimental" };
1311
1313 static constexpr const char *name{ "Experimental" };
1314
1316 static constexpr const char *description{
1317 R"description(Experimental features. These settings may be changed, renamed, moved or deleted in the future.)description"
1318 };
1319
1330 {
1331 public:
1334
1336 static constexpr const char *path{ "Experimental/Engine" };
1337
1339 static constexpr const char *name{ "Engine" };
1340
1342 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1343
1344The Phase Engine is the current default Zivid Vision Engine.
1345
1346The Stripe Engine uses anti-reflection technology to suppress interreflection artifacts
1347and improve data quality on shiny objects like cylinders and chrome-plated parts.
1348Additional acquisition and processing time are required for the Stripe Engine.
1349The Stripe Engine is currently experimental, and may be changed and improved in the future.
1350)description" };
1351
1353 enum class ValueType
1354 {
1355 phase,
1356 stripe
1357 };
1358 static const Engine phase;
1359 static const Engine stripe;
1360
1362 static std::set<ValueType> validValues()
1363 {
1364 return { ValueType::phase, ValueType::stripe };
1365 }
1366
1368 Engine() = default;
1369
1371 explicit constexpr Engine(ValueType value)
1372 : m_opt{ verifyValue(value) }
1373 {}
1374
1380
1382 bool hasValue() const;
1383
1385 void reset();
1386
1388 std::string toString() const;
1389
1391 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1392 {
1393 return stream << Engine{ value }.toString();
1394 }
1395
1397 bool operator==(const Engine &other) const
1398 {
1399 return m_opt == other.m_opt;
1400 }
1401
1403 bool operator!=(const Engine &other) const
1404 {
1405 return m_opt != other.m_opt;
1406 }
1407
1409 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1410 {
1411 return stream << value.toString();
1412 }
1413
1414 private:
1415 void setFromString(const std::string &value);
1416
1417 constexpr ValueType static verifyValue(const ValueType &value)
1418 {
1419 return value == ValueType::phase || value == ValueType::stripe
1420 ? value
1421 : throw std::invalid_argument{
1422 "Invalid value: Engine{ "
1423 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1424 };
1425 }
1426
1427 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1428
1429 friend struct DataModel::Detail::Befriend<Engine>;
1430 };
1431
1432 using Descendants = std::tuple<Settings::Experimental::Engine>;
1433
1436
1448#ifndef NO_DOC
1449 template<
1450 typename... Args,
1451 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1452 typename std::enable_if<
1453 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1454 value,
1455 int>::type = 0>
1456#else
1457 template<typename... Args>
1458#endif
1459 explicit Experimental(Args &&...args)
1460 {
1461 using namespace Zivid::Detail::TypeTraits;
1462
1463 static_assert(
1464 AllArgsDecayedAreUnique<Args...>::value,
1465 "Found duplicate types among the arguments passed to Experimental(...). "
1466 "Types should be listed at most once.");
1467
1468 set(std::forward<Args>(args)...);
1469 }
1470
1481#ifndef NO_DOC
1482 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1483#else
1484 template<typename... Args>
1485#endif
1486 void set(Args &&...args)
1487 {
1488 using namespace Zivid::Detail::TypeTraits;
1489
1490 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1491 static_assert(
1492 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1493
1494 static_assert(
1495 AllArgsDecayedAreUnique<Args...>::value,
1496 "Found duplicate types among the arguments passed to set(...). "
1497 "Types should be listed at most once.");
1498
1499 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1500 }
1501
1513#ifndef NO_DOC
1514 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1515#else
1516 template<typename... Args>
1517#endif
1518 Experimental copyWith(Args &&...args) const
1519 {
1520 using namespace Zivid::Detail::TypeTraits;
1521
1522 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1523 static_assert(
1524 AllArgsAreDescendantNodes::value,
1525 "All arguments passed to copyWith(...) must be descendant nodes.");
1526
1527 static_assert(
1528 AllArgsDecayedAreUnique<Args...>::value,
1529 "Found duplicate types among the arguments passed to copyWith(...). "
1530 "Types should be listed at most once.");
1531
1532 auto copy{ *this };
1533 copy.set(std::forward<Args>(args)...);
1534 return copy;
1535 }
1536
1538 const Engine &engine() const
1539 {
1540 return m_engine;
1541 }
1542
1545 {
1546 return m_engine;
1547 }
1548
1550 Experimental &set(const Engine &value)
1551 {
1552 m_engine = value;
1553 return *this;
1554 }
1555
1556 template<
1557 typename T,
1558 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
1560 {
1561 return m_engine;
1562 }
1563
1564 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1566 {
1567 return m_engine;
1568 }
1569
1571 template<typename F>
1572 void forEach(const F &f) const
1573 {
1574 f(m_engine);
1575 }
1576
1578 template<typename F>
1579 void forEach(const F &f)
1580 {
1581 f(m_engine);
1582 }
1583
1585 bool operator==(const Experimental &other) const;
1586
1588 bool operator!=(const Experimental &other) const;
1589
1591 std::string toString() const;
1592
1594 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
1595 {
1596 return stream << value.toString();
1597 }
1598
1599 private:
1600 void setFromString(const std::string &value);
1601
1602 void setFromString(const std::string &fullPath, const std::string &value);
1603
1604 std::string getString(const std::string &fullPath) const;
1605
1606 Engine m_engine;
1607
1608 friend struct DataModel::Detail::Befriend<Experimental>;
1609 };
1610
1613 {
1614 public:
1617
1619 static constexpr const char *path{ "Processing" };
1620
1622 static constexpr const char *name{ "Processing" };
1623
1625 static constexpr const char *description{
1626 R"description(Settings related to processing of a capture, including filters and color balance)description"
1627 };
1628
1631 {
1632 public:
1635
1637 static constexpr const char *path{ "Processing/Color" };
1638
1640 static constexpr const char *name{ "Color" };
1641
1643 static constexpr const char *description{ R"description(Color settings)description" };
1644
1647 {
1648 public:
1651
1653 static constexpr const char *path{ "Processing/Color/Balance" };
1654
1656 static constexpr const char *name{ "Balance" };
1657
1659 static constexpr const char *description{ R"description(Color balance settings)description" };
1660
1663 {
1664 public:
1667
1669 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1670
1672 static constexpr const char *name{ "Blue" };
1673
1675 static constexpr const char *description{
1676 R"description(Digital gain applied to blue channel)description"
1677 };
1678
1680 using ValueType = double;
1681
1683 static constexpr Range<double> validRange()
1684 {
1685 return { 1.0, 8.0 };
1686 }
1687
1689 Blue() = default;
1690
1692 explicit constexpr Blue(double value)
1693 : m_opt{ verifyValue(value) }
1694 {}
1695
1700 double value() const;
1701
1703 bool hasValue() const;
1704
1706 void reset();
1707
1709 std::string toString() const;
1710
1712 bool operator==(const Blue &other) const
1713 {
1714 return m_opt == other.m_opt;
1715 }
1716
1718 bool operator!=(const Blue &other) const
1719 {
1720 return m_opt != other.m_opt;
1721 }
1722
1724 bool operator<(const Blue &other) const
1725 {
1726 return m_opt < other.m_opt;
1727 }
1728
1730 bool operator>(const Blue &other) const
1731 {
1732 return m_opt > other.m_opt;
1733 }
1734
1736 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1737 {
1738 return stream << value.toString();
1739 }
1740
1741 private:
1742 void setFromString(const std::string &value);
1743
1744 constexpr ValueType static verifyValue(const ValueType &value)
1745 {
1746 return validRange().isInRange(value)
1747 ? value
1748 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1749 + " } is not in range ["
1750 + std::to_string(validRange().min()) + ", "
1751 + std::to_string(validRange().max()) + "]" };
1752 }
1753
1754 Zivid::DataModel::Detail::Optional<double> m_opt;
1755
1756 friend struct DataModel::Detail::Befriend<Blue>;
1757 };
1758
1761 {
1762 public:
1765
1767 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1768
1770 static constexpr const char *name{ "Green" };
1771
1773 static constexpr const char *description{
1774 R"description(Digital gain applied to green channel)description"
1775 };
1776
1778 using ValueType = double;
1779
1781 static constexpr Range<double> validRange()
1782 {
1783 return { 1.0, 8.0 };
1784 }
1785
1787 Green() = default;
1788
1790 explicit constexpr Green(double value)
1791 : m_opt{ verifyValue(value) }
1792 {}
1793
1798 double value() const;
1799
1801 bool hasValue() const;
1802
1804 void reset();
1805
1807 std::string toString() const;
1808
1810 bool operator==(const Green &other) const
1811 {
1812 return m_opt == other.m_opt;
1813 }
1814
1816 bool operator!=(const Green &other) const
1817 {
1818 return m_opt != other.m_opt;
1819 }
1820
1822 bool operator<(const Green &other) const
1823 {
1824 return m_opt < other.m_opt;
1825 }
1826
1828 bool operator>(const Green &other) const
1829 {
1830 return m_opt > other.m_opt;
1831 }
1832
1834 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1835 {
1836 return stream << value.toString();
1837 }
1838
1839 private:
1840 void setFromString(const std::string &value);
1841
1842 constexpr ValueType static verifyValue(const ValueType &value)
1843 {
1844 return validRange().isInRange(value)
1845 ? value
1846 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1847 + " } is not in range ["
1848 + std::to_string(validRange().min()) + ", "
1849 + std::to_string(validRange().max()) + "]" };
1850 }
1851
1852 Zivid::DataModel::Detail::Optional<double> m_opt;
1853
1854 friend struct DataModel::Detail::Befriend<Green>;
1855 };
1856
1859 {
1860 public:
1863
1865 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1866
1868 static constexpr const char *name{ "Red" };
1869
1871 static constexpr const char *description{
1872 R"description(Digital gain applied to red channel)description"
1873 };
1874
1876 using ValueType = double;
1877
1879 static constexpr Range<double> validRange()
1880 {
1881 return { 1.0, 8.0 };
1882 }
1883
1885 Red() = default;
1886
1888 explicit constexpr Red(double value)
1889 : m_opt{ verifyValue(value) }
1890 {}
1891
1896 double value() const;
1897
1899 bool hasValue() const;
1900
1902 void reset();
1903
1905 std::string toString() const;
1906
1908 bool operator==(const Red &other) const
1909 {
1910 return m_opt == other.m_opt;
1911 }
1912
1914 bool operator!=(const Red &other) const
1915 {
1916 return m_opt != other.m_opt;
1917 }
1918
1920 bool operator<(const Red &other) const
1921 {
1922 return m_opt < other.m_opt;
1923 }
1924
1926 bool operator>(const Red &other) const
1927 {
1928 return m_opt > other.m_opt;
1929 }
1930
1932 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1933 {
1934 return stream << value.toString();
1935 }
1936
1937 private:
1938 void setFromString(const std::string &value);
1939
1940 constexpr ValueType static verifyValue(const ValueType &value)
1941 {
1942 return validRange().isInRange(value)
1943 ? value
1944 : throw std::out_of_range{ "Red{ " + std::to_string(value)
1945 + " } is not in range ["
1946 + std::to_string(validRange().min()) + ", "
1947 + std::to_string(validRange().max()) + "]" };
1948 }
1949
1950 Zivid::DataModel::Detail::Optional<double> m_opt;
1951
1952 friend struct DataModel::Detail::Befriend<Red>;
1953 };
1954
1955 using Descendants = std::tuple<
1959
1962
1976#ifndef NO_DOC
1977 template<
1978 typename... Args,
1979 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1980 typename std::enable_if<
1981 Zivid::Detail::TypeTraits::
1982 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1983 int>::type = 0>
1984#else
1985 template<typename... Args>
1986#endif
1987 explicit Balance(Args &&...args)
1988 {
1989 using namespace Zivid::Detail::TypeTraits;
1990
1991 static_assert(
1992 AllArgsDecayedAreUnique<Args...>::value,
1993 "Found duplicate types among the arguments passed to Balance(...). "
1994 "Types should be listed at most once.");
1995
1996 set(std::forward<Args>(args)...);
1997 }
1998
2011#ifndef NO_DOC
2012 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2013#else
2014 template<typename... Args>
2015#endif
2016 void set(Args &&...args)
2017 {
2018 using namespace Zivid::Detail::TypeTraits;
2019
2020 using AllArgsAreDescendantNodes =
2021 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2022 static_assert(
2023 AllArgsAreDescendantNodes::value,
2024 "All arguments passed to set(...) must be descendant nodes.");
2025
2026 static_assert(
2027 AllArgsDecayedAreUnique<Args...>::value,
2028 "Found duplicate types among the arguments passed to set(...). "
2029 "Types should be listed at most once.");
2030
2031 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2032 }
2033
2047#ifndef NO_DOC
2048 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2049#else
2050 template<typename... Args>
2051#endif
2052 Balance copyWith(Args &&...args) const
2053 {
2054 using namespace Zivid::Detail::TypeTraits;
2055
2056 using AllArgsAreDescendantNodes =
2057 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2058 static_assert(
2059 AllArgsAreDescendantNodes::value,
2060 "All arguments passed to copyWith(...) must be descendant nodes.");
2061
2062 static_assert(
2063 AllArgsDecayedAreUnique<Args...>::value,
2064 "Found duplicate types among the arguments passed to copyWith(...). "
2065 "Types should be listed at most once.");
2066
2067 auto copy{ *this };
2068 copy.set(std::forward<Args>(args)...);
2069 return copy;
2070 }
2071
2073 const Blue &blue() const
2074 {
2075 return m_blue;
2076 }
2077
2080 {
2081 return m_blue;
2082 }
2083
2085 Balance &set(const Blue &value)
2086 {
2087 m_blue = value;
2088 return *this;
2089 }
2090
2092 const Green &green() const
2093 {
2094 return m_green;
2095 }
2096
2099 {
2100 return m_green;
2101 }
2102
2104 Balance &set(const Green &value)
2105 {
2106 m_green = value;
2107 return *this;
2108 }
2109
2111 const Red &red() const
2112 {
2113 return m_red;
2114 }
2115
2118 {
2119 return m_red;
2120 }
2121
2123 Balance &set(const Red &value)
2124 {
2125 m_red = value;
2126 return *this;
2127 }
2128
2129 template<
2130 typename T,
2131 typename std::enable_if<
2132 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2133 int>::type = 0>
2135 {
2136 return m_blue;
2137 }
2138
2139 template<
2140 typename T,
2141 typename std::enable_if<
2142 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2143 int>::type = 0>
2145 {
2146 return m_green;
2147 }
2148
2149 template<
2150 typename T,
2151 typename std::
2152 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2154 {
2155 return m_red;
2156 }
2157
2158 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2160 {
2161 return m_blue;
2162 }
2163
2164 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2166 {
2167 return m_green;
2168 }
2169
2170 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2172 {
2173 return m_red;
2174 }
2175
2177 template<typename F>
2178 void forEach(const F &f) const
2179 {
2180 f(m_blue);
2181 f(m_green);
2182 f(m_red);
2183 }
2184
2186 template<typename F>
2187 void forEach(const F &f)
2188 {
2189 f(m_blue);
2190 f(m_green);
2191 f(m_red);
2192 }
2193
2195 bool operator==(const Balance &other) const;
2196
2198 bool operator!=(const Balance &other) const;
2199
2201 std::string toString() const;
2202
2204 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2205 {
2206 return stream << value.toString();
2207 }
2208
2209 private:
2210 void setFromString(const std::string &value);
2211
2212 void setFromString(const std::string &fullPath, const std::string &value);
2213
2214 std::string getString(const std::string &fullPath) const;
2215
2216 Blue m_blue;
2217 Green m_green;
2218 Red m_red;
2219
2220 friend struct DataModel::Detail::Befriend<Balance>;
2221 };
2222
2225 {
2226 public:
2229
2231 static constexpr const char *path{ "Processing/Color/Experimental" };
2232
2234 static constexpr const char *name{ "Experimental" };
2235
2237 static constexpr const char *description{
2238 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2239 };
2240
2243 {
2244 public:
2247
2249 static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping" };
2250
2252 static constexpr const char *name{ "ToneMapping" };
2253
2255 static constexpr const char *description{ R"description(Tonemapping settings.)description" };
2256
2267 {
2268 public:
2271
2273 static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping/Enabled" };
2274
2276 static constexpr const char *name{ "Enabled" };
2277
2279 static constexpr const char *description{
2280 R"description(This setting controls when tone mapping of colors is performed. Tone mapping will normalize
2281the captured color image to the full available output range by applying a gain factor to the
2282colors. For single-captures this can be used to brighten dark images. For HDR captures this
2283is required to map high-dynamic-range colors to the more limited dynamic range output.
2284
2285This setting has two possible values. `Always` will perform tone-mapping for all captures.
2286`HdrOnly` will perform tone mapping for HDR captures but not for single-captures. It is not
2287possible to disable tone mapping for HDR captures.
2288)description"
2289 };
2290
2292 enum class ValueType
2293 {
2294 always,
2295 hdrOnly
2296 };
2297 static const Enabled always;
2298 static const Enabled hdrOnly;
2299
2301 static std::set<ValueType> validValues()
2302 {
2303 return { ValueType::always, ValueType::hdrOnly };
2304 }
2305
2307 Enabled() = default;
2308
2310 explicit constexpr Enabled(ValueType value)
2311 : m_opt{ verifyValue(value) }
2312 {}
2313
2319
2321 bool hasValue() const;
2322
2324 void reset();
2325
2327 std::string toString() const;
2328
2330 friend std::ostream &operator<<(std::ostream &stream, const Enabled::ValueType &value)
2331 {
2332 return stream << Enabled{ value }.toString();
2333 }
2334
2336 bool operator==(const Enabled &other) const
2337 {
2338 return m_opt == other.m_opt;
2339 }
2340
2342 bool operator!=(const Enabled &other) const
2343 {
2344 return m_opt != other.m_opt;
2345 }
2346
2348 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
2349 {
2350 return stream << value.toString();
2351 }
2352
2353 private:
2354 void setFromString(const std::string &value);
2355
2356 constexpr ValueType static verifyValue(const ValueType &value)
2357 {
2358 return value == ValueType::always || value == ValueType::hdrOnly
2359 ? value
2360 : throw std::invalid_argument{
2361 "Invalid value: Enabled{ "
2362 + std::to_string(
2363 static_cast<std::underlying_type<ValueType>::type>(value))
2364 + " }"
2365 };
2366 }
2367
2368 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2369
2370 friend struct DataModel::Detail::Befriend<Enabled>;
2371 };
2372
2373 using Descendants = std::tuple<Settings::Processing::Color::Experimental::ToneMapping::Enabled>;
2374
2377
2389#ifndef NO_DOC
2390 template<
2391 typename... Args,
2392 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2393 typename std::enable_if<
2394 Zivid::Detail::TypeTraits::
2395 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2396 int>::type = 0>
2397#else
2398 template<typename... Args>
2399#endif
2400 explicit ToneMapping(Args &&...args)
2401 {
2402 using namespace Zivid::Detail::TypeTraits;
2403
2404 static_assert(
2405 AllArgsDecayedAreUnique<Args...>::value,
2406 "Found duplicate types among the arguments passed to ToneMapping(...). "
2407 "Types should be listed at most once.");
2408
2409 set(std::forward<Args>(args)...);
2410 }
2411
2422#ifndef NO_DOC
2423 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2424#else
2425 template<typename... Args>
2426#endif
2427 void set(Args &&...args)
2428 {
2429 using namespace Zivid::Detail::TypeTraits;
2430
2431 using AllArgsAreDescendantNodes =
2432 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2433 static_assert(
2434 AllArgsAreDescendantNodes::value,
2435 "All arguments passed to set(...) must be descendant nodes.");
2436
2437 static_assert(
2438 AllArgsDecayedAreUnique<Args...>::value,
2439 "Found duplicate types among the arguments passed to set(...). "
2440 "Types should be listed at most once.");
2441
2442 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2443 }
2444
2456#ifndef NO_DOC
2457 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2458#else
2459 template<typename... Args>
2460#endif
2461 ToneMapping copyWith(Args &&...args) const
2462 {
2463 using namespace Zivid::Detail::TypeTraits;
2464
2465 using AllArgsAreDescendantNodes =
2466 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2467 static_assert(
2468 AllArgsAreDescendantNodes::value,
2469 "All arguments passed to copyWith(...) must be descendant nodes.");
2470
2471 static_assert(
2472 AllArgsDecayedAreUnique<Args...>::value,
2473 "Found duplicate types among the arguments passed to copyWith(...). "
2474 "Types should be listed at most once.");
2475
2476 auto copy{ *this };
2477 copy.set(std::forward<Args>(args)...);
2478 return copy;
2479 }
2480
2482 const Enabled &isEnabled() const
2483 {
2484 return m_enabled;
2485 }
2486
2489 {
2490 return m_enabled;
2491 }
2492
2494 ToneMapping &set(const Enabled &value)
2495 {
2496 m_enabled = value;
2497 return *this;
2498 }
2499
2500 template<
2501 typename T,
2502 typename std::enable_if<
2503 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2504 int>::type = 0>
2506 {
2507 return m_enabled;
2508 }
2509
2510 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2512 {
2513 return m_enabled;
2514 }
2515
2517 template<typename F>
2518 void forEach(const F &f) const
2519 {
2520 f(m_enabled);
2521 }
2522
2524 template<typename F>
2525 void forEach(const F &f)
2526 {
2527 f(m_enabled);
2528 }
2529
2531 bool operator==(const ToneMapping &other) const;
2532
2534 bool operator!=(const ToneMapping &other) const;
2535
2537 std::string toString() const;
2538
2540 friend std::ostream &operator<<(std::ostream &stream, const ToneMapping &value)
2541 {
2542 return stream << value.toString();
2543 }
2544
2545 private:
2546 void setFromString(const std::string &value);
2547
2548 void setFromString(const std::string &fullPath, const std::string &value);
2549
2550 std::string getString(const std::string &fullPath) const;
2551
2552 Enabled m_enabled;
2553
2554 friend struct DataModel::Detail::Befriend<ToneMapping>;
2555 };
2556
2557 using Descendants = std::tuple<
2560
2563
2576#ifndef NO_DOC
2577 template<
2578 typename... Args,
2579 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2580 typename std::enable_if<
2581 Zivid::Detail::TypeTraits::
2582 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2583 int>::type = 0>
2584#else
2585 template<typename... Args>
2586#endif
2587 explicit Experimental(Args &&...args)
2588 {
2589 using namespace Zivid::Detail::TypeTraits;
2590
2591 static_assert(
2592 AllArgsDecayedAreUnique<Args...>::value,
2593 "Found duplicate types among the arguments passed to Experimental(...). "
2594 "Types should be listed at most once.");
2595
2596 set(std::forward<Args>(args)...);
2597 }
2598
2610#ifndef NO_DOC
2611 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2612#else
2613 template<typename... Args>
2614#endif
2615 void set(Args &&...args)
2616 {
2617 using namespace Zivid::Detail::TypeTraits;
2618
2619 using AllArgsAreDescendantNodes =
2620 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2621 static_assert(
2622 AllArgsAreDescendantNodes::value,
2623 "All arguments passed to set(...) must be descendant nodes.");
2624
2625 static_assert(
2626 AllArgsDecayedAreUnique<Args...>::value,
2627 "Found duplicate types among the arguments passed to set(...). "
2628 "Types should be listed at most once.");
2629
2630 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2631 }
2632
2645#ifndef NO_DOC
2646 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2647#else
2648 template<typename... Args>
2649#endif
2650 Experimental copyWith(Args &&...args) const
2651 {
2652 using namespace Zivid::Detail::TypeTraits;
2653
2654 using AllArgsAreDescendantNodes =
2655 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2656 static_assert(
2657 AllArgsAreDescendantNodes::value,
2658 "All arguments passed to copyWith(...) must be descendant nodes.");
2659
2660 static_assert(
2661 AllArgsDecayedAreUnique<Args...>::value,
2662 "Found duplicate types among the arguments passed to copyWith(...). "
2663 "Types should be listed at most once.");
2664
2665 auto copy{ *this };
2666 copy.set(std::forward<Args>(args)...);
2667 return copy;
2668 }
2669
2672 {
2673 return m_toneMapping;
2674 }
2675
2678 {
2679 return m_toneMapping;
2680 }
2681
2684 {
2685 m_toneMapping = value;
2686 return *this;
2687 }
2688
2691 {
2692 m_toneMapping.set(value);
2693 return *this;
2694 }
2695
2696 template<
2697 typename T,
2698 typename std::enable_if<
2699 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
2700 int>::type = 0>
2702 {
2703 return m_toneMapping;
2704 }
2705
2706 template<
2707 typename T,
2708 typename std::enable_if<
2709 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2710 int>::type = 0>
2712 {
2714 }
2715
2716 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2718 {
2719 return m_toneMapping;
2720 }
2721
2723 template<typename F>
2724 void forEach(const F &f) const
2725 {
2726 f(m_toneMapping);
2727 }
2728
2730 template<typename F>
2731 void forEach(const F &f)
2732 {
2733 f(m_toneMapping);
2734 }
2735
2737 bool operator==(const Experimental &other) const;
2738
2740 bool operator!=(const Experimental &other) const;
2741
2743 std::string toString() const;
2744
2746 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2747 {
2748 return stream << value.toString();
2749 }
2750
2751 private:
2752 void setFromString(const std::string &value);
2753
2754 void setFromString(const std::string &fullPath, const std::string &value);
2755
2756 std::string getString(const std::string &fullPath) const;
2757
2758 ToneMapping m_toneMapping;
2759
2760 friend struct DataModel::Detail::Befriend<Experimental>;
2761 };
2762
2767 {
2768 public:
2771
2773 static constexpr const char *path{ "Processing/Color/Gamma" };
2774
2776 static constexpr const char *name{ "Gamma" };
2777
2779 static constexpr const char *description{
2780 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2781greater than 1 makes the colors darker.
2782)description"
2783 };
2784
2786 using ValueType = double;
2787
2789 static constexpr Range<double> validRange()
2790 {
2791 return { 0.25, 1.5 };
2792 }
2793
2795 Gamma() = default;
2796
2798 explicit constexpr Gamma(double value)
2799 : m_opt{ verifyValue(value) }
2800 {}
2801
2806 double value() const;
2807
2809 bool hasValue() const;
2810
2812 void reset();
2813
2815 std::string toString() const;
2816
2818 bool operator==(const Gamma &other) const
2819 {
2820 return m_opt == other.m_opt;
2821 }
2822
2824 bool operator!=(const Gamma &other) const
2825 {
2826 return m_opt != other.m_opt;
2827 }
2828
2830 bool operator<(const Gamma &other) const
2831 {
2832 return m_opt < other.m_opt;
2833 }
2834
2836 bool operator>(const Gamma &other) const
2837 {
2838 return m_opt > other.m_opt;
2839 }
2840
2842 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2843 {
2844 return stream << value.toString();
2845 }
2846
2847 private:
2848 void setFromString(const std::string &value);
2849
2850 constexpr ValueType static verifyValue(const ValueType &value)
2851 {
2852 return validRange().isInRange(value)
2853 ? value
2854 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2855 + std::to_string(validRange().min()) + ", "
2856 + std::to_string(validRange().max()) + "]" };
2857 }
2858
2859 Zivid::DataModel::Detail::Optional<double> m_opt;
2860
2861 friend struct DataModel::Detail::Befriend<Gamma>;
2862 };
2863
2864 using Descendants = std::tuple<
2873
2876
2895#ifndef NO_DOC
2896 template<
2897 typename... Args,
2898 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2899 typename std::enable_if<
2900 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2901 value,
2902 int>::type = 0>
2903#else
2904 template<typename... Args>
2905#endif
2906 explicit Color(Args &&...args)
2907 {
2908 using namespace Zivid::Detail::TypeTraits;
2909
2910 static_assert(
2911 AllArgsDecayedAreUnique<Args...>::value,
2912 "Found duplicate types among the arguments passed to Color(...). "
2913 "Types should be listed at most once.");
2914
2915 set(std::forward<Args>(args)...);
2916 }
2917
2935#ifndef NO_DOC
2936 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2937#else
2938 template<typename... Args>
2939#endif
2940 void set(Args &&...args)
2941 {
2942 using namespace Zivid::Detail::TypeTraits;
2943
2944 using AllArgsAreDescendantNodes =
2945 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2946 static_assert(
2947 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2948
2949 static_assert(
2950 AllArgsDecayedAreUnique<Args...>::value,
2951 "Found duplicate types among the arguments passed to set(...). "
2952 "Types should be listed at most once.");
2953
2954 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2955 }
2956
2975#ifndef NO_DOC
2976 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2977#else
2978 template<typename... Args>
2979#endif
2980 Color copyWith(Args &&...args) const
2981 {
2982 using namespace Zivid::Detail::TypeTraits;
2983
2984 using AllArgsAreDescendantNodes =
2985 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2986 static_assert(
2987 AllArgsAreDescendantNodes::value,
2988 "All arguments passed to copyWith(...) must be descendant nodes.");
2989
2990 static_assert(
2991 AllArgsDecayedAreUnique<Args...>::value,
2992 "Found duplicate types among the arguments passed to copyWith(...). "
2993 "Types should be listed at most once.");
2994
2995 auto copy{ *this };
2996 copy.set(std::forward<Args>(args)...);
2997 return copy;
2998 }
2999
3001 const Balance &balance() const
3002 {
3003 return m_balance;
3004 }
3005
3008 {
3009 return m_balance;
3010 }
3011
3013 Color &set(const Balance &value)
3014 {
3015 m_balance = value;
3016 return *this;
3017 }
3018
3020 Color &set(const Balance::Blue &value)
3021 {
3022 m_balance.set(value);
3023 return *this;
3024 }
3025
3027 Color &set(const Balance::Green &value)
3028 {
3029 m_balance.set(value);
3030 return *this;
3031 }
3032
3034 Color &set(const Balance::Red &value)
3035 {
3036 m_balance.set(value);
3037 return *this;
3038 }
3039
3042 {
3043 return m_experimental;
3044 }
3045
3048 {
3049 return m_experimental;
3050 }
3051
3053 Color &set(const Experimental &value)
3054 {
3055 m_experimental = value;
3056 return *this;
3057 }
3058
3061 {
3062 m_experimental.set(value);
3063 return *this;
3064 }
3065
3068 {
3069 m_experimental.set(value);
3070 return *this;
3071 }
3072
3074 const Gamma &gamma() const
3075 {
3076 return m_gamma;
3077 }
3078
3081 {
3082 return m_gamma;
3083 }
3084
3086 Color &set(const Gamma &value)
3087 {
3088 m_gamma = value;
3089 return *this;
3090 }
3091
3092 template<
3093 typename T,
3094 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
3095 0>
3097 {
3098 return m_balance;
3099 }
3100
3101 template<
3102 typename T,
3103 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
3104 type = 0>
3106 {
3107 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
3108 }
3109
3110 template<
3111 typename T,
3112 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
3113 type = 0>
3115 {
3116 return m_balance.get<Settings::Processing::Color::Balance::Green>();
3117 }
3118
3119 template<
3120 typename T,
3121 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
3122 type = 0>
3124 {
3125 return m_balance.get<Settings::Processing::Color::Balance::Red>();
3126 }
3127
3128 template<
3129 typename T,
3130 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
3131 type = 0>
3133 {
3134 return m_experimental;
3135 }
3136
3137 template<
3138 typename T,
3139 typename std::enable_if<
3140 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
3141 int>::type = 0>
3143 {
3145 }
3146
3147 template<
3148 typename T,
3149 typename std::enable_if<
3150 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
3151 int>::type = 0>
3153 {
3155 }
3156
3157 template<
3158 typename T,
3159 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
3161 {
3162 return m_gamma;
3163 }
3164
3165 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3167 {
3168 return m_balance;
3169 }
3170
3171 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3173 {
3174 return m_experimental;
3175 }
3176
3177 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3179 {
3180 return m_gamma;
3181 }
3182
3184 template<typename F>
3185 void forEach(const F &f) const
3186 {
3187 f(m_balance);
3188 f(m_experimental);
3189 f(m_gamma);
3190 }
3191
3193 template<typename F>
3194 void forEach(const F &f)
3195 {
3196 f(m_balance);
3197 f(m_experimental);
3198 f(m_gamma);
3199 }
3200
3202 bool operator==(const Color &other) const;
3203
3205 bool operator!=(const Color &other) const;
3206
3208 std::string toString() const;
3209
3211 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
3212 {
3213 return stream << value.toString();
3214 }
3215
3216 private:
3217 void setFromString(const std::string &value);
3218
3219 void setFromString(const std::string &fullPath, const std::string &value);
3220
3221 std::string getString(const std::string &fullPath) const;
3222
3223 Balance m_balance;
3224 Experimental m_experimental;
3225 Gamma m_gamma;
3226
3227 friend struct DataModel::Detail::Befriend<Color>;
3228 };
3229
3232 {
3233 public:
3236
3238 static constexpr const char *path{ "Processing/Filters" };
3239
3241 static constexpr const char *name{ "Filters" };
3242
3244 static constexpr const char *description{ R"description(Filters)description" };
3245
3248 {
3249 public:
3252
3254 static constexpr const char *path{ "Processing/Filters/Experimental" };
3255
3257 static constexpr const char *name{ "Experimental" };
3258
3260 static constexpr const char *description{
3261 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
3262 };
3263
3270 {
3271 public:
3274
3276 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
3277
3279 static constexpr const char *name{ "ContrastDistortion" };
3280
3282 static constexpr const char *description{
3283 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
3284or high contrast. These artifacts are caused by blurring in the lens. The filter
3285works best when aperture values are chosen such that the camera has quite good focus.
3286The filter also supports removing the points that experience a large correction.
3287)description"
3288 };
3289
3292 {
3293 public:
3296
3298 static constexpr const char *path{
3299 "Processing/Filters/Experimental/ContrastDistortion/Correction"
3300 };
3301
3303 static constexpr const char *name{ "Correction" };
3304
3306 static constexpr const char *description{ R"description(Correction)description" };
3307
3310 {
3311 public:
3314
3316 static constexpr const char *path{
3317 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
3318 };
3319
3321 static constexpr const char *name{ "Enabled" };
3322
3324 static constexpr const char *description{ R"description(Enabled)description" };
3325
3327 using ValueType = bool;
3328 static const Enabled yes;
3329 static const Enabled no;
3330
3332 static std::set<bool> validValues()
3333 {
3334 return { false, true };
3335 }
3336
3338 Enabled() = default;
3339
3341 explicit constexpr Enabled(bool value)
3342 : m_opt{ value }
3343 {}
3344
3349 bool value() const;
3350
3352 bool hasValue() const;
3353
3355 void reset();
3356
3358 std::string toString() const;
3359
3361 bool operator==(const Enabled &other) const
3362 {
3363 return m_opt == other.m_opt;
3364 }
3365
3367 bool operator!=(const Enabled &other) const
3368 {
3369 return m_opt != other.m_opt;
3370 }
3371
3373 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3374 {
3375 return stream << value.toString();
3376 }
3377
3378 private:
3379 void setFromString(const std::string &value);
3380
3381 Zivid::DataModel::Detail::Optional<bool> m_opt;
3382
3383 friend struct DataModel::Detail::Befriend<Enabled>;
3384 };
3385
3388 {
3389 public:
3392
3394 static constexpr const char *path{
3395 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
3396 };
3397
3399 static constexpr const char *name{ "Strength" };
3400
3402 static constexpr const char *description{
3403 R"description(Higher values gives more correction.)description"
3404 };
3405
3407 using ValueType = double;
3408
3410 static constexpr Range<double> validRange()
3411 {
3412 return { 0.0, 1.0 };
3413 }
3414
3416 Strength() = default;
3417
3419 explicit constexpr Strength(double value)
3420 : m_opt{ verifyValue(value) }
3421 {}
3422
3427 double value() const;
3428
3430 bool hasValue() const;
3431
3433 void reset();
3434
3436 std::string toString() const;
3437
3439 bool operator==(const Strength &other) const
3440 {
3441 return m_opt == other.m_opt;
3442 }
3443
3445 bool operator!=(const Strength &other) const
3446 {
3447 return m_opt != other.m_opt;
3448 }
3449
3451 bool operator<(const Strength &other) const
3452 {
3453 return m_opt < other.m_opt;
3454 }
3455
3457 bool operator>(const Strength &other) const
3458 {
3459 return m_opt > other.m_opt;
3460 }
3461
3463 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
3464 {
3465 return stream << value.toString();
3466 }
3467
3468 private:
3469 void setFromString(const std::string &value);
3470
3471 constexpr ValueType static verifyValue(const ValueType &value)
3472 {
3473 return validRange().isInRange(value)
3474 ? value
3475 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
3476 + " } is not in range ["
3477 + std::to_string(validRange().min()) + ", "
3478 + std::to_string(validRange().max()) + "]" };
3479 }
3480
3481 Zivid::DataModel::Detail::Optional<double> m_opt;
3482
3483 friend struct DataModel::Detail::Befriend<Strength>;
3484 };
3485
3486 using Descendants = std::tuple<
3489
3492
3505#ifndef NO_DOC
3506 template<
3507 typename... Args,
3508 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3509 typename std::enable_if<
3510 Zivid::Detail::TypeTraits::
3511 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3512 int>::type = 0>
3513#else
3514 template<typename... Args>
3515#endif
3516 explicit Correction(Args &&...args)
3517 {
3518 using namespace Zivid::Detail::TypeTraits;
3519
3520 static_assert(
3521 AllArgsDecayedAreUnique<Args...>::value,
3522 "Found duplicate types among the arguments passed to Correction(...). "
3523 "Types should be listed at most once.");
3524
3525 set(std::forward<Args>(args)...);
3526 }
3527
3539#ifndef NO_DOC
3540 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3541#else
3542 template<typename... Args>
3543#endif
3544 void set(Args &&...args)
3545 {
3546 using namespace Zivid::Detail::TypeTraits;
3547
3548 using AllArgsAreDescendantNodes =
3549 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3550 static_assert(
3551 AllArgsAreDescendantNodes::value,
3552 "All arguments passed to set(...) must be descendant nodes.");
3553
3554 static_assert(
3555 AllArgsDecayedAreUnique<Args...>::value,
3556 "Found duplicate types among the arguments passed to set(...). "
3557 "Types should be listed at most once.");
3558
3559 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3560 }
3561
3574#ifndef NO_DOC
3575 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3576#else
3577 template<typename... Args>
3578#endif
3579 Correction copyWith(Args &&...args) const
3580 {
3581 using namespace Zivid::Detail::TypeTraits;
3582
3583 using AllArgsAreDescendantNodes =
3584 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3585 static_assert(
3586 AllArgsAreDescendantNodes::value,
3587 "All arguments passed to copyWith(...) must be descendant nodes.");
3588
3589 static_assert(
3590 AllArgsDecayedAreUnique<Args...>::value,
3591 "Found duplicate types among the arguments passed to copyWith(...). "
3592 "Types should be listed at most once.");
3593
3594 auto copy{ *this };
3595 copy.set(std::forward<Args>(args)...);
3596 return copy;
3597 }
3598
3600 const Enabled &isEnabled() const
3601 {
3602 return m_enabled;
3603 }
3604
3607 {
3608 return m_enabled;
3609 }
3610
3612 Correction &set(const Enabled &value)
3613 {
3614 m_enabled = value;
3615 return *this;
3616 }
3617
3619 const Strength &strength() const
3620 {
3621 return m_strength;
3622 }
3623
3626 {
3627 return m_strength;
3628 }
3629
3631 Correction &set(const Strength &value)
3632 {
3633 m_strength = value;
3634 return *this;
3635 }
3636
3637 template<
3638 typename T,
3639 typename std::enable_if<
3640 std::is_same<
3641 T,
3642 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
3643 Enabled>::value,
3644 int>::type = 0>
3646 get() const
3647 {
3648 return m_enabled;
3649 }
3650
3651 template<
3652 typename T,
3653 typename std::enable_if<
3654 std::is_same<
3655 T,
3656 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
3657 Strength>::value,
3658 int>::type = 0>
3660 &
3661 get() const
3662 {
3663 return m_strength;
3664 }
3665
3666 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3668 get() const
3669 {
3670 return m_enabled;
3671 }
3672
3673 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3675 &
3676 get() const
3677 {
3678 return m_strength;
3679 }
3680
3682 template<typename F>
3683 void forEach(const F &f) const
3684 {
3685 f(m_enabled);
3686 f(m_strength);
3687 }
3688
3690 template<typename F>
3691 void forEach(const F &f)
3692 {
3693 f(m_enabled);
3694 f(m_strength);
3695 }
3696
3698 bool operator==(const Correction &other) const;
3699
3701 bool operator!=(const Correction &other) const;
3702
3704 std::string toString() const;
3705
3707 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
3708 {
3709 return stream << value.toString();
3710 }
3711
3712 private:
3713 void setFromString(const std::string &value);
3714
3715 void setFromString(const std::string &fullPath, const std::string &value);
3716
3717 std::string getString(const std::string &fullPath) const;
3718
3719 Enabled m_enabled;
3720 Strength m_strength;
3721
3722 friend struct DataModel::Detail::Befriend<Correction>;
3723 };
3724
3727 {
3728 public:
3731
3733 static constexpr const char *path{
3734 "Processing/Filters/Experimental/ContrastDistortion/Removal"
3735 };
3736
3738 static constexpr const char *name{ "Removal" };
3739
3741 static constexpr const char *description{ R"description(Removal)description" };
3742
3745 {
3746 public:
3749
3751 static constexpr const char *path{
3752 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
3753 };
3754
3756 static constexpr const char *name{ "Enabled" };
3757
3759 static constexpr const char *description{ R"description(Enabled)description" };
3760
3762 using ValueType = bool;
3763 static const Enabled yes;
3764 static const Enabled no;
3765
3767 static std::set<bool> validValues()
3768 {
3769 return { false, true };
3770 }
3771
3773 Enabled() = default;
3774
3776 explicit constexpr Enabled(bool value)
3777 : m_opt{ value }
3778 {}
3779
3784 bool value() const;
3785
3787 bool hasValue() const;
3788
3790 void reset();
3791
3793 std::string toString() const;
3794
3796 bool operator==(const Enabled &other) const
3797 {
3798 return m_opt == other.m_opt;
3799 }
3800
3802 bool operator!=(const Enabled &other) const
3803 {
3804 return m_opt != other.m_opt;
3805 }
3806
3808 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3809 {
3810 return stream << value.toString();
3811 }
3812
3813 private:
3814 void setFromString(const std::string &value);
3815
3816 Zivid::DataModel::Detail::Optional<bool> m_opt;
3817
3818 friend struct DataModel::Detail::Befriend<Enabled>;
3819 };
3820
3823 {
3824 public:
3827
3829 static constexpr const char *path{
3830 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
3831 };
3832
3834 static constexpr const char *name{ "Threshold" };
3835
3837 static constexpr const char *description{
3838 R"description(Higher values remove more points.)description"
3839 };
3840
3842 using ValueType = double;
3843
3845 static constexpr Range<double> validRange()
3846 {
3847 return { 0.0, 1.0 };
3848 }
3849
3851 Threshold() = default;
3852
3854 explicit constexpr Threshold(double value)
3855 : m_opt{ verifyValue(value) }
3856 {}
3857
3862 double value() const;
3863
3865 bool hasValue() const;
3866
3868 void reset();
3869
3871 std::string toString() const;
3872
3874 bool operator==(const Threshold &other) const
3875 {
3876 return m_opt == other.m_opt;
3877 }
3878
3880 bool operator!=(const Threshold &other) const
3881 {
3882 return m_opt != other.m_opt;
3883 }
3884
3886 bool operator<(const Threshold &other) const
3887 {
3888 return m_opt < other.m_opt;
3889 }
3890
3892 bool operator>(const Threshold &other) const
3893 {
3894 return m_opt > other.m_opt;
3895 }
3896
3898 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
3899 {
3900 return stream << value.toString();
3901 }
3902
3903 private:
3904 void setFromString(const std::string &value);
3905
3906 constexpr ValueType static verifyValue(const ValueType &value)
3907 {
3908 return validRange().isInRange(value)
3909 ? value
3910 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
3911 + " } is not in range ["
3912 + std::to_string(validRange().min()) + ", "
3913 + std::to_string(validRange().max()) + "]" };
3914 }
3915
3916 Zivid::DataModel::Detail::Optional<double> m_opt;
3917
3918 friend struct DataModel::Detail::Befriend<Threshold>;
3919 };
3920
3921 using Descendants = std::tuple<
3924
3927
3940#ifndef NO_DOC
3941 template<
3942 typename... Args,
3943 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3944 typename std::enable_if<
3945 Zivid::Detail::TypeTraits::
3946 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3947 int>::type = 0>
3948#else
3949 template<typename... Args>
3950#endif
3951 explicit Removal(Args &&...args)
3952 {
3953 using namespace Zivid::Detail::TypeTraits;
3954
3955 static_assert(
3956 AllArgsDecayedAreUnique<Args...>::value,
3957 "Found duplicate types among the arguments passed to Removal(...). "
3958 "Types should be listed at most once.");
3959
3960 set(std::forward<Args>(args)...);
3961 }
3962
3974#ifndef NO_DOC
3975 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3976#else
3977 template<typename... Args>
3978#endif
3979 void set(Args &&...args)
3980 {
3981 using namespace Zivid::Detail::TypeTraits;
3982
3983 using AllArgsAreDescendantNodes =
3984 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3985 static_assert(
3986 AllArgsAreDescendantNodes::value,
3987 "All arguments passed to set(...) must be descendant nodes.");
3988
3989 static_assert(
3990 AllArgsDecayedAreUnique<Args...>::value,
3991 "Found duplicate types among the arguments passed to set(...). "
3992 "Types should be listed at most once.");
3993
3994 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3995 }
3996
4009#ifndef NO_DOC
4010 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4011#else
4012 template<typename... Args>
4013#endif
4014 Removal copyWith(Args &&...args) const
4015 {
4016 using namespace Zivid::Detail::TypeTraits;
4017
4018 using AllArgsAreDescendantNodes =
4019 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4020 static_assert(
4021 AllArgsAreDescendantNodes::value,
4022 "All arguments passed to copyWith(...) must be descendant nodes.");
4023
4024 static_assert(
4025 AllArgsDecayedAreUnique<Args...>::value,
4026 "Found duplicate types among the arguments passed to copyWith(...). "
4027 "Types should be listed at most once.");
4028
4029 auto copy{ *this };
4030 copy.set(std::forward<Args>(args)...);
4031 return copy;
4032 }
4033
4035 const Enabled &isEnabled() const
4036 {
4037 return m_enabled;
4038 }
4039
4042 {
4043 return m_enabled;
4044 }
4045
4047 Removal &set(const Enabled &value)
4048 {
4049 m_enabled = value;
4050 return *this;
4051 }
4052
4054 const Threshold &threshold() const
4055 {
4056 return m_threshold;
4057 }
4058
4061 {
4062 return m_threshold;
4063 }
4064
4066 Removal &set(const Threshold &value)
4067 {
4068 m_threshold = value;
4069 return *this;
4070 }
4071
4072 template<
4073 typename T,
4074 typename std::enable_if<
4075 std::is_same<
4076 T,
4077 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4078 Enabled>::value,
4079 int>::type = 0>
4081 get() const
4082 {
4083 return m_enabled;
4084 }
4085
4086 template<
4087 typename T,
4088 typename std::enable_if<
4089 std::is_same<
4090 T,
4091 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4092 Threshold>::value,
4093 int>::type = 0>
4095 get() const
4096 {
4097 return m_threshold;
4098 }
4099
4100 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4102 get() const
4103 {
4104 return m_enabled;
4105 }
4106
4107 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4109 get() const
4110 {
4111 return m_threshold;
4112 }
4113
4115 template<typename F>
4116 void forEach(const F &f) const
4117 {
4118 f(m_enabled);
4119 f(m_threshold);
4120 }
4121
4123 template<typename F>
4124 void forEach(const F &f)
4125 {
4126 f(m_enabled);
4127 f(m_threshold);
4128 }
4129
4131 bool operator==(const Removal &other) const;
4132
4134 bool operator!=(const Removal &other) const;
4135
4137 std::string toString() const;
4138
4140 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4141 {
4142 return stream << value.toString();
4143 }
4144
4145 private:
4146 void setFromString(const std::string &value);
4147
4148 void setFromString(const std::string &fullPath, const std::string &value);
4149
4150 std::string getString(const std::string &fullPath) const;
4151
4152 Enabled m_enabled;
4153 Threshold m_threshold;
4154
4155 friend struct DataModel::Detail::Befriend<Removal>;
4156 };
4157
4158 using Descendants = std::tuple<
4165
4168
4185#ifndef NO_DOC
4186 template<
4187 typename... Args,
4188 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4189 typename std::enable_if<
4190 Zivid::Detail::TypeTraits::
4191 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4192 int>::type = 0>
4193#else
4194 template<typename... Args>
4195#endif
4196 explicit ContrastDistortion(Args &&...args)
4197 {
4198 using namespace Zivid::Detail::TypeTraits;
4199
4200 static_assert(
4201 AllArgsDecayedAreUnique<Args...>::value,
4202 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
4203 "Types should be listed at most once.");
4204
4205 set(std::forward<Args>(args)...);
4206 }
4207
4223#ifndef NO_DOC
4224 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4225#else
4226 template<typename... Args>
4227#endif
4228 void set(Args &&...args)
4229 {
4230 using namespace Zivid::Detail::TypeTraits;
4231
4232 using AllArgsAreDescendantNodes =
4233 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4234 static_assert(
4235 AllArgsAreDescendantNodes::value,
4236 "All arguments passed to set(...) must be descendant nodes.");
4237
4238 static_assert(
4239 AllArgsDecayedAreUnique<Args...>::value,
4240 "Found duplicate types among the arguments passed to set(...). "
4241 "Types should be listed at most once.");
4242
4243 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4244 }
4245
4262#ifndef NO_DOC
4263 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4264#else
4265 template<typename... Args>
4266#endif
4267 ContrastDistortion copyWith(Args &&...args) const
4268 {
4269 using namespace Zivid::Detail::TypeTraits;
4270
4271 using AllArgsAreDescendantNodes =
4272 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4273 static_assert(
4274 AllArgsAreDescendantNodes::value,
4275 "All arguments passed to copyWith(...) must be descendant nodes.");
4276
4277 static_assert(
4278 AllArgsDecayedAreUnique<Args...>::value,
4279 "Found duplicate types among the arguments passed to copyWith(...). "
4280 "Types should be listed at most once.");
4281
4282 auto copy{ *this };
4283 copy.set(std::forward<Args>(args)...);
4284 return copy;
4285 }
4286
4288 const Correction &correction() const
4289 {
4290 return m_correction;
4291 }
4292
4295 {
4296 return m_correction;
4297 }
4298
4301 {
4302 m_correction = value;
4303 return *this;
4304 }
4305
4308 {
4309 m_correction.set(value);
4310 return *this;
4311 }
4312
4315 {
4316 m_correction.set(value);
4317 return *this;
4318 }
4319
4321 const Removal &removal() const
4322 {
4323 return m_removal;
4324 }
4325
4328 {
4329 return m_removal;
4330 }
4331
4334 {
4335 m_removal = value;
4336 return *this;
4337 }
4338
4341 {
4342 m_removal.set(value);
4343 return *this;
4344 }
4345
4348 {
4349 m_removal.set(value);
4350 return *this;
4351 }
4352
4353 template<
4354 typename T,
4355 typename std::enable_if<
4356 std::is_same<
4357 T,
4359 int>::type = 0>
4361 {
4362 return m_correction;
4363 }
4364
4365 template<
4366 typename T,
4367 typename std::enable_if<
4368 std::is_same<
4369 T,
4370 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4371 Enabled>::value,
4372 int>::type = 0>
4374 get() const
4375 {
4376 return m_correction.get<
4378 }
4379
4380 template<
4381 typename T,
4382 typename std::enable_if<
4383 std::is_same<
4384 T,
4385 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4386 Strength>::value,
4387 int>::type = 0>
4389 get() const
4390 {
4391 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
4392 Correction::Strength>();
4393 }
4394
4395 template<
4396 typename T,
4397 typename std::enable_if<
4398 std::is_same<
4399 T,
4401 int>::type = 0>
4403 {
4404 return m_removal;
4405 }
4406
4407 template<
4408 typename T,
4409 typename std::enable_if<
4410 std::is_same<
4411 T,
4413 value,
4414 int>::type = 0>
4416 const
4417 {
4418 return m_removal.get<
4420 }
4421
4422 template<
4423 typename T,
4424 typename std::enable_if<
4425 std::is_same<
4426 T,
4427 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4428 Threshold>::value,
4429 int>::type = 0>
4431 const
4432 {
4433 return m_removal.get<
4435 }
4436
4437 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4439 {
4440 return m_correction;
4441 }
4442
4443 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4445 {
4446 return m_removal;
4447 }
4448
4450 template<typename F>
4451 void forEach(const F &f) const
4452 {
4453 f(m_correction);
4454 f(m_removal);
4455 }
4456
4458 template<typename F>
4459 void forEach(const F &f)
4460 {
4461 f(m_correction);
4462 f(m_removal);
4463 }
4464
4466 bool operator==(const ContrastDistortion &other) const;
4467
4469 bool operator!=(const ContrastDistortion &other) const;
4470
4472 std::string toString() const;
4473
4475 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
4476 {
4477 return stream << value.toString();
4478 }
4479
4480 private:
4481 void setFromString(const std::string &value);
4482
4483 void setFromString(const std::string &fullPath, const std::string &value);
4484
4485 std::string getString(const std::string &fullPath) const;
4486
4487 Correction m_correction;
4488 Removal m_removal;
4489
4490 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
4491 };
4492
4493 using Descendants = std::tuple<
4501
4504
4522#ifndef NO_DOC
4523 template<
4524 typename... Args,
4525 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4526 typename std::enable_if<
4527 Zivid::Detail::TypeTraits::
4528 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4529 int>::type = 0>
4530#else
4531 template<typename... Args>
4532#endif
4533 explicit Experimental(Args &&...args)
4534 {
4535 using namespace Zivid::Detail::TypeTraits;
4536
4537 static_assert(
4538 AllArgsDecayedAreUnique<Args...>::value,
4539 "Found duplicate types among the arguments passed to Experimental(...). "
4540 "Types should be listed at most once.");
4541
4542 set(std::forward<Args>(args)...);
4543 }
4544
4561#ifndef NO_DOC
4562 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4563#else
4564 template<typename... Args>
4565#endif
4566 void set(Args &&...args)
4567 {
4568 using namespace Zivid::Detail::TypeTraits;
4569
4570 using AllArgsAreDescendantNodes =
4571 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4572 static_assert(
4573 AllArgsAreDescendantNodes::value,
4574 "All arguments passed to set(...) must be descendant nodes.");
4575
4576 static_assert(
4577 AllArgsDecayedAreUnique<Args...>::value,
4578 "Found duplicate types among the arguments passed to set(...). "
4579 "Types should be listed at most once.");
4580
4581 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4582 }
4583
4601#ifndef NO_DOC
4602 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4603#else
4604 template<typename... Args>
4605#endif
4606 Experimental copyWith(Args &&...args) const
4607 {
4608 using namespace Zivid::Detail::TypeTraits;
4609
4610 using AllArgsAreDescendantNodes =
4611 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4612 static_assert(
4613 AllArgsAreDescendantNodes::value,
4614 "All arguments passed to copyWith(...) must be descendant nodes.");
4615
4616 static_assert(
4617 AllArgsDecayedAreUnique<Args...>::value,
4618 "Found duplicate types among the arguments passed to copyWith(...). "
4619 "Types should be listed at most once.");
4620
4621 auto copy{ *this };
4622 copy.set(std::forward<Args>(args)...);
4623 return copy;
4624 }
4625
4628 {
4629 return m_contrastDistortion;
4630 }
4631
4634 {
4635 return m_contrastDistortion;
4636 }
4637
4640 {
4641 m_contrastDistortion = value;
4642 return *this;
4643 }
4644
4647 {
4648 m_contrastDistortion.set(value);
4649 return *this;
4650 }
4651
4654 {
4655 m_contrastDistortion.set(value);
4656 return *this;
4657 }
4658
4661 {
4662 m_contrastDistortion.set(value);
4663 return *this;
4664 }
4665
4668 {
4669 m_contrastDistortion.set(value);
4670 return *this;
4671 }
4672
4675 {
4676 m_contrastDistortion.set(value);
4677 return *this;
4678 }
4679
4682 {
4683 m_contrastDistortion.set(value);
4684 return *this;
4685 }
4686
4687 template<
4688 typename T,
4689 typename std::enable_if<
4690 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
4691 int>::type = 0>
4693 {
4694 return m_contrastDistortion;
4695 }
4696
4697 template<
4698 typename T,
4699 typename std::enable_if<
4700 std::is_same<
4701 T,
4703 int>::type = 0>
4705 {
4706 return m_contrastDistortion
4708 }
4709
4710 template<
4711 typename T,
4712 typename std::enable_if<
4713 std::is_same<
4714 T,
4716 value,
4717 int>::type = 0>
4719 const
4720 {
4721 return m_contrastDistortion.get<
4723 }
4724
4725 template<
4726 typename T,
4727 typename std::enable_if<
4728 std::is_same<
4729 T,
4731 value,
4732 int>::type = 0>
4734 const
4735 {
4736 return m_contrastDistortion.get<
4738 }
4739
4740 template<
4741 typename T,
4742 typename std::enable_if<
4743 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
4744 value,
4745 int>::type = 0>
4747 {
4748 return m_contrastDistortion
4750 }
4751
4752 template<
4753 typename T,
4754 typename std::enable_if<
4755 std::is_same<
4756 T,
4758 value,
4759 int>::type = 0>
4761 {
4762 return m_contrastDistortion
4764 }
4765
4766 template<
4767 typename T,
4768 typename std::enable_if<
4769 std::is_same<
4770 T,
4772 value,
4773 int>::type = 0>
4775 const
4776 {
4777 return m_contrastDistortion
4779 }
4780
4781 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4783 {
4784 return m_contrastDistortion;
4785 }
4786
4788 template<typename F>
4789 void forEach(const F &f) const
4790 {
4791 f(m_contrastDistortion);
4792 }
4793
4795 template<typename F>
4796 void forEach(const F &f)
4797 {
4798 f(m_contrastDistortion);
4799 }
4800
4802 bool operator==(const Experimental &other) const;
4803
4805 bool operator!=(const Experimental &other) const;
4806
4808 std::string toString() const;
4809
4811 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
4812 {
4813 return stream << value.toString();
4814 }
4815
4816 private:
4817 void setFromString(const std::string &value);
4818
4819 void setFromString(const std::string &fullPath, const std::string &value);
4820
4821 std::string getString(const std::string &fullPath) const;
4822
4823 ContrastDistortion m_contrastDistortion;
4824
4825 friend struct DataModel::Detail::Befriend<Experimental>;
4826 };
4827
4830 {
4831 public:
4834
4836 static constexpr const char *path{ "Processing/Filters/Noise" };
4837
4839 static constexpr const char *name{ "Noise" };
4840
4842 static constexpr const char *description{
4843 R"description(Contains a filter that removes points with low signal-to-noise ratio (SNR))description"
4844 };
4845
4848 {
4849 public:
4852
4854 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
4855
4857 static constexpr const char *name{ "Removal" };
4858
4860 static constexpr const char *description{
4861 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold)description"
4862 };
4863
4866 {
4867 public:
4870
4872 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
4873
4875 static constexpr const char *name{ "Enabled" };
4876
4878 static constexpr const char *description{
4879 R"description(Enable or disable the SNR filter)description"
4880 };
4881
4883 using ValueType = bool;
4884 static const Enabled yes;
4885 static const Enabled no;
4886
4888 static std::set<bool> validValues()
4889 {
4890 return { false, true };
4891 }
4892
4894 Enabled() = default;
4895
4897 explicit constexpr Enabled(bool value)
4898 : m_opt{ value }
4899 {}
4900
4905 bool value() const;
4906
4908 bool hasValue() const;
4909
4911 void reset();
4912
4914 std::string toString() const;
4915
4917 bool operator==(const Enabled &other) const
4918 {
4919 return m_opt == other.m_opt;
4920 }
4921
4923 bool operator!=(const Enabled &other) const
4924 {
4925 return m_opt != other.m_opt;
4926 }
4927
4929 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4930 {
4931 return stream << value.toString();
4932 }
4933
4934 private:
4935 void setFromString(const std::string &value);
4936
4937 Zivid::DataModel::Detail::Optional<bool> m_opt;
4938
4939 friend struct DataModel::Detail::Befriend<Enabled>;
4940 };
4941
4944 {
4945 public:
4948
4950 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
4951
4953 static constexpr const char *name{ "Threshold" };
4954
4956 static constexpr const char *description{
4957 R"description(Discard points with signal-to-noise ratio (SNR) below the given value)description"
4958 };
4959
4961 using ValueType = double;
4962
4964 static constexpr Range<double> validRange()
4965 {
4966 return { 0.0, 100.0 };
4967 }
4968
4970 Threshold() = default;
4971
4973 explicit constexpr Threshold(double value)
4974 : m_opt{ verifyValue(value) }
4975 {}
4976
4981 double value() const;
4982
4984 bool hasValue() const;
4985
4987 void reset();
4988
4990 std::string toString() const;
4991
4993 bool operator==(const Threshold &other) const
4994 {
4995 return m_opt == other.m_opt;
4996 }
4997
4999 bool operator!=(const Threshold &other) const
5000 {
5001 return m_opt != other.m_opt;
5002 }
5003
5005 bool operator<(const Threshold &other) const
5006 {
5007 return m_opt < other.m_opt;
5008 }
5009
5011 bool operator>(const Threshold &other) const
5012 {
5013 return m_opt > other.m_opt;
5014 }
5015
5017 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
5018 {
5019 return stream << value.toString();
5020 }
5021
5022 private:
5023 void setFromString(const std::string &value);
5024
5025 constexpr ValueType static verifyValue(const ValueType &value)
5026 {
5027 return validRange().isInRange(value)
5028 ? value
5029 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
5030 + " } is not in range ["
5031 + std::to_string(validRange().min()) + ", "
5032 + std::to_string(validRange().max()) + "]" };
5033 }
5034
5035 Zivid::DataModel::Detail::Optional<double> m_opt;
5036
5037 friend struct DataModel::Detail::Befriend<Threshold>;
5038 };
5039
5040 using Descendants = std::tuple<
5043
5046
5059#ifndef NO_DOC
5060 template<
5061 typename... Args,
5062 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5063 typename std::enable_if<
5064 Zivid::Detail::TypeTraits::
5065 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5066 int>::type = 0>
5067#else
5068 template<typename... Args>
5069#endif
5070 explicit Removal(Args &&...args)
5071 {
5072 using namespace Zivid::Detail::TypeTraits;
5073
5074 static_assert(
5075 AllArgsDecayedAreUnique<Args...>::value,
5076 "Found duplicate types among the arguments passed to Removal(...). "
5077 "Types should be listed at most once.");
5078
5079 set(std::forward<Args>(args)...);
5080 }
5081
5093#ifndef NO_DOC
5094 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5095#else
5096 template<typename... Args>
5097#endif
5098 void set(Args &&...args)
5099 {
5100 using namespace Zivid::Detail::TypeTraits;
5101
5102 using AllArgsAreDescendantNodes =
5103 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5104 static_assert(
5105 AllArgsAreDescendantNodes::value,
5106 "All arguments passed to set(...) must be descendant nodes.");
5107
5108 static_assert(
5109 AllArgsDecayedAreUnique<Args...>::value,
5110 "Found duplicate types among the arguments passed to set(...). "
5111 "Types should be listed at most once.");
5112
5113 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5114 }
5115
5128#ifndef NO_DOC
5129 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5130#else
5131 template<typename... Args>
5132#endif
5133 Removal copyWith(Args &&...args) const
5134 {
5135 using namespace Zivid::Detail::TypeTraits;
5136
5137 using AllArgsAreDescendantNodes =
5138 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5139 static_assert(
5140 AllArgsAreDescendantNodes::value,
5141 "All arguments passed to copyWith(...) must be descendant nodes.");
5142
5143 static_assert(
5144 AllArgsDecayedAreUnique<Args...>::value,
5145 "Found duplicate types among the arguments passed to copyWith(...). "
5146 "Types should be listed at most once.");
5147
5148 auto copy{ *this };
5149 copy.set(std::forward<Args>(args)...);
5150 return copy;
5151 }
5152
5154 const Enabled &isEnabled() const
5155 {
5156 return m_enabled;
5157 }
5158
5161 {
5162 return m_enabled;
5163 }
5164
5166 Removal &set(const Enabled &value)
5167 {
5168 m_enabled = value;
5169 return *this;
5170 }
5171
5173 const Threshold &threshold() const
5174 {
5175 return m_threshold;
5176 }
5177
5180 {
5181 return m_threshold;
5182 }
5183
5185 Removal &set(const Threshold &value)
5186 {
5187 m_threshold = value;
5188 return *this;
5189 }
5190
5191 template<
5192 typename T,
5193 typename std::enable_if<
5194 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
5195 int>::type = 0>
5197 {
5198 return m_enabled;
5199 }
5200
5201 template<
5202 typename T,
5203 typename std::enable_if<
5204 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
5205 int>::type = 0>
5207 {
5208 return m_threshold;
5209 }
5210
5211 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5213 {
5214 return m_enabled;
5215 }
5216
5217 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5219 {
5220 return m_threshold;
5221 }
5222
5224 template<typename F>
5225 void forEach(const F &f) const
5226 {
5227 f(m_enabled);
5228 f(m_threshold);
5229 }
5230
5232 template<typename F>
5233 void forEach(const F &f)
5234 {
5235 f(m_enabled);
5236 f(m_threshold);
5237 }
5238
5240 bool operator==(const Removal &other) const;
5241
5243 bool operator!=(const Removal &other) const;
5244
5246 std::string toString() const;
5247
5249 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5250 {
5251 return stream << value.toString();
5252 }
5253
5254 private:
5255 void setFromString(const std::string &value);
5256
5257 void setFromString(const std::string &fullPath, const std::string &value);
5258
5259 std::string getString(const std::string &fullPath) const;
5260
5261 Enabled m_enabled;
5262 Threshold m_threshold;
5263
5264 friend struct DataModel::Detail::Befriend<Removal>;
5265 };
5266
5267 using Descendants = std::tuple<
5271
5274
5288#ifndef NO_DOC
5289 template<
5290 typename... Args,
5291 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5292 typename std::enable_if<
5293 Zivid::Detail::TypeTraits::
5294 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5295 int>::type = 0>
5296#else
5297 template<typename... Args>
5298#endif
5299 explicit Noise(Args &&...args)
5300 {
5301 using namespace Zivid::Detail::TypeTraits;
5302
5303 static_assert(
5304 AllArgsDecayedAreUnique<Args...>::value,
5305 "Found duplicate types among the arguments passed to Noise(...). "
5306 "Types should be listed at most once.");
5307
5308 set(std::forward<Args>(args)...);
5309 }
5310
5323#ifndef NO_DOC
5324 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5325#else
5326 template<typename... Args>
5327#endif
5328 void set(Args &&...args)
5329 {
5330 using namespace Zivid::Detail::TypeTraits;
5331
5332 using AllArgsAreDescendantNodes =
5333 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5334 static_assert(
5335 AllArgsAreDescendantNodes::value,
5336 "All arguments passed to set(...) must be descendant nodes.");
5337
5338 static_assert(
5339 AllArgsDecayedAreUnique<Args...>::value,
5340 "Found duplicate types among the arguments passed to set(...). "
5341 "Types should be listed at most once.");
5342
5343 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5344 }
5345
5359#ifndef NO_DOC
5360 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5361#else
5362 template<typename... Args>
5363#endif
5364 Noise copyWith(Args &&...args) const
5365 {
5366 using namespace Zivid::Detail::TypeTraits;
5367
5368 using AllArgsAreDescendantNodes =
5369 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5370 static_assert(
5371 AllArgsAreDescendantNodes::value,
5372 "All arguments passed to copyWith(...) must be descendant nodes.");
5373
5374 static_assert(
5375 AllArgsDecayedAreUnique<Args...>::value,
5376 "Found duplicate types among the arguments passed to copyWith(...). "
5377 "Types should be listed at most once.");
5378
5379 auto copy{ *this };
5380 copy.set(std::forward<Args>(args)...);
5381 return copy;
5382 }
5383
5385 const Removal &removal() const
5386 {
5387 return m_removal;
5388 }
5389
5392 {
5393 return m_removal;
5394 }
5395
5397 Noise &set(const Removal &value)
5398 {
5399 m_removal = value;
5400 return *this;
5401 }
5402
5405 {
5406 m_removal.set(value);
5407 return *this;
5408 }
5409
5412 {
5413 m_removal.set(value);
5414 return *this;
5415 }
5416
5417 template<
5418 typename T,
5419 typename std::enable_if<
5420 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
5421 int>::type = 0>
5423 {
5424 return m_removal;
5425 }
5426
5427 template<
5428 typename T,
5429 typename std::enable_if<
5430 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
5431 int>::type = 0>
5433 {
5435 }
5436
5437 template<
5438 typename T,
5439 typename std::enable_if<
5440 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
5441 int>::type = 0>
5443 {
5445 }
5446
5447 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5449 {
5450 return m_removal;
5451 }
5452
5454 template<typename F>
5455 void forEach(const F &f) const
5456 {
5457 f(m_removal);
5458 }
5459
5461 template<typename F>
5462 void forEach(const F &f)
5463 {
5464 f(m_removal);
5465 }
5466
5468 bool operator==(const Noise &other) const;
5469
5471 bool operator!=(const Noise &other) const;
5472
5474 std::string toString() const;
5475
5477 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
5478 {
5479 return stream << value.toString();
5480 }
5481
5482 private:
5483 void setFromString(const std::string &value);
5484
5485 void setFromString(const std::string &fullPath, const std::string &value);
5486
5487 std::string getString(const std::string &fullPath) const;
5488
5489 Removal m_removal;
5490
5491 friend struct DataModel::Detail::Befriend<Noise>;
5492 };
5493
5496 {
5497 public:
5500
5502 static constexpr const char *path{ "Processing/Filters/Outlier" };
5503
5505 static constexpr const char *name{ "Outlier" };
5506
5508 static constexpr const char *description{
5509 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points)description"
5510 };
5511
5514 {
5515 public:
5518
5520 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
5521
5523 static constexpr const char *name{ "Removal" };
5524
5526 static constexpr const char *description{
5527 R"description(Discard point if Euclidean distance to neighboring points is above a threshold)description"
5528 };
5529
5532 {
5533 public:
5536
5538 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
5539
5541 static constexpr const char *name{ "Enabled" };
5542
5544 static constexpr const char *description{
5545 R"description(Enable or disable the outlier filter)description"
5546 };
5547
5549 using ValueType = bool;
5550 static const Enabled yes;
5551 static const Enabled no;
5552
5554 static std::set<bool> validValues()
5555 {
5556 return { false, true };
5557 }
5558
5560 Enabled() = default;
5561
5563 explicit constexpr Enabled(bool value)
5564 : m_opt{ value }
5565 {}
5566
5571 bool value() const;
5572
5574 bool hasValue() const;
5575
5577 void reset();
5578
5580 std::string toString() const;
5581
5583 bool operator==(const Enabled &other) const
5584 {
5585 return m_opt == other.m_opt;
5586 }
5587
5589 bool operator!=(const Enabled &other) const
5590 {
5591 return m_opt != other.m_opt;
5592 }
5593
5595 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5596 {
5597 return stream << value.toString();
5598 }
5599
5600 private:
5601 void setFromString(const std::string &value);
5602
5603 Zivid::DataModel::Detail::Optional<bool> m_opt;
5604
5605 friend struct DataModel::Detail::Befriend<Enabled>;
5606 };
5607
5610 {
5611 public:
5614
5616 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
5617
5619 static constexpr const char *name{ "Threshold" };
5620
5622 static constexpr const char *description{
5623 R"description(Discard point if Euclidean distance to neighboring points is above the given value)description"
5624 };
5625
5627 using ValueType = double;
5628
5630 static constexpr Range<double> validRange()
5631 {
5632 return { 0.0, 100.0 };
5633 }
5634
5636 Threshold() = default;
5637
5639 explicit constexpr Threshold(double value)
5640 : m_opt{ verifyValue(value) }
5641 {}
5642
5647 double value() const;
5648
5650 bool hasValue() const;
5651
5653 void reset();
5654
5656 std::string toString() const;
5657
5659 bool operator==(const Threshold &other) const
5660 {
5661 return m_opt == other.m_opt;
5662 }
5663
5665 bool operator!=(const Threshold &other) const
5666 {
5667 return m_opt != other.m_opt;
5668 }
5669
5671 bool operator<(const Threshold &other) const
5672 {
5673 return m_opt < other.m_opt;
5674 }
5675
5677 bool operator>(const Threshold &other) const
5678 {
5679 return m_opt > other.m_opt;
5680 }
5681
5683 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
5684 {
5685 return stream << value.toString();
5686 }
5687
5688 private:
5689 void setFromString(const std::string &value);
5690
5691 constexpr ValueType static verifyValue(const ValueType &value)
5692 {
5693 return validRange().isInRange(value)
5694 ? value
5695 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
5696 + " } is not in range ["
5697 + std::to_string(validRange().min()) + ", "
5698 + std::to_string(validRange().max()) + "]" };
5699 }
5700
5701 Zivid::DataModel::Detail::Optional<double> m_opt;
5702
5703 friend struct DataModel::Detail::Befriend<Threshold>;
5704 };
5705
5706 using Descendants = std::tuple<
5709
5712
5725#ifndef NO_DOC
5726 template<
5727 typename... Args,
5728 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5729 typename std::enable_if<
5730 Zivid::Detail::TypeTraits::
5731 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5732 int>::type = 0>
5733#else
5734 template<typename... Args>
5735#endif
5736 explicit Removal(Args &&...args)
5737 {
5738 using namespace Zivid::Detail::TypeTraits;
5739
5740 static_assert(
5741 AllArgsDecayedAreUnique<Args...>::value,
5742 "Found duplicate types among the arguments passed to Removal(...). "
5743 "Types should be listed at most once.");
5744
5745 set(std::forward<Args>(args)...);
5746 }
5747
5759#ifndef NO_DOC
5760 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5761#else
5762 template<typename... Args>
5763#endif
5764 void set(Args &&...args)
5765 {
5766 using namespace Zivid::Detail::TypeTraits;
5767
5768 using AllArgsAreDescendantNodes =
5769 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5770 static_assert(
5771 AllArgsAreDescendantNodes::value,
5772 "All arguments passed to set(...) must be descendant nodes.");
5773
5774 static_assert(
5775 AllArgsDecayedAreUnique<Args...>::value,
5776 "Found duplicate types among the arguments passed to set(...). "
5777 "Types should be listed at most once.");
5778
5779 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5780 }
5781
5794#ifndef NO_DOC
5795 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5796#else
5797 template<typename... Args>
5798#endif
5799 Removal copyWith(Args &&...args) const
5800 {
5801 using namespace Zivid::Detail::TypeTraits;
5802
5803 using AllArgsAreDescendantNodes =
5804 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5805 static_assert(
5806 AllArgsAreDescendantNodes::value,
5807 "All arguments passed to copyWith(...) must be descendant nodes.");
5808
5809 static_assert(
5810 AllArgsDecayedAreUnique<Args...>::value,
5811 "Found duplicate types among the arguments passed to copyWith(...). "
5812 "Types should be listed at most once.");
5813
5814 auto copy{ *this };
5815 copy.set(std::forward<Args>(args)...);
5816 return copy;
5817 }
5818
5820 const Enabled &isEnabled() const
5821 {
5822 return m_enabled;
5823 }
5824
5827 {
5828 return m_enabled;
5829 }
5830
5832 Removal &set(const Enabled &value)
5833 {
5834 m_enabled = value;
5835 return *this;
5836 }
5837
5839 const Threshold &threshold() const
5840 {
5841 return m_threshold;
5842 }
5843
5846 {
5847 return m_threshold;
5848 }
5849
5851 Removal &set(const Threshold &value)
5852 {
5853 m_threshold = value;
5854 return *this;
5855 }
5856
5857 template<
5858 typename T,
5859 typename std::enable_if<
5860 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5861 int>::type = 0>
5863 {
5864 return m_enabled;
5865 }
5866
5867 template<
5868 typename T,
5869 typename std::enable_if<
5870 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5871 int>::type = 0>
5873 {
5874 return m_threshold;
5875 }
5876
5877 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5879 {
5880 return m_enabled;
5881 }
5882
5883 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5885 {
5886 return m_threshold;
5887 }
5888
5890 template<typename F>
5891 void forEach(const F &f) const
5892 {
5893 f(m_enabled);
5894 f(m_threshold);
5895 }
5896
5898 template<typename F>
5899 void forEach(const F &f)
5900 {
5901 f(m_enabled);
5902 f(m_threshold);
5903 }
5904
5906 bool operator==(const Removal &other) const;
5907
5909 bool operator!=(const Removal &other) const;
5910
5912 std::string toString() const;
5913
5915 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5916 {
5917 return stream << value.toString();
5918 }
5919
5920 private:
5921 void setFromString(const std::string &value);
5922
5923 void setFromString(const std::string &fullPath, const std::string &value);
5924
5925 std::string getString(const std::string &fullPath) const;
5926
5927 Enabled m_enabled;
5928 Threshold m_threshold;
5929
5930 friend struct DataModel::Detail::Befriend<Removal>;
5931 };
5932
5933 using Descendants = std::tuple<
5937
5940
5954#ifndef NO_DOC
5955 template<
5956 typename... Args,
5957 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5958 typename std::enable_if<
5959 Zivid::Detail::TypeTraits::
5960 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5961 int>::type = 0>
5962#else
5963 template<typename... Args>
5964#endif
5965 explicit Outlier(Args &&...args)
5966 {
5967 using namespace Zivid::Detail::TypeTraits;
5968
5969 static_assert(
5970 AllArgsDecayedAreUnique<Args...>::value,
5971 "Found duplicate types among the arguments passed to Outlier(...). "
5972 "Types should be listed at most once.");
5973
5974 set(std::forward<Args>(args)...);
5975 }
5976
5989#ifndef NO_DOC
5990 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5991#else
5992 template<typename... Args>
5993#endif
5994 void set(Args &&...args)
5995 {
5996 using namespace Zivid::Detail::TypeTraits;
5997
5998 using AllArgsAreDescendantNodes =
5999 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6000 static_assert(
6001 AllArgsAreDescendantNodes::value,
6002 "All arguments passed to set(...) must be descendant nodes.");
6003
6004 static_assert(
6005 AllArgsDecayedAreUnique<Args...>::value,
6006 "Found duplicate types among the arguments passed to set(...). "
6007 "Types should be listed at most once.");
6008
6009 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6010 }
6011
6025#ifndef NO_DOC
6026 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6027#else
6028 template<typename... Args>
6029#endif
6030 Outlier copyWith(Args &&...args) const
6031 {
6032 using namespace Zivid::Detail::TypeTraits;
6033
6034 using AllArgsAreDescendantNodes =
6035 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6036 static_assert(
6037 AllArgsAreDescendantNodes::value,
6038 "All arguments passed to copyWith(...) must be descendant nodes.");
6039
6040 static_assert(
6041 AllArgsDecayedAreUnique<Args...>::value,
6042 "Found duplicate types among the arguments passed to copyWith(...). "
6043 "Types should be listed at most once.");
6044
6045 auto copy{ *this };
6046 copy.set(std::forward<Args>(args)...);
6047 return copy;
6048 }
6049
6051 const Removal &removal() const
6052 {
6053 return m_removal;
6054 }
6055
6058 {
6059 return m_removal;
6060 }
6061
6063 Outlier &set(const Removal &value)
6064 {
6065 m_removal = value;
6066 return *this;
6067 }
6068
6071 {
6072 m_removal.set(value);
6073 return *this;
6074 }
6075
6078 {
6079 m_removal.set(value);
6080 return *this;
6081 }
6082
6083 template<
6084 typename T,
6085 typename std::enable_if<
6086 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
6087 int>::type = 0>
6089 {
6090 return m_removal;
6091 }
6092
6093 template<
6094 typename T,
6095 typename std::enable_if<
6096 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
6097 int>::type = 0>
6099 {
6101 }
6102
6103 template<
6104 typename T,
6105 typename std::enable_if<
6106 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
6107 int>::type = 0>
6109 {
6111 }
6112
6113 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6115 {
6116 return m_removal;
6117 }
6118
6120 template<typename F>
6121 void forEach(const F &f) const
6122 {
6123 f(m_removal);
6124 }
6125
6127 template<typename F>
6128 void forEach(const F &f)
6129 {
6130 f(m_removal);
6131 }
6132
6134 bool operator==(const Outlier &other) const;
6135
6137 bool operator!=(const Outlier &other) const;
6138
6140 std::string toString() const;
6141
6143 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
6144 {
6145 return stream << value.toString();
6146 }
6147
6148 private:
6149 void setFromString(const std::string &value);
6150
6151 void setFromString(const std::string &fullPath, const std::string &value);
6152
6153 std::string getString(const std::string &fullPath) const;
6154
6155 Removal m_removal;
6156
6157 friend struct DataModel::Detail::Befriend<Outlier>;
6158 };
6159
6162 {
6163 public:
6166
6168 static constexpr const char *path{ "Processing/Filters/Reflection" };
6169
6171 static constexpr const char *name{ "Reflection" };
6172
6174 static constexpr const char *description{
6175 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials))description"
6176 };
6177
6180 {
6181 public:
6184
6186 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
6187
6189 static constexpr const char *name{ "Removal" };
6190
6192 static constexpr const char *description{
6193 R"description(Discard points likely introduced by reflections (useful for shiny materials))description"
6194 };
6195
6198 {
6199 public:
6202
6204 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
6205
6207 static constexpr const char *name{ "Enabled" };
6208
6210 static constexpr const char *description{
6211 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate)description"
6212 };
6213
6215 using ValueType = bool;
6216 static const Enabled yes;
6217 static const Enabled no;
6218
6220 static std::set<bool> validValues()
6221 {
6222 return { false, true };
6223 }
6224
6226 Enabled() = default;
6227
6229 explicit constexpr Enabled(bool value)
6230 : m_opt{ value }
6231 {}
6232
6237 bool value() const;
6238
6240 bool hasValue() const;
6241
6243 void reset();
6244
6246 std::string toString() const;
6247
6249 bool operator==(const Enabled &other) const
6250 {
6251 return m_opt == other.m_opt;
6252 }
6253
6255 bool operator!=(const Enabled &other) const
6256 {
6257 return m_opt != other.m_opt;
6258 }
6259
6261 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6262 {
6263 return stream << value.toString();
6264 }
6265
6266 private:
6267 void setFromString(const std::string &value);
6268
6269 Zivid::DataModel::Detail::Optional<bool> m_opt;
6270
6271 friend struct DataModel::Detail::Befriend<Enabled>;
6272 };
6273
6274 using Descendants = std::tuple<Settings::Processing::Filters::Reflection::Removal::Enabled>;
6275
6278
6290#ifndef NO_DOC
6291 template<
6292 typename... Args,
6293 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6294 typename std::enable_if<
6295 Zivid::Detail::TypeTraits::
6296 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6297 int>::type = 0>
6298#else
6299 template<typename... Args>
6300#endif
6301 explicit Removal(Args &&...args)
6302 {
6303 using namespace Zivid::Detail::TypeTraits;
6304
6305 static_assert(
6306 AllArgsDecayedAreUnique<Args...>::value,
6307 "Found duplicate types among the arguments passed to Removal(...). "
6308 "Types should be listed at most once.");
6309
6310 set(std::forward<Args>(args)...);
6311 }
6312
6323#ifndef NO_DOC
6324 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6325#else
6326 template<typename... Args>
6327#endif
6328 void set(Args &&...args)
6329 {
6330 using namespace Zivid::Detail::TypeTraits;
6331
6332 using AllArgsAreDescendantNodes =
6333 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6334 static_assert(
6335 AllArgsAreDescendantNodes::value,
6336 "All arguments passed to set(...) must be descendant nodes.");
6337
6338 static_assert(
6339 AllArgsDecayedAreUnique<Args...>::value,
6340 "Found duplicate types among the arguments passed to set(...). "
6341 "Types should be listed at most once.");
6342
6343 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6344 }
6345
6357#ifndef NO_DOC
6358 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6359#else
6360 template<typename... Args>
6361#endif
6362 Removal copyWith(Args &&...args) const
6363 {
6364 using namespace Zivid::Detail::TypeTraits;
6365
6366 using AllArgsAreDescendantNodes =
6367 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6368 static_assert(
6369 AllArgsAreDescendantNodes::value,
6370 "All arguments passed to copyWith(...) must be descendant nodes.");
6371
6372 static_assert(
6373 AllArgsDecayedAreUnique<Args...>::value,
6374 "Found duplicate types among the arguments passed to copyWith(...). "
6375 "Types should be listed at most once.");
6376
6377 auto copy{ *this };
6378 copy.set(std::forward<Args>(args)...);
6379 return copy;
6380 }
6381
6383 const Enabled &isEnabled() const
6384 {
6385 return m_enabled;
6386 }
6387
6390 {
6391 return m_enabled;
6392 }
6393
6395 Removal &set(const Enabled &value)
6396 {
6397 m_enabled = value;
6398 return *this;
6399 }
6400
6401 template<
6402 typename T,
6403 typename std::enable_if<
6404 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6405 int>::type = 0>
6407 {
6408 return m_enabled;
6409 }
6410
6411 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6413 {
6414 return m_enabled;
6415 }
6416
6418 template<typename F>
6419 void forEach(const F &f) const
6420 {
6421 f(m_enabled);
6422 }
6423
6425 template<typename F>
6426 void forEach(const F &f)
6427 {
6428 f(m_enabled);
6429 }
6430
6432 bool operator==(const Removal &other) const;
6433
6435 bool operator!=(const Removal &other) const;
6436
6438 std::string toString() const;
6439
6441 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6442 {
6443 return stream << value.toString();
6444 }
6445
6446 private:
6447 void setFromString(const std::string &value);
6448
6449 void setFromString(const std::string &fullPath, const std::string &value);
6450
6451 std::string getString(const std::string &fullPath) const;
6452
6453 Enabled m_enabled;
6454
6455 friend struct DataModel::Detail::Befriend<Removal>;
6456 };
6457
6458 using Descendants = std::tuple<
6461
6464
6477#ifndef NO_DOC
6478 template<
6479 typename... Args,
6480 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6481 typename std::enable_if<
6482 Zivid::Detail::TypeTraits::
6483 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6484 int>::type = 0>
6485#else
6486 template<typename... Args>
6487#endif
6488 explicit Reflection(Args &&...args)
6489 {
6490 using namespace Zivid::Detail::TypeTraits;
6491
6492 static_assert(
6493 AllArgsDecayedAreUnique<Args...>::value,
6494 "Found duplicate types among the arguments passed to Reflection(...). "
6495 "Types should be listed at most once.");
6496
6497 set(std::forward<Args>(args)...);
6498 }
6499
6511#ifndef NO_DOC
6512 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6513#else
6514 template<typename... Args>
6515#endif
6516 void set(Args &&...args)
6517 {
6518 using namespace Zivid::Detail::TypeTraits;
6519
6520 using AllArgsAreDescendantNodes =
6521 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6522 static_assert(
6523 AllArgsAreDescendantNodes::value,
6524 "All arguments passed to set(...) must be descendant nodes.");
6525
6526 static_assert(
6527 AllArgsDecayedAreUnique<Args...>::value,
6528 "Found duplicate types among the arguments passed to set(...). "
6529 "Types should be listed at most once.");
6530
6531 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6532 }
6533
6546#ifndef NO_DOC
6547 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6548#else
6549 template<typename... Args>
6550#endif
6551 Reflection copyWith(Args &&...args) const
6552 {
6553 using namespace Zivid::Detail::TypeTraits;
6554
6555 using AllArgsAreDescendantNodes =
6556 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6557 static_assert(
6558 AllArgsAreDescendantNodes::value,
6559 "All arguments passed to copyWith(...) must be descendant nodes.");
6560
6561 static_assert(
6562 AllArgsDecayedAreUnique<Args...>::value,
6563 "Found duplicate types among the arguments passed to copyWith(...). "
6564 "Types should be listed at most once.");
6565
6566 auto copy{ *this };
6567 copy.set(std::forward<Args>(args)...);
6568 return copy;
6569 }
6570
6572 const Removal &removal() const
6573 {
6574 return m_removal;
6575 }
6576
6579 {
6580 return m_removal;
6581 }
6582
6584 Reflection &set(const Removal &value)
6585 {
6586 m_removal = value;
6587 return *this;
6588 }
6589
6592 {
6593 m_removal.set(value);
6594 return *this;
6595 }
6596
6597 template<
6598 typename T,
6599 typename std::enable_if<
6600 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
6601 int>::type = 0>
6603 {
6604 return m_removal;
6605 }
6606
6607 template<
6608 typename T,
6609 typename std::enable_if<
6610 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6611 int>::type = 0>
6613 {
6615 }
6616
6617 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6619 {
6620 return m_removal;
6621 }
6622
6624 template<typename F>
6625 void forEach(const F &f) const
6626 {
6627 f(m_removal);
6628 }
6629
6631 template<typename F>
6632 void forEach(const F &f)
6633 {
6634 f(m_removal);
6635 }
6636
6638 bool operator==(const Reflection &other) const;
6639
6641 bool operator!=(const Reflection &other) const;
6642
6644 std::string toString() const;
6645
6647 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
6648 {
6649 return stream << value.toString();
6650 }
6651
6652 private:
6653 void setFromString(const std::string &value);
6654
6655 void setFromString(const std::string &fullPath, const std::string &value);
6656
6657 std::string getString(const std::string &fullPath) const;
6658
6659 Removal m_removal;
6660
6661 friend struct DataModel::Detail::Befriend<Reflection>;
6662 };
6663
6666 {
6667 public:
6670
6672 static constexpr const char *path{ "Processing/Filters/Smoothing" };
6673
6675 static constexpr const char *name{ "Smoothing" };
6676
6678 static constexpr const char *description{ R"description(Smoothing filters)description" };
6679
6682 {
6683 public:
6686
6688 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
6689
6691 static constexpr const char *name{ "Gaussian" };
6692
6694 static constexpr const char *description{
6695 R"description(Gaussian smoothing of the point cloud)description"
6696 };
6697
6700 {
6701 public:
6704
6706 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
6707
6709 static constexpr const char *name{ "Enabled" };
6710
6712 static constexpr const char *description{
6713 R"description(Enable or disable the smoothing filter)description"
6714 };
6715
6717 using ValueType = bool;
6718 static const Enabled yes;
6719 static const Enabled no;
6720
6722 static std::set<bool> validValues()
6723 {
6724 return { false, true };
6725 }
6726
6728 Enabled() = default;
6729
6731 explicit constexpr Enabled(bool value)
6732 : m_opt{ value }
6733 {}
6734
6739 bool value() const;
6740
6742 bool hasValue() const;
6743
6745 void reset();
6746
6748 std::string toString() const;
6749
6751 bool operator==(const Enabled &other) const
6752 {
6753 return m_opt == other.m_opt;
6754 }
6755
6757 bool operator!=(const Enabled &other) const
6758 {
6759 return m_opt != other.m_opt;
6760 }
6761
6763 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6764 {
6765 return stream << value.toString();
6766 }
6767
6768 private:
6769 void setFromString(const std::string &value);
6770
6771 Zivid::DataModel::Detail::Optional<bool> m_opt;
6772
6773 friend struct DataModel::Detail::Befriend<Enabled>;
6774 };
6775
6778 {
6779 public:
6782
6784 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
6785
6787 static constexpr const char *name{ "Sigma" };
6788
6790 static constexpr const char *description{
6791 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients))description"
6792 };
6793
6795 using ValueType = double;
6796
6798 static constexpr Range<double> validRange()
6799 {
6800 return { 0.5, 5 };
6801 }
6802
6804 Sigma() = default;
6805
6807 explicit constexpr Sigma(double value)
6808 : m_opt{ verifyValue(value) }
6809 {}
6810
6815 double value() const;
6816
6818 bool hasValue() const;
6819
6821 void reset();
6822
6824 std::string toString() const;
6825
6827 bool operator==(const Sigma &other) const
6828 {
6829 return m_opt == other.m_opt;
6830 }
6831
6833 bool operator!=(const Sigma &other) const
6834 {
6835 return m_opt != other.m_opt;
6836 }
6837
6839 bool operator<(const Sigma &other) const
6840 {
6841 return m_opt < other.m_opt;
6842 }
6843
6845 bool operator>(const Sigma &other) const
6846 {
6847 return m_opt > other.m_opt;
6848 }
6849
6851 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
6852 {
6853 return stream << value.toString();
6854 }
6855
6856 private:
6857 void setFromString(const std::string &value);
6858
6859 constexpr ValueType static verifyValue(const ValueType &value)
6860 {
6861 return validRange().isInRange(value)
6862 ? value
6863 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
6864 + " } is not in range ["
6865 + std::to_string(validRange().min()) + ", "
6866 + std::to_string(validRange().max()) + "]" };
6867 }
6868
6869 Zivid::DataModel::Detail::Optional<double> m_opt;
6870
6871 friend struct DataModel::Detail::Befriend<Sigma>;
6872 };
6873
6874 using Descendants = std::tuple<
6877
6880
6893#ifndef NO_DOC
6894 template<
6895 typename... Args,
6896 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6897 typename std::enable_if<
6898 Zivid::Detail::TypeTraits::
6899 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6900 int>::type = 0>
6901#else
6902 template<typename... Args>
6903#endif
6904 explicit Gaussian(Args &&...args)
6905 {
6906 using namespace Zivid::Detail::TypeTraits;
6907
6908 static_assert(
6909 AllArgsDecayedAreUnique<Args...>::value,
6910 "Found duplicate types among the arguments passed to Gaussian(...). "
6911 "Types should be listed at most once.");
6912
6913 set(std::forward<Args>(args)...);
6914 }
6915
6927#ifndef NO_DOC
6928 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6929#else
6930 template<typename... Args>
6931#endif
6932 void set(Args &&...args)
6933 {
6934 using namespace Zivid::Detail::TypeTraits;
6935
6936 using AllArgsAreDescendantNodes =
6937 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6938 static_assert(
6939 AllArgsAreDescendantNodes::value,
6940 "All arguments passed to set(...) must be descendant nodes.");
6941
6942 static_assert(
6943 AllArgsDecayedAreUnique<Args...>::value,
6944 "Found duplicate types among the arguments passed to set(...). "
6945 "Types should be listed at most once.");
6946
6947 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6948 }
6949
6962#ifndef NO_DOC
6963 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6964#else
6965 template<typename... Args>
6966#endif
6967 Gaussian copyWith(Args &&...args) const
6968 {
6969 using namespace Zivid::Detail::TypeTraits;
6970
6971 using AllArgsAreDescendantNodes =
6972 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6973 static_assert(
6974 AllArgsAreDescendantNodes::value,
6975 "All arguments passed to copyWith(...) must be descendant nodes.");
6976
6977 static_assert(
6978 AllArgsDecayedAreUnique<Args...>::value,
6979 "Found duplicate types among the arguments passed to copyWith(...). "
6980 "Types should be listed at most once.");
6981
6982 auto copy{ *this };
6983 copy.set(std::forward<Args>(args)...);
6984 return copy;
6985 }
6986
6988 const Enabled &isEnabled() const
6989 {
6990 return m_enabled;
6991 }
6992
6995 {
6996 return m_enabled;
6997 }
6998
7000 Gaussian &set(const Enabled &value)
7001 {
7002 m_enabled = value;
7003 return *this;
7004 }
7005
7007 const Sigma &sigma() const
7008 {
7009 return m_sigma;
7010 }
7011
7014 {
7015 return m_sigma;
7016 }
7017
7019 Gaussian &set(const Sigma &value)
7020 {
7021 m_sigma = value;
7022 return *this;
7023 }
7024
7025 template<
7026 typename T,
7027 typename std::enable_if<
7028 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7029 int>::type = 0>
7031 {
7032 return m_enabled;
7033 }
7034
7035 template<
7036 typename T,
7037 typename std::enable_if<
7038 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7039 int>::type = 0>
7041 {
7042 return m_sigma;
7043 }
7044
7045 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7047 {
7048 return m_enabled;
7049 }
7050
7051 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7053 {
7054 return m_sigma;
7055 }
7056
7058 template<typename F>
7059 void forEach(const F &f) const
7060 {
7061 f(m_enabled);
7062 f(m_sigma);
7063 }
7064
7066 template<typename F>
7067 void forEach(const F &f)
7068 {
7069 f(m_enabled);
7070 f(m_sigma);
7071 }
7072
7074 bool operator==(const Gaussian &other) const;
7075
7077 bool operator!=(const Gaussian &other) const;
7078
7080 std::string toString() const;
7081
7083 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
7084 {
7085 return stream << value.toString();
7086 }
7087
7088 private:
7089 void setFromString(const std::string &value);
7090
7091 void setFromString(const std::string &fullPath, const std::string &value);
7092
7093 std::string getString(const std::string &fullPath) const;
7094
7095 Enabled m_enabled;
7096 Sigma m_sigma;
7097
7098 friend struct DataModel::Detail::Befriend<Gaussian>;
7099 };
7100
7101 using Descendants = std::tuple<
7105
7108
7122#ifndef NO_DOC
7123 template<
7124 typename... Args,
7125 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7126 typename std::enable_if<
7127 Zivid::Detail::TypeTraits::
7128 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7129 int>::type = 0>
7130#else
7131 template<typename... Args>
7132#endif
7133 explicit Smoothing(Args &&...args)
7134 {
7135 using namespace Zivid::Detail::TypeTraits;
7136
7137 static_assert(
7138 AllArgsDecayedAreUnique<Args...>::value,
7139 "Found duplicate types among the arguments passed to Smoothing(...). "
7140 "Types should be listed at most once.");
7141
7142 set(std::forward<Args>(args)...);
7143 }
7144
7157#ifndef NO_DOC
7158 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7159#else
7160 template<typename... Args>
7161#endif
7162 void set(Args &&...args)
7163 {
7164 using namespace Zivid::Detail::TypeTraits;
7165
7166 using AllArgsAreDescendantNodes =
7167 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7168 static_assert(
7169 AllArgsAreDescendantNodes::value,
7170 "All arguments passed to set(...) must be descendant nodes.");
7171
7172 static_assert(
7173 AllArgsDecayedAreUnique<Args...>::value,
7174 "Found duplicate types among the arguments passed to set(...). "
7175 "Types should be listed at most once.");
7176
7177 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7178 }
7179
7193#ifndef NO_DOC
7194 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7195#else
7196 template<typename... Args>
7197#endif
7198 Smoothing copyWith(Args &&...args) const
7199 {
7200 using namespace Zivid::Detail::TypeTraits;
7201
7202 using AllArgsAreDescendantNodes =
7203 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7204 static_assert(
7205 AllArgsAreDescendantNodes::value,
7206 "All arguments passed to copyWith(...) must be descendant nodes.");
7207
7208 static_assert(
7209 AllArgsDecayedAreUnique<Args...>::value,
7210 "Found duplicate types among the arguments passed to copyWith(...). "
7211 "Types should be listed at most once.");
7212
7213 auto copy{ *this };
7214 copy.set(std::forward<Args>(args)...);
7215 return copy;
7216 }
7217
7219 const Gaussian &gaussian() const
7220 {
7221 return m_gaussian;
7222 }
7223
7226 {
7227 return m_gaussian;
7228 }
7229
7231 Smoothing &set(const Gaussian &value)
7232 {
7233 m_gaussian = value;
7234 return *this;
7235 }
7236
7239 {
7240 m_gaussian.set(value);
7241 return *this;
7242 }
7243
7246 {
7247 m_gaussian.set(value);
7248 return *this;
7249 }
7250
7251 template<
7252 typename T,
7253 typename std::enable_if<
7254 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
7255 int>::type = 0>
7257 {
7258 return m_gaussian;
7259 }
7260
7261 template<
7262 typename T,
7263 typename std::enable_if<
7264 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7265 int>::type = 0>
7267 {
7269 }
7270
7271 template<
7272 typename T,
7273 typename std::enable_if<
7274 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7275 int>::type = 0>
7277 {
7279 }
7280
7281 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7283 {
7284 return m_gaussian;
7285 }
7286
7288 template<typename F>
7289 void forEach(const F &f) const
7290 {
7291 f(m_gaussian);
7292 }
7293
7295 template<typename F>
7296 void forEach(const F &f)
7297 {
7298 f(m_gaussian);
7299 }
7300
7302 bool operator==(const Smoothing &other) const;
7303
7305 bool operator!=(const Smoothing &other) const;
7306
7308 std::string toString() const;
7309
7311 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
7312 {
7313 return stream << value.toString();
7314 }
7315
7316 private:
7317 void setFromString(const std::string &value);
7318
7319 void setFromString(const std::string &fullPath, const std::string &value);
7320
7321 std::string getString(const std::string &fullPath) const;
7322
7323 Gaussian m_gaussian;
7324
7325 friend struct DataModel::Detail::Befriend<Smoothing>;
7326 };
7327
7328 using Descendants = std::tuple<
7352
7355
7389#ifndef NO_DOC
7390 template<
7391 typename... Args,
7392 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7393 typename std::enable_if<
7394 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
7395 value,
7396 int>::type = 0>
7397#else
7398 template<typename... Args>
7399#endif
7400 explicit Filters(Args &&...args)
7401 {
7402 using namespace Zivid::Detail::TypeTraits;
7403
7404 static_assert(
7405 AllArgsDecayedAreUnique<Args...>::value,
7406 "Found duplicate types among the arguments passed to Filters(...). "
7407 "Types should be listed at most once.");
7408
7409 set(std::forward<Args>(args)...);
7410 }
7411
7444#ifndef NO_DOC
7445 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7446#else
7447 template<typename... Args>
7448#endif
7449 void set(Args &&...args)
7450 {
7451 using namespace Zivid::Detail::TypeTraits;
7452
7453 using AllArgsAreDescendantNodes =
7454 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7455 static_assert(
7456 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
7457
7458 static_assert(
7459 AllArgsDecayedAreUnique<Args...>::value,
7460 "Found duplicate types among the arguments passed to set(...). "
7461 "Types should be listed at most once.");
7462
7463 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7464 }
7465
7499#ifndef NO_DOC
7500 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7501#else
7502 template<typename... Args>
7503#endif
7504 Filters copyWith(Args &&...args) const
7505 {
7506 using namespace Zivid::Detail::TypeTraits;
7507
7508 using AllArgsAreDescendantNodes =
7509 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7510 static_assert(
7511 AllArgsAreDescendantNodes::value,
7512 "All arguments passed to copyWith(...) must be descendant nodes.");
7513
7514 static_assert(
7515 AllArgsDecayedAreUnique<Args...>::value,
7516 "Found duplicate types among the arguments passed to copyWith(...). "
7517 "Types should be listed at most once.");
7518
7519 auto copy{ *this };
7520 copy.set(std::forward<Args>(args)...);
7521 return copy;
7522 }
7523
7526 {
7527 return m_experimental;
7528 }
7529
7532 {
7533 return m_experimental;
7534 }
7535
7537 Filters &set(const Experimental &value)
7538 {
7539 m_experimental = value;
7540 return *this;
7541 }
7542
7545 {
7546 m_experimental.set(value);
7547 return *this;
7548 }
7549
7552 {
7553 m_experimental.set(value);
7554 return *this;
7555 }
7556
7559 {
7560 m_experimental.set(value);
7561 return *this;
7562 }
7563
7566 {
7567 m_experimental.set(value);
7568 return *this;
7569 }
7570
7573 {
7574 m_experimental.set(value);
7575 return *this;
7576 }
7577
7580 {
7581 m_experimental.set(value);
7582 return *this;
7583 }
7584
7587 {
7588 m_experimental.set(value);
7589 return *this;
7590 }
7591
7593 const Noise &noise() const
7594 {
7595 return m_noise;
7596 }
7597
7600 {
7601 return m_noise;
7602 }
7603
7605 Filters &set(const Noise &value)
7606 {
7607 m_noise = value;
7608 return *this;
7609 }
7610
7613 {
7614 m_noise.set(value);
7615 return *this;
7616 }
7617
7620 {
7621 m_noise.set(value);
7622 return *this;
7623 }
7624
7627 {
7628 m_noise.set(value);
7629 return *this;
7630 }
7631
7633 const Outlier &outlier() const
7634 {
7635 return m_outlier;
7636 }
7637
7640 {
7641 return m_outlier;
7642 }
7643
7645 Filters &set(const Outlier &value)
7646 {
7647 m_outlier = value;
7648 return *this;
7649 }
7650
7653 {
7654 m_outlier.set(value);
7655 return *this;
7656 }
7657
7660 {
7661 m_outlier.set(value);
7662 return *this;
7663 }
7664
7667 {
7668 m_outlier.set(value);
7669 return *this;
7670 }
7671
7673 const Reflection &reflection() const
7674 {
7675 return m_reflection;
7676 }
7677
7680 {
7681 return m_reflection;
7682 }
7683
7685 Filters &set(const Reflection &value)
7686 {
7687 m_reflection = value;
7688 return *this;
7689 }
7690
7693 {
7694 m_reflection.set(value);
7695 return *this;
7696 }
7697
7700 {
7701 m_reflection.set(value);
7702 return *this;
7703 }
7704
7706 const Smoothing &smoothing() const
7707 {
7708 return m_smoothing;
7709 }
7710
7713 {
7714 return m_smoothing;
7715 }
7716
7718 Filters &set(const Smoothing &value)
7719 {
7720 m_smoothing = value;
7721 return *this;
7722 }
7723
7726 {
7727 m_smoothing.set(value);
7728 return *this;
7729 }
7730
7733 {
7734 m_smoothing.set(value);
7735 return *this;
7736 }
7737
7740 {
7741 m_smoothing.set(value);
7742 return *this;
7743 }
7744
7745 template<
7746 typename T,
7747 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
7748 type = 0>
7750 {
7751 return m_experimental;
7752 }
7753
7754 template<
7755 typename T,
7756 typename std::enable_if<
7757 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
7758 int>::type = 0>
7760 {
7762 }
7763
7764 template<
7765 typename T,
7766 typename std::enable_if<
7767 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
7768 value,
7769 int>::type = 0>
7771 {
7772 return m_experimental
7774 }
7775
7776 template<
7777 typename T,
7778 typename std::enable_if<
7779 std::is_same<
7780 T,
7782 value,
7783 int>::type = 0>
7785 {
7786 return m_experimental
7788 }
7789
7790 template<
7791 typename T,
7792 typename std::enable_if<
7793 std::is_same<
7794 T,
7796 value,
7797 int>::type = 0>
7799 {
7800 return m_experimental
7802 }
7803
7804 template<
7805 typename T,
7806 typename std::enable_if<
7807 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
7808 value,
7809 int>::type = 0>
7811 {
7812 return m_experimental
7814 }
7815
7816 template<
7817 typename T,
7818 typename std::enable_if<
7819 std::is_same<
7820 T,
7822 int>::type = 0>
7824 {
7825 return m_experimental
7827 }
7828
7829 template<
7830 typename T,
7831 typename std::enable_if<
7832 std::is_same<
7833 T,
7835 int>::type = 0>
7837 {
7838 return m_experimental
7840 }
7841
7842 template<
7843 typename T,
7844 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
7845 0>
7847 {
7848 return m_noise;
7849 }
7850
7851 template<
7852 typename T,
7853 typename std::
7854 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
7856 {
7858 }
7859
7860 template<
7861 typename T,
7862 typename std::enable_if<
7863 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7864 int>::type = 0>
7866 {
7868 }
7869
7870 template<
7871 typename T,
7872 typename std::enable_if<
7873 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7874 int>::type = 0>
7876 {
7878 }
7879
7880 template<
7881 typename T,
7882 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
7883 0>
7885 {
7886 return m_outlier;
7887 }
7888
7889 template<
7890 typename T,
7891 typename std::enable_if<
7892 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
7893 int>::type = 0>
7895 {
7897 }
7898
7899 template<
7900 typename T,
7901 typename std::enable_if<
7902 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
7903 int>::type = 0>
7905 {
7907 }
7908
7909 template<
7910 typename T,
7911 typename std::enable_if<
7912 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
7913 int>::type = 0>
7915 {
7917 }
7918
7919 template<
7920 typename T,
7921 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
7922 type = 0>
7924 {
7925 return m_reflection;
7926 }
7927
7928 template<
7929 typename T,
7930 typename std::enable_if<
7931 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
7932 int>::type = 0>
7934 {
7936 }
7937
7938 template<
7939 typename T,
7940 typename std::enable_if<
7941 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
7942 int>::type = 0>
7944 {
7946 }
7947
7948 template<
7949 typename T,
7950 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
7951 type = 0>
7953 {
7954 return m_smoothing;
7955 }
7956
7957 template<
7958 typename T,
7959 typename std::enable_if<
7960 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
7961 int>::type = 0>
7963 {
7965 }
7966
7967 template<
7968 typename T,
7969 typename std::enable_if<
7970 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7971 int>::type = 0>
7973 {
7975 }
7976
7977 template<
7978 typename T,
7979 typename std::enable_if<
7980 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7981 int>::type = 0>
7983 {
7985 }
7986
7987 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7989 {
7990 return m_experimental;
7991 }
7992
7993 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7995 {
7996 return m_noise;
7997 }
7998
7999 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
8001 {
8002 return m_outlier;
8003 }
8004
8005 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
8007 {
8008 return m_reflection;
8009 }
8010
8011 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
8013 {
8014 return m_smoothing;
8015 }
8016
8018 template<typename F>
8019 void forEach(const F &f) const
8020 {
8021 f(m_experimental);
8022 f(m_noise);
8023 f(m_outlier);
8024 f(m_reflection);
8025 f(m_smoothing);
8026 }
8027
8029 template<typename F>
8030 void forEach(const F &f)
8031 {
8032 f(m_experimental);
8033 f(m_noise);
8034 f(m_outlier);
8035 f(m_reflection);
8036 f(m_smoothing);
8037 }
8038
8040 bool operator==(const Filters &other) const;
8041
8043 bool operator!=(const Filters &other) const;
8044
8046 std::string toString() const;
8047
8049 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
8050 {
8051 return stream << value.toString();
8052 }
8053
8054 private:
8055 void setFromString(const std::string &value);
8056
8057 void setFromString(const std::string &fullPath, const std::string &value);
8058
8059 std::string getString(const std::string &fullPath) const;
8060
8061 Experimental m_experimental;
8062 Noise m_noise;
8063 Outlier m_outlier;
8064 Reflection m_reflection;
8065 Smoothing m_smoothing;
8066
8067 friend struct DataModel::Detail::Befriend<Filters>;
8068 };
8069
8070 using Descendants = std::tuple<
8104
8107
8151#ifndef NO_DOC
8152 template<
8153 typename... Args,
8154 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8155 typename std::enable_if<
8156 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
8157 value,
8158 int>::type = 0>
8159#else
8160 template<typename... Args>
8161#endif
8162 explicit Processing(Args &&...args)
8163 {
8164 using namespace Zivid::Detail::TypeTraits;
8165
8166 static_assert(
8167 AllArgsDecayedAreUnique<Args...>::value,
8168 "Found duplicate types among the arguments passed to Processing(...). "
8169 "Types should be listed at most once.");
8170
8171 set(std::forward<Args>(args)...);
8172 }
8173
8216#ifndef NO_DOC
8217 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8218#else
8219 template<typename... Args>
8220#endif
8221 void set(Args &&...args)
8222 {
8223 using namespace Zivid::Detail::TypeTraits;
8224
8225 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8226 static_assert(
8227 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
8228
8229 static_assert(
8230 AllArgsDecayedAreUnique<Args...>::value,
8231 "Found duplicate types among the arguments passed to set(...). "
8232 "Types should be listed at most once.");
8233
8234 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8235 }
8236
8280#ifndef NO_DOC
8281 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8282#else
8283 template<typename... Args>
8284#endif
8285 Processing copyWith(Args &&...args) const
8286 {
8287 using namespace Zivid::Detail::TypeTraits;
8288
8289 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8290 static_assert(
8291 AllArgsAreDescendantNodes::value,
8292 "All arguments passed to copyWith(...) must be descendant nodes.");
8293
8294 static_assert(
8295 AllArgsDecayedAreUnique<Args...>::value,
8296 "Found duplicate types among the arguments passed to copyWith(...). "
8297 "Types should be listed at most once.");
8298
8299 auto copy{ *this };
8300 copy.set(std::forward<Args>(args)...);
8301 return copy;
8302 }
8303
8305 const Color &color() const
8306 {
8307 return m_color;
8308 }
8309
8312 {
8313 return m_color;
8314 }
8315
8317 Processing &set(const Color &value)
8318 {
8319 m_color = value;
8320 return *this;
8321 }
8322
8325 {
8326 m_color.set(value);
8327 return *this;
8328 }
8329
8332 {
8333 m_color.set(value);
8334 return *this;
8335 }
8336
8339 {
8340 m_color.set(value);
8341 return *this;
8342 }
8343
8346 {
8347 m_color.set(value);
8348 return *this;
8349 }
8350
8353 {
8354 m_color.set(value);
8355 return *this;
8356 }
8357
8360 {
8361 m_color.set(value);
8362 return *this;
8363 }
8364
8367 {
8368 m_color.set(value);
8369 return *this;
8370 }
8371
8374 {
8375 m_color.set(value);
8376 return *this;
8377 }
8378
8380 const Filters &filters() const
8381 {
8382 return m_filters;
8383 }
8384
8387 {
8388 return m_filters;
8389 }
8390
8392 Processing &set(const Filters &value)
8393 {
8394 m_filters = value;
8395 return *this;
8396 }
8397
8400 {
8401 m_filters.set(value);
8402 return *this;
8403 }
8404
8407 {
8408 m_filters.set(value);
8409 return *this;
8410 }
8411
8414 {
8415 m_filters.set(value);
8416 return *this;
8417 }
8418
8421 {
8422 m_filters.set(value);
8423 return *this;
8424 }
8425
8428 {
8429 m_filters.set(value);
8430 return *this;
8431 }
8432
8435 {
8436 m_filters.set(value);
8437 return *this;
8438 }
8439
8442 {
8443 m_filters.set(value);
8444 return *this;
8445 }
8446
8449 {
8450 m_filters.set(value);
8451 return *this;
8452 }
8453
8456 {
8457 m_filters.set(value);
8458 return *this;
8459 }
8460
8463 {
8464 m_filters.set(value);
8465 return *this;
8466 }
8467
8470 {
8471 m_filters.set(value);
8472 return *this;
8473 }
8474
8477 {
8478 m_filters.set(value);
8479 return *this;
8480 }
8481
8484 {
8485 m_filters.set(value);
8486 return *this;
8487 }
8488
8491 {
8492 m_filters.set(value);
8493 return *this;
8494 }
8495
8498 {
8499 m_filters.set(value);
8500 return *this;
8501 }
8502
8505 {
8506 m_filters.set(value);
8507 return *this;
8508 }
8509
8512 {
8513 m_filters.set(value);
8514 return *this;
8515 }
8516
8519 {
8520 m_filters.set(value);
8521 return *this;
8522 }
8523
8526 {
8527 m_filters.set(value);
8528 return *this;
8529 }
8530
8533 {
8534 m_filters.set(value);
8535 return *this;
8536 }
8537
8540 {
8541 m_filters.set(value);
8542 return *this;
8543 }
8544
8547 {
8548 m_filters.set(value);
8549 return *this;
8550 }
8551
8554 {
8555 m_filters.set(value);
8556 return *this;
8557 }
8558
8559 template<
8560 typename T,
8561 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8563 {
8564 return m_color;
8565 }
8566
8567 template<
8568 typename T,
8569 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8571 {
8572 return m_color.get<Settings::Processing::Color::Balance>();
8573 }
8574
8575 template<
8576 typename T,
8577 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
8578 0>
8580 {
8581 return m_color.get<Settings::Processing::Color::Balance::Blue>();
8582 }
8583
8584 template<
8585 typename T,
8586 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
8587 type = 0>
8589 {
8590 return m_color.get<Settings::Processing::Color::Balance::Green>();
8591 }
8592
8593 template<
8594 typename T,
8595 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
8596 0>
8598 {
8599 return m_color.get<Settings::Processing::Color::Balance::Red>();
8600 }
8601
8602 template<
8603 typename T,
8604 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
8605 0>
8607 {
8609 }
8610
8611 template<
8612 typename T,
8613 typename std::enable_if<
8614 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
8615 int>::type = 0>
8617 {
8619 }
8620
8621 template<
8622 typename T,
8623 typename std::enable_if<
8624 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
8625 int>::type = 0>
8627 {
8629 }
8630
8631 template<
8632 typename T,
8633 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
8635 {
8636 return m_color.get<Settings::Processing::Color::Gamma>();
8637 }
8638
8639 template<
8640 typename T,
8641 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
8643 {
8644 return m_filters;
8645 }
8646
8647 template<
8648 typename T,
8649 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
8650 type = 0>
8652 {
8654 }
8655
8656 template<
8657 typename T,
8658 typename std::enable_if<
8659 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
8660 int>::type = 0>
8662 {
8664 }
8665
8666 template<
8667 typename T,
8668 typename std::enable_if<
8669 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
8670 int>::type = 0>
8672 {
8674 }
8675
8676 template<
8677 typename T,
8678 typename std::enable_if<
8679 std::is_same<
8680 T,
8682 int>::type = 0>
8684 {
8685 return m_filters
8687 }
8688
8689 template<
8690 typename T,
8691 typename std::enable_if<
8692 std::is_same<
8693 T,
8695 int>::type = 0>
8697 {
8698 return m_filters
8700 }
8701
8702 template<
8703 typename T,
8704 typename std::enable_if<
8705 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
8706 int>::type = 0>
8708 {
8710 }
8711
8712 template<
8713 typename T,
8714 typename std::enable_if<
8715 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
8716 value,
8717 int>::type = 0>
8719 {
8720 return m_filters
8722 }
8723
8724 template<
8725 typename T,
8726 typename std::enable_if<
8727 std::is_same<
8728 T,
8730 int>::type = 0>
8732 {
8733 return m_filters
8735 }
8736
8737 template<
8738 typename T,
8739 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
8741 {
8742 return m_filters.get<Settings::Processing::Filters::Noise>();
8743 }
8744
8745 template<
8746 typename T,
8747 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
8748 type = 0>
8750 {
8752 }
8753
8754 template<
8755 typename T,
8756 typename std::enable_if<
8757 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
8758 int>::type = 0>
8760 {
8762 }
8763
8764 template<
8765 typename T,
8766 typename std::enable_if<
8767 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
8768 int>::type = 0>
8770 {
8772 }
8773
8774 template<
8775 typename T,
8776 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
8778 {
8779 return m_filters.get<Settings::Processing::Filters::Outlier>();
8780 }
8781
8782 template<
8783 typename T,
8784 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
8785 type = 0>
8787 {
8789 }
8790
8791 template<
8792 typename T,
8793 typename std::enable_if<
8794 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8795 int>::type = 0>
8797 {
8799 }
8800
8801 template<
8802 typename T,
8803 typename std::enable_if<
8804 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8805 int>::type = 0>
8807 {
8809 }
8810
8811 template<
8812 typename T,
8813 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
8814 0>
8816 {
8818 }
8819
8820 template<
8821 typename T,
8822 typename std::enable_if<
8823 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
8824 int>::type = 0>
8826 {
8828 }
8829
8830 template<
8831 typename T,
8832 typename std::enable_if<
8833 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8834 int>::type = 0>
8836 {
8838 }
8839
8840 template<
8841 typename T,
8842 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
8843 0>
8845 {
8847 }
8848
8849 template<
8850 typename T,
8851 typename std::enable_if<
8852 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
8853 int>::type = 0>
8855 {
8857 }
8858
8859 template<
8860 typename T,
8861 typename std::enable_if<
8862 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
8863 int>::type = 0>
8865 {
8867 }
8868
8869 template<
8870 typename T,
8871 typename std::enable_if<
8872 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
8873 int>::type = 0>
8875 {
8877 }
8878
8879 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8881 {
8882 return m_color;
8883 }
8884
8885 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8887 {
8888 return m_filters;
8889 }
8890
8892 template<typename F>
8893 void forEach(const F &f) const
8894 {
8895 f(m_color);
8896 f(m_filters);
8897 }
8898
8900 template<typename F>
8901 void forEach(const F &f)
8902 {
8903 f(m_color);
8904 f(m_filters);
8905 }
8906
8908 bool operator==(const Processing &other) const;
8909
8911 bool operator!=(const Processing &other) const;
8912
8914 std::string toString() const;
8915
8917 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
8918 {
8919 return stream << value.toString();
8920 }
8921
8922 private:
8923 void setFromString(const std::string &value);
8924
8925 void setFromString(const std::string &fullPath, const std::string &value);
8926
8927 std::string getString(const std::string &fullPath) const;
8928
8929 Color m_color;
8930 Filters m_filters;
8931
8932 friend struct DataModel::Detail::Befriend<Processing>;
8933 };
8934
8935 using Descendants = std::tuple<
8975
8978
8980 explicit Settings(const std::string &fileName);
8981
9031#ifndef NO_DOC
9032 template<
9033 typename... Args,
9034 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9035 typename std::enable_if<
9036 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9037 int>::type = 0>
9038#else
9039 template<typename... Args>
9040#endif
9041 explicit Settings(Args &&...args)
9042 {
9043 using namespace Zivid::Detail::TypeTraits;
9044
9045 static_assert(
9046 AllArgsDecayedAreUnique<Args...>::value,
9047 "Found duplicate types among the arguments passed to Settings(...). "
9048 "Types should be listed at most once.");
9049
9050 set(std::forward<Args>(args)...);
9051 }
9052
9101#ifndef NO_DOC
9102 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9103#else
9104 template<typename... Args>
9105#endif
9106 void set(Args &&...args)
9107 {
9108 using namespace Zivid::Detail::TypeTraits;
9109
9110 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9111 static_assert(
9112 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
9113
9114 static_assert(
9115 AllArgsDecayedAreUnique<Args...>::value,
9116 "Found duplicate types among the arguments passed to set(...). "
9117 "Types should be listed at most once.");
9118
9119 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9120 }
9121
9171#ifndef NO_DOC
9172 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9173#else
9174 template<typename... Args>
9175#endif
9176 Settings copyWith(Args &&...args) const
9177 {
9178 using namespace Zivid::Detail::TypeTraits;
9179
9180 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9181 static_assert(
9182 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
9183
9184 static_assert(
9185 AllArgsDecayedAreUnique<Args...>::value,
9186 "Found duplicate types among the arguments passed to copyWith(...). "
9187 "Types should be listed at most once.");
9188
9189 auto copy{ *this };
9190 copy.set(std::forward<Args>(args)...);
9191 return copy;
9192 }
9193
9196 {
9197 return m_acquisitions;
9198 }
9199
9202 {
9203 return m_acquisitions;
9204 }
9205
9208 {
9209 m_acquisitions = value;
9210 return *this;
9211 }
9212
9215 {
9216 return m_diagnostics;
9217 }
9218
9221 {
9222 return m_diagnostics;
9223 }
9224
9226 Settings &set(const Diagnostics &value)
9227 {
9228 m_diagnostics = value;
9229 return *this;
9230 }
9231
9234 {
9235 m_diagnostics.set(value);
9236 return *this;
9237 }
9238
9241 {
9242 return m_experimental;
9243 }
9244
9247 {
9248 return m_experimental;
9249 }
9250
9253 {
9254 m_experimental = value;
9255 return *this;
9256 }
9257
9260 {
9261 m_experimental.set(value);
9262 return *this;
9263 }
9264
9266 const Processing &processing() const
9267 {
9268 return m_processing;
9269 }
9270
9273 {
9274 return m_processing;
9275 }
9276
9278 Settings &set(const Processing &value)
9279 {
9280 m_processing = value;
9281 return *this;
9282 }
9283
9286 {
9287 m_processing.set(value);
9288 return *this;
9289 }
9290
9293 {
9294 m_processing.set(value);
9295 return *this;
9296 }
9297
9300 {
9301 m_processing.set(value);
9302 return *this;
9303 }
9304
9307 {
9308 m_processing.set(value);
9309 return *this;
9310 }
9311
9314 {
9315 m_processing.set(value);
9316 return *this;
9317 }
9318
9321 {
9322 m_processing.set(value);
9323 return *this;
9324 }
9325
9328 {
9329 m_processing.set(value);
9330 return *this;
9331 }
9332
9335 {
9336 m_processing.set(value);
9337 return *this;
9338 }
9339
9342 {
9343 m_processing.set(value);
9344 return *this;
9345 }
9346
9349 {
9350 m_processing.set(value);
9351 return *this;
9352 }
9353
9356 {
9357 m_processing.set(value);
9358 return *this;
9359 }
9360
9363 {
9364 m_processing.set(value);
9365 return *this;
9366 }
9367
9370 {
9371 m_processing.set(value);
9372 return *this;
9373 }
9374
9377 {
9378 m_processing.set(value);
9379 return *this;
9380 }
9381
9384 {
9385 m_processing.set(value);
9386 return *this;
9387 }
9388
9391 {
9392 m_processing.set(value);
9393 return *this;
9394 }
9395
9398 {
9399 m_processing.set(value);
9400 return *this;
9401 }
9402
9405 {
9406 m_processing.set(value);
9407 return *this;
9408 }
9409
9412 {
9413 m_processing.set(value);
9414 return *this;
9415 }
9416
9419 {
9420 m_processing.set(value);
9421 return *this;
9422 }
9423
9426 {
9427 m_processing.set(value);
9428 return *this;
9429 }
9430
9433 {
9434 m_processing.set(value);
9435 return *this;
9436 }
9437
9440 {
9441 m_processing.set(value);
9442 return *this;
9443 }
9444
9447 {
9448 m_processing.set(value);
9449 return *this;
9450 }
9451
9454 {
9455 m_processing.set(value);
9456 return *this;
9457 }
9458
9461 {
9462 m_processing.set(value);
9463 return *this;
9464 }
9465
9468 {
9469 m_processing.set(value);
9470 return *this;
9471 }
9472
9475 {
9476 m_processing.set(value);
9477 return *this;
9478 }
9479
9482 {
9483 m_processing.set(value);
9484 return *this;
9485 }
9486
9489 {
9490 m_processing.set(value);
9491 return *this;
9492 }
9493
9496 {
9497 m_processing.set(value);
9498 return *this;
9499 }
9500
9503 {
9504 m_processing.set(value);
9505 return *this;
9506 }
9507
9510 {
9511 m_processing.set(value);
9512 return *this;
9513 }
9514
9515 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
9517 {
9518 return m_acquisitions;
9519 }
9520
9521 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
9523 {
9524 return m_diagnostics;
9525 }
9526
9527 template<
9528 typename T,
9529 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
9531 {
9532 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
9533 }
9534
9535 template<typename T, typename std::enable_if<std::is_same<T, Settings::Experimental>::value, int>::type = 0>
9537 {
9538 return m_experimental;
9539 }
9540
9541 template<
9542 typename T,
9543 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
9545 {
9546 return m_experimental.get<Settings::Experimental::Engine>();
9547 }
9548
9549 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
9551 {
9552 return m_processing;
9553 }
9554
9555 template<
9556 typename T,
9557 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
9559 {
9560 return m_processing.get<Settings::Processing::Color>();
9561 }
9562
9563 template<
9564 typename T,
9565 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
9567 {
9568 return m_processing.get<Settings::Processing::Color::Balance>();
9569 }
9570
9571 template<
9572 typename T,
9573 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
9575 {
9576 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
9577 }
9578
9579 template<
9580 typename T,
9581 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
9583 {
9584 return m_processing.get<Settings::Processing::Color::Balance::Green>();
9585 }
9586
9587 template<
9588 typename T,
9589 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
9591 {
9592 return m_processing.get<Settings::Processing::Color::Balance::Red>();
9593 }
9594
9595 template<
9596 typename T,
9597 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
9599 {
9600 return m_processing.get<Settings::Processing::Color::Experimental>();
9601 }
9602
9603 template<
9604 typename T,
9605 typename std::enable_if<
9606 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
9607 int>::type = 0>
9609 {
9611 }
9612
9613 template<
9614 typename T,
9615 typename std::enable_if<
9616 std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
9617 int>::type = 0>
9619 {
9621 }
9622
9623 template<
9624 typename T,
9625 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
9627 {
9628 return m_processing.get<Settings::Processing::Color::Gamma>();
9629 }
9630
9631 template<
9632 typename T,
9633 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
9635 {
9636 return m_processing.get<Settings::Processing::Filters>();
9637 }
9638
9639 template<
9640 typename T,
9641 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
9643 {
9644 return m_processing.get<Settings::Processing::Filters::Experimental>();
9645 }
9646
9647 template<
9648 typename T,
9649 typename std::enable_if<
9650 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9651 int>::type = 0>
9653 {
9655 }
9656
9657 template<
9658 typename T,
9659 typename std::enable_if<
9660 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9661 int>::type = 0>
9663 {
9665 }
9666
9667 template<
9668 typename T,
9669 typename std::enable_if<
9670 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
9671 value,
9672 int>::type = 0>
9674 {
9675 return m_processing
9677 }
9678
9679 template<
9680 typename T,
9681 typename std::enable_if<
9682 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
9683 value,
9684 int>::type = 0>
9686 {
9687 return m_processing
9689 }
9690
9691 template<
9692 typename T,
9693 typename std::enable_if<
9694 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9695 int>::type = 0>
9697 {
9699 }
9700
9701 template<
9702 typename T,
9703 typename std::enable_if<
9704 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
9705 value,
9706 int>::type = 0>
9708 {
9709 return m_processing
9711 }
9712
9713 template<
9714 typename T,
9715 typename std::enable_if<
9716 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
9717 value,
9718 int>::type = 0>
9720 {
9721 return m_processing
9723 }
9724
9725 template<
9726 typename T,
9727 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
9729 {
9730 return m_processing.get<Settings::Processing::Filters::Noise>();
9731 }
9732
9733 template<
9734 typename T,
9735 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
9736 0>
9738 {
9740 }
9741
9742 template<
9743 typename T,
9744 typename std::enable_if<
9745 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
9746 int>::type = 0>
9748 {
9750 }
9751
9752 template<
9753 typename T,
9754 typename std::enable_if<
9755 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
9756 int>::type = 0>
9758 {
9760 }
9761
9762 template<
9763 typename T,
9764 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
9766 {
9767 return m_processing.get<Settings::Processing::Filters::Outlier>();
9768 }
9769
9770 template<
9771 typename T,
9772 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
9773 type = 0>
9775 {
9777 }
9778
9779 template<
9780 typename T,
9781 typename std::enable_if<
9782 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
9783 int>::type = 0>
9785 {
9787 }
9788
9789 template<
9790 typename T,
9791 typename std::enable_if<
9792 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
9793 int>::type = 0>
9795 {
9797 }
9798
9799 template<
9800 typename T,
9801 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
9803 {
9804 return m_processing.get<Settings::Processing::Filters::Reflection>();
9805 }
9806
9807 template<
9808 typename T,
9809 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
9810 type = 0>
9812 {
9814 }
9815
9816 template<
9817 typename T,
9818 typename std::enable_if<
9819 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9820 int>::type = 0>
9822 {
9824 }
9825
9826 template<
9827 typename T,
9828 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
9830 {
9831 return m_processing.get<Settings::Processing::Filters::Smoothing>();
9832 }
9833
9834 template<
9835 typename T,
9836 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
9837 type = 0>
9839 {
9841 }
9842
9843 template<
9844 typename T,
9845 typename std::enable_if<
9846 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9847 int>::type = 0>
9849 {
9851 }
9852
9853 template<
9854 typename T,
9855 typename std::enable_if<
9856 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9857 int>::type = 0>
9859 {
9861 }
9862
9863 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9865 {
9866 return m_acquisitions;
9867 }
9868
9869 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9871 {
9872 return m_diagnostics;
9873 }
9874
9875 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
9877 {
9878 return m_experimental;
9879 }
9880
9881 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
9883 {
9884 return m_processing;
9885 }
9886
9888 template<typename F>
9889 void forEach(const F &f) const
9890 {
9891 f(m_acquisitions);
9892 f(m_diagnostics);
9893 f(m_experimental);
9894 f(m_processing);
9895 }
9896
9898 template<typename F>
9899 void forEach(const F &f)
9900 {
9901 f(m_acquisitions);
9902 f(m_diagnostics);
9903 f(m_experimental);
9904 f(m_processing);
9905 }
9906
9908 bool operator==(const Settings &other) const;
9909
9911 bool operator!=(const Settings &other) const;
9912
9914 std::string toString() const;
9915
9917 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
9918 {
9919 return stream << value.toString();
9920 }
9921
9923 void save(const std::string &fileName) const;
9924
9926 void load(const std::string &fileName);
9927
9928 private:
9929 void setFromString(const std::string &value);
9930
9931 void setFromString(const std::string &fullPath, const std::string &value);
9932
9933 std::string getString(const std::string &fullPath) const;
9934
9935 Acquisitions m_acquisitions;
9936 Diagnostics m_diagnostics;
9937 Experimental m_experimental;
9938 Processing m_processing;
9939
9940 friend struct DataModel::Detail::Befriend<Settings>;
9941 };
9942
9943#ifndef NO_DOC
9944 template<>
9945 struct Settings::Version<10>
9946 {
9947 using Type = Settings;
9948 };
9949#endif
9950
9951} // namespace Zivid
9952
9953#ifdef _MSC_VER
9954# pragma warning(pop)
9955#endif
9956
9957#ifndef NO_DOC
9958# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
9959namespace std // NOLINT
9960{
9961
9962 template<>
9963 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
9964 {};
9965
9966 template<size_t i>
9967 struct tuple_element<i, Zivid::Settings::Diagnostics>
9968 {
9969 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
9970
9971 using type // NOLINT
9972 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
9973 };
9974
9975 template<>
9976 struct tuple_size<Zivid::Settings::Experimental> : integral_constant<size_t, 1>
9977 {};
9978
9979 template<size_t i>
9980 struct tuple_element<i, Zivid::Settings::Experimental>
9981 {
9982 static_assert(i < tuple_size<Zivid::Settings::Experimental>::value, "Index must be less than 1");
9983
9984 using type // NOLINT
9985 = decltype(declval<Zivid::Settings::Experimental>().get<i>());
9986 };
9987
9988 template<>
9989 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 2>
9990 {};
9991
9992 template<size_t i>
9993 struct tuple_element<i, Zivid::Settings::Processing>
9994 {
9995 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 2");
9996
9997 using type // NOLINT
9998 = decltype(declval<Zivid::Settings::Processing>().get<i>());
9999 };
10000
10001 template<>
10002 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
10003 {};
10004
10005 template<size_t i>
10006 struct tuple_element<i, Zivid::Settings::Processing::Color>
10007 {
10008 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
10009
10010 using type // NOLINT
10011 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
10012 };
10013
10014 template<>
10015 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
10016 {};
10017
10018 template<size_t i>
10019 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
10020 {
10021 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
10022
10023 using type // NOLINT
10024 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
10025 };
10026
10027 template<>
10028 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
10029 {};
10030
10031 template<size_t i>
10032 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
10033 {
10034 static_assert(
10035 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
10036 "Index must be less than 1");
10037
10038 using type // NOLINT
10039 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
10040 };
10041
10042 template<>
10043 struct tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping> : integral_constant<size_t, 1>
10044 {};
10045
10046 template<size_t i>
10047 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental::ToneMapping>
10048 {
10049 static_assert(
10050 i < tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping>::value,
10051 "Index must be less than 1");
10052
10053 using type // NOLINT
10054 = decltype(declval<Zivid::Settings::Processing::Color::Experimental::ToneMapping>().get<i>());
10055 };
10056
10057 template<>
10058 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 5>
10059 {};
10060
10061 template<size_t i>
10062 struct tuple_element<i, Zivid::Settings::Processing::Filters>
10063 {
10064 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 5");
10065
10066 using type // NOLINT
10067 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
10068 };
10069
10070 template<>
10071 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
10072 {};
10073
10074 template<size_t i>
10075 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
10076 {
10077 static_assert(
10078 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
10079 "Index must be less than 1");
10080
10081 using type // NOLINT
10082 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
10083 };
10084
10085 template<>
10086 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
10087 : integral_constant<size_t, 2>
10088 {};
10089
10090 template<size_t i>
10091 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
10092 {
10093 static_assert(
10094 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10095 "Index must be less than 2");
10096
10097 using type // NOLINT
10098 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
10099 };
10100
10101 template<>
10102 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
10103 : integral_constant<size_t, 2>
10104 {};
10105
10106 template<size_t i>
10107 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
10108 {
10109 static_assert(
10110 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
10111 "Index must be less than 2");
10112
10113 using type // NOLINT
10114 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
10115 .get<i>());
10116 };
10117
10118 template<>
10119 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
10120 : integral_constant<size_t, 2>
10121 {};
10122
10123 template<size_t i>
10124 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
10125 {
10126 static_assert(
10127 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
10128 "Index must be less than 2");
10129
10130 using type // NOLINT
10131 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
10132 .get<i>());
10133 };
10134
10135 template<>
10136 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 1>
10137 {};
10138
10139 template<size_t i>
10140 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
10141 {
10142 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 1");
10143
10144 using type // NOLINT
10145 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
10146 };
10147
10148 template<>
10149 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
10150 {};
10151
10152 template<size_t i>
10153 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
10154 {
10155 static_assert(
10156 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
10157 "Index must be less than 2");
10158
10159 using type // NOLINT
10160 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
10161 };
10162
10163 template<>
10164 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
10165 {};
10166
10167 template<size_t i>
10168 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
10169 {
10170 static_assert(
10171 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
10172 "Index must be less than 1");
10173
10174 using type // NOLINT
10175 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
10176 };
10177
10178 template<>
10179 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
10180 {};
10181
10182 template<size_t i>
10183 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
10184 {
10185 static_assert(
10186 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
10187 "Index must be less than 2");
10188
10189 using type // NOLINT
10190 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
10191 };
10192
10193 template<>
10194 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
10195 {};
10196
10197 template<size_t i>
10198 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
10199 {
10200 static_assert(
10201 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
10202 "Index must be less than 1");
10203
10204 using type // NOLINT
10205 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
10206 };
10207
10208 template<>
10209 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 1>
10210 {};
10211
10212 template<size_t i>
10213 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
10214 {
10215 static_assert(
10216 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
10217 "Index must be less than 1");
10218
10219 using type // NOLINT
10220 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
10221 };
10222
10223 template<>
10224 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
10225 {};
10226
10227 template<size_t i>
10228 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
10229 {
10230 static_assert(
10231 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
10232 "Index must be less than 1");
10233
10234 using type // NOLINT
10235 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
10236 };
10237
10238 template<>
10239 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
10240 {};
10241
10242 template<size_t i>
10243 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
10244 {
10245 static_assert(
10246 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
10247 "Index must be less than 2");
10248
10249 using type // NOLINT
10250 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
10251 };
10252
10253 template<>
10254 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 4>
10255 {};
10256
10257 template<size_t i>
10258 struct tuple_element<i, Zivid::Settings>
10259 {
10260 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 4");
10261
10262 using type // NOLINT
10263 = decltype(declval<Zivid::Settings>().get<i>());
10264 };
10265
10266} // namespace std
10267# endif
10268#endif
10269
10270// If we have access to the DataModel library, automatically include internal DataModel
10271// header. This header is necessary for serialization and deserialization.
10272#if defined(__has_include) && !defined(NO_DOC)
10273# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelSerializationMetaData.h")
10274# include "Zivid/SettingsInternal.h"
10275# endif
10276#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:282
bool operator!=(const Brightness &other) const
Comparison operator
Definition: Settings.h:349
bool operator<(const Brightness &other) const
Comparison operator
Definition: Settings.h:355
bool operator>(const Brightness &other) const
Comparison operator
Definition: Settings.h:361
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Brightness
Definition: Settings.h:314
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:367
constexpr Brightness(double value)
Constructor
Definition: Settings.h:323
bool hasValue() const
Check if the value is set
Brightness()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:311
bool operator==(const Brightness &other) const
Comparison operator
Definition: Settings.h:343
Exposure time for each single image in the measurement. Affects frame rate.
Definition: Settings.h:391
bool operator<(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:452
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:458
std::chrono::microseconds ValueType
The type of the underlying value
Definition: Settings.h:408
bool operator==(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:440
bool operator!=(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:446
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:411
constexpr ExposureTime(std::chrono::microseconds value)
Constructor
Definition: Settings.h:420
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream
Definition: Settings.h:464
Analog gain in the camera
Definition: Settings.h:489
bool operator==(const Gain &other) const
Comparison operator
Definition: Settings.h:536
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream
Definition: Settings.h:560
constexpr Gain(double value)
Constructor
Definition: Settings.h:516
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Gain
Definition: Settings.h:507
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:504
std::string toString() const
Get the value as string
bool operator!=(const Gain &other) const
Comparison operator
Definition: Settings.h:542
bool operator>(const Gain &other) const
Comparison operator
Definition: Settings.h:554
bool operator<(const Gain &other) const
Comparison operator
Definition: Settings.h:548
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:834
Acquisition & set(const Aperture &value)
Set Aperture
Definition: Settings.h:713
const Aperture & aperture() const
Get Aperture
Definition: Settings.h:701
Gain & gain()
Get Gain
Definition: Settings.h:764
const Settings::Acquisition::Aperture & get() const
Definition: Settings.h:779
Brightness & brightness()
Get Brightness
Definition: Settings.h:726
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream
Definition: Settings.h:862
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition: Settings.h:586
bool operator==(const Acquisition &other) const
Equality operator
const Settings::Acquisition::ExposureTime & get() const
Definition: Settings.h:795
bool operator!=(const Acquisition &other) const
Inequality operator
const ExposureTime & exposureTime() const
Get ExposureTime
Definition: Settings.h:739
Acquisition & set(const Brightness &value)
Set Brightness
Definition: Settings.h:732
Acquisition & set(const ExposureTime &value)
Set ExposureTime
Definition: Settings.h:751
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:646
const Brightness & brightness() const
Get Brightness
Definition: Settings.h:720
const Settings::Acquisition::Gain & get() const
Definition: Settings.h:803
Acquisition & set(const Gain &value)
Set Gain
Definition: Settings.h:770
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:681
Aperture & aperture()
Get Aperture
Definition: Settings.h:707
const Settings::Acquisition::Brightness & get() const
Definition: Settings.h:787
Acquisition(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:616
ExposureTime & exposureTime()
Get ExposureTime
Definition: Settings.h:745
const Gain & gain() const
Get Gain
Definition: Settings.h:758
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:844
List of Acquisition objects
Definition: Settings.h:884
bool operator!=(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:998
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:983
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:992
Acquisitions()=default
Default constructor
Acquisitions(std::initializer_list< Settings::Acquisition > value)
Constructor
Definition: Settings.h:916
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream
Definition: Settings.h:1004
void forEach(const F &f)
Run the given function on each element in the list
Definition: Settings.h:973
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor
Definition: Settings.h:911
std::vector< Settings::Acquisition > ValueType
The type of the underlying value
Definition: Settings.h:899
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions
Definition: Settings.h:902
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:1049
static const Enabled no
Off/disabled.
Definition: Settings.h:1066
bool hasValue() const
Check if the value is set
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:1069
void reset()
Reset the node to unset state
Enabled()=default
Default constructor
bool ValueType
The type of the underlying value
Definition: Settings.h:1064
static const Enabled yes
On/enabled.
Definition: Settings.h:1065
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:1098
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:1110
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:1078
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:1104
std::string toString() const
Get the value as string
When Diagnostics is enabled, extra diagnostic information is recorded during capture....
Definition: Settings.h:1025
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream
Definition: Settings.h:1285
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:1263
std::tuple< Settings::Diagnostics::Enabled > Descendants
Definition: Settings.h:1123
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:1209
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1270
Diagnostics()
Default constructor
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:1235
bool operator==(const Diagnostics &other) const
Equality operator
Diagnostics(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1150
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1177
const Settings::Diagnostics::Enabled & get() const
Definition: Settings.h:1250
bool operator!=(const Diagnostics &other) const
Inequality operator
Diagnostics & set(const Enabled &value)
Set Enabled
Definition: Settings.h:1241
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:1229
Set the Zivid Vision Engine to use.
Definition: Settings.h:1330
ValueType value() const
Get the value
static const Engine phase
phase
Definition: Settings.h:1358
bool hasValue() const
Check if the value is set
ValueType
The type of the underlying value
Definition: Settings.h:1354
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream
Definition: Settings.h:1409
static std::set< ValueType > validValues()
All valid values of Engine
Definition: Settings.h:1362
std::string toString() const
Get the value as string
bool operator==(const Engine &other) const
Comparison operator
Definition: Settings.h:1397
Engine()=default
Default constructor
bool operator!=(const Engine &other) const
Comparison operator
Definition: Settings.h:1403
constexpr Engine(ValueType value)
Constructor
Definition: Settings.h:1371
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:1391
static const Engine stripe
stripe
Definition: Settings.h:1359
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:1304
Engine & engine()
Get Engine
Definition: Settings.h:1544
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1486
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:1518
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:1594
const Settings::Experimental::Engine & get() const
Definition: Settings.h:1559
std::tuple< Settings::Experimental::Engine > Descendants
Definition: Settings.h:1432
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:1572
bool operator==(const Experimental &other) const
Equality operator
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1459
Experimental()
Default constructor
Experimental & set(const Engine &value)
Set Engine
Definition: Settings.h:1550
const Engine & engine() const
Get Engine
Definition: Settings.h:1538
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1579
Digital gain applied to blue channel
Definition: Settings.h:1663
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream
Definition: Settings.h:1736
void reset()
Reset the node to unset state
bool operator==(const Blue &other) const
Comparison operator
Definition: Settings.h:1712
std::string toString() const
Get the value as string
bool operator<(const Blue &other) const
Comparison operator
Definition: Settings.h:1724
constexpr Blue(double value)
Constructor
Definition: Settings.h:1692
bool operator!=(const Blue &other) const
Comparison operator
Definition: Settings.h:1718
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1680
bool operator>(const Blue &other) const
Comparison operator
Definition: Settings.h:1730
static constexpr Range< double > validRange()
The range of valid values for Blue
Definition: Settings.h:1683
Digital gain applied to green channel
Definition: Settings.h:1761
void reset()
Reset the node to unset state
bool operator>(const Green &other) const
Comparison operator
Definition: Settings.h:1828
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:1834
double ValueType
The type of the underlying value
Definition: Settings.h:1778
constexpr Green(double value)
Constructor
Definition: Settings.h:1790
bool operator==(const Green &other) const
Comparison operator
Definition: Settings.h:1810
bool operator!=(const Green &other) const
Comparison operator
Definition: Settings.h:1816
std::string toString() const
Get the value as string
bool operator<(const Green &other) const
Comparison operator
Definition: Settings.h:1822
static constexpr Range< double > validRange()
The range of valid values for Green
Definition: Settings.h:1781
Digital gain applied to red channel
Definition: Settings.h:1859
bool operator!=(const Red &other) const
Comparison operator
Definition: Settings.h:1914
constexpr Red(double value)
Constructor
Definition: Settings.h:1888
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream
Definition: Settings.h:1932
double ValueType
The type of the underlying value
Definition: Settings.h:1876
static constexpr Range< double > validRange()
The range of valid values for Red
Definition: Settings.h:1879
bool operator==(const Red &other) const
Comparison operator
Definition: Settings.h:1908
bool operator<(const Red &other) const
Comparison operator
Definition: Settings.h:1920
void reset()
Reset the node to unset state
bool operator>(const Red &other) const
Comparison operator
Definition: Settings.h:1926
bool hasValue() const
Check if the value is set
std::string toString() const
Get the value as string
Color balance settings
Definition: Settings.h:1647
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2016
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:2178
bool operator!=(const Balance &other) const
Inequality operator
Balance & set(const Red &value)
Set Red
Definition: Settings.h:2123
Green & green()
Get Green
Definition: Settings.h:2098
std::string toString() const
Get the value as string
Balance(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1987
Red & red()
Get Red
Definition: Settings.h:2117
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:2052
Balance & set(const Blue &value)
Set Blue
Definition: Settings.h:2085
Blue & blue()
Get Blue
Definition: Settings.h:2079
const Red & red() const
Get Red
Definition: Settings.h:2111
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition: Settings.h:1958
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2187
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:2144
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:2153
Balance & set(const Green &value)
Set Green
Definition: Settings.h:2104
const Green & green() const
Get Green
Definition: Settings.h:2092
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream
Definition: Settings.h:2204
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:2134
const Blue & blue() const
Get Blue
Definition: Settings.h:2073
This setting controls when tone mapping of colors is performed. Tone mapping will normalize the captu...
Definition: Settings.h:2267
ValueType
The type of the underlying value
Definition: Settings.h:2293
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:2336
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:2342
static const Enabled always
always
Definition: Settings.h:2297
static std::set< ValueType > validValues()
All valid values of Enabled
Definition: Settings.h:2301
static const Enabled hdrOnly
hdrOnly
Definition: Settings.h:2298
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:2348
friend std::ostream & operator<<(std::ostream &stream, const Enabled::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:2330
constexpr Enabled(ValueType value)
Constructor
Definition: Settings.h:2310
Tonemapping settings.
Definition: Settings.h:2243
friend std::ostream & operator<<(std::ostream &stream, const ToneMapping &value)
Operator to send the value as string to a stream
Definition: Settings.h:2540
ToneMapping & set(const Enabled &value)
Set Enabled
Definition: Settings.h:2494
ToneMapping(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2400
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:2525
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:2482
bool operator==(const ToneMapping &other) const
Equality operator
std::tuple< Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2373
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2518
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2505
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:2488
bool operator!=(const ToneMapping &other) const
Inequality operator
ToneMapping copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:2461
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2427
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition: Settings.h:2225
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2711
Experimental & set(const ToneMapping &value)
Set ToneMapping
Definition: Settings.h:2683
const ToneMapping & toneMapping() const
Get ToneMapping
Definition: Settings.h:2671
Experimental & set(const ToneMapping::Enabled &value)
Set ToneMapping::Enabled
Definition: Settings.h:2690
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:2746
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2731
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2587
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2615
std::tuple< Settings::Processing::Color::Experimental::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2559
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:2724
bool operator==(const Experimental &other) const
Equality operator
ToneMapping & toneMapping()
Get ToneMapping
Definition: Settings.h:2677
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:2650
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:2701
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition: Settings.h:2767
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream
Definition: Settings.h:2842
double value() const
Get the value
bool operator>(const Gamma &other) const
Comparison operator
Definition: Settings.h:2836
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Gamma
Definition: Settings.h:2789
Gamma()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:2786
bool hasValue() const
Check if the value is set
constexpr Gamma(double value)
Constructor
Definition: Settings.h:2798
bool operator!=(const Gamma &other) const
Comparison operator
Definition: Settings.h:2824
bool operator<(const Gamma &other) const
Comparison operator
Definition: Settings.h:2830
std::string toString() const
Get the value as string
bool operator==(const Gamma &other) const
Comparison operator
Definition: Settings.h:2818
Color settings
Definition: Settings.h:1631
Color & set(const Gamma &value)
Set Gamma
Definition: Settings.h:3086
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:3160
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:3123
bool operator==(const Color &other) const
Equality 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::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, Settings::Processing::Color::Gamma > Descendants
Definition: Settings.h:2872
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:3114
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2940
Color & set(const Experimental::ToneMapping &value)
Set Experimental::ToneMapping
Definition: Settings.h:3060
Color & set(const Experimental &value)
Set Experimental
Definition: Settings.h:3053
Color & set(const Experimental::ToneMapping::Enabled &value)
Set Experimental::ToneMapping::Enabled
Definition: Settings.h:3067
Color & set(const Balance &value)
Set Balance
Definition: Settings.h:3013
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream
Definition: Settings.h:3211
const Balance & balance() const
Get Balance
Definition: Settings.h:3001
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:3041
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:3152
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3194
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:3132
Color & set(const Balance::Green &value)
Set Balance::Green
Definition: Settings.h:3027
Experimental & experimental()
Get Experimental
Definition: Settings.h:3047
std::string toString() const
Get the value as string
bool operator!=(const Color &other) const
Inequality operator
Color & set(const Balance::Blue &value)
Set Balance::Blue
Definition: Settings.h:3020
Gamma & gamma()
Get Gamma
Definition: Settings.h:3080
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:2980
Color & set(const Balance::Red &value)
Set Balance::Red
Definition: Settings.h:3034
const Gamma & gamma() const
Get Gamma
Definition: Settings.h:3074
Color(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2906
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:3096
Balance & balance()
Get Balance
Definition: Settings.h:3007
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:3185
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:3142
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:3105
bool ValueType
The type of the underlying value
Definition: Settings.h:3327
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3332
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3341
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3373
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3361
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3367
Higher values gives more correction.
Definition: Settings.h:3388
double ValueType
The type of the underlying value
Definition: Settings.h:3407
bool operator>(const Strength &other) const
Comparison operator
Definition: Settings.h:3457
bool operator!=(const Strength &other) const
Comparison operator
Definition: Settings.h:3445
constexpr Strength(double value)
Constructor
Definition: Settings.h:3419
static constexpr Range< double > validRange()
The range of valid values for Strength
Definition: Settings.h:3410
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream
Definition: Settings.h:3463
bool operator<(const Strength &other) const
Comparison operator
Definition: Settings.h:3451
bool operator==(const Strength &other) const
Comparison operator
Definition: Settings.h:3439
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:3683
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3600
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:3661
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition: Settings.h:3488
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:3579
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:3646
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:3707
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3544
Correction & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3612
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3691
Correction & set(const Strength &value)
Set Strength
Definition: Settings.h:3631
const Strength & strength() const
Get Strength
Definition: Settings.h:3619
Correction(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3516
static const Enabled yes
On/enabled.
Definition: Settings.h:3763
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3776
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3802
bool ValueType
The type of the underlying value
Definition: Settings.h:3762
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3767
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3808
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3796
static const Enabled no
Off/disabled.
Definition: Settings.h:3764
Higher values remove more points.
Definition: Settings.h:3823
constexpr Threshold(double value)
Constructor
Definition: Settings.h:3854
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:3880
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:3886
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:3845
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:3874
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:3892
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:3898
double ValueType
The type of the underlying value
Definition: Settings.h:3842
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:4116
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3979
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:4140
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:4054
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:4066
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3951
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:4014
Threshold & threshold()
Get Threshold
Definition: Settings.h:4060
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:4047
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4081
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:3923
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:4035
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4095
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4124
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition: Settings.h:3270
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:4340
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled
Definition: Settings.h:4307
ContrastDistortion & set(const Correction &value)
Set Correction
Definition: Settings.h:4300
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:4451
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:4475
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:4267
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:4164
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength
Definition: Settings.h:4314
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4228
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4459
ContrastDistortion & set(const Removal &value)
Set Removal
Definition: Settings.h:4333
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4430
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4402
const Removal & removal() const
Get Removal
Definition: Settings.h:4321
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4374
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4360
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4389
Removal & removal()
Get Removal
Definition: Settings.h:4327
bool operator==(const ContrastDistortion &other) const
Equality operator
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:4347
const Correction & correction() const
Get Correction
Definition: Settings.h:4288
ContrastDistortion(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4196
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4415
Correction & correction()
Get Correction
Definition: Settings.h:4294
Experimental filters. These may be renamed, moved or deleted in the future.
Definition: Settings.h:3248
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4796
ContrastDistortion & contrastDistortion()
Get ContrastDistortion
Definition: Settings.h:4633
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4746
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:4606
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4533
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion
Definition: Settings.h:4639
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold
Definition: Settings.h:4681
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4566
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength
Definition: Settings.h:4660
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:4811
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4733
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:4789
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal
Definition: Settings.h:4667
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:4692
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4704
bool operator!=(const Experimental &other) const
Inequality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4774
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled
Definition: Settings.h:4653
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion
Definition: Settings.h:4627
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:4500
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction
Definition: Settings.h:4646
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled
Definition: Settings.h:4674
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4718
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4760
Enable or disable the SNR filter
Definition: Settings.h:4866
static const Enabled yes
On/enabled.
Definition: Settings.h:4884
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:4923
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:4917
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:4888
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:4897
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:4929
static const Enabled no
Off/disabled.
Definition: Settings.h:4885
bool ValueType
The type of the underlying value
Definition: Settings.h:4883
std::string toString() const
Get the value as string
Discard points with signal-to-noise ratio (SNR) below the given value
Definition: Settings.h:4944
constexpr Threshold(double value)
Constructor
Definition: Settings.h:4973
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:4993
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:4964
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:5017
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:5011
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:5005
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:4961
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:4999
Discard points with signal-to-noise ratio (SNR) values below a threshold
Definition: Settings.h:4848
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5070
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5249
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5154
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:5173
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:5042
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5233
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5166
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:5185
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5098
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:5206
Threshold & threshold()
Get Threshold
Definition: Settings.h:5179
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:5225
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:5133
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5160
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:5196
Contains a filter that removes points with low signal-to-noise ratio (SNR)
Definition: Settings.h:4830
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:5455
std::string toString() const
Get the value as string
Removal & removal()
Get Removal
Definition: Settings.h:5391
Noise(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5299
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:5411
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:5364
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5462
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:5442
std::tuple< Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:5270
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:5404
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5328
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:5477
const Removal & removal() const
Get Removal
Definition: Settings.h:5385
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:5432
bool operator==(const Noise &other) const
Equality operator
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:5422
Noise & set(const Removal &value)
Set Removal
Definition: Settings.h:5397
Enable or disable the outlier filter
Definition: Settings.h:5532
bool ValueType
The type of the underlying value
Definition: Settings.h:5549
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5589
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5563
static const Enabled no
Off/disabled.
Definition: Settings.h:5551
std::string toString() const
Get the value as string
static const Enabled yes
On/enabled.
Definition: Settings.h:5550
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5595
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5554
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5583
Discard point if Euclidean distance to neighboring points is above the given value
Definition: Settings.h:5610
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:5630
constexpr Threshold(double value)
Constructor
Definition: Settings.h:5639
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:5671
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:5659
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:5665
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:5683
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:5677
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:5627
Discard point if Euclidean distance to neighboring points is above a threshold
Definition: Settings.h:5514
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:5915
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5820
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:5799
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5832
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5826
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:5851
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5862
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5736
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5872
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5708
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:5839
Threshold & threshold()
Get Threshold
Definition: Settings.h:5845
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:5891
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5764
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5899
Contains a filter that removes points with large Euclidean distance to neighboring points
Definition: Settings.h:5496
const Removal & removal() const
Get Removal
Definition: Settings.h:6051
Outlier(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5965
Outlier & set(const Removal &value)
Set Removal
Definition: Settings.h:6063
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6128
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:6121
bool operator!=(const Outlier &other) const
Inequality operator
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:6077
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:6070
Removal & removal()
Get Removal
Definition: Settings.h:6057
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:6030
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream
Definition: Settings.h:6143
bool operator==(const Outlier &other) const
Equality operator
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:6108
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:6088
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:6098
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5994
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5936
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition: Settings.h:6198
bool ValueType
The type of the underlying value
Definition: Settings.h:6215
static const Enabled yes
On/enabled.
Definition: Settings.h:6216
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6255
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6229
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:6261
static const Enabled no
Off/disabled.
Definition: Settings.h:6217
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6249
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6220
Discard points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:6180
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:6274
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:6389
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:6441
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:6406
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6328
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:6419
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:6362
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6301
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:6395
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6426
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:6383
bool operator!=(const Removal &other) const
Inequality operator
Contains a filter that removes points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:6162
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:6460
bool operator!=(const Reflection &other) const
Inequality operator
bool operator==(const Reflection &other) const
Equality operator
Removal & removal()
Get Removal
Definition: Settings.h:6578
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6516
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream
Definition: Settings.h:6647
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6632
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:6625
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:6591
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:6612
Reflection(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6488
std::string toString() const
Get the value as string
const Removal & removal() const
Get Removal
Definition: Settings.h:6572
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:6602
Reflection & set(const Removal &value)
Set Removal
Definition: Settings.h:6584
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:6551
Enable or disable the smoothing filter
Definition: Settings.h:6700
bool ValueType
The type of the underlying value
Definition: Settings.h:6717
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6722
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6757
static const Enabled yes
On/enabled.
Definition: Settings.h:6718
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6751
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:6763
static const Enabled no
Off/disabled.
Definition: Settings.h:6719
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6731
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:6778
double ValueType
The type of the underlying value
Definition: Settings.h:6795
bool operator!=(const Sigma &other) const
Comparison operator
Definition: Settings.h:6833
bool operator>(const Sigma &other) const
Comparison operator
Definition: Settings.h:6845
constexpr Sigma(double value)
Constructor
Definition: Settings.h:6807
static constexpr Range< double > validRange()
The range of valid values for Sigma
Definition: Settings.h:6798
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream
Definition: Settings.h:6851
bool operator==(const Sigma &other) const
Comparison operator
Definition: Settings.h:6827
std::string toString() const
Get the value as string
bool operator<(const Sigma &other) const
Comparison operator
Definition: Settings.h:6839
Gaussian smoothing of the point cloud
Definition: Settings.h:6682
Gaussian(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6904
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:6994
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:7059
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7040
Gaussian & set(const Enabled &value)
Set Enabled
Definition: Settings.h:7000
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream
Definition: Settings.h:7083
const Sigma & sigma() const
Get Sigma
Definition: Settings.h:7007
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6876
bool operator==(const Gaussian &other) const
Equality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:6988
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:7030
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:6967
Gaussian & set(const Sigma &value)
Set Sigma
Definition: Settings.h:7019
Sigma & sigma()
Get Sigma
Definition: Settings.h:7013
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6932
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7067
Smoothing filters
Definition: Settings.h:6666
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:7198
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7162
Smoothing & set(const Gaussian &value)
Set Gaussian
Definition: Settings.h:7231
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7104
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7266
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:7296
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma
Definition: Settings.h:7245
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled
Definition: Settings.h:7238
bool operator!=(const Smoothing &other) const
Inequality operator
const Gaussian & gaussian() const
Get Gaussian
Definition: Settings.h:7219
Smoothing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7133
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:7256
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:7289
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7276
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream
Definition: Settings.h:7311
Gaussian & gaussian()
Get Gaussian
Definition: Settings.h:7225
Filters
Definition: Settings.h:3232
bool operator!=(const Filters &other) const
Inequality operator
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:7894
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled
Definition: Settings.h:7699
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8030
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:7904
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:7504
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:7836
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:7865
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:7952
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:7933
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:7923
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold
Definition: Settings.h:7666
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7565
Filters & set(const Experimental &value)
Set Experimental
Definition: Settings.h:7537
Outlier & outlier()
Get Outlier
Definition: Settings.h:7639
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal
Definition: Settings.h:7652
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:7525
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion
Definition: Settings.h:7544
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream
Definition: Settings.h:8049
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:7943
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:7884
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:7759
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7982
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7449
const Reflection & reflection() const
Get Reflection
Definition: Settings.h:7673
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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7351
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:7749
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold
Definition: Settings.h:7626
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7972
Filters & set(const Reflection &value)
Set Reflection
Definition: Settings.h:7685
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:7798
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal
Definition: Settings.h:7572
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:8019
Filters & set(const Outlier &value)
Set Outlier
Definition: Settings.h:7645
const Noise & noise() const
Get Noise
Definition: Settings.h:7593
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction
Definition: Settings.h:7551
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:7784
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal
Definition: Settings.h:7692
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:7855
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled
Definition: Settings.h:7619
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled
Definition: Settings.h:7732
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:7846
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7586
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian
Definition: Settings.h:7725
bool operator==(const Filters &other) const
Equality operator
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled
Definition: Settings.h:7659
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:7823
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:7810
Filters(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7400
Noise & noise()
Get Noise
Definition: Settings.h:7599
Filters & set(const Smoothing &value)
Set Smoothing
Definition: Settings.h:7718
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7558
Filters & set(const Noise::Removal &value)
Set Noise::Removal
Definition: Settings.h:7612
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:7914
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:7875
Smoothing & smoothing()
Get Smoothing
Definition: Settings.h:7712
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:7962
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7579
const Outlier & outlier() const
Get Outlier
Definition: Settings.h:7633
Reflection & reflection()
Get Reflection
Definition: Settings.h:7679
Filters & set(const Noise &value)
Set Noise
Definition: Settings.h:7605
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma
Definition: Settings.h:7739
const Smoothing & smoothing() const
Get Smoothing
Definition: Settings.h:7706
Experimental & experimental()
Get Experimental
Definition: Settings.h:7531
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:7770
Settings related to processing of a capture, including filters and color balance
Definition: Settings.h:1613
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:8626
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:8707
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:8854
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:8835
Processing & set(const Color::Experimental &value)
Set Color::Experimental
Definition: Settings.h:8352
Processing & set(const Color &value)
Set Color
Definition: Settings.h:8317
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8597
Processing & set(const Color::Experimental::ToneMapping::Enabled &value)
Set Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:8366
Processing & set(const Color::Balance &value)
Set Color::Balance
Definition: Settings.h:8324
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian
Definition: Settings.h:8539
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:8285
Filters & filters()
Get Filters
Definition: Settings.h:8386
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:8546
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:8634
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:8434
Processing()
Default constructor
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:8844
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:8448
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8588
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal
Definition: Settings.h:8490
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:8441
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream
Definition: Settings.h:8917
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:8718
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:8825
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:8769
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:8874
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:8759
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue
Definition: Settings.h:8331
Color & color()
Get Color
Definition: Settings.h:8311
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:8864
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection
Definition: Settings.h:8511
Processing & set(const Filters::Noise &value)
Set Filters::Noise
Definition: Settings.h:8455
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:8777
const Settings::Processing::Filters & get() const
Definition: Settings.h:8642
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:8427
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled
Definition: Settings.h:8469
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing
Definition: Settings.h:8532
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8570
const Filters & filters() const
Get Filters
Definition: Settings.h:8380
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8901
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:8553
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal
Definition: Settings.h:8462
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled
Definition: Settings.h:8497
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold
Definition: Settings.h:8476
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8579
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental
Definition: Settings.h:8399
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:8749
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold
Definition: Settings.h:8504
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green
Definition: Settings.h:8338
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:8606
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:8696
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier
Definition: Settings.h:8483
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:8683
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled
Definition: Settings.h:8525
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:8420
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:8806
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal
Definition: Settings.h:8518
Processing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:8162
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:8413
const Settings::Processing::Color & get() const
Definition: Settings.h:8562
bool operator==(const Processing &other) const
Equality operator
const Color & color() const
Get Color
Definition: Settings.h:8305
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion
Definition: Settings.h:8406
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::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, 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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:8103
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:8815
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:8616
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:8796
Processing & set(const Filters &value)
Set Filters
Definition: Settings.h:8392
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red
Definition: Settings.h:8345
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:8740
bool operator!=(const Processing &other) const
Inequality operator
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:8651
Processing & set(const Color::Gamma &value)
Set Color::Gamma
Definition: Settings.h:8373
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:8221
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:8731
Processing & set(const Color::Experimental::ToneMapping &value)
Set Color::Experimental::ToneMapping
Definition: Settings.h:8359
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:8671
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:8661
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:8893
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:8786
Settings used when capturing with a Zivid camera
Definition: Settings.h:121
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:9784
Settings(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:9041
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:9765
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:9566
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:9397
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:9240
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:9590
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing
Definition: Settings.h:9488
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:9737
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:9176
const Processing & processing() const
Get Processing
Definition: Settings.h:9266
const Settings::Experimental & get() const
Definition: Settings.h:9536
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:9626
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:9696
Settings & set(const Processing &value)
Set Processing
Definition: Settings.h:9278
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:9719
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled
Definition: Settings.h:9453
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:9404
Settings & set(const Experimental::Engine &value)
Set Experimental::Engine
Definition: Settings.h:9259
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian
Definition: Settings.h:9495
Settings & set(const Diagnostics &value)
Set Diagnostics
Definition: Settings.h:9226
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:9707
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise
Definition: Settings.h:9411
void load(const std::string &fileName)
Load from the given file
const Settings::Acquisitions & get() const
Definition: Settings.h:9516
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:9642
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:9774
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:9858
const Settings::Diagnostics & get() const
Definition: Settings.h:9522
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:9848
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance
Definition: Settings.h:9292
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:9747
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:9662
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:9889
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:9582
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:9502
const Settings::Processing & get() const
Definition: Settings.h:9550
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection
Definition: Settings.h:9467
const Settings::Experimental::Engine & get() const
Definition: Settings.h:9544
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:9899
Settings()
Default constructor
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:9652
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold
Definition: Settings.h:9460
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:9618
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:9383
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:9685
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:9574
const Acquisitions & acquisitions() const
Get Acquisitions
Definition: Settings.h:9195
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:9106
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:9802
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental
Definition: Settings.h:9355
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:9829
const Settings::Processing::Filters & get() const
Definition: Settings.h:9634
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental
Definition: Settings.h:9320
void save(const std::string &fileName) const
Save to the given file
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:9598
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:9390
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::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, 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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:8974
Settings & set(const Processing::Color &value)
Set Processing::Color
Definition: Settings.h:9285
Experimental & experimental()
Get Experimental
Definition: Settings.h:9246
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier
Definition: Settings.h:9439
bool operator==(const Settings &other) const
Equality operator
Acquisitions & acquisitions()
Get Acquisitions
Definition: Settings.h:9201
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal
Definition: Settings.h:9474
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:9313
Diagnostics & diagnostics()
Get Diagnostics
Definition: Settings.h:9220
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:9757
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled
Definition: Settings.h:9481
Processing & processing()
Get Processing
Definition: Settings.h:9272
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled
Definition: Settings.h:9233
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:9728
const Settings::Diagnostics::Enabled & get() const
Definition: Settings.h:9530
std::string toString() const
Get the value as string
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:9673
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion
Definition: Settings.h:9362
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma
Definition: Settings.h:9341
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold
Definition: Settings.h:9432
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:9376
Settings & set(const Acquisitions &value)
Set Acquisitions
Definition: Settings.h:9207
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:9509
const Diagnostics & diagnostics() const
Get Diagnostics
Definition: Settings.h:9214
bool operator!=(const Settings &other) const
Inequality operator
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal
Definition: Settings.h:9418
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:9608
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal
Definition: Settings.h:9446
Settings & set(const Processing::Color::Experimental::ToneMapping::Enabled &value)
Set Processing::Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:9334
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled
Definition: Settings.h:9425
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:9369
const Settings::Processing::Color & get() const
Definition: Settings.h:9558
Settings & set(const Processing::Color::Experimental::ToneMapping &value)
Set Processing::Color::Experimental::ToneMapping
Definition: Settings.h:9327
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:9821
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:9811
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green
Definition: Settings.h:9306
Settings & set(const Processing::Filters &value)
Set Processing::Filters
Definition: Settings.h:9348
Settings & set(const Experimental &value)
Set Experimental
Definition: Settings.h:9252
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:9794
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue
Definition: Settings.h:9299
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:9838
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream
Definition: Settings.h:9917
NodeType
Definition: NodeType.h:100
Ret validRange(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:203
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99