Zivid C++ API 2.13.1+18e79e79-1
Settings.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of the Zivid API
3 *
4 * Copyright 2015-2024 (C) Zivid AS
5 * All rights reserved.
6 *
7 * Zivid Software License, v1.0
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * 3. Neither the name of Zivid AS nor the names of its contributors may be used
20 * to endorse or promote products derived from this software without specific
21 * prior written permission.
22 *
23 * 4. This software, with or without modification, must not be used with any
24 * other 3D camera than from Zivid AS.
25 *
26 * 5. Any software provided in binary form under this license must not be
27 * reverse engineered, decompiled, modified and/or disassembled.
28 *
29 * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
30 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31 * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
32 * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
33 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 * Contact: Zivid Customer Success Team <customersuccess@zivid.com>
41 * Info: http://www.zivid.com
42 ******************************************************************************/
43
44#pragma once
45
46#include <array>
47#include <chrono>
48#include <cmath>
49#include <ctime>
50#include <iomanip>
51#include <memory>
52#include <set>
53#include <sstream>
54#include <string>
55#include <tuple>
56#include <utility>
57#include <vector>
58
65#include "Zivid/Point.h"
66#include "Zivid/Range.h"
67
68#ifdef _MSC_VER
69# pragma warning(push)
70# pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
71#endif
72
73namespace Zivid
74{
75
77
78 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
80 {
81 public:
83 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
84
86 static constexpr const char *path{ "" };
87
89 static constexpr const char *name{ "Settings" };
90
92 static constexpr const char *description{
93 R"description(Settings used when capturing with a Zivid camera.)description"
94 };
95
96 static constexpr size_t version{ 25 };
97
98#ifndef NO_DOC
99 template<size_t>
100 struct Version;
101
102 using LatestVersion = Zivid::Settings;
103
104 // Short identifier. This value is not guaranteed to be universally unique
105 // Todo(ZIVID-2808): Move this to internal DataModelExt header
106 static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
107
108#endif
109
111
112 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
114 {
115 public:
117 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
118
120 static constexpr const char *path{ "Acquisition" };
121
123 static constexpr const char *name{ "Acquisition" };
124
126 static constexpr const char *description{ R"description(Settings for a single acquisition.)description" };
127
131
132 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
134 {
135 public:
137 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
138
140 static constexpr const char *path{ "Acquisition/Aperture" };
141
143 static constexpr const char *name{ "Aperture" };
144
146 static constexpr const char *description{
147 R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
148the effective aperture diameter).
149)description"
150 };
151
153 using ValueType = double;
154
156 static constexpr Range<double> validRange()
157 {
158 return { 1.4, 32.0 };
159 }
160
162 Aperture() = default;
163
165 explicit constexpr Aperture(double value)
166 : m_opt{ verifyValue(value) }
167 {}
168
173 double value() const;
174
176 bool hasValue() const;
177
179 void reset();
180
182 std::string toString() const;
183
185 bool operator==(const Aperture &other) const
186 {
187 return m_opt == other.m_opt;
188 }
189
191 bool operator!=(const Aperture &other) const
192 {
193 return m_opt != other.m_opt;
194 }
195
197 bool operator<(const Aperture &other) const
198 {
199 return m_opt < other.m_opt;
200 }
201
203 bool operator>(const Aperture &other) const
204 {
205 return m_opt > other.m_opt;
206 }
207
209 bool operator<=(const Aperture &other) const
210 {
211 return m_opt <= other.m_opt;
212 }
213
215 bool operator>=(const Aperture &other) const
216 {
217 return m_opt >= other.m_opt;
218 }
219
221 friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
222 {
223 return stream << value.toString();
224 }
225
226 private:
227 void setFromString(const std::string &value);
228
229 constexpr ValueType static verifyValue(const ValueType &value)
230 {
231 return validRange().isInRange(value)
232 ? value
233 : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
234 + std::to_string(validRange().min()) + ", "
235 + std::to_string(validRange().max()) + "]" };
236 }
237
238 Zivid::DataModel::Detail::Optional<double> m_opt;
239
240 friend struct DataModel::Detail::Befriend<Aperture>;
241 };
242
254
255 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
257 {
258 public:
260 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
261
263 static constexpr const char *path{ "Acquisition/Brightness" };
264
266 static constexpr const char *name{ "Brightness" };
267
269 static constexpr const char *description{
270 R"description(Brightness controls the light output from the projector.
271
272Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
273or in case of high levels of ambient lighting.
274
275When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
276can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated
277over a 10 second period. This limitation is enforced automatically by the camera. Calling capture
278when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a
279duration of time to cool down, before capture will start.
280)description"
281 };
282
284 using ValueType = double;
285
287 static constexpr Range<double> validRange()
288 {
289 return { 0, 2.5 };
290 }
291
293 Brightness() = default;
294
296 explicit constexpr Brightness(double value)
297 : m_opt{ verifyValue(value) }
298 {}
299
304 double value() const;
305
307 bool hasValue() const;
308
310 void reset();
311
313 std::string toString() const;
314
316 bool operator==(const Brightness &other) const
317 {
318 return m_opt == other.m_opt;
319 }
320
322 bool operator!=(const Brightness &other) const
323 {
324 return m_opt != other.m_opt;
325 }
326
328 bool operator<(const Brightness &other) const
329 {
330 return m_opt < other.m_opt;
331 }
332
334 bool operator>(const Brightness &other) const
335 {
336 return m_opt > other.m_opt;
337 }
338
340 bool operator<=(const Brightness &other) const
341 {
342 return m_opt <= other.m_opt;
343 }
344
346 bool operator>=(const Brightness &other) const
347 {
348 return m_opt >= other.m_opt;
349 }
350
352 friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
353 {
354 return stream << value.toString();
355 }
356
357 private:
358 void setFromString(const std::string &value);
359
360 constexpr ValueType static verifyValue(const ValueType &value)
361 {
362 return validRange().isInRange(value)
363 ? value
364 : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
365 + " } is not in range [" + std::to_string(validRange().min())
366 + ", " + std::to_string(validRange().max()) + "]" };
367 }
368
369 Zivid::DataModel::Detail::Optional<double> m_opt;
370
371 friend struct DataModel::Detail::Befriend<Brightness>;
372 };
373
375
376 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
378 {
379 public:
381 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
382
384 static constexpr const char *path{ "Acquisition/ExposureTime" };
385
387 static constexpr const char *name{ "ExposureTime" };
388
390 static constexpr const char *description{
391 R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
392 };
393
395 using ValueType = std::chrono::microseconds;
396
399 {
400 return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
401 }
402
404 ExposureTime() = default;
405
407 explicit constexpr ExposureTime(std::chrono::microseconds value)
408 : m_opt{ verifyValue(value) }
409 {}
410
415 std::chrono::microseconds value() const;
416
418 bool hasValue() const;
419
421 void reset();
422
424 std::string toString() const;
425
427 bool operator==(const ExposureTime &other) const
428 {
429 return m_opt == other.m_opt;
430 }
431
433 bool operator!=(const ExposureTime &other) const
434 {
435 return m_opt != other.m_opt;
436 }
437
439 bool operator<(const ExposureTime &other) const
440 {
441 return m_opt < other.m_opt;
442 }
443
445 bool operator>(const ExposureTime &other) const
446 {
447 return m_opt > other.m_opt;
448 }
449
451 bool operator<=(const ExposureTime &other) const
452 {
453 return m_opt <= other.m_opt;
454 }
455
457 bool operator>=(const ExposureTime &other) const
458 {
459 return m_opt >= other.m_opt;
460 }
461
463 friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
464 {
465 return stream << value.toString();
466 }
467
468 private:
469 void setFromString(const std::string &value);
470
471 constexpr ValueType static verifyValue(const ValueType &value)
472 {
473 return validRange().isInRange(value)
474 ? value
475 : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
476 + " } is not in range ["
477 + std::to_string(validRange().min().count()) + ", "
478 + std::to_string(validRange().max().count()) + "]" };
479 }
480
481 Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
482
483 friend struct DataModel::Detail::Befriend<ExposureTime>;
484 };
485
487
488 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
490 {
491 public:
493 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
494
496 static constexpr const char *path{ "Acquisition/Gain" };
497
499 static constexpr const char *name{ "Gain" };
500
502 static constexpr const char *description{ R"description(Analog gain in the camera.)description" };
503
505 using ValueType = double;
506
508 static constexpr Range<double> validRange()
509 {
510 return { 1, 16 };
511 }
512
514 Gain() = default;
515
517 explicit constexpr Gain(double value)
518 : m_opt{ verifyValue(value) }
519 {}
520
525 double value() const;
526
528 bool hasValue() const;
529
531 void reset();
532
534 std::string toString() const;
535
537 bool operator==(const Gain &other) const
538 {
539 return m_opt == other.m_opt;
540 }
541
543 bool operator!=(const Gain &other) const
544 {
545 return m_opt != other.m_opt;
546 }
547
549 bool operator<(const Gain &other) const
550 {
551 return m_opt < other.m_opt;
552 }
553
555 bool operator>(const Gain &other) const
556 {
557 return m_opt > other.m_opt;
558 }
559
561 bool operator<=(const Gain &other) const
562 {
563 return m_opt <= other.m_opt;
564 }
565
567 bool operator>=(const Gain &other) const
568 {
569 return m_opt >= other.m_opt;
570 }
571
573 friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
574 {
575 return stream << value.toString();
576 }
577
578 private:
579 void setFromString(const std::string &value);
580
581 constexpr ValueType static verifyValue(const ValueType &value)
582 {
583 return validRange().isInRange(value)
584 ? value
585 : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
586 + std::to_string(validRange().min()) + ", "
587 + std::to_string(validRange().max()) + "]" };
588 }
589
590 Zivid::DataModel::Detail::Optional<double> m_opt;
591
592 friend struct DataModel::Detail::Befriend<Gain>;
593 };
594
595 using Descendants = std::tuple<
600
603
618#ifndef NO_DOC
619 template<
620 typename... Args,
621 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
622 typename std::enable_if<
623 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
624 value,
625 int>::type = 0>
626#else
627 template<typename... Args>
628#endif
629 explicit Acquisition(Args &&...args)
630 {
631 using namespace Zivid::Detail::TypeTraits;
632
633 static_assert(
634 AllArgsDecayedAreUnique<Args...>::value,
635 "Found duplicate types among the arguments passed to Acquisition(...). "
636 "Types should be listed at most once.");
637
638 set(std::forward<Args>(args)...);
639 }
640
654#ifndef NO_DOC
655 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
656#else
657 template<typename... Args>
658#endif
659 void set(Args &&...args)
660 {
661 using namespace Zivid::Detail::TypeTraits;
662
663 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
664 static_assert(
665 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
666
667 static_assert(
668 AllArgsDecayedAreUnique<Args...>::value,
669 "Found duplicate types among the arguments passed to set(...). "
670 "Types should be listed at most once.");
671
672 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
673 }
674
689#ifndef NO_DOC
690 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
691#else
692 template<typename... Args>
693#endif
694 Acquisition copyWith(Args &&...args) const
695 {
696 using namespace Zivid::Detail::TypeTraits;
697
698 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
699 static_assert(
700 AllArgsAreDescendantNodes::value,
701 "All arguments passed to copyWith(...) must be descendant nodes.");
702
703 static_assert(
704 AllArgsDecayedAreUnique<Args...>::value,
705 "Found duplicate types among the arguments passed to copyWith(...). "
706 "Types should be listed at most once.");
707
708 auto copy{ *this };
709 copy.set(std::forward<Args>(args)...);
710 return copy;
711 }
712
714 const Aperture &aperture() const
715 {
716 return m_aperture;
717 }
718
721 {
722 return m_aperture;
723 }
724
726 Acquisition &set(const Aperture &value)
727 {
728 m_aperture = value;
729 return *this;
730 }
731
733 const Brightness &brightness() const
734 {
735 return m_brightness;
736 }
737
740 {
741 return m_brightness;
742 }
743
746 {
747 m_brightness = value;
748 return *this;
749 }
750
753 {
754 return m_exposureTime;
755 }
756
759 {
760 return m_exposureTime;
761 }
762
765 {
766 m_exposureTime = value;
767 return *this;
768 }
769
771 const Gain &gain() const
772 {
773 return m_gain;
774 }
775
778 {
779 return m_gain;
780 }
781
783 Acquisition &set(const Gain &value)
784 {
785 m_gain = value;
786 return *this;
787 }
788
789 template<
790 typename T,
791 typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
793 {
794 return m_aperture;
795 }
796
797 template<
798 typename T,
799 typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
801 {
802 return m_brightness;
803 }
804
805 template<
806 typename T,
807 typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
809 {
810 return m_exposureTime;
811 }
812
813 template<
814 typename T,
815 typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
817 {
818 return m_gain;
819 }
820
821 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
823 {
824 return m_aperture;
825 }
826
827 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
829 {
830 return m_brightness;
831 }
832
833 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
835 {
836 return m_exposureTime;
837 }
838
839 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
841 {
842 return m_gain;
843 }
844
846 template<typename F>
847 void forEach(const F &f) const
848 {
849 f(m_aperture);
850 f(m_brightness);
851 f(m_exposureTime);
852 f(m_gain);
853 }
854
856 template<typename F>
857 void forEach(const F &f)
858 {
859 f(m_aperture);
860 f(m_brightness);
861 f(m_exposureTime);
862 f(m_gain);
863 }
864
866 bool operator==(const Acquisition &other) const;
867
869 bool operator!=(const Acquisition &other) const;
870
872 std::string toString() const;
873
875 friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
876 {
877 return stream << value.toString();
878 }
879
880 private:
881 void setFromString(const std::string &value);
882
883 void setFromString(const std::string &fullPath, const std::string &value);
884
885 std::string getString(const std::string &fullPath) const;
886
887 Aperture m_aperture;
888 Brightness m_brightness;
889 ExposureTime m_exposureTime;
890 Gain m_gain;
891
892 friend struct DataModel::Detail::Befriend<Acquisition>;
893 };
894
896
897 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
899 {
900 public:
902 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafDataModelList;
903
905 static constexpr const char *path{ "Acquisitions" };
906
908 static constexpr const char *name{ "Acquisitions" };
909
911 static constexpr const char *description{ R"description(List of Acquisition objects.)description" };
912
914 using ValueType = std::vector<Settings::Acquisition>;
915
918 {
919 return { 0, std::numeric_limits<ValueType::size_type>::max() };
920 }
921
923 Acquisitions() = default;
924
926 explicit Acquisitions(std::vector<Settings::Acquisition> value)
927 : m_value{ std::move(value) }
928 {}
929
931 explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
932 : Acquisitions{ ValueType{ value } }
933 {}
934
936 const std::vector<Settings::Acquisition> &value() const;
937
939 std::string toString() const;
940
942 std::size_t size() const noexcept;
943
945 bool isEmpty() const noexcept;
946
952 template<typename... Args>
953 void emplaceBack(Args &&...args)
954 {
955 m_value.emplace_back(std::forward<Args>(args)...);
956 }
957
963 Settings::Acquisition &at(std::size_t pos);
964
970 const Settings::Acquisition &at(std::size_t pos) const;
971
978
984 const Settings::Acquisition &operator[](std::size_t pos) const;
985
987 template<typename F>
988 void forEach(const F &f)
989 {
990 for(auto &child : m_value)
991 {
992 f(child);
993 }
994 }
995
997 template<typename F>
998 void forEach(const F &f) const
999 {
1000 for(const auto &child : m_value)
1001 {
1002 f(child);
1003 }
1004 }
1005
1007 using Iterator = std::vector<Settings::Acquisition>::iterator;
1008
1010 Iterator begin() noexcept;
1011
1013 Iterator end() noexcept;
1014
1016 using ConstIterator = std::vector<Settings::Acquisition>::const_iterator;
1017
1019 ConstIterator begin() const noexcept;
1020
1022 ConstIterator end() const noexcept;
1023
1025 ConstIterator cbegin() const noexcept;
1026
1028 ConstIterator cend() const noexcept;
1029
1031 bool operator==(const Acquisitions &other) const
1032 {
1033 return m_value == other.m_value;
1034 }
1035
1037 bool operator!=(const Acquisitions &other) const
1038 {
1039 return m_value != other.m_value;
1040 }
1041
1043 friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
1044 {
1045 return stream << value.toString();
1046 }
1047
1048 private:
1049 void setFromString(const std::string &value);
1050
1051 std::vector<Settings::Acquisition> m_value{};
1052
1053 friend struct DataModel::Detail::Befriend<Acquisitions>;
1054 };
1055
1063
1064 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1066 {
1067 public:
1069 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1070
1072 static constexpr const char *path{ "Diagnostics" };
1073
1075 static constexpr const char *name{ "Diagnostics" };
1076
1078 static constexpr const char *description{
1079 R"description(When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when saving
1080the frame to a .zdf file. This enables Zivid's Customer Success team to provide better assistance and more
1081thorough troubleshooting.
1082
1083Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the
1084.zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid's support team.
1085)description"
1086 };
1087
1089
1090 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1092 {
1093 public:
1095 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1096
1098 static constexpr const char *path{ "Diagnostics/Enabled" };
1099
1101 static constexpr const char *name{ "Enabled" };
1102
1104 static constexpr const char *description{ R"description(Enable or disable diagnostics.)description" };
1105
1107 using ValueType = bool;
1108 static const Enabled yes;
1109 static const Enabled no;
1110
1112 static std::set<bool> validValues()
1113 {
1114 return { false, true };
1115 }
1116
1118 Enabled() = default;
1119
1121 explicit constexpr Enabled(bool value)
1122 : m_opt{ value }
1123 {}
1124
1129 bool value() const;
1130
1132 bool hasValue() const;
1133
1135 void reset();
1136
1138 std::string toString() const;
1139
1141 bool operator==(const Enabled &other) const
1142 {
1143 return m_opt == other.m_opt;
1144 }
1145
1147 bool operator!=(const Enabled &other) const
1148 {
1149 return m_opt != other.m_opt;
1150 }
1151
1153 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1154 {
1155 return stream << value.toString();
1156 }
1157
1158 private:
1159 void setFromString(const std::string &value);
1160
1161 Zivid::DataModel::Detail::Optional<bool> m_opt;
1162
1163 friend struct DataModel::Detail::Befriend<Enabled>;
1164 };
1165
1166 using Descendants = std::tuple<Settings::Diagnostics::Enabled>;
1167
1170
1182#ifndef NO_DOC
1183 template<
1184 typename... Args,
1185 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1186 typename std::enable_if<
1187 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1188 value,
1189 int>::type = 0>
1190#else
1191 template<typename... Args>
1192#endif
1193 explicit Diagnostics(Args &&...args)
1194 {
1195 using namespace Zivid::Detail::TypeTraits;
1196
1197 static_assert(
1198 AllArgsDecayedAreUnique<Args...>::value,
1199 "Found duplicate types among the arguments passed to Diagnostics(...). "
1200 "Types should be listed at most once.");
1201
1202 set(std::forward<Args>(args)...);
1203 }
1204
1215#ifndef NO_DOC
1216 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1217#else
1218 template<typename... Args>
1219#endif
1220 void set(Args &&...args)
1221 {
1222 using namespace Zivid::Detail::TypeTraits;
1223
1224 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1225 static_assert(
1226 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1227
1228 static_assert(
1229 AllArgsDecayedAreUnique<Args...>::value,
1230 "Found duplicate types among the arguments passed to set(...). "
1231 "Types should be listed at most once.");
1232
1233 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1234 }
1235
1247#ifndef NO_DOC
1248 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1249#else
1250 template<typename... Args>
1251#endif
1252 Diagnostics copyWith(Args &&...args) const
1253 {
1254 using namespace Zivid::Detail::TypeTraits;
1255
1256 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1257 static_assert(
1258 AllArgsAreDescendantNodes::value,
1259 "All arguments passed to copyWith(...) must be descendant nodes.");
1260
1261 static_assert(
1262 AllArgsDecayedAreUnique<Args...>::value,
1263 "Found duplicate types among the arguments passed to copyWith(...). "
1264 "Types should be listed at most once.");
1265
1266 auto copy{ *this };
1267 copy.set(std::forward<Args>(args)...);
1268 return copy;
1269 }
1270
1272 const Enabled &isEnabled() const
1273 {
1274 return m_enabled;
1275 }
1276
1279 {
1280 return m_enabled;
1281 }
1282
1284 Diagnostics &set(const Enabled &value)
1285 {
1286 m_enabled = value;
1287 return *this;
1288 }
1289
1290 template<
1291 typename T,
1292 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
1294 {
1295 return m_enabled;
1296 }
1297
1298 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1300 {
1301 return m_enabled;
1302 }
1303
1305 template<typename F>
1306 void forEach(const F &f) const
1307 {
1308 f(m_enabled);
1309 }
1310
1312 template<typename F>
1313 void forEach(const F &f)
1314 {
1315 f(m_enabled);
1316 }
1317
1319 bool operator==(const Diagnostics &other) const;
1320
1322 bool operator!=(const Diagnostics &other) const;
1323
1325 std::string toString() const;
1326
1328 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
1329 {
1330 return stream << value.toString();
1331 }
1332
1333 private:
1334 void setFromString(const std::string &value);
1335
1336 void setFromString(const std::string &fullPath, const std::string &value);
1337
1338 std::string getString(const std::string &fullPath) const;
1339
1340 Enabled m_enabled;
1341
1342 friend struct DataModel::Detail::Befriend<Diagnostics>;
1343 };
1344
1362
1363 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1365 {
1366 public:
1368 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1369
1371 static constexpr const char *path{ "Engine" };
1372
1374 static constexpr const char *name{ "Engine" };
1375
1377 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1378
1379The Phase Engine is the fastest choice in terms of both acquisition time and total capture
1380time, and is a good compromise between quality and speed. The Phase Engine is recommended for
1381objects that are diffuse, opaque, and slightly specular, and is suitable for applications in
1382logistics such as parcel induction.
1383
1384The Stripe Engine is built for exceptional point cloud quality in scenes with highly specular
1385reflective objects. This makes the engine suitable for applications such as factory automation,
1386manufacturing, and bin picking. Additional acquisition and processing time are required for
1387the Stripe Engine.
1388
1389The Omni Engine is built for exceptional point cloud quality on all scenes, including scenes
1390with extremely specular reflective objects, as well as transparent objects. This makes the Omni
1391Engine suitable for applications such as piece picking. Same as for the Stripe Engine, it trades
1392off speed for quality. The Omni Engine is only available for Zivid 2+.
1393)description" };
1394
1396 enum class ValueType
1397 {
1398 phase,
1399 stripe,
1400 omni
1401 };
1402 static const Engine phase;
1403 static const Engine stripe;
1404 static const Engine omni;
1405
1407 static std::set<ValueType> validValues()
1408 {
1409 return { ValueType::phase, ValueType::stripe, ValueType::omni };
1410 }
1411
1413 Engine() = default;
1414
1416 explicit constexpr Engine(ValueType value)
1417 : m_opt{ verifyValue(value) }
1418 {}
1419
1425
1427 bool hasValue() const;
1428
1430 void reset();
1431
1433 std::string toString() const;
1434
1436 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1437 {
1438 return stream << Engine{ value }.toString();
1439 }
1440
1442 bool operator==(const Engine &other) const
1443 {
1444 return m_opt == other.m_opt;
1445 }
1446
1448 bool operator!=(const Engine &other) const
1449 {
1450 return m_opt != other.m_opt;
1451 }
1452
1454 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1455 {
1456 return stream << value.toString();
1457 }
1458
1459 private:
1460 void setFromString(const std::string &value);
1461
1462 constexpr ValueType static verifyValue(const ValueType &value)
1463 {
1464 return value == ValueType::phase || value == ValueType::stripe || value == ValueType::omni
1465 ? value
1466 : throw std::invalid_argument{
1467 "Invalid value: Engine{ "
1468 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1469 };
1470 }
1471
1472 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1473
1474 friend struct DataModel::Detail::Befriend<Engine>;
1475 };
1476
1478
1479 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1481 {
1482 public:
1484 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1485
1487 static constexpr const char *path{ "Processing" };
1488
1490 static constexpr const char *name{ "Processing" };
1491
1493 static constexpr const char *description{
1494 R"description(Settings related to processing of a capture, including filters and color balance.)description"
1495 };
1496
1498
1499 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1501 {
1502 public:
1504 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1505
1507 static constexpr const char *path{ "Processing/Color" };
1508
1510 static constexpr const char *name{ "Color" };
1511
1513 static constexpr const char *description{ R"description(Color settings.)description" };
1514
1516
1517 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1519 {
1520 public:
1522 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1523
1525 static constexpr const char *path{ "Processing/Color/Balance" };
1526
1528 static constexpr const char *name{ "Balance" };
1529
1531 static constexpr const char *description{ R"description(Color balance settings.)description" };
1532
1534
1535 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1537 {
1538 public:
1540 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1541
1543 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1544
1546 static constexpr const char *name{ "Blue" };
1547
1549 static constexpr const char *description{
1550 R"description(Digital gain applied to blue channel.)description"
1551 };
1552
1554 using ValueType = double;
1555
1557 static constexpr Range<double> validRange()
1558 {
1559 return { 1.0, 8.0 };
1560 }
1561
1563 Blue() = default;
1564
1566 explicit constexpr Blue(double value)
1567 : m_opt{ verifyValue(value) }
1568 {}
1569
1574 double value() const;
1575
1577 bool hasValue() const;
1578
1580 void reset();
1581
1583 std::string toString() const;
1584
1586 bool operator==(const Blue &other) const
1587 {
1588 return m_opt == other.m_opt;
1589 }
1590
1592 bool operator!=(const Blue &other) const
1593 {
1594 return m_opt != other.m_opt;
1595 }
1596
1598 bool operator<(const Blue &other) const
1599 {
1600 return m_opt < other.m_opt;
1601 }
1602
1604 bool operator>(const Blue &other) const
1605 {
1606 return m_opt > other.m_opt;
1607 }
1608
1610 bool operator<=(const Blue &other) const
1611 {
1612 return m_opt <= other.m_opt;
1613 }
1614
1616 bool operator>=(const Blue &other) const
1617 {
1618 return m_opt >= other.m_opt;
1619 }
1620
1622 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1623 {
1624 return stream << value.toString();
1625 }
1626
1627 private:
1628 void setFromString(const std::string &value);
1629
1630 constexpr ValueType static verifyValue(const ValueType &value)
1631 {
1632 return validRange().isInRange(value)
1633 ? value
1634 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1635 + " } is not in range ["
1636 + std::to_string(validRange().min()) + ", "
1637 + std::to_string(validRange().max()) + "]" };
1638 }
1639
1640 Zivid::DataModel::Detail::Optional<double> m_opt;
1641
1642 friend struct DataModel::Detail::Befriend<Blue>;
1643 };
1644
1646
1647 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1649 {
1650 public:
1652 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1653
1655 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1656
1658 static constexpr const char *name{ "Green" };
1659
1661 static constexpr const char *description{
1662 R"description(Digital gain applied to green channel.)description"
1663 };
1664
1666 using ValueType = double;
1667
1669 static constexpr Range<double> validRange()
1670 {
1671 return { 1.0, 8.0 };
1672 }
1673
1675 Green() = default;
1676
1678 explicit constexpr Green(double value)
1679 : m_opt{ verifyValue(value) }
1680 {}
1681
1686 double value() const;
1687
1689 bool hasValue() const;
1690
1692 void reset();
1693
1695 std::string toString() const;
1696
1698 bool operator==(const Green &other) const
1699 {
1700 return m_opt == other.m_opt;
1701 }
1702
1704 bool operator!=(const Green &other) const
1705 {
1706 return m_opt != other.m_opt;
1707 }
1708
1710 bool operator<(const Green &other) const
1711 {
1712 return m_opt < other.m_opt;
1713 }
1714
1716 bool operator>(const Green &other) const
1717 {
1718 return m_opt > other.m_opt;
1719 }
1720
1722 bool operator<=(const Green &other) const
1723 {
1724 return m_opt <= other.m_opt;
1725 }
1726
1728 bool operator>=(const Green &other) const
1729 {
1730 return m_opt >= other.m_opt;
1731 }
1732
1734 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1735 {
1736 return stream << value.toString();
1737 }
1738
1739 private:
1740 void setFromString(const std::string &value);
1741
1742 constexpr ValueType static verifyValue(const ValueType &value)
1743 {
1744 return validRange().isInRange(value)
1745 ? value
1746 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1747 + " } is not in range ["
1748 + std::to_string(validRange().min()) + ", "
1749 + std::to_string(validRange().max()) + "]" };
1750 }
1751
1752 Zivid::DataModel::Detail::Optional<double> m_opt;
1753
1754 friend struct DataModel::Detail::Befriend<Green>;
1755 };
1756
1758
1759 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1761 {
1762 public:
1764 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1765
1767 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1768
1770 static constexpr const char *name{ "Red" };
1771
1773 static constexpr const char *description{
1774 R"description(Digital gain applied to red 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 Red() = default;
1788
1790 explicit constexpr Red(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 Red &other) const
1811 {
1812 return m_opt == other.m_opt;
1813 }
1814
1816 bool operator!=(const Red &other) const
1817 {
1818 return m_opt != other.m_opt;
1819 }
1820
1822 bool operator<(const Red &other) const
1823 {
1824 return m_opt < other.m_opt;
1825 }
1826
1828 bool operator>(const Red &other) const
1829 {
1830 return m_opt > other.m_opt;
1831 }
1832
1834 bool operator<=(const Red &other) const
1835 {
1836 return m_opt <= other.m_opt;
1837 }
1838
1840 bool operator>=(const Red &other) const
1841 {
1842 return m_opt >= other.m_opt;
1843 }
1844
1846 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1847 {
1848 return stream << value.toString();
1849 }
1850
1851 private:
1852 void setFromString(const std::string &value);
1853
1854 constexpr ValueType static verifyValue(const ValueType &value)
1855 {
1856 return validRange().isInRange(value)
1857 ? value
1858 : throw std::out_of_range{ "Red{ " + std::to_string(value)
1859 + " } is not in range ["
1860 + std::to_string(validRange().min()) + ", "
1861 + std::to_string(validRange().max()) + "]" };
1862 }
1863
1864 Zivid::DataModel::Detail::Optional<double> m_opt;
1865
1866 friend struct DataModel::Detail::Befriend<Red>;
1867 };
1868
1869 using Descendants = std::tuple<
1873
1876
1890#ifndef NO_DOC
1891 template<
1892 typename... Args,
1893 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1894 typename std::enable_if<
1895 Zivid::Detail::TypeTraits::
1896 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1897 int>::type = 0>
1898#else
1899 template<typename... Args>
1900#endif
1901 explicit Balance(Args &&...args)
1902 {
1903 using namespace Zivid::Detail::TypeTraits;
1904
1905 static_assert(
1906 AllArgsDecayedAreUnique<Args...>::value,
1907 "Found duplicate types among the arguments passed to Balance(...). "
1908 "Types should be listed at most once.");
1909
1910 set(std::forward<Args>(args)...);
1911 }
1912
1925#ifndef NO_DOC
1926 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1927#else
1928 template<typename... Args>
1929#endif
1930 void set(Args &&...args)
1931 {
1932 using namespace Zivid::Detail::TypeTraits;
1933
1934 using AllArgsAreDescendantNodes =
1935 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1936 static_assert(
1937 AllArgsAreDescendantNodes::value,
1938 "All arguments passed to set(...) must be descendant nodes.");
1939
1940 static_assert(
1941 AllArgsDecayedAreUnique<Args...>::value,
1942 "Found duplicate types among the arguments passed to set(...). "
1943 "Types should be listed at most once.");
1944
1945 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1946 }
1947
1961#ifndef NO_DOC
1962 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1963#else
1964 template<typename... Args>
1965#endif
1966 Balance copyWith(Args &&...args) const
1967 {
1968 using namespace Zivid::Detail::TypeTraits;
1969
1970 using AllArgsAreDescendantNodes =
1971 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1972 static_assert(
1973 AllArgsAreDescendantNodes::value,
1974 "All arguments passed to copyWith(...) must be descendant nodes.");
1975
1976 static_assert(
1977 AllArgsDecayedAreUnique<Args...>::value,
1978 "Found duplicate types among the arguments passed to copyWith(...). "
1979 "Types should be listed at most once.");
1980
1981 auto copy{ *this };
1982 copy.set(std::forward<Args>(args)...);
1983 return copy;
1984 }
1985
1987 const Blue &blue() const
1988 {
1989 return m_blue;
1990 }
1991
1994 {
1995 return m_blue;
1996 }
1997
1999 Balance &set(const Blue &value)
2000 {
2001 m_blue = value;
2002 return *this;
2003 }
2004
2006 const Green &green() const
2007 {
2008 return m_green;
2009 }
2010
2013 {
2014 return m_green;
2015 }
2016
2018 Balance &set(const Green &value)
2019 {
2020 m_green = value;
2021 return *this;
2022 }
2023
2025 const Red &red() const
2026 {
2027 return m_red;
2028 }
2029
2032 {
2033 return m_red;
2034 }
2035
2037 Balance &set(const Red &value)
2038 {
2039 m_red = value;
2040 return *this;
2041 }
2042
2043 template<
2044 typename T,
2045 typename std::enable_if<
2046 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2047 int>::type = 0>
2049 {
2050 return m_blue;
2051 }
2052
2053 template<
2054 typename T,
2055 typename std::enable_if<
2056 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2057 int>::type = 0>
2059 {
2060 return m_green;
2061 }
2062
2063 template<
2064 typename T,
2065 typename std::
2066 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2068 {
2069 return m_red;
2070 }
2071
2072 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2074 {
2075 return m_blue;
2076 }
2077
2078 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2080 {
2081 return m_green;
2082 }
2083
2084 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2086 {
2087 return m_red;
2088 }
2089
2091 template<typename F>
2092 void forEach(const F &f) const
2093 {
2094 f(m_blue);
2095 f(m_green);
2096 f(m_red);
2097 }
2098
2100 template<typename F>
2101 void forEach(const F &f)
2102 {
2103 f(m_blue);
2104 f(m_green);
2105 f(m_red);
2106 }
2107
2109 bool operator==(const Balance &other) const;
2110
2112 bool operator!=(const Balance &other) const;
2113
2115 std::string toString() const;
2116
2118 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2119 {
2120 return stream << value.toString();
2121 }
2122
2123 private:
2124 void setFromString(const std::string &value);
2125
2126 void setFromString(const std::string &fullPath, const std::string &value);
2127
2128 std::string getString(const std::string &fullPath) const;
2129
2130 Blue m_blue;
2131 Green m_green;
2132 Red m_red;
2133
2134 friend struct DataModel::Detail::Befriend<Balance>;
2135 };
2136
2138
2139 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2141 {
2142 public:
2144 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2145
2147 static constexpr const char *path{ "Processing/Color/Experimental" };
2148
2150 static constexpr const char *name{ "Experimental" };
2151
2153 static constexpr const char *description{
2154 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2155 };
2156
2179
2180 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2182 {
2183 public:
2185 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2186
2188 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2189
2191 static constexpr const char *name{ "Mode" };
2192
2194 static constexpr const char *description{
2195 R"description(This setting controls how the color image is computed.
2196
2197`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2198single-acquisition captures and multi-acquisition captures when all the acquisitions have
2199identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2200multi-acquisition HDR captures with differing acquisition settings.
2201
2202`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2203the capture consists of more than one acquisition, then the remaining acquisitions are not used
2204for the color image. No tone mapping is performed. This option provides the most control of
2205the color image, and the color values will be consistent over repeated captures with the same
2206settings.
2207
2208`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2209HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2210image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2211applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2212normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2213mode the color values can be inconsistent over repeated captures if you move, add or remove
2214objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2215mode.
2216)description"
2217 };
2218
2220 enum class ValueType
2221 {
2222 automatic,
2223 useFirstAcquisition,
2224 toneMapping
2225 };
2226 static const Mode automatic;
2228 static const Mode toneMapping;
2229
2231 static std::set<ValueType> validValues()
2232 {
2233 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2234 }
2235
2237 Mode() = default;
2238
2240 explicit constexpr Mode(ValueType value)
2241 : m_opt{ verifyValue(value) }
2242 {}
2243
2249
2251 bool hasValue() const;
2252
2254 void reset();
2255
2257 std::string toString() const;
2258
2260 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2261 {
2262 return stream << Mode{ value }.toString();
2263 }
2264
2266 bool operator==(const Mode &other) const
2267 {
2268 return m_opt == other.m_opt;
2269 }
2270
2272 bool operator!=(const Mode &other) const
2273 {
2274 return m_opt != other.m_opt;
2275 }
2276
2278 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2279 {
2280 return stream << value.toString();
2281 }
2282
2283 private:
2284 void setFromString(const std::string &value);
2285
2286 constexpr ValueType static verifyValue(const ValueType &value)
2287 {
2288 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2289 || value == ValueType::toneMapping
2290 ? value
2291 : throw std::invalid_argument{
2292 "Invalid value: Mode{ "
2293 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2294 + " }"
2295 };
2296 }
2297
2298 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2299
2300 friend struct DataModel::Detail::Befriend<Mode>;
2301 };
2302
2303 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2304
2307
2319#ifndef NO_DOC
2320 template<
2321 typename... Args,
2322 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2323 typename std::enable_if<
2324 Zivid::Detail::TypeTraits::
2325 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2326 int>::type = 0>
2327#else
2328 template<typename... Args>
2329#endif
2330 explicit Experimental(Args &&...args)
2331 {
2332 using namespace Zivid::Detail::TypeTraits;
2333
2334 static_assert(
2335 AllArgsDecayedAreUnique<Args...>::value,
2336 "Found duplicate types among the arguments passed to Experimental(...). "
2337 "Types should be listed at most once.");
2338
2339 set(std::forward<Args>(args)...);
2340 }
2341
2352#ifndef NO_DOC
2353 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2354#else
2355 template<typename... Args>
2356#endif
2357 void set(Args &&...args)
2358 {
2359 using namespace Zivid::Detail::TypeTraits;
2360
2361 using AllArgsAreDescendantNodes =
2362 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2363 static_assert(
2364 AllArgsAreDescendantNodes::value,
2365 "All arguments passed to set(...) must be descendant nodes.");
2366
2367 static_assert(
2368 AllArgsDecayedAreUnique<Args...>::value,
2369 "Found duplicate types among the arguments passed to set(...). "
2370 "Types should be listed at most once.");
2371
2372 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2373 }
2374
2386#ifndef NO_DOC
2387 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2388#else
2389 template<typename... Args>
2390#endif
2391 Experimental copyWith(Args &&...args) const
2392 {
2393 using namespace Zivid::Detail::TypeTraits;
2394
2395 using AllArgsAreDescendantNodes =
2396 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2397 static_assert(
2398 AllArgsAreDescendantNodes::value,
2399 "All arguments passed to copyWith(...) must be descendant nodes.");
2400
2401 static_assert(
2402 AllArgsDecayedAreUnique<Args...>::value,
2403 "Found duplicate types among the arguments passed to copyWith(...). "
2404 "Types should be listed at most once.");
2405
2406 auto copy{ *this };
2407 copy.set(std::forward<Args>(args)...);
2408 return copy;
2409 }
2410
2412 const Mode &mode() const
2413 {
2414 return m_mode;
2415 }
2416
2419 {
2420 return m_mode;
2421 }
2422
2424 Experimental &set(const Mode &value)
2425 {
2426 m_mode = value;
2427 return *this;
2428 }
2429
2430 template<
2431 typename T,
2432 typename std::enable_if<
2433 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2434 int>::type = 0>
2436 {
2437 return m_mode;
2438 }
2439
2440 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2442 {
2443 return m_mode;
2444 }
2445
2447 template<typename F>
2448 void forEach(const F &f) const
2449 {
2450 f(m_mode);
2451 }
2452
2454 template<typename F>
2455 void forEach(const F &f)
2456 {
2457 f(m_mode);
2458 }
2459
2461 bool operator==(const Experimental &other) const;
2462
2464 bool operator!=(const Experimental &other) const;
2465
2467 std::string toString() const;
2468
2470 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2471 {
2472 return stream << value.toString();
2473 }
2474
2475 private:
2476 void setFromString(const std::string &value);
2477
2478 void setFromString(const std::string &fullPath, const std::string &value);
2479
2480 std::string getString(const std::string &fullPath) const;
2481
2482 Mode m_mode;
2483
2484 friend struct DataModel::Detail::Befriend<Experimental>;
2485 };
2486
2490
2491 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2493 {
2494 public:
2496 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2497
2499 static constexpr const char *path{ "Processing/Color/Gamma" };
2500
2502 static constexpr const char *name{ "Gamma" };
2503
2505 static constexpr const char *description{
2506 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2507greater than 1 makes the colors darker.
2508)description"
2509 };
2510
2512 using ValueType = double;
2513
2515 static constexpr Range<double> validRange()
2516 {
2517 return { 0.25, 1.5 };
2518 }
2519
2521 Gamma() = default;
2522
2524 explicit constexpr Gamma(double value)
2525 : m_opt{ verifyValue(value) }
2526 {}
2527
2532 double value() const;
2533
2535 bool hasValue() const;
2536
2538 void reset();
2539
2541 std::string toString() const;
2542
2544 bool operator==(const Gamma &other) const
2545 {
2546 return m_opt == other.m_opt;
2547 }
2548
2550 bool operator!=(const Gamma &other) const
2551 {
2552 return m_opt != other.m_opt;
2553 }
2554
2556 bool operator<(const Gamma &other) const
2557 {
2558 return m_opt < other.m_opt;
2559 }
2560
2562 bool operator>(const Gamma &other) const
2563 {
2564 return m_opt > other.m_opt;
2565 }
2566
2568 bool operator<=(const Gamma &other) const
2569 {
2570 return m_opt <= other.m_opt;
2571 }
2572
2574 bool operator>=(const Gamma &other) const
2575 {
2576 return m_opt >= other.m_opt;
2577 }
2578
2580 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2581 {
2582 return stream << value.toString();
2583 }
2584
2585 private:
2586 void setFromString(const std::string &value);
2587
2588 constexpr ValueType static verifyValue(const ValueType &value)
2589 {
2590 return validRange().isInRange(value)
2591 ? value
2592 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2593 + std::to_string(validRange().min()) + ", "
2594 + std::to_string(validRange().max()) + "]" };
2595 }
2596
2597 Zivid::DataModel::Detail::Optional<double> m_opt;
2598
2599 friend struct DataModel::Detail::Befriend<Gamma>;
2600 };
2601
2602 using Descendants = std::tuple<
2610
2613
2631#ifndef NO_DOC
2632 template<
2633 typename... Args,
2634 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2635 typename std::enable_if<
2636 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2637 value,
2638 int>::type = 0>
2639#else
2640 template<typename... Args>
2641#endif
2642 explicit Color(Args &&...args)
2643 {
2644 using namespace Zivid::Detail::TypeTraits;
2645
2646 static_assert(
2647 AllArgsDecayedAreUnique<Args...>::value,
2648 "Found duplicate types among the arguments passed to Color(...). "
2649 "Types should be listed at most once.");
2650
2651 set(std::forward<Args>(args)...);
2652 }
2653
2670#ifndef NO_DOC
2671 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2672#else
2673 template<typename... Args>
2674#endif
2675 void set(Args &&...args)
2676 {
2677 using namespace Zivid::Detail::TypeTraits;
2678
2679 using AllArgsAreDescendantNodes =
2680 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2681 static_assert(
2682 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2683
2684 static_assert(
2685 AllArgsDecayedAreUnique<Args...>::value,
2686 "Found duplicate types among the arguments passed to set(...). "
2687 "Types should be listed at most once.");
2688
2689 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2690 }
2691
2709#ifndef NO_DOC
2710 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2711#else
2712 template<typename... Args>
2713#endif
2714 Color copyWith(Args &&...args) const
2715 {
2716 using namespace Zivid::Detail::TypeTraits;
2717
2718 using AllArgsAreDescendantNodes =
2719 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2720 static_assert(
2721 AllArgsAreDescendantNodes::value,
2722 "All arguments passed to copyWith(...) must be descendant nodes.");
2723
2724 static_assert(
2725 AllArgsDecayedAreUnique<Args...>::value,
2726 "Found duplicate types among the arguments passed to copyWith(...). "
2727 "Types should be listed at most once.");
2728
2729 auto copy{ *this };
2730 copy.set(std::forward<Args>(args)...);
2731 return copy;
2732 }
2733
2735 const Balance &balance() const
2736 {
2737 return m_balance;
2738 }
2739
2742 {
2743 return m_balance;
2744 }
2745
2747 Color &set(const Balance &value)
2748 {
2749 m_balance = value;
2750 return *this;
2751 }
2752
2754 Color &set(const Balance::Blue &value)
2755 {
2756 m_balance.set(value);
2757 return *this;
2758 }
2759
2761 Color &set(const Balance::Green &value)
2762 {
2763 m_balance.set(value);
2764 return *this;
2765 }
2766
2768 Color &set(const Balance::Red &value)
2769 {
2770 m_balance.set(value);
2771 return *this;
2772 }
2773
2776 {
2777 return m_experimental;
2778 }
2779
2782 {
2783 return m_experimental;
2784 }
2785
2787 Color &set(const Experimental &value)
2788 {
2789 m_experimental = value;
2790 return *this;
2791 }
2792
2795 {
2796 m_experimental.set(value);
2797 return *this;
2798 }
2799
2801 const Gamma &gamma() const
2802 {
2803 return m_gamma;
2804 }
2805
2808 {
2809 return m_gamma;
2810 }
2811
2813 Color &set(const Gamma &value)
2814 {
2815 m_gamma = value;
2816 return *this;
2817 }
2818
2819 template<
2820 typename T,
2821 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
2822 0>
2824 {
2825 return m_balance;
2826 }
2827
2828 template<
2829 typename T,
2830 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
2831 type = 0>
2833 {
2834 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
2835 }
2836
2837 template<
2838 typename T,
2839 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
2840 type = 0>
2842 {
2843 return m_balance.get<Settings::Processing::Color::Balance::Green>();
2844 }
2845
2846 template<
2847 typename T,
2848 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
2849 type = 0>
2851 {
2852 return m_balance.get<Settings::Processing::Color::Balance::Red>();
2853 }
2854
2855 template<
2856 typename T,
2857 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
2858 type = 0>
2860 {
2861 return m_experimental;
2862 }
2863
2864 template<
2865 typename T,
2866 typename std::enable_if<
2867 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2868 int>::type = 0>
2870 {
2871 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
2872 }
2873
2874 template<
2875 typename T,
2876 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
2878 {
2879 return m_gamma;
2880 }
2881
2882 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2884 {
2885 return m_balance;
2886 }
2887
2888 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2890 {
2891 return m_experimental;
2892 }
2893
2894 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2896 {
2897 return m_gamma;
2898 }
2899
2901 template<typename F>
2902 void forEach(const F &f) const
2903 {
2904 f(m_balance);
2905 f(m_experimental);
2906 f(m_gamma);
2907 }
2908
2910 template<typename F>
2911 void forEach(const F &f)
2912 {
2913 f(m_balance);
2914 f(m_experimental);
2915 f(m_gamma);
2916 }
2917
2919 bool operator==(const Color &other) const;
2920
2922 bool operator!=(const Color &other) const;
2923
2925 std::string toString() const;
2926
2928 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
2929 {
2930 return stream << value.toString();
2931 }
2932
2933 private:
2934 void setFromString(const std::string &value);
2935
2936 void setFromString(const std::string &fullPath, const std::string &value);
2937
2938 std::string getString(const std::string &fullPath) const;
2939
2940 Balance m_balance;
2941 Experimental m_experimental;
2942 Gamma m_gamma;
2943
2944 friend struct DataModel::Detail::Befriend<Color>;
2945 };
2946
2948
2949 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2951 {
2952 public:
2954 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2955
2957 static constexpr const char *path{ "Processing/Filters" };
2958
2960 static constexpr const char *name{ "Filters" };
2961
2963 static constexpr const char *description{ R"description(Filter settings.)description" };
2964
2967
2968 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2970 {
2971 public:
2973 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2974
2976 static constexpr const char *path{ "Processing/Filters/Cluster" };
2977
2979 static constexpr const char *name{ "Cluster" };
2980
2982 static constexpr const char *description{
2983 R"description(Removes floating points and isolated clusters from the point cloud.
2984)description"
2985 };
2986
2988
2989 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2991 {
2992 public:
2994 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2995
2997 static constexpr const char *path{ "Processing/Filters/Cluster/Removal" };
2998
3000 static constexpr const char *name{ "Removal" };
3001
3003 static constexpr const char *description{ R"description(Cluster removal filter.)description" };
3004
3006
3007 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3009 {
3010 public:
3012 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3013
3015 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/Enabled" };
3016
3018 static constexpr const char *name{ "Enabled" };
3019
3021 static constexpr const char *description{
3022 R"description(Enable or disable cluster removal.)description"
3023 };
3024
3026 using ValueType = bool;
3027 static const Enabled yes;
3028 static const Enabled no;
3029
3031 static std::set<bool> validValues()
3032 {
3033 return { false, true };
3034 }
3035
3037 Enabled() = default;
3038
3040 explicit constexpr Enabled(bool value)
3041 : m_opt{ value }
3042 {}
3043
3048 bool value() const;
3049
3051 bool hasValue() const;
3052
3054 void reset();
3055
3057 std::string toString() const;
3058
3060 bool operator==(const Enabled &other) const
3061 {
3062 return m_opt == other.m_opt;
3063 }
3064
3066 bool operator!=(const Enabled &other) const
3067 {
3068 return m_opt != other.m_opt;
3069 }
3070
3072 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3073 {
3074 return stream << value.toString();
3075 }
3076
3077 private:
3078 void setFromString(const std::string &value);
3079
3080 Zivid::DataModel::Detail::Optional<bool> m_opt;
3081
3082 friend struct DataModel::Detail::Befriend<Enabled>;
3083 };
3084
3089
3090 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3092 {
3093 public:
3095 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3096
3098 static constexpr const char *path{
3099 "Processing/Filters/Cluster/Removal/MaxNeighborDistance"
3100 };
3101
3103 static constexpr const char *name{ "MaxNeighborDistance" };
3104
3106 static constexpr const char *description{
3107 R"description(Maximum normalized distance between neighboring points that are still classified as
3108belonging to the same cluster. The default value is optimal for most scenes. On messy
3109scenes turning this setting down helps removing more bad points.
3110)description"
3111 };
3112
3114 using ValueType = double;
3115
3117 static constexpr Range<double> validRange()
3118 {
3119 return { 2.0, 10.0 };
3120 }
3121
3124
3126 explicit constexpr MaxNeighborDistance(double value)
3127 : m_opt{ verifyValue(value) }
3128 {}
3129
3134 double value() const;
3135
3137 bool hasValue() const;
3138
3140 void reset();
3141
3143 std::string toString() const;
3144
3146 bool operator==(const MaxNeighborDistance &other) const
3147 {
3148 return m_opt == other.m_opt;
3149 }
3150
3152 bool operator!=(const MaxNeighborDistance &other) const
3153 {
3154 return m_opt != other.m_opt;
3155 }
3156
3158 bool operator<(const MaxNeighborDistance &other) const
3159 {
3160 return m_opt < other.m_opt;
3161 }
3162
3164 bool operator>(const MaxNeighborDistance &other) const
3165 {
3166 return m_opt > other.m_opt;
3167 }
3168
3170 bool operator<=(const MaxNeighborDistance &other) const
3171 {
3172 return m_opt <= other.m_opt;
3173 }
3174
3176 bool operator>=(const MaxNeighborDistance &other) const
3177 {
3178 return m_opt >= other.m_opt;
3179 }
3180
3182 friend std::ostream &operator<<(std::ostream &stream, const MaxNeighborDistance &value)
3183 {
3184 return stream << value.toString();
3185 }
3186
3187 private:
3188 void setFromString(const std::string &value);
3189
3190 constexpr ValueType static verifyValue(const ValueType &value)
3191 {
3192 return validRange().isInRange(value)
3193 ? value
3194 : throw std::out_of_range{ "MaxNeighborDistance{ " + std::to_string(value)
3195 + " } is not in range ["
3196 + std::to_string(validRange().min()) + ", "
3197 + std::to_string(validRange().max()) + "]" };
3198 }
3199
3200 Zivid::DataModel::Detail::Optional<double> m_opt;
3201
3202 friend struct DataModel::Detail::Befriend<MaxNeighborDistance>;
3203 };
3204
3208
3209 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3211 {
3212 public:
3214 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3215
3217 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/MinArea" };
3218
3220 static constexpr const char *name{ "MinArea" };
3221
3223 static constexpr const char *description{
3224 R"description(Clusters with area below this threshold are removed by the filter.
3225The area is given in mm^2.
3226)description"
3227 };
3228
3230 using ValueType = double;
3231
3233 static constexpr Range<double> validRange()
3234 {
3235 return { 0.0, 1500.0 };
3236 }
3237
3239 MinArea() = default;
3240
3242 explicit constexpr MinArea(double value)
3243 : m_opt{ verifyValue(value) }
3244 {}
3245
3250 double value() const;
3251
3253 bool hasValue() const;
3254
3256 void reset();
3257
3259 std::string toString() const;
3260
3262 bool operator==(const MinArea &other) const
3263 {
3264 return m_opt == other.m_opt;
3265 }
3266
3268 bool operator!=(const MinArea &other) const
3269 {
3270 return m_opt != other.m_opt;
3271 }
3272
3274 bool operator<(const MinArea &other) const
3275 {
3276 return m_opt < other.m_opt;
3277 }
3278
3280 bool operator>(const MinArea &other) const
3281 {
3282 return m_opt > other.m_opt;
3283 }
3284
3286 bool operator<=(const MinArea &other) const
3287 {
3288 return m_opt <= other.m_opt;
3289 }
3290
3292 bool operator>=(const MinArea &other) const
3293 {
3294 return m_opt >= other.m_opt;
3295 }
3296
3298 friend std::ostream &operator<<(std::ostream &stream, const MinArea &value)
3299 {
3300 return stream << value.toString();
3301 }
3302
3303 private:
3304 void setFromString(const std::string &value);
3305
3306 constexpr ValueType static verifyValue(const ValueType &value)
3307 {
3308 return validRange().isInRange(value)
3309 ? value
3310 : throw std::out_of_range{ "MinArea{ " + std::to_string(value)
3311 + " } is not in range ["
3312 + std::to_string(validRange().min()) + ", "
3313 + std::to_string(validRange().max()) + "]" };
3314 }
3315
3316 Zivid::DataModel::Detail::Optional<double> m_opt;
3317
3318 friend struct DataModel::Detail::Befriend<MinArea>;
3319 };
3320
3321 using Descendants = std::tuple<
3325
3328
3342#ifndef NO_DOC
3343 template<
3344 typename... Args,
3345 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3346 typename std::enable_if<
3347 Zivid::Detail::TypeTraits::
3348 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3349 int>::type = 0>
3350#else
3351 template<typename... Args>
3352#endif
3353 explicit Removal(Args &&...args)
3354 {
3355 using namespace Zivid::Detail::TypeTraits;
3356
3357 static_assert(
3358 AllArgsDecayedAreUnique<Args...>::value,
3359 "Found duplicate types among the arguments passed to Removal(...). "
3360 "Types should be listed at most once.");
3361
3362 set(std::forward<Args>(args)...);
3363 }
3364
3377#ifndef NO_DOC
3378 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3379#else
3380 template<typename... Args>
3381#endif
3382 void set(Args &&...args)
3383 {
3384 using namespace Zivid::Detail::TypeTraits;
3385
3386 using AllArgsAreDescendantNodes =
3387 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3388 static_assert(
3389 AllArgsAreDescendantNodes::value,
3390 "All arguments passed to set(...) must be descendant nodes.");
3391
3392 static_assert(
3393 AllArgsDecayedAreUnique<Args...>::value,
3394 "Found duplicate types among the arguments passed to set(...). "
3395 "Types should be listed at most once.");
3396
3397 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3398 }
3399
3413#ifndef NO_DOC
3414 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3415#else
3416 template<typename... Args>
3417#endif
3418 Removal copyWith(Args &&...args) const
3419 {
3420 using namespace Zivid::Detail::TypeTraits;
3421
3422 using AllArgsAreDescendantNodes =
3423 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3424 static_assert(
3425 AllArgsAreDescendantNodes::value,
3426 "All arguments passed to copyWith(...) must be descendant nodes.");
3427
3428 static_assert(
3429 AllArgsDecayedAreUnique<Args...>::value,
3430 "Found duplicate types among the arguments passed to copyWith(...). "
3431 "Types should be listed at most once.");
3432
3433 auto copy{ *this };
3434 copy.set(std::forward<Args>(args)...);
3435 return copy;
3436 }
3437
3439 const Enabled &isEnabled() const
3440 {
3441 return m_enabled;
3442 }
3443
3446 {
3447 return m_enabled;
3448 }
3449
3451 Removal &set(const Enabled &value)
3452 {
3453 m_enabled = value;
3454 return *this;
3455 }
3456
3459 {
3460 return m_maxNeighborDistance;
3461 }
3462
3465 {
3466 return m_maxNeighborDistance;
3467 }
3468
3471 {
3472 m_maxNeighborDistance = value;
3473 return *this;
3474 }
3475
3477 const MinArea &minArea() const
3478 {
3479 return m_minArea;
3480 }
3481
3484 {
3485 return m_minArea;
3486 }
3487
3489 Removal &set(const MinArea &value)
3490 {
3491 m_minArea = value;
3492 return *this;
3493 }
3494
3495 template<
3496 typename T,
3497 typename std::enable_if<
3498 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3499 int>::type = 0>
3501 {
3502 return m_enabled;
3503 }
3504
3505 template<
3506 typename T,
3507 typename std::enable_if<
3508 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3509 value,
3510 int>::type = 0>
3512 {
3513 return m_maxNeighborDistance;
3514 }
3515
3516 template<
3517 typename T,
3518 typename std::enable_if<
3519 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3520 int>::type = 0>
3522 {
3523 return m_minArea;
3524 }
3525
3526 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3528 {
3529 return m_enabled;
3530 }
3531
3532 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3534 {
3535 return m_maxNeighborDistance;
3536 }
3537
3538 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3540 {
3541 return m_minArea;
3542 }
3543
3545 template<typename F>
3546 void forEach(const F &f) const
3547 {
3548 f(m_enabled);
3549 f(m_maxNeighborDistance);
3550 f(m_minArea);
3551 }
3552
3554 template<typename F>
3555 void forEach(const F &f)
3556 {
3557 f(m_enabled);
3558 f(m_maxNeighborDistance);
3559 f(m_minArea);
3560 }
3561
3563 bool operator==(const Removal &other) const;
3564
3566 bool operator!=(const Removal &other) const;
3567
3569 std::string toString() const;
3570
3572 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3573 {
3574 return stream << value.toString();
3575 }
3576
3577 private:
3578 void setFromString(const std::string &value);
3579
3580 void setFromString(const std::string &fullPath, const std::string &value);
3581
3582 std::string getString(const std::string &fullPath) const;
3583
3584 Enabled m_enabled;
3585 MaxNeighborDistance m_maxNeighborDistance;
3586 MinArea m_minArea;
3587
3588 friend struct DataModel::Detail::Befriend<Removal>;
3589 };
3590
3591 using Descendants = std::tuple<
3596
3599
3614#ifndef NO_DOC
3615 template<
3616 typename... Args,
3617 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3618 typename std::enable_if<
3619 Zivid::Detail::TypeTraits::
3620 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3621 int>::type = 0>
3622#else
3623 template<typename... Args>
3624#endif
3625 explicit Cluster(Args &&...args)
3626 {
3627 using namespace Zivid::Detail::TypeTraits;
3628
3629 static_assert(
3630 AllArgsDecayedAreUnique<Args...>::value,
3631 "Found duplicate types among the arguments passed to Cluster(...). "
3632 "Types should be listed at most once.");
3633
3634 set(std::forward<Args>(args)...);
3635 }
3636
3650#ifndef NO_DOC
3651 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3652#else
3653 template<typename... Args>
3654#endif
3655 void set(Args &&...args)
3656 {
3657 using namespace Zivid::Detail::TypeTraits;
3658
3659 using AllArgsAreDescendantNodes =
3660 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3661 static_assert(
3662 AllArgsAreDescendantNodes::value,
3663 "All arguments passed to set(...) must be descendant nodes.");
3664
3665 static_assert(
3666 AllArgsDecayedAreUnique<Args...>::value,
3667 "Found duplicate types among the arguments passed to set(...). "
3668 "Types should be listed at most once.");
3669
3670 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3671 }
3672
3687#ifndef NO_DOC
3688 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3689#else
3690 template<typename... Args>
3691#endif
3692 Cluster copyWith(Args &&...args) const
3693 {
3694 using namespace Zivid::Detail::TypeTraits;
3695
3696 using AllArgsAreDescendantNodes =
3697 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3698 static_assert(
3699 AllArgsAreDescendantNodes::value,
3700 "All arguments passed to copyWith(...) must be descendant nodes.");
3701
3702 static_assert(
3703 AllArgsDecayedAreUnique<Args...>::value,
3704 "Found duplicate types among the arguments passed to copyWith(...). "
3705 "Types should be listed at most once.");
3706
3707 auto copy{ *this };
3708 copy.set(std::forward<Args>(args)...);
3709 return copy;
3710 }
3711
3713 const Removal &removal() const
3714 {
3715 return m_removal;
3716 }
3717
3720 {
3721 return m_removal;
3722 }
3723
3725 Cluster &set(const Removal &value)
3726 {
3727 m_removal = value;
3728 return *this;
3729 }
3730
3733 {
3734 m_removal.set(value);
3735 return *this;
3736 }
3737
3740 {
3741 m_removal.set(value);
3742 return *this;
3743 }
3744
3747 {
3748 m_removal.set(value);
3749 return *this;
3750 }
3751
3752 template<
3753 typename T,
3754 typename std::enable_if<
3755 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
3756 int>::type = 0>
3758 {
3759 return m_removal;
3760 }
3761
3762 template<
3763 typename T,
3764 typename std::enable_if<
3765 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3766 int>::type = 0>
3768 {
3770 }
3771
3772 template<
3773 typename T,
3774 typename std::enable_if<
3775 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3776 value,
3777 int>::type = 0>
3779 {
3781 }
3782
3783 template<
3784 typename T,
3785 typename std::enable_if<
3786 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3787 int>::type = 0>
3789 {
3791 }
3792
3793 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3795 {
3796 return m_removal;
3797 }
3798
3800 template<typename F>
3801 void forEach(const F &f) const
3802 {
3803 f(m_removal);
3804 }
3805
3807 template<typename F>
3808 void forEach(const F &f)
3809 {
3810 f(m_removal);
3811 }
3812
3814 bool operator==(const Cluster &other) const;
3815
3817 bool operator!=(const Cluster &other) const;
3818
3820 std::string toString() const;
3821
3823 friend std::ostream &operator<<(std::ostream &stream, const Cluster &value)
3824 {
3825 return stream << value.toString();
3826 }
3827
3828 private:
3829 void setFromString(const std::string &value);
3830
3831 void setFromString(const std::string &fullPath, const std::string &value);
3832
3833 std::string getString(const std::string &fullPath) const;
3834
3835 Removal m_removal;
3836
3837 friend struct DataModel::Detail::Befriend<Cluster>;
3838 };
3839
3841
3842 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3844 {
3845 public:
3847 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3848
3850 static constexpr const char *path{ "Processing/Filters/Experimental" };
3851
3853 static constexpr const char *name{ "Experimental" };
3854
3856 static constexpr const char *description{
3857 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
3858 };
3859
3865
3866 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3868 {
3869 public:
3871 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3872
3874 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
3875
3877 static constexpr const char *name{ "ContrastDistortion" };
3878
3880 static constexpr const char *description{
3881 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
3882or high contrast. These artifacts are caused by blurring in the lens. The filter
3883works best when aperture values are chosen such that the camera has quite good focus.
3884The filter also supports removing the points that experience a large correction.
3885)description"
3886 };
3887
3889
3890 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3892 {
3893 public:
3895 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3896
3898 static constexpr const char *path{
3899 "Processing/Filters/Experimental/ContrastDistortion/Correction"
3900 };
3901
3903 static constexpr const char *name{ "Correction" };
3904
3906 static constexpr const char *description{
3907 R"description(Contrast distortion correction filter.)description"
3908 };
3909
3911
3912 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3914 {
3915 public:
3917 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3918
3920 static constexpr const char *path{
3921 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
3922 };
3923
3925 static constexpr const char *name{ "Enabled" };
3926
3928 static constexpr const char *description{
3929 R"description(Enable or disable contrast distortion correction.)description"
3930 };
3931
3933 using ValueType = bool;
3934 static const Enabled yes;
3935 static const Enabled no;
3936
3938 static std::set<bool> validValues()
3939 {
3940 return { false, true };
3941 }
3942
3944 Enabled() = default;
3945
3947 explicit constexpr Enabled(bool value)
3948 : m_opt{ value }
3949 {}
3950
3955 bool value() const;
3956
3958 bool hasValue() const;
3959
3961 void reset();
3962
3964 std::string toString() const;
3965
3967 bool operator==(const Enabled &other) const
3968 {
3969 return m_opt == other.m_opt;
3970 }
3971
3973 bool operator!=(const Enabled &other) const
3974 {
3975 return m_opt != other.m_opt;
3976 }
3977
3979 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3980 {
3981 return stream << value.toString();
3982 }
3983
3984 private:
3985 void setFromString(const std::string &value);
3986
3987 Zivid::DataModel::Detail::Optional<bool> m_opt;
3988
3989 friend struct DataModel::Detail::Befriend<Enabled>;
3990 };
3991
3993
3994 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3996 {
3997 public:
3999 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4000
4002 static constexpr const char *path{
4003 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
4004 };
4005
4007 static constexpr const char *name{ "Strength" };
4008
4010 static constexpr const char *description{
4011 R"description(Strength of correction. Higher values give more correction.)description"
4012 };
4013
4015 using ValueType = double;
4016
4018 static constexpr Range<double> validRange()
4019 {
4020 return { 0.0, 1.0 };
4021 }
4022
4024 Strength() = default;
4025
4027 explicit constexpr Strength(double value)
4028 : m_opt{ verifyValue(value) }
4029 {}
4030
4035 double value() const;
4036
4038 bool hasValue() const;
4039
4041 void reset();
4042
4044 std::string toString() const;
4045
4047 bool operator==(const Strength &other) const
4048 {
4049 return m_opt == other.m_opt;
4050 }
4051
4053 bool operator!=(const Strength &other) const
4054 {
4055 return m_opt != other.m_opt;
4056 }
4057
4059 bool operator<(const Strength &other) const
4060 {
4061 return m_opt < other.m_opt;
4062 }
4063
4065 bool operator>(const Strength &other) const
4066 {
4067 return m_opt > other.m_opt;
4068 }
4069
4071 bool operator<=(const Strength &other) const
4072 {
4073 return m_opt <= other.m_opt;
4074 }
4075
4077 bool operator>=(const Strength &other) const
4078 {
4079 return m_opt >= other.m_opt;
4080 }
4081
4083 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
4084 {
4085 return stream << value.toString();
4086 }
4087
4088 private:
4089 void setFromString(const std::string &value);
4090
4091 constexpr ValueType static verifyValue(const ValueType &value)
4092 {
4093 return validRange().isInRange(value)
4094 ? value
4095 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
4096 + " } is not in range ["
4097 + std::to_string(validRange().min()) + ", "
4098 + std::to_string(validRange().max()) + "]" };
4099 }
4100
4101 Zivid::DataModel::Detail::Optional<double> m_opt;
4102
4103 friend struct DataModel::Detail::Befriend<Strength>;
4104 };
4105
4106 using Descendants = std::tuple<
4109
4112
4125#ifndef NO_DOC
4126 template<
4127 typename... Args,
4128 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4129 typename std::enable_if<
4130 Zivid::Detail::TypeTraits::
4131 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4132 int>::type = 0>
4133#else
4134 template<typename... Args>
4135#endif
4136 explicit Correction(Args &&...args)
4137 {
4138 using namespace Zivid::Detail::TypeTraits;
4139
4140 static_assert(
4141 AllArgsDecayedAreUnique<Args...>::value,
4142 "Found duplicate types among the arguments passed to Correction(...). "
4143 "Types should be listed at most once.");
4144
4145 set(std::forward<Args>(args)...);
4146 }
4147
4159#ifndef NO_DOC
4160 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4161#else
4162 template<typename... Args>
4163#endif
4164 void set(Args &&...args)
4165 {
4166 using namespace Zivid::Detail::TypeTraits;
4167
4168 using AllArgsAreDescendantNodes =
4169 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4170 static_assert(
4171 AllArgsAreDescendantNodes::value,
4172 "All arguments passed to set(...) must be descendant nodes.");
4173
4174 static_assert(
4175 AllArgsDecayedAreUnique<Args...>::value,
4176 "Found duplicate types among the arguments passed to set(...). "
4177 "Types should be listed at most once.");
4178
4179 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4180 }
4181
4194#ifndef NO_DOC
4195 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4196#else
4197 template<typename... Args>
4198#endif
4199 Correction copyWith(Args &&...args) const
4200 {
4201 using namespace Zivid::Detail::TypeTraits;
4202
4203 using AllArgsAreDescendantNodes =
4204 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4205 static_assert(
4206 AllArgsAreDescendantNodes::value,
4207 "All arguments passed to copyWith(...) must be descendant nodes.");
4208
4209 static_assert(
4210 AllArgsDecayedAreUnique<Args...>::value,
4211 "Found duplicate types among the arguments passed to copyWith(...). "
4212 "Types should be listed at most once.");
4213
4214 auto copy{ *this };
4215 copy.set(std::forward<Args>(args)...);
4216 return copy;
4217 }
4218
4220 const Enabled &isEnabled() const
4221 {
4222 return m_enabled;
4223 }
4224
4227 {
4228 return m_enabled;
4229 }
4230
4232 Correction &set(const Enabled &value)
4233 {
4234 m_enabled = value;
4235 return *this;
4236 }
4237
4239 const Strength &strength() const
4240 {
4241 return m_strength;
4242 }
4243
4246 {
4247 return m_strength;
4248 }
4249
4251 Correction &set(const Strength &value)
4252 {
4253 m_strength = value;
4254 return *this;
4255 }
4256
4257 template<
4258 typename T,
4259 typename std::enable_if<
4260 std::is_same<
4261 T,
4262 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4263 Enabled>::value,
4264 int>::type = 0>
4266 get() const
4267 {
4268 return m_enabled;
4269 }
4270
4271 template<
4272 typename T,
4273 typename std::enable_if<
4274 std::is_same<
4275 T,
4276 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4277 Strength>::value,
4278 int>::type = 0>
4279 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4280 Strength &
4281 get() const
4282 {
4283 return m_strength;
4284 }
4285
4286 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4288 get() const
4289 {
4290 return m_enabled;
4291 }
4292
4293 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4294 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4295 Strength &
4296 get() const
4297 {
4298 return m_strength;
4299 }
4300
4302 template<typename F>
4303 void forEach(const F &f) const
4304 {
4305 f(m_enabled);
4306 f(m_strength);
4307 }
4308
4310 template<typename F>
4311 void forEach(const F &f)
4312 {
4313 f(m_enabled);
4314 f(m_strength);
4315 }
4316
4318 bool operator==(const Correction &other) const;
4319
4321 bool operator!=(const Correction &other) const;
4322
4324 std::string toString() const;
4325
4327 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
4328 {
4329 return stream << value.toString();
4330 }
4331
4332 private:
4333 void setFromString(const std::string &value);
4334
4335 void setFromString(const std::string &fullPath, const std::string &value);
4336
4337 std::string getString(const std::string &fullPath) const;
4338
4339 Enabled m_enabled;
4340 Strength m_strength;
4341
4342 friend struct DataModel::Detail::Befriend<Correction>;
4343 };
4344
4346
4347 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4349 {
4350 public:
4352 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4353
4355 static constexpr const char *path{
4356 "Processing/Filters/Experimental/ContrastDistortion/Removal"
4357 };
4358
4360 static constexpr const char *name{ "Removal" };
4361
4363 static constexpr const char *description{
4364 R"description(Contrast distortion removal filter.)description"
4365 };
4366
4368
4369 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4371 {
4372 public:
4374 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4375
4377 static constexpr const char *path{
4378 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
4379 };
4380
4382 static constexpr const char *name{ "Enabled" };
4383
4385 static constexpr const char *description{
4386 R"description(Enable or disable contrast distortion removal.)description"
4387 };
4388
4390 using ValueType = bool;
4391 static const Enabled yes;
4392 static const Enabled no;
4393
4395 static std::set<bool> validValues()
4396 {
4397 return { false, true };
4398 }
4399
4401 Enabled() = default;
4402
4404 explicit constexpr Enabled(bool value)
4405 : m_opt{ value }
4406 {}
4407
4412 bool value() const;
4413
4415 bool hasValue() const;
4416
4418 void reset();
4419
4421 std::string toString() const;
4422
4424 bool operator==(const Enabled &other) const
4425 {
4426 return m_opt == other.m_opt;
4427 }
4428
4430 bool operator!=(const Enabled &other) const
4431 {
4432 return m_opt != other.m_opt;
4433 }
4434
4436 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4437 {
4438 return stream << value.toString();
4439 }
4440
4441 private:
4442 void setFromString(const std::string &value);
4443
4444 Zivid::DataModel::Detail::Optional<bool> m_opt;
4445
4446 friend struct DataModel::Detail::Befriend<Enabled>;
4447 };
4448
4450
4451 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4453 {
4454 public:
4456 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4457
4459 static constexpr const char *path{
4460 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
4461 };
4462
4464 static constexpr const char *name{ "Threshold" };
4465
4467 static constexpr const char *description{
4468 R"description(Threshold for removal. Higher values remove more points.)description"
4469 };
4470
4472 using ValueType = double;
4473
4475 static constexpr Range<double> validRange()
4476 {
4477 return { 0.0, 1.0 };
4478 }
4479
4481 Threshold() = default;
4482
4484 explicit constexpr Threshold(double value)
4485 : m_opt{ verifyValue(value) }
4486 {}
4487
4492 double value() const;
4493
4495 bool hasValue() const;
4496
4498 void reset();
4499
4501 std::string toString() const;
4502
4504 bool operator==(const Threshold &other) const
4505 {
4506 return m_opt == other.m_opt;
4507 }
4508
4510 bool operator!=(const Threshold &other) const
4511 {
4512 return m_opt != other.m_opt;
4513 }
4514
4516 bool operator<(const Threshold &other) const
4517 {
4518 return m_opt < other.m_opt;
4519 }
4520
4522 bool operator>(const Threshold &other) const
4523 {
4524 return m_opt > other.m_opt;
4525 }
4526
4528 bool operator<=(const Threshold &other) const
4529 {
4530 return m_opt <= other.m_opt;
4531 }
4532
4534 bool operator>=(const Threshold &other) const
4535 {
4536 return m_opt >= other.m_opt;
4537 }
4538
4540 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4541 {
4542 return stream << value.toString();
4543 }
4544
4545 private:
4546 void setFromString(const std::string &value);
4547
4548 constexpr ValueType static verifyValue(const ValueType &value)
4549 {
4550 return validRange().isInRange(value)
4551 ? value
4552 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4553 + " } is not in range ["
4554 + std::to_string(validRange().min()) + ", "
4555 + std::to_string(validRange().max()) + "]" };
4556 }
4557
4558 Zivid::DataModel::Detail::Optional<double> m_opt;
4559
4560 friend struct DataModel::Detail::Befriend<Threshold>;
4561 };
4562
4563 using Descendants = std::tuple<
4566
4569
4582#ifndef NO_DOC
4583 template<
4584 typename... Args,
4585 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4586 typename std::enable_if<
4587 Zivid::Detail::TypeTraits::
4588 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4589 int>::type = 0>
4590#else
4591 template<typename... Args>
4592#endif
4593 explicit Removal(Args &&...args)
4594 {
4595 using namespace Zivid::Detail::TypeTraits;
4596
4597 static_assert(
4598 AllArgsDecayedAreUnique<Args...>::value,
4599 "Found duplicate types among the arguments passed to Removal(...). "
4600 "Types should be listed at most once.");
4601
4602 set(std::forward<Args>(args)...);
4603 }
4604
4616#ifndef NO_DOC
4617 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4618#else
4619 template<typename... Args>
4620#endif
4621 void set(Args &&...args)
4622 {
4623 using namespace Zivid::Detail::TypeTraits;
4624
4625 using AllArgsAreDescendantNodes =
4626 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4627 static_assert(
4628 AllArgsAreDescendantNodes::value,
4629 "All arguments passed to set(...) must be descendant nodes.");
4630
4631 static_assert(
4632 AllArgsDecayedAreUnique<Args...>::value,
4633 "Found duplicate types among the arguments passed to set(...). "
4634 "Types should be listed at most once.");
4635
4636 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4637 }
4638
4651#ifndef NO_DOC
4652 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4653#else
4654 template<typename... Args>
4655#endif
4656 Removal copyWith(Args &&...args) const
4657 {
4658 using namespace Zivid::Detail::TypeTraits;
4659
4660 using AllArgsAreDescendantNodes =
4661 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4662 static_assert(
4663 AllArgsAreDescendantNodes::value,
4664 "All arguments passed to copyWith(...) must be descendant nodes.");
4665
4666 static_assert(
4667 AllArgsDecayedAreUnique<Args...>::value,
4668 "Found duplicate types among the arguments passed to copyWith(...). "
4669 "Types should be listed at most once.");
4670
4671 auto copy{ *this };
4672 copy.set(std::forward<Args>(args)...);
4673 return copy;
4674 }
4675
4677 const Enabled &isEnabled() const
4678 {
4679 return m_enabled;
4680 }
4681
4684 {
4685 return m_enabled;
4686 }
4687
4689 Removal &set(const Enabled &value)
4690 {
4691 m_enabled = value;
4692 return *this;
4693 }
4694
4696 const Threshold &threshold() const
4697 {
4698 return m_threshold;
4699 }
4700
4703 {
4704 return m_threshold;
4705 }
4706
4708 Removal &set(const Threshold &value)
4709 {
4710 m_threshold = value;
4711 return *this;
4712 }
4713
4714 template<
4715 typename T,
4716 typename std::enable_if<
4717 std::is_same<
4718 T,
4719 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4720 Enabled>::value,
4721 int>::type = 0>
4723 get() const
4724 {
4725 return m_enabled;
4726 }
4727
4728 template<
4729 typename T,
4730 typename std::enable_if<
4731 std::is_same<
4732 T,
4733 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4734 Threshold>::value,
4735 int>::type = 0>
4737 get() const
4738 {
4739 return m_threshold;
4740 }
4741
4742 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4744 get() const
4745 {
4746 return m_enabled;
4747 }
4748
4749 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4751 get() const
4752 {
4753 return m_threshold;
4754 }
4755
4757 template<typename F>
4758 void forEach(const F &f) const
4759 {
4760 f(m_enabled);
4761 f(m_threshold);
4762 }
4763
4765 template<typename F>
4766 void forEach(const F &f)
4767 {
4768 f(m_enabled);
4769 f(m_threshold);
4770 }
4771
4773 bool operator==(const Removal &other) const;
4774
4776 bool operator!=(const Removal &other) const;
4777
4779 std::string toString() const;
4780
4782 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4783 {
4784 return stream << value.toString();
4785 }
4786
4787 private:
4788 void setFromString(const std::string &value);
4789
4790 void setFromString(const std::string &fullPath, const std::string &value);
4791
4792 std::string getString(const std::string &fullPath) const;
4793
4794 Enabled m_enabled;
4795 Threshold m_threshold;
4796
4797 friend struct DataModel::Detail::Befriend<Removal>;
4798 };
4799
4800 using Descendants = std::tuple<
4807
4810
4827#ifndef NO_DOC
4828 template<
4829 typename... Args,
4830 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4831 typename std::enable_if<
4832 Zivid::Detail::TypeTraits::
4833 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4834 int>::type = 0>
4835#else
4836 template<typename... Args>
4837#endif
4838 explicit ContrastDistortion(Args &&...args)
4839 {
4840 using namespace Zivid::Detail::TypeTraits;
4841
4842 static_assert(
4843 AllArgsDecayedAreUnique<Args...>::value,
4844 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
4845 "Types should be listed at most once.");
4846
4847 set(std::forward<Args>(args)...);
4848 }
4849
4865#ifndef NO_DOC
4866 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4867#else
4868 template<typename... Args>
4869#endif
4870 void set(Args &&...args)
4871 {
4872 using namespace Zivid::Detail::TypeTraits;
4873
4874 using AllArgsAreDescendantNodes =
4875 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4876 static_assert(
4877 AllArgsAreDescendantNodes::value,
4878 "All arguments passed to set(...) must be descendant nodes.");
4879
4880 static_assert(
4881 AllArgsDecayedAreUnique<Args...>::value,
4882 "Found duplicate types among the arguments passed to set(...). "
4883 "Types should be listed at most once.");
4884
4885 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4886 }
4887
4904#ifndef NO_DOC
4905 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4906#else
4907 template<typename... Args>
4908#endif
4909 ContrastDistortion copyWith(Args &&...args) const
4910 {
4911 using namespace Zivid::Detail::TypeTraits;
4912
4913 using AllArgsAreDescendantNodes =
4914 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4915 static_assert(
4916 AllArgsAreDescendantNodes::value,
4917 "All arguments passed to copyWith(...) must be descendant nodes.");
4918
4919 static_assert(
4920 AllArgsDecayedAreUnique<Args...>::value,
4921 "Found duplicate types among the arguments passed to copyWith(...). "
4922 "Types should be listed at most once.");
4923
4924 auto copy{ *this };
4925 copy.set(std::forward<Args>(args)...);
4926 return copy;
4927 }
4928
4930 const Correction &correction() const
4931 {
4932 return m_correction;
4933 }
4934
4937 {
4938 return m_correction;
4939 }
4940
4943 {
4944 m_correction = value;
4945 return *this;
4946 }
4947
4950 {
4951 m_correction.set(value);
4952 return *this;
4953 }
4954
4957 {
4958 m_correction.set(value);
4959 return *this;
4960 }
4961
4963 const Removal &removal() const
4964 {
4965 return m_removal;
4966 }
4967
4970 {
4971 return m_removal;
4972 }
4973
4976 {
4977 m_removal = value;
4978 return *this;
4979 }
4980
4983 {
4984 m_removal.set(value);
4985 return *this;
4986 }
4987
4990 {
4991 m_removal.set(value);
4992 return *this;
4993 }
4994
4995 template<
4996 typename T,
4997 typename std::enable_if<
4998 std::is_same<
4999 T,
5001 int>::type = 0>
5003 {
5004 return m_correction;
5005 }
5006
5007 template<
5008 typename T,
5009 typename std::enable_if<
5010 std::is_same<
5011 T,
5012 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5013 Enabled>::value,
5014 int>::type = 0>
5016 get() const
5017 {
5018 return m_correction.get<
5020 }
5021
5022 template<
5023 typename T,
5024 typename std::enable_if<
5025 std::is_same<
5026 T,
5027 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5028 Strength>::value,
5029 int>::type = 0>
5031 get() const
5032 {
5033 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
5034 Correction::Strength>();
5035 }
5036
5037 template<
5038 typename T,
5039 typename std::enable_if<
5040 std::is_same<
5041 T,
5043 int>::type = 0>
5045 {
5046 return m_removal;
5047 }
5048
5049 template<
5050 typename T,
5051 typename std::enable_if<
5052 std::is_same<
5053 T,
5055 value,
5056 int>::type = 0>
5058 const
5059 {
5060 return m_removal.get<
5062 }
5063
5064 template<
5065 typename T,
5066 typename std::enable_if<
5067 std::is_same<
5068 T,
5069 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
5070 Threshold>::value,
5071 int>::type = 0>
5073 const
5074 {
5075 return m_removal.get<
5077 }
5078
5079 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5081 {
5082 return m_correction;
5083 }
5084
5085 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5087 {
5088 return m_removal;
5089 }
5090
5092 template<typename F>
5093 void forEach(const F &f) const
5094 {
5095 f(m_correction);
5096 f(m_removal);
5097 }
5098
5100 template<typename F>
5101 void forEach(const F &f)
5102 {
5103 f(m_correction);
5104 f(m_removal);
5105 }
5106
5108 bool operator==(const ContrastDistortion &other) const;
5109
5111 bool operator!=(const ContrastDistortion &other) const;
5112
5114 std::string toString() const;
5115
5117 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
5118 {
5119 return stream << value.toString();
5120 }
5121
5122 private:
5123 void setFromString(const std::string &value);
5124
5125 void setFromString(const std::string &fullPath, const std::string &value);
5126
5127 std::string getString(const std::string &fullPath) const;
5128
5129 Correction m_correction;
5130 Removal m_removal;
5131
5132 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
5133 };
5134
5135 using Descendants = std::tuple<
5143
5146
5164#ifndef NO_DOC
5165 template<
5166 typename... Args,
5167 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5168 typename std::enable_if<
5169 Zivid::Detail::TypeTraits::
5170 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5171 int>::type = 0>
5172#else
5173 template<typename... Args>
5174#endif
5175 explicit Experimental(Args &&...args)
5176 {
5177 using namespace Zivid::Detail::TypeTraits;
5178
5179 static_assert(
5180 AllArgsDecayedAreUnique<Args...>::value,
5181 "Found duplicate types among the arguments passed to Experimental(...). "
5182 "Types should be listed at most once.");
5183
5184 set(std::forward<Args>(args)...);
5185 }
5186
5203#ifndef NO_DOC
5204 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5205#else
5206 template<typename... Args>
5207#endif
5208 void set(Args &&...args)
5209 {
5210 using namespace Zivid::Detail::TypeTraits;
5211
5212 using AllArgsAreDescendantNodes =
5213 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5214 static_assert(
5215 AllArgsAreDescendantNodes::value,
5216 "All arguments passed to set(...) must be descendant nodes.");
5217
5218 static_assert(
5219 AllArgsDecayedAreUnique<Args...>::value,
5220 "Found duplicate types among the arguments passed to set(...). "
5221 "Types should be listed at most once.");
5222
5223 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5224 }
5225
5243#ifndef NO_DOC
5244 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5245#else
5246 template<typename... Args>
5247#endif
5248 Experimental copyWith(Args &&...args) const
5249 {
5250 using namespace Zivid::Detail::TypeTraits;
5251
5252 using AllArgsAreDescendantNodes =
5253 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5254 static_assert(
5255 AllArgsAreDescendantNodes::value,
5256 "All arguments passed to copyWith(...) must be descendant nodes.");
5257
5258 static_assert(
5259 AllArgsDecayedAreUnique<Args...>::value,
5260 "Found duplicate types among the arguments passed to copyWith(...). "
5261 "Types should be listed at most once.");
5262
5263 auto copy{ *this };
5264 copy.set(std::forward<Args>(args)...);
5265 return copy;
5266 }
5267
5270 {
5271 return m_contrastDistortion;
5272 }
5273
5276 {
5277 return m_contrastDistortion;
5278 }
5279
5282 {
5283 m_contrastDistortion = value;
5284 return *this;
5285 }
5286
5289 {
5290 m_contrastDistortion.set(value);
5291 return *this;
5292 }
5293
5296 {
5297 m_contrastDistortion.set(value);
5298 return *this;
5299 }
5300
5303 {
5304 m_contrastDistortion.set(value);
5305 return *this;
5306 }
5307
5310 {
5311 m_contrastDistortion.set(value);
5312 return *this;
5313 }
5314
5317 {
5318 m_contrastDistortion.set(value);
5319 return *this;
5320 }
5321
5324 {
5325 m_contrastDistortion.set(value);
5326 return *this;
5327 }
5328
5329 template<
5330 typename T,
5331 typename std::enable_if<
5332 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
5333 int>::type = 0>
5335 {
5336 return m_contrastDistortion;
5337 }
5338
5339 template<
5340 typename T,
5341 typename std::enable_if<
5342 std::is_same<
5343 T,
5345 int>::type = 0>
5347 {
5348 return m_contrastDistortion
5350 }
5351
5352 template<
5353 typename T,
5354 typename std::enable_if<
5355 std::is_same<
5356 T,
5358 value,
5359 int>::type = 0>
5361 const
5362 {
5363 return m_contrastDistortion.get<
5365 }
5366
5367 template<
5368 typename T,
5369 typename std::enable_if<
5370 std::is_same<
5371 T,
5373 value,
5374 int>::type = 0>
5376 const
5377 {
5378 return m_contrastDistortion.get<
5380 }
5381
5382 template<
5383 typename T,
5384 typename std::enable_if<
5385 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
5386 value,
5387 int>::type = 0>
5389 {
5390 return m_contrastDistortion
5392 }
5393
5394 template<
5395 typename T,
5396 typename std::enable_if<
5397 std::is_same<
5398 T,
5400 value,
5401 int>::type = 0>
5403 {
5404 return m_contrastDistortion
5406 }
5407
5408 template<
5409 typename T,
5410 typename std::enable_if<
5411 std::is_same<
5412 T,
5414 value,
5415 int>::type = 0>
5417 const
5418 {
5419 return m_contrastDistortion
5421 }
5422
5423 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5425 {
5426 return m_contrastDistortion;
5427 }
5428
5430 template<typename F>
5431 void forEach(const F &f) const
5432 {
5433 f(m_contrastDistortion);
5434 }
5435
5437 template<typename F>
5438 void forEach(const F &f)
5439 {
5440 f(m_contrastDistortion);
5441 }
5442
5444 bool operator==(const Experimental &other) const;
5445
5447 bool operator!=(const Experimental &other) const;
5448
5450 std::string toString() const;
5451
5453 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
5454 {
5455 return stream << value.toString();
5456 }
5457
5458 private:
5459 void setFromString(const std::string &value);
5460
5461 void setFromString(const std::string &fullPath, const std::string &value);
5462
5463 std::string getString(const std::string &fullPath) const;
5464
5465 ContrastDistortion m_contrastDistortion;
5466
5467 friend struct DataModel::Detail::Befriend<Experimental>;
5468 };
5469
5471
5472 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5474 {
5475 public:
5477 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5478
5480 static constexpr const char *path{ "Processing/Filters/Hole" };
5481
5483 static constexpr const char *name{ "Hole" };
5484
5486 static constexpr const char *description{
5487 R"description(Contains filters that can be used to deal with holes in the point cloud.)description"
5488 };
5489
5492
5493 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5495 {
5496 public:
5498 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5499
5501 static constexpr const char *path{ "Processing/Filters/Hole/Repair" };
5502
5504 static constexpr const char *name{ "Repair" };
5505
5507 static constexpr const char *description{
5508 R"description(Fills in point cloud holes by interpolating remaining surrounding points.
5509)description"
5510 };
5511
5513
5514 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5516 {
5517 public:
5519 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5520
5522 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Enabled" };
5523
5525 static constexpr const char *name{ "Enabled" };
5526
5528 static constexpr const char *description{
5529 R"description(Enable or disable hole repair.)description"
5530 };
5531
5533 using ValueType = bool;
5534 static const Enabled yes;
5535 static const Enabled no;
5536
5538 static std::set<bool> validValues()
5539 {
5540 return { false, true };
5541 }
5542
5544 Enabled() = default;
5545
5547 explicit constexpr Enabled(bool value)
5548 : m_opt{ value }
5549 {}
5550
5555 bool value() const;
5556
5558 bool hasValue() const;
5559
5561 void reset();
5562
5564 std::string toString() const;
5565
5567 bool operator==(const Enabled &other) const
5568 {
5569 return m_opt == other.m_opt;
5570 }
5571
5573 bool operator!=(const Enabled &other) const
5574 {
5575 return m_opt != other.m_opt;
5576 }
5577
5579 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5580 {
5581 return stream << value.toString();
5582 }
5583
5584 private:
5585 void setFromString(const std::string &value);
5586
5587 Zivid::DataModel::Detail::Optional<bool> m_opt;
5588
5589 friend struct DataModel::Detail::Befriend<Enabled>;
5590 };
5591
5596
5597 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5599 {
5600 public:
5602 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5603
5605 static constexpr const char *path{ "Processing/Filters/Hole/Repair/HoleSize" };
5606
5608 static constexpr const char *name{ "HoleSize" };
5609
5611 static constexpr const char *description{
5612 R"description(Relative diameter of holes to fill. Increasing this will fill more points, but require more
5613computation time. The maximum allowed hole size scales with distance, so that we allow
5614filling larger holes at greater distances, measured in mm.
5615)description"
5616 };
5617
5619 using ValueType = double;
5620
5622 static constexpr Range<double> validRange()
5623 {
5624 return { 0.0, 1.0 };
5625 }
5626
5628 HoleSize() = default;
5629
5631 explicit constexpr HoleSize(double value)
5632 : m_opt{ verifyValue(value) }
5633 {}
5634
5639 double value() const;
5640
5642 bool hasValue() const;
5643
5645 void reset();
5646
5648 std::string toString() const;
5649
5651 bool operator==(const HoleSize &other) const
5652 {
5653 return m_opt == other.m_opt;
5654 }
5655
5657 bool operator!=(const HoleSize &other) const
5658 {
5659 return m_opt != other.m_opt;
5660 }
5661
5663 bool operator<(const HoleSize &other) const
5664 {
5665 return m_opt < other.m_opt;
5666 }
5667
5669 bool operator>(const HoleSize &other) const
5670 {
5671 return m_opt > other.m_opt;
5672 }
5673
5675 bool operator<=(const HoleSize &other) const
5676 {
5677 return m_opt <= other.m_opt;
5678 }
5679
5681 bool operator>=(const HoleSize &other) const
5682 {
5683 return m_opt >= other.m_opt;
5684 }
5685
5687 friend std::ostream &operator<<(std::ostream &stream, const HoleSize &value)
5688 {
5689 return stream << value.toString();
5690 }
5691
5692 private:
5693 void setFromString(const std::string &value);
5694
5695 constexpr ValueType static verifyValue(const ValueType &value)
5696 {
5697 return validRange().isInRange(value)
5698 ? value
5699 : throw std::out_of_range{ "HoleSize{ " + std::to_string(value)
5700 + " } is not in range ["
5701 + std::to_string(validRange().min()) + ", "
5702 + std::to_string(validRange().max()) + "]" };
5703 }
5704
5705 Zivid::DataModel::Detail::Optional<double> m_opt;
5706
5707 friend struct DataModel::Detail::Befriend<HoleSize>;
5708 };
5709
5715
5716 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5718 {
5719 public:
5721 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5722
5724 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Strictness" };
5725
5727 static constexpr const char *name{ "Strictness" };
5728
5730 static constexpr const char *description{
5731 R"description(Level of strictness when considering if a point should be filled. A higher level of
5732strictness requires a missing point to be surrounded by valid points on more sides in
5733order to be filled. Increasing this will fill fewer points, but it will be less likely to
5734fill gaps that are not circular, for example between two edges.
5735)description"
5736 };
5737
5739 using ValueType = int32_t;
5740
5742 static constexpr Range<int32_t> validRange()
5743 {
5744 return { 1, 4 };
5745 }
5746
5748 Strictness() = default;
5749
5751 explicit constexpr Strictness(int32_t value)
5752 : m_opt{ verifyValue(value) }
5753 {}
5754
5759 int32_t value() const;
5760
5762 bool hasValue() const;
5763
5765 void reset();
5766
5768 std::string toString() const;
5769
5771 bool operator==(const Strictness &other) const
5772 {
5773 return m_opt == other.m_opt;
5774 }
5775
5777 bool operator!=(const Strictness &other) const
5778 {
5779 return m_opt != other.m_opt;
5780 }
5781
5783 bool operator<(const Strictness &other) const
5784 {
5785 return m_opt < other.m_opt;
5786 }
5787
5789 bool operator>(const Strictness &other) const
5790 {
5791 return m_opt > other.m_opt;
5792 }
5793
5795 bool operator<=(const Strictness &other) const
5796 {
5797 return m_opt <= other.m_opt;
5798 }
5799
5801 bool operator>=(const Strictness &other) const
5802 {
5803 return m_opt >= other.m_opt;
5804 }
5805
5807 friend std::ostream &operator<<(std::ostream &stream, const Strictness &value)
5808 {
5809 return stream << value.toString();
5810 }
5811
5812 private:
5813 void setFromString(const std::string &value);
5814
5815 constexpr ValueType static verifyValue(const ValueType &value)
5816 {
5817 return validRange().isInRange(value)
5818 ? value
5819 : throw std::out_of_range{ "Strictness{ " + std::to_string(value)
5820 + " } is not in range ["
5821 + std::to_string(validRange().min()) + ", "
5822 + std::to_string(validRange().max()) + "]" };
5823 }
5824
5825 Zivid::DataModel::Detail::Optional<int32_t> m_opt;
5826
5827 friend struct DataModel::Detail::Befriend<Strictness>;
5828 };
5829
5830 using Descendants = std::tuple<
5834
5837
5851#ifndef NO_DOC
5852 template<
5853 typename... Args,
5854 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5855 typename std::enable_if<
5856 Zivid::Detail::TypeTraits::
5857 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5858 int>::type = 0>
5859#else
5860 template<typename... Args>
5861#endif
5862 explicit Repair(Args &&...args)
5863 {
5864 using namespace Zivid::Detail::TypeTraits;
5865
5866 static_assert(
5867 AllArgsDecayedAreUnique<Args...>::value,
5868 "Found duplicate types among the arguments passed to Repair(...). "
5869 "Types should be listed at most once.");
5870
5871 set(std::forward<Args>(args)...);
5872 }
5873
5886#ifndef NO_DOC
5887 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5888#else
5889 template<typename... Args>
5890#endif
5891 void set(Args &&...args)
5892 {
5893 using namespace Zivid::Detail::TypeTraits;
5894
5895 using AllArgsAreDescendantNodes =
5896 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5897 static_assert(
5898 AllArgsAreDescendantNodes::value,
5899 "All arguments passed to set(...) must be descendant nodes.");
5900
5901 static_assert(
5902 AllArgsDecayedAreUnique<Args...>::value,
5903 "Found duplicate types among the arguments passed to set(...). "
5904 "Types should be listed at most once.");
5905
5906 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5907 }
5908
5922#ifndef NO_DOC
5923 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5924#else
5925 template<typename... Args>
5926#endif
5927 Repair copyWith(Args &&...args) const
5928 {
5929 using namespace Zivid::Detail::TypeTraits;
5930
5931 using AllArgsAreDescendantNodes =
5932 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5933 static_assert(
5934 AllArgsAreDescendantNodes::value,
5935 "All arguments passed to copyWith(...) must be descendant nodes.");
5936
5937 static_assert(
5938 AllArgsDecayedAreUnique<Args...>::value,
5939 "Found duplicate types among the arguments passed to copyWith(...). "
5940 "Types should be listed at most once.");
5941
5942 auto copy{ *this };
5943 copy.set(std::forward<Args>(args)...);
5944 return copy;
5945 }
5946
5948 const Enabled &isEnabled() const
5949 {
5950 return m_enabled;
5951 }
5952
5955 {
5956 return m_enabled;
5957 }
5958
5960 Repair &set(const Enabled &value)
5961 {
5962 m_enabled = value;
5963 return *this;
5964 }
5965
5967 const HoleSize &holeSize() const
5968 {
5969 return m_holeSize;
5970 }
5971
5974 {
5975 return m_holeSize;
5976 }
5977
5979 Repair &set(const HoleSize &value)
5980 {
5981 m_holeSize = value;
5982 return *this;
5983 }
5984
5986 const Strictness &strictness() const
5987 {
5988 return m_strictness;
5989 }
5990
5993 {
5994 return m_strictness;
5995 }
5996
5998 Repair &set(const Strictness &value)
5999 {
6000 m_strictness = value;
6001 return *this;
6002 }
6003
6004 template<
6005 typename T,
6006 typename std::enable_if<
6007 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6008 int>::type = 0>
6010 {
6011 return m_enabled;
6012 }
6013
6014 template<
6015 typename T,
6016 typename std::enable_if<
6017 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6018 int>::type = 0>
6020 {
6021 return m_holeSize;
6022 }
6023
6024 template<
6025 typename T,
6026 typename std::enable_if<
6027 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6028 int>::type = 0>
6030 {
6031 return m_strictness;
6032 }
6033
6034 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6036 {
6037 return m_enabled;
6038 }
6039
6040 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6042 {
6043 return m_holeSize;
6044 }
6045
6046 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
6048 {
6049 return m_strictness;
6050 }
6051
6053 template<typename F>
6054 void forEach(const F &f) const
6055 {
6056 f(m_enabled);
6057 f(m_holeSize);
6058 f(m_strictness);
6059 }
6060
6062 template<typename F>
6063 void forEach(const F &f)
6064 {
6065 f(m_enabled);
6066 f(m_holeSize);
6067 f(m_strictness);
6068 }
6069
6071 bool operator==(const Repair &other) const;
6072
6074 bool operator!=(const Repair &other) const;
6075
6077 std::string toString() const;
6078
6080 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
6081 {
6082 return stream << value.toString();
6083 }
6084
6085 private:
6086 void setFromString(const std::string &value);
6087
6088 void setFromString(const std::string &fullPath, const std::string &value);
6089
6090 std::string getString(const std::string &fullPath) const;
6091
6092 Enabled m_enabled;
6093 HoleSize m_holeSize;
6094 Strictness m_strictness;
6095
6096 friend struct DataModel::Detail::Befriend<Repair>;
6097 };
6098
6099 using Descendants = std::tuple<
6104
6107
6122#ifndef NO_DOC
6123 template<
6124 typename... Args,
6125 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6126 typename std::enable_if<
6127 Zivid::Detail::TypeTraits::
6128 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6129 int>::type = 0>
6130#else
6131 template<typename... Args>
6132#endif
6133 explicit Hole(Args &&...args)
6134 {
6135 using namespace Zivid::Detail::TypeTraits;
6136
6137 static_assert(
6138 AllArgsDecayedAreUnique<Args...>::value,
6139 "Found duplicate types among the arguments passed to Hole(...). "
6140 "Types should be listed at most once.");
6141
6142 set(std::forward<Args>(args)...);
6143 }
6144
6158#ifndef NO_DOC
6159 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6160#else
6161 template<typename... Args>
6162#endif
6163 void set(Args &&...args)
6164 {
6165 using namespace Zivid::Detail::TypeTraits;
6166
6167 using AllArgsAreDescendantNodes =
6168 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6169 static_assert(
6170 AllArgsAreDescendantNodes::value,
6171 "All arguments passed to set(...) must be descendant nodes.");
6172
6173 static_assert(
6174 AllArgsDecayedAreUnique<Args...>::value,
6175 "Found duplicate types among the arguments passed to set(...). "
6176 "Types should be listed at most once.");
6177
6178 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6179 }
6180
6195#ifndef NO_DOC
6196 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6197#else
6198 template<typename... Args>
6199#endif
6200 Hole copyWith(Args &&...args) const
6201 {
6202 using namespace Zivid::Detail::TypeTraits;
6203
6204 using AllArgsAreDescendantNodes =
6205 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6206 static_assert(
6207 AllArgsAreDescendantNodes::value,
6208 "All arguments passed to copyWith(...) must be descendant nodes.");
6209
6210 static_assert(
6211 AllArgsDecayedAreUnique<Args...>::value,
6212 "Found duplicate types among the arguments passed to copyWith(...). "
6213 "Types should be listed at most once.");
6214
6215 auto copy{ *this };
6216 copy.set(std::forward<Args>(args)...);
6217 return copy;
6218 }
6219
6221 const Repair &repair() const
6222 {
6223 return m_repair;
6224 }
6225
6228 {
6229 return m_repair;
6230 }
6231
6233 Hole &set(const Repair &value)
6234 {
6235 m_repair = value;
6236 return *this;
6237 }
6238
6240 Hole &set(const Repair::Enabled &value)
6241 {
6242 m_repair.set(value);
6243 return *this;
6244 }
6245
6248 {
6249 m_repair.set(value);
6250 return *this;
6251 }
6252
6255 {
6256 m_repair.set(value);
6257 return *this;
6258 }
6259
6260 template<
6261 typename T,
6262 typename std::enable_if<
6263 std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value,
6264 int>::type = 0>
6266 {
6267 return m_repair;
6268 }
6269
6270 template<
6271 typename T,
6272 typename std::enable_if<
6273 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6274 int>::type = 0>
6276 {
6278 }
6279
6280 template<
6281 typename T,
6282 typename std::enable_if<
6283 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6284 int>::type = 0>
6286 {
6288 }
6289
6290 template<
6291 typename T,
6292 typename std::enable_if<
6293 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6294 int>::type = 0>
6296 {
6298 }
6299
6300 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6302 {
6303 return m_repair;
6304 }
6305
6307 template<typename F>
6308 void forEach(const F &f) const
6309 {
6310 f(m_repair);
6311 }
6312
6314 template<typename F>
6315 void forEach(const F &f)
6316 {
6317 f(m_repair);
6318 }
6319
6321 bool operator==(const Hole &other) const;
6322
6324 bool operator!=(const Hole &other) const;
6325
6327 std::string toString() const;
6328
6330 friend std::ostream &operator<<(std::ostream &stream, const Hole &value)
6331 {
6332 return stream << value.toString();
6333 }
6334
6335 private:
6336 void setFromString(const std::string &value);
6337
6338 void setFromString(const std::string &fullPath, const std::string &value);
6339
6340 std::string getString(const std::string &fullPath) const;
6341
6342 Repair m_repair;
6343
6344 friend struct DataModel::Detail::Befriend<Hole>;
6345 };
6346
6348
6349 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6351 {
6352 public:
6354 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6355
6357 static constexpr const char *path{ "Processing/Filters/Noise" };
6358
6360 static constexpr const char *name{ "Noise" };
6361
6363 static constexpr const char *description{
6364 R"description(Contains filters that can be used to clean up a noisy point cloud.)description"
6365 };
6366
6368
6369 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6371 {
6372 public:
6374 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6375
6377 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
6378
6380 static constexpr const char *name{ "Removal" };
6381
6383 static constexpr const char *description{
6384 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold.)description"
6385 };
6386
6388
6389 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6391 {
6392 public:
6394 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6395
6397 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
6398
6400 static constexpr const char *name{ "Enabled" };
6401
6403 static constexpr const char *description{
6404 R"description(Enable or disable the SNR filter.)description"
6405 };
6406
6408 using ValueType = bool;
6409 static const Enabled yes;
6410 static const Enabled no;
6411
6413 static std::set<bool> validValues()
6414 {
6415 return { false, true };
6416 }
6417
6419 Enabled() = default;
6420
6422 explicit constexpr Enabled(bool value)
6423 : m_opt{ value }
6424 {}
6425
6430 bool value() const;
6431
6433 bool hasValue() const;
6434
6436 void reset();
6437
6439 std::string toString() const;
6440
6442 bool operator==(const Enabled &other) const
6443 {
6444 return m_opt == other.m_opt;
6445 }
6446
6448 bool operator!=(const Enabled &other) const
6449 {
6450 return m_opt != other.m_opt;
6451 }
6452
6454 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6455 {
6456 return stream << value.toString();
6457 }
6458
6459 private:
6460 void setFromString(const std::string &value);
6461
6462 Zivid::DataModel::Detail::Optional<bool> m_opt;
6463
6464 friend struct DataModel::Detail::Befriend<Enabled>;
6465 };
6466
6468
6469 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6471 {
6472 public:
6474 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6475
6477 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
6478
6480 static constexpr const char *name{ "Threshold" };
6481
6483 static constexpr const char *description{
6484 R"description(Discard points with signal-to-noise ratio (SNR) below the given value.)description"
6485 };
6486
6488 using ValueType = double;
6489
6491 static constexpr Range<double> validRange()
6492 {
6493 return { 0.0, 100.0 };
6494 }
6495
6497 Threshold() = default;
6498
6500 explicit constexpr Threshold(double value)
6501 : m_opt{ verifyValue(value) }
6502 {}
6503
6508 double value() const;
6509
6511 bool hasValue() const;
6512
6514 void reset();
6515
6517 std::string toString() const;
6518
6520 bool operator==(const Threshold &other) const
6521 {
6522 return m_opt == other.m_opt;
6523 }
6524
6526 bool operator!=(const Threshold &other) const
6527 {
6528 return m_opt != other.m_opt;
6529 }
6530
6532 bool operator<(const Threshold &other) const
6533 {
6534 return m_opt < other.m_opt;
6535 }
6536
6538 bool operator>(const Threshold &other) const
6539 {
6540 return m_opt > other.m_opt;
6541 }
6542
6544 bool operator<=(const Threshold &other) const
6545 {
6546 return m_opt <= other.m_opt;
6547 }
6548
6550 bool operator>=(const Threshold &other) const
6551 {
6552 return m_opt >= other.m_opt;
6553 }
6554
6556 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
6557 {
6558 return stream << value.toString();
6559 }
6560
6561 private:
6562 void setFromString(const std::string &value);
6563
6564 constexpr ValueType static verifyValue(const ValueType &value)
6565 {
6566 return validRange().isInRange(value)
6567 ? value
6568 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
6569 + " } is not in range ["
6570 + std::to_string(validRange().min()) + ", "
6571 + std::to_string(validRange().max()) + "]" };
6572 }
6573
6574 Zivid::DataModel::Detail::Optional<double> m_opt;
6575
6576 friend struct DataModel::Detail::Befriend<Threshold>;
6577 };
6578
6579 using Descendants = std::tuple<
6582
6585
6598#ifndef NO_DOC
6599 template<
6600 typename... Args,
6601 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6602 typename std::enable_if<
6603 Zivid::Detail::TypeTraits::
6604 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6605 int>::type = 0>
6606#else
6607 template<typename... Args>
6608#endif
6609 explicit Removal(Args &&...args)
6610 {
6611 using namespace Zivid::Detail::TypeTraits;
6612
6613 static_assert(
6614 AllArgsDecayedAreUnique<Args...>::value,
6615 "Found duplicate types among the arguments passed to Removal(...). "
6616 "Types should be listed at most once.");
6617
6618 set(std::forward<Args>(args)...);
6619 }
6620
6632#ifndef NO_DOC
6633 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6634#else
6635 template<typename... Args>
6636#endif
6637 void set(Args &&...args)
6638 {
6639 using namespace Zivid::Detail::TypeTraits;
6640
6641 using AllArgsAreDescendantNodes =
6642 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6643 static_assert(
6644 AllArgsAreDescendantNodes::value,
6645 "All arguments passed to set(...) must be descendant nodes.");
6646
6647 static_assert(
6648 AllArgsDecayedAreUnique<Args...>::value,
6649 "Found duplicate types among the arguments passed to set(...). "
6650 "Types should be listed at most once.");
6651
6652 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6653 }
6654
6667#ifndef NO_DOC
6668 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6669#else
6670 template<typename... Args>
6671#endif
6672 Removal copyWith(Args &&...args) const
6673 {
6674 using namespace Zivid::Detail::TypeTraits;
6675
6676 using AllArgsAreDescendantNodes =
6677 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6678 static_assert(
6679 AllArgsAreDescendantNodes::value,
6680 "All arguments passed to copyWith(...) must be descendant nodes.");
6681
6682 static_assert(
6683 AllArgsDecayedAreUnique<Args...>::value,
6684 "Found duplicate types among the arguments passed to copyWith(...). "
6685 "Types should be listed at most once.");
6686
6687 auto copy{ *this };
6688 copy.set(std::forward<Args>(args)...);
6689 return copy;
6690 }
6691
6693 const Enabled &isEnabled() const
6694 {
6695 return m_enabled;
6696 }
6697
6700 {
6701 return m_enabled;
6702 }
6703
6705 Removal &set(const Enabled &value)
6706 {
6707 m_enabled = value;
6708 return *this;
6709 }
6710
6712 const Threshold &threshold() const
6713 {
6714 return m_threshold;
6715 }
6716
6719 {
6720 return m_threshold;
6721 }
6722
6724 Removal &set(const Threshold &value)
6725 {
6726 m_threshold = value;
6727 return *this;
6728 }
6729
6730 template<
6731 typename T,
6732 typename std::enable_if<
6733 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
6734 int>::type = 0>
6736 {
6737 return m_enabled;
6738 }
6739
6740 template<
6741 typename T,
6742 typename std::enable_if<
6743 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
6744 int>::type = 0>
6746 {
6747 return m_threshold;
6748 }
6749
6750 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6752 {
6753 return m_enabled;
6754 }
6755
6756 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6758 {
6759 return m_threshold;
6760 }
6761
6763 template<typename F>
6764 void forEach(const F &f) const
6765 {
6766 f(m_enabled);
6767 f(m_threshold);
6768 }
6769
6771 template<typename F>
6772 void forEach(const F &f)
6773 {
6774 f(m_enabled);
6775 f(m_threshold);
6776 }
6777
6779 bool operator==(const Removal &other) const;
6780
6782 bool operator!=(const Removal &other) const;
6783
6785 std::string toString() const;
6786
6788 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6789 {
6790 return stream << value.toString();
6791 }
6792
6793 private:
6794 void setFromString(const std::string &value);
6795
6796 void setFromString(const std::string &fullPath, const std::string &value);
6797
6798 std::string getString(const std::string &fullPath) const;
6799
6800 Enabled m_enabled;
6801 Threshold m_threshold;
6802
6803 friend struct DataModel::Detail::Befriend<Removal>;
6804 };
6805
6810
6811 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6813 {
6814 public:
6816 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6817
6819 static constexpr const char *path{ "Processing/Filters/Noise/Repair" };
6820
6822 static constexpr const char *name{ "Repair" };
6823
6825 static constexpr const char *description{
6826 R"description(Get better surface coverage by repairing regions of missing data due to noisy points.
6827Consider disabling this filter if you require all points in your point cloud to be of
6828high confidence.
6829)description"
6830 };
6831
6833
6834 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6836 {
6837 public:
6839 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6840
6842 static constexpr const char *path{ "Processing/Filters/Noise/Repair/Enabled" };
6843
6845 static constexpr const char *name{ "Enabled" };
6846
6848 static constexpr const char *description{
6849 R"description(Enable or disable noise repair.)description"
6850 };
6851
6853 using ValueType = bool;
6854 static const Enabled yes;
6855 static const Enabled no;
6856
6858 static std::set<bool> validValues()
6859 {
6860 return { false, true };
6861 }
6862
6864 Enabled() = default;
6865
6867 explicit constexpr Enabled(bool value)
6868 : m_opt{ value }
6869 {}
6870
6875 bool value() const;
6876
6878 bool hasValue() const;
6879
6881 void reset();
6882
6884 std::string toString() const;
6885
6887 bool operator==(const Enabled &other) const
6888 {
6889 return m_opt == other.m_opt;
6890 }
6891
6893 bool operator!=(const Enabled &other) const
6894 {
6895 return m_opt != other.m_opt;
6896 }
6897
6899 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6900 {
6901 return stream << value.toString();
6902 }
6903
6904 private:
6905 void setFromString(const std::string &value);
6906
6907 Zivid::DataModel::Detail::Optional<bool> m_opt;
6908
6909 friend struct DataModel::Detail::Befriend<Enabled>;
6910 };
6911
6912 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Repair::Enabled>;
6913
6916
6928#ifndef NO_DOC
6929 template<
6930 typename... Args,
6931 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6932 typename std::enable_if<
6933 Zivid::Detail::TypeTraits::
6934 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6935 int>::type = 0>
6936#else
6937 template<typename... Args>
6938#endif
6939 explicit Repair(Args &&...args)
6940 {
6941 using namespace Zivid::Detail::TypeTraits;
6942
6943 static_assert(
6944 AllArgsDecayedAreUnique<Args...>::value,
6945 "Found duplicate types among the arguments passed to Repair(...). "
6946 "Types should be listed at most once.");
6947
6948 set(std::forward<Args>(args)...);
6949 }
6950
6961#ifndef NO_DOC
6962 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6963#else
6964 template<typename... Args>
6965#endif
6966 void set(Args &&...args)
6967 {
6968 using namespace Zivid::Detail::TypeTraits;
6969
6970 using AllArgsAreDescendantNodes =
6971 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6972 static_assert(
6973 AllArgsAreDescendantNodes::value,
6974 "All arguments passed to set(...) must be descendant nodes.");
6975
6976 static_assert(
6977 AllArgsDecayedAreUnique<Args...>::value,
6978 "Found duplicate types among the arguments passed to set(...). "
6979 "Types should be listed at most once.");
6980
6981 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6982 }
6983
6995#ifndef NO_DOC
6996 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6997#else
6998 template<typename... Args>
6999#endif
7000 Repair copyWith(Args &&...args) const
7001 {
7002 using namespace Zivid::Detail::TypeTraits;
7003
7004 using AllArgsAreDescendantNodes =
7005 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7006 static_assert(
7007 AllArgsAreDescendantNodes::value,
7008 "All arguments passed to copyWith(...) must be descendant nodes.");
7009
7010 static_assert(
7011 AllArgsDecayedAreUnique<Args...>::value,
7012 "Found duplicate types among the arguments passed to copyWith(...). "
7013 "Types should be listed at most once.");
7014
7015 auto copy{ *this };
7016 copy.set(std::forward<Args>(args)...);
7017 return copy;
7018 }
7019
7021 const Enabled &isEnabled() const
7022 {
7023 return m_enabled;
7024 }
7025
7028 {
7029 return m_enabled;
7030 }
7031
7033 Repair &set(const Enabled &value)
7034 {
7035 m_enabled = value;
7036 return *this;
7037 }
7038
7039 template<
7040 typename T,
7041 typename std::enable_if<
7042 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7043 int>::type = 0>
7045 {
7046 return m_enabled;
7047 }
7048
7049 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7051 {
7052 return m_enabled;
7053 }
7054
7056 template<typename F>
7057 void forEach(const F &f) const
7058 {
7059 f(m_enabled);
7060 }
7061
7063 template<typename F>
7064 void forEach(const F &f)
7065 {
7066 f(m_enabled);
7067 }
7068
7070 bool operator==(const Repair &other) const;
7071
7073 bool operator!=(const Repair &other) const;
7074
7076 std::string toString() const;
7077
7079 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
7080 {
7081 return stream << value.toString();
7082 }
7083
7084 private:
7085 void setFromString(const std::string &value);
7086
7087 void setFromString(const std::string &fullPath, const std::string &value);
7088
7089 std::string getString(const std::string &fullPath) const;
7090
7091 Enabled m_enabled;
7092
7093 friend struct DataModel::Detail::Befriend<Repair>;
7094 };
7095
7100
7101 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7103 {
7104 public:
7106 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7107
7109 static constexpr const char *path{ "Processing/Filters/Noise/Suppression" };
7110
7112 static constexpr const char *name{ "Suppression" };
7113
7115 static constexpr const char *description{
7116 R"description(Reduce noise and outliers in the point cloud. This filter can also be used to reduce
7117ripple effects caused by interreflections. Consider disabling this filter if you need to
7118distinguish very fine details and thus need to avoid any smoothing effects.
7119)description"
7120 };
7121
7123
7124 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7126 {
7127 public:
7129 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7130
7132 static constexpr const char *path{ "Processing/Filters/Noise/Suppression/Enabled" };
7133
7135 static constexpr const char *name{ "Enabled" };
7136
7138 static constexpr const char *description{
7139 R"description(Enable or disable noise suppression.)description"
7140 };
7141
7143 using ValueType = bool;
7144 static const Enabled yes;
7145 static const Enabled no;
7146
7148 static std::set<bool> validValues()
7149 {
7150 return { false, true };
7151 }
7152
7154 Enabled() = default;
7155
7157 explicit constexpr Enabled(bool value)
7158 : m_opt{ value }
7159 {}
7160
7165 bool value() const;
7166
7168 bool hasValue() const;
7169
7171 void reset();
7172
7174 std::string toString() const;
7175
7177 bool operator==(const Enabled &other) const
7178 {
7179 return m_opt == other.m_opt;
7180 }
7181
7183 bool operator!=(const Enabled &other) const
7184 {
7185 return m_opt != other.m_opt;
7186 }
7187
7189 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7190 {
7191 return stream << value.toString();
7192 }
7193
7194 private:
7195 void setFromString(const std::string &value);
7196
7197 Zivid::DataModel::Detail::Optional<bool> m_opt;
7198
7199 friend struct DataModel::Detail::Befriend<Enabled>;
7200 };
7201
7202 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Suppression::Enabled>;
7203
7206
7218#ifndef NO_DOC
7219 template<
7220 typename... Args,
7221 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7222 typename std::enable_if<
7223 Zivid::Detail::TypeTraits::
7224 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7225 int>::type = 0>
7226#else
7227 template<typename... Args>
7228#endif
7229 explicit Suppression(Args &&...args)
7230 {
7231 using namespace Zivid::Detail::TypeTraits;
7232
7233 static_assert(
7234 AllArgsDecayedAreUnique<Args...>::value,
7235 "Found duplicate types among the arguments passed to Suppression(...). "
7236 "Types should be listed at most once.");
7237
7238 set(std::forward<Args>(args)...);
7239 }
7240
7251#ifndef NO_DOC
7252 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7253#else
7254 template<typename... Args>
7255#endif
7256 void set(Args &&...args)
7257 {
7258 using namespace Zivid::Detail::TypeTraits;
7259
7260 using AllArgsAreDescendantNodes =
7261 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7262 static_assert(
7263 AllArgsAreDescendantNodes::value,
7264 "All arguments passed to set(...) must be descendant nodes.");
7265
7266 static_assert(
7267 AllArgsDecayedAreUnique<Args...>::value,
7268 "Found duplicate types among the arguments passed to set(...). "
7269 "Types should be listed at most once.");
7270
7271 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7272 }
7273
7285#ifndef NO_DOC
7286 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7287#else
7288 template<typename... Args>
7289#endif
7290 Suppression copyWith(Args &&...args) const
7291 {
7292 using namespace Zivid::Detail::TypeTraits;
7293
7294 using AllArgsAreDescendantNodes =
7295 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7296 static_assert(
7297 AllArgsAreDescendantNodes::value,
7298 "All arguments passed to copyWith(...) must be descendant nodes.");
7299
7300 static_assert(
7301 AllArgsDecayedAreUnique<Args...>::value,
7302 "Found duplicate types among the arguments passed to copyWith(...). "
7303 "Types should be listed at most once.");
7304
7305 auto copy{ *this };
7306 copy.set(std::forward<Args>(args)...);
7307 return copy;
7308 }
7309
7311 const Enabled &isEnabled() const
7312 {
7313 return m_enabled;
7314 }
7315
7318 {
7319 return m_enabled;
7320 }
7321
7323 Suppression &set(const Enabled &value)
7324 {
7325 m_enabled = value;
7326 return *this;
7327 }
7328
7329 template<
7330 typename T,
7331 typename std::enable_if<
7332 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7333 int>::type = 0>
7335 {
7336 return m_enabled;
7337 }
7338
7339 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7341 {
7342 return m_enabled;
7343 }
7344
7346 template<typename F>
7347 void forEach(const F &f) const
7348 {
7349 f(m_enabled);
7350 }
7351
7353 template<typename F>
7354 void forEach(const F &f)
7355 {
7356 f(m_enabled);
7357 }
7358
7360 bool operator==(const Suppression &other) const;
7361
7363 bool operator!=(const Suppression &other) const;
7364
7366 std::string toString() const;
7367
7369 friend std::ostream &operator<<(std::ostream &stream, const Suppression &value)
7370 {
7371 return stream << value.toString();
7372 }
7373
7374 private:
7375 void setFromString(const std::string &value);
7376
7377 void setFromString(const std::string &fullPath, const std::string &value);
7378
7379 std::string getString(const std::string &fullPath) const;
7380
7381 Enabled m_enabled;
7382
7383 friend struct DataModel::Detail::Befriend<Suppression>;
7384 };
7385
7386 using Descendants = std::tuple<
7394
7397
7415#ifndef NO_DOC
7416 template<
7417 typename... Args,
7418 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7419 typename std::enable_if<
7420 Zivid::Detail::TypeTraits::
7421 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7422 int>::type = 0>
7423#else
7424 template<typename... Args>
7425#endif
7426 explicit Noise(Args &&...args)
7427 {
7428 using namespace Zivid::Detail::TypeTraits;
7429
7430 static_assert(
7431 AllArgsDecayedAreUnique<Args...>::value,
7432 "Found duplicate types among the arguments passed to Noise(...). "
7433 "Types should be listed at most once.");
7434
7435 set(std::forward<Args>(args)...);
7436 }
7437
7454#ifndef NO_DOC
7455 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7456#else
7457 template<typename... Args>
7458#endif
7459 void set(Args &&...args)
7460 {
7461 using namespace Zivid::Detail::TypeTraits;
7462
7463 using AllArgsAreDescendantNodes =
7464 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7465 static_assert(
7466 AllArgsAreDescendantNodes::value,
7467 "All arguments passed to set(...) must be descendant nodes.");
7468
7469 static_assert(
7470 AllArgsDecayedAreUnique<Args...>::value,
7471 "Found duplicate types among the arguments passed to set(...). "
7472 "Types should be listed at most once.");
7473
7474 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7475 }
7476
7494#ifndef NO_DOC
7495 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7496#else
7497 template<typename... Args>
7498#endif
7499 Noise copyWith(Args &&...args) const
7500 {
7501 using namespace Zivid::Detail::TypeTraits;
7502
7503 using AllArgsAreDescendantNodes =
7504 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7505 static_assert(
7506 AllArgsAreDescendantNodes::value,
7507 "All arguments passed to copyWith(...) must be descendant nodes.");
7508
7509 static_assert(
7510 AllArgsDecayedAreUnique<Args...>::value,
7511 "Found duplicate types among the arguments passed to copyWith(...). "
7512 "Types should be listed at most once.");
7513
7514 auto copy{ *this };
7515 copy.set(std::forward<Args>(args)...);
7516 return copy;
7517 }
7518
7520 const Removal &removal() const
7521 {
7522 return m_removal;
7523 }
7524
7527 {
7528 return m_removal;
7529 }
7530
7532 Noise &set(const Removal &value)
7533 {
7534 m_removal = value;
7535 return *this;
7536 }
7537
7540 {
7541 m_removal.set(value);
7542 return *this;
7543 }
7544
7547 {
7548 m_removal.set(value);
7549 return *this;
7550 }
7551
7553 const Repair &repair() const
7554 {
7555 return m_repair;
7556 }
7557
7560 {
7561 return m_repair;
7562 }
7563
7565 Noise &set(const Repair &value)
7566 {
7567 m_repair = value;
7568 return *this;
7569 }
7570
7573 {
7574 m_repair.set(value);
7575 return *this;
7576 }
7577
7580 {
7581 return m_suppression;
7582 }
7583
7586 {
7587 return m_suppression;
7588 }
7589
7591 Noise &set(const Suppression &value)
7592 {
7593 m_suppression = value;
7594 return *this;
7595 }
7596
7599 {
7600 m_suppression.set(value);
7601 return *this;
7602 }
7603
7604 template<
7605 typename T,
7606 typename std::enable_if<
7607 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7608 int>::type = 0>
7610 {
7611 return m_removal;
7612 }
7613
7614 template<
7615 typename T,
7616 typename std::enable_if<
7617 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7618 int>::type = 0>
7620 {
7622 }
7623
7624 template<
7625 typename T,
7626 typename std::enable_if<
7627 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7628 int>::type = 0>
7630 {
7632 }
7633
7634 template<
7635 typename T,
7636 typename std::enable_if<
7637 std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value,
7638 int>::type = 0>
7640 {
7641 return m_repair;
7642 }
7643
7644 template<
7645 typename T,
7646 typename std::enable_if<
7647 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7648 int>::type = 0>
7650 {
7652 }
7653
7654 template<
7655 typename T,
7656 typename std::enable_if<
7657 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
7658 int>::type = 0>
7660 {
7661 return m_suppression;
7662 }
7663
7664 template<
7665 typename T,
7666 typename std::enable_if<
7667 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7668 int>::type = 0>
7670 {
7672 }
7673
7674 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7676 {
7677 return m_removal;
7678 }
7679
7680 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7682 {
7683 return m_repair;
7684 }
7685
7686 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7688 {
7689 return m_suppression;
7690 }
7691
7693 template<typename F>
7694 void forEach(const F &f) const
7695 {
7696 f(m_removal);
7697 f(m_repair);
7698 f(m_suppression);
7699 }
7700
7702 template<typename F>
7703 void forEach(const F &f)
7704 {
7705 f(m_removal);
7706 f(m_repair);
7707 f(m_suppression);
7708 }
7709
7711 bool operator==(const Noise &other) const;
7712
7714 bool operator!=(const Noise &other) const;
7715
7717 std::string toString() const;
7718
7720 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
7721 {
7722 return stream << value.toString();
7723 }
7724
7725 private:
7726 void setFromString(const std::string &value);
7727
7728 void setFromString(const std::string &fullPath, const std::string &value);
7729
7730 std::string getString(const std::string &fullPath) const;
7731
7732 Removal m_removal;
7733 Repair m_repair;
7734 Suppression m_suppression;
7735
7736 friend struct DataModel::Detail::Befriend<Noise>;
7737 };
7738
7740
7741 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7743 {
7744 public:
7746 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7747
7749 static constexpr const char *path{ "Processing/Filters/Outlier" };
7750
7752 static constexpr const char *name{ "Outlier" };
7753
7755 static constexpr const char *description{
7756 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points.)description"
7757 };
7758
7760
7761 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7763 {
7764 public:
7766 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7767
7769 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
7770
7772 static constexpr const char *name{ "Removal" };
7773
7775 static constexpr const char *description{
7776 R"description(Discard point if Euclidean distance to neighboring points is above a threshold.)description"
7777 };
7778
7780
7781 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7783 {
7784 public:
7786 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7787
7789 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
7790
7792 static constexpr const char *name{ "Enabled" };
7793
7795 static constexpr const char *description{
7796 R"description(Enable or disable the outlier filter.)description"
7797 };
7798
7800 using ValueType = bool;
7801 static const Enabled yes;
7802 static const Enabled no;
7803
7805 static std::set<bool> validValues()
7806 {
7807 return { false, true };
7808 }
7809
7811 Enabled() = default;
7812
7814 explicit constexpr Enabled(bool value)
7815 : m_opt{ value }
7816 {}
7817
7822 bool value() const;
7823
7825 bool hasValue() const;
7826
7828 void reset();
7829
7831 std::string toString() const;
7832
7834 bool operator==(const Enabled &other) const
7835 {
7836 return m_opt == other.m_opt;
7837 }
7838
7840 bool operator!=(const Enabled &other) const
7841 {
7842 return m_opt != other.m_opt;
7843 }
7844
7846 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7847 {
7848 return stream << value.toString();
7849 }
7850
7851 private:
7852 void setFromString(const std::string &value);
7853
7854 Zivid::DataModel::Detail::Optional<bool> m_opt;
7855
7856 friend struct DataModel::Detail::Befriend<Enabled>;
7857 };
7858
7860
7861 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7863 {
7864 public:
7866 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7867
7869 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
7870
7872 static constexpr const char *name{ "Threshold" };
7873
7875 static constexpr const char *description{
7876 R"description(Discard point if Euclidean distance to neighboring points is above the given value.)description"
7877 };
7878
7880 using ValueType = double;
7881
7883 static constexpr Range<double> validRange()
7884 {
7885 return { 0.0, 100.0 };
7886 }
7887
7889 Threshold() = default;
7890
7892 explicit constexpr Threshold(double value)
7893 : m_opt{ verifyValue(value) }
7894 {}
7895
7900 double value() const;
7901
7903 bool hasValue() const;
7904
7906 void reset();
7907
7909 std::string toString() const;
7910
7912 bool operator==(const Threshold &other) const
7913 {
7914 return m_opt == other.m_opt;
7915 }
7916
7918 bool operator!=(const Threshold &other) const
7919 {
7920 return m_opt != other.m_opt;
7921 }
7922
7924 bool operator<(const Threshold &other) const
7925 {
7926 return m_opt < other.m_opt;
7927 }
7928
7930 bool operator>(const Threshold &other) const
7931 {
7932 return m_opt > other.m_opt;
7933 }
7934
7936 bool operator<=(const Threshold &other) const
7937 {
7938 return m_opt <= other.m_opt;
7939 }
7940
7942 bool operator>=(const Threshold &other) const
7943 {
7944 return m_opt >= other.m_opt;
7945 }
7946
7948 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
7949 {
7950 return stream << value.toString();
7951 }
7952
7953 private:
7954 void setFromString(const std::string &value);
7955
7956 constexpr ValueType static verifyValue(const ValueType &value)
7957 {
7958 return validRange().isInRange(value)
7959 ? value
7960 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
7961 + " } is not in range ["
7962 + std::to_string(validRange().min()) + ", "
7963 + std::to_string(validRange().max()) + "]" };
7964 }
7965
7966 Zivid::DataModel::Detail::Optional<double> m_opt;
7967
7968 friend struct DataModel::Detail::Befriend<Threshold>;
7969 };
7970
7971 using Descendants = std::tuple<
7974
7977
7990#ifndef NO_DOC
7991 template<
7992 typename... Args,
7993 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7994 typename std::enable_if<
7995 Zivid::Detail::TypeTraits::
7996 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7997 int>::type = 0>
7998#else
7999 template<typename... Args>
8000#endif
8001 explicit Removal(Args &&...args)
8002 {
8003 using namespace Zivid::Detail::TypeTraits;
8004
8005 static_assert(
8006 AllArgsDecayedAreUnique<Args...>::value,
8007 "Found duplicate types among the arguments passed to Removal(...). "
8008 "Types should be listed at most once.");
8009
8010 set(std::forward<Args>(args)...);
8011 }
8012
8024#ifndef NO_DOC
8025 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8026#else
8027 template<typename... Args>
8028#endif
8029 void set(Args &&...args)
8030 {
8031 using namespace Zivid::Detail::TypeTraits;
8032
8033 using AllArgsAreDescendantNodes =
8034 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8035 static_assert(
8036 AllArgsAreDescendantNodes::value,
8037 "All arguments passed to set(...) must be descendant nodes.");
8038
8039 static_assert(
8040 AllArgsDecayedAreUnique<Args...>::value,
8041 "Found duplicate types among the arguments passed to set(...). "
8042 "Types should be listed at most once.");
8043
8044 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8045 }
8046
8059#ifndef NO_DOC
8060 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8061#else
8062 template<typename... Args>
8063#endif
8064 Removal copyWith(Args &&...args) const
8065 {
8066 using namespace Zivid::Detail::TypeTraits;
8067
8068 using AllArgsAreDescendantNodes =
8069 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8070 static_assert(
8071 AllArgsAreDescendantNodes::value,
8072 "All arguments passed to copyWith(...) must be descendant nodes.");
8073
8074 static_assert(
8075 AllArgsDecayedAreUnique<Args...>::value,
8076 "Found duplicate types among the arguments passed to copyWith(...). "
8077 "Types should be listed at most once.");
8078
8079 auto copy{ *this };
8080 copy.set(std::forward<Args>(args)...);
8081 return copy;
8082 }
8083
8085 const Enabled &isEnabled() const
8086 {
8087 return m_enabled;
8088 }
8089
8092 {
8093 return m_enabled;
8094 }
8095
8097 Removal &set(const Enabled &value)
8098 {
8099 m_enabled = value;
8100 return *this;
8101 }
8102
8104 const Threshold &threshold() const
8105 {
8106 return m_threshold;
8107 }
8108
8111 {
8112 return m_threshold;
8113 }
8114
8116 Removal &set(const Threshold &value)
8117 {
8118 m_threshold = value;
8119 return *this;
8120 }
8121
8122 template<
8123 typename T,
8124 typename std::enable_if<
8125 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8126 int>::type = 0>
8128 {
8129 return m_enabled;
8130 }
8131
8132 template<
8133 typename T,
8134 typename std::enable_if<
8135 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8136 int>::type = 0>
8138 {
8139 return m_threshold;
8140 }
8141
8142 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8144 {
8145 return m_enabled;
8146 }
8147
8148 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8150 {
8151 return m_threshold;
8152 }
8153
8155 template<typename F>
8156 void forEach(const F &f) const
8157 {
8158 f(m_enabled);
8159 f(m_threshold);
8160 }
8161
8163 template<typename F>
8164 void forEach(const F &f)
8165 {
8166 f(m_enabled);
8167 f(m_threshold);
8168 }
8169
8171 bool operator==(const Removal &other) const;
8172
8174 bool operator!=(const Removal &other) const;
8175
8177 std::string toString() const;
8178
8180 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8181 {
8182 return stream << value.toString();
8183 }
8184
8185 private:
8186 void setFromString(const std::string &value);
8187
8188 void setFromString(const std::string &fullPath, const std::string &value);
8189
8190 std::string getString(const std::string &fullPath) const;
8191
8192 Enabled m_enabled;
8193 Threshold m_threshold;
8194
8195 friend struct DataModel::Detail::Befriend<Removal>;
8196 };
8197
8198 using Descendants = std::tuple<
8202
8205
8219#ifndef NO_DOC
8220 template<
8221 typename... Args,
8222 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8223 typename std::enable_if<
8224 Zivid::Detail::TypeTraits::
8225 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8226 int>::type = 0>
8227#else
8228 template<typename... Args>
8229#endif
8230 explicit Outlier(Args &&...args)
8231 {
8232 using namespace Zivid::Detail::TypeTraits;
8233
8234 static_assert(
8235 AllArgsDecayedAreUnique<Args...>::value,
8236 "Found duplicate types among the arguments passed to Outlier(...). "
8237 "Types should be listed at most once.");
8238
8239 set(std::forward<Args>(args)...);
8240 }
8241
8254#ifndef NO_DOC
8255 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8256#else
8257 template<typename... Args>
8258#endif
8259 void set(Args &&...args)
8260 {
8261 using namespace Zivid::Detail::TypeTraits;
8262
8263 using AllArgsAreDescendantNodes =
8264 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8265 static_assert(
8266 AllArgsAreDescendantNodes::value,
8267 "All arguments passed to set(...) must be descendant nodes.");
8268
8269 static_assert(
8270 AllArgsDecayedAreUnique<Args...>::value,
8271 "Found duplicate types among the arguments passed to set(...). "
8272 "Types should be listed at most once.");
8273
8274 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8275 }
8276
8290#ifndef NO_DOC
8291 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8292#else
8293 template<typename... Args>
8294#endif
8295 Outlier copyWith(Args &&...args) const
8296 {
8297 using namespace Zivid::Detail::TypeTraits;
8298
8299 using AllArgsAreDescendantNodes =
8300 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8301 static_assert(
8302 AllArgsAreDescendantNodes::value,
8303 "All arguments passed to copyWith(...) must be descendant nodes.");
8304
8305 static_assert(
8306 AllArgsDecayedAreUnique<Args...>::value,
8307 "Found duplicate types among the arguments passed to copyWith(...). "
8308 "Types should be listed at most once.");
8309
8310 auto copy{ *this };
8311 copy.set(std::forward<Args>(args)...);
8312 return copy;
8313 }
8314
8316 const Removal &removal() const
8317 {
8318 return m_removal;
8319 }
8320
8323 {
8324 return m_removal;
8325 }
8326
8328 Outlier &set(const Removal &value)
8329 {
8330 m_removal = value;
8331 return *this;
8332 }
8333
8336 {
8337 m_removal.set(value);
8338 return *this;
8339 }
8340
8343 {
8344 m_removal.set(value);
8345 return *this;
8346 }
8347
8348 template<
8349 typename T,
8350 typename std::enable_if<
8351 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8352 int>::type = 0>
8354 {
8355 return m_removal;
8356 }
8357
8358 template<
8359 typename T,
8360 typename std::enable_if<
8361 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8362 int>::type = 0>
8364 {
8366 }
8367
8368 template<
8369 typename T,
8370 typename std::enable_if<
8371 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8372 int>::type = 0>
8374 {
8376 }
8377
8378 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8380 {
8381 return m_removal;
8382 }
8383
8385 template<typename F>
8386 void forEach(const F &f) const
8387 {
8388 f(m_removal);
8389 }
8390
8392 template<typename F>
8393 void forEach(const F &f)
8394 {
8395 f(m_removal);
8396 }
8397
8399 bool operator==(const Outlier &other) const;
8400
8402 bool operator!=(const Outlier &other) const;
8403
8405 std::string toString() const;
8406
8408 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
8409 {
8410 return stream << value.toString();
8411 }
8412
8413 private:
8414 void setFromString(const std::string &value);
8415
8416 void setFromString(const std::string &fullPath, const std::string &value);
8417
8418 std::string getString(const std::string &fullPath) const;
8419
8420 Removal m_removal;
8421
8422 friend struct DataModel::Detail::Befriend<Outlier>;
8423 };
8424
8426
8427 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8429 {
8430 public:
8432 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8433
8435 static constexpr const char *path{ "Processing/Filters/Reflection" };
8436
8438 static constexpr const char *name{ "Reflection" };
8439
8441 static constexpr const char *description{
8442 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials).)description"
8443 };
8444
8446
8447 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8449 {
8450 public:
8452 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8453
8455 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
8456
8458 static constexpr const char *name{ "Removal" };
8459
8461 static constexpr const char *description{
8462 R"description(Discard points likely introduced by reflections (useful for shiny materials).)description"
8463 };
8464
8466
8467 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8469 {
8470 public:
8472 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8473
8475 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
8476
8478 static constexpr const char *name{ "Enabled" };
8479
8481 static constexpr const char *description{
8482 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate.)description"
8483 };
8484
8486 using ValueType = bool;
8487 static const Enabled yes;
8488 static const Enabled no;
8489
8491 static std::set<bool> validValues()
8492 {
8493 return { false, true };
8494 }
8495
8497 Enabled() = default;
8498
8500 explicit constexpr Enabled(bool value)
8501 : m_opt{ value }
8502 {}
8503
8508 bool value() const;
8509
8511 bool hasValue() const;
8512
8514 void reset();
8515
8517 std::string toString() const;
8518
8520 bool operator==(const Enabled &other) const
8521 {
8522 return m_opt == other.m_opt;
8523 }
8524
8526 bool operator!=(const Enabled &other) const
8527 {
8528 return m_opt != other.m_opt;
8529 }
8530
8532 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8533 {
8534 return stream << value.toString();
8535 }
8536
8537 private:
8538 void setFromString(const std::string &value);
8539
8540 Zivid::DataModel::Detail::Optional<bool> m_opt;
8541
8542 friend struct DataModel::Detail::Befriend<Enabled>;
8543 };
8544
8553
8554 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8556 {
8557 public:
8559 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8560
8562 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Mode" };
8563
8565 static constexpr const char *name{ "Mode" };
8566
8568 static constexpr const char *description{
8569 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
8570on thinner objects, generally removes more reflection artifacts and processes faster than
8571the Global filter. The Global filter is generally better at removing outlier points in
8572the point cloud. It is advised to use the Outlier filter and Cluster filter together with the
8573Local Reflection filter.
8574
8575Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
8576)description"
8577 };
8578
8580 enum class ValueType
8581 {
8582 global,
8583 local
8584 };
8585 static const Mode global;
8586 static const Mode local;
8587
8589 static std::set<ValueType> validValues()
8590 {
8591 return { ValueType::global, ValueType::local };
8592 }
8593
8595 Mode() = default;
8596
8598 explicit constexpr Mode(ValueType value)
8599 : m_opt{ verifyValue(value) }
8600 {}
8601
8607
8609 bool hasValue() const;
8610
8612 void reset();
8613
8615 std::string toString() const;
8616
8618 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8619 {
8620 return stream << Mode{ value }.toString();
8621 }
8622
8624 bool operator==(const Mode &other) const
8625 {
8626 return m_opt == other.m_opt;
8627 }
8628
8630 bool operator!=(const Mode &other) const
8631 {
8632 return m_opt != other.m_opt;
8633 }
8634
8636 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8637 {
8638 return stream << value.toString();
8639 }
8640
8641 private:
8642 void setFromString(const std::string &value);
8643
8644 constexpr ValueType static verifyValue(const ValueType &value)
8645 {
8646 return value == ValueType::global || value == ValueType::local
8647 ? value
8648 : throw std::invalid_argument{
8649 "Invalid value: Mode{ "
8650 + std::to_string(
8651 static_cast<std::underlying_type<ValueType>::type>(value))
8652 + " }"
8653 };
8654 }
8655
8656 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
8657
8658 friend struct DataModel::Detail::Befriend<Mode>;
8659 };
8660
8661 using Descendants = std::tuple<
8664
8667
8680#ifndef NO_DOC
8681 template<
8682 typename... Args,
8683 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8684 typename std::enable_if<
8685 Zivid::Detail::TypeTraits::
8686 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8687 int>::type = 0>
8688#else
8689 template<typename... Args>
8690#endif
8691 explicit Removal(Args &&...args)
8692 {
8693 using namespace Zivid::Detail::TypeTraits;
8694
8695 static_assert(
8696 AllArgsDecayedAreUnique<Args...>::value,
8697 "Found duplicate types among the arguments passed to Removal(...). "
8698 "Types should be listed at most once.");
8699
8700 set(std::forward<Args>(args)...);
8701 }
8702
8714#ifndef NO_DOC
8715 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8716#else
8717 template<typename... Args>
8718#endif
8719 void set(Args &&...args)
8720 {
8721 using namespace Zivid::Detail::TypeTraits;
8722
8723 using AllArgsAreDescendantNodes =
8724 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8725 static_assert(
8726 AllArgsAreDescendantNodes::value,
8727 "All arguments passed to set(...) must be descendant nodes.");
8728
8729 static_assert(
8730 AllArgsDecayedAreUnique<Args...>::value,
8731 "Found duplicate types among the arguments passed to set(...). "
8732 "Types should be listed at most once.");
8733
8734 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8735 }
8736
8749#ifndef NO_DOC
8750 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8751#else
8752 template<typename... Args>
8753#endif
8754 Removal copyWith(Args &&...args) const
8755 {
8756 using namespace Zivid::Detail::TypeTraits;
8757
8758 using AllArgsAreDescendantNodes =
8759 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8760 static_assert(
8761 AllArgsAreDescendantNodes::value,
8762 "All arguments passed to copyWith(...) must be descendant nodes.");
8763
8764 static_assert(
8765 AllArgsDecayedAreUnique<Args...>::value,
8766 "Found duplicate types among the arguments passed to copyWith(...). "
8767 "Types should be listed at most once.");
8768
8769 auto copy{ *this };
8770 copy.set(std::forward<Args>(args)...);
8771 return copy;
8772 }
8773
8775 const Enabled &isEnabled() const
8776 {
8777 return m_enabled;
8778 }
8779
8782 {
8783 return m_enabled;
8784 }
8785
8787 Removal &set(const Enabled &value)
8788 {
8789 m_enabled = value;
8790 return *this;
8791 }
8792
8794 const Mode &mode() const
8795 {
8796 return m_mode;
8797 }
8798
8801 {
8802 return m_mode;
8803 }
8804
8806 Removal &set(const Mode &value)
8807 {
8808 m_mode = value;
8809 return *this;
8810 }
8811
8812 template<
8813 typename T,
8814 typename std::enable_if<
8815 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8816 int>::type = 0>
8818 {
8819 return m_enabled;
8820 }
8821
8822 template<
8823 typename T,
8824 typename std::enable_if<
8825 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
8826 int>::type = 0>
8828 {
8829 return m_mode;
8830 }
8831
8832 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8834 {
8835 return m_enabled;
8836 }
8837
8838 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8840 {
8841 return m_mode;
8842 }
8843
8845 template<typename F>
8846 void forEach(const F &f) const
8847 {
8848 f(m_enabled);
8849 f(m_mode);
8850 }
8851
8853 template<typename F>
8854 void forEach(const F &f)
8855 {
8856 f(m_enabled);
8857 f(m_mode);
8858 }
8859
8861 bool operator==(const Removal &other) const;
8862
8864 bool operator!=(const Removal &other) const;
8865
8867 std::string toString() const;
8868
8870 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8871 {
8872 return stream << value.toString();
8873 }
8874
8875 private:
8876 void setFromString(const std::string &value);
8877
8878 void setFromString(const std::string &fullPath, const std::string &value);
8879
8880 std::string getString(const std::string &fullPath) const;
8881
8882 Enabled m_enabled;
8883 Mode m_mode;
8884
8885 friend struct DataModel::Detail::Befriend<Removal>;
8886 };
8887
8888 using Descendants = std::tuple<
8892
8895
8909#ifndef NO_DOC
8910 template<
8911 typename... Args,
8912 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8913 typename std::enable_if<
8914 Zivid::Detail::TypeTraits::
8915 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8916 int>::type = 0>
8917#else
8918 template<typename... Args>
8919#endif
8920 explicit Reflection(Args &&...args)
8921 {
8922 using namespace Zivid::Detail::TypeTraits;
8923
8924 static_assert(
8925 AllArgsDecayedAreUnique<Args...>::value,
8926 "Found duplicate types among the arguments passed to Reflection(...). "
8927 "Types should be listed at most once.");
8928
8929 set(std::forward<Args>(args)...);
8930 }
8931
8944#ifndef NO_DOC
8945 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8946#else
8947 template<typename... Args>
8948#endif
8949 void set(Args &&...args)
8950 {
8951 using namespace Zivid::Detail::TypeTraits;
8952
8953 using AllArgsAreDescendantNodes =
8954 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8955 static_assert(
8956 AllArgsAreDescendantNodes::value,
8957 "All arguments passed to set(...) must be descendant nodes.");
8958
8959 static_assert(
8960 AllArgsDecayedAreUnique<Args...>::value,
8961 "Found duplicate types among the arguments passed to set(...). "
8962 "Types should be listed at most once.");
8963
8964 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8965 }
8966
8980#ifndef NO_DOC
8981 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8982#else
8983 template<typename... Args>
8984#endif
8985 Reflection copyWith(Args &&...args) const
8986 {
8987 using namespace Zivid::Detail::TypeTraits;
8988
8989 using AllArgsAreDescendantNodes =
8990 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8991 static_assert(
8992 AllArgsAreDescendantNodes::value,
8993 "All arguments passed to copyWith(...) must be descendant nodes.");
8994
8995 static_assert(
8996 AllArgsDecayedAreUnique<Args...>::value,
8997 "Found duplicate types among the arguments passed to copyWith(...). "
8998 "Types should be listed at most once.");
8999
9000 auto copy{ *this };
9001 copy.set(std::forward<Args>(args)...);
9002 return copy;
9003 }
9004
9006 const Removal &removal() const
9007 {
9008 return m_removal;
9009 }
9010
9013 {
9014 return m_removal;
9015 }
9016
9018 Reflection &set(const Removal &value)
9019 {
9020 m_removal = value;
9021 return *this;
9022 }
9023
9026 {
9027 m_removal.set(value);
9028 return *this;
9029 }
9030
9033 {
9034 m_removal.set(value);
9035 return *this;
9036 }
9037
9038 template<
9039 typename T,
9040 typename std::enable_if<
9041 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9042 int>::type = 0>
9044 {
9045 return m_removal;
9046 }
9047
9048 template<
9049 typename T,
9050 typename std::enable_if<
9051 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9052 int>::type = 0>
9054 {
9056 }
9057
9058 template<
9059 typename T,
9060 typename std::enable_if<
9061 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9062 int>::type = 0>
9064 {
9066 }
9067
9068 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9070 {
9071 return m_removal;
9072 }
9073
9075 template<typename F>
9076 void forEach(const F &f) const
9077 {
9078 f(m_removal);
9079 }
9080
9082 template<typename F>
9083 void forEach(const F &f)
9084 {
9085 f(m_removal);
9086 }
9087
9089 bool operator==(const Reflection &other) const;
9090
9092 bool operator!=(const Reflection &other) const;
9093
9095 std::string toString() const;
9096
9098 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9099 {
9100 return stream << value.toString();
9101 }
9102
9103 private:
9104 void setFromString(const std::string &value);
9105
9106 void setFromString(const std::string &fullPath, const std::string &value);
9107
9108 std::string getString(const std::string &fullPath) const;
9109
9110 Removal m_removal;
9111
9112 friend struct DataModel::Detail::Befriend<Reflection>;
9113 };
9114
9116
9117 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9119 {
9120 public:
9122 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9123
9125 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9126
9128 static constexpr const char *name{ "Smoothing" };
9129
9131 static constexpr const char *description{ R"description(Smoothing filters.)description" };
9132
9134
9135 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9137 {
9138 public:
9140 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9141
9143 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9144
9146 static constexpr const char *name{ "Gaussian" };
9147
9149 static constexpr const char *description{
9150 R"description(Gaussian smoothing of the point cloud.)description"
9151 };
9152
9154
9155 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9157 {
9158 public:
9160 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9161
9163 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9164
9166 static constexpr const char *name{ "Enabled" };
9167
9169 static constexpr const char *description{
9170 R"description(Enable or disable the smoothing filter.)description"
9171 };
9172
9174 using ValueType = bool;
9175 static const Enabled yes;
9176 static const Enabled no;
9177
9179 static std::set<bool> validValues()
9180 {
9181 return { false, true };
9182 }
9183
9185 Enabled() = default;
9186
9188 explicit constexpr Enabled(bool value)
9189 : m_opt{ value }
9190 {}
9191
9196 bool value() const;
9197
9199 bool hasValue() const;
9200
9202 void reset();
9203
9205 std::string toString() const;
9206
9208 bool operator==(const Enabled &other) const
9209 {
9210 return m_opt == other.m_opt;
9211 }
9212
9214 bool operator!=(const Enabled &other) const
9215 {
9216 return m_opt != other.m_opt;
9217 }
9218
9220 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9221 {
9222 return stream << value.toString();
9223 }
9224
9225 private:
9226 void setFromString(const std::string &value);
9227
9228 Zivid::DataModel::Detail::Optional<bool> m_opt;
9229
9230 friend struct DataModel::Detail::Befriend<Enabled>;
9231 };
9232
9234
9235 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9237 {
9238 public:
9240 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9241
9243 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9244
9246 static constexpr const char *name{ "Sigma" };
9247
9249 static constexpr const char *description{
9250 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients).)description"
9251 };
9252
9254 using ValueType = double;
9255
9257 static constexpr Range<double> validRange()
9258 {
9259 return { 0.5, 5 };
9260 }
9261
9263 Sigma() = default;
9264
9266 explicit constexpr Sigma(double value)
9267 : m_opt{ verifyValue(value) }
9268 {}
9269
9274 double value() const;
9275
9277 bool hasValue() const;
9278
9280 void reset();
9281
9283 std::string toString() const;
9284
9286 bool operator==(const Sigma &other) const
9287 {
9288 return m_opt == other.m_opt;
9289 }
9290
9292 bool operator!=(const Sigma &other) const
9293 {
9294 return m_opt != other.m_opt;
9295 }
9296
9298 bool operator<(const Sigma &other) const
9299 {
9300 return m_opt < other.m_opt;
9301 }
9302
9304 bool operator>(const Sigma &other) const
9305 {
9306 return m_opt > other.m_opt;
9307 }
9308
9310 bool operator<=(const Sigma &other) const
9311 {
9312 return m_opt <= other.m_opt;
9313 }
9314
9316 bool operator>=(const Sigma &other) const
9317 {
9318 return m_opt >= other.m_opt;
9319 }
9320
9322 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9323 {
9324 return stream << value.toString();
9325 }
9326
9327 private:
9328 void setFromString(const std::string &value);
9329
9330 constexpr ValueType static verifyValue(const ValueType &value)
9331 {
9332 return validRange().isInRange(value)
9333 ? value
9334 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9335 + " } is not in range ["
9336 + std::to_string(validRange().min()) + ", "
9337 + std::to_string(validRange().max()) + "]" };
9338 }
9339
9340 Zivid::DataModel::Detail::Optional<double> m_opt;
9341
9342 friend struct DataModel::Detail::Befriend<Sigma>;
9343 };
9344
9345 using Descendants = std::tuple<
9348
9351
9364#ifndef NO_DOC
9365 template<
9366 typename... Args,
9367 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9368 typename std::enable_if<
9369 Zivid::Detail::TypeTraits::
9370 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9371 int>::type = 0>
9372#else
9373 template<typename... Args>
9374#endif
9375 explicit Gaussian(Args &&...args)
9376 {
9377 using namespace Zivid::Detail::TypeTraits;
9378
9379 static_assert(
9380 AllArgsDecayedAreUnique<Args...>::value,
9381 "Found duplicate types among the arguments passed to Gaussian(...). "
9382 "Types should be listed at most once.");
9383
9384 set(std::forward<Args>(args)...);
9385 }
9386
9398#ifndef NO_DOC
9399 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9400#else
9401 template<typename... Args>
9402#endif
9403 void set(Args &&...args)
9404 {
9405 using namespace Zivid::Detail::TypeTraits;
9406
9407 using AllArgsAreDescendantNodes =
9408 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9409 static_assert(
9410 AllArgsAreDescendantNodes::value,
9411 "All arguments passed to set(...) must be descendant nodes.");
9412
9413 static_assert(
9414 AllArgsDecayedAreUnique<Args...>::value,
9415 "Found duplicate types among the arguments passed to set(...). "
9416 "Types should be listed at most once.");
9417
9418 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9419 }
9420
9433#ifndef NO_DOC
9434 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9435#else
9436 template<typename... Args>
9437#endif
9438 Gaussian copyWith(Args &&...args) const
9439 {
9440 using namespace Zivid::Detail::TypeTraits;
9441
9442 using AllArgsAreDescendantNodes =
9443 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9444 static_assert(
9445 AllArgsAreDescendantNodes::value,
9446 "All arguments passed to copyWith(...) must be descendant nodes.");
9447
9448 static_assert(
9449 AllArgsDecayedAreUnique<Args...>::value,
9450 "Found duplicate types among the arguments passed to copyWith(...). "
9451 "Types should be listed at most once.");
9452
9453 auto copy{ *this };
9454 copy.set(std::forward<Args>(args)...);
9455 return copy;
9456 }
9457
9459 const Enabled &isEnabled() const
9460 {
9461 return m_enabled;
9462 }
9463
9466 {
9467 return m_enabled;
9468 }
9469
9471 Gaussian &set(const Enabled &value)
9472 {
9473 m_enabled = value;
9474 return *this;
9475 }
9476
9478 const Sigma &sigma() const
9479 {
9480 return m_sigma;
9481 }
9482
9485 {
9486 return m_sigma;
9487 }
9488
9490 Gaussian &set(const Sigma &value)
9491 {
9492 m_sigma = value;
9493 return *this;
9494 }
9495
9496 template<
9497 typename T,
9498 typename std::enable_if<
9499 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9500 int>::type = 0>
9502 {
9503 return m_enabled;
9504 }
9505
9506 template<
9507 typename T,
9508 typename std::enable_if<
9509 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9510 int>::type = 0>
9512 {
9513 return m_sigma;
9514 }
9515
9516 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9518 {
9519 return m_enabled;
9520 }
9521
9522 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9524 {
9525 return m_sigma;
9526 }
9527
9529 template<typename F>
9530 void forEach(const F &f) const
9531 {
9532 f(m_enabled);
9533 f(m_sigma);
9534 }
9535
9537 template<typename F>
9538 void forEach(const F &f)
9539 {
9540 f(m_enabled);
9541 f(m_sigma);
9542 }
9543
9545 bool operator==(const Gaussian &other) const;
9546
9548 bool operator!=(const Gaussian &other) const;
9549
9551 std::string toString() const;
9552
9554 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9555 {
9556 return stream << value.toString();
9557 }
9558
9559 private:
9560 void setFromString(const std::string &value);
9561
9562 void setFromString(const std::string &fullPath, const std::string &value);
9563
9564 std::string getString(const std::string &fullPath) const;
9565
9566 Enabled m_enabled;
9567 Sigma m_sigma;
9568
9569 friend struct DataModel::Detail::Befriend<Gaussian>;
9570 };
9571
9572 using Descendants = std::tuple<
9576
9579
9593#ifndef NO_DOC
9594 template<
9595 typename... Args,
9596 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9597 typename std::enable_if<
9598 Zivid::Detail::TypeTraits::
9599 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9600 int>::type = 0>
9601#else
9602 template<typename... Args>
9603#endif
9604 explicit Smoothing(Args &&...args)
9605 {
9606 using namespace Zivid::Detail::TypeTraits;
9607
9608 static_assert(
9609 AllArgsDecayedAreUnique<Args...>::value,
9610 "Found duplicate types among the arguments passed to Smoothing(...). "
9611 "Types should be listed at most once.");
9612
9613 set(std::forward<Args>(args)...);
9614 }
9615
9628#ifndef NO_DOC
9629 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9630#else
9631 template<typename... Args>
9632#endif
9633 void set(Args &&...args)
9634 {
9635 using namespace Zivid::Detail::TypeTraits;
9636
9637 using AllArgsAreDescendantNodes =
9638 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9639 static_assert(
9640 AllArgsAreDescendantNodes::value,
9641 "All arguments passed to set(...) must be descendant nodes.");
9642
9643 static_assert(
9644 AllArgsDecayedAreUnique<Args...>::value,
9645 "Found duplicate types among the arguments passed to set(...). "
9646 "Types should be listed at most once.");
9647
9648 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9649 }
9650
9664#ifndef NO_DOC
9665 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9666#else
9667 template<typename... Args>
9668#endif
9669 Smoothing copyWith(Args &&...args) const
9670 {
9671 using namespace Zivid::Detail::TypeTraits;
9672
9673 using AllArgsAreDescendantNodes =
9674 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9675 static_assert(
9676 AllArgsAreDescendantNodes::value,
9677 "All arguments passed to copyWith(...) must be descendant nodes.");
9678
9679 static_assert(
9680 AllArgsDecayedAreUnique<Args...>::value,
9681 "Found duplicate types among the arguments passed to copyWith(...). "
9682 "Types should be listed at most once.");
9683
9684 auto copy{ *this };
9685 copy.set(std::forward<Args>(args)...);
9686 return copy;
9687 }
9688
9690 const Gaussian &gaussian() const
9691 {
9692 return m_gaussian;
9693 }
9694
9697 {
9698 return m_gaussian;
9699 }
9700
9702 Smoothing &set(const Gaussian &value)
9703 {
9704 m_gaussian = value;
9705 return *this;
9706 }
9707
9710 {
9711 m_gaussian.set(value);
9712 return *this;
9713 }
9714
9717 {
9718 m_gaussian.set(value);
9719 return *this;
9720 }
9721
9722 template<
9723 typename T,
9724 typename std::enable_if<
9725 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9726 int>::type = 0>
9728 {
9729 return m_gaussian;
9730 }
9731
9732 template<
9733 typename T,
9734 typename std::enable_if<
9735 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9736 int>::type = 0>
9738 {
9740 }
9741
9742 template<
9743 typename T,
9744 typename std::enable_if<
9745 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9746 int>::type = 0>
9748 {
9750 }
9751
9752 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9754 {
9755 return m_gaussian;
9756 }
9757
9759 template<typename F>
9760 void forEach(const F &f) const
9761 {
9762 f(m_gaussian);
9763 }
9764
9766 template<typename F>
9767 void forEach(const F &f)
9768 {
9769 f(m_gaussian);
9770 }
9771
9773 bool operator==(const Smoothing &other) const;
9774
9776 bool operator!=(const Smoothing &other) const;
9777
9779 std::string toString() const;
9780
9782 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
9783 {
9784 return stream << value.toString();
9785 }
9786
9787 private:
9788 void setFromString(const std::string &value);
9789
9790 void setFromString(const std::string &fullPath, const std::string &value);
9791
9792 std::string getString(const std::string &fullPath) const;
9793
9794 Gaussian m_gaussian;
9795
9796 friend struct DataModel::Detail::Befriend<Smoothing>;
9797 };
9798
9799 using Descendants = std::tuple<
9838
9841
9890#ifndef NO_DOC
9891 template<
9892 typename... Args,
9893 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9894 typename std::enable_if<
9895 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
9896 value,
9897 int>::type = 0>
9898#else
9899 template<typename... Args>
9900#endif
9901 explicit Filters(Args &&...args)
9902 {
9903 using namespace Zivid::Detail::TypeTraits;
9904
9905 static_assert(
9906 AllArgsDecayedAreUnique<Args...>::value,
9907 "Found duplicate types among the arguments passed to Filters(...). "
9908 "Types should be listed at most once.");
9909
9910 set(std::forward<Args>(args)...);
9911 }
9912
9960#ifndef NO_DOC
9961 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9962#else
9963 template<typename... Args>
9964#endif
9965 void set(Args &&...args)
9966 {
9967 using namespace Zivid::Detail::TypeTraits;
9968
9969 using AllArgsAreDescendantNodes =
9970 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9971 static_assert(
9972 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
9973
9974 static_assert(
9975 AllArgsDecayedAreUnique<Args...>::value,
9976 "Found duplicate types among the arguments passed to set(...). "
9977 "Types should be listed at most once.");
9978
9979 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9980 }
9981
10030#ifndef NO_DOC
10031 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10032#else
10033 template<typename... Args>
10034#endif
10035 Filters copyWith(Args &&...args) const
10036 {
10037 using namespace Zivid::Detail::TypeTraits;
10038
10039 using AllArgsAreDescendantNodes =
10040 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10041 static_assert(
10042 AllArgsAreDescendantNodes::value,
10043 "All arguments passed to copyWith(...) must be descendant nodes.");
10044
10045 static_assert(
10046 AllArgsDecayedAreUnique<Args...>::value,
10047 "Found duplicate types among the arguments passed to copyWith(...). "
10048 "Types should be listed at most once.");
10049
10050 auto copy{ *this };
10051 copy.set(std::forward<Args>(args)...);
10052 return copy;
10053 }
10054
10056 const Cluster &cluster() const
10057 {
10058 return m_cluster;
10059 }
10060
10063 {
10064 return m_cluster;
10065 }
10066
10068 Filters &set(const Cluster &value)
10069 {
10070 m_cluster = value;
10071 return *this;
10072 }
10073
10076 {
10077 m_cluster.set(value);
10078 return *this;
10079 }
10080
10083 {
10084 m_cluster.set(value);
10085 return *this;
10086 }
10087
10090 {
10091 m_cluster.set(value);
10092 return *this;
10093 }
10094
10097 {
10098 m_cluster.set(value);
10099 return *this;
10100 }
10101
10104 {
10105 return m_experimental;
10106 }
10107
10110 {
10111 return m_experimental;
10112 }
10113
10115 Filters &set(const Experimental &value)
10116 {
10117 m_experimental = value;
10118 return *this;
10119 }
10120
10123 {
10124 m_experimental.set(value);
10125 return *this;
10126 }
10127
10130 {
10131 m_experimental.set(value);
10132 return *this;
10133 }
10134
10137 {
10138 m_experimental.set(value);
10139 return *this;
10140 }
10141
10144 {
10145 m_experimental.set(value);
10146 return *this;
10147 }
10148
10151 {
10152 m_experimental.set(value);
10153 return *this;
10154 }
10155
10158 {
10159 m_experimental.set(value);
10160 return *this;
10161 }
10162
10165 {
10166 m_experimental.set(value);
10167 return *this;
10168 }
10169
10171 const Hole &hole() const
10172 {
10173 return m_hole;
10174 }
10175
10178 {
10179 return m_hole;
10180 }
10181
10183 Filters &set(const Hole &value)
10184 {
10185 m_hole = value;
10186 return *this;
10187 }
10188
10190 Filters &set(const Hole::Repair &value)
10191 {
10192 m_hole.set(value);
10193 return *this;
10194 }
10195
10198 {
10199 m_hole.set(value);
10200 return *this;
10201 }
10202
10205 {
10206 m_hole.set(value);
10207 return *this;
10208 }
10209
10212 {
10213 m_hole.set(value);
10214 return *this;
10215 }
10216
10218 const Noise &noise() const
10219 {
10220 return m_noise;
10221 }
10222
10225 {
10226 return m_noise;
10227 }
10228
10230 Filters &set(const Noise &value)
10231 {
10232 m_noise = value;
10233 return *this;
10234 }
10235
10238 {
10239 m_noise.set(value);
10240 return *this;
10241 }
10242
10245 {
10246 m_noise.set(value);
10247 return *this;
10248 }
10249
10252 {
10253 m_noise.set(value);
10254 return *this;
10255 }
10256
10259 {
10260 m_noise.set(value);
10261 return *this;
10262 }
10263
10266 {
10267 m_noise.set(value);
10268 return *this;
10269 }
10270
10273 {
10274 m_noise.set(value);
10275 return *this;
10276 }
10277
10280 {
10281 m_noise.set(value);
10282 return *this;
10283 }
10284
10286 const Outlier &outlier() const
10287 {
10288 return m_outlier;
10289 }
10290
10293 {
10294 return m_outlier;
10295 }
10296
10298 Filters &set(const Outlier &value)
10299 {
10300 m_outlier = value;
10301 return *this;
10302 }
10303
10306 {
10307 m_outlier.set(value);
10308 return *this;
10309 }
10310
10313 {
10314 m_outlier.set(value);
10315 return *this;
10316 }
10317
10320 {
10321 m_outlier.set(value);
10322 return *this;
10323 }
10324
10326 const Reflection &reflection() const
10327 {
10328 return m_reflection;
10329 }
10330
10333 {
10334 return m_reflection;
10335 }
10336
10338 Filters &set(const Reflection &value)
10339 {
10340 m_reflection = value;
10341 return *this;
10342 }
10343
10346 {
10347 m_reflection.set(value);
10348 return *this;
10349 }
10350
10353 {
10354 m_reflection.set(value);
10355 return *this;
10356 }
10357
10360 {
10361 m_reflection.set(value);
10362 return *this;
10363 }
10364
10366 const Smoothing &smoothing() const
10367 {
10368 return m_smoothing;
10369 }
10370
10373 {
10374 return m_smoothing;
10375 }
10376
10378 Filters &set(const Smoothing &value)
10379 {
10380 m_smoothing = value;
10381 return *this;
10382 }
10383
10386 {
10387 m_smoothing.set(value);
10388 return *this;
10389 }
10390
10393 {
10394 m_smoothing.set(value);
10395 return *this;
10396 }
10397
10400 {
10401 m_smoothing.set(value);
10402 return *this;
10403 }
10404
10405 template<
10406 typename T,
10407 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10408 0>
10410 {
10411 return m_cluster;
10412 }
10413
10414 template<
10415 typename T,
10416 typename std::enable_if<
10417 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
10418 int>::type = 0>
10420 {
10422 }
10423
10424 template<
10425 typename T,
10426 typename std::enable_if<
10427 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
10428 int>::type = 0>
10430 {
10432 }
10433
10434 template<
10435 typename T,
10436 typename std::enable_if<
10437 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
10438 int>::type = 0>
10440 {
10442 }
10443
10444 template<
10445 typename T,
10446 typename std::enable_if<
10447 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10448 int>::type = 0>
10450 {
10452 }
10453
10454 template<
10455 typename T,
10456 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10457 type = 0>
10459 {
10460 return m_experimental;
10461 }
10462
10463 template<
10464 typename T,
10465 typename std::enable_if<
10466 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10467 int>::type = 0>
10469 {
10471 }
10472
10473 template<
10474 typename T,
10475 typename std::enable_if<
10476 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10477 value,
10478 int>::type = 0>
10480 {
10481 return m_experimental
10483 }
10484
10485 template<
10486 typename T,
10487 typename std::enable_if<
10488 std::is_same<
10489 T,
10491 value,
10492 int>::type = 0>
10494 {
10495 return m_experimental
10497 }
10498
10499 template<
10500 typename T,
10501 typename std::enable_if<
10502 std::is_same<
10503 T,
10505 value,
10506 int>::type = 0>
10508 {
10509 return m_experimental
10511 }
10512
10513 template<
10514 typename T,
10515 typename std::enable_if<
10516 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10517 value,
10518 int>::type = 0>
10520 {
10521 return m_experimental
10523 }
10524
10525 template<
10526 typename T,
10527 typename std::enable_if<
10528 std::is_same<
10529 T,
10531 int>::type = 0>
10533 {
10534 return m_experimental
10536 }
10537
10538 template<
10539 typename T,
10540 typename std::enable_if<
10541 std::is_same<
10542 T,
10544 int>::type = 0>
10546 {
10547 return m_experimental
10549 }
10550
10551 template<
10552 typename T,
10553 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
10555 {
10556 return m_hole;
10557 }
10558
10559 template<
10560 typename T,
10561 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
10562 type = 0>
10564 {
10566 }
10567
10568 template<
10569 typename T,
10570 typename std::enable_if<
10571 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
10572 int>::type = 0>
10574 {
10576 }
10577
10578 template<
10579 typename T,
10580 typename std::enable_if<
10581 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
10582 int>::type = 0>
10584 {
10586 }
10587
10588 template<
10589 typename T,
10590 typename std::enable_if<
10591 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
10592 int>::type = 0>
10594 {
10596 }
10597
10598 template<
10599 typename T,
10600 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10601 0>
10603 {
10604 return m_noise;
10605 }
10606
10607 template<
10608 typename T,
10609 typename std::
10610 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
10612 {
10614 }
10615
10616 template<
10617 typename T,
10618 typename std::enable_if<
10619 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10620 int>::type = 0>
10622 {
10624 }
10625
10626 template<
10627 typename T,
10628 typename std::enable_if<
10629 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10630 int>::type = 0>
10632 {
10634 }
10635
10636 template<
10637 typename T,
10638 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10639 type = 0>
10641 {
10643 }
10644
10645 template<
10646 typename T,
10647 typename std::enable_if<
10648 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
10649 int>::type = 0>
10651 {
10653 }
10654
10655 template<
10656 typename T,
10657 typename std::enable_if<
10658 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
10659 int>::type = 0>
10661 {
10663 }
10664
10665 template<
10666 typename T,
10667 typename std::enable_if<
10668 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10669 int>::type = 0>
10671 {
10673 }
10674
10675 template<
10676 typename T,
10677 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10678 0>
10680 {
10681 return m_outlier;
10682 }
10683
10684 template<
10685 typename T,
10686 typename std::enable_if<
10687 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
10688 int>::type = 0>
10690 {
10692 }
10693
10694 template<
10695 typename T,
10696 typename std::enable_if<
10697 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10698 int>::type = 0>
10700 {
10702 }
10703
10704 template<
10705 typename T,
10706 typename std::enable_if<
10707 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10708 int>::type = 0>
10710 {
10712 }
10713
10714 template<
10715 typename T,
10716 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10717 type = 0>
10719 {
10720 return m_reflection;
10721 }
10722
10723 template<
10724 typename T,
10725 typename std::enable_if<
10726 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
10727 int>::type = 0>
10729 {
10731 }
10732
10733 template<
10734 typename T,
10735 typename std::enable_if<
10736 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
10737 int>::type = 0>
10739 {
10741 }
10742
10743 template<
10744 typename T,
10745 typename std::enable_if<
10746 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
10747 int>::type = 0>
10749 {
10751 }
10752
10753 template<
10754 typename T,
10755 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
10756 type = 0>
10758 {
10759 return m_smoothing;
10760 }
10761
10762 template<
10763 typename T,
10764 typename std::enable_if<
10765 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
10766 int>::type = 0>
10768 {
10770 }
10771
10772 template<
10773 typename T,
10774 typename std::enable_if<
10775 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10776 int>::type = 0>
10778 {
10780 }
10781
10782 template<
10783 typename T,
10784 typename std::enable_if<
10785 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10786 int>::type = 0>
10788 {
10790 }
10791
10792 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
10794 {
10795 return m_cluster;
10796 }
10797
10798 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
10800 {
10801 return m_experimental;
10802 }
10803
10804 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
10806 {
10807 return m_hole;
10808 }
10809
10810 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
10812 {
10813 return m_noise;
10814 }
10815
10816 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
10818 {
10819 return m_outlier;
10820 }
10821
10822 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
10824 {
10825 return m_reflection;
10826 }
10827
10828 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
10830 {
10831 return m_smoothing;
10832 }
10833
10835 template<typename F>
10836 void forEach(const F &f) const
10837 {
10838 f(m_cluster);
10839 f(m_experimental);
10840 f(m_hole);
10841 f(m_noise);
10842 f(m_outlier);
10843 f(m_reflection);
10844 f(m_smoothing);
10845 }
10846
10848 template<typename F>
10849 void forEach(const F &f)
10850 {
10851 f(m_cluster);
10852 f(m_experimental);
10853 f(m_hole);
10854 f(m_noise);
10855 f(m_outlier);
10856 f(m_reflection);
10857 f(m_smoothing);
10858 }
10859
10861 bool operator==(const Filters &other) const;
10862
10864 bool operator!=(const Filters &other) const;
10865
10867 std::string toString() const;
10868
10870 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
10871 {
10872 return stream << value.toString();
10873 }
10874
10875 private:
10876 void setFromString(const std::string &value);
10877
10878 void setFromString(const std::string &fullPath, const std::string &value);
10879
10880 std::string getString(const std::string &fullPath) const;
10881
10882 Cluster m_cluster;
10883 Experimental m_experimental;
10884 Hole m_hole;
10885 Noise m_noise;
10886 Outlier m_outlier;
10887 Reflection m_reflection;
10888 Smoothing m_smoothing;
10889
10890 friend struct DataModel::Detail::Befriend<Filters>;
10891 };
10892
10895
10896 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
10898 {
10899 public:
10901 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
10902
10904 static constexpr const char *path{ "Processing/Resampling" };
10905
10907 static constexpr const char *name{ "Resampling" };
10908
10910 static constexpr const char *description{
10911 R"description(Settings for changing the output resolution of the point cloud.
10912)description"
10913 };
10914
10938
10939 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
10941 {
10942 public:
10944 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
10945
10947 static constexpr const char *path{ "Processing/Resampling/Mode" };
10948
10950 static constexpr const char *name{ "Mode" };
10951
10953 static constexpr const char *description{
10954 R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
10955is performed after all other processing has been completed.
10956
10957Downsampling is used to reduce the number of points in the point cloud. This is done by
10958combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
10959a new point cloud. This downsample functionality is identical to the downsample method
10960on the PointCloud class. The averaging process reduces noise in the point cloud, but it
10961will not improve capture speed. To improve capture speed, consider using the subsampling
10962modes found in Settings/Sampling/Pixel.
10963
10964Upsampling is used to increase the number of points in the point cloud. It is not possible
10965to upsample beyond the full resolution of the camera, so upsampling may only be used in
10966combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
10967combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
10968resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
10969blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
10970groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
10971new points based on an interpolation of the surrounding original points. The points in the
10972new point cloud that correspond to points in the original point cloud are left unchanged.
10973Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
10974pixels in the point cloud compared to no upsampling, so users should be aware of increased
10975computational cost related to copying and analyzing this data.
10976)description"
10977 };
10978
10980 enum class ValueType
10981 {
10982 disabled,
10983 downsample2x2,
10984 downsample4x4,
10985 upsample2x2,
10986 upsample4x4
10987 };
10988 static const Mode disabled;
10989 static const Mode downsample2x2;
10990 static const Mode downsample4x4;
10991 static const Mode upsample2x2;
10992 static const Mode upsample4x4;
10993
10995 static std::set<ValueType> validValues()
10996 {
10997 return { ValueType::disabled,
10998 ValueType::downsample2x2,
10999 ValueType::downsample4x4,
11000 ValueType::upsample2x2,
11001 ValueType::upsample4x4 };
11002 }
11003
11005 Mode() = default;
11006
11008 explicit constexpr Mode(ValueType value)
11009 : m_opt{ verifyValue(value) }
11010 {}
11011
11017
11019 bool hasValue() const;
11020
11022 void reset();
11023
11025 std::string toString() const;
11026
11028 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
11029 {
11030 return stream << Mode{ value }.toString();
11031 }
11032
11034 bool operator==(const Mode &other) const
11035 {
11036 return m_opt == other.m_opt;
11037 }
11038
11040 bool operator!=(const Mode &other) const
11041 {
11042 return m_opt != other.m_opt;
11043 }
11044
11046 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
11047 {
11048 return stream << value.toString();
11049 }
11050
11051 private:
11052 void setFromString(const std::string &value);
11053
11054 constexpr ValueType static verifyValue(const ValueType &value)
11055 {
11056 return value == ValueType::disabled || value == ValueType::downsample2x2
11057 || value == ValueType::downsample4x4 || value == ValueType::upsample2x2
11058 || value == ValueType::upsample4x4
11059 ? value
11060 : throw std::invalid_argument{
11061 "Invalid value: Mode{ "
11062 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
11063 + " }"
11064 };
11065 }
11066
11067 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
11068
11069 friend struct DataModel::Detail::Befriend<Mode>;
11070 };
11071
11072 using Descendants = std::tuple<Settings::Processing::Resampling::Mode>;
11073
11076
11088#ifndef NO_DOC
11089 template<
11090 typename... Args,
11091 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11092 typename std::enable_if<
11093 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11094 value,
11095 int>::type = 0>
11096#else
11097 template<typename... Args>
11098#endif
11099 explicit Resampling(Args &&...args)
11100 {
11101 using namespace Zivid::Detail::TypeTraits;
11102
11103 static_assert(
11104 AllArgsDecayedAreUnique<Args...>::value,
11105 "Found duplicate types among the arguments passed to Resampling(...). "
11106 "Types should be listed at most once.");
11107
11108 set(std::forward<Args>(args)...);
11109 }
11110
11121#ifndef NO_DOC
11122 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11123#else
11124 template<typename... Args>
11125#endif
11126 void set(Args &&...args)
11127 {
11128 using namespace Zivid::Detail::TypeTraits;
11129
11130 using AllArgsAreDescendantNodes =
11131 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11132 static_assert(
11133 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11134
11135 static_assert(
11136 AllArgsDecayedAreUnique<Args...>::value,
11137 "Found duplicate types among the arguments passed to set(...). "
11138 "Types should be listed at most once.");
11139
11140 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11141 }
11142
11154#ifndef NO_DOC
11155 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11156#else
11157 template<typename... Args>
11158#endif
11159 Resampling copyWith(Args &&...args) const
11160 {
11161 using namespace Zivid::Detail::TypeTraits;
11162
11163 using AllArgsAreDescendantNodes =
11164 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11165 static_assert(
11166 AllArgsAreDescendantNodes::value,
11167 "All arguments passed to copyWith(...) must be descendant nodes.");
11168
11169 static_assert(
11170 AllArgsDecayedAreUnique<Args...>::value,
11171 "Found duplicate types among the arguments passed to copyWith(...). "
11172 "Types should be listed at most once.");
11173
11174 auto copy{ *this };
11175 copy.set(std::forward<Args>(args)...);
11176 return copy;
11177 }
11178
11180 const Mode &mode() const
11181 {
11182 return m_mode;
11183 }
11184
11187 {
11188 return m_mode;
11189 }
11190
11192 Resampling &set(const Mode &value)
11193 {
11194 m_mode = value;
11195 return *this;
11196 }
11197
11198 template<
11199 typename T,
11200 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type =
11201 0>
11203 {
11204 return m_mode;
11205 }
11206
11207 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11209 {
11210 return m_mode;
11211 }
11212
11214 template<typename F>
11215 void forEach(const F &f) const
11216 {
11217 f(m_mode);
11218 }
11219
11221 template<typename F>
11222 void forEach(const F &f)
11223 {
11224 f(m_mode);
11225 }
11226
11228 bool operator==(const Resampling &other) const;
11229
11231 bool operator!=(const Resampling &other) const;
11232
11234 std::string toString() const;
11235
11237 friend std::ostream &operator<<(std::ostream &stream, const Resampling &value)
11238 {
11239 return stream << value.toString();
11240 }
11241
11242 private:
11243 void setFromString(const std::string &value);
11244
11245 void setFromString(const std::string &fullPath, const std::string &value);
11246
11247 std::string getString(const std::string &fullPath) const;
11248
11249 Mode m_mode;
11250
11251 friend struct DataModel::Detail::Befriend<Resampling>;
11252 };
11253
11254 using Descendants = std::tuple<
11304
11307
11367#ifndef NO_DOC
11368 template<
11369 typename... Args,
11370 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11371 typename std::enable_if<
11372 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11373 value,
11374 int>::type = 0>
11375#else
11376 template<typename... Args>
11377#endif
11378 explicit Processing(Args &&...args)
11379 {
11380 using namespace Zivid::Detail::TypeTraits;
11381
11382 static_assert(
11383 AllArgsDecayedAreUnique<Args...>::value,
11384 "Found duplicate types among the arguments passed to Processing(...). "
11385 "Types should be listed at most once.");
11386
11387 set(std::forward<Args>(args)...);
11388 }
11389
11448#ifndef NO_DOC
11449 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11450#else
11451 template<typename... Args>
11452#endif
11453 void set(Args &&...args)
11454 {
11455 using namespace Zivid::Detail::TypeTraits;
11456
11457 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11458 static_assert(
11459 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11460
11461 static_assert(
11462 AllArgsDecayedAreUnique<Args...>::value,
11463 "Found duplicate types among the arguments passed to set(...). "
11464 "Types should be listed at most once.");
11465
11466 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11467 }
11468
11528#ifndef NO_DOC
11529 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11530#else
11531 template<typename... Args>
11532#endif
11533 Processing copyWith(Args &&...args) const
11534 {
11535 using namespace Zivid::Detail::TypeTraits;
11536
11537 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11538 static_assert(
11539 AllArgsAreDescendantNodes::value,
11540 "All arguments passed to copyWith(...) must be descendant nodes.");
11541
11542 static_assert(
11543 AllArgsDecayedAreUnique<Args...>::value,
11544 "Found duplicate types among the arguments passed to copyWith(...). "
11545 "Types should be listed at most once.");
11546
11547 auto copy{ *this };
11548 copy.set(std::forward<Args>(args)...);
11549 return copy;
11550 }
11551
11553 const Color &color() const
11554 {
11555 return m_color;
11556 }
11557
11560 {
11561 return m_color;
11562 }
11563
11565 Processing &set(const Color &value)
11566 {
11567 m_color = value;
11568 return *this;
11569 }
11570
11573 {
11574 m_color.set(value);
11575 return *this;
11576 }
11577
11580 {
11581 m_color.set(value);
11582 return *this;
11583 }
11584
11587 {
11588 m_color.set(value);
11589 return *this;
11590 }
11591
11594 {
11595 m_color.set(value);
11596 return *this;
11597 }
11598
11601 {
11602 m_color.set(value);
11603 return *this;
11604 }
11605
11608 {
11609 m_color.set(value);
11610 return *this;
11611 }
11612
11615 {
11616 m_color.set(value);
11617 return *this;
11618 }
11619
11621 const Filters &filters() const
11622 {
11623 return m_filters;
11624 }
11625
11628 {
11629 return m_filters;
11630 }
11631
11633 Processing &set(const Filters &value)
11634 {
11635 m_filters = value;
11636 return *this;
11637 }
11638
11641 {
11642 m_filters.set(value);
11643 return *this;
11644 }
11645
11648 {
11649 m_filters.set(value);
11650 return *this;
11651 }
11652
11655 {
11656 m_filters.set(value);
11657 return *this;
11658 }
11659
11662 {
11663 m_filters.set(value);
11664 return *this;
11665 }
11666
11669 {
11670 m_filters.set(value);
11671 return *this;
11672 }
11673
11676 {
11677 m_filters.set(value);
11678 return *this;
11679 }
11680
11683 {
11684 m_filters.set(value);
11685 return *this;
11686 }
11687
11690 {
11691 m_filters.set(value);
11692 return *this;
11693 }
11694
11697 {
11698 m_filters.set(value);
11699 return *this;
11700 }
11701
11704 {
11705 m_filters.set(value);
11706 return *this;
11707 }
11708
11711 {
11712 m_filters.set(value);
11713 return *this;
11714 }
11715
11718 {
11719 m_filters.set(value);
11720 return *this;
11721 }
11722
11725 {
11726 m_filters.set(value);
11727 return *this;
11728 }
11729
11732 {
11733 m_filters.set(value);
11734 return *this;
11735 }
11736
11739 {
11740 m_filters.set(value);
11741 return *this;
11742 }
11743
11746 {
11747 m_filters.set(value);
11748 return *this;
11749 }
11750
11753 {
11754 m_filters.set(value);
11755 return *this;
11756 }
11757
11760 {
11761 m_filters.set(value);
11762 return *this;
11763 }
11764
11767 {
11768 m_filters.set(value);
11769 return *this;
11770 }
11771
11774 {
11775 m_filters.set(value);
11776 return *this;
11777 }
11778
11781 {
11782 m_filters.set(value);
11783 return *this;
11784 }
11785
11788 {
11789 m_filters.set(value);
11790 return *this;
11791 }
11792
11795 {
11796 m_filters.set(value);
11797 return *this;
11798 }
11799
11802 {
11803 m_filters.set(value);
11804 return *this;
11805 }
11806
11809 {
11810 m_filters.set(value);
11811 return *this;
11812 }
11813
11816 {
11817 m_filters.set(value);
11818 return *this;
11819 }
11820
11823 {
11824 m_filters.set(value);
11825 return *this;
11826 }
11827
11830 {
11831 m_filters.set(value);
11832 return *this;
11833 }
11834
11837 {
11838 m_filters.set(value);
11839 return *this;
11840 }
11841
11844 {
11845 m_filters.set(value);
11846 return *this;
11847 }
11848
11851 {
11852 m_filters.set(value);
11853 return *this;
11854 }
11855
11858 {
11859 m_filters.set(value);
11860 return *this;
11861 }
11862
11865 {
11866 m_filters.set(value);
11867 return *this;
11868 }
11869
11872 {
11873 m_filters.set(value);
11874 return *this;
11875 }
11876
11879 {
11880 m_filters.set(value);
11881 return *this;
11882 }
11883
11886 {
11887 m_filters.set(value);
11888 return *this;
11889 }
11890
11893 {
11894 m_filters.set(value);
11895 return *this;
11896 }
11897
11900 {
11901 m_filters.set(value);
11902 return *this;
11903 }
11904
11906 const Resampling &resampling() const
11907 {
11908 return m_resampling;
11909 }
11910
11913 {
11914 return m_resampling;
11915 }
11916
11919 {
11920 m_resampling = value;
11921 return *this;
11922 }
11923
11926 {
11927 m_resampling.set(value);
11928 return *this;
11929 }
11930
11931 template<
11932 typename T,
11933 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
11935 {
11936 return m_color;
11937 }
11938
11939 template<
11940 typename T,
11941 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
11943 {
11944 return m_color.get<Settings::Processing::Color::Balance>();
11945 }
11946
11947 template<
11948 typename T,
11949 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
11950 0>
11952 {
11953 return m_color.get<Settings::Processing::Color::Balance::Blue>();
11954 }
11955
11956 template<
11957 typename T,
11958 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
11959 type = 0>
11961 {
11962 return m_color.get<Settings::Processing::Color::Balance::Green>();
11963 }
11964
11965 template<
11966 typename T,
11967 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
11968 0>
11970 {
11971 return m_color.get<Settings::Processing::Color::Balance::Red>();
11972 }
11973
11974 template<
11975 typename T,
11976 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
11977 0>
11979 {
11981 }
11982
11983 template<
11984 typename T,
11985 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
11986 type = 0>
11988 {
11990 }
11991
11992 template<
11993 typename T,
11994 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
11996 {
11997 return m_color.get<Settings::Processing::Color::Gamma>();
11998 }
11999
12000 template<
12001 typename T,
12002 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
12004 {
12005 return m_filters;
12006 }
12007
12008 template<
12009 typename T,
12010 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
12012 {
12013 return m_filters.get<Settings::Processing::Filters::Cluster>();
12014 }
12015
12016 template<
12017 typename T,
12018 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
12019 type = 0>
12021 {
12023 }
12024
12025 template<
12026 typename T,
12027 typename std::enable_if<
12028 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
12029 int>::type = 0>
12031 {
12033 }
12034
12035 template<
12036 typename T,
12037 typename std::enable_if<
12038 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
12039 int>::type = 0>
12041 {
12043 }
12044
12045 template<
12046 typename T,
12047 typename std::enable_if<
12048 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
12049 int>::type = 0>
12051 {
12053 }
12054
12055 template<
12056 typename T,
12057 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
12058 type = 0>
12060 {
12062 }
12063
12064 template<
12065 typename T,
12066 typename std::enable_if<
12067 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
12068 int>::type = 0>
12070 {
12072 }
12073
12074 template<
12075 typename T,
12076 typename std::enable_if<
12077 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
12078 int>::type = 0>
12080 {
12082 }
12083
12084 template<
12085 typename T,
12086 typename std::enable_if<
12087 std::is_same<
12088 T,
12090 int>::type = 0>
12092 {
12093 return m_filters
12095 }
12096
12097 template<
12098 typename T,
12099 typename std::enable_if<
12100 std::is_same<
12101 T,
12103 int>::type = 0>
12105 {
12106 return m_filters
12108 }
12109
12110 template<
12111 typename T,
12112 typename std::enable_if<
12113 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
12114 int>::type = 0>
12116 {
12118 }
12119
12120 template<
12121 typename T,
12122 typename std::enable_if<
12123 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12124 value,
12125 int>::type = 0>
12127 {
12128 return m_filters
12130 }
12131
12132 template<
12133 typename T,
12134 typename std::enable_if<
12135 std::is_same<
12136 T,
12138 int>::type = 0>
12140 {
12141 return m_filters
12143 }
12144
12145 template<
12146 typename T,
12147 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
12149 {
12150 return m_filters.get<Settings::Processing::Filters::Hole>();
12151 }
12152
12153 template<
12154 typename T,
12155 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
12156 type = 0>
12158 {
12160 }
12161
12162 template<
12163 typename T,
12164 typename std::enable_if<
12165 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
12166 int>::type = 0>
12168 {
12170 }
12171
12172 template<
12173 typename T,
12174 typename std::enable_if<
12175 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
12176 int>::type = 0>
12178 {
12180 }
12181
12182 template<
12183 typename T,
12184 typename std::enable_if<
12185 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
12186 int>::type = 0>
12188 {
12190 }
12191
12192 template<
12193 typename T,
12194 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12196 {
12197 return m_filters.get<Settings::Processing::Filters::Noise>();
12198 }
12199
12200 template<
12201 typename T,
12202 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12203 type = 0>
12205 {
12207 }
12208
12209 template<
12210 typename T,
12211 typename std::enable_if<
12212 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
12213 int>::type = 0>
12215 {
12217 }
12218
12219 template<
12220 typename T,
12221 typename std::enable_if<
12222 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12223 int>::type = 0>
12225 {
12227 }
12228
12229 template<
12230 typename T,
12231 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12232 type = 0>
12234 {
12236 }
12237
12238 template<
12239 typename T,
12240 typename std::enable_if<
12241 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12242 int>::type = 0>
12244 {
12246 }
12247
12248 template<
12249 typename T,
12250 typename std::
12251 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12253 {
12255 }
12256
12257 template<
12258 typename T,
12259 typename std::enable_if<
12260 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12261 int>::type = 0>
12263 {
12265 }
12266
12267 template<
12268 typename T,
12269 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12271 {
12272 return m_filters.get<Settings::Processing::Filters::Outlier>();
12273 }
12274
12275 template<
12276 typename T,
12277 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12278 type = 0>
12280 {
12282 }
12283
12284 template<
12285 typename T,
12286 typename std::enable_if<
12287 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
12288 int>::type = 0>
12290 {
12292 }
12293
12294 template<
12295 typename T,
12296 typename std::enable_if<
12297 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12298 int>::type = 0>
12300 {
12302 }
12303
12304 template<
12305 typename T,
12306 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12307 0>
12309 {
12311 }
12312
12313 template<
12314 typename T,
12315 typename std::enable_if<
12316 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
12317 int>::type = 0>
12319 {
12321 }
12322
12323 template<
12324 typename T,
12325 typename std::enable_if<
12326 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
12327 int>::type = 0>
12329 {
12331 }
12332
12333 template<
12334 typename T,
12335 typename std::enable_if<
12336 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
12337 int>::type = 0>
12339 {
12341 }
12342
12343 template<
12344 typename T,
12345 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12346 0>
12348 {
12350 }
12351
12352 template<
12353 typename T,
12354 typename std::enable_if<
12355 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
12356 int>::type = 0>
12358 {
12360 }
12361
12362 template<
12363 typename T,
12364 typename std::enable_if<
12365 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
12366 int>::type = 0>
12368 {
12370 }
12371
12372 template<
12373 typename T,
12374 typename std::enable_if<
12375 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12376 int>::type = 0>
12378 {
12380 }
12381
12382 template<
12383 typename T,
12384 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
12386 {
12387 return m_resampling;
12388 }
12389
12390 template<
12391 typename T,
12392 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
12394 {
12395 return m_resampling.get<Settings::Processing::Resampling::Mode>();
12396 }
12397
12398 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12400 {
12401 return m_color;
12402 }
12403
12404 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12406 {
12407 return m_filters;
12408 }
12409
12410 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
12412 {
12413 return m_resampling;
12414 }
12415
12417 template<typename F>
12418 void forEach(const F &f) const
12419 {
12420 f(m_color);
12421 f(m_filters);
12422 f(m_resampling);
12423 }
12424
12426 template<typename F>
12427 void forEach(const F &f)
12428 {
12429 f(m_color);
12430 f(m_filters);
12431 f(m_resampling);
12432 }
12433
12435 bool operator==(const Processing &other) const;
12436
12438 bool operator!=(const Processing &other) const;
12439
12441 std::string toString() const;
12442
12444 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12445 {
12446 return stream << value.toString();
12447 }
12448
12449 private:
12450 void setFromString(const std::string &value);
12451
12452 void setFromString(const std::string &fullPath, const std::string &value);
12453
12454 std::string getString(const std::string &fullPath) const;
12455
12456 Color m_color;
12457 Filters m_filters;
12458 Resampling m_resampling;
12459
12460 friend struct DataModel::Detail::Befriend<Processing>;
12461 };
12462
12465
12466 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12468 {
12469 public:
12471 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12472
12474 static constexpr const char *path{ "RegionOfInterest" };
12475
12477 static constexpr const char *name{ "RegionOfInterest" };
12478
12480 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12481)description" };
12482
12499
12500 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12502 {
12503 public:
12505 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12506
12508 static constexpr const char *path{ "RegionOfInterest/Box" };
12509
12511 static constexpr const char *name{ "Box" };
12512
12514 static constexpr const char *description{
12515 R"description(Removes points outside the given three-dimensional box.
12516
12517Using this feature may significantly speed up acquisition and processing time, because
12518one can avoid acquiring and processing data that is guaranteed to fall outside of the
12519region of interest. The degree of speed-up depends on the size and shape of the box.
12520Generally, a smaller box yields a greater speed-up.
12521
12522The box is defined by three points: O, A and B. These points define two vectors,
12523OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12524This gives 4 points O, A, B and (O + OA + OB), that together form a
12525parallelogram in 3D.
12526
12527Two extents can be provided, to extrude the parallelogram along the surface
12528normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12529The surface normal vector is defined by the cross product OA x OB.
12530)description"
12531 };
12532
12534
12535 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12537 {
12538 public:
12540 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12541
12543 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12544
12546 static constexpr const char *name{ "Enabled" };
12547
12549 static constexpr const char *description{
12550 R"description(Enable or disable box filter.)description"
12551 };
12552
12554 using ValueType = bool;
12555 static const Enabled yes;
12556 static const Enabled no;
12557
12559 static std::set<bool> validValues()
12560 {
12561 return { false, true };
12562 }
12563
12565 Enabled() = default;
12566
12568 explicit constexpr Enabled(bool value)
12569 : m_opt{ value }
12570 {}
12571
12576 bool value() const;
12577
12579 bool hasValue() const;
12580
12582 void reset();
12583
12585 std::string toString() const;
12586
12588 bool operator==(const Enabled &other) const
12589 {
12590 return m_opt == other.m_opt;
12591 }
12592
12594 bool operator!=(const Enabled &other) const
12595 {
12596 return m_opt != other.m_opt;
12597 }
12598
12600 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12601 {
12602 return stream << value.toString();
12603 }
12604
12605 private:
12606 void setFromString(const std::string &value);
12607
12608 Zivid::DataModel::Detail::Optional<bool> m_opt;
12609
12610 friend struct DataModel::Detail::Befriend<Enabled>;
12611 };
12612
12614
12615 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12617 {
12618 public:
12620 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12621
12623 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12624
12626 static constexpr const char *name{ "Extents" };
12627
12629 static constexpr const char *description{
12630 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12631 };
12632
12635
12637 Extents() = default;
12638
12640 explicit constexpr Extents(Zivid::Range<double> value)
12641 : m_opt{ value }
12642 {}
12643
12649
12651 bool hasValue() const;
12652
12654 void reset();
12655
12657 std::string toString() const;
12658
12660 explicit constexpr Extents(double minValue, double maxValue)
12661 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12662 {}
12663
12665 bool operator==(const Extents &other) const
12666 {
12667 return m_opt == other.m_opt;
12668 }
12669
12671 bool operator!=(const Extents &other) const
12672 {
12673 return m_opt != other.m_opt;
12674 }
12675
12677 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12678 {
12679 return stream << value.toString();
12680 }
12681
12682 private:
12683 void setFromString(const std::string &value);
12684
12685 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
12686
12687 friend struct DataModel::Detail::Befriend<Extents>;
12688 };
12689
12691
12692 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12694 {
12695 public:
12697 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12698
12700 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12701
12703 static constexpr const char *name{ "PointA" };
12704
12706 static constexpr const char *description{
12707 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram.)description"
12708 };
12709
12712
12714 PointA() = default;
12715
12717 explicit constexpr PointA(Zivid::PointXYZ value)
12718 : m_opt{ value }
12719 {}
12720
12726
12728 bool hasValue() const;
12729
12731 void reset();
12732
12734 std::string toString() const;
12735
12737 explicit constexpr PointA(float x, float y, float z)
12738 : PointA{ Zivid::PointXYZ{ x, y, z } }
12739 {}
12740
12742 bool operator==(const PointA &other) const
12743 {
12744 return m_opt == other.m_opt;
12745 }
12746
12748 bool operator!=(const PointA &other) const
12749 {
12750 return m_opt != other.m_opt;
12751 }
12752
12754 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12755 {
12756 return stream << value.toString();
12757 }
12758
12759 private:
12760 void setFromString(const std::string &value);
12761
12762 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12763
12764 friend struct DataModel::Detail::Befriend<PointA>;
12765 };
12766
12768
12769 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12771 {
12772 public:
12774 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12775
12777 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12778
12780 static constexpr const char *name{ "PointB" };
12781
12783 static constexpr const char *description{
12784 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram.)description"
12785 };
12786
12789
12791 PointB() = default;
12792
12794 explicit constexpr PointB(Zivid::PointXYZ value)
12795 : m_opt{ value }
12796 {}
12797
12803
12805 bool hasValue() const;
12806
12808 void reset();
12809
12811 std::string toString() const;
12812
12814 explicit constexpr PointB(float x, float y, float z)
12815 : PointB{ Zivid::PointXYZ{ x, y, z } }
12816 {}
12817
12819 bool operator==(const PointB &other) const
12820 {
12821 return m_opt == other.m_opt;
12822 }
12823
12825 bool operator!=(const PointB &other) const
12826 {
12827 return m_opt != other.m_opt;
12828 }
12829
12831 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
12832 {
12833 return stream << value.toString();
12834 }
12835
12836 private:
12837 void setFromString(const std::string &value);
12838
12839 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12840
12841 friend struct DataModel::Detail::Befriend<PointB>;
12842 };
12843
12845
12846 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12848 {
12849 public:
12851 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12852
12854 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
12855
12857 static constexpr const char *name{ "PointO" };
12858
12860 static constexpr const char *description{
12861 R"description(The point at the intersection of two adjacent edges defining a parallelogram.)description"
12862 };
12863
12866
12868 PointO() = default;
12869
12871 explicit constexpr PointO(Zivid::PointXYZ value)
12872 : m_opt{ value }
12873 {}
12874
12880
12882 bool hasValue() const;
12883
12885 void reset();
12886
12888 std::string toString() const;
12889
12891 explicit constexpr PointO(float x, float y, float z)
12892 : PointO{ Zivid::PointXYZ{ x, y, z } }
12893 {}
12894
12896 bool operator==(const PointO &other) const
12897 {
12898 return m_opt == other.m_opt;
12899 }
12900
12902 bool operator!=(const PointO &other) const
12903 {
12904 return m_opt != other.m_opt;
12905 }
12906
12908 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
12909 {
12910 return stream << value.toString();
12911 }
12912
12913 private:
12914 void setFromString(const std::string &value);
12915
12916 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12917
12918 friend struct DataModel::Detail::Befriend<PointO>;
12919 };
12920
12921 using Descendants = std::tuple<
12927
12930
12946#ifndef NO_DOC
12947 template<
12948 typename... Args,
12949 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
12950 typename std::enable_if<
12951 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
12952 value,
12953 int>::type = 0>
12954#else
12955 template<typename... Args>
12956#endif
12957 explicit Box(Args &&...args)
12958 {
12959 using namespace Zivid::Detail::TypeTraits;
12960
12961 static_assert(
12962 AllArgsDecayedAreUnique<Args...>::value,
12963 "Found duplicate types among the arguments passed to Box(...). "
12964 "Types should be listed at most once.");
12965
12966 set(std::forward<Args>(args)...);
12967 }
12968
12983#ifndef NO_DOC
12984 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
12985#else
12986 template<typename... Args>
12987#endif
12988 void set(Args &&...args)
12989 {
12990 using namespace Zivid::Detail::TypeTraits;
12991
12992 using AllArgsAreDescendantNodes =
12993 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
12994 static_assert(
12995 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
12996
12997 static_assert(
12998 AllArgsDecayedAreUnique<Args...>::value,
12999 "Found duplicate types among the arguments passed to set(...). "
13000 "Types should be listed at most once.");
13001
13002 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13003 }
13004
13020#ifndef NO_DOC
13021 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13022#else
13023 template<typename... Args>
13024#endif
13025 Box copyWith(Args &&...args) const
13026 {
13027 using namespace Zivid::Detail::TypeTraits;
13028
13029 using AllArgsAreDescendantNodes =
13030 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13031 static_assert(
13032 AllArgsAreDescendantNodes::value,
13033 "All arguments passed to copyWith(...) must be descendant nodes.");
13034
13035 static_assert(
13036 AllArgsDecayedAreUnique<Args...>::value,
13037 "Found duplicate types among the arguments passed to copyWith(...). "
13038 "Types should be listed at most once.");
13039
13040 auto copy{ *this };
13041 copy.set(std::forward<Args>(args)...);
13042 return copy;
13043 }
13044
13046 const Enabled &isEnabled() const
13047 {
13048 return m_enabled;
13049 }
13050
13053 {
13054 return m_enabled;
13055 }
13056
13058 Box &set(const Enabled &value)
13059 {
13060 m_enabled = value;
13061 return *this;
13062 }
13063
13065 const Extents &extents() const
13066 {
13067 return m_extents;
13068 }
13069
13072 {
13073 return m_extents;
13074 }
13075
13077 Box &set(const Extents &value)
13078 {
13079 m_extents = value;
13080 return *this;
13081 }
13082
13084 const PointA &pointA() const
13085 {
13086 return m_pointA;
13087 }
13088
13091 {
13092 return m_pointA;
13093 }
13094
13096 Box &set(const PointA &value)
13097 {
13098 m_pointA = value;
13099 return *this;
13100 }
13101
13103 const PointB &pointB() const
13104 {
13105 return m_pointB;
13106 }
13107
13110 {
13111 return m_pointB;
13112 }
13113
13115 Box &set(const PointB &value)
13116 {
13117 m_pointB = value;
13118 return *this;
13119 }
13120
13122 const PointO &pointO() const
13123 {
13124 return m_pointO;
13125 }
13126
13129 {
13130 return m_pointO;
13131 }
13132
13134 Box &set(const PointO &value)
13135 {
13136 m_pointO = value;
13137 return *this;
13138 }
13139
13140 template<
13141 typename T,
13142 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
13143 type = 0>
13145 {
13146 return m_enabled;
13147 }
13148
13149 template<
13150 typename T,
13151 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
13152 type = 0>
13154 {
13155 return m_extents;
13156 }
13157
13158 template<
13159 typename T,
13160 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13161 type = 0>
13163 {
13164 return m_pointA;
13165 }
13166
13167 template<
13168 typename T,
13169 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13170 type = 0>
13172 {
13173 return m_pointB;
13174 }
13175
13176 template<
13177 typename T,
13178 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13179 type = 0>
13181 {
13182 return m_pointO;
13183 }
13184
13185 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13187 {
13188 return m_enabled;
13189 }
13190
13191 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13193 {
13194 return m_extents;
13195 }
13196
13197 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13199 {
13200 return m_pointA;
13201 }
13202
13203 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13205 {
13206 return m_pointB;
13207 }
13208
13209 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13211 {
13212 return m_pointO;
13213 }
13214
13216 template<typename F>
13217 void forEach(const F &f) const
13218 {
13219 f(m_enabled);
13220 f(m_extents);
13221 f(m_pointA);
13222 f(m_pointB);
13223 f(m_pointO);
13224 }
13225
13227 template<typename F>
13228 void forEach(const F &f)
13229 {
13230 f(m_enabled);
13231 f(m_extents);
13232 f(m_pointA);
13233 f(m_pointB);
13234 f(m_pointO);
13235 }
13236
13238 bool operator==(const Box &other) const;
13239
13241 bool operator!=(const Box &other) const;
13242
13244 std::string toString() const;
13245
13247 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13248 {
13249 return stream << value.toString();
13250 }
13251
13252 private:
13253 void setFromString(const std::string &value);
13254
13255 void setFromString(const std::string &fullPath, const std::string &value);
13256
13257 std::string getString(const std::string &fullPath) const;
13258
13259 Enabled m_enabled;
13260 Extents m_extents;
13261 PointA m_pointA;
13262 PointB m_pointB;
13263 PointO m_pointO;
13264
13265 friend struct DataModel::Detail::Befriend<Box>;
13266 };
13267
13271
13272 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13274 {
13275 public:
13277 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13278
13280 static constexpr const char *path{ "RegionOfInterest/Depth" };
13281
13283 static constexpr const char *name{ "Depth" };
13284
13286 static constexpr const char *description{
13287 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13288falls above a given maximum or below a given minimum.
13289)description"
13290 };
13291
13293
13294 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13296 {
13297 public:
13299 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13300
13302 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13303
13305 static constexpr const char *name{ "Enabled" };
13306
13308 static constexpr const char *description{
13309 R"description(Enable or disable depth filter.)description"
13310 };
13311
13313 using ValueType = bool;
13314 static const Enabled yes;
13315 static const Enabled no;
13316
13318 static std::set<bool> validValues()
13319 {
13320 return { false, true };
13321 }
13322
13324 Enabled() = default;
13325
13327 explicit constexpr Enabled(bool value)
13328 : m_opt{ value }
13329 {}
13330
13335 bool value() const;
13336
13338 bool hasValue() const;
13339
13341 void reset();
13342
13344 std::string toString() const;
13345
13347 bool operator==(const Enabled &other) const
13348 {
13349 return m_opt == other.m_opt;
13350 }
13351
13353 bool operator!=(const Enabled &other) const
13354 {
13355 return m_opt != other.m_opt;
13356 }
13357
13359 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13360 {
13361 return stream << value.toString();
13362 }
13363
13364 private:
13365 void setFromString(const std::string &value);
13366
13367 Zivid::DataModel::Detail::Optional<bool> m_opt;
13368
13369 friend struct DataModel::Detail::Befriend<Enabled>;
13370 };
13371
13373
13374 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13376 {
13377 public:
13379 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13380
13382 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13383
13385 static constexpr const char *name{ "Range" };
13386
13388 static constexpr const char *description{
13389 R"description(Specify the minimum and maximum Z value that will be included.)description"
13390 };
13391
13394
13396 Range() = default;
13397
13399 explicit constexpr Range(Zivid::Range<double> value)
13400 : m_opt{ value }
13401 {}
13402
13408
13410 bool hasValue() const;
13411
13413 void reset();
13414
13416 std::string toString() const;
13417
13419 explicit constexpr Range(double minValue, double maxValue)
13420 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13421 {}
13422
13424 bool operator==(const Range &other) const
13425 {
13426 return m_opt == other.m_opt;
13427 }
13428
13430 bool operator!=(const Range &other) const
13431 {
13432 return m_opt != other.m_opt;
13433 }
13434
13436 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13437 {
13438 return stream << value.toString();
13439 }
13440
13441 private:
13442 void setFromString(const std::string &value);
13443
13444 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
13445
13446 friend struct DataModel::Detail::Befriend<Range>;
13447 };
13448
13450 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13451
13454
13467#ifndef NO_DOC
13468 template<
13469 typename... Args,
13470 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13471 typename std::enable_if<
13472 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13473 value,
13474 int>::type = 0>
13475#else
13476 template<typename... Args>
13477#endif
13478 explicit Depth(Args &&...args)
13479 {
13480 using namespace Zivid::Detail::TypeTraits;
13481
13482 static_assert(
13483 AllArgsDecayedAreUnique<Args...>::value,
13484 "Found duplicate types among the arguments passed to Depth(...). "
13485 "Types should be listed at most once.");
13486
13487 set(std::forward<Args>(args)...);
13488 }
13489
13501#ifndef NO_DOC
13502 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13503#else
13504 template<typename... Args>
13505#endif
13506 void set(Args &&...args)
13507 {
13508 using namespace Zivid::Detail::TypeTraits;
13509
13510 using AllArgsAreDescendantNodes =
13511 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13512 static_assert(
13513 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13514
13515 static_assert(
13516 AllArgsDecayedAreUnique<Args...>::value,
13517 "Found duplicate types among the arguments passed to set(...). "
13518 "Types should be listed at most once.");
13519
13520 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13521 }
13522
13535#ifndef NO_DOC
13536 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13537#else
13538 template<typename... Args>
13539#endif
13540 Depth copyWith(Args &&...args) const
13541 {
13542 using namespace Zivid::Detail::TypeTraits;
13543
13544 using AllArgsAreDescendantNodes =
13545 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13546 static_assert(
13547 AllArgsAreDescendantNodes::value,
13548 "All arguments passed to copyWith(...) must be descendant nodes.");
13549
13550 static_assert(
13551 AllArgsDecayedAreUnique<Args...>::value,
13552 "Found duplicate types among the arguments passed to copyWith(...). "
13553 "Types should be listed at most once.");
13554
13555 auto copy{ *this };
13556 copy.set(std::forward<Args>(args)...);
13557 return copy;
13558 }
13559
13561 const Enabled &isEnabled() const
13562 {
13563 return m_enabled;
13564 }
13565
13568 {
13569 return m_enabled;
13570 }
13571
13573 Depth &set(const Enabled &value)
13574 {
13575 m_enabled = value;
13576 return *this;
13577 }
13578
13580 const Range &range() const
13581 {
13582 return m_range;
13583 }
13584
13587 {
13588 return m_range;
13589 }
13590
13592 Depth &set(const Range &value)
13593 {
13594 m_range = value;
13595 return *this;
13596 }
13597
13598 template<
13599 typename T,
13600 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13601 type = 0>
13603 {
13604 return m_enabled;
13605 }
13606
13607 template<
13608 typename T,
13609 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13610 type = 0>
13612 {
13613 return m_range;
13614 }
13615
13616 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13618 {
13619 return m_enabled;
13620 }
13621
13622 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13624 {
13625 return m_range;
13626 }
13627
13629 template<typename F>
13630 void forEach(const F &f) const
13631 {
13632 f(m_enabled);
13633 f(m_range);
13634 }
13635
13637 template<typename F>
13638 void forEach(const F &f)
13639 {
13640 f(m_enabled);
13641 f(m_range);
13642 }
13643
13645 bool operator==(const Depth &other) const;
13646
13648 bool operator!=(const Depth &other) const;
13649
13651 std::string toString() const;
13652
13654 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13655 {
13656 return stream << value.toString();
13657 }
13658
13659 private:
13660 void setFromString(const std::string &value);
13661
13662 void setFromString(const std::string &fullPath, const std::string &value);
13663
13664 std::string getString(const std::string &fullPath) const;
13665
13666 Enabled m_enabled;
13667 Range m_range;
13668
13669 friend struct DataModel::Detail::Befriend<Depth>;
13670 };
13671
13672 using Descendants = std::tuple<
13682
13685
13705#ifndef NO_DOC
13706 template<
13707 typename... Args,
13708 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13709 typename std::enable_if<
13710 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13711 value,
13712 int>::type = 0>
13713#else
13714 template<typename... Args>
13715#endif
13716 explicit RegionOfInterest(Args &&...args)
13717 {
13718 using namespace Zivid::Detail::TypeTraits;
13719
13720 static_assert(
13721 AllArgsDecayedAreUnique<Args...>::value,
13722 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13723 "Types should be listed at most once.");
13724
13725 set(std::forward<Args>(args)...);
13726 }
13727
13746#ifndef NO_DOC
13747 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13748#else
13749 template<typename... Args>
13750#endif
13751 void set(Args &&...args)
13752 {
13753 using namespace Zivid::Detail::TypeTraits;
13754
13755 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13756 static_assert(
13757 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13758
13759 static_assert(
13760 AllArgsDecayedAreUnique<Args...>::value,
13761 "Found duplicate types among the arguments passed to set(...). "
13762 "Types should be listed at most once.");
13763
13764 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13765 }
13766
13786#ifndef NO_DOC
13787 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13788#else
13789 template<typename... Args>
13790#endif
13791 RegionOfInterest copyWith(Args &&...args) const
13792 {
13793 using namespace Zivid::Detail::TypeTraits;
13794
13795 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13796 static_assert(
13797 AllArgsAreDescendantNodes::value,
13798 "All arguments passed to copyWith(...) must be descendant nodes.");
13799
13800 static_assert(
13801 AllArgsDecayedAreUnique<Args...>::value,
13802 "Found duplicate types among the arguments passed to copyWith(...). "
13803 "Types should be listed at most once.");
13804
13805 auto copy{ *this };
13806 copy.set(std::forward<Args>(args)...);
13807 return copy;
13808 }
13809
13811 const Box &box() const
13812 {
13813 return m_box;
13814 }
13815
13818 {
13819 return m_box;
13820 }
13821
13823 RegionOfInterest &set(const Box &value)
13824 {
13825 m_box = value;
13826 return *this;
13827 }
13828
13831 {
13832 m_box.set(value);
13833 return *this;
13834 }
13835
13838 {
13839 m_box.set(value);
13840 return *this;
13841 }
13842
13845 {
13846 m_box.set(value);
13847 return *this;
13848 }
13849
13852 {
13853 m_box.set(value);
13854 return *this;
13855 }
13856
13859 {
13860 m_box.set(value);
13861 return *this;
13862 }
13863
13865 const Depth &depth() const
13866 {
13867 return m_depth;
13868 }
13869
13872 {
13873 return m_depth;
13874 }
13875
13878 {
13879 m_depth = value;
13880 return *this;
13881 }
13882
13885 {
13886 m_depth.set(value);
13887 return *this;
13888 }
13889
13892 {
13893 m_depth.set(value);
13894 return *this;
13895 }
13896
13897 template<
13898 typename T,
13899 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
13901 {
13902 return m_box;
13903 }
13904
13905 template<
13906 typename T,
13907 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
13908 0>
13910 {
13911 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
13912 }
13913
13914 template<
13915 typename T,
13916 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
13917 0>
13919 {
13920 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
13921 }
13922
13923 template<
13924 typename T,
13925 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
13927 {
13928 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
13929 }
13930
13931 template<
13932 typename T,
13933 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
13935 {
13936 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
13937 }
13938
13939 template<
13940 typename T,
13941 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
13943 {
13944 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
13945 }
13946
13947 template<
13948 typename T,
13949 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
13951 {
13952 return m_depth;
13953 }
13954
13955 template<
13956 typename T,
13957 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
13958 0>
13960 {
13961 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
13962 }
13963
13964 template<
13965 typename T,
13966 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
13967 0>
13969 {
13970 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
13971 }
13972
13973 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13975 {
13976 return m_box;
13977 }
13978
13979 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13981 {
13982 return m_depth;
13983 }
13984
13986 template<typename F>
13987 void forEach(const F &f) const
13988 {
13989 f(m_box);
13990 f(m_depth);
13991 }
13992
13994 template<typename F>
13995 void forEach(const F &f)
13996 {
13997 f(m_box);
13998 f(m_depth);
13999 }
14000
14002 bool operator==(const RegionOfInterest &other) const;
14003
14005 bool operator!=(const RegionOfInterest &other) const;
14006
14008 std::string toString() const;
14009
14011 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
14012 {
14013 return stream << value.toString();
14014 }
14015
14016 private:
14017 void setFromString(const std::string &value);
14018
14019 void setFromString(const std::string &fullPath, const std::string &value);
14020
14021 std::string getString(const std::string &fullPath) const;
14022
14023 Box m_box;
14024 Depth m_depth;
14025
14026 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
14027 };
14028
14031
14032 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14034 {
14035 public:
14037 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
14038
14040 static constexpr const char *path{ "Sampling" };
14041
14043 static constexpr const char *name{ "Sampling" };
14044
14046 static constexpr const char *description{ R"description(Sampling settings.
14047)description" };
14048
14056
14057 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14059 {
14060 public:
14062 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14063
14065 static constexpr const char *path{ "Sampling/Color" };
14066
14068 static constexpr const char *name{ "Color" };
14069
14071 static constexpr const char *description{
14072 R"description(Choose how to sample colors for the point cloud. The `rgb` option gives a 2D image
14073with full colors. The `grayscale` option gives a grayscale (r=g=b) 2D image, which
14074can be acquired faster than full colors. The `disabled` option gives no colors and
14075can allow for even faster captures.
14076
14077The `grayscale` option is not available on all camera models.
14078)description"
14079 };
14080
14082 enum class ValueType
14083 {
14084 rgb,
14085 disabled,
14086 grayscale
14087 };
14088 static const Color rgb;
14089 static const Color disabled;
14090 static const Color grayscale;
14091
14093 static std::set<ValueType> validValues()
14094 {
14095 return { ValueType::rgb, ValueType::disabled, ValueType::grayscale };
14096 }
14097
14099 Color() = default;
14100
14102 explicit constexpr Color(ValueType value)
14103 : m_opt{ verifyValue(value) }
14104 {}
14105
14111
14113 bool hasValue() const;
14114
14116 void reset();
14117
14119 std::string toString() const;
14120
14122 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
14123 {
14124 return stream << Color{ value }.toString();
14125 }
14126
14128 bool operator==(const Color &other) const
14129 {
14130 return m_opt == other.m_opt;
14131 }
14132
14134 bool operator!=(const Color &other) const
14135 {
14136 return m_opt != other.m_opt;
14137 }
14138
14140 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
14141 {
14142 return stream << value.toString();
14143 }
14144
14145 private:
14146 void setFromString(const std::string &value);
14147
14148 constexpr ValueType static verifyValue(const ValueType &value)
14149 {
14150 return value == ValueType::rgb || value == ValueType::disabled || value == ValueType::grayscale
14151 ? value
14152 : throw std::invalid_argument{
14153 "Invalid value: Color{ "
14154 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14155 };
14156 }
14157
14158 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
14159
14160 friend struct DataModel::Detail::Befriend<Color>;
14161 };
14162
14172
14173 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14175 {
14176 public:
14178 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14179
14181 static constexpr const char *path{ "Sampling/Pixel" };
14182
14184 static constexpr const char *name{ "Pixel" };
14185
14187 static constexpr const char *description{
14188 R"description(Set whether the full image sensor should be used with white projector light or
14189only specific color channels with corresponding projector light.
14190Using only a specific color channel will subsample pixels and give a
14191smaller resolution.
14192
14193Subsampling decreases the capture time, as less data will be captured and processed.
14194Picking a specific color channel can also help reduce noise and effects of ambient light.
14195Projecting blue light will in most cases give better data than red light.
14196)description"
14197 };
14198
14200 enum class ValueType
14201 {
14202 all,
14203 blueSubsample2x2,
14204 redSubsample2x2,
14205 blueSubsample4x4,
14206 redSubsample4x4
14207 };
14208 static const Pixel all;
14210 static const Pixel redSubsample2x2;
14212 static const Pixel redSubsample4x4;
14213
14215 static std::set<ValueType> validValues()
14216 {
14217 return { ValueType::all,
14218 ValueType::blueSubsample2x2,
14219 ValueType::redSubsample2x2,
14220 ValueType::blueSubsample4x4,
14221 ValueType::redSubsample4x4 };
14222 }
14223
14225 Pixel() = default;
14226
14228 explicit constexpr Pixel(ValueType value)
14229 : m_opt{ verifyValue(value) }
14230 {}
14231
14237
14239 bool hasValue() const;
14240
14242 void reset();
14243
14245 std::string toString() const;
14246
14248 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14249 {
14250 return stream << Pixel{ value }.toString();
14251 }
14252
14254 bool operator==(const Pixel &other) const
14255 {
14256 return m_opt == other.m_opt;
14257 }
14258
14260 bool operator!=(const Pixel &other) const
14261 {
14262 return m_opt != other.m_opt;
14263 }
14264
14266 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14267 {
14268 return stream << value.toString();
14269 }
14270
14271 private:
14272 void setFromString(const std::string &value);
14273
14274 constexpr ValueType static verifyValue(const ValueType &value)
14275 {
14276 return value == ValueType::all || value == ValueType::blueSubsample2x2
14277 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14278 || value == ValueType::redSubsample4x4
14279 ? value
14280 : throw std::invalid_argument{
14281 "Invalid value: Pixel{ "
14282 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14283 };
14284 }
14285
14286 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
14287
14288 friend struct DataModel::Detail::Befriend<Pixel>;
14289 };
14290
14291 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14292
14295
14308#ifndef NO_DOC
14309 template<
14310 typename... Args,
14311 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14312 typename std::enable_if<
14313 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14314 value,
14315 int>::type = 0>
14316#else
14317 template<typename... Args>
14318#endif
14319 explicit Sampling(Args &&...args)
14320 {
14321 using namespace Zivid::Detail::TypeTraits;
14322
14323 static_assert(
14324 AllArgsDecayedAreUnique<Args...>::value,
14325 "Found duplicate types among the arguments passed to Sampling(...). "
14326 "Types should be listed at most once.");
14327
14328 set(std::forward<Args>(args)...);
14329 }
14330
14342#ifndef NO_DOC
14343 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14344#else
14345 template<typename... Args>
14346#endif
14347 void set(Args &&...args)
14348 {
14349 using namespace Zivid::Detail::TypeTraits;
14350
14351 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14352 static_assert(
14353 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14354
14355 static_assert(
14356 AllArgsDecayedAreUnique<Args...>::value,
14357 "Found duplicate types among the arguments passed to set(...). "
14358 "Types should be listed at most once.");
14359
14360 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14361 }
14362
14375#ifndef NO_DOC
14376 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14377#else
14378 template<typename... Args>
14379#endif
14380 Sampling copyWith(Args &&...args) const
14381 {
14382 using namespace Zivid::Detail::TypeTraits;
14383
14384 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14385 static_assert(
14386 AllArgsAreDescendantNodes::value,
14387 "All arguments passed to copyWith(...) must be descendant nodes.");
14388
14389 static_assert(
14390 AllArgsDecayedAreUnique<Args...>::value,
14391 "Found duplicate types among the arguments passed to copyWith(...). "
14392 "Types should be listed at most once.");
14393
14394 auto copy{ *this };
14395 copy.set(std::forward<Args>(args)...);
14396 return copy;
14397 }
14398
14400 const Color &color() const
14401 {
14402 return m_color;
14403 }
14404
14407 {
14408 return m_color;
14409 }
14410
14412 Sampling &set(const Color &value)
14413 {
14414 m_color = value;
14415 return *this;
14416 }
14417
14419 const Pixel &pixel() const
14420 {
14421 return m_pixel;
14422 }
14423
14426 {
14427 return m_pixel;
14428 }
14429
14431 Sampling &set(const Pixel &value)
14432 {
14433 m_pixel = value;
14434 return *this;
14435 }
14436
14437 template<
14438 typename T,
14439 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14441 {
14442 return m_color;
14443 }
14444
14445 template<
14446 typename T,
14447 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14449 {
14450 return m_pixel;
14451 }
14452
14453 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14455 {
14456 return m_color;
14457 }
14458
14459 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14461 {
14462 return m_pixel;
14463 }
14464
14466 template<typename F>
14467 void forEach(const F &f) const
14468 {
14469 f(m_color);
14470 f(m_pixel);
14471 }
14472
14474 template<typename F>
14475 void forEach(const F &f)
14476 {
14477 f(m_color);
14478 f(m_pixel);
14479 }
14480
14482 bool operator==(const Sampling &other) const;
14483
14485 bool operator!=(const Sampling &other) const;
14486
14488 std::string toString() const;
14489
14491 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14492 {
14493 return stream << value.toString();
14494 }
14495
14496 private:
14497 void setFromString(const std::string &value);
14498
14499 void setFromString(const std::string &fullPath, const std::string &value);
14500
14501 std::string getString(const std::string &fullPath) const;
14502
14503 Color m_color;
14504 Pixel m_pixel;
14505
14506 friend struct DataModel::Detail::Befriend<Sampling>;
14507 };
14508
14509 using Descendants = std::tuple<
14577
14580
14582 explicit Settings(const std::string &fileName);
14583
14589 ZIVID_NODISCARD static Settings fromSerialized(const std::string &value);
14590
14596 std::string serialize() const;
14597
14675#ifndef NO_DOC
14676 template<
14677 typename... Args,
14678 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14679 typename std::enable_if<
14680 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14681 int>::type = 0>
14682#else
14683 template<typename... Args>
14684#endif
14685 explicit Settings(Args &&...args)
14686 {
14687 using namespace Zivid::Detail::TypeTraits;
14688
14689 static_assert(
14690 AllArgsDecayedAreUnique<Args...>::value,
14691 "Found duplicate types among the arguments passed to Settings(...). "
14692 "Types should be listed at most once.");
14693
14694 set(std::forward<Args>(args)...);
14695 }
14696
14773#ifndef NO_DOC
14774 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14775#else
14776 template<typename... Args>
14777#endif
14778 void set(Args &&...args)
14779 {
14780 using namespace Zivid::Detail::TypeTraits;
14781
14782 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14783 static_assert(
14784 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14785
14786 static_assert(
14787 AllArgsDecayedAreUnique<Args...>::value,
14788 "Found duplicate types among the arguments passed to set(...). "
14789 "Types should be listed at most once.");
14790
14791 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14792 }
14793
14871#ifndef NO_DOC
14872 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14873#else
14874 template<typename... Args>
14875#endif
14876 Settings copyWith(Args &&...args) const
14877 {
14878 using namespace Zivid::Detail::TypeTraits;
14879
14880 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14881 static_assert(
14882 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
14883
14884 static_assert(
14885 AllArgsDecayedAreUnique<Args...>::value,
14886 "Found duplicate types among the arguments passed to copyWith(...). "
14887 "Types should be listed at most once.");
14888
14889 auto copy{ *this };
14890 copy.set(std::forward<Args>(args)...);
14891 return copy;
14892 }
14893
14896 {
14897 return m_acquisitions;
14898 }
14899
14902 {
14903 return m_acquisitions;
14904 }
14905
14908 {
14909 m_acquisitions = value;
14910 return *this;
14911 }
14912
14915 {
14916 return m_diagnostics;
14917 }
14918
14921 {
14922 return m_diagnostics;
14923 }
14924
14926 Settings &set(const Diagnostics &value)
14927 {
14928 m_diagnostics = value;
14929 return *this;
14930 }
14931
14934 {
14935 m_diagnostics.set(value);
14936 return *this;
14937 }
14938
14940 const Engine &engine() const
14941 {
14942 return m_engine;
14943 }
14944
14947 {
14948 return m_engine;
14949 }
14950
14952 Settings &set(const Engine &value)
14953 {
14954 m_engine = value;
14955 return *this;
14956 }
14957
14959 const Processing &processing() const
14960 {
14961 return m_processing;
14962 }
14963
14966 {
14967 return m_processing;
14968 }
14969
14971 Settings &set(const Processing &value)
14972 {
14973 m_processing = value;
14974 return *this;
14975 }
14976
14979 {
14980 m_processing.set(value);
14981 return *this;
14982 }
14983
14986 {
14987 m_processing.set(value);
14988 return *this;
14989 }
14990
14993 {
14994 m_processing.set(value);
14995 return *this;
14996 }
14997
15000 {
15001 m_processing.set(value);
15002 return *this;
15003 }
15004
15007 {
15008 m_processing.set(value);
15009 return *this;
15010 }
15011
15014 {
15015 m_processing.set(value);
15016 return *this;
15017 }
15018
15021 {
15022 m_processing.set(value);
15023 return *this;
15024 }
15025
15028 {
15029 m_processing.set(value);
15030 return *this;
15031 }
15032
15035 {
15036 m_processing.set(value);
15037 return *this;
15038 }
15039
15042 {
15043 m_processing.set(value);
15044 return *this;
15045 }
15046
15049 {
15050 m_processing.set(value);
15051 return *this;
15052 }
15053
15056 {
15057 m_processing.set(value);
15058 return *this;
15059 }
15060
15063 {
15064 m_processing.set(value);
15065 return *this;
15066 }
15067
15070 {
15071 m_processing.set(value);
15072 return *this;
15073 }
15074
15077 {
15078 m_processing.set(value);
15079 return *this;
15080 }
15081
15084 {
15085 m_processing.set(value);
15086 return *this;
15087 }
15088
15091 {
15092 m_processing.set(value);
15093 return *this;
15094 }
15095
15098 {
15099 m_processing.set(value);
15100 return *this;
15101 }
15102
15105 {
15106 m_processing.set(value);
15107 return *this;
15108 }
15109
15112 {
15113 m_processing.set(value);
15114 return *this;
15115 }
15116
15119 {
15120 m_processing.set(value);
15121 return *this;
15122 }
15123
15126 {
15127 m_processing.set(value);
15128 return *this;
15129 }
15130
15133 {
15134 m_processing.set(value);
15135 return *this;
15136 }
15137
15140 {
15141 m_processing.set(value);
15142 return *this;
15143 }
15144
15147 {
15148 m_processing.set(value);
15149 return *this;
15150 }
15151
15154 {
15155 m_processing.set(value);
15156 return *this;
15157 }
15158
15161 {
15162 m_processing.set(value);
15163 return *this;
15164 }
15165
15168 {
15169 m_processing.set(value);
15170 return *this;
15171 }
15172
15175 {
15176 m_processing.set(value);
15177 return *this;
15178 }
15179
15182 {
15183 m_processing.set(value);
15184 return *this;
15185 }
15186
15189 {
15190 m_processing.set(value);
15191 return *this;
15192 }
15193
15196 {
15197 m_processing.set(value);
15198 return *this;
15199 }
15200
15203 {
15204 m_processing.set(value);
15205 return *this;
15206 }
15207
15210 {
15211 m_processing.set(value);
15212 return *this;
15213 }
15214
15217 {
15218 m_processing.set(value);
15219 return *this;
15220 }
15221
15224 {
15225 m_processing.set(value);
15226 return *this;
15227 }
15228
15231 {
15232 m_processing.set(value);
15233 return *this;
15234 }
15235
15238 {
15239 m_processing.set(value);
15240 return *this;
15241 }
15242
15245 {
15246 m_processing.set(value);
15247 return *this;
15248 }
15249
15252 {
15253 m_processing.set(value);
15254 return *this;
15255 }
15256
15259 {
15260 m_processing.set(value);
15261 return *this;
15262 }
15263
15266 {
15267 m_processing.set(value);
15268 return *this;
15269 }
15270
15273 {
15274 m_processing.set(value);
15275 return *this;
15276 }
15277
15280 {
15281 m_processing.set(value);
15282 return *this;
15283 }
15284
15287 {
15288 m_processing.set(value);
15289 return *this;
15290 }
15291
15294 {
15295 m_processing.set(value);
15296 return *this;
15297 }
15298
15301 {
15302 m_processing.set(value);
15303 return *this;
15304 }
15305
15308 {
15309 m_processing.set(value);
15310 return *this;
15311 }
15312
15315 {
15316 m_processing.set(value);
15317 return *this;
15318 }
15319
15322 {
15323 return m_regionOfInterest;
15324 }
15325
15328 {
15329 return m_regionOfInterest;
15330 }
15331
15334 {
15335 m_regionOfInterest = value;
15336 return *this;
15337 }
15338
15341 {
15342 m_regionOfInterest.set(value);
15343 return *this;
15344 }
15345
15348 {
15349 m_regionOfInterest.set(value);
15350 return *this;
15351 }
15352
15355 {
15356 m_regionOfInterest.set(value);
15357 return *this;
15358 }
15359
15362 {
15363 m_regionOfInterest.set(value);
15364 return *this;
15365 }
15366
15369 {
15370 m_regionOfInterest.set(value);
15371 return *this;
15372 }
15373
15376 {
15377 m_regionOfInterest.set(value);
15378 return *this;
15379 }
15380
15383 {
15384 m_regionOfInterest.set(value);
15385 return *this;
15386 }
15387
15390 {
15391 m_regionOfInterest.set(value);
15392 return *this;
15393 }
15394
15397 {
15398 m_regionOfInterest.set(value);
15399 return *this;
15400 }
15401
15403 const Sampling &sampling() const
15404 {
15405 return m_sampling;
15406 }
15407
15410 {
15411 return m_sampling;
15412 }
15413
15415 Settings &set(const Sampling &value)
15416 {
15417 m_sampling = value;
15418 return *this;
15419 }
15420
15423 {
15424 m_sampling.set(value);
15425 return *this;
15426 }
15427
15430 {
15431 m_sampling.set(value);
15432 return *this;
15433 }
15434
15435 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15437 {
15438 return m_acquisitions;
15439 }
15440
15441 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15443 {
15444 return m_diagnostics;
15445 }
15446
15447 template<
15448 typename T,
15449 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15451 {
15452 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15453 }
15454
15455 template<typename T, typename std::enable_if<std::is_same<T, Settings::Engine>::value, int>::type = 0>
15456 const Settings::Engine &get() const
15457 {
15458 return m_engine;
15459 }
15460
15461 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15463 {
15464 return m_processing;
15465 }
15466
15467 template<
15468 typename T,
15469 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15471 {
15472 return m_processing.get<Settings::Processing::Color>();
15473 }
15474
15475 template<
15476 typename T,
15477 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15479 {
15480 return m_processing.get<Settings::Processing::Color::Balance>();
15481 }
15482
15483 template<
15484 typename T,
15485 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15487 {
15488 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15489 }
15490
15491 template<
15492 typename T,
15493 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15495 {
15496 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15497 }
15498
15499 template<
15500 typename T,
15501 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15503 {
15504 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15505 }
15506
15507 template<
15508 typename T,
15509 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15511 {
15512 return m_processing.get<Settings::Processing::Color::Experimental>();
15513 }
15514
15515 template<
15516 typename T,
15517 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15518 type = 0>
15520 {
15521 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15522 }
15523
15524 template<
15525 typename T,
15526 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15528 {
15529 return m_processing.get<Settings::Processing::Color::Gamma>();
15530 }
15531
15532 template<
15533 typename T,
15534 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15536 {
15537 return m_processing.get<Settings::Processing::Filters>();
15538 }
15539
15540 template<
15541 typename T,
15542 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15544 {
15545 return m_processing.get<Settings::Processing::Filters::Cluster>();
15546 }
15547
15548 template<
15549 typename T,
15550 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15551 type = 0>
15553 {
15555 }
15556
15557 template<
15558 typename T,
15559 typename std::enable_if<
15560 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
15561 int>::type = 0>
15563 {
15565 }
15566
15567 template<
15568 typename T,
15569 typename std::enable_if<
15570 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
15571 int>::type = 0>
15573 {
15575 }
15576
15577 template<
15578 typename T,
15579 typename std::enable_if<
15580 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15581 int>::type = 0>
15583 {
15585 }
15586
15587 template<
15588 typename T,
15589 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15591 {
15592 return m_processing.get<Settings::Processing::Filters::Experimental>();
15593 }
15594
15595 template<
15596 typename T,
15597 typename std::enable_if<
15598 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
15599 int>::type = 0>
15601 {
15603 }
15604
15605 template<
15606 typename T,
15607 typename std::enable_if<
15608 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
15609 int>::type = 0>
15611 {
15613 }
15614
15615 template<
15616 typename T,
15617 typename std::enable_if<
15618 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15619 value,
15620 int>::type = 0>
15622 {
15623 return m_processing
15625 }
15626
15627 template<
15628 typename T,
15629 typename std::enable_if<
15630 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15631 value,
15632 int>::type = 0>
15634 {
15635 return m_processing
15637 }
15638
15639 template<
15640 typename T,
15641 typename std::enable_if<
15642 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15643 int>::type = 0>
15645 {
15647 }
15648
15649 template<
15650 typename T,
15651 typename std::enable_if<
15652 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15653 value,
15654 int>::type = 0>
15656 {
15657 return m_processing
15659 }
15660
15661 template<
15662 typename T,
15663 typename std::enable_if<
15664 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15665 value,
15666 int>::type = 0>
15668 {
15669 return m_processing
15671 }
15672
15673 template<
15674 typename T,
15675 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
15677 {
15678 return m_processing.get<Settings::Processing::Filters::Hole>();
15679 }
15680
15681 template<
15682 typename T,
15683 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::type = 0>
15685 {
15686 return m_processing.get<Settings::Processing::Filters::Hole::Repair>();
15687 }
15688
15689 template<
15690 typename T,
15691 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value, int>::
15692 type = 0>
15694 {
15696 }
15697
15698 template<
15699 typename T,
15700 typename std::
15701 enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value, int>::type = 0>
15703 {
15705 }
15706
15707 template<
15708 typename T,
15709 typename std::enable_if<
15710 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
15711 int>::type = 0>
15713 {
15715 }
15716
15717 template<
15718 typename T,
15719 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15721 {
15722 return m_processing.get<Settings::Processing::Filters::Noise>();
15723 }
15724
15725 template<
15726 typename T,
15727 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15728 0>
15730 {
15732 }
15733
15734 template<
15735 typename T,
15736 typename std::enable_if<
15737 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
15738 int>::type = 0>
15740 {
15742 }
15743
15744 template<
15745 typename T,
15746 typename std::enable_if<
15747 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
15748 int>::type = 0>
15750 {
15752 }
15753
15754 template<
15755 typename T,
15756 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
15757 0>
15759 {
15761 }
15762
15763 template<
15764 typename T,
15765 typename std::
15766 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
15768 {
15770 }
15771
15772 template<
15773 typename T,
15774 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
15775 type = 0>
15777 {
15779 }
15780
15781 template<
15782 typename T,
15783 typename std::enable_if<
15784 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
15785 int>::type = 0>
15787 {
15789 }
15790
15791 template<
15792 typename T,
15793 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
15795 {
15796 return m_processing.get<Settings::Processing::Filters::Outlier>();
15797 }
15798
15799 template<
15800 typename T,
15801 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
15802 type = 0>
15804 {
15806 }
15807
15808 template<
15809 typename T,
15810 typename std::enable_if<
15811 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
15812 int>::type = 0>
15814 {
15816 }
15817
15818 template<
15819 typename T,
15820 typename std::enable_if<
15821 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
15822 int>::type = 0>
15824 {
15826 }
15827
15828 template<
15829 typename T,
15830 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
15832 {
15833 return m_processing.get<Settings::Processing::Filters::Reflection>();
15834 }
15835
15836 template<
15837 typename T,
15838 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
15839 type = 0>
15841 {
15843 }
15844
15845 template<
15846 typename T,
15847 typename std::enable_if<
15848 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
15849 int>::type = 0>
15851 {
15853 }
15854
15855 template<
15856 typename T,
15857 typename std::enable_if<
15858 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
15859 int>::type = 0>
15861 {
15863 }
15864
15865 template<
15866 typename T,
15867 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
15869 {
15870 return m_processing.get<Settings::Processing::Filters::Smoothing>();
15871 }
15872
15873 template<
15874 typename T,
15875 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
15876 type = 0>
15878 {
15880 }
15881
15882 template<
15883 typename T,
15884 typename std::enable_if<
15885 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
15886 int>::type = 0>
15888 {
15890 }
15891
15892 template<
15893 typename T,
15894 typename std::enable_if<
15895 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
15896 int>::type = 0>
15898 {
15900 }
15901
15902 template<
15903 typename T,
15904 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
15906 {
15907 return m_processing.get<Settings::Processing::Resampling>();
15908 }
15909
15910 template<
15911 typename T,
15912 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
15914 {
15915 return m_processing.get<Settings::Processing::Resampling::Mode>();
15916 }
15917
15918 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
15920 {
15921 return m_regionOfInterest;
15922 }
15923
15924 template<
15925 typename T,
15926 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
15928 {
15929 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
15930 }
15931
15932 template<
15933 typename T,
15934 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
15936 {
15937 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
15938 }
15939
15940 template<
15941 typename T,
15942 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
15944 {
15945 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
15946 }
15947
15948 template<
15949 typename T,
15950 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
15952 {
15953 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
15954 }
15955
15956 template<
15957 typename T,
15958 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
15960 {
15961 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
15962 }
15963
15964 template<
15965 typename T,
15966 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
15968 {
15969 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
15970 }
15971
15972 template<
15973 typename T,
15974 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
15976 {
15977 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
15978 }
15979
15980 template<
15981 typename T,
15982 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
15984 {
15985 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
15986 }
15987
15988 template<
15989 typename T,
15990 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
15992 {
15993 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
15994 }
15995
15996 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
15998 {
15999 return m_sampling;
16000 }
16001
16002 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
16004 {
16005 return m_sampling.get<Settings::Sampling::Color>();
16006 }
16007
16008 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
16010 {
16011 return m_sampling.get<Settings::Sampling::Pixel>();
16012 }
16013
16014 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
16016 {
16017 return m_acquisitions;
16018 }
16019
16020 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
16022 {
16023 return m_diagnostics;
16024 }
16025
16026 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
16027 const Settings::Engine &get() const
16028 {
16029 return m_engine;
16030 }
16031
16032 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
16034 {
16035 return m_processing;
16036 }
16037
16038 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
16040 {
16041 return m_regionOfInterest;
16042 }
16043
16044 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
16046 {
16047 return m_sampling;
16048 }
16049
16051 template<typename F>
16052 void forEach(const F &f) const
16053 {
16054 f(m_acquisitions);
16055 f(m_diagnostics);
16056 f(m_engine);
16057 f(m_processing);
16058 f(m_regionOfInterest);
16059 f(m_sampling);
16060 }
16061
16063 template<typename F>
16064 void forEach(const F &f)
16065 {
16066 f(m_acquisitions);
16067 f(m_diagnostics);
16068 f(m_engine);
16069 f(m_processing);
16070 f(m_regionOfInterest);
16071 f(m_sampling);
16072 }
16073
16075 bool operator==(const Settings &other) const;
16076
16078 bool operator!=(const Settings &other) const;
16079
16081 std::string toString() const;
16082
16084 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
16085 {
16086 return stream << value.toString();
16087 }
16088
16090 void save(const std::string &fileName) const;
16091
16093 void load(const std::string &fileName);
16094
16095 private:
16096 void setFromString(const std::string &value);
16097
16098 void setFromString(const std::string &fullPath, const std::string &value);
16099
16100 std::string getString(const std::string &fullPath) const;
16101
16102 Acquisitions m_acquisitions;
16103 Diagnostics m_diagnostics;
16104 Engine m_engine;
16105 Processing m_processing;
16106 RegionOfInterest m_regionOfInterest;
16107 Sampling m_sampling;
16108
16109 friend struct DataModel::Detail::Befriend<Settings>;
16110 };
16111
16112#ifndef NO_DOC
16114 namespace Detail
16115 {
16116 ZIVID_CORE_EXPORT void save(const Settings &dataModel, std::ostream &ostream);
16117 ZIVID_CORE_EXPORT void load(Settings &dataModel, std::istream &istream);
16118 } // namespace Detail
16119#endif
16120
16121#ifndef NO_DOC
16122 template<>
16123 struct Settings::Version<25>
16124 {
16125 using Type = Settings;
16126 };
16127#endif
16128
16129} // namespace Zivid
16130
16131#ifdef _MSC_VER
16132# pragma warning(pop)
16133#endif
16134
16135#ifndef NO_DOC
16136# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
16137namespace std // NOLINT
16138{
16139
16140 template<>
16141 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
16142 {};
16143
16144 template<size_t i>
16145 struct tuple_element<i, Zivid::Settings::Diagnostics>
16146 {
16147 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
16148
16149 using type // NOLINT
16150 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
16151 };
16152
16153 template<>
16154 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 3>
16155 {};
16156
16157 template<size_t i>
16158 struct tuple_element<i, Zivid::Settings::Processing>
16159 {
16160 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 3");
16161
16162 using type // NOLINT
16163 = decltype(declval<Zivid::Settings::Processing>().get<i>());
16164 };
16165
16166 template<>
16167 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
16168 {};
16169
16170 template<size_t i>
16171 struct tuple_element<i, Zivid::Settings::Processing::Color>
16172 {
16173 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
16174
16175 using type // NOLINT
16176 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
16177 };
16178
16179 template<>
16180 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16181 {};
16182
16183 template<size_t i>
16184 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16185 {
16186 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16187
16188 using type // NOLINT
16189 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16190 };
16191
16192 template<>
16193 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16194 {};
16195
16196 template<size_t i>
16197 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16198 {
16199 static_assert(
16200 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16201 "Index must be less than 1");
16202
16203 using type // NOLINT
16204 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16205 };
16206
16207 template<>
16208 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 7>
16209 {};
16210
16211 template<size_t i>
16212 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16213 {
16214 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 7");
16215
16216 using type // NOLINT
16217 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16218 };
16219
16220 template<>
16221 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16222 {};
16223
16224 template<size_t i>
16225 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16226 {
16227 static_assert(
16228 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16229 "Index must be less than 1");
16230
16231 using type // NOLINT
16232 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16233 };
16234
16235 template<>
16236 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16237 {};
16238
16239 template<size_t i>
16240 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16241 {
16242 static_assert(
16243 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16244 "Index must be less than 3");
16245
16246 using type // NOLINT
16247 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16248 };
16249
16250 template<>
16251 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
16252 {};
16253
16254 template<size_t i>
16255 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16256 {
16257 static_assert(
16258 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16259 "Index must be less than 1");
16260
16261 using type // NOLINT
16262 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16263 };
16264
16265 template<>
16266 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16267 : integral_constant<size_t, 2>
16268 {};
16269
16270 template<size_t i>
16271 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16272 {
16273 static_assert(
16274 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16275 "Index must be less than 2");
16276
16277 using type // NOLINT
16278 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16279 };
16280
16281 template<>
16282 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16283 : integral_constant<size_t, 2>
16284 {};
16285
16286 template<size_t i>
16287 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16288 {
16289 static_assert(
16290 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16291 "Index must be less than 2");
16292
16293 using type // NOLINT
16294 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16295 .get<i>());
16296 };
16297
16298 template<>
16299 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16300 : integral_constant<size_t, 2>
16301 {};
16302
16303 template<size_t i>
16304 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16305 {
16306 static_assert(
16307 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16308 "Index must be less than 2");
16309
16310 using type // NOLINT
16311 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16312 .get<i>());
16313 };
16314
16315 template<>
16316 struct tuple_size<Zivid::Settings::Processing::Filters::Hole> : integral_constant<size_t, 1>
16317 {};
16318
16319 template<size_t i>
16320 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole>
16321 {
16322 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Hole>::value, "Index must be less than 1");
16323
16324 using type // NOLINT
16325 = decltype(declval<Zivid::Settings::Processing::Filters::Hole>().get<i>());
16326 };
16327
16328 template<>
16329 struct tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair> : integral_constant<size_t, 3>
16330 {};
16331
16332 template<size_t i>
16333 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole::Repair>
16334 {
16335 static_assert(
16336 i < tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair>::value,
16337 "Index must be less than 3");
16338
16339 using type // NOLINT
16340 = decltype(declval<Zivid::Settings::Processing::Filters::Hole::Repair>().get<i>());
16341 };
16342
16343 template<>
16344 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16345 {};
16346
16347 template<size_t i>
16348 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16349 {
16350 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16351
16352 using type // NOLINT
16353 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16354 };
16355
16356 template<>
16357 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16358 {};
16359
16360 template<size_t i>
16361 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16362 {
16363 static_assert(
16364 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16365 "Index must be less than 2");
16366
16367 using type // NOLINT
16368 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16369 };
16370
16371 template<>
16372 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16373 {};
16374
16375 template<size_t i>
16376 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16377 {
16378 static_assert(
16379 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16380 "Index must be less than 1");
16381
16382 using type // NOLINT
16383 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16384 };
16385
16386 template<>
16387 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16388 {};
16389
16390 template<size_t i>
16391 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16392 {
16393 static_assert(
16394 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16395 "Index must be less than 1");
16396
16397 using type // NOLINT
16398 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16399 };
16400
16401 template<>
16402 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16403 {};
16404
16405 template<size_t i>
16406 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16407 {
16408 static_assert(
16409 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16410 "Index must be less than 1");
16411
16412 using type // NOLINT
16413 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16414 };
16415
16416 template<>
16417 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16418 {};
16419
16420 template<size_t i>
16421 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16422 {
16423 static_assert(
16424 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16425 "Index must be less than 2");
16426
16427 using type // NOLINT
16428 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16429 };
16430
16431 template<>
16432 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16433 {};
16434
16435 template<size_t i>
16436 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16437 {
16438 static_assert(
16439 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16440 "Index must be less than 1");
16441
16442 using type // NOLINT
16443 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16444 };
16445
16446 template<>
16447 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16448 {};
16449
16450 template<size_t i>
16451 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16452 {
16453 static_assert(
16454 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16455 "Index must be less than 2");
16456
16457 using type // NOLINT
16458 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16459 };
16460
16461 template<>
16462 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16463 {};
16464
16465 template<size_t i>
16466 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16467 {
16468 static_assert(
16469 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16470 "Index must be less than 1");
16471
16472 using type // NOLINT
16473 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16474 };
16475
16476 template<>
16477 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16478 {};
16479
16480 template<size_t i>
16481 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16482 {
16483 static_assert(
16484 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16485 "Index must be less than 2");
16486
16487 using type // NOLINT
16488 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16489 };
16490
16491 template<>
16492 struct tuple_size<Zivid::Settings::Processing::Resampling> : integral_constant<size_t, 1>
16493 {};
16494
16495 template<size_t i>
16496 struct tuple_element<i, Zivid::Settings::Processing::Resampling>
16497 {
16498 static_assert(i < tuple_size<Zivid::Settings::Processing::Resampling>::value, "Index must be less than 1");
16499
16500 using type // NOLINT
16501 = decltype(declval<Zivid::Settings::Processing::Resampling>().get<i>());
16502 };
16503
16504 template<>
16505 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16506 {};
16507
16508 template<size_t i>
16509 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16510 {
16511 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16512
16513 using type // NOLINT
16514 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16515 };
16516
16517 template<>
16518 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16519 {};
16520
16521 template<size_t i>
16522 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16523 {
16524 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16525
16526 using type // NOLINT
16527 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16528 };
16529
16530 template<>
16531 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16532 {};
16533
16534 template<size_t i>
16535 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16536 {
16537 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16538
16539 using type // NOLINT
16540 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16541 };
16542
16543 template<>
16544 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16545 {};
16546
16547 template<size_t i>
16548 struct tuple_element<i, Zivid::Settings::Sampling>
16549 {
16550 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16551
16552 using type // NOLINT
16553 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16554 };
16555
16556 template<>
16557 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 6>
16558 {};
16559
16560 template<size_t i>
16561 struct tuple_element<i, Zivid::Settings>
16562 {
16563 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 6");
16564
16565 using type // NOLINT
16566 = decltype(declval<Zivid::Settings>().get<i>());
16567 };
16568
16569} // namespace std
16570# endif
16571#endif
16572
16573// If we have access to the DataModel library, automatically include internal DataModel
16574// header. This header is necessary for serialization and deserialization.
16575#if defined(__has_include) && !defined(NO_DOC)
16576# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16577# include "Zivid/SettingsInternal.h"
16578# endif
16579#endif
#define ZIVID_NODISCARD
Definition Attributes.h:49
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Class describing a range of values for a given type T.
Definition Range.h:73
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition Settings.h:134
bool operator<(const Aperture &other) const
Comparison operator.
Definition Settings.h:197
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream.
Definition Settings.h:221
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:209
bool operator>(const Aperture &other) const
Comparison operator.
Definition Settings.h:203
bool operator==(const Aperture &other) const
Comparison operator.
Definition Settings.h:185
bool operator>=(const Aperture &other) const
Comparison operator.
Definition Settings.h:215
bool operator!=(const Aperture &other) const
Comparison operator.
Definition Settings.h:191
Aperture()=default
Default constructor.
constexpr Aperture(double value)
Constructor.
Definition Settings.h:165
double ValueType
The type of the underlying value.
Definition Settings.h:153
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Aperture.
Definition Settings.h:156
bool hasValue() const
Check if the value is set.
Brightness controls the light output from the projector.
Definition Settings.h:257
bool operator<=(const Brightness &other) const
Comparison operator.
Definition Settings.h:340
bool operator!=(const Brightness &other) const
Comparison operator.
Definition Settings.h:322
bool operator>=(const Brightness &other) const
Comparison operator.
Definition Settings.h:346
bool operator<(const Brightness &other) const
Comparison operator.
Definition Settings.h:328
bool operator>(const Brightness &other) const
Comparison operator.
Definition Settings.h:334
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Brightness.
Definition Settings.h:287
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:352
constexpr Brightness(double value)
Constructor.
Definition Settings.h:296
bool hasValue() const
Check if the value is set.
Brightness()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:284
bool operator==(const Brightness &other) const
Comparison operator.
Definition Settings.h:316
Exposure time for each single image in the measurement. Affects frame rate.
Definition Settings.h:378
bool operator>=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:457
bool operator<(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:439
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:445
std::chrono::microseconds ValueType
The type of the underlying value.
Definition Settings.h:395
bool operator==(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:427
bool operator!=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:433
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:398
constexpr ExposureTime(std::chrono::microseconds value)
Constructor.
Definition Settings.h:407
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream.
Definition Settings.h:463
bool operator<=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:451
Analog gain in the camera.
Definition Settings.h:490
bool operator==(const Gain &other) const
Comparison operator.
Definition Settings.h:537
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream.
Definition Settings.h:573
constexpr Gain(double value)
Constructor.
Definition Settings.h:517
bool operator>=(const Gain &other) const
Comparison operator.
Definition Settings.h:567
void reset()
Reset the node to unset state.
bool operator<=(const Gain &other) const
Comparison operator.
Definition Settings.h:561
static constexpr Range< double > validRange()
The range of valid values for Gain.
Definition Settings.h:508
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:505
std::string toString() const
Get the value as string.
bool operator!=(const Gain &other) const
Comparison operator.
Definition Settings.h:543
bool operator>(const Gain &other) const
Comparison operator.
Definition Settings.h:555
bool operator<(const Gain &other) const
Comparison operator.
Definition Settings.h:549
Settings for a single acquisition.
Definition Settings.h:114
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:847
Acquisition & set(const Aperture &value)
Set Aperture.
Definition Settings.h:726
const Aperture & aperture() const
Get Aperture.
Definition Settings.h:714
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition Settings.h:595
Gain & gain()
Get Gain.
Definition Settings.h:777
const Settings::Acquisition::Aperture & get() const
Definition Settings.h:792
Brightness & brightness()
Get Brightness.
Definition Settings.h:739
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream.
Definition Settings.h:875
bool operator==(const Acquisition &other) const
Equality operator.
const Settings::Acquisition::ExposureTime & get() const
Definition Settings.h:808
bool operator!=(const Acquisition &other) const
Inequality operator.
const ExposureTime & exposureTime() const
Get ExposureTime.
Definition Settings.h:752
Acquisition & set(const Brightness &value)
Set Brightness.
Definition Settings.h:745
Acquisition & set(const ExposureTime &value)
Set ExposureTime.
Definition Settings.h:764
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:659
const Brightness & brightness() const
Get Brightness.
Definition Settings.h:733
const Settings::Acquisition::Gain & get() const
Definition Settings.h:816
Acquisition & set(const Gain &value)
Set Gain.
Definition Settings.h:783
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:694
Aperture & aperture()
Get Aperture.
Definition Settings.h:720
const Settings::Acquisition::Brightness & get() const
Definition Settings.h:800
ExposureTime & exposureTime()
Get ExposureTime.
Definition Settings.h:758
const Gain & gain() const
Get Gain.
Definition Settings.h:771
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:857
List of Acquisition objects.
Definition Settings.h:899
bool operator!=(const Acquisitions &other) const
Comparison operator.
Definition Settings.h:1037
std::vector< Settings::Acquisition >::const_iterator ConstIterator
Constant iterator type for Acquisitions.
Definition Settings.h:1016
Iterator begin() noexcept
Returns an iterator to the first element of the list.
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:998
std::vector< Settings::Acquisition >::iterator Iterator
Iterator type for Acquisitions.
Definition Settings.h:1007
const Settings::Acquisition & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list.
Acquisitions()=default
Default constructor.
Acquisitions(std::initializer_list< Settings::Acquisition > value)
Constructor.
Definition Settings.h:931
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream.
Definition Settings.h:1043
void forEach(const F &f)
Run the given function on each element in the list.
Definition Settings.h:988
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor.
Definition Settings.h:926
std::vector< Settings::Acquisition > ValueType
The type of the underlying value.
Definition Settings.h:914
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions.
Definition Settings.h:917
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 or disable diagnostics.
Definition Settings.h:1092
static const Enabled no
Off/disabled.
Definition Settings.h:1109
bool hasValue() const
Check if the value is set.
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:1112
void reset()
Reset the node to unset state.
Enabled()=default
Default constructor.
bool ValueType
The type of the underlying value.
Definition Settings.h:1107
static const Enabled yes
On/enabled.
Definition Settings.h:1108
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:1141
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:1153
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:1121
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:1147
std::string toString() const
Get the value as string.
When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when ...
Definition Settings.h:1066
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream.
Definition Settings.h:1328
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:1306
std::tuple< Settings::Diagnostics::Enabled > Descendants
Definition Settings.h:1166
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:1252
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:1313
Diagnostics()
Default constructor.
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:1278
bool operator==(const Diagnostics &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1220
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:1293
bool operator!=(const Diagnostics &other) const
Inequality operator.
Diagnostics & set(const Enabled &value)
Set Enabled.
Definition Settings.h:1284
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:1272
Set the Zivid Vision Engine to use.
Definition Settings.h:1365
std::string toString() const
Get the value as string.
bool operator==(const Engine &other) const
Comparison operator.
Definition Settings.h:1442
bool operator!=(const Engine &other) const
Comparison operator.
Definition Settings.h:1448
static const Engine omni
omni
Definition Settings.h:1404
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream.
Definition Settings.h:1454
static std::set< ValueType > validValues()
All valid values of Engine.
Definition Settings.h:1407
void reset()
Reset the node to unset state.
ValueType value() const
Get the value.
static const Engine stripe
stripe
Definition Settings.h:1403
static const Engine phase
phase
Definition Settings.h:1402
Engine()=default
Default constructor.
ValueType
The type of the underlying value.
Definition Settings.h:1397
constexpr Engine(ValueType value)
Constructor.
Definition Settings.h:1416
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:1436
Digital gain applied to blue channel.
Definition Settings.h:1537
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings.h:1622
void reset()
Reset the node to unset state.
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings.h:1586
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings.h:1616
std::string toString() const
Get the value as string.
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings.h:1598
constexpr Blue(double value)
Constructor.
Definition Settings.h:1566
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings.h:1610
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings.h:1592
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:1554
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings.h:1604
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings.h:1557
Digital gain applied to green channel.
Definition Settings.h:1649
void reset()
Reset the node to unset state.
bool operator>(const Green &other) const
Comparison operator.
Definition Settings.h:1716
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:1734
double ValueType
The type of the underlying value.
Definition Settings.h:1666
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings.h:1728
constexpr Green(double value)
Constructor.
Definition Settings.h:1678
bool operator==(const Green &other) const
Comparison operator.
Definition Settings.h:1698
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings.h:1704
std::string toString() const
Get the value as string.
bool operator<(const Green &other) const
Comparison operator.
Definition Settings.h:1710
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings.h:1669
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings.h:1722
Digital gain applied to red channel.
Definition Settings.h:1761
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings.h:1816
constexpr Red(double value)
Constructor.
Definition Settings.h:1790
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings.h:1846
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings.h:1840
double ValueType
The type of the underlying value.
Definition Settings.h:1778
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings.h:1781
bool operator==(const Red &other) const
Comparison operator.
Definition Settings.h:1810
bool operator<(const Red &other) const
Comparison operator.
Definition Settings.h:1822
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings.h:1828
bool hasValue() const
Check if the value is set.
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings.h:1834
std::string toString() const
Get the value as string.
Color balance settings.
Definition Settings.h:1519
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1930
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:2092
bool operator!=(const Balance &other) const
Inequality operator.
Balance & set(const Red &value)
Set Red.
Definition Settings.h:2037
Green & green()
Get Green.
Definition Settings.h:2012
std::string toString() const
Get the value as string.
Red & red()
Get Red.
Definition Settings.h:2031
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition Settings.h:1869
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:1966
Balance & set(const Blue &value)
Set Blue.
Definition Settings.h:1999
Blue & blue()
Get Blue.
Definition Settings.h:1993
const Red & red() const
Get Red.
Definition Settings.h:2025
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2101
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2058
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2067
Balance & set(const Green &value)
Set Green.
Definition Settings.h:2018
const Green & green() const
Get Green.
Definition Settings.h:2006
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings.h:2118
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2048
const Blue & blue() const
Get Blue.
Definition Settings.h:1987
This setting controls how the color image is computed.
Definition Settings.h:2182
static const Mode toneMapping
toneMapping
Definition Settings.h:2228
std::string toString() const
Get the value as string.
static const Mode automatic
automatic
Definition Settings.h:2226
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:2278
void reset()
Reset the node to unset state.
static const Mode useFirstAcquisition
useFirstAcquisition
Definition Settings.h:2227
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:2272
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:2266
ValueType
The type of the underlying value.
Definition Settings.h:2221
bool hasValue() const
Check if the value is set.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:2240
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:2231
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:2260
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition Settings.h:2141
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition Settings.h:2303
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:2470
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2455
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2357
std::string toString() const
Get the value as string.
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:2424
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:2448
bool operator==(const Experimental &other) const
Equality operator.
Mode & mode()
Get Mode.
Definition Settings.h:2418
const Mode & mode() const
Get Mode.
Definition Settings.h:2412
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2435
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:2391
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings.h:2493
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings.h:2580
double value() const
Get the value.
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings.h:2562
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings.h:2515
Gamma()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:2512
bool hasValue() const
Check if the value is set.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2574
constexpr Gamma(double value)
Constructor.
Definition Settings.h:2524
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2550
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings.h:2556
std::string toString() const
Get the value as string.
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings.h:2544
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2568
Color settings.
Definition Settings.h:1501
Color & set(const Gamma &value)
Set Gamma.
Definition Settings.h:2813
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:2877
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2850
bool operator==(const Color &other) const
Equality operator.
Color & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:2794
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2841
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2675
Color & set(const Experimental &value)
Set Experimental.
Definition Settings.h:2787
Color & set(const Balance &value)
Set Balance.
Definition Settings.h:2747
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings.h:2928
const Balance & balance() const
Get Balance.
Definition Settings.h:2735
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:2775
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2911
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:2859
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings.h:2761
Experimental & experimental()
Get Experimental.
Definition Settings.h:2781
std::string toString() const
Get the value as string.
bool operator!=(const Color &other) const
Inequality operator.
std::tuple< Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma > Descendants
Definition Settings.h:2602
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings.h:2754
Gamma & gamma()
Get Gamma.
Definition Settings.h:2807
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:2714
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2869
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings.h:2768
const Gamma & gamma() const
Get Gamma.
Definition Settings.h:2801
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:2823
Balance & balance()
Get Balance.
Definition Settings.h:2741
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:2902
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2832
Enable or disable cluster removal.
Definition Settings.h:3009
bool ValueType
The type of the underlying value.
Definition Settings.h:3026
static const Enabled no
Off/disabled.
Definition Settings.h:3028
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3040
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3031
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3066
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3072
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3060
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:3027
Maximum normalized distance between neighboring points that are still classified as belonging to the ...
Definition Settings.h:3092
constexpr MaxNeighborDistance(double value)
Constructor.
Definition Settings.h:3126
bool operator!=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3152
double ValueType
The type of the underlying value.
Definition Settings.h:3114
bool operator>=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3176
bool operator<(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3158
static constexpr Range< double > validRange()
The range of valid values for MaxNeighborDistance.
Definition Settings.h:3117
bool operator<=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3170
friend std::ostream & operator<<(std::ostream &stream, const MaxNeighborDistance &value)
Operator to serialize the value to a stream.
Definition Settings.h:3182
bool operator==(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3146
bool operator>(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3164
Clusters with area below this threshold are removed by the filter. The area is given in mm^2.
Definition Settings.h:3211
bool operator>=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3292
double ValueType
The type of the underlying value.
Definition Settings.h:3230
friend std::ostream & operator<<(std::ostream &stream, const MinArea &value)
Operator to serialize the value to a stream.
Definition Settings.h:3298
bool operator<(const MinArea &other) const
Comparison operator.
Definition Settings.h:3274
bool operator!=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3268
bool operator<=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3286
constexpr MinArea(double value)
Constructor.
Definition Settings.h:3242
std::string toString() const
Get the value as string.
bool operator>(const MinArea &other) const
Comparison operator.
Definition Settings.h:3280
static constexpr Range< double > validRange()
The range of valid values for MinArea.
Definition Settings.h:3233
bool operator==(const MinArea &other) const
Comparison operator.
Definition Settings.h:3262
Cluster removal filter.
Definition Settings.h:2991
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:3572
const MaxNeighborDistance & maxNeighborDistance() const
Get MaxNeighborDistance.
Definition Settings.h:3458
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:3439
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3511
std::string toString() const
Get the value as string.
MinArea & minArea()
Get MinArea.
Definition Settings.h:3483
const MinArea & minArea() const
Get MinArea.
Definition Settings.h:3477
bool operator!=(const Removal &other) const
Inequality operator.
std::tuple< Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea > Descendants
Definition Settings.h:3321
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:3418
Removal & set(const MaxNeighborDistance &value)
Set MaxNeighborDistance.
Definition Settings.h:3470
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3521
Removal & set(const MinArea &value)
Set MinArea.
Definition Settings.h:3489
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:3546
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3500
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:3445
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3382
bool operator==(const Removal &other) const
Equality operator.
MaxNeighborDistance & maxNeighborDistance()
Get MaxNeighborDistance.
Definition Settings.h:3464
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3555
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:3451
Removes floating points and isolated clusters from the point cloud.
Definition Settings.h:2970
const Removal & removal() const
Get Removal.
Definition Settings.h:3713
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3788
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:3757
Cluster & set(const Removal::MaxNeighborDistance &value)
Set Removal::MaxNeighborDistance.
Definition Settings.h:3739
bool operator!=(const Cluster &other) const
Inequality operator.
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3778
bool operator==(const Cluster &other) const
Equality operator.
std::tuple< Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea > Descendants
Definition Settings.h:3591
Cluster copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:3692
Removal & removal()
Get Removal.
Definition Settings.h:3719
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3808
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:3801
Cluster & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:3732
Cluster & set(const Removal &value)
Set Removal.
Definition Settings.h:3725
Cluster & set(const Removal::MinArea &value)
Set Removal::MinArea.
Definition Settings.h:3746
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3767
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3655
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Cluster &value)
Operator to send the value as string to a stream.
Definition Settings.h:3823
Enable or disable contrast distortion correction.
Definition Settings.h:3914
bool ValueType
The type of the underlying value.
Definition Settings.h:3933
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3938
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3947
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3979
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3967
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3973
Strength of correction. Higher values give more correction.
Definition Settings.h:3996
double ValueType
The type of the underlying value.
Definition Settings.h:4015
bool operator>(const Strength &other) const
Comparison operator.
Definition Settings.h:4065
bool operator!=(const Strength &other) const
Comparison operator.
Definition Settings.h:4053
constexpr Strength(double value)
Constructor.
Definition Settings.h:4027
static constexpr Range< double > validRange()
The range of valid values for Strength.
Definition Settings.h:4018
bool operator<=(const Strength &other) const
Comparison operator.
Definition Settings.h:4071
bool operator>=(const Strength &other) const
Comparison operator.
Definition Settings.h:4077
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream.
Definition Settings.h:4083
bool operator<(const Strength &other) const
Comparison operator.
Definition Settings.h:4059
bool operator==(const Strength &other) const
Comparison operator.
Definition Settings.h:4047
Contrast distortion correction filter.
Definition Settings.h:3892
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:4303
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4220
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:4281
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:4199
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:4266
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:4327
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4164
Correction & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4232
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4311
Correction & set(const Strength &value)
Set Strength.
Definition Settings.h:4251
const Strength & strength() const
Get Strength.
Definition Settings.h:4239
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition Settings.h:4106
Enable or disable contrast distortion removal.
Definition Settings.h:4371
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4404
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4430
bool ValueType
The type of the underlying value.
Definition Settings.h:4390
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4395
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4436
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4424
static const Enabled no
Off/disabled.
Definition Settings.h:4392
Threshold for removal. Higher values remove more points.
Definition Settings.h:4453
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4528
constexpr Threshold(double value)
Constructor.
Definition Settings.h:4484
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4510
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:4516
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:4475
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:4504
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4534
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:4522
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:4540
double ValueType
The type of the underlying value.
Definition Settings.h:4472
Contrast distortion removal filter.
Definition Settings.h:4349
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:4758
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:4563
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4621
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:4782
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:4696
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:4708
bool operator!=(const Removal &other) const
Inequality operator.
bool operator==(const Removal &other) const
Equality 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:4656
Threshold & threshold()
Get Threshold.
Definition Settings.h:4702
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4689
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:4723
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4677
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:4737
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4766
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition Settings.h:3868
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:4982
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled.
Definition Settings.h:4949
ContrastDistortion & set(const Correction &value)
Set Correction.
Definition Settings.h:4942
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:5093
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:5117
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:4909
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:4800
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength.
Definition Settings.h:4956
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4870
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5101
ContrastDistortion & set(const Removal &value)
Set Removal.
Definition Settings.h:4975
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5072
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5044
const Removal & removal() const
Get Removal.
Definition Settings.h:4963
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5016
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5002
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5031
Removal & removal()
Get Removal.
Definition Settings.h:4969
bool operator==(const ContrastDistortion &other) const
Equality operator.
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:4989
const Correction & correction() const
Get Correction.
Definition Settings.h:4930
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5057
Correction & correction()
Get Correction.
Definition Settings.h:4936
Experimental filters. These may be renamed, moved or deleted in the future.
Definition Settings.h:3844
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5438
ContrastDistortion & contrastDistortion()
Get ContrastDistortion.
Definition Settings.h:5275
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5388
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:5248
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion.
Definition Settings.h:5281
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold.
Definition Settings.h:5323
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5208
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength.
Definition Settings.h:5302
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:5453
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5375
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:5431
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:5135
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal.
Definition Settings.h:5309
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:5334
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5346
bool operator!=(const Experimental &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5416
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled.
Definition Settings.h:5295
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion.
Definition Settings.h:5269
std::string toString() const
Get the value as string.
bool operator==(const Experimental &other) const
Equality operator.
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction.
Definition Settings.h:5288
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled.
Definition Settings.h:5316
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5360
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5402
Enable or disable hole repair.
Definition Settings.h:5516
static const Enabled yes
On/enabled.
Definition Settings.h:5534
static const Enabled no
Off/disabled.
Definition Settings.h:5535
bool ValueType
The type of the underlying value.
Definition Settings.h:5533
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:5573
std::string toString() const
Get the value as string.
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:5567
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:5538
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:5579
bool hasValue() const
Check if the value is set.
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:5547
Relative diameter of holes to fill. Increasing this will fill more points, but require more computati...
Definition Settings.h:5599
bool operator<(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5663
bool operator>=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5681
static constexpr Range< double > validRange()
The range of valid values for HoleSize.
Definition Settings.h:5622
friend std::ostream & operator<<(std::ostream &stream, const HoleSize &value)
Operator to serialize the value to a stream.
Definition Settings.h:5687
bool operator!=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5657
bool operator<=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5675
bool operator==(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5651
bool hasValue() const
Check if the value is set.
std::string toString() const
Get the value as string.
constexpr HoleSize(double value)
Constructor.
Definition Settings.h:5631
double ValueType
The type of the underlying value.
Definition Settings.h:5619
bool operator>(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5669
Level of strictness when considering if a point should be filled. A higher level of strictness requir...
Definition Settings.h:5718
static constexpr Range< int32_t > validRange()
The range of valid values for Strictness.
Definition Settings.h:5742
bool operator>=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5801
bool operator==(const Strictness &other) const
Comparison operator.
Definition Settings.h:5771
std::string toString() const
Get the value as string.
bool operator<=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5795
bool operator>(const Strictness &other) const
Comparison operator.
Definition Settings.h:5789
int32_t ValueType
The type of the underlying value.
Definition Settings.h:5739
friend std::ostream & operator<<(std::ostream &stream, const Strictness &value)
Operator to serialize the value to a stream.
Definition Settings.h:5807
constexpr Strictness(int32_t value)
Constructor.
Definition Settings.h:5751
bool operator!=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5777
bool operator<(const Strictness &other) const
Comparison operator.
Definition Settings.h:5783
Fills in point cloud holes by interpolating remaining surrounding points.
Definition Settings.h:5495
Repair & set(const Strictness &value)
Set Strictness.
Definition Settings.h:5998
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5891
HoleSize & holeSize()
Get HoleSize.
Definition Settings.h:5973
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:6054
Repair & set(const HoleSize &value)
Set HoleSize.
Definition Settings.h:5979
bool operator==(const Repair &other) const
Equality operator.
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6019
Repair copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:5927
const Strictness & strictness() const
Get Strictness.
Definition Settings.h:5986
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6009
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:6080
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:5948
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:5954
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6029
Strictness & strictness()
Get Strictness.
Definition Settings.h:5992
bool operator!=(const Repair &other) const
Inequality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:5960
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6063
std::tuple< Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:5830
const HoleSize & holeSize() const
Get HoleSize.
Definition Settings.h:5967
Contains filters that can be used to deal with holes in the point cloud.
Definition Settings.h:5474
const Repair & repair() const
Get Repair.
Definition Settings.h:6221
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:6265
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6295
std::tuple< Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:6099
friend std::ostream & operator<<(std::ostream &stream, const Hole &value)
Operator to send the value as string to a stream.
Definition Settings.h:6330
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6285
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:6308
Hole & set(const Repair &value)
Set Repair.
Definition Settings.h:6233
Hole & set(const Repair::Strictness &value)
Set Repair::Strictness.
Definition Settings.h:6254
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6315
Hole copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:6200
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6275
bool operator!=(const Hole &other) const
Inequality operator.
bool operator==(const Hole &other) const
Equality operator.
std::string toString() const
Get the value as string.
Repair & repair()
Get Repair.
Definition Settings.h:6227
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6163
Hole & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:6240
Hole & set(const Repair::HoleSize &value)
Set Repair::HoleSize.
Definition Settings.h:6247
Enable or disable the SNR filter.
Definition Settings.h:6391
static const Enabled yes
On/enabled.
Definition Settings.h:6409
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6448
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6442
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6413
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6422
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6454
static const Enabled no
Off/disabled.
Definition Settings.h:6410
bool ValueType
The type of the underlying value.
Definition Settings.h:6408
std::string toString() const
Get the value as string.
Discard points with signal-to-noise ratio (SNR) below the given value.
Definition Settings.h:6471
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6550
constexpr Threshold(double value)
Constructor.
Definition Settings.h:6500
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:6520
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6544
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:6491
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:6556
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:6538
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:6532
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:6488
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6526
Discard points with signal-to-noise ratio (SNR) values below a threshold.
Definition Settings.h:6371
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:6788
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6693
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:6712
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6772
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6705
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:6724
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6637
bool operator!=(const Removal &other) const
Inequality operator.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:6745
Threshold & threshold()
Get Threshold.
Definition Settings.h:6718
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:6764
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:6672
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6699
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:6735
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition Settings.h:6579
Enable or disable noise repair.
Definition Settings.h:6836
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6858
bool ValueType
The type of the underlying value.
Definition Settings.h:6853
static const Enabled no
Off/disabled.
Definition Settings.h:6855
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6893
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6867
bool hasValue() const
Check if the value is set.
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:6854
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6899
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6887
Get better surface coverage by repairing regions of missing data due to noisy points....
Definition Settings.h:6813
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:7057
bool operator!=(const Repair &other) const
Inequality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7064
bool operator==(const Repair &other) const
Equality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7033
std::tuple< Settings::Processing::Filters::Noise::Repair::Enabled > Descendants
Definition Settings.h:6912
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7027
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7021
Repair copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:7000
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7044
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:7079
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6966
Enable or disable noise suppression.
Definition Settings.h:7126
static const Enabled no
Off/disabled.
Definition Settings.h:7145
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7157
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7183
bool ValueType
The type of the underlying value.
Definition Settings.h:7143
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7144
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7148
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7189
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7177
Reduce noise and outliers in the point cloud. This filter can also be used to reduce ripple effects c...
Definition Settings.h:7103
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7334
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:7347
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7317
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7311
std::string toString() const
Get the value as string.
std::tuple< Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7202
Suppression copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:7290
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7256
friend std::ostream & operator<<(std::ostream &stream, const Suppression &value)
Operator to send the value as string to a stream.
Definition Settings.h:7369
bool operator!=(const Suppression &other) const
Inequality operator.
Suppression & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7323
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7354
bool operator==(const Suppression &other) const
Equality operator.
Contains filters that can be used to clean up a noisy point cloud.
Definition Settings.h:6351
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:7694
Noise & set(const Suppression &value)
Set Suppression.
Definition Settings.h:7591
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:7659
Suppression & suppression()
Get Suppression.
Definition Settings.h:7585
Removal & removal()
Get Removal.
Definition Settings.h:7526
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7669
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:7546
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:7499
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7703
const Suppression & suppression() const
Get Suppression.
Definition Settings.h:7579
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:7629
std::tuple< Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7386
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:7539
const Repair & repair() const
Get Repair.
Definition Settings.h:7553
Noise & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:7572
Noise & set(const Repair &value)
Set Repair.
Definition Settings.h:7565
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7459
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:7720
Repair & repair()
Get Repair.
Definition Settings.h:7559
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:7639
const Removal & removal() const
Get Removal.
Definition Settings.h:7520
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:7619
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7649
bool operator==(const Noise &other) const
Equality operator.
Noise & set(const Suppression::Enabled &value)
Set Suppression::Enabled.
Definition Settings.h:7598
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:7609
Noise & set(const Removal &value)
Set Removal.
Definition Settings.h:7532
Enable or disable the outlier filter.
Definition Settings.h:7783
bool ValueType
The type of the underlying value.
Definition Settings.h:7800
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7840
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7814
static const Enabled no
Off/disabled.
Definition Settings.h:7802
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7801
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7846
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7805
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7834
Discard point if Euclidean distance to neighboring points is above the given value.
Definition Settings.h:7863
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:7883
constexpr Threshold(double value)
Constructor.
Definition Settings.h:7892
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:7924
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:7912
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7942
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7918
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:7948
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7936
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:7930
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:7880
Discard point if Euclidean distance to neighboring points is above a threshold.
Definition Settings.h:7763
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:8180
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8085
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:8064
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8097
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8091
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:8116
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:7971
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8127
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8137
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:8104
Threshold & threshold()
Get Threshold.
Definition Settings.h:8110
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:8156
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8029
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8164
Contains a filter that removes points with large Euclidean distance to neighboring points.
Definition Settings.h:7743
const Removal & removal() const
Get Removal.
Definition Settings.h:8316
Outlier & set(const Removal &value)
Set Removal.
Definition Settings.h:8328
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8393
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:8386
bool operator!=(const Outlier &other) const
Inequality operator.
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:8342
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:8335
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8198
Removal & removal()
Get Removal.
Definition Settings.h:8322
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:8295
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream.
Definition Settings.h:8408
bool operator==(const Outlier &other) const
Equality operator.
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8373
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:8353
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8363
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8259
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition Settings.h:8469
bool ValueType
The type of the underlying value.
Definition Settings.h:8486
static const Enabled yes
On/enabled.
Definition Settings.h:8487
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8526
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8500
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:8532
static const Enabled no
Off/disabled.
Definition Settings.h:8488
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8520
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8491
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition Settings.h:8556
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8598
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8589
ValueType
The type of the underlying value.
Definition Settings.h:8581
static const Mode local
local
Definition Settings.h:8586
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8630
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8636
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8624
std::string toString() const
Get the value as string.
static const Mode global
global
Definition Settings.h:8585
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8618
Discard points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8449
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8781
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:8870
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:8817
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8719
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
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:8846
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:8754
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8787
Mode & mode()
Get Mode.
Definition Settings.h:8800
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8854
const Mode & mode() const
Get Mode.
Definition Settings.h:8794
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8775
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Mode &value)
Set Mode.
Definition Settings.h:8806
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:8827
Contains a filter that removes points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8429
bool operator!=(const Reflection &other) const
Inequality operator.
bool operator==(const Reflection &other) const
Equality operator.
Removal & removal()
Get Removal.
Definition Settings.h:9012
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8949
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9098
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9083
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:9076
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9025
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9053
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8888
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Mode &value)
Set Removal::Mode.
Definition Settings.h:9032
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9063
const Removal & removal() const
Get Removal.
Definition Settings.h:9006
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9043
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9018
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:8985
Enable or disable the smoothing filter.
Definition Settings.h:9157
bool ValueType
The type of the underlying value.
Definition Settings.h:9174
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9179
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9214
static const Enabled yes
On/enabled.
Definition Settings.h:9175
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9208
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9220
static const Enabled no
Off/disabled.
Definition Settings.h:9176
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9188
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:9237
double ValueType
The type of the underlying value.
Definition Settings.h:9254
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9292
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9304
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9266
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9257
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9322
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9316
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9286
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9310
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9298
Gaussian smoothing of the point cloud.
Definition Settings.h:9137
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9465
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:9530
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9511
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9471
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9345
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9554
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9478
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9459
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:9501
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:9438
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9490
Sigma & sigma()
Get Sigma.
Definition Settings.h:9484
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9403
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9538
Smoothing filters.
Definition Settings.h:9119
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:9669
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9633
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9572
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9702
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:9737
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9767
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:9716
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:9709
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9690
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:9727
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:9760
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9747
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:9782
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9696
Filter settings.
Definition Settings.h:2951
bool operator!=(const Filters &other) const
Inequality operator.
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:10689
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10352
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:10849
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10068
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10699
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:10035
Filters & set(const Hole &value)
Set Hole.
Definition Settings.h:10183
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10545
Filters & set(const Hole::Repair::HoleSize &value)
Set Hole::Repair::HoleSize.
Definition Settings.h:10204
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10258
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:10593
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10660
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10089
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10621
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:10554
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10670
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:10757
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10265
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10419
Cluster & cluster()
Get Cluster.
Definition Settings.h:10062
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:10728
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:10573
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10718
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10319
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10143
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10115
Outlier & outlier()
Get Outlier.
Definition Settings.h:10292
Filters & set(const Reflection::Removal::Mode &value)
Set Reflection::Removal::Mode.
Definition Settings.h:10359
Filters & set(const Hole::Repair::Enabled &value)
Set Hole::Repair::Enabled.
Definition Settings.h:10197
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10272
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10305
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10056
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10103
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10122
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:10870
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10082
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:10738
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10679
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10468
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:10787
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9965
Filters & set(const Hole::Repair &value)
Set Hole::Repair.
Definition Settings.h:10190
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10326
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10458
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10251
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10777
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10338
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10507
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10150
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:10836
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10429
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10298
const Noise & noise() const
Get Noise.
Definition Settings.h:10218
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10129
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:10563
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10493
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10345
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10611
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10244
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:10748
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10392
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10602
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10650
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10164
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10385
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Hole::Repair::Strictness &value)
Set Hole::Repair::Strictness.
Definition Settings.h:10211
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10312
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10075
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:10583
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10532
const Hole & hole() const
Get Hole.
Definition Settings.h:10171
std::tuple< Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, 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::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9799
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10096
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10519
Noise & noise()
Get Noise.
Definition Settings.h:10224
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10378
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10136
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10439
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10237
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10409
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10709
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10631
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10372
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10449
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10279
Hole & hole()
Get Hole.
Definition Settings.h:10177
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:10767
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10157
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10286
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10640
Reflection & reflection()
Get Reflection.
Definition Settings.h:10332
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10230
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10399
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10366
Experimental & experimental()
Get Experimental.
Definition Settings.h:10109
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10479
Setting for upsampling or downsampling the point cloud data by some factor. This operation is perform...
Definition Settings.h:10941
void reset()
Reset the node to unset state.
static const Mode upsample2x2
upsample2x2
Definition Settings.h:10991
static const Mode downsample4x4
downsample4x4
Definition Settings.h:10990
Mode()=default
Default constructor.
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:11046
static const Mode upsample4x4
upsample4x4
Definition Settings.h:10992
static const Mode downsample2x2
downsample2x2
Definition Settings.h:10989
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:11040
ValueType
The type of the underlying value.
Definition Settings.h:10981
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:11034
bool hasValue() const
Check if the value is set.
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:10995
std::string toString() const
Get the value as string.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:11008
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:11028
static const Mode disabled
disabled
Definition Settings.h:10988
ValueType value() const
Get the value.
Settings for changing the output resolution of the point cloud.
Definition Settings.h:10898
Resampling & set(const Mode &value)
Set Mode.
Definition Settings.h:11192
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11126
const Mode & mode() const
Get Mode.
Definition Settings.h:11180
bool operator==(const Resampling &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:11215
Mode & mode()
Get Mode.
Definition Settings.h:11186
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Resampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:11237
std::tuple< Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11072
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:11202
bool operator!=(const Resampling &other) const
Inequality operator.
Resampling copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:11159
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11222
Settings related to processing of a capture, including filters and color balance.
Definition Settings.h:1481
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:11987
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:12167
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:12115
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:12177
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12357
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12328
Resampling & resampling()
Get Resampling.
Definition Settings.h:11912
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11600
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11565
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11661
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12243
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:11969
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11572
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:11885
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:11533
Filters & filters()
Get Filters.
Definition Settings.h:11627
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:11892
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12262
Processing & set(const Resampling &value)
Set Resampling.
Definition Settings.h:11918
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:11995
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11710
Processing & set(const Resampling::Mode &value)
Set Resampling::Mode.
Definition Settings.h:11925
Processing()
Default constructor.
std::tuple< Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, 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::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma, Settings::Processing::Resampling, Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11254
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12347
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11724
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:11960
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:11829
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11717
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11654
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12444
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12252
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12126
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12318
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12224
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:12157
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12377
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12214
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11579
Color & color()
Get Color.
Definition Settings.h:11559
Processing & set(const Filters::Hole::Repair::Strictness &value)
Set Filters::Hole::Repair::Strictness.
Definition Settings.h:11759
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12367
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:11850
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11766
Processing & set(const Filters::Hole &value)
Set Filters::Hole.
Definition Settings.h:11731
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11640
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12270
const Settings::Processing::Filters & get() const
Definition Settings.h:12003
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11703
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11780
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:11878
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:11942
const Filters & filters() const
Get Filters.
Definition Settings.h:11621
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11647
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:12187
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12427
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:12050
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:11899
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:11808
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11773
Processing & set(const Filters::Reflection::Removal::Mode &value)
Set Filters::Reflection::Removal::Mode.
Definition Settings.h:11871
Processing & set(const Filters::Hole::Repair::Enabled &value)
Set Filters::Hole::Repair::Enabled.
Definition Settings.h:11745
const Settings::Processing::Resampling & get() const
Definition Settings.h:12385
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:11836
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:11787
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:11951
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11668
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11675
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12204
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:11843
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11586
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:11978
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:12104
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:11822
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:11801
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:12338
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:12091
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11607
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:11864
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11696
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:12030
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12299
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:11857
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:12040
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11689
const Settings::Processing::Color & get() const
Definition Settings.h:11934
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11553
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11682
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:11815
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:12020
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12308
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12289
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11633
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:12393
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11593
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12195
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:12059
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12233
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11614
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11453
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12139
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:12011
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:12079
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:11794
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:12069
const Resampling & resampling() const
Get Resampling.
Definition Settings.h:11906
Processing & set(const Filters::Hole::Repair::HoleSize &value)
Set Filters::Hole::Repair::HoleSize.
Definition Settings.h:11752
Processing & set(const Filters::Hole::Repair &value)
Set Filters::Hole::Repair.
Definition Settings.h:11738
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:12418
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12279
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:12148
Enable or disable box filter.
Definition Settings.h:12537
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12568
bool ValueType
The type of the underlying value.
Definition Settings.h:12554
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12588
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12559
static const Enabled yes
On/enabled.
Definition Settings.h:12555
static const Enabled no
Off/disabled.
Definition Settings.h:12556
bool hasValue() const
Check if the value is set.
void reset()
Reset the node to unset state.
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:12600
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12594
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12617
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12665
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12640
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12660
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const Extents &value)
Operator to serialize the value to a stream.
Definition Settings.h:12677
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12671
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12694
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12737
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12748
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12742
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const PointA &value)
Operator to serialize the value to a stream.
Definition Settings.h:12754
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12717
Zivid::PointXYZ value() const
Get the value.
std::string toString() const
Get the value as string.
A point such that the vector from PointO to PointB describes the second edge of the parallelogram.
Definition Settings.h:12771
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:12819
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const PointB &value)
Operator to serialize the value to a stream.
Definition Settings.h:12831
void reset()
Reset the node to unset state.
std::string toString() const
Get the value as string.
constexpr PointB(float x, float y, float z)
Constructor.
Definition Settings.h:12814
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12794
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:12825
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:12848
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:12891
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:12902
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12871
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:12896
bool hasValue() const
Check if the value is set.
Zivid::PointXYZ value() const
Get the value.
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const PointO &value)
Operator to serialize the value to a stream.
Definition Settings.h:12908
Removes points outside the given three-dimensional box.
Definition Settings.h:12502
std::string toString() const
Get the value as string.
std::tuple< Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO > Descendants
Definition Settings.h:12921
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:13096
Box copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:13025
const PointO & pointO() const
Get PointO.
Definition Settings.h:13122
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:13134
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13052
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13046
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:13077
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13144
PointA & pointA()
Get PointA.
Definition Settings.h:13090
PointB & pointB()
Get PointB.
Definition Settings.h:13109
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:13115
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13180
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13162
const Extents & extents() const
Get Extents.
Definition Settings.h:13065
const PointA & pointA() const
Get PointA.
Definition Settings.h:13084
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:12988
PointO & pointO()
Get PointO.
Definition Settings.h:13128
Extents & extents()
Get Extents.
Definition Settings.h:13071
const PointB & pointB() const
Get PointB.
Definition Settings.h:13103
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:13217
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13247
bool operator!=(const Box &other) const
Inequality operator.
bool operator==(const Box &other) const
Equality operator.
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:13171
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13228
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13153
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13058
Enable or disable depth filter.
Definition Settings.h:13296
static const Enabled yes
On/enabled.
Definition Settings.h:13314
bool hasValue() const
Check if the value is set.
void reset()
Reset the node to unset state.
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:13347
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13353
bool ValueType
The type of the underlying value.
Definition Settings.h:13313
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13359
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13318
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13315
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13327
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13376
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13419
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13399
const Zivid::Range< double > & value() const
Get the value.
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Range &value)
Operator to serialize the value to a stream.
Definition Settings.h:13436
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13424
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13430
void reset()
Reset the node to unset state.
bool hasValue() const
Check if the value is set.
Removes points that reside outside of a depth range, meaning that their Z coordinate falls above a gi...
Definition Settings.h:13274
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13573
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13580
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13592
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13561
bool operator==(const Depth &other) const
Equality operator.
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13449
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13638
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13602
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:13630
Range & range()
Get Range.
Definition Settings.h:13586
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13654
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13506
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13567
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13611
Depth copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:13540
Removes points outside the region of interest.
Definition Settings.h:12468
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13959
Depth & depth()
Get Depth.
Definition Settings.h:13871
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:13884
const Box & box() const
Get Box.
Definition Settings.h:13811
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:13823
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:14011
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:13858
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13942
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13926
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:13950
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13918
std::tuple< Settings::RegionOfInterest::Box, Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO, Settings::RegionOfInterest::Depth, Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13672
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13968
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:13934
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13751
RegionOfInterest copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:13791
Box & box()
Get Box.
Definition Settings.h:13817
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:13900
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:13987
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:13844
const Depth & depth() const
Get Depth.
Definition Settings.h:13865
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:13837
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13995
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:13830
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:13891
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:13877
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:13851
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13909
RegionOfInterest()
Default constructor.
Choose how to sample colors for the point cloud. The rgb option gives a 2D image with full colors....
Definition Settings.h:14059
ValueType
The type of the underlying value.
Definition Settings.h:14083
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:14093
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:14140
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:14102
static const Color grayscale
grayscale
Definition Settings.h:14090
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:14134
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:14089
bool hasValue() const
Check if the value is set.
void reset()
Reset the node to unset state.
bool operator==(const Color &other) const
Comparison operator.
Definition Settings.h:14128
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14122
static const Color rgb
rgb
Definition Settings.h:14088
ValueType value() const
Get the value.
Set whether the full image sensor should be used with white projector light or only specific color ch...
Definition Settings.h:14175
ValueType value() const
Get the value.
void reset()
Reset the node to unset state.
static std::set< ValueType > validValues()
All valid values of Pixel.
Definition Settings.h:14215
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14212
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14228
static const Pixel all
all
Definition Settings.h:14208
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14209
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14260
ValueType
The type of the underlying value.
Definition Settings.h:14201
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14210
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14254
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14211
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const Pixel::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14248
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14266
std::string toString() const
Get the value as string.
Sampling settings.
Definition Settings.h:14034
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14291
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14347
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14406
Sampling copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:14380
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14419
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14491
Pixel & pixel()
Get Pixel.
Definition Settings.h:14425
const Settings::Sampling::Color & get() const
Definition Settings.h:14440
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:14467
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14448
bool operator!=(const Sampling &other) const
Inequality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:14475
const Color & color() const
Get Color.
Definition Settings.h:14400
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14412
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14431
Settings used when capturing with a Zivid camera.
Definition Settings.h:80
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:15975
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:15813
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14685
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:15069
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:15794
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15368
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:15684
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15478
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:15118
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15502
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:15020
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15279
const Settings::RegionOfInterest & get() const
Definition Settings.h:15919
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15729
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:14876
const Processing & processing() const
Get Processing.
Definition Settings.h:14959
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15527
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15644
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:14971
const Settings::Sampling::Pixel & get() const
Definition Settings.h:16009
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15667
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15415
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled.
Definition Settings.h:15237
Settings & set(const Processing::Filters::Hole::Repair::Enabled &value)
Set Processing::Filters::Hole::Repair::Enabled.
Definition Settings.h:15146
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15572
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:15676
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:15125
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15286
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15422
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:14926
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15655
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15389
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:15167
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15403
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15582
const Settings::Acquisitions & get() const
Definition Settings.h:15436
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15590
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:15776
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:15803
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:15041
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:15897
const Settings::Diagnostics & get() const
Definition Settings.h:15442
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15327
const Settings::Processing::Resampling & get() const
Definition Settings.h:15905
Settings & set(const Processing::Filters::Hole &value)
Set Processing::Filters::Hole.
Definition Settings.h:15132
Settings & set(const Processing::Filters::Reflection::Removal::Mode &value)
Set Processing::Filters::Reflection::Removal::Mode.
Definition Settings.h:15272
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:15887
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:15927
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:14985
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:15967
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15382
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:15739
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:15983
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:15712
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15610
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:16052
std::string serialize() const
Serialize to a string.
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15494
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:15943
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15293
const Settings::Processing & get() const
Definition Settings.h:15462
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15251
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:16064
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15600
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15244
Settings & set(const Processing::Filters::Hole::Repair::HoleSize &value)
Set Processing::Filters::Hole::Repair::HoleSize.
Definition Settings.h:15153
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:15935
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15519
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:15104
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15347
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:15702
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15633
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15354
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15486
Settings & set(const Processing::Resampling::Mode &value)
Set Processing::Resampling::Mode.
Definition Settings.h:15314
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:15693
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:14895
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14778
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:15831
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:15076
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:15868
std::tuple< Settings::Acquisitions, Settings::Diagnostics, Settings::Diagnostics::Enabled, Settings::Engine, Settings::Processing, Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, 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::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma, Settings::Processing::Resampling, Settings::Processing::Resampling::Mode, Settings::RegionOfInterest, Settings::RegionOfInterest::Box, Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO, Settings::RegionOfInterest::Depth, Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range, Settings::Sampling, Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14509
const Settings::Processing::Filters & get() const
Definition Settings.h:15535
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:15013
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const Engine &value)
Set Engine.
Definition Settings.h:14952
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15396
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15510
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:15758
Settings & set(const Processing::Resampling &value)
Set Processing::Resampling.
Definition Settings.h:15307
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:15111
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:15951
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:14978
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15223
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:14901
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15258
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:15786
const Settings::Engine & get() const
Definition Settings.h:15456
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15543
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:15767
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:15006
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15375
const Settings::Sampling::Color & get() const
Definition Settings.h:16003
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:15048
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15340
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15209
const Engine & engine() const
Get Engine.
Definition Settings.h:14940
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:14920
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:15749
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15562
Sampling & sampling()
Get Sampling.
Definition Settings.h:15409
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15265
Processing & processing()
Get Processing.
Definition Settings.h:14965
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15361
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:14933
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15720
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15450
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15552
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:15860
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15621
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:15959
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:15083
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15429
Settings & set(const Processing::Filters::Hole::Repair::Strictness &value)
Set Processing::Filters::Hole::Repair::Strictness.
Definition Settings.h:15160
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:15027
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:15055
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:15991
const Settings::Sampling & get() const
Definition Settings.h:15997
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15188
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:15097
static ZIVID_NODISCARD Settings fromSerialized(const std::string &value)
Construct a new Settings instance from a previously serialized string.
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:14907
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15300
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:14914
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:15174
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15195
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:15062
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15230
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15333
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:15181
Engine & engine()
Get Engine.
Definition Settings.h:14946
Settings & set(const Processing::Filters::Hole::Repair &value)
Set Processing::Filters::Hole::Repair.
Definition Settings.h:15139
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:15090
const Settings::Processing::Color & get() const
Definition Settings.h:15470
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15202
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:15850
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15216
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:15840
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:14999
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:15034
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15321
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:15913
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:15823
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:14992
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:15877
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:16084
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:56
Point with three coordinates as float.
Definition Point.h:60