Zivid C++ API 2.12.0+6afd4961-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
64#include "Zivid/Point.h"
65#include "Zivid/Range.h"
66
67#ifdef _MSC_VER
68# pragma warning(push)
69# pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
70#endif
71
72namespace Zivid
73{
74
76
77 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
79 {
80 public:
82 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
83
85 static constexpr const char *path{ "" };
86
88 static constexpr const char *name{ "Settings" };
89
91 static constexpr const char *description{
92 R"description(Settings used when capturing with a Zivid camera.)description"
93 };
94
95 static constexpr size_t version{ 24 };
96
97#ifndef NO_DOC
98 template<size_t>
99 struct Version;
100
101 using LatestVersion = Zivid::Settings;
102
103 // Short identifier. This value is not guaranteed to be universally unique
104 // Todo(ZIVID-2808): Move this to internal DataModelExt header
105 static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
106
107#endif
108
110
111 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
113 {
114 public:
116 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
117
119 static constexpr const char *path{ "Acquisition" };
120
122 static constexpr const char *name{ "Acquisition" };
123
125 static constexpr const char *description{ R"description(Settings for a single acquisition.)description" };
126
130
131 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
133 {
134 public:
136 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
137
139 static constexpr const char *path{ "Acquisition/Aperture" };
140
142 static constexpr const char *name{ "Aperture" };
143
145 static constexpr const char *description{
146 R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
147the effective aperture diameter).
148)description"
149 };
150
152 using ValueType = double;
153
155 static constexpr Range<double> validRange()
156 {
157 return { 1.4, 32.0 };
158 }
159
161 Aperture() = default;
162
164 explicit constexpr Aperture(double value)
165 : m_opt{ verifyValue(value) }
166 {}
167
172 double value() const;
173
175 bool hasValue() const;
176
178 void reset();
179
181 std::string toString() const;
182
184 bool operator==(const Aperture &other) const
185 {
186 return m_opt == other.m_opt;
187 }
188
190 bool operator!=(const Aperture &other) const
191 {
192 return m_opt != other.m_opt;
193 }
194
196 bool operator<(const Aperture &other) const
197 {
198 return m_opt < other.m_opt;
199 }
200
202 bool operator>(const Aperture &other) const
203 {
204 return m_opt > other.m_opt;
205 }
206
208 bool operator<=(const Aperture &other) const
209 {
210 return m_opt <= other.m_opt;
211 }
212
214 bool operator>=(const Aperture &other) const
215 {
216 return m_opt >= other.m_opt;
217 }
218
220 friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
221 {
222 return stream << value.toString();
223 }
224
225 private:
226 void setFromString(const std::string &value);
227
228 constexpr ValueType static verifyValue(const ValueType &value)
229 {
230 return validRange().isInRange(value)
231 ? value
232 : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
233 + std::to_string(validRange().min()) + ", "
234 + std::to_string(validRange().max()) + "]" };
235 }
236
237 Zivid::DataModel::Detail::Optional<double> m_opt;
238
239 friend struct DataModel::Detail::Befriend<Aperture>;
240 };
241
253
254 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
256 {
257 public:
259 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
260
262 static constexpr const char *path{ "Acquisition/Brightness" };
263
265 static constexpr const char *name{ "Brightness" };
266
268 static constexpr const char *description{
269 R"description(Brightness controls the light output from the projector.
270
271Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
272or in case of high levels of ambient lighting.
273
274When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
275can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated
276over a 10 second period. This limitation is enforced automatically by the camera. Calling capture
277when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a
278duration of time to cool down, before capture will start.
279)description"
280 };
281
283 using ValueType = double;
284
286 static constexpr Range<double> validRange()
287 {
288 return { 0, 2.5 };
289 }
290
292 Brightness() = default;
293
295 explicit constexpr Brightness(double value)
296 : m_opt{ verifyValue(value) }
297 {}
298
303 double value() const;
304
306 bool hasValue() const;
307
309 void reset();
310
312 std::string toString() const;
313
315 bool operator==(const Brightness &other) const
316 {
317 return m_opt == other.m_opt;
318 }
319
321 bool operator!=(const Brightness &other) const
322 {
323 return m_opt != other.m_opt;
324 }
325
327 bool operator<(const Brightness &other) const
328 {
329 return m_opt < other.m_opt;
330 }
331
333 bool operator>(const Brightness &other) const
334 {
335 return m_opt > other.m_opt;
336 }
337
339 bool operator<=(const Brightness &other) const
340 {
341 return m_opt <= other.m_opt;
342 }
343
345 bool operator>=(const Brightness &other) const
346 {
347 return m_opt >= other.m_opt;
348 }
349
351 friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
352 {
353 return stream << value.toString();
354 }
355
356 private:
357 void setFromString(const std::string &value);
358
359 constexpr ValueType static verifyValue(const ValueType &value)
360 {
361 return validRange().isInRange(value)
362 ? value
363 : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
364 + " } is not in range [" + std::to_string(validRange().min())
365 + ", " + std::to_string(validRange().max()) + "]" };
366 }
367
368 Zivid::DataModel::Detail::Optional<double> m_opt;
369
370 friend struct DataModel::Detail::Befriend<Brightness>;
371 };
372
374
375 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
377 {
378 public:
380 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
381
383 static constexpr const char *path{ "Acquisition/ExposureTime" };
384
386 static constexpr const char *name{ "ExposureTime" };
387
389 static constexpr const char *description{
390 R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
391 };
392
394 using ValueType = std::chrono::microseconds;
395
398 {
399 return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
400 }
401
403 ExposureTime() = default;
404
406 explicit constexpr ExposureTime(std::chrono::microseconds value)
407 : m_opt{ verifyValue(value) }
408 {}
409
414 std::chrono::microseconds value() const;
415
417 bool hasValue() const;
418
420 void reset();
421
423 std::string toString() const;
424
426 bool operator==(const ExposureTime &other) const
427 {
428 return m_opt == other.m_opt;
429 }
430
432 bool operator!=(const ExposureTime &other) const
433 {
434 return m_opt != other.m_opt;
435 }
436
438 bool operator<(const ExposureTime &other) const
439 {
440 return m_opt < other.m_opt;
441 }
442
444 bool operator>(const ExposureTime &other) const
445 {
446 return m_opt > other.m_opt;
447 }
448
450 bool operator<=(const ExposureTime &other) const
451 {
452 return m_opt <= other.m_opt;
453 }
454
456 bool operator>=(const ExposureTime &other) const
457 {
458 return m_opt >= other.m_opt;
459 }
460
462 friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
463 {
464 return stream << value.toString();
465 }
466
467 private:
468 void setFromString(const std::string &value);
469
470 constexpr ValueType static verifyValue(const ValueType &value)
471 {
472 return validRange().isInRange(value)
473 ? value
474 : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
475 + " } is not in range ["
476 + std::to_string(validRange().min().count()) + ", "
477 + std::to_string(validRange().max().count()) + "]" };
478 }
479
480 Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
481
482 friend struct DataModel::Detail::Befriend<ExposureTime>;
483 };
484
486
487 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
489 {
490 public:
492 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
493
495 static constexpr const char *path{ "Acquisition/Gain" };
496
498 static constexpr const char *name{ "Gain" };
499
501 static constexpr const char *description{ R"description(Analog gain in the camera.)description" };
502
504 using ValueType = double;
505
507 static constexpr Range<double> validRange()
508 {
509 return { 1, 16 };
510 }
511
513 Gain() = default;
514
516 explicit constexpr Gain(double value)
517 : m_opt{ verifyValue(value) }
518 {}
519
524 double value() const;
525
527 bool hasValue() const;
528
530 void reset();
531
533 std::string toString() const;
534
536 bool operator==(const Gain &other) const
537 {
538 return m_opt == other.m_opt;
539 }
540
542 bool operator!=(const Gain &other) const
543 {
544 return m_opt != other.m_opt;
545 }
546
548 bool operator<(const Gain &other) const
549 {
550 return m_opt < other.m_opt;
551 }
552
554 bool operator>(const Gain &other) const
555 {
556 return m_opt > other.m_opt;
557 }
558
560 bool operator<=(const Gain &other) const
561 {
562 return m_opt <= other.m_opt;
563 }
564
566 bool operator>=(const Gain &other) const
567 {
568 return m_opt >= other.m_opt;
569 }
570
572 friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
573 {
574 return stream << value.toString();
575 }
576
577 private:
578 void setFromString(const std::string &value);
579
580 constexpr ValueType static verifyValue(const ValueType &value)
581 {
582 return validRange().isInRange(value)
583 ? value
584 : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
585 + std::to_string(validRange().min()) + ", "
586 + std::to_string(validRange().max()) + "]" };
587 }
588
589 Zivid::DataModel::Detail::Optional<double> m_opt;
590
591 friend struct DataModel::Detail::Befriend<Gain>;
592 };
593
594 using Descendants = std::tuple<
599
602
617#ifndef NO_DOC
618 template<
619 typename... Args,
620 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
621 typename std::enable_if<
622 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
623 value,
624 int>::type = 0>
625#else
626 template<typename... Args>
627#endif
628 explicit Acquisition(Args &&...args)
629 {
630 using namespace Zivid::Detail::TypeTraits;
631
632 static_assert(
633 AllArgsDecayedAreUnique<Args...>::value,
634 "Found duplicate types among the arguments passed to Acquisition(...). "
635 "Types should be listed at most once.");
636
637 set(std::forward<Args>(args)...);
638 }
639
653#ifndef NO_DOC
654 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
655#else
656 template<typename... Args>
657#endif
658 void set(Args &&...args)
659 {
660 using namespace Zivid::Detail::TypeTraits;
661
662 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
663 static_assert(
664 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
665
666 static_assert(
667 AllArgsDecayedAreUnique<Args...>::value,
668 "Found duplicate types among the arguments passed to set(...). "
669 "Types should be listed at most once.");
670
671 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
672 }
673
688#ifndef NO_DOC
689 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
690#else
691 template<typename... Args>
692#endif
693 Acquisition copyWith(Args &&...args) const
694 {
695 using namespace Zivid::Detail::TypeTraits;
696
697 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
698 static_assert(
699 AllArgsAreDescendantNodes::value,
700 "All arguments passed to copyWith(...) must be descendant nodes.");
701
702 static_assert(
703 AllArgsDecayedAreUnique<Args...>::value,
704 "Found duplicate types among the arguments passed to copyWith(...). "
705 "Types should be listed at most once.");
706
707 auto copy{ *this };
708 copy.set(std::forward<Args>(args)...);
709 return copy;
710 }
711
713 const Aperture &aperture() const
714 {
715 return m_aperture;
716 }
717
720 {
721 return m_aperture;
722 }
723
725 Acquisition &set(const Aperture &value)
726 {
727 m_aperture = value;
728 return *this;
729 }
730
732 const Brightness &brightness() const
733 {
734 return m_brightness;
735 }
736
739 {
740 return m_brightness;
741 }
742
745 {
746 m_brightness = value;
747 return *this;
748 }
749
752 {
753 return m_exposureTime;
754 }
755
758 {
759 return m_exposureTime;
760 }
761
764 {
765 m_exposureTime = value;
766 return *this;
767 }
768
770 const Gain &gain() const
771 {
772 return m_gain;
773 }
774
777 {
778 return m_gain;
779 }
780
782 Acquisition &set(const Gain &value)
783 {
784 m_gain = value;
785 return *this;
786 }
787
788 template<
789 typename T,
790 typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
792 {
793 return m_aperture;
794 }
795
796 template<
797 typename T,
798 typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
800 {
801 return m_brightness;
802 }
803
804 template<
805 typename T,
806 typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
808 {
809 return m_exposureTime;
810 }
811
812 template<
813 typename T,
814 typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
816 {
817 return m_gain;
818 }
819
820 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
822 {
823 return m_aperture;
824 }
825
826 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
828 {
829 return m_brightness;
830 }
831
832 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
834 {
835 return m_exposureTime;
836 }
837
838 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
840 {
841 return m_gain;
842 }
843
845 template<typename F>
846 void forEach(const F &f) const
847 {
848 f(m_aperture);
849 f(m_brightness);
850 f(m_exposureTime);
851 f(m_gain);
852 }
853
855 template<typename F>
856 void forEach(const F &f)
857 {
858 f(m_aperture);
859 f(m_brightness);
860 f(m_exposureTime);
861 f(m_gain);
862 }
863
865 bool operator==(const Acquisition &other) const;
866
868 bool operator!=(const Acquisition &other) const;
869
871 std::string toString() const;
872
874 friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
875 {
876 return stream << value.toString();
877 }
878
879 private:
880 void setFromString(const std::string &value);
881
882 void setFromString(const std::string &fullPath, const std::string &value);
883
884 std::string getString(const std::string &fullPath) const;
885
886 Aperture m_aperture;
887 Brightness m_brightness;
888 ExposureTime m_exposureTime;
889 Gain m_gain;
890
891 friend struct DataModel::Detail::Befriend<Acquisition>;
892 };
893
895
896 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
898 {
899 public:
901 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafDataModelList;
902
904 static constexpr const char *path{ "Acquisitions" };
905
907 static constexpr const char *name{ "Acquisitions" };
908
910 static constexpr const char *description{ R"description(List of Acquisition objects.)description" };
911
913 using ValueType = std::vector<Settings::Acquisition>;
914
917 {
918 return { 0, std::numeric_limits<ValueType::size_type>::max() };
919 }
920
922 Acquisitions() = default;
923
925 explicit Acquisitions(std::vector<Settings::Acquisition> value)
926 : m_value{ std::move(value) }
927 {}
928
930 explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
931 : Acquisitions{ ValueType{ value } }
932 {}
933
935 const std::vector<Settings::Acquisition> &value() const;
936
938 std::string toString() const;
939
941 std::size_t size() const noexcept;
942
944 bool isEmpty() const noexcept;
945
951 template<typename... Args>
952 void emplaceBack(Args &&...args)
953 {
954 m_value.emplace_back(std::forward<Args>(args)...);
955 }
956
962 Settings::Acquisition &at(std::size_t pos);
963
969 const Settings::Acquisition &at(std::size_t pos) const;
970
977
983 const Settings::Acquisition &operator[](std::size_t pos) const;
984
986 template<typename F>
987 void forEach(const F &f)
988 {
989 for(auto &child : m_value)
990 {
991 f(child);
992 }
993 }
994
996 template<typename F>
997 void forEach(const F &f) const
998 {
999 for(const auto &child : m_value)
1000 {
1001 f(child);
1002 }
1003 }
1004
1006 using Iterator = std::vector<Settings::Acquisition>::iterator;
1007
1009 Iterator begin() noexcept;
1010
1012 Iterator end() noexcept;
1013
1015 using ConstIterator = std::vector<Settings::Acquisition>::const_iterator;
1016
1018 ConstIterator begin() const noexcept;
1019
1021 ConstIterator end() const noexcept;
1022
1024 ConstIterator cbegin() const noexcept;
1025
1027 ConstIterator cend() const noexcept;
1028
1030 bool operator==(const Acquisitions &other) const
1031 {
1032 return m_value == other.m_value;
1033 }
1034
1036 bool operator!=(const Acquisitions &other) const
1037 {
1038 return m_value != other.m_value;
1039 }
1040
1042 friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
1043 {
1044 return stream << value.toString();
1045 }
1046
1047 private:
1048 void setFromString(const std::string &value);
1049
1050 std::vector<Settings::Acquisition> m_value{};
1051
1052 friend struct DataModel::Detail::Befriend<Acquisitions>;
1053 };
1054
1062
1063 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1065 {
1066 public:
1068 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1069
1071 static constexpr const char *path{ "Diagnostics" };
1072
1074 static constexpr const char *name{ "Diagnostics" };
1075
1077 static constexpr const char *description{
1078 R"description(When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when saving
1079the frame to a .zdf file. This enables Zivid's Customer Success team to provide better assistance and more
1080thorough troubleshooting.
1081
1082Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the
1083.zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid's support team.
1084)description"
1085 };
1086
1088
1089 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1091 {
1092 public:
1094 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1095
1097 static constexpr const char *path{ "Diagnostics/Enabled" };
1098
1100 static constexpr const char *name{ "Enabled" };
1101
1103 static constexpr const char *description{ R"description(Enable or disable diagnostics.)description" };
1104
1106 using ValueType = bool;
1107 static const Enabled yes;
1108 static const Enabled no;
1109
1111 static std::set<bool> validValues()
1112 {
1113 return { false, true };
1114 }
1115
1117 Enabled() = default;
1118
1120 explicit constexpr Enabled(bool value)
1121 : m_opt{ value }
1122 {}
1123
1128 bool value() const;
1129
1131 bool hasValue() const;
1132
1134 void reset();
1135
1137 std::string toString() const;
1138
1140 bool operator==(const Enabled &other) const
1141 {
1142 return m_opt == other.m_opt;
1143 }
1144
1146 bool operator!=(const Enabled &other) const
1147 {
1148 return m_opt != other.m_opt;
1149 }
1150
1152 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1153 {
1154 return stream << value.toString();
1155 }
1156
1157 private:
1158 void setFromString(const std::string &value);
1159
1160 Zivid::DataModel::Detail::Optional<bool> m_opt;
1161
1162 friend struct DataModel::Detail::Befriend<Enabled>;
1163 };
1164
1165 using Descendants = std::tuple<Settings::Diagnostics::Enabled>;
1166
1169
1181#ifndef NO_DOC
1182 template<
1183 typename... Args,
1184 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1185 typename std::enable_if<
1186 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1187 value,
1188 int>::type = 0>
1189#else
1190 template<typename... Args>
1191#endif
1192 explicit Diagnostics(Args &&...args)
1193 {
1194 using namespace Zivid::Detail::TypeTraits;
1195
1196 static_assert(
1197 AllArgsDecayedAreUnique<Args...>::value,
1198 "Found duplicate types among the arguments passed to Diagnostics(...). "
1199 "Types should be listed at most once.");
1200
1201 set(std::forward<Args>(args)...);
1202 }
1203
1214#ifndef NO_DOC
1215 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1216#else
1217 template<typename... Args>
1218#endif
1219 void set(Args &&...args)
1220 {
1221 using namespace Zivid::Detail::TypeTraits;
1222
1223 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1224 static_assert(
1225 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1226
1227 static_assert(
1228 AllArgsDecayedAreUnique<Args...>::value,
1229 "Found duplicate types among the arguments passed to set(...). "
1230 "Types should be listed at most once.");
1231
1232 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1233 }
1234
1246#ifndef NO_DOC
1247 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1248#else
1249 template<typename... Args>
1250#endif
1251 Diagnostics copyWith(Args &&...args) const
1252 {
1253 using namespace Zivid::Detail::TypeTraits;
1254
1255 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1256 static_assert(
1257 AllArgsAreDescendantNodes::value,
1258 "All arguments passed to copyWith(...) must be descendant nodes.");
1259
1260 static_assert(
1261 AllArgsDecayedAreUnique<Args...>::value,
1262 "Found duplicate types among the arguments passed to copyWith(...). "
1263 "Types should be listed at most once.");
1264
1265 auto copy{ *this };
1266 copy.set(std::forward<Args>(args)...);
1267 return copy;
1268 }
1269
1271 const Enabled &isEnabled() const
1272 {
1273 return m_enabled;
1274 }
1275
1278 {
1279 return m_enabled;
1280 }
1281
1283 Diagnostics &set(const Enabled &value)
1284 {
1285 m_enabled = value;
1286 return *this;
1287 }
1288
1289 template<
1290 typename T,
1291 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
1293 {
1294 return m_enabled;
1295 }
1296
1297 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1299 {
1300 return m_enabled;
1301 }
1302
1304 template<typename F>
1305 void forEach(const F &f) const
1306 {
1307 f(m_enabled);
1308 }
1309
1311 template<typename F>
1312 void forEach(const F &f)
1313 {
1314 f(m_enabled);
1315 }
1316
1318 bool operator==(const Diagnostics &other) const;
1319
1321 bool operator!=(const Diagnostics &other) const;
1322
1324 std::string toString() const;
1325
1327 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
1328 {
1329 return stream << value.toString();
1330 }
1331
1332 private:
1333 void setFromString(const std::string &value);
1334
1335 void setFromString(const std::string &fullPath, const std::string &value);
1336
1337 std::string getString(const std::string &fullPath) const;
1338
1339 Enabled m_enabled;
1340
1341 friend struct DataModel::Detail::Befriend<Diagnostics>;
1342 };
1343
1361
1362 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1364 {
1365 public:
1367 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1368
1370 static constexpr const char *path{ "Engine" };
1371
1373 static constexpr const char *name{ "Engine" };
1374
1376 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1377
1378The Phase Engine is the fastest choice in terms of both acquisition time and total capture
1379time, and is a good compromise between quality and speed. The Phase Engine is recommended for
1380objects that are diffuse, opaque, and slightly specular, and is suitable for applications in
1381logistics such as parcel induction.
1382
1383The Stripe Engine is built for exceptional point cloud quality in scenes with highly specular
1384reflective objects. This makes the engine suitable for applications such as factory automation,
1385manufacturing, and bin picking. Additional acquisition and processing time are required for
1386the Stripe Engine.
1387
1388The Omni Engine is built for exceptional point cloud quality on all scenes, including scenes
1389with extremely specular reflective objects, as well as transparent objects. This makes the Omni
1390Engine suitable for applications such as piece picking. Same as for the Stripe Engine, it trades
1391off speed for quality. The Omni Engine is only available for Zivid 2+.
1392)description" };
1393
1395 enum class ValueType
1396 {
1397 phase,
1398 stripe,
1399 omni
1400 };
1401 static const Engine phase;
1402 static const Engine stripe;
1403 static const Engine omni;
1404
1406 static std::set<ValueType> validValues()
1407 {
1408 return { ValueType::phase, ValueType::stripe, ValueType::omni };
1409 }
1410
1412 Engine() = default;
1413
1415 explicit constexpr Engine(ValueType value)
1416 : m_opt{ verifyValue(value) }
1417 {}
1418
1424
1426 bool hasValue() const;
1427
1429 void reset();
1430
1432 std::string toString() const;
1433
1435 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1436 {
1437 return stream << Engine{ value }.toString();
1438 }
1439
1441 bool operator==(const Engine &other) const
1442 {
1443 return m_opt == other.m_opt;
1444 }
1445
1447 bool operator!=(const Engine &other) const
1448 {
1449 return m_opt != other.m_opt;
1450 }
1451
1453 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1454 {
1455 return stream << value.toString();
1456 }
1457
1458 private:
1459 void setFromString(const std::string &value);
1460
1461 constexpr ValueType static verifyValue(const ValueType &value)
1462 {
1463 return value == ValueType::phase || value == ValueType::stripe || value == ValueType::omni
1464 ? value
1465 : throw std::invalid_argument{
1466 "Invalid value: Engine{ "
1467 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1468 };
1469 }
1470
1471 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1472
1473 friend struct DataModel::Detail::Befriend<Engine>;
1474 };
1475
1477
1478 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1480 {
1481 public:
1483 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1484
1486 static constexpr const char *path{ "Processing" };
1487
1489 static constexpr const char *name{ "Processing" };
1490
1492 static constexpr const char *description{
1493 R"description(Settings related to processing of a capture, including filters and color balance.)description"
1494 };
1495
1497
1498 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1500 {
1501 public:
1503 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1504
1506 static constexpr const char *path{ "Processing/Color" };
1507
1509 static constexpr const char *name{ "Color" };
1510
1512 static constexpr const char *description{ R"description(Color settings.)description" };
1513
1515
1516 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1518 {
1519 public:
1521 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1522
1524 static constexpr const char *path{ "Processing/Color/Balance" };
1525
1527 static constexpr const char *name{ "Balance" };
1528
1530 static constexpr const char *description{ R"description(Color balance settings.)description" };
1531
1533
1534 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1536 {
1537 public:
1539 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1540
1542 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1543
1545 static constexpr const char *name{ "Blue" };
1546
1548 static constexpr const char *description{
1549 R"description(Digital gain applied to blue channel.)description"
1550 };
1551
1553 using ValueType = double;
1554
1556 static constexpr Range<double> validRange()
1557 {
1558 return { 1.0, 8.0 };
1559 }
1560
1562 Blue() = default;
1563
1565 explicit constexpr Blue(double value)
1566 : m_opt{ verifyValue(value) }
1567 {}
1568
1573 double value() const;
1574
1576 bool hasValue() const;
1577
1579 void reset();
1580
1582 std::string toString() const;
1583
1585 bool operator==(const Blue &other) const
1586 {
1587 return m_opt == other.m_opt;
1588 }
1589
1591 bool operator!=(const Blue &other) const
1592 {
1593 return m_opt != other.m_opt;
1594 }
1595
1597 bool operator<(const Blue &other) const
1598 {
1599 return m_opt < other.m_opt;
1600 }
1601
1603 bool operator>(const Blue &other) const
1604 {
1605 return m_opt > other.m_opt;
1606 }
1607
1609 bool operator<=(const Blue &other) const
1610 {
1611 return m_opt <= other.m_opt;
1612 }
1613
1615 bool operator>=(const Blue &other) const
1616 {
1617 return m_opt >= other.m_opt;
1618 }
1619
1621 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1622 {
1623 return stream << value.toString();
1624 }
1625
1626 private:
1627 void setFromString(const std::string &value);
1628
1629 constexpr ValueType static verifyValue(const ValueType &value)
1630 {
1631 return validRange().isInRange(value)
1632 ? value
1633 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1634 + " } is not in range ["
1635 + std::to_string(validRange().min()) + ", "
1636 + std::to_string(validRange().max()) + "]" };
1637 }
1638
1639 Zivid::DataModel::Detail::Optional<double> m_opt;
1640
1641 friend struct DataModel::Detail::Befriend<Blue>;
1642 };
1643
1645
1646 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1648 {
1649 public:
1651 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1652
1654 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1655
1657 static constexpr const char *name{ "Green" };
1658
1660 static constexpr const char *description{
1661 R"description(Digital gain applied to green channel.)description"
1662 };
1663
1665 using ValueType = double;
1666
1668 static constexpr Range<double> validRange()
1669 {
1670 return { 1.0, 8.0 };
1671 }
1672
1674 Green() = default;
1675
1677 explicit constexpr Green(double value)
1678 : m_opt{ verifyValue(value) }
1679 {}
1680
1685 double value() const;
1686
1688 bool hasValue() const;
1689
1691 void reset();
1692
1694 std::string toString() const;
1695
1697 bool operator==(const Green &other) const
1698 {
1699 return m_opt == other.m_opt;
1700 }
1701
1703 bool operator!=(const Green &other) const
1704 {
1705 return m_opt != other.m_opt;
1706 }
1707
1709 bool operator<(const Green &other) const
1710 {
1711 return m_opt < other.m_opt;
1712 }
1713
1715 bool operator>(const Green &other) const
1716 {
1717 return m_opt > other.m_opt;
1718 }
1719
1721 bool operator<=(const Green &other) const
1722 {
1723 return m_opt <= other.m_opt;
1724 }
1725
1727 bool operator>=(const Green &other) const
1728 {
1729 return m_opt >= other.m_opt;
1730 }
1731
1733 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1734 {
1735 return stream << value.toString();
1736 }
1737
1738 private:
1739 void setFromString(const std::string &value);
1740
1741 constexpr ValueType static verifyValue(const ValueType &value)
1742 {
1743 return validRange().isInRange(value)
1744 ? value
1745 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1746 + " } is not in range ["
1747 + std::to_string(validRange().min()) + ", "
1748 + std::to_string(validRange().max()) + "]" };
1749 }
1750
1751 Zivid::DataModel::Detail::Optional<double> m_opt;
1752
1753 friend struct DataModel::Detail::Befriend<Green>;
1754 };
1755
1757
1758 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1760 {
1761 public:
1763 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1764
1766 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1767
1769 static constexpr const char *name{ "Red" };
1770
1772 static constexpr const char *description{
1773 R"description(Digital gain applied to red channel.)description"
1774 };
1775
1777 using ValueType = double;
1778
1780 static constexpr Range<double> validRange()
1781 {
1782 return { 1.0, 8.0 };
1783 }
1784
1786 Red() = default;
1787
1789 explicit constexpr Red(double value)
1790 : m_opt{ verifyValue(value) }
1791 {}
1792
1797 double value() const;
1798
1800 bool hasValue() const;
1801
1803 void reset();
1804
1806 std::string toString() const;
1807
1809 bool operator==(const Red &other) const
1810 {
1811 return m_opt == other.m_opt;
1812 }
1813
1815 bool operator!=(const Red &other) const
1816 {
1817 return m_opt != other.m_opt;
1818 }
1819
1821 bool operator<(const Red &other) const
1822 {
1823 return m_opt < other.m_opt;
1824 }
1825
1827 bool operator>(const Red &other) const
1828 {
1829 return m_opt > other.m_opt;
1830 }
1831
1833 bool operator<=(const Red &other) const
1834 {
1835 return m_opt <= other.m_opt;
1836 }
1837
1839 bool operator>=(const Red &other) const
1840 {
1841 return m_opt >= other.m_opt;
1842 }
1843
1845 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1846 {
1847 return stream << value.toString();
1848 }
1849
1850 private:
1851 void setFromString(const std::string &value);
1852
1853 constexpr ValueType static verifyValue(const ValueType &value)
1854 {
1855 return validRange().isInRange(value)
1856 ? value
1857 : throw std::out_of_range{ "Red{ " + std::to_string(value)
1858 + " } is not in range ["
1859 + std::to_string(validRange().min()) + ", "
1860 + std::to_string(validRange().max()) + "]" };
1861 }
1862
1863 Zivid::DataModel::Detail::Optional<double> m_opt;
1864
1865 friend struct DataModel::Detail::Befriend<Red>;
1866 };
1867
1868 using Descendants = std::tuple<
1872
1875
1889#ifndef NO_DOC
1890 template<
1891 typename... Args,
1892 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1893 typename std::enable_if<
1894 Zivid::Detail::TypeTraits::
1895 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
1896 int>::type = 0>
1897#else
1898 template<typename... Args>
1899#endif
1900 explicit Balance(Args &&...args)
1901 {
1902 using namespace Zivid::Detail::TypeTraits;
1903
1904 static_assert(
1905 AllArgsDecayedAreUnique<Args...>::value,
1906 "Found duplicate types among the arguments passed to Balance(...). "
1907 "Types should be listed at most once.");
1908
1909 set(std::forward<Args>(args)...);
1910 }
1911
1924#ifndef NO_DOC
1925 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1926#else
1927 template<typename... Args>
1928#endif
1929 void set(Args &&...args)
1930 {
1931 using namespace Zivid::Detail::TypeTraits;
1932
1933 using AllArgsAreDescendantNodes =
1934 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1935 static_assert(
1936 AllArgsAreDescendantNodes::value,
1937 "All arguments passed to set(...) must be descendant nodes.");
1938
1939 static_assert(
1940 AllArgsDecayedAreUnique<Args...>::value,
1941 "Found duplicate types among the arguments passed to set(...). "
1942 "Types should be listed at most once.");
1943
1944 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1945 }
1946
1960#ifndef NO_DOC
1961 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1962#else
1963 template<typename... Args>
1964#endif
1965 Balance copyWith(Args &&...args) const
1966 {
1967 using namespace Zivid::Detail::TypeTraits;
1968
1969 using AllArgsAreDescendantNodes =
1970 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1971 static_assert(
1972 AllArgsAreDescendantNodes::value,
1973 "All arguments passed to copyWith(...) must be descendant nodes.");
1974
1975 static_assert(
1976 AllArgsDecayedAreUnique<Args...>::value,
1977 "Found duplicate types among the arguments passed to copyWith(...). "
1978 "Types should be listed at most once.");
1979
1980 auto copy{ *this };
1981 copy.set(std::forward<Args>(args)...);
1982 return copy;
1983 }
1984
1986 const Blue &blue() const
1987 {
1988 return m_blue;
1989 }
1990
1993 {
1994 return m_blue;
1995 }
1996
1998 Balance &set(const Blue &value)
1999 {
2000 m_blue = value;
2001 return *this;
2002 }
2003
2005 const Green &green() const
2006 {
2007 return m_green;
2008 }
2009
2012 {
2013 return m_green;
2014 }
2015
2017 Balance &set(const Green &value)
2018 {
2019 m_green = value;
2020 return *this;
2021 }
2022
2024 const Red &red() const
2025 {
2026 return m_red;
2027 }
2028
2031 {
2032 return m_red;
2033 }
2034
2036 Balance &set(const Red &value)
2037 {
2038 m_red = value;
2039 return *this;
2040 }
2041
2042 template<
2043 typename T,
2044 typename std::enable_if<
2045 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2046 int>::type = 0>
2048 {
2049 return m_blue;
2050 }
2051
2052 template<
2053 typename T,
2054 typename std::enable_if<
2055 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2056 int>::type = 0>
2058 {
2059 return m_green;
2060 }
2061
2062 template<
2063 typename T,
2064 typename std::
2065 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2067 {
2068 return m_red;
2069 }
2070
2071 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2073 {
2074 return m_blue;
2075 }
2076
2077 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2079 {
2080 return m_green;
2081 }
2082
2083 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2085 {
2086 return m_red;
2087 }
2088
2090 template<typename F>
2091 void forEach(const F &f) const
2092 {
2093 f(m_blue);
2094 f(m_green);
2095 f(m_red);
2096 }
2097
2099 template<typename F>
2100 void forEach(const F &f)
2101 {
2102 f(m_blue);
2103 f(m_green);
2104 f(m_red);
2105 }
2106
2108 bool operator==(const Balance &other) const;
2109
2111 bool operator!=(const Balance &other) const;
2112
2114 std::string toString() const;
2115
2117 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2118 {
2119 return stream << value.toString();
2120 }
2121
2122 private:
2123 void setFromString(const std::string &value);
2124
2125 void setFromString(const std::string &fullPath, const std::string &value);
2126
2127 std::string getString(const std::string &fullPath) const;
2128
2129 Blue m_blue;
2130 Green m_green;
2131 Red m_red;
2132
2133 friend struct DataModel::Detail::Befriend<Balance>;
2134 };
2135
2137
2138 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2140 {
2141 public:
2143 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2144
2146 static constexpr const char *path{ "Processing/Color/Experimental" };
2147
2149 static constexpr const char *name{ "Experimental" };
2150
2152 static constexpr const char *description{
2153 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2154 };
2155
2178
2179 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2181 {
2182 public:
2184 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2185
2187 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2188
2190 static constexpr const char *name{ "Mode" };
2191
2193 static constexpr const char *description{
2194 R"description(This setting controls how the color image is computed.
2195
2196`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2197single-acquisition captures and multi-acquisition captures when all the acquisitions have
2198identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2199multi-acquisition HDR captures with differing acquisition settings.
2200
2201`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2202the capture consists of more than one acquisition, then the remaining acquisitions are not used
2203for the color image. No tone mapping is performed. This option provides the most control of
2204the color image, and the color values will be consistent over repeated captures with the same
2205settings.
2206
2207`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2208HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2209image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2210applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2211normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2212mode the color values can be inconsistent over repeated captures if you move, add or remove
2213objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2214mode.
2215)description"
2216 };
2217
2219 enum class ValueType
2220 {
2221 automatic,
2222 useFirstAcquisition,
2223 toneMapping
2224 };
2225 static const Mode automatic;
2227 static const Mode toneMapping;
2228
2230 static std::set<ValueType> validValues()
2231 {
2232 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2233 }
2234
2236 Mode() = default;
2237
2239 explicit constexpr Mode(ValueType value)
2240 : m_opt{ verifyValue(value) }
2241 {}
2242
2248
2250 bool hasValue() const;
2251
2253 void reset();
2254
2256 std::string toString() const;
2257
2259 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2260 {
2261 return stream << Mode{ value }.toString();
2262 }
2263
2265 bool operator==(const Mode &other) const
2266 {
2267 return m_opt == other.m_opt;
2268 }
2269
2271 bool operator!=(const Mode &other) const
2272 {
2273 return m_opt != other.m_opt;
2274 }
2275
2277 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2278 {
2279 return stream << value.toString();
2280 }
2281
2282 private:
2283 void setFromString(const std::string &value);
2284
2285 constexpr ValueType static verifyValue(const ValueType &value)
2286 {
2287 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2288 || value == ValueType::toneMapping
2289 ? value
2290 : throw std::invalid_argument{
2291 "Invalid value: Mode{ "
2292 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2293 + " }"
2294 };
2295 }
2296
2297 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2298
2299 friend struct DataModel::Detail::Befriend<Mode>;
2300 };
2301
2302 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2303
2306
2318#ifndef NO_DOC
2319 template<
2320 typename... Args,
2321 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2322 typename std::enable_if<
2323 Zivid::Detail::TypeTraits::
2324 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2325 int>::type = 0>
2326#else
2327 template<typename... Args>
2328#endif
2329 explicit Experimental(Args &&...args)
2330 {
2331 using namespace Zivid::Detail::TypeTraits;
2332
2333 static_assert(
2334 AllArgsDecayedAreUnique<Args...>::value,
2335 "Found duplicate types among the arguments passed to Experimental(...). "
2336 "Types should be listed at most once.");
2337
2338 set(std::forward<Args>(args)...);
2339 }
2340
2351#ifndef NO_DOC
2352 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2353#else
2354 template<typename... Args>
2355#endif
2356 void set(Args &&...args)
2357 {
2358 using namespace Zivid::Detail::TypeTraits;
2359
2360 using AllArgsAreDescendantNodes =
2361 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2362 static_assert(
2363 AllArgsAreDescendantNodes::value,
2364 "All arguments passed to set(...) must be descendant nodes.");
2365
2366 static_assert(
2367 AllArgsDecayedAreUnique<Args...>::value,
2368 "Found duplicate types among the arguments passed to set(...). "
2369 "Types should be listed at most once.");
2370
2371 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2372 }
2373
2385#ifndef NO_DOC
2386 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2387#else
2388 template<typename... Args>
2389#endif
2390 Experimental copyWith(Args &&...args) const
2391 {
2392 using namespace Zivid::Detail::TypeTraits;
2393
2394 using AllArgsAreDescendantNodes =
2395 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2396 static_assert(
2397 AllArgsAreDescendantNodes::value,
2398 "All arguments passed to copyWith(...) must be descendant nodes.");
2399
2400 static_assert(
2401 AllArgsDecayedAreUnique<Args...>::value,
2402 "Found duplicate types among the arguments passed to copyWith(...). "
2403 "Types should be listed at most once.");
2404
2405 auto copy{ *this };
2406 copy.set(std::forward<Args>(args)...);
2407 return copy;
2408 }
2409
2411 const Mode &mode() const
2412 {
2413 return m_mode;
2414 }
2415
2418 {
2419 return m_mode;
2420 }
2421
2423 Experimental &set(const Mode &value)
2424 {
2425 m_mode = value;
2426 return *this;
2427 }
2428
2429 template<
2430 typename T,
2431 typename std::enable_if<
2432 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2433 int>::type = 0>
2435 {
2436 return m_mode;
2437 }
2438
2439 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2441 {
2442 return m_mode;
2443 }
2444
2446 template<typename F>
2447 void forEach(const F &f) const
2448 {
2449 f(m_mode);
2450 }
2451
2453 template<typename F>
2454 void forEach(const F &f)
2455 {
2456 f(m_mode);
2457 }
2458
2460 bool operator==(const Experimental &other) const;
2461
2463 bool operator!=(const Experimental &other) const;
2464
2466 std::string toString() const;
2467
2469 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2470 {
2471 return stream << value.toString();
2472 }
2473
2474 private:
2475 void setFromString(const std::string &value);
2476
2477 void setFromString(const std::string &fullPath, const std::string &value);
2478
2479 std::string getString(const std::string &fullPath) const;
2480
2481 Mode m_mode;
2482
2483 friend struct DataModel::Detail::Befriend<Experimental>;
2484 };
2485
2489
2490 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2492 {
2493 public:
2495 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2496
2498 static constexpr const char *path{ "Processing/Color/Gamma" };
2499
2501 static constexpr const char *name{ "Gamma" };
2502
2504 static constexpr const char *description{
2505 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2506greater than 1 makes the colors darker.
2507)description"
2508 };
2509
2511 using ValueType = double;
2512
2514 static constexpr Range<double> validRange()
2515 {
2516 return { 0.25, 1.5 };
2517 }
2518
2520 Gamma() = default;
2521
2523 explicit constexpr Gamma(double value)
2524 : m_opt{ verifyValue(value) }
2525 {}
2526
2531 double value() const;
2532
2534 bool hasValue() const;
2535
2537 void reset();
2538
2540 std::string toString() const;
2541
2543 bool operator==(const Gamma &other) const
2544 {
2545 return m_opt == other.m_opt;
2546 }
2547
2549 bool operator!=(const Gamma &other) const
2550 {
2551 return m_opt != other.m_opt;
2552 }
2553
2555 bool operator<(const Gamma &other) const
2556 {
2557 return m_opt < other.m_opt;
2558 }
2559
2561 bool operator>(const Gamma &other) const
2562 {
2563 return m_opt > other.m_opt;
2564 }
2565
2567 bool operator<=(const Gamma &other) const
2568 {
2569 return m_opt <= other.m_opt;
2570 }
2571
2573 bool operator>=(const Gamma &other) const
2574 {
2575 return m_opt >= other.m_opt;
2576 }
2577
2579 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2580 {
2581 return stream << value.toString();
2582 }
2583
2584 private:
2585 void setFromString(const std::string &value);
2586
2587 constexpr ValueType static verifyValue(const ValueType &value)
2588 {
2589 return validRange().isInRange(value)
2590 ? value
2591 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2592 + std::to_string(validRange().min()) + ", "
2593 + std::to_string(validRange().max()) + "]" };
2594 }
2595
2596 Zivid::DataModel::Detail::Optional<double> m_opt;
2597
2598 friend struct DataModel::Detail::Befriend<Gamma>;
2599 };
2600
2601 using Descendants = std::tuple<
2609
2612
2630#ifndef NO_DOC
2631 template<
2632 typename... Args,
2633 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2634 typename std::enable_if<
2635 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2636 value,
2637 int>::type = 0>
2638#else
2639 template<typename... Args>
2640#endif
2641 explicit Color(Args &&...args)
2642 {
2643 using namespace Zivid::Detail::TypeTraits;
2644
2645 static_assert(
2646 AllArgsDecayedAreUnique<Args...>::value,
2647 "Found duplicate types among the arguments passed to Color(...). "
2648 "Types should be listed at most once.");
2649
2650 set(std::forward<Args>(args)...);
2651 }
2652
2669#ifndef NO_DOC
2670 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2671#else
2672 template<typename... Args>
2673#endif
2674 void set(Args &&...args)
2675 {
2676 using namespace Zivid::Detail::TypeTraits;
2677
2678 using AllArgsAreDescendantNodes =
2679 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2680 static_assert(
2681 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2682
2683 static_assert(
2684 AllArgsDecayedAreUnique<Args...>::value,
2685 "Found duplicate types among the arguments passed to set(...). "
2686 "Types should be listed at most once.");
2687
2688 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2689 }
2690
2708#ifndef NO_DOC
2709 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2710#else
2711 template<typename... Args>
2712#endif
2713 Color copyWith(Args &&...args) const
2714 {
2715 using namespace Zivid::Detail::TypeTraits;
2716
2717 using AllArgsAreDescendantNodes =
2718 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2719 static_assert(
2720 AllArgsAreDescendantNodes::value,
2721 "All arguments passed to copyWith(...) must be descendant nodes.");
2722
2723 static_assert(
2724 AllArgsDecayedAreUnique<Args...>::value,
2725 "Found duplicate types among the arguments passed to copyWith(...). "
2726 "Types should be listed at most once.");
2727
2728 auto copy{ *this };
2729 copy.set(std::forward<Args>(args)...);
2730 return copy;
2731 }
2732
2734 const Balance &balance() const
2735 {
2736 return m_balance;
2737 }
2738
2741 {
2742 return m_balance;
2743 }
2744
2746 Color &set(const Balance &value)
2747 {
2748 m_balance = value;
2749 return *this;
2750 }
2751
2753 Color &set(const Balance::Blue &value)
2754 {
2755 m_balance.set(value);
2756 return *this;
2757 }
2758
2760 Color &set(const Balance::Green &value)
2761 {
2762 m_balance.set(value);
2763 return *this;
2764 }
2765
2767 Color &set(const Balance::Red &value)
2768 {
2769 m_balance.set(value);
2770 return *this;
2771 }
2772
2775 {
2776 return m_experimental;
2777 }
2778
2781 {
2782 return m_experimental;
2783 }
2784
2786 Color &set(const Experimental &value)
2787 {
2788 m_experimental = value;
2789 return *this;
2790 }
2791
2794 {
2795 m_experimental.set(value);
2796 return *this;
2797 }
2798
2800 const Gamma &gamma() const
2801 {
2802 return m_gamma;
2803 }
2804
2807 {
2808 return m_gamma;
2809 }
2810
2812 Color &set(const Gamma &value)
2813 {
2814 m_gamma = value;
2815 return *this;
2816 }
2817
2818 template<
2819 typename T,
2820 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
2821 0>
2823 {
2824 return m_balance;
2825 }
2826
2827 template<
2828 typename T,
2829 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
2830 type = 0>
2832 {
2833 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
2834 }
2835
2836 template<
2837 typename T,
2838 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
2839 type = 0>
2841 {
2842 return m_balance.get<Settings::Processing::Color::Balance::Green>();
2843 }
2844
2845 template<
2846 typename T,
2847 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
2848 type = 0>
2850 {
2851 return m_balance.get<Settings::Processing::Color::Balance::Red>();
2852 }
2853
2854 template<
2855 typename T,
2856 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
2857 type = 0>
2859 {
2860 return m_experimental;
2861 }
2862
2863 template<
2864 typename T,
2865 typename std::enable_if<
2866 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2867 int>::type = 0>
2869 {
2870 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
2871 }
2872
2873 template<
2874 typename T,
2875 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
2877 {
2878 return m_gamma;
2879 }
2880
2881 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2883 {
2884 return m_balance;
2885 }
2886
2887 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2889 {
2890 return m_experimental;
2891 }
2892
2893 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2895 {
2896 return m_gamma;
2897 }
2898
2900 template<typename F>
2901 void forEach(const F &f) const
2902 {
2903 f(m_balance);
2904 f(m_experimental);
2905 f(m_gamma);
2906 }
2907
2909 template<typename F>
2910 void forEach(const F &f)
2911 {
2912 f(m_balance);
2913 f(m_experimental);
2914 f(m_gamma);
2915 }
2916
2918 bool operator==(const Color &other) const;
2919
2921 bool operator!=(const Color &other) const;
2922
2924 std::string toString() const;
2925
2927 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
2928 {
2929 return stream << value.toString();
2930 }
2931
2932 private:
2933 void setFromString(const std::string &value);
2934
2935 void setFromString(const std::string &fullPath, const std::string &value);
2936
2937 std::string getString(const std::string &fullPath) const;
2938
2939 Balance m_balance;
2940 Experimental m_experimental;
2941 Gamma m_gamma;
2942
2943 friend struct DataModel::Detail::Befriend<Color>;
2944 };
2945
2947
2948 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2950 {
2951 public:
2953 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2954
2956 static constexpr const char *path{ "Processing/Filters" };
2957
2959 static constexpr const char *name{ "Filters" };
2960
2962 static constexpr const char *description{ R"description(Filter settings.)description" };
2963
2966
2967 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2969 {
2970 public:
2972 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2973
2975 static constexpr const char *path{ "Processing/Filters/Cluster" };
2976
2978 static constexpr const char *name{ "Cluster" };
2979
2981 static constexpr const char *description{
2982 R"description(Removes floating points and isolated clusters from the point cloud.
2983)description"
2984 };
2985
2987
2988 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2990 {
2991 public:
2993 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2994
2996 static constexpr const char *path{ "Processing/Filters/Cluster/Removal" };
2997
2999 static constexpr const char *name{ "Removal" };
3000
3002 static constexpr const char *description{ R"description(Cluster removal filter.)description" };
3003
3005
3006 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3008 {
3009 public:
3011 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3012
3014 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/Enabled" };
3015
3017 static constexpr const char *name{ "Enabled" };
3018
3020 static constexpr const char *description{
3021 R"description(Enable or disable cluster removal.)description"
3022 };
3023
3025 using ValueType = bool;
3026 static const Enabled yes;
3027 static const Enabled no;
3028
3030 static std::set<bool> validValues()
3031 {
3032 return { false, true };
3033 }
3034
3036 Enabled() = default;
3037
3039 explicit constexpr Enabled(bool value)
3040 : m_opt{ value }
3041 {}
3042
3047 bool value() const;
3048
3050 bool hasValue() const;
3051
3053 void reset();
3054
3056 std::string toString() const;
3057
3059 bool operator==(const Enabled &other) const
3060 {
3061 return m_opt == other.m_opt;
3062 }
3063
3065 bool operator!=(const Enabled &other) const
3066 {
3067 return m_opt != other.m_opt;
3068 }
3069
3071 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3072 {
3073 return stream << value.toString();
3074 }
3075
3076 private:
3077 void setFromString(const std::string &value);
3078
3079 Zivid::DataModel::Detail::Optional<bool> m_opt;
3080
3081 friend struct DataModel::Detail::Befriend<Enabled>;
3082 };
3083
3088
3089 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3091 {
3092 public:
3094 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3095
3097 static constexpr const char *path{
3098 "Processing/Filters/Cluster/Removal/MaxNeighborDistance"
3099 };
3100
3102 static constexpr const char *name{ "MaxNeighborDistance" };
3103
3105 static constexpr const char *description{
3106 R"description(Maximum normalized distance between neighboring points that are still classified as
3107belonging to the same cluster. The default value is optimal for most scenes. On messy
3108scenes turning this setting down helps removing more bad points.
3109)description"
3110 };
3111
3113 using ValueType = double;
3114
3116 static constexpr Range<double> validRange()
3117 {
3118 return { 2.0, 10.0 };
3119 }
3120
3123
3125 explicit constexpr MaxNeighborDistance(double value)
3126 : m_opt{ verifyValue(value) }
3127 {}
3128
3133 double value() const;
3134
3136 bool hasValue() const;
3137
3139 void reset();
3140
3142 std::string toString() const;
3143
3145 bool operator==(const MaxNeighborDistance &other) const
3146 {
3147 return m_opt == other.m_opt;
3148 }
3149
3151 bool operator!=(const MaxNeighborDistance &other) const
3152 {
3153 return m_opt != other.m_opt;
3154 }
3155
3157 bool operator<(const MaxNeighborDistance &other) const
3158 {
3159 return m_opt < other.m_opt;
3160 }
3161
3163 bool operator>(const MaxNeighborDistance &other) const
3164 {
3165 return m_opt > other.m_opt;
3166 }
3167
3169 bool operator<=(const MaxNeighborDistance &other) const
3170 {
3171 return m_opt <= other.m_opt;
3172 }
3173
3175 bool operator>=(const MaxNeighborDistance &other) const
3176 {
3177 return m_opt >= other.m_opt;
3178 }
3179
3181 friend std::ostream &operator<<(std::ostream &stream, const MaxNeighborDistance &value)
3182 {
3183 return stream << value.toString();
3184 }
3185
3186 private:
3187 void setFromString(const std::string &value);
3188
3189 constexpr ValueType static verifyValue(const ValueType &value)
3190 {
3191 return validRange().isInRange(value)
3192 ? value
3193 : throw std::out_of_range{ "MaxNeighborDistance{ " + std::to_string(value)
3194 + " } is not in range ["
3195 + std::to_string(validRange().min()) + ", "
3196 + std::to_string(validRange().max()) + "]" };
3197 }
3198
3199 Zivid::DataModel::Detail::Optional<double> m_opt;
3200
3201 friend struct DataModel::Detail::Befriend<MaxNeighborDistance>;
3202 };
3203
3207
3208 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3210 {
3211 public:
3213 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3214
3216 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/MinArea" };
3217
3219 static constexpr const char *name{ "MinArea" };
3220
3222 static constexpr const char *description{
3223 R"description(Clusters with area below this threshold are removed by the filter.
3224The area is given in mm^2.
3225)description"
3226 };
3227
3229 using ValueType = double;
3230
3232 static constexpr Range<double> validRange()
3233 {
3234 return { 0.0, 1500.0 };
3235 }
3236
3238 MinArea() = default;
3239
3241 explicit constexpr MinArea(double value)
3242 : m_opt{ verifyValue(value) }
3243 {}
3244
3249 double value() const;
3250
3252 bool hasValue() const;
3253
3255 void reset();
3256
3258 std::string toString() const;
3259
3261 bool operator==(const MinArea &other) const
3262 {
3263 return m_opt == other.m_opt;
3264 }
3265
3267 bool operator!=(const MinArea &other) const
3268 {
3269 return m_opt != other.m_opt;
3270 }
3271
3273 bool operator<(const MinArea &other) const
3274 {
3275 return m_opt < other.m_opt;
3276 }
3277
3279 bool operator>(const MinArea &other) const
3280 {
3281 return m_opt > other.m_opt;
3282 }
3283
3285 bool operator<=(const MinArea &other) const
3286 {
3287 return m_opt <= other.m_opt;
3288 }
3289
3291 bool operator>=(const MinArea &other) const
3292 {
3293 return m_opt >= other.m_opt;
3294 }
3295
3297 friend std::ostream &operator<<(std::ostream &stream, const MinArea &value)
3298 {
3299 return stream << value.toString();
3300 }
3301
3302 private:
3303 void setFromString(const std::string &value);
3304
3305 constexpr ValueType static verifyValue(const ValueType &value)
3306 {
3307 return validRange().isInRange(value)
3308 ? value
3309 : throw std::out_of_range{ "MinArea{ " + std::to_string(value)
3310 + " } is not in range ["
3311 + std::to_string(validRange().min()) + ", "
3312 + std::to_string(validRange().max()) + "]" };
3313 }
3314
3315 Zivid::DataModel::Detail::Optional<double> m_opt;
3316
3317 friend struct DataModel::Detail::Befriend<MinArea>;
3318 };
3319
3320 using Descendants = std::tuple<
3324
3327
3341#ifndef NO_DOC
3342 template<
3343 typename... Args,
3344 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3345 typename std::enable_if<
3346 Zivid::Detail::TypeTraits::
3347 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3348 int>::type = 0>
3349#else
3350 template<typename... Args>
3351#endif
3352 explicit Removal(Args &&...args)
3353 {
3354 using namespace Zivid::Detail::TypeTraits;
3355
3356 static_assert(
3357 AllArgsDecayedAreUnique<Args...>::value,
3358 "Found duplicate types among the arguments passed to Removal(...). "
3359 "Types should be listed at most once.");
3360
3361 set(std::forward<Args>(args)...);
3362 }
3363
3376#ifndef NO_DOC
3377 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3378#else
3379 template<typename... Args>
3380#endif
3381 void set(Args &&...args)
3382 {
3383 using namespace Zivid::Detail::TypeTraits;
3384
3385 using AllArgsAreDescendantNodes =
3386 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3387 static_assert(
3388 AllArgsAreDescendantNodes::value,
3389 "All arguments passed to set(...) must be descendant nodes.");
3390
3391 static_assert(
3392 AllArgsDecayedAreUnique<Args...>::value,
3393 "Found duplicate types among the arguments passed to set(...). "
3394 "Types should be listed at most once.");
3395
3396 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3397 }
3398
3412#ifndef NO_DOC
3413 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3414#else
3415 template<typename... Args>
3416#endif
3417 Removal copyWith(Args &&...args) const
3418 {
3419 using namespace Zivid::Detail::TypeTraits;
3420
3421 using AllArgsAreDescendantNodes =
3422 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3423 static_assert(
3424 AllArgsAreDescendantNodes::value,
3425 "All arguments passed to copyWith(...) must be descendant nodes.");
3426
3427 static_assert(
3428 AllArgsDecayedAreUnique<Args...>::value,
3429 "Found duplicate types among the arguments passed to copyWith(...). "
3430 "Types should be listed at most once.");
3431
3432 auto copy{ *this };
3433 copy.set(std::forward<Args>(args)...);
3434 return copy;
3435 }
3436
3438 const Enabled &isEnabled() const
3439 {
3440 return m_enabled;
3441 }
3442
3445 {
3446 return m_enabled;
3447 }
3448
3450 Removal &set(const Enabled &value)
3451 {
3452 m_enabled = value;
3453 return *this;
3454 }
3455
3458 {
3459 return m_maxNeighborDistance;
3460 }
3461
3464 {
3465 return m_maxNeighborDistance;
3466 }
3467
3470 {
3471 m_maxNeighborDistance = value;
3472 return *this;
3473 }
3474
3476 const MinArea &minArea() const
3477 {
3478 return m_minArea;
3479 }
3480
3483 {
3484 return m_minArea;
3485 }
3486
3488 Removal &set(const MinArea &value)
3489 {
3490 m_minArea = value;
3491 return *this;
3492 }
3493
3494 template<
3495 typename T,
3496 typename std::enable_if<
3497 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3498 int>::type = 0>
3500 {
3501 return m_enabled;
3502 }
3503
3504 template<
3505 typename T,
3506 typename std::enable_if<
3507 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3508 value,
3509 int>::type = 0>
3511 {
3512 return m_maxNeighborDistance;
3513 }
3514
3515 template<
3516 typename T,
3517 typename std::enable_if<
3518 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3519 int>::type = 0>
3521 {
3522 return m_minArea;
3523 }
3524
3525 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3527 {
3528 return m_enabled;
3529 }
3530
3531 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3533 {
3534 return m_maxNeighborDistance;
3535 }
3536
3537 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3539 {
3540 return m_minArea;
3541 }
3542
3544 template<typename F>
3545 void forEach(const F &f) const
3546 {
3547 f(m_enabled);
3548 f(m_maxNeighborDistance);
3549 f(m_minArea);
3550 }
3551
3553 template<typename F>
3554 void forEach(const F &f)
3555 {
3556 f(m_enabled);
3557 f(m_maxNeighborDistance);
3558 f(m_minArea);
3559 }
3560
3562 bool operator==(const Removal &other) const;
3563
3565 bool operator!=(const Removal &other) const;
3566
3568 std::string toString() const;
3569
3571 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3572 {
3573 return stream << value.toString();
3574 }
3575
3576 private:
3577 void setFromString(const std::string &value);
3578
3579 void setFromString(const std::string &fullPath, const std::string &value);
3580
3581 std::string getString(const std::string &fullPath) const;
3582
3583 Enabled m_enabled;
3584 MaxNeighborDistance m_maxNeighborDistance;
3585 MinArea m_minArea;
3586
3587 friend struct DataModel::Detail::Befriend<Removal>;
3588 };
3589
3590 using Descendants = std::tuple<
3595
3598
3613#ifndef NO_DOC
3614 template<
3615 typename... Args,
3616 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3617 typename std::enable_if<
3618 Zivid::Detail::TypeTraits::
3619 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3620 int>::type = 0>
3621#else
3622 template<typename... Args>
3623#endif
3624 explicit Cluster(Args &&...args)
3625 {
3626 using namespace Zivid::Detail::TypeTraits;
3627
3628 static_assert(
3629 AllArgsDecayedAreUnique<Args...>::value,
3630 "Found duplicate types among the arguments passed to Cluster(...). "
3631 "Types should be listed at most once.");
3632
3633 set(std::forward<Args>(args)...);
3634 }
3635
3649#ifndef NO_DOC
3650 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3651#else
3652 template<typename... Args>
3653#endif
3654 void set(Args &&...args)
3655 {
3656 using namespace Zivid::Detail::TypeTraits;
3657
3658 using AllArgsAreDescendantNodes =
3659 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3660 static_assert(
3661 AllArgsAreDescendantNodes::value,
3662 "All arguments passed to set(...) must be descendant nodes.");
3663
3664 static_assert(
3665 AllArgsDecayedAreUnique<Args...>::value,
3666 "Found duplicate types among the arguments passed to set(...). "
3667 "Types should be listed at most once.");
3668
3669 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3670 }
3671
3686#ifndef NO_DOC
3687 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3688#else
3689 template<typename... Args>
3690#endif
3691 Cluster copyWith(Args &&...args) const
3692 {
3693 using namespace Zivid::Detail::TypeTraits;
3694
3695 using AllArgsAreDescendantNodes =
3696 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3697 static_assert(
3698 AllArgsAreDescendantNodes::value,
3699 "All arguments passed to copyWith(...) must be descendant nodes.");
3700
3701 static_assert(
3702 AllArgsDecayedAreUnique<Args...>::value,
3703 "Found duplicate types among the arguments passed to copyWith(...). "
3704 "Types should be listed at most once.");
3705
3706 auto copy{ *this };
3707 copy.set(std::forward<Args>(args)...);
3708 return copy;
3709 }
3710
3712 const Removal &removal() const
3713 {
3714 return m_removal;
3715 }
3716
3719 {
3720 return m_removal;
3721 }
3722
3724 Cluster &set(const Removal &value)
3725 {
3726 m_removal = value;
3727 return *this;
3728 }
3729
3732 {
3733 m_removal.set(value);
3734 return *this;
3735 }
3736
3739 {
3740 m_removal.set(value);
3741 return *this;
3742 }
3743
3746 {
3747 m_removal.set(value);
3748 return *this;
3749 }
3750
3751 template<
3752 typename T,
3753 typename std::enable_if<
3754 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
3755 int>::type = 0>
3757 {
3758 return m_removal;
3759 }
3760
3761 template<
3762 typename T,
3763 typename std::enable_if<
3764 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3765 int>::type = 0>
3767 {
3769 }
3770
3771 template<
3772 typename T,
3773 typename std::enable_if<
3774 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3775 value,
3776 int>::type = 0>
3778 {
3780 }
3781
3782 template<
3783 typename T,
3784 typename std::enable_if<
3785 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3786 int>::type = 0>
3788 {
3790 }
3791
3792 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3794 {
3795 return m_removal;
3796 }
3797
3799 template<typename F>
3800 void forEach(const F &f) const
3801 {
3802 f(m_removal);
3803 }
3804
3806 template<typename F>
3807 void forEach(const F &f)
3808 {
3809 f(m_removal);
3810 }
3811
3813 bool operator==(const Cluster &other) const;
3814
3816 bool operator!=(const Cluster &other) const;
3817
3819 std::string toString() const;
3820
3822 friend std::ostream &operator<<(std::ostream &stream, const Cluster &value)
3823 {
3824 return stream << value.toString();
3825 }
3826
3827 private:
3828 void setFromString(const std::string &value);
3829
3830 void setFromString(const std::string &fullPath, const std::string &value);
3831
3832 std::string getString(const std::string &fullPath) const;
3833
3834 Removal m_removal;
3835
3836 friend struct DataModel::Detail::Befriend<Cluster>;
3837 };
3838
3840
3841 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3843 {
3844 public:
3846 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3847
3849 static constexpr const char *path{ "Processing/Filters/Experimental" };
3850
3852 static constexpr const char *name{ "Experimental" };
3853
3855 static constexpr const char *description{
3856 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
3857 };
3858
3864
3865 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3867 {
3868 public:
3870 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3871
3873 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
3874
3876 static constexpr const char *name{ "ContrastDistortion" };
3877
3879 static constexpr const char *description{
3880 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
3881or high contrast. These artifacts are caused by blurring in the lens. The filter
3882works best when aperture values are chosen such that the camera has quite good focus.
3883The filter also supports removing the points that experience a large correction.
3884)description"
3885 };
3886
3888
3889 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3891 {
3892 public:
3894 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3895
3897 static constexpr const char *path{
3898 "Processing/Filters/Experimental/ContrastDistortion/Correction"
3899 };
3900
3902 static constexpr const char *name{ "Correction" };
3903
3905 static constexpr const char *description{
3906 R"description(Contrast distortion correction filter.)description"
3907 };
3908
3910
3911 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3913 {
3914 public:
3916 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3917
3919 static constexpr const char *path{
3920 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
3921 };
3922
3924 static constexpr const char *name{ "Enabled" };
3925
3927 static constexpr const char *description{
3928 R"description(Enable or disable contrast distortion correction.)description"
3929 };
3930
3932 using ValueType = bool;
3933 static const Enabled yes;
3934 static const Enabled no;
3935
3937 static std::set<bool> validValues()
3938 {
3939 return { false, true };
3940 }
3941
3943 Enabled() = default;
3944
3946 explicit constexpr Enabled(bool value)
3947 : m_opt{ value }
3948 {}
3949
3954 bool value() const;
3955
3957 bool hasValue() const;
3958
3960 void reset();
3961
3963 std::string toString() const;
3964
3966 bool operator==(const Enabled &other) const
3967 {
3968 return m_opt == other.m_opt;
3969 }
3970
3972 bool operator!=(const Enabled &other) const
3973 {
3974 return m_opt != other.m_opt;
3975 }
3976
3978 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3979 {
3980 return stream << value.toString();
3981 }
3982
3983 private:
3984 void setFromString(const std::string &value);
3985
3986 Zivid::DataModel::Detail::Optional<bool> m_opt;
3987
3988 friend struct DataModel::Detail::Befriend<Enabled>;
3989 };
3990
3992
3993 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3995 {
3996 public:
3998 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3999
4001 static constexpr const char *path{
4002 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
4003 };
4004
4006 static constexpr const char *name{ "Strength" };
4007
4009 static constexpr const char *description{
4010 R"description(Strength of correction. Higher values give more correction.)description"
4011 };
4012
4014 using ValueType = double;
4015
4017 static constexpr Range<double> validRange()
4018 {
4019 return { 0.0, 1.0 };
4020 }
4021
4023 Strength() = default;
4024
4026 explicit constexpr Strength(double value)
4027 : m_opt{ verifyValue(value) }
4028 {}
4029
4034 double value() const;
4035
4037 bool hasValue() const;
4038
4040 void reset();
4041
4043 std::string toString() const;
4044
4046 bool operator==(const Strength &other) const
4047 {
4048 return m_opt == other.m_opt;
4049 }
4050
4052 bool operator!=(const Strength &other) const
4053 {
4054 return m_opt != other.m_opt;
4055 }
4056
4058 bool operator<(const Strength &other) const
4059 {
4060 return m_opt < other.m_opt;
4061 }
4062
4064 bool operator>(const Strength &other) const
4065 {
4066 return m_opt > other.m_opt;
4067 }
4068
4070 bool operator<=(const Strength &other) const
4071 {
4072 return m_opt <= other.m_opt;
4073 }
4074
4076 bool operator>=(const Strength &other) const
4077 {
4078 return m_opt >= other.m_opt;
4079 }
4080
4082 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
4083 {
4084 return stream << value.toString();
4085 }
4086
4087 private:
4088 void setFromString(const std::string &value);
4089
4090 constexpr ValueType static verifyValue(const ValueType &value)
4091 {
4092 return validRange().isInRange(value)
4093 ? value
4094 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
4095 + " } is not in range ["
4096 + std::to_string(validRange().min()) + ", "
4097 + std::to_string(validRange().max()) + "]" };
4098 }
4099
4100 Zivid::DataModel::Detail::Optional<double> m_opt;
4101
4102 friend struct DataModel::Detail::Befriend<Strength>;
4103 };
4104
4105 using Descendants = std::tuple<
4108
4111
4124#ifndef NO_DOC
4125 template<
4126 typename... Args,
4127 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4128 typename std::enable_if<
4129 Zivid::Detail::TypeTraits::
4130 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4131 int>::type = 0>
4132#else
4133 template<typename... Args>
4134#endif
4135 explicit Correction(Args &&...args)
4136 {
4137 using namespace Zivid::Detail::TypeTraits;
4138
4139 static_assert(
4140 AllArgsDecayedAreUnique<Args...>::value,
4141 "Found duplicate types among the arguments passed to Correction(...). "
4142 "Types should be listed at most once.");
4143
4144 set(std::forward<Args>(args)...);
4145 }
4146
4158#ifndef NO_DOC
4159 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4160#else
4161 template<typename... Args>
4162#endif
4163 void set(Args &&...args)
4164 {
4165 using namespace Zivid::Detail::TypeTraits;
4166
4167 using AllArgsAreDescendantNodes =
4168 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4169 static_assert(
4170 AllArgsAreDescendantNodes::value,
4171 "All arguments passed to set(...) must be descendant nodes.");
4172
4173 static_assert(
4174 AllArgsDecayedAreUnique<Args...>::value,
4175 "Found duplicate types among the arguments passed to set(...). "
4176 "Types should be listed at most once.");
4177
4178 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4179 }
4180
4193#ifndef NO_DOC
4194 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4195#else
4196 template<typename... Args>
4197#endif
4198 Correction copyWith(Args &&...args) const
4199 {
4200 using namespace Zivid::Detail::TypeTraits;
4201
4202 using AllArgsAreDescendantNodes =
4203 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4204 static_assert(
4205 AllArgsAreDescendantNodes::value,
4206 "All arguments passed to copyWith(...) must be descendant nodes.");
4207
4208 static_assert(
4209 AllArgsDecayedAreUnique<Args...>::value,
4210 "Found duplicate types among the arguments passed to copyWith(...). "
4211 "Types should be listed at most once.");
4212
4213 auto copy{ *this };
4214 copy.set(std::forward<Args>(args)...);
4215 return copy;
4216 }
4217
4219 const Enabled &isEnabled() const
4220 {
4221 return m_enabled;
4222 }
4223
4226 {
4227 return m_enabled;
4228 }
4229
4231 Correction &set(const Enabled &value)
4232 {
4233 m_enabled = value;
4234 return *this;
4235 }
4236
4238 const Strength &strength() const
4239 {
4240 return m_strength;
4241 }
4242
4245 {
4246 return m_strength;
4247 }
4248
4250 Correction &set(const Strength &value)
4251 {
4252 m_strength = value;
4253 return *this;
4254 }
4255
4256 template<
4257 typename T,
4258 typename std::enable_if<
4259 std::is_same<
4260 T,
4261 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4262 Enabled>::value,
4263 int>::type = 0>
4265 get() const
4266 {
4267 return m_enabled;
4268 }
4269
4270 template<
4271 typename T,
4272 typename std::enable_if<
4273 std::is_same<
4274 T,
4275 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4276 Strength>::value,
4277 int>::type = 0>
4278 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4279 Strength &
4280 get() const
4281 {
4282 return m_strength;
4283 }
4284
4285 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4287 get() const
4288 {
4289 return m_enabled;
4290 }
4291
4292 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4293 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4294 Strength &
4295 get() const
4296 {
4297 return m_strength;
4298 }
4299
4301 template<typename F>
4302 void forEach(const F &f) const
4303 {
4304 f(m_enabled);
4305 f(m_strength);
4306 }
4307
4309 template<typename F>
4310 void forEach(const F &f)
4311 {
4312 f(m_enabled);
4313 f(m_strength);
4314 }
4315
4317 bool operator==(const Correction &other) const;
4318
4320 bool operator!=(const Correction &other) const;
4321
4323 std::string toString() const;
4324
4326 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
4327 {
4328 return stream << value.toString();
4329 }
4330
4331 private:
4332 void setFromString(const std::string &value);
4333
4334 void setFromString(const std::string &fullPath, const std::string &value);
4335
4336 std::string getString(const std::string &fullPath) const;
4337
4338 Enabled m_enabled;
4339 Strength m_strength;
4340
4341 friend struct DataModel::Detail::Befriend<Correction>;
4342 };
4343
4345
4346 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4348 {
4349 public:
4351 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4352
4354 static constexpr const char *path{
4355 "Processing/Filters/Experimental/ContrastDistortion/Removal"
4356 };
4357
4359 static constexpr const char *name{ "Removal" };
4360
4362 static constexpr const char *description{
4363 R"description(Contrast distortion removal filter.)description"
4364 };
4365
4367
4368 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4370 {
4371 public:
4373 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4374
4376 static constexpr const char *path{
4377 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
4378 };
4379
4381 static constexpr const char *name{ "Enabled" };
4382
4384 static constexpr const char *description{
4385 R"description(Enable or disable contrast distortion removal.)description"
4386 };
4387
4389 using ValueType = bool;
4390 static const Enabled yes;
4391 static const Enabled no;
4392
4394 static std::set<bool> validValues()
4395 {
4396 return { false, true };
4397 }
4398
4400 Enabled() = default;
4401
4403 explicit constexpr Enabled(bool value)
4404 : m_opt{ value }
4405 {}
4406
4411 bool value() const;
4412
4414 bool hasValue() const;
4415
4417 void reset();
4418
4420 std::string toString() const;
4421
4423 bool operator==(const Enabled &other) const
4424 {
4425 return m_opt == other.m_opt;
4426 }
4427
4429 bool operator!=(const Enabled &other) const
4430 {
4431 return m_opt != other.m_opt;
4432 }
4433
4435 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4436 {
4437 return stream << value.toString();
4438 }
4439
4440 private:
4441 void setFromString(const std::string &value);
4442
4443 Zivid::DataModel::Detail::Optional<bool> m_opt;
4444
4445 friend struct DataModel::Detail::Befriend<Enabled>;
4446 };
4447
4449
4450 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4452 {
4453 public:
4455 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4456
4458 static constexpr const char *path{
4459 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
4460 };
4461
4463 static constexpr const char *name{ "Threshold" };
4464
4466 static constexpr const char *description{
4467 R"description(Threshold for removal. Higher values remove more points.)description"
4468 };
4469
4471 using ValueType = double;
4472
4474 static constexpr Range<double> validRange()
4475 {
4476 return { 0.0, 1.0 };
4477 }
4478
4480 Threshold() = default;
4481
4483 explicit constexpr Threshold(double value)
4484 : m_opt{ verifyValue(value) }
4485 {}
4486
4491 double value() const;
4492
4494 bool hasValue() const;
4495
4497 void reset();
4498
4500 std::string toString() const;
4501
4503 bool operator==(const Threshold &other) const
4504 {
4505 return m_opt == other.m_opt;
4506 }
4507
4509 bool operator!=(const Threshold &other) const
4510 {
4511 return m_opt != other.m_opt;
4512 }
4513
4515 bool operator<(const Threshold &other) const
4516 {
4517 return m_opt < other.m_opt;
4518 }
4519
4521 bool operator>(const Threshold &other) const
4522 {
4523 return m_opt > other.m_opt;
4524 }
4525
4527 bool operator<=(const Threshold &other) const
4528 {
4529 return m_opt <= other.m_opt;
4530 }
4531
4533 bool operator>=(const Threshold &other) const
4534 {
4535 return m_opt >= other.m_opt;
4536 }
4537
4539 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4540 {
4541 return stream << value.toString();
4542 }
4543
4544 private:
4545 void setFromString(const std::string &value);
4546
4547 constexpr ValueType static verifyValue(const ValueType &value)
4548 {
4549 return validRange().isInRange(value)
4550 ? value
4551 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4552 + " } is not in range ["
4553 + std::to_string(validRange().min()) + ", "
4554 + std::to_string(validRange().max()) + "]" };
4555 }
4556
4557 Zivid::DataModel::Detail::Optional<double> m_opt;
4558
4559 friend struct DataModel::Detail::Befriend<Threshold>;
4560 };
4561
4562 using Descendants = std::tuple<
4565
4568
4581#ifndef NO_DOC
4582 template<
4583 typename... Args,
4584 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4585 typename std::enable_if<
4586 Zivid::Detail::TypeTraits::
4587 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4588 int>::type = 0>
4589#else
4590 template<typename... Args>
4591#endif
4592 explicit Removal(Args &&...args)
4593 {
4594 using namespace Zivid::Detail::TypeTraits;
4595
4596 static_assert(
4597 AllArgsDecayedAreUnique<Args...>::value,
4598 "Found duplicate types among the arguments passed to Removal(...). "
4599 "Types should be listed at most once.");
4600
4601 set(std::forward<Args>(args)...);
4602 }
4603
4615#ifndef NO_DOC
4616 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4617#else
4618 template<typename... Args>
4619#endif
4620 void set(Args &&...args)
4621 {
4622 using namespace Zivid::Detail::TypeTraits;
4623
4624 using AllArgsAreDescendantNodes =
4625 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4626 static_assert(
4627 AllArgsAreDescendantNodes::value,
4628 "All arguments passed to set(...) must be descendant nodes.");
4629
4630 static_assert(
4631 AllArgsDecayedAreUnique<Args...>::value,
4632 "Found duplicate types among the arguments passed to set(...). "
4633 "Types should be listed at most once.");
4634
4635 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4636 }
4637
4650#ifndef NO_DOC
4651 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4652#else
4653 template<typename... Args>
4654#endif
4655 Removal copyWith(Args &&...args) const
4656 {
4657 using namespace Zivid::Detail::TypeTraits;
4658
4659 using AllArgsAreDescendantNodes =
4660 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4661 static_assert(
4662 AllArgsAreDescendantNodes::value,
4663 "All arguments passed to copyWith(...) must be descendant nodes.");
4664
4665 static_assert(
4666 AllArgsDecayedAreUnique<Args...>::value,
4667 "Found duplicate types among the arguments passed to copyWith(...). "
4668 "Types should be listed at most once.");
4669
4670 auto copy{ *this };
4671 copy.set(std::forward<Args>(args)...);
4672 return copy;
4673 }
4674
4676 const Enabled &isEnabled() const
4677 {
4678 return m_enabled;
4679 }
4680
4683 {
4684 return m_enabled;
4685 }
4686
4688 Removal &set(const Enabled &value)
4689 {
4690 m_enabled = value;
4691 return *this;
4692 }
4693
4695 const Threshold &threshold() const
4696 {
4697 return m_threshold;
4698 }
4699
4702 {
4703 return m_threshold;
4704 }
4705
4707 Removal &set(const Threshold &value)
4708 {
4709 m_threshold = value;
4710 return *this;
4711 }
4712
4713 template<
4714 typename T,
4715 typename std::enable_if<
4716 std::is_same<
4717 T,
4718 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4719 Enabled>::value,
4720 int>::type = 0>
4722 get() const
4723 {
4724 return m_enabled;
4725 }
4726
4727 template<
4728 typename T,
4729 typename std::enable_if<
4730 std::is_same<
4731 T,
4732 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4733 Threshold>::value,
4734 int>::type = 0>
4736 get() const
4737 {
4738 return m_threshold;
4739 }
4740
4741 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4743 get() const
4744 {
4745 return m_enabled;
4746 }
4747
4748 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4750 get() const
4751 {
4752 return m_threshold;
4753 }
4754
4756 template<typename F>
4757 void forEach(const F &f) const
4758 {
4759 f(m_enabled);
4760 f(m_threshold);
4761 }
4762
4764 template<typename F>
4765 void forEach(const F &f)
4766 {
4767 f(m_enabled);
4768 f(m_threshold);
4769 }
4770
4772 bool operator==(const Removal &other) const;
4773
4775 bool operator!=(const Removal &other) const;
4776
4778 std::string toString() const;
4779
4781 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4782 {
4783 return stream << value.toString();
4784 }
4785
4786 private:
4787 void setFromString(const std::string &value);
4788
4789 void setFromString(const std::string &fullPath, const std::string &value);
4790
4791 std::string getString(const std::string &fullPath) const;
4792
4793 Enabled m_enabled;
4794 Threshold m_threshold;
4795
4796 friend struct DataModel::Detail::Befriend<Removal>;
4797 };
4798
4799 using Descendants = std::tuple<
4806
4809
4826#ifndef NO_DOC
4827 template<
4828 typename... Args,
4829 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4830 typename std::enable_if<
4831 Zivid::Detail::TypeTraits::
4832 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4833 int>::type = 0>
4834#else
4835 template<typename... Args>
4836#endif
4837 explicit ContrastDistortion(Args &&...args)
4838 {
4839 using namespace Zivid::Detail::TypeTraits;
4840
4841 static_assert(
4842 AllArgsDecayedAreUnique<Args...>::value,
4843 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
4844 "Types should be listed at most once.");
4845
4846 set(std::forward<Args>(args)...);
4847 }
4848
4864#ifndef NO_DOC
4865 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4866#else
4867 template<typename... Args>
4868#endif
4869 void set(Args &&...args)
4870 {
4871 using namespace Zivid::Detail::TypeTraits;
4872
4873 using AllArgsAreDescendantNodes =
4874 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4875 static_assert(
4876 AllArgsAreDescendantNodes::value,
4877 "All arguments passed to set(...) must be descendant nodes.");
4878
4879 static_assert(
4880 AllArgsDecayedAreUnique<Args...>::value,
4881 "Found duplicate types among the arguments passed to set(...). "
4882 "Types should be listed at most once.");
4883
4884 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4885 }
4886
4903#ifndef NO_DOC
4904 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4905#else
4906 template<typename... Args>
4907#endif
4908 ContrastDistortion copyWith(Args &&...args) const
4909 {
4910 using namespace Zivid::Detail::TypeTraits;
4911
4912 using AllArgsAreDescendantNodes =
4913 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4914 static_assert(
4915 AllArgsAreDescendantNodes::value,
4916 "All arguments passed to copyWith(...) must be descendant nodes.");
4917
4918 static_assert(
4919 AllArgsDecayedAreUnique<Args...>::value,
4920 "Found duplicate types among the arguments passed to copyWith(...). "
4921 "Types should be listed at most once.");
4922
4923 auto copy{ *this };
4924 copy.set(std::forward<Args>(args)...);
4925 return copy;
4926 }
4927
4929 const Correction &correction() const
4930 {
4931 return m_correction;
4932 }
4933
4936 {
4937 return m_correction;
4938 }
4939
4942 {
4943 m_correction = value;
4944 return *this;
4945 }
4946
4949 {
4950 m_correction.set(value);
4951 return *this;
4952 }
4953
4956 {
4957 m_correction.set(value);
4958 return *this;
4959 }
4960
4962 const Removal &removal() const
4963 {
4964 return m_removal;
4965 }
4966
4969 {
4970 return m_removal;
4971 }
4972
4975 {
4976 m_removal = value;
4977 return *this;
4978 }
4979
4982 {
4983 m_removal.set(value);
4984 return *this;
4985 }
4986
4989 {
4990 m_removal.set(value);
4991 return *this;
4992 }
4993
4994 template<
4995 typename T,
4996 typename std::enable_if<
4997 std::is_same<
4998 T,
5000 int>::type = 0>
5002 {
5003 return m_correction;
5004 }
5005
5006 template<
5007 typename T,
5008 typename std::enable_if<
5009 std::is_same<
5010 T,
5011 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5012 Enabled>::value,
5013 int>::type = 0>
5015 get() const
5016 {
5017 return m_correction.get<
5019 }
5020
5021 template<
5022 typename T,
5023 typename std::enable_if<
5024 std::is_same<
5025 T,
5026 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5027 Strength>::value,
5028 int>::type = 0>
5030 get() const
5031 {
5032 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
5033 Correction::Strength>();
5034 }
5035
5036 template<
5037 typename T,
5038 typename std::enable_if<
5039 std::is_same<
5040 T,
5042 int>::type = 0>
5044 {
5045 return m_removal;
5046 }
5047
5048 template<
5049 typename T,
5050 typename std::enable_if<
5051 std::is_same<
5052 T,
5054 value,
5055 int>::type = 0>
5057 const
5058 {
5059 return m_removal.get<
5061 }
5062
5063 template<
5064 typename T,
5065 typename std::enable_if<
5066 std::is_same<
5067 T,
5068 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
5069 Threshold>::value,
5070 int>::type = 0>
5072 const
5073 {
5074 return m_removal.get<
5076 }
5077
5078 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5080 {
5081 return m_correction;
5082 }
5083
5084 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5086 {
5087 return m_removal;
5088 }
5089
5091 template<typename F>
5092 void forEach(const F &f) const
5093 {
5094 f(m_correction);
5095 f(m_removal);
5096 }
5097
5099 template<typename F>
5100 void forEach(const F &f)
5101 {
5102 f(m_correction);
5103 f(m_removal);
5104 }
5105
5107 bool operator==(const ContrastDistortion &other) const;
5108
5110 bool operator!=(const ContrastDistortion &other) const;
5111
5113 std::string toString() const;
5114
5116 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
5117 {
5118 return stream << value.toString();
5119 }
5120
5121 private:
5122 void setFromString(const std::string &value);
5123
5124 void setFromString(const std::string &fullPath, const std::string &value);
5125
5126 std::string getString(const std::string &fullPath) const;
5127
5128 Correction m_correction;
5129 Removal m_removal;
5130
5131 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
5132 };
5133
5134 using Descendants = std::tuple<
5142
5145
5163#ifndef NO_DOC
5164 template<
5165 typename... Args,
5166 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5167 typename std::enable_if<
5168 Zivid::Detail::TypeTraits::
5169 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5170 int>::type = 0>
5171#else
5172 template<typename... Args>
5173#endif
5174 explicit Experimental(Args &&...args)
5175 {
5176 using namespace Zivid::Detail::TypeTraits;
5177
5178 static_assert(
5179 AllArgsDecayedAreUnique<Args...>::value,
5180 "Found duplicate types among the arguments passed to Experimental(...). "
5181 "Types should be listed at most once.");
5182
5183 set(std::forward<Args>(args)...);
5184 }
5185
5202#ifndef NO_DOC
5203 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5204#else
5205 template<typename... Args>
5206#endif
5207 void set(Args &&...args)
5208 {
5209 using namespace Zivid::Detail::TypeTraits;
5210
5211 using AllArgsAreDescendantNodes =
5212 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5213 static_assert(
5214 AllArgsAreDescendantNodes::value,
5215 "All arguments passed to set(...) must be descendant nodes.");
5216
5217 static_assert(
5218 AllArgsDecayedAreUnique<Args...>::value,
5219 "Found duplicate types among the arguments passed to set(...). "
5220 "Types should be listed at most once.");
5221
5222 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5223 }
5224
5242#ifndef NO_DOC
5243 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5244#else
5245 template<typename... Args>
5246#endif
5247 Experimental copyWith(Args &&...args) const
5248 {
5249 using namespace Zivid::Detail::TypeTraits;
5250
5251 using AllArgsAreDescendantNodes =
5252 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5253 static_assert(
5254 AllArgsAreDescendantNodes::value,
5255 "All arguments passed to copyWith(...) must be descendant nodes.");
5256
5257 static_assert(
5258 AllArgsDecayedAreUnique<Args...>::value,
5259 "Found duplicate types among the arguments passed to copyWith(...). "
5260 "Types should be listed at most once.");
5261
5262 auto copy{ *this };
5263 copy.set(std::forward<Args>(args)...);
5264 return copy;
5265 }
5266
5269 {
5270 return m_contrastDistortion;
5271 }
5272
5275 {
5276 return m_contrastDistortion;
5277 }
5278
5281 {
5282 m_contrastDistortion = value;
5283 return *this;
5284 }
5285
5288 {
5289 m_contrastDistortion.set(value);
5290 return *this;
5291 }
5292
5295 {
5296 m_contrastDistortion.set(value);
5297 return *this;
5298 }
5299
5302 {
5303 m_contrastDistortion.set(value);
5304 return *this;
5305 }
5306
5309 {
5310 m_contrastDistortion.set(value);
5311 return *this;
5312 }
5313
5316 {
5317 m_contrastDistortion.set(value);
5318 return *this;
5319 }
5320
5323 {
5324 m_contrastDistortion.set(value);
5325 return *this;
5326 }
5327
5328 template<
5329 typename T,
5330 typename std::enable_if<
5331 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
5332 int>::type = 0>
5334 {
5335 return m_contrastDistortion;
5336 }
5337
5338 template<
5339 typename T,
5340 typename std::enable_if<
5341 std::is_same<
5342 T,
5344 int>::type = 0>
5346 {
5347 return m_contrastDistortion
5349 }
5350
5351 template<
5352 typename T,
5353 typename std::enable_if<
5354 std::is_same<
5355 T,
5357 value,
5358 int>::type = 0>
5360 const
5361 {
5362 return m_contrastDistortion.get<
5364 }
5365
5366 template<
5367 typename T,
5368 typename std::enable_if<
5369 std::is_same<
5370 T,
5372 value,
5373 int>::type = 0>
5375 const
5376 {
5377 return m_contrastDistortion.get<
5379 }
5380
5381 template<
5382 typename T,
5383 typename std::enable_if<
5384 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
5385 value,
5386 int>::type = 0>
5388 {
5389 return m_contrastDistortion
5391 }
5392
5393 template<
5394 typename T,
5395 typename std::enable_if<
5396 std::is_same<
5397 T,
5399 value,
5400 int>::type = 0>
5402 {
5403 return m_contrastDistortion
5405 }
5406
5407 template<
5408 typename T,
5409 typename std::enable_if<
5410 std::is_same<
5411 T,
5413 value,
5414 int>::type = 0>
5416 const
5417 {
5418 return m_contrastDistortion
5420 }
5421
5422 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5424 {
5425 return m_contrastDistortion;
5426 }
5427
5429 template<typename F>
5430 void forEach(const F &f) const
5431 {
5432 f(m_contrastDistortion);
5433 }
5434
5436 template<typename F>
5437 void forEach(const F &f)
5438 {
5439 f(m_contrastDistortion);
5440 }
5441
5443 bool operator==(const Experimental &other) const;
5444
5446 bool operator!=(const Experimental &other) const;
5447
5449 std::string toString() const;
5450
5452 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
5453 {
5454 return stream << value.toString();
5455 }
5456
5457 private:
5458 void setFromString(const std::string &value);
5459
5460 void setFromString(const std::string &fullPath, const std::string &value);
5461
5462 std::string getString(const std::string &fullPath) const;
5463
5464 ContrastDistortion m_contrastDistortion;
5465
5466 friend struct DataModel::Detail::Befriend<Experimental>;
5467 };
5468
5470
5471 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5473 {
5474 public:
5476 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5477
5479 static constexpr const char *path{ "Processing/Filters/Hole" };
5480
5482 static constexpr const char *name{ "Hole" };
5483
5485 static constexpr const char *description{
5486 R"description(Contains filters that can be used to deal with holes in the point cloud.)description"
5487 };
5488
5491
5492 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5494 {
5495 public:
5497 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5498
5500 static constexpr const char *path{ "Processing/Filters/Hole/Repair" };
5501
5503 static constexpr const char *name{ "Repair" };
5504
5506 static constexpr const char *description{
5507 R"description(Fills in point cloud holes by interpolating remaining surrounding points.
5508)description"
5509 };
5510
5512
5513 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5515 {
5516 public:
5518 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5519
5521 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Enabled" };
5522
5524 static constexpr const char *name{ "Enabled" };
5525
5527 static constexpr const char *description{
5528 R"description(Enable or disable hole repair.)description"
5529 };
5530
5532 using ValueType = bool;
5533 static const Enabled yes;
5534 static const Enabled no;
5535
5537 static std::set<bool> validValues()
5538 {
5539 return { false, true };
5540 }
5541
5543 Enabled() = default;
5544
5546 explicit constexpr Enabled(bool value)
5547 : m_opt{ value }
5548 {}
5549
5554 bool value() const;
5555
5557 bool hasValue() const;
5558
5560 void reset();
5561
5563 std::string toString() const;
5564
5566 bool operator==(const Enabled &other) const
5567 {
5568 return m_opt == other.m_opt;
5569 }
5570
5572 bool operator!=(const Enabled &other) const
5573 {
5574 return m_opt != other.m_opt;
5575 }
5576
5578 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5579 {
5580 return stream << value.toString();
5581 }
5582
5583 private:
5584 void setFromString(const std::string &value);
5585
5586 Zivid::DataModel::Detail::Optional<bool> m_opt;
5587
5588 friend struct DataModel::Detail::Befriend<Enabled>;
5589 };
5590
5595
5596 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5598 {
5599 public:
5601 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5602
5604 static constexpr const char *path{ "Processing/Filters/Hole/Repair/HoleSize" };
5605
5607 static constexpr const char *name{ "HoleSize" };
5608
5610 static constexpr const char *description{
5611 R"description(Relative diameter of holes to fill. Increasing this will fill more points, but require more
5612computation time. The maximum allowed hole size scales with distance, so that we allow
5613filling larger holes at greater distances, measured in mm.
5614)description"
5615 };
5616
5618 using ValueType = double;
5619
5621 static constexpr Range<double> validRange()
5622 {
5623 return { 0.0, 1.0 };
5624 }
5625
5627 HoleSize() = default;
5628
5630 explicit constexpr HoleSize(double value)
5631 : m_opt{ verifyValue(value) }
5632 {}
5633
5638 double value() const;
5639
5641 bool hasValue() const;
5642
5644 void reset();
5645
5647 std::string toString() const;
5648
5650 bool operator==(const HoleSize &other) const
5651 {
5652 return m_opt == other.m_opt;
5653 }
5654
5656 bool operator!=(const HoleSize &other) const
5657 {
5658 return m_opt != other.m_opt;
5659 }
5660
5662 bool operator<(const HoleSize &other) const
5663 {
5664 return m_opt < other.m_opt;
5665 }
5666
5668 bool operator>(const HoleSize &other) const
5669 {
5670 return m_opt > other.m_opt;
5671 }
5672
5674 bool operator<=(const HoleSize &other) const
5675 {
5676 return m_opt <= other.m_opt;
5677 }
5678
5680 bool operator>=(const HoleSize &other) const
5681 {
5682 return m_opt >= other.m_opt;
5683 }
5684
5686 friend std::ostream &operator<<(std::ostream &stream, const HoleSize &value)
5687 {
5688 return stream << value.toString();
5689 }
5690
5691 private:
5692 void setFromString(const std::string &value);
5693
5694 constexpr ValueType static verifyValue(const ValueType &value)
5695 {
5696 return validRange().isInRange(value)
5697 ? value
5698 : throw std::out_of_range{ "HoleSize{ " + std::to_string(value)
5699 + " } is not in range ["
5700 + std::to_string(validRange().min()) + ", "
5701 + std::to_string(validRange().max()) + "]" };
5702 }
5703
5704 Zivid::DataModel::Detail::Optional<double> m_opt;
5705
5706 friend struct DataModel::Detail::Befriend<HoleSize>;
5707 };
5708
5714
5715 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5717 {
5718 public:
5720 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5721
5723 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Strictness" };
5724
5726 static constexpr const char *name{ "Strictness" };
5727
5729 static constexpr const char *description{
5730 R"description(Level of strictness when considering if a point should be filled. A higher level of
5731strictness requires a missing point to be surrounded by valid points on more sides in
5732order to be filled. Increasing this will fill fewer points, but it will be less likely to
5733fill gaps that are not circular, for example between two edges.
5734)description"
5735 };
5736
5738 using ValueType = int32_t;
5739
5741 static constexpr Range<int32_t> validRange()
5742 {
5743 return { 1, 4 };
5744 }
5745
5747 Strictness() = default;
5748
5750 explicit constexpr Strictness(int32_t value)
5751 : m_opt{ verifyValue(value) }
5752 {}
5753
5758 int32_t value() const;
5759
5761 bool hasValue() const;
5762
5764 void reset();
5765
5767 std::string toString() const;
5768
5770 bool operator==(const Strictness &other) const
5771 {
5772 return m_opt == other.m_opt;
5773 }
5774
5776 bool operator!=(const Strictness &other) const
5777 {
5778 return m_opt != other.m_opt;
5779 }
5780
5782 bool operator<(const Strictness &other) const
5783 {
5784 return m_opt < other.m_opt;
5785 }
5786
5788 bool operator>(const Strictness &other) const
5789 {
5790 return m_opt > other.m_opt;
5791 }
5792
5794 bool operator<=(const Strictness &other) const
5795 {
5796 return m_opt <= other.m_opt;
5797 }
5798
5800 bool operator>=(const Strictness &other) const
5801 {
5802 return m_opt >= other.m_opt;
5803 }
5804
5806 friend std::ostream &operator<<(std::ostream &stream, const Strictness &value)
5807 {
5808 return stream << value.toString();
5809 }
5810
5811 private:
5812 void setFromString(const std::string &value);
5813
5814 constexpr ValueType static verifyValue(const ValueType &value)
5815 {
5816 return validRange().isInRange(value)
5817 ? value
5818 : throw std::out_of_range{ "Strictness{ " + std::to_string(value)
5819 + " } is not in range ["
5820 + std::to_string(validRange().min()) + ", "
5821 + std::to_string(validRange().max()) + "]" };
5822 }
5823
5824 Zivid::DataModel::Detail::Optional<int32_t> m_opt;
5825
5826 friend struct DataModel::Detail::Befriend<Strictness>;
5827 };
5828
5829 using Descendants = std::tuple<
5833
5836
5850#ifndef NO_DOC
5851 template<
5852 typename... Args,
5853 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5854 typename std::enable_if<
5855 Zivid::Detail::TypeTraits::
5856 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5857 int>::type = 0>
5858#else
5859 template<typename... Args>
5860#endif
5861 explicit Repair(Args &&...args)
5862 {
5863 using namespace Zivid::Detail::TypeTraits;
5864
5865 static_assert(
5866 AllArgsDecayedAreUnique<Args...>::value,
5867 "Found duplicate types among the arguments passed to Repair(...). "
5868 "Types should be listed at most once.");
5869
5870 set(std::forward<Args>(args)...);
5871 }
5872
5885#ifndef NO_DOC
5886 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5887#else
5888 template<typename... Args>
5889#endif
5890 void set(Args &&...args)
5891 {
5892 using namespace Zivid::Detail::TypeTraits;
5893
5894 using AllArgsAreDescendantNodes =
5895 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5896 static_assert(
5897 AllArgsAreDescendantNodes::value,
5898 "All arguments passed to set(...) must be descendant nodes.");
5899
5900 static_assert(
5901 AllArgsDecayedAreUnique<Args...>::value,
5902 "Found duplicate types among the arguments passed to set(...). "
5903 "Types should be listed at most once.");
5904
5905 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5906 }
5907
5921#ifndef NO_DOC
5922 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5923#else
5924 template<typename... Args>
5925#endif
5926 Repair copyWith(Args &&...args) const
5927 {
5928 using namespace Zivid::Detail::TypeTraits;
5929
5930 using AllArgsAreDescendantNodes =
5931 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5932 static_assert(
5933 AllArgsAreDescendantNodes::value,
5934 "All arguments passed to copyWith(...) must be descendant nodes.");
5935
5936 static_assert(
5937 AllArgsDecayedAreUnique<Args...>::value,
5938 "Found duplicate types among the arguments passed to copyWith(...). "
5939 "Types should be listed at most once.");
5940
5941 auto copy{ *this };
5942 copy.set(std::forward<Args>(args)...);
5943 return copy;
5944 }
5945
5947 const Enabled &isEnabled() const
5948 {
5949 return m_enabled;
5950 }
5951
5954 {
5955 return m_enabled;
5956 }
5957
5959 Repair &set(const Enabled &value)
5960 {
5961 m_enabled = value;
5962 return *this;
5963 }
5964
5966 const HoleSize &holeSize() const
5967 {
5968 return m_holeSize;
5969 }
5970
5973 {
5974 return m_holeSize;
5975 }
5976
5978 Repair &set(const HoleSize &value)
5979 {
5980 m_holeSize = value;
5981 return *this;
5982 }
5983
5985 const Strictness &strictness() const
5986 {
5987 return m_strictness;
5988 }
5989
5992 {
5993 return m_strictness;
5994 }
5995
5997 Repair &set(const Strictness &value)
5998 {
5999 m_strictness = value;
6000 return *this;
6001 }
6002
6003 template<
6004 typename T,
6005 typename std::enable_if<
6006 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6007 int>::type = 0>
6009 {
6010 return m_enabled;
6011 }
6012
6013 template<
6014 typename T,
6015 typename std::enable_if<
6016 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6017 int>::type = 0>
6019 {
6020 return m_holeSize;
6021 }
6022
6023 template<
6024 typename T,
6025 typename std::enable_if<
6026 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6027 int>::type = 0>
6029 {
6030 return m_strictness;
6031 }
6032
6033 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6035 {
6036 return m_enabled;
6037 }
6038
6039 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6041 {
6042 return m_holeSize;
6043 }
6044
6045 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
6047 {
6048 return m_strictness;
6049 }
6050
6052 template<typename F>
6053 void forEach(const F &f) const
6054 {
6055 f(m_enabled);
6056 f(m_holeSize);
6057 f(m_strictness);
6058 }
6059
6061 template<typename F>
6062 void forEach(const F &f)
6063 {
6064 f(m_enabled);
6065 f(m_holeSize);
6066 f(m_strictness);
6067 }
6068
6070 bool operator==(const Repair &other) const;
6071
6073 bool operator!=(const Repair &other) const;
6074
6076 std::string toString() const;
6077
6079 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
6080 {
6081 return stream << value.toString();
6082 }
6083
6084 private:
6085 void setFromString(const std::string &value);
6086
6087 void setFromString(const std::string &fullPath, const std::string &value);
6088
6089 std::string getString(const std::string &fullPath) const;
6090
6091 Enabled m_enabled;
6092 HoleSize m_holeSize;
6093 Strictness m_strictness;
6094
6095 friend struct DataModel::Detail::Befriend<Repair>;
6096 };
6097
6098 using Descendants = std::tuple<
6103
6106
6121#ifndef NO_DOC
6122 template<
6123 typename... Args,
6124 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6125 typename std::enable_if<
6126 Zivid::Detail::TypeTraits::
6127 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6128 int>::type = 0>
6129#else
6130 template<typename... Args>
6131#endif
6132 explicit Hole(Args &&...args)
6133 {
6134 using namespace Zivid::Detail::TypeTraits;
6135
6136 static_assert(
6137 AllArgsDecayedAreUnique<Args...>::value,
6138 "Found duplicate types among the arguments passed to Hole(...). "
6139 "Types should be listed at most once.");
6140
6141 set(std::forward<Args>(args)...);
6142 }
6143
6157#ifndef NO_DOC
6158 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6159#else
6160 template<typename... Args>
6161#endif
6162 void set(Args &&...args)
6163 {
6164 using namespace Zivid::Detail::TypeTraits;
6165
6166 using AllArgsAreDescendantNodes =
6167 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6168 static_assert(
6169 AllArgsAreDescendantNodes::value,
6170 "All arguments passed to set(...) must be descendant nodes.");
6171
6172 static_assert(
6173 AllArgsDecayedAreUnique<Args...>::value,
6174 "Found duplicate types among the arguments passed to set(...). "
6175 "Types should be listed at most once.");
6176
6177 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6178 }
6179
6194#ifndef NO_DOC
6195 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6196#else
6197 template<typename... Args>
6198#endif
6199 Hole copyWith(Args &&...args) const
6200 {
6201 using namespace Zivid::Detail::TypeTraits;
6202
6203 using AllArgsAreDescendantNodes =
6204 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6205 static_assert(
6206 AllArgsAreDescendantNodes::value,
6207 "All arguments passed to copyWith(...) must be descendant nodes.");
6208
6209 static_assert(
6210 AllArgsDecayedAreUnique<Args...>::value,
6211 "Found duplicate types among the arguments passed to copyWith(...). "
6212 "Types should be listed at most once.");
6213
6214 auto copy{ *this };
6215 copy.set(std::forward<Args>(args)...);
6216 return copy;
6217 }
6218
6220 const Repair &repair() const
6221 {
6222 return m_repair;
6223 }
6224
6227 {
6228 return m_repair;
6229 }
6230
6232 Hole &set(const Repair &value)
6233 {
6234 m_repair = value;
6235 return *this;
6236 }
6237
6239 Hole &set(const Repair::Enabled &value)
6240 {
6241 m_repair.set(value);
6242 return *this;
6243 }
6244
6247 {
6248 m_repair.set(value);
6249 return *this;
6250 }
6251
6254 {
6255 m_repair.set(value);
6256 return *this;
6257 }
6258
6259 template<
6260 typename T,
6261 typename std::enable_if<
6262 std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value,
6263 int>::type = 0>
6265 {
6266 return m_repair;
6267 }
6268
6269 template<
6270 typename T,
6271 typename std::enable_if<
6272 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6273 int>::type = 0>
6275 {
6277 }
6278
6279 template<
6280 typename T,
6281 typename std::enable_if<
6282 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6283 int>::type = 0>
6285 {
6287 }
6288
6289 template<
6290 typename T,
6291 typename std::enable_if<
6292 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6293 int>::type = 0>
6295 {
6297 }
6298
6299 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6301 {
6302 return m_repair;
6303 }
6304
6306 template<typename F>
6307 void forEach(const F &f) const
6308 {
6309 f(m_repair);
6310 }
6311
6313 template<typename F>
6314 void forEach(const F &f)
6315 {
6316 f(m_repair);
6317 }
6318
6320 bool operator==(const Hole &other) const;
6321
6323 bool operator!=(const Hole &other) const;
6324
6326 std::string toString() const;
6327
6329 friend std::ostream &operator<<(std::ostream &stream, const Hole &value)
6330 {
6331 return stream << value.toString();
6332 }
6333
6334 private:
6335 void setFromString(const std::string &value);
6336
6337 void setFromString(const std::string &fullPath, const std::string &value);
6338
6339 std::string getString(const std::string &fullPath) const;
6340
6341 Repair m_repair;
6342
6343 friend struct DataModel::Detail::Befriend<Hole>;
6344 };
6345
6347
6348 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6350 {
6351 public:
6353 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6354
6356 static constexpr const char *path{ "Processing/Filters/Noise" };
6357
6359 static constexpr const char *name{ "Noise" };
6360
6362 static constexpr const char *description{
6363 R"description(Contains filters that can be used to clean up a noisy point cloud.)description"
6364 };
6365
6367
6368 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6370 {
6371 public:
6373 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6374
6376 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
6377
6379 static constexpr const char *name{ "Removal" };
6380
6382 static constexpr const char *description{
6383 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold.)description"
6384 };
6385
6387
6388 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6390 {
6391 public:
6393 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6394
6396 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
6397
6399 static constexpr const char *name{ "Enabled" };
6400
6402 static constexpr const char *description{
6403 R"description(Enable or disable the SNR filter.)description"
6404 };
6405
6407 using ValueType = bool;
6408 static const Enabled yes;
6409 static const Enabled no;
6410
6412 static std::set<bool> validValues()
6413 {
6414 return { false, true };
6415 }
6416
6418 Enabled() = default;
6419
6421 explicit constexpr Enabled(bool value)
6422 : m_opt{ value }
6423 {}
6424
6429 bool value() const;
6430
6432 bool hasValue() const;
6433
6435 void reset();
6436
6438 std::string toString() const;
6439
6441 bool operator==(const Enabled &other) const
6442 {
6443 return m_opt == other.m_opt;
6444 }
6445
6447 bool operator!=(const Enabled &other) const
6448 {
6449 return m_opt != other.m_opt;
6450 }
6451
6453 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6454 {
6455 return stream << value.toString();
6456 }
6457
6458 private:
6459 void setFromString(const std::string &value);
6460
6461 Zivid::DataModel::Detail::Optional<bool> m_opt;
6462
6463 friend struct DataModel::Detail::Befriend<Enabled>;
6464 };
6465
6467
6468 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6470 {
6471 public:
6473 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6474
6476 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
6477
6479 static constexpr const char *name{ "Threshold" };
6480
6482 static constexpr const char *description{
6483 R"description(Discard points with signal-to-noise ratio (SNR) below the given value.)description"
6484 };
6485
6487 using ValueType = double;
6488
6490 static constexpr Range<double> validRange()
6491 {
6492 return { 0.0, 100.0 };
6493 }
6494
6496 Threshold() = default;
6497
6499 explicit constexpr Threshold(double value)
6500 : m_opt{ verifyValue(value) }
6501 {}
6502
6507 double value() const;
6508
6510 bool hasValue() const;
6511
6513 void reset();
6514
6516 std::string toString() const;
6517
6519 bool operator==(const Threshold &other) const
6520 {
6521 return m_opt == other.m_opt;
6522 }
6523
6525 bool operator!=(const Threshold &other) const
6526 {
6527 return m_opt != other.m_opt;
6528 }
6529
6531 bool operator<(const Threshold &other) const
6532 {
6533 return m_opt < other.m_opt;
6534 }
6535
6537 bool operator>(const Threshold &other) const
6538 {
6539 return m_opt > other.m_opt;
6540 }
6541
6543 bool operator<=(const Threshold &other) const
6544 {
6545 return m_opt <= other.m_opt;
6546 }
6547
6549 bool operator>=(const Threshold &other) const
6550 {
6551 return m_opt >= other.m_opt;
6552 }
6553
6555 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
6556 {
6557 return stream << value.toString();
6558 }
6559
6560 private:
6561 void setFromString(const std::string &value);
6562
6563 constexpr ValueType static verifyValue(const ValueType &value)
6564 {
6565 return validRange().isInRange(value)
6566 ? value
6567 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
6568 + " } is not in range ["
6569 + std::to_string(validRange().min()) + ", "
6570 + std::to_string(validRange().max()) + "]" };
6571 }
6572
6573 Zivid::DataModel::Detail::Optional<double> m_opt;
6574
6575 friend struct DataModel::Detail::Befriend<Threshold>;
6576 };
6577
6578 using Descendants = std::tuple<
6581
6584
6597#ifndef NO_DOC
6598 template<
6599 typename... Args,
6600 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6601 typename std::enable_if<
6602 Zivid::Detail::TypeTraits::
6603 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6604 int>::type = 0>
6605#else
6606 template<typename... Args>
6607#endif
6608 explicit Removal(Args &&...args)
6609 {
6610 using namespace Zivid::Detail::TypeTraits;
6611
6612 static_assert(
6613 AllArgsDecayedAreUnique<Args...>::value,
6614 "Found duplicate types among the arguments passed to Removal(...). "
6615 "Types should be listed at most once.");
6616
6617 set(std::forward<Args>(args)...);
6618 }
6619
6631#ifndef NO_DOC
6632 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6633#else
6634 template<typename... Args>
6635#endif
6636 void set(Args &&...args)
6637 {
6638 using namespace Zivid::Detail::TypeTraits;
6639
6640 using AllArgsAreDescendantNodes =
6641 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6642 static_assert(
6643 AllArgsAreDescendantNodes::value,
6644 "All arguments passed to set(...) must be descendant nodes.");
6645
6646 static_assert(
6647 AllArgsDecayedAreUnique<Args...>::value,
6648 "Found duplicate types among the arguments passed to set(...). "
6649 "Types should be listed at most once.");
6650
6651 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6652 }
6653
6666#ifndef NO_DOC
6667 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6668#else
6669 template<typename... Args>
6670#endif
6671 Removal copyWith(Args &&...args) const
6672 {
6673 using namespace Zivid::Detail::TypeTraits;
6674
6675 using AllArgsAreDescendantNodes =
6676 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6677 static_assert(
6678 AllArgsAreDescendantNodes::value,
6679 "All arguments passed to copyWith(...) must be descendant nodes.");
6680
6681 static_assert(
6682 AllArgsDecayedAreUnique<Args...>::value,
6683 "Found duplicate types among the arguments passed to copyWith(...). "
6684 "Types should be listed at most once.");
6685
6686 auto copy{ *this };
6687 copy.set(std::forward<Args>(args)...);
6688 return copy;
6689 }
6690
6692 const Enabled &isEnabled() const
6693 {
6694 return m_enabled;
6695 }
6696
6699 {
6700 return m_enabled;
6701 }
6702
6704 Removal &set(const Enabled &value)
6705 {
6706 m_enabled = value;
6707 return *this;
6708 }
6709
6711 const Threshold &threshold() const
6712 {
6713 return m_threshold;
6714 }
6715
6718 {
6719 return m_threshold;
6720 }
6721
6723 Removal &set(const Threshold &value)
6724 {
6725 m_threshold = value;
6726 return *this;
6727 }
6728
6729 template<
6730 typename T,
6731 typename std::enable_if<
6732 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
6733 int>::type = 0>
6735 {
6736 return m_enabled;
6737 }
6738
6739 template<
6740 typename T,
6741 typename std::enable_if<
6742 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
6743 int>::type = 0>
6745 {
6746 return m_threshold;
6747 }
6748
6749 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6751 {
6752 return m_enabled;
6753 }
6754
6755 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6757 {
6758 return m_threshold;
6759 }
6760
6762 template<typename F>
6763 void forEach(const F &f) const
6764 {
6765 f(m_enabled);
6766 f(m_threshold);
6767 }
6768
6770 template<typename F>
6771 void forEach(const F &f)
6772 {
6773 f(m_enabled);
6774 f(m_threshold);
6775 }
6776
6778 bool operator==(const Removal &other) const;
6779
6781 bool operator!=(const Removal &other) const;
6782
6784 std::string toString() const;
6785
6787 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6788 {
6789 return stream << value.toString();
6790 }
6791
6792 private:
6793 void setFromString(const std::string &value);
6794
6795 void setFromString(const std::string &fullPath, const std::string &value);
6796
6797 std::string getString(const std::string &fullPath) const;
6798
6799 Enabled m_enabled;
6800 Threshold m_threshold;
6801
6802 friend struct DataModel::Detail::Befriend<Removal>;
6803 };
6804
6809
6810 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6812 {
6813 public:
6815 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6816
6818 static constexpr const char *path{ "Processing/Filters/Noise/Repair" };
6819
6821 static constexpr const char *name{ "Repair" };
6822
6824 static constexpr const char *description{
6825 R"description(Get better surface coverage by repairing regions of missing data due to noisy points.
6826Consider disabling this filter if you require all points in your point cloud to be of
6827high confidence.
6828)description"
6829 };
6830
6832
6833 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6835 {
6836 public:
6838 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6839
6841 static constexpr const char *path{ "Processing/Filters/Noise/Repair/Enabled" };
6842
6844 static constexpr const char *name{ "Enabled" };
6845
6847 static constexpr const char *description{
6848 R"description(Enable or disable noise repair.)description"
6849 };
6850
6852 using ValueType = bool;
6853 static const Enabled yes;
6854 static const Enabled no;
6855
6857 static std::set<bool> validValues()
6858 {
6859 return { false, true };
6860 }
6861
6863 Enabled() = default;
6864
6866 explicit constexpr Enabled(bool value)
6867 : m_opt{ value }
6868 {}
6869
6874 bool value() const;
6875
6877 bool hasValue() const;
6878
6880 void reset();
6881
6883 std::string toString() const;
6884
6886 bool operator==(const Enabled &other) const
6887 {
6888 return m_opt == other.m_opt;
6889 }
6890
6892 bool operator!=(const Enabled &other) const
6893 {
6894 return m_opt != other.m_opt;
6895 }
6896
6898 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6899 {
6900 return stream << value.toString();
6901 }
6902
6903 private:
6904 void setFromString(const std::string &value);
6905
6906 Zivid::DataModel::Detail::Optional<bool> m_opt;
6907
6908 friend struct DataModel::Detail::Befriend<Enabled>;
6909 };
6910
6911 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Repair::Enabled>;
6912
6915
6927#ifndef NO_DOC
6928 template<
6929 typename... Args,
6930 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6931 typename std::enable_if<
6932 Zivid::Detail::TypeTraits::
6933 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6934 int>::type = 0>
6935#else
6936 template<typename... Args>
6937#endif
6938 explicit Repair(Args &&...args)
6939 {
6940 using namespace Zivid::Detail::TypeTraits;
6941
6942 static_assert(
6943 AllArgsDecayedAreUnique<Args...>::value,
6944 "Found duplicate types among the arguments passed to Repair(...). "
6945 "Types should be listed at most once.");
6946
6947 set(std::forward<Args>(args)...);
6948 }
6949
6960#ifndef NO_DOC
6961 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6962#else
6963 template<typename... Args>
6964#endif
6965 void set(Args &&...args)
6966 {
6967 using namespace Zivid::Detail::TypeTraits;
6968
6969 using AllArgsAreDescendantNodes =
6970 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6971 static_assert(
6972 AllArgsAreDescendantNodes::value,
6973 "All arguments passed to set(...) must be descendant nodes.");
6974
6975 static_assert(
6976 AllArgsDecayedAreUnique<Args...>::value,
6977 "Found duplicate types among the arguments passed to set(...). "
6978 "Types should be listed at most once.");
6979
6980 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6981 }
6982
6994#ifndef NO_DOC
6995 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6996#else
6997 template<typename... Args>
6998#endif
6999 Repair copyWith(Args &&...args) const
7000 {
7001 using namespace Zivid::Detail::TypeTraits;
7002
7003 using AllArgsAreDescendantNodes =
7004 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7005 static_assert(
7006 AllArgsAreDescendantNodes::value,
7007 "All arguments passed to copyWith(...) must be descendant nodes.");
7008
7009 static_assert(
7010 AllArgsDecayedAreUnique<Args...>::value,
7011 "Found duplicate types among the arguments passed to copyWith(...). "
7012 "Types should be listed at most once.");
7013
7014 auto copy{ *this };
7015 copy.set(std::forward<Args>(args)...);
7016 return copy;
7017 }
7018
7020 const Enabled &isEnabled() const
7021 {
7022 return m_enabled;
7023 }
7024
7027 {
7028 return m_enabled;
7029 }
7030
7032 Repair &set(const Enabled &value)
7033 {
7034 m_enabled = value;
7035 return *this;
7036 }
7037
7038 template<
7039 typename T,
7040 typename std::enable_if<
7041 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7042 int>::type = 0>
7044 {
7045 return m_enabled;
7046 }
7047
7048 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7050 {
7051 return m_enabled;
7052 }
7053
7055 template<typename F>
7056 void forEach(const F &f) const
7057 {
7058 f(m_enabled);
7059 }
7060
7062 template<typename F>
7063 void forEach(const F &f)
7064 {
7065 f(m_enabled);
7066 }
7067
7069 bool operator==(const Repair &other) const;
7070
7072 bool operator!=(const Repair &other) const;
7073
7075 std::string toString() const;
7076
7078 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
7079 {
7080 return stream << value.toString();
7081 }
7082
7083 private:
7084 void setFromString(const std::string &value);
7085
7086 void setFromString(const std::string &fullPath, const std::string &value);
7087
7088 std::string getString(const std::string &fullPath) const;
7089
7090 Enabled m_enabled;
7091
7092 friend struct DataModel::Detail::Befriend<Repair>;
7093 };
7094
7099
7100 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7102 {
7103 public:
7105 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7106
7108 static constexpr const char *path{ "Processing/Filters/Noise/Suppression" };
7109
7111 static constexpr const char *name{ "Suppression" };
7112
7114 static constexpr const char *description{
7115 R"description(Reduce noise and outliers in the point cloud. This filter can also be used to reduce
7116ripple effects caused by interreflections. Consider disabling this filter if you need to
7117distinguish very fine details and thus need to avoid any smoothing effects.
7118)description"
7119 };
7120
7122
7123 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7125 {
7126 public:
7128 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7129
7131 static constexpr const char *path{ "Processing/Filters/Noise/Suppression/Enabled" };
7132
7134 static constexpr const char *name{ "Enabled" };
7135
7137 static constexpr const char *description{
7138 R"description(Enable or disable noise suppression.)description"
7139 };
7140
7142 using ValueType = bool;
7143 static const Enabled yes;
7144 static const Enabled no;
7145
7147 static std::set<bool> validValues()
7148 {
7149 return { false, true };
7150 }
7151
7153 Enabled() = default;
7154
7156 explicit constexpr Enabled(bool value)
7157 : m_opt{ value }
7158 {}
7159
7164 bool value() const;
7165
7167 bool hasValue() const;
7168
7170 void reset();
7171
7173 std::string toString() const;
7174
7176 bool operator==(const Enabled &other) const
7177 {
7178 return m_opt == other.m_opt;
7179 }
7180
7182 bool operator!=(const Enabled &other) const
7183 {
7184 return m_opt != other.m_opt;
7185 }
7186
7188 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7189 {
7190 return stream << value.toString();
7191 }
7192
7193 private:
7194 void setFromString(const std::string &value);
7195
7196 Zivid::DataModel::Detail::Optional<bool> m_opt;
7197
7198 friend struct DataModel::Detail::Befriend<Enabled>;
7199 };
7200
7201 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Suppression::Enabled>;
7202
7205
7217#ifndef NO_DOC
7218 template<
7219 typename... Args,
7220 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7221 typename std::enable_if<
7222 Zivid::Detail::TypeTraits::
7223 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7224 int>::type = 0>
7225#else
7226 template<typename... Args>
7227#endif
7228 explicit Suppression(Args &&...args)
7229 {
7230 using namespace Zivid::Detail::TypeTraits;
7231
7232 static_assert(
7233 AllArgsDecayedAreUnique<Args...>::value,
7234 "Found duplicate types among the arguments passed to Suppression(...). "
7235 "Types should be listed at most once.");
7236
7237 set(std::forward<Args>(args)...);
7238 }
7239
7250#ifndef NO_DOC
7251 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7252#else
7253 template<typename... Args>
7254#endif
7255 void set(Args &&...args)
7256 {
7257 using namespace Zivid::Detail::TypeTraits;
7258
7259 using AllArgsAreDescendantNodes =
7260 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7261 static_assert(
7262 AllArgsAreDescendantNodes::value,
7263 "All arguments passed to set(...) must be descendant nodes.");
7264
7265 static_assert(
7266 AllArgsDecayedAreUnique<Args...>::value,
7267 "Found duplicate types among the arguments passed to set(...). "
7268 "Types should be listed at most once.");
7269
7270 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7271 }
7272
7284#ifndef NO_DOC
7285 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7286#else
7287 template<typename... Args>
7288#endif
7289 Suppression copyWith(Args &&...args) const
7290 {
7291 using namespace Zivid::Detail::TypeTraits;
7292
7293 using AllArgsAreDescendantNodes =
7294 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7295 static_assert(
7296 AllArgsAreDescendantNodes::value,
7297 "All arguments passed to copyWith(...) must be descendant nodes.");
7298
7299 static_assert(
7300 AllArgsDecayedAreUnique<Args...>::value,
7301 "Found duplicate types among the arguments passed to copyWith(...). "
7302 "Types should be listed at most once.");
7303
7304 auto copy{ *this };
7305 copy.set(std::forward<Args>(args)...);
7306 return copy;
7307 }
7308
7310 const Enabled &isEnabled() const
7311 {
7312 return m_enabled;
7313 }
7314
7317 {
7318 return m_enabled;
7319 }
7320
7322 Suppression &set(const Enabled &value)
7323 {
7324 m_enabled = value;
7325 return *this;
7326 }
7327
7328 template<
7329 typename T,
7330 typename std::enable_if<
7331 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7332 int>::type = 0>
7334 {
7335 return m_enabled;
7336 }
7337
7338 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7340 {
7341 return m_enabled;
7342 }
7343
7345 template<typename F>
7346 void forEach(const F &f) const
7347 {
7348 f(m_enabled);
7349 }
7350
7352 template<typename F>
7353 void forEach(const F &f)
7354 {
7355 f(m_enabled);
7356 }
7357
7359 bool operator==(const Suppression &other) const;
7360
7362 bool operator!=(const Suppression &other) const;
7363
7365 std::string toString() const;
7366
7368 friend std::ostream &operator<<(std::ostream &stream, const Suppression &value)
7369 {
7370 return stream << value.toString();
7371 }
7372
7373 private:
7374 void setFromString(const std::string &value);
7375
7376 void setFromString(const std::string &fullPath, const std::string &value);
7377
7378 std::string getString(const std::string &fullPath) const;
7379
7380 Enabled m_enabled;
7381
7382 friend struct DataModel::Detail::Befriend<Suppression>;
7383 };
7384
7385 using Descendants = std::tuple<
7393
7396
7414#ifndef NO_DOC
7415 template<
7416 typename... Args,
7417 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7418 typename std::enable_if<
7419 Zivid::Detail::TypeTraits::
7420 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7421 int>::type = 0>
7422#else
7423 template<typename... Args>
7424#endif
7425 explicit Noise(Args &&...args)
7426 {
7427 using namespace Zivid::Detail::TypeTraits;
7428
7429 static_assert(
7430 AllArgsDecayedAreUnique<Args...>::value,
7431 "Found duplicate types among the arguments passed to Noise(...). "
7432 "Types should be listed at most once.");
7433
7434 set(std::forward<Args>(args)...);
7435 }
7436
7453#ifndef NO_DOC
7454 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7455#else
7456 template<typename... Args>
7457#endif
7458 void set(Args &&...args)
7459 {
7460 using namespace Zivid::Detail::TypeTraits;
7461
7462 using AllArgsAreDescendantNodes =
7463 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7464 static_assert(
7465 AllArgsAreDescendantNodes::value,
7466 "All arguments passed to set(...) must be descendant nodes.");
7467
7468 static_assert(
7469 AllArgsDecayedAreUnique<Args...>::value,
7470 "Found duplicate types among the arguments passed to set(...). "
7471 "Types should be listed at most once.");
7472
7473 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7474 }
7475
7493#ifndef NO_DOC
7494 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7495#else
7496 template<typename... Args>
7497#endif
7498 Noise copyWith(Args &&...args) const
7499 {
7500 using namespace Zivid::Detail::TypeTraits;
7501
7502 using AllArgsAreDescendantNodes =
7503 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7504 static_assert(
7505 AllArgsAreDescendantNodes::value,
7506 "All arguments passed to copyWith(...) must be descendant nodes.");
7507
7508 static_assert(
7509 AllArgsDecayedAreUnique<Args...>::value,
7510 "Found duplicate types among the arguments passed to copyWith(...). "
7511 "Types should be listed at most once.");
7512
7513 auto copy{ *this };
7514 copy.set(std::forward<Args>(args)...);
7515 return copy;
7516 }
7517
7519 const Removal &removal() const
7520 {
7521 return m_removal;
7522 }
7523
7526 {
7527 return m_removal;
7528 }
7529
7531 Noise &set(const Removal &value)
7532 {
7533 m_removal = value;
7534 return *this;
7535 }
7536
7539 {
7540 m_removal.set(value);
7541 return *this;
7542 }
7543
7546 {
7547 m_removal.set(value);
7548 return *this;
7549 }
7550
7552 const Repair &repair() const
7553 {
7554 return m_repair;
7555 }
7556
7559 {
7560 return m_repair;
7561 }
7562
7564 Noise &set(const Repair &value)
7565 {
7566 m_repair = value;
7567 return *this;
7568 }
7569
7572 {
7573 m_repair.set(value);
7574 return *this;
7575 }
7576
7579 {
7580 return m_suppression;
7581 }
7582
7585 {
7586 return m_suppression;
7587 }
7588
7590 Noise &set(const Suppression &value)
7591 {
7592 m_suppression = value;
7593 return *this;
7594 }
7595
7598 {
7599 m_suppression.set(value);
7600 return *this;
7601 }
7602
7603 template<
7604 typename T,
7605 typename std::enable_if<
7606 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7607 int>::type = 0>
7609 {
7610 return m_removal;
7611 }
7612
7613 template<
7614 typename T,
7615 typename std::enable_if<
7616 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7617 int>::type = 0>
7619 {
7621 }
7622
7623 template<
7624 typename T,
7625 typename std::enable_if<
7626 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7627 int>::type = 0>
7629 {
7631 }
7632
7633 template<
7634 typename T,
7635 typename std::enable_if<
7636 std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value,
7637 int>::type = 0>
7639 {
7640 return m_repair;
7641 }
7642
7643 template<
7644 typename T,
7645 typename std::enable_if<
7646 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7647 int>::type = 0>
7649 {
7651 }
7652
7653 template<
7654 typename T,
7655 typename std::enable_if<
7656 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
7657 int>::type = 0>
7659 {
7660 return m_suppression;
7661 }
7662
7663 template<
7664 typename T,
7665 typename std::enable_if<
7666 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7667 int>::type = 0>
7669 {
7671 }
7672
7673 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7675 {
7676 return m_removal;
7677 }
7678
7679 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7681 {
7682 return m_repair;
7683 }
7684
7685 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7687 {
7688 return m_suppression;
7689 }
7690
7692 template<typename F>
7693 void forEach(const F &f) const
7694 {
7695 f(m_removal);
7696 f(m_repair);
7697 f(m_suppression);
7698 }
7699
7701 template<typename F>
7702 void forEach(const F &f)
7703 {
7704 f(m_removal);
7705 f(m_repair);
7706 f(m_suppression);
7707 }
7708
7710 bool operator==(const Noise &other) const;
7711
7713 bool operator!=(const Noise &other) const;
7714
7716 std::string toString() const;
7717
7719 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
7720 {
7721 return stream << value.toString();
7722 }
7723
7724 private:
7725 void setFromString(const std::string &value);
7726
7727 void setFromString(const std::string &fullPath, const std::string &value);
7728
7729 std::string getString(const std::string &fullPath) const;
7730
7731 Removal m_removal;
7732 Repair m_repair;
7733 Suppression m_suppression;
7734
7735 friend struct DataModel::Detail::Befriend<Noise>;
7736 };
7737
7739
7740 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7742 {
7743 public:
7745 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7746
7748 static constexpr const char *path{ "Processing/Filters/Outlier" };
7749
7751 static constexpr const char *name{ "Outlier" };
7752
7754 static constexpr const char *description{
7755 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points.)description"
7756 };
7757
7759
7760 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7762 {
7763 public:
7765 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7766
7768 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
7769
7771 static constexpr const char *name{ "Removal" };
7772
7774 static constexpr const char *description{
7775 R"description(Discard point if Euclidean distance to neighboring points is above a threshold.)description"
7776 };
7777
7779
7780 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7782 {
7783 public:
7785 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7786
7788 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
7789
7791 static constexpr const char *name{ "Enabled" };
7792
7794 static constexpr const char *description{
7795 R"description(Enable or disable the outlier filter.)description"
7796 };
7797
7799 using ValueType = bool;
7800 static const Enabled yes;
7801 static const Enabled no;
7802
7804 static std::set<bool> validValues()
7805 {
7806 return { false, true };
7807 }
7808
7810 Enabled() = default;
7811
7813 explicit constexpr Enabled(bool value)
7814 : m_opt{ value }
7815 {}
7816
7821 bool value() const;
7822
7824 bool hasValue() const;
7825
7827 void reset();
7828
7830 std::string toString() const;
7831
7833 bool operator==(const Enabled &other) const
7834 {
7835 return m_opt == other.m_opt;
7836 }
7837
7839 bool operator!=(const Enabled &other) const
7840 {
7841 return m_opt != other.m_opt;
7842 }
7843
7845 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7846 {
7847 return stream << value.toString();
7848 }
7849
7850 private:
7851 void setFromString(const std::string &value);
7852
7853 Zivid::DataModel::Detail::Optional<bool> m_opt;
7854
7855 friend struct DataModel::Detail::Befriend<Enabled>;
7856 };
7857
7859
7860 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7862 {
7863 public:
7865 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7866
7868 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
7869
7871 static constexpr const char *name{ "Threshold" };
7872
7874 static constexpr const char *description{
7875 R"description(Discard point if Euclidean distance to neighboring points is above the given value.)description"
7876 };
7877
7879 using ValueType = double;
7880
7882 static constexpr Range<double> validRange()
7883 {
7884 return { 0.0, 100.0 };
7885 }
7886
7888 Threshold() = default;
7889
7891 explicit constexpr Threshold(double value)
7892 : m_opt{ verifyValue(value) }
7893 {}
7894
7899 double value() const;
7900
7902 bool hasValue() const;
7903
7905 void reset();
7906
7908 std::string toString() const;
7909
7911 bool operator==(const Threshold &other) const
7912 {
7913 return m_opt == other.m_opt;
7914 }
7915
7917 bool operator!=(const Threshold &other) const
7918 {
7919 return m_opt != other.m_opt;
7920 }
7921
7923 bool operator<(const Threshold &other) const
7924 {
7925 return m_opt < other.m_opt;
7926 }
7927
7929 bool operator>(const Threshold &other) const
7930 {
7931 return m_opt > other.m_opt;
7932 }
7933
7935 bool operator<=(const Threshold &other) const
7936 {
7937 return m_opt <= other.m_opt;
7938 }
7939
7941 bool operator>=(const Threshold &other) const
7942 {
7943 return m_opt >= other.m_opt;
7944 }
7945
7947 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
7948 {
7949 return stream << value.toString();
7950 }
7951
7952 private:
7953 void setFromString(const std::string &value);
7954
7955 constexpr ValueType static verifyValue(const ValueType &value)
7956 {
7957 return validRange().isInRange(value)
7958 ? value
7959 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
7960 + " } is not in range ["
7961 + std::to_string(validRange().min()) + ", "
7962 + std::to_string(validRange().max()) + "]" };
7963 }
7964
7965 Zivid::DataModel::Detail::Optional<double> m_opt;
7966
7967 friend struct DataModel::Detail::Befriend<Threshold>;
7968 };
7969
7970 using Descendants = std::tuple<
7973
7976
7989#ifndef NO_DOC
7990 template<
7991 typename... Args,
7992 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7993 typename std::enable_if<
7994 Zivid::Detail::TypeTraits::
7995 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7996 int>::type = 0>
7997#else
7998 template<typename... Args>
7999#endif
8000 explicit Removal(Args &&...args)
8001 {
8002 using namespace Zivid::Detail::TypeTraits;
8003
8004 static_assert(
8005 AllArgsDecayedAreUnique<Args...>::value,
8006 "Found duplicate types among the arguments passed to Removal(...). "
8007 "Types should be listed at most once.");
8008
8009 set(std::forward<Args>(args)...);
8010 }
8011
8023#ifndef NO_DOC
8024 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8025#else
8026 template<typename... Args>
8027#endif
8028 void set(Args &&...args)
8029 {
8030 using namespace Zivid::Detail::TypeTraits;
8031
8032 using AllArgsAreDescendantNodes =
8033 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8034 static_assert(
8035 AllArgsAreDescendantNodes::value,
8036 "All arguments passed to set(...) must be descendant nodes.");
8037
8038 static_assert(
8039 AllArgsDecayedAreUnique<Args...>::value,
8040 "Found duplicate types among the arguments passed to set(...). "
8041 "Types should be listed at most once.");
8042
8043 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8044 }
8045
8058#ifndef NO_DOC
8059 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8060#else
8061 template<typename... Args>
8062#endif
8063 Removal copyWith(Args &&...args) const
8064 {
8065 using namespace Zivid::Detail::TypeTraits;
8066
8067 using AllArgsAreDescendantNodes =
8068 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8069 static_assert(
8070 AllArgsAreDescendantNodes::value,
8071 "All arguments passed to copyWith(...) must be descendant nodes.");
8072
8073 static_assert(
8074 AllArgsDecayedAreUnique<Args...>::value,
8075 "Found duplicate types among the arguments passed to copyWith(...). "
8076 "Types should be listed at most once.");
8077
8078 auto copy{ *this };
8079 copy.set(std::forward<Args>(args)...);
8080 return copy;
8081 }
8082
8084 const Enabled &isEnabled() const
8085 {
8086 return m_enabled;
8087 }
8088
8091 {
8092 return m_enabled;
8093 }
8094
8096 Removal &set(const Enabled &value)
8097 {
8098 m_enabled = value;
8099 return *this;
8100 }
8101
8103 const Threshold &threshold() const
8104 {
8105 return m_threshold;
8106 }
8107
8110 {
8111 return m_threshold;
8112 }
8113
8115 Removal &set(const Threshold &value)
8116 {
8117 m_threshold = value;
8118 return *this;
8119 }
8120
8121 template<
8122 typename T,
8123 typename std::enable_if<
8124 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8125 int>::type = 0>
8127 {
8128 return m_enabled;
8129 }
8130
8131 template<
8132 typename T,
8133 typename std::enable_if<
8134 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8135 int>::type = 0>
8137 {
8138 return m_threshold;
8139 }
8140
8141 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8143 {
8144 return m_enabled;
8145 }
8146
8147 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8149 {
8150 return m_threshold;
8151 }
8152
8154 template<typename F>
8155 void forEach(const F &f) const
8156 {
8157 f(m_enabled);
8158 f(m_threshold);
8159 }
8160
8162 template<typename F>
8163 void forEach(const F &f)
8164 {
8165 f(m_enabled);
8166 f(m_threshold);
8167 }
8168
8170 bool operator==(const Removal &other) const;
8171
8173 bool operator!=(const Removal &other) const;
8174
8176 std::string toString() const;
8177
8179 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8180 {
8181 return stream << value.toString();
8182 }
8183
8184 private:
8185 void setFromString(const std::string &value);
8186
8187 void setFromString(const std::string &fullPath, const std::string &value);
8188
8189 std::string getString(const std::string &fullPath) const;
8190
8191 Enabled m_enabled;
8192 Threshold m_threshold;
8193
8194 friend struct DataModel::Detail::Befriend<Removal>;
8195 };
8196
8197 using Descendants = std::tuple<
8201
8204
8218#ifndef NO_DOC
8219 template<
8220 typename... Args,
8221 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8222 typename std::enable_if<
8223 Zivid::Detail::TypeTraits::
8224 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8225 int>::type = 0>
8226#else
8227 template<typename... Args>
8228#endif
8229 explicit Outlier(Args &&...args)
8230 {
8231 using namespace Zivid::Detail::TypeTraits;
8232
8233 static_assert(
8234 AllArgsDecayedAreUnique<Args...>::value,
8235 "Found duplicate types among the arguments passed to Outlier(...). "
8236 "Types should be listed at most once.");
8237
8238 set(std::forward<Args>(args)...);
8239 }
8240
8253#ifndef NO_DOC
8254 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8255#else
8256 template<typename... Args>
8257#endif
8258 void set(Args &&...args)
8259 {
8260 using namespace Zivid::Detail::TypeTraits;
8261
8262 using AllArgsAreDescendantNodes =
8263 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8264 static_assert(
8265 AllArgsAreDescendantNodes::value,
8266 "All arguments passed to set(...) must be descendant nodes.");
8267
8268 static_assert(
8269 AllArgsDecayedAreUnique<Args...>::value,
8270 "Found duplicate types among the arguments passed to set(...). "
8271 "Types should be listed at most once.");
8272
8273 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8274 }
8275
8289#ifndef NO_DOC
8290 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8291#else
8292 template<typename... Args>
8293#endif
8294 Outlier copyWith(Args &&...args) const
8295 {
8296 using namespace Zivid::Detail::TypeTraits;
8297
8298 using AllArgsAreDescendantNodes =
8299 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8300 static_assert(
8301 AllArgsAreDescendantNodes::value,
8302 "All arguments passed to copyWith(...) must be descendant nodes.");
8303
8304 static_assert(
8305 AllArgsDecayedAreUnique<Args...>::value,
8306 "Found duplicate types among the arguments passed to copyWith(...). "
8307 "Types should be listed at most once.");
8308
8309 auto copy{ *this };
8310 copy.set(std::forward<Args>(args)...);
8311 return copy;
8312 }
8313
8315 const Removal &removal() const
8316 {
8317 return m_removal;
8318 }
8319
8322 {
8323 return m_removal;
8324 }
8325
8327 Outlier &set(const Removal &value)
8328 {
8329 m_removal = value;
8330 return *this;
8331 }
8332
8335 {
8336 m_removal.set(value);
8337 return *this;
8338 }
8339
8342 {
8343 m_removal.set(value);
8344 return *this;
8345 }
8346
8347 template<
8348 typename T,
8349 typename std::enable_if<
8350 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8351 int>::type = 0>
8353 {
8354 return m_removal;
8355 }
8356
8357 template<
8358 typename T,
8359 typename std::enable_if<
8360 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8361 int>::type = 0>
8363 {
8365 }
8366
8367 template<
8368 typename T,
8369 typename std::enable_if<
8370 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8371 int>::type = 0>
8373 {
8375 }
8376
8377 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8379 {
8380 return m_removal;
8381 }
8382
8384 template<typename F>
8385 void forEach(const F &f) const
8386 {
8387 f(m_removal);
8388 }
8389
8391 template<typename F>
8392 void forEach(const F &f)
8393 {
8394 f(m_removal);
8395 }
8396
8398 bool operator==(const Outlier &other) const;
8399
8401 bool operator!=(const Outlier &other) const;
8402
8404 std::string toString() const;
8405
8407 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
8408 {
8409 return stream << value.toString();
8410 }
8411
8412 private:
8413 void setFromString(const std::string &value);
8414
8415 void setFromString(const std::string &fullPath, const std::string &value);
8416
8417 std::string getString(const std::string &fullPath) const;
8418
8419 Removal m_removal;
8420
8421 friend struct DataModel::Detail::Befriend<Outlier>;
8422 };
8423
8425
8426 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8428 {
8429 public:
8431 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8432
8434 static constexpr const char *path{ "Processing/Filters/Reflection" };
8435
8437 static constexpr const char *name{ "Reflection" };
8438
8440 static constexpr const char *description{
8441 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials).)description"
8442 };
8443
8445
8446 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8448 {
8449 public:
8451 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8452
8454 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
8455
8457 static constexpr const char *name{ "Removal" };
8458
8460 static constexpr const char *description{
8461 R"description(Discard points likely introduced by reflections (useful for shiny materials).)description"
8462 };
8463
8465
8466 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8468 {
8469 public:
8471 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8472
8474 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
8475
8477 static constexpr const char *name{ "Enabled" };
8478
8480 static constexpr const char *description{
8481 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate.)description"
8482 };
8483
8485 using ValueType = bool;
8486 static const Enabled yes;
8487 static const Enabled no;
8488
8490 static std::set<bool> validValues()
8491 {
8492 return { false, true };
8493 }
8494
8496 Enabled() = default;
8497
8499 explicit constexpr Enabled(bool value)
8500 : m_opt{ value }
8501 {}
8502
8507 bool value() const;
8508
8510 bool hasValue() const;
8511
8513 void reset();
8514
8516 std::string toString() const;
8517
8519 bool operator==(const Enabled &other) const
8520 {
8521 return m_opt == other.m_opt;
8522 }
8523
8525 bool operator!=(const Enabled &other) const
8526 {
8527 return m_opt != other.m_opt;
8528 }
8529
8531 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8532 {
8533 return stream << value.toString();
8534 }
8535
8536 private:
8537 void setFromString(const std::string &value);
8538
8539 Zivid::DataModel::Detail::Optional<bool> m_opt;
8540
8541 friend struct DataModel::Detail::Befriend<Enabled>;
8542 };
8543
8552
8553 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8555 {
8556 public:
8558 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8559
8561 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Mode" };
8562
8564 static constexpr const char *name{ "Mode" };
8565
8567 static constexpr const char *description{
8568 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
8569on thinner objects, generally removes more reflection artifacts and processes faster than
8570the Global filter. The Global filter is generally better at removing outlier points in
8571the point cloud. It is advised to use the Outlier filter and Cluster filter together with the
8572Local Reflection filter.
8573
8574Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
8575)description"
8576 };
8577
8579 enum class ValueType
8580 {
8581 global,
8582 local
8583 };
8584 static const Mode global;
8585 static const Mode local;
8586
8588 static std::set<ValueType> validValues()
8589 {
8590 return { ValueType::global, ValueType::local };
8591 }
8592
8594 Mode() = default;
8595
8597 explicit constexpr Mode(ValueType value)
8598 : m_opt{ verifyValue(value) }
8599 {}
8600
8606
8608 bool hasValue() const;
8609
8611 void reset();
8612
8614 std::string toString() const;
8615
8617 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8618 {
8619 return stream << Mode{ value }.toString();
8620 }
8621
8623 bool operator==(const Mode &other) const
8624 {
8625 return m_opt == other.m_opt;
8626 }
8627
8629 bool operator!=(const Mode &other) const
8630 {
8631 return m_opt != other.m_opt;
8632 }
8633
8635 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8636 {
8637 return stream << value.toString();
8638 }
8639
8640 private:
8641 void setFromString(const std::string &value);
8642
8643 constexpr ValueType static verifyValue(const ValueType &value)
8644 {
8645 return value == ValueType::global || value == ValueType::local
8646 ? value
8647 : throw std::invalid_argument{
8648 "Invalid value: Mode{ "
8649 + std::to_string(
8650 static_cast<std::underlying_type<ValueType>::type>(value))
8651 + " }"
8652 };
8653 }
8654
8655 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
8656
8657 friend struct DataModel::Detail::Befriend<Mode>;
8658 };
8659
8660 using Descendants = std::tuple<
8663
8666
8679#ifndef NO_DOC
8680 template<
8681 typename... Args,
8682 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8683 typename std::enable_if<
8684 Zivid::Detail::TypeTraits::
8685 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8686 int>::type = 0>
8687#else
8688 template<typename... Args>
8689#endif
8690 explicit Removal(Args &&...args)
8691 {
8692 using namespace Zivid::Detail::TypeTraits;
8693
8694 static_assert(
8695 AllArgsDecayedAreUnique<Args...>::value,
8696 "Found duplicate types among the arguments passed to Removal(...). "
8697 "Types should be listed at most once.");
8698
8699 set(std::forward<Args>(args)...);
8700 }
8701
8713#ifndef NO_DOC
8714 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8715#else
8716 template<typename... Args>
8717#endif
8718 void set(Args &&...args)
8719 {
8720 using namespace Zivid::Detail::TypeTraits;
8721
8722 using AllArgsAreDescendantNodes =
8723 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8724 static_assert(
8725 AllArgsAreDescendantNodes::value,
8726 "All arguments passed to set(...) must be descendant nodes.");
8727
8728 static_assert(
8729 AllArgsDecayedAreUnique<Args...>::value,
8730 "Found duplicate types among the arguments passed to set(...). "
8731 "Types should be listed at most once.");
8732
8733 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8734 }
8735
8748#ifndef NO_DOC
8749 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8750#else
8751 template<typename... Args>
8752#endif
8753 Removal copyWith(Args &&...args) const
8754 {
8755 using namespace Zivid::Detail::TypeTraits;
8756
8757 using AllArgsAreDescendantNodes =
8758 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8759 static_assert(
8760 AllArgsAreDescendantNodes::value,
8761 "All arguments passed to copyWith(...) must be descendant nodes.");
8762
8763 static_assert(
8764 AllArgsDecayedAreUnique<Args...>::value,
8765 "Found duplicate types among the arguments passed to copyWith(...). "
8766 "Types should be listed at most once.");
8767
8768 auto copy{ *this };
8769 copy.set(std::forward<Args>(args)...);
8770 return copy;
8771 }
8772
8774 const Enabled &isEnabled() const
8775 {
8776 return m_enabled;
8777 }
8778
8781 {
8782 return m_enabled;
8783 }
8784
8786 Removal &set(const Enabled &value)
8787 {
8788 m_enabled = value;
8789 return *this;
8790 }
8791
8793 const Mode &mode() const
8794 {
8795 return m_mode;
8796 }
8797
8800 {
8801 return m_mode;
8802 }
8803
8805 Removal &set(const Mode &value)
8806 {
8807 m_mode = value;
8808 return *this;
8809 }
8810
8811 template<
8812 typename T,
8813 typename std::enable_if<
8814 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8815 int>::type = 0>
8817 {
8818 return m_enabled;
8819 }
8820
8821 template<
8822 typename T,
8823 typename std::enable_if<
8824 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
8825 int>::type = 0>
8827 {
8828 return m_mode;
8829 }
8830
8831 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8833 {
8834 return m_enabled;
8835 }
8836
8837 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8839 {
8840 return m_mode;
8841 }
8842
8844 template<typename F>
8845 void forEach(const F &f) const
8846 {
8847 f(m_enabled);
8848 f(m_mode);
8849 }
8850
8852 template<typename F>
8853 void forEach(const F &f)
8854 {
8855 f(m_enabled);
8856 f(m_mode);
8857 }
8858
8860 bool operator==(const Removal &other) const;
8861
8863 bool operator!=(const Removal &other) const;
8864
8866 std::string toString() const;
8867
8869 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8870 {
8871 return stream << value.toString();
8872 }
8873
8874 private:
8875 void setFromString(const std::string &value);
8876
8877 void setFromString(const std::string &fullPath, const std::string &value);
8878
8879 std::string getString(const std::string &fullPath) const;
8880
8881 Enabled m_enabled;
8882 Mode m_mode;
8883
8884 friend struct DataModel::Detail::Befriend<Removal>;
8885 };
8886
8887 using Descendants = std::tuple<
8891
8894
8908#ifndef NO_DOC
8909 template<
8910 typename... Args,
8911 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8912 typename std::enable_if<
8913 Zivid::Detail::TypeTraits::
8914 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8915 int>::type = 0>
8916#else
8917 template<typename... Args>
8918#endif
8919 explicit Reflection(Args &&...args)
8920 {
8921 using namespace Zivid::Detail::TypeTraits;
8922
8923 static_assert(
8924 AllArgsDecayedAreUnique<Args...>::value,
8925 "Found duplicate types among the arguments passed to Reflection(...). "
8926 "Types should be listed at most once.");
8927
8928 set(std::forward<Args>(args)...);
8929 }
8930
8943#ifndef NO_DOC
8944 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8945#else
8946 template<typename... Args>
8947#endif
8948 void set(Args &&...args)
8949 {
8950 using namespace Zivid::Detail::TypeTraits;
8951
8952 using AllArgsAreDescendantNodes =
8953 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8954 static_assert(
8955 AllArgsAreDescendantNodes::value,
8956 "All arguments passed to set(...) must be descendant nodes.");
8957
8958 static_assert(
8959 AllArgsDecayedAreUnique<Args...>::value,
8960 "Found duplicate types among the arguments passed to set(...). "
8961 "Types should be listed at most once.");
8962
8963 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8964 }
8965
8979#ifndef NO_DOC
8980 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8981#else
8982 template<typename... Args>
8983#endif
8984 Reflection copyWith(Args &&...args) const
8985 {
8986 using namespace Zivid::Detail::TypeTraits;
8987
8988 using AllArgsAreDescendantNodes =
8989 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8990 static_assert(
8991 AllArgsAreDescendantNodes::value,
8992 "All arguments passed to copyWith(...) must be descendant nodes.");
8993
8994 static_assert(
8995 AllArgsDecayedAreUnique<Args...>::value,
8996 "Found duplicate types among the arguments passed to copyWith(...). "
8997 "Types should be listed at most once.");
8998
8999 auto copy{ *this };
9000 copy.set(std::forward<Args>(args)...);
9001 return copy;
9002 }
9003
9005 const Removal &removal() const
9006 {
9007 return m_removal;
9008 }
9009
9012 {
9013 return m_removal;
9014 }
9015
9017 Reflection &set(const Removal &value)
9018 {
9019 m_removal = value;
9020 return *this;
9021 }
9022
9025 {
9026 m_removal.set(value);
9027 return *this;
9028 }
9029
9032 {
9033 m_removal.set(value);
9034 return *this;
9035 }
9036
9037 template<
9038 typename T,
9039 typename std::enable_if<
9040 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9041 int>::type = 0>
9043 {
9044 return m_removal;
9045 }
9046
9047 template<
9048 typename T,
9049 typename std::enable_if<
9050 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9051 int>::type = 0>
9053 {
9055 }
9056
9057 template<
9058 typename T,
9059 typename std::enable_if<
9060 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9061 int>::type = 0>
9063 {
9065 }
9066
9067 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9069 {
9070 return m_removal;
9071 }
9072
9074 template<typename F>
9075 void forEach(const F &f) const
9076 {
9077 f(m_removal);
9078 }
9079
9081 template<typename F>
9082 void forEach(const F &f)
9083 {
9084 f(m_removal);
9085 }
9086
9088 bool operator==(const Reflection &other) const;
9089
9091 bool operator!=(const Reflection &other) const;
9092
9094 std::string toString() const;
9095
9097 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9098 {
9099 return stream << value.toString();
9100 }
9101
9102 private:
9103 void setFromString(const std::string &value);
9104
9105 void setFromString(const std::string &fullPath, const std::string &value);
9106
9107 std::string getString(const std::string &fullPath) const;
9108
9109 Removal m_removal;
9110
9111 friend struct DataModel::Detail::Befriend<Reflection>;
9112 };
9113
9115
9116 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9118 {
9119 public:
9121 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9122
9124 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9125
9127 static constexpr const char *name{ "Smoothing" };
9128
9130 static constexpr const char *description{ R"description(Smoothing filters.)description" };
9131
9133
9134 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9136 {
9137 public:
9139 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9140
9142 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9143
9145 static constexpr const char *name{ "Gaussian" };
9146
9148 static constexpr const char *description{
9149 R"description(Gaussian smoothing of the point cloud.)description"
9150 };
9151
9153
9154 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9156 {
9157 public:
9159 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9160
9162 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9163
9165 static constexpr const char *name{ "Enabled" };
9166
9168 static constexpr const char *description{
9169 R"description(Enable or disable the smoothing filter.)description"
9170 };
9171
9173 using ValueType = bool;
9174 static const Enabled yes;
9175 static const Enabled no;
9176
9178 static std::set<bool> validValues()
9179 {
9180 return { false, true };
9181 }
9182
9184 Enabled() = default;
9185
9187 explicit constexpr Enabled(bool value)
9188 : m_opt{ value }
9189 {}
9190
9195 bool value() const;
9196
9198 bool hasValue() const;
9199
9201 void reset();
9202
9204 std::string toString() const;
9205
9207 bool operator==(const Enabled &other) const
9208 {
9209 return m_opt == other.m_opt;
9210 }
9211
9213 bool operator!=(const Enabled &other) const
9214 {
9215 return m_opt != other.m_opt;
9216 }
9217
9219 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9220 {
9221 return stream << value.toString();
9222 }
9223
9224 private:
9225 void setFromString(const std::string &value);
9226
9227 Zivid::DataModel::Detail::Optional<bool> m_opt;
9228
9229 friend struct DataModel::Detail::Befriend<Enabled>;
9230 };
9231
9233
9234 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9236 {
9237 public:
9239 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9240
9242 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9243
9245 static constexpr const char *name{ "Sigma" };
9246
9248 static constexpr const char *description{
9249 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients).)description"
9250 };
9251
9253 using ValueType = double;
9254
9256 static constexpr Range<double> validRange()
9257 {
9258 return { 0.5, 5 };
9259 }
9260
9262 Sigma() = default;
9263
9265 explicit constexpr Sigma(double value)
9266 : m_opt{ verifyValue(value) }
9267 {}
9268
9273 double value() const;
9274
9276 bool hasValue() const;
9277
9279 void reset();
9280
9282 std::string toString() const;
9283
9285 bool operator==(const Sigma &other) const
9286 {
9287 return m_opt == other.m_opt;
9288 }
9289
9291 bool operator!=(const Sigma &other) const
9292 {
9293 return m_opt != other.m_opt;
9294 }
9295
9297 bool operator<(const Sigma &other) const
9298 {
9299 return m_opt < other.m_opt;
9300 }
9301
9303 bool operator>(const Sigma &other) const
9304 {
9305 return m_opt > other.m_opt;
9306 }
9307
9309 bool operator<=(const Sigma &other) const
9310 {
9311 return m_opt <= other.m_opt;
9312 }
9313
9315 bool operator>=(const Sigma &other) const
9316 {
9317 return m_opt >= other.m_opt;
9318 }
9319
9321 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9322 {
9323 return stream << value.toString();
9324 }
9325
9326 private:
9327 void setFromString(const std::string &value);
9328
9329 constexpr ValueType static verifyValue(const ValueType &value)
9330 {
9331 return validRange().isInRange(value)
9332 ? value
9333 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9334 + " } is not in range ["
9335 + std::to_string(validRange().min()) + ", "
9336 + std::to_string(validRange().max()) + "]" };
9337 }
9338
9339 Zivid::DataModel::Detail::Optional<double> m_opt;
9340
9341 friend struct DataModel::Detail::Befriend<Sigma>;
9342 };
9343
9344 using Descendants = std::tuple<
9347
9350
9363#ifndef NO_DOC
9364 template<
9365 typename... Args,
9366 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9367 typename std::enable_if<
9368 Zivid::Detail::TypeTraits::
9369 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9370 int>::type = 0>
9371#else
9372 template<typename... Args>
9373#endif
9374 explicit Gaussian(Args &&...args)
9375 {
9376 using namespace Zivid::Detail::TypeTraits;
9377
9378 static_assert(
9379 AllArgsDecayedAreUnique<Args...>::value,
9380 "Found duplicate types among the arguments passed to Gaussian(...). "
9381 "Types should be listed at most once.");
9382
9383 set(std::forward<Args>(args)...);
9384 }
9385
9397#ifndef NO_DOC
9398 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9399#else
9400 template<typename... Args>
9401#endif
9402 void set(Args &&...args)
9403 {
9404 using namespace Zivid::Detail::TypeTraits;
9405
9406 using AllArgsAreDescendantNodes =
9407 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9408 static_assert(
9409 AllArgsAreDescendantNodes::value,
9410 "All arguments passed to set(...) must be descendant nodes.");
9411
9412 static_assert(
9413 AllArgsDecayedAreUnique<Args...>::value,
9414 "Found duplicate types among the arguments passed to set(...). "
9415 "Types should be listed at most once.");
9416
9417 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9418 }
9419
9432#ifndef NO_DOC
9433 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9434#else
9435 template<typename... Args>
9436#endif
9437 Gaussian copyWith(Args &&...args) const
9438 {
9439 using namespace Zivid::Detail::TypeTraits;
9440
9441 using AllArgsAreDescendantNodes =
9442 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9443 static_assert(
9444 AllArgsAreDescendantNodes::value,
9445 "All arguments passed to copyWith(...) must be descendant nodes.");
9446
9447 static_assert(
9448 AllArgsDecayedAreUnique<Args...>::value,
9449 "Found duplicate types among the arguments passed to copyWith(...). "
9450 "Types should be listed at most once.");
9451
9452 auto copy{ *this };
9453 copy.set(std::forward<Args>(args)...);
9454 return copy;
9455 }
9456
9458 const Enabled &isEnabled() const
9459 {
9460 return m_enabled;
9461 }
9462
9465 {
9466 return m_enabled;
9467 }
9468
9470 Gaussian &set(const Enabled &value)
9471 {
9472 m_enabled = value;
9473 return *this;
9474 }
9475
9477 const Sigma &sigma() const
9478 {
9479 return m_sigma;
9480 }
9481
9484 {
9485 return m_sigma;
9486 }
9487
9489 Gaussian &set(const Sigma &value)
9490 {
9491 m_sigma = value;
9492 return *this;
9493 }
9494
9495 template<
9496 typename T,
9497 typename std::enable_if<
9498 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9499 int>::type = 0>
9501 {
9502 return m_enabled;
9503 }
9504
9505 template<
9506 typename T,
9507 typename std::enable_if<
9508 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9509 int>::type = 0>
9511 {
9512 return m_sigma;
9513 }
9514
9515 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9517 {
9518 return m_enabled;
9519 }
9520
9521 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9523 {
9524 return m_sigma;
9525 }
9526
9528 template<typename F>
9529 void forEach(const F &f) const
9530 {
9531 f(m_enabled);
9532 f(m_sigma);
9533 }
9534
9536 template<typename F>
9537 void forEach(const F &f)
9538 {
9539 f(m_enabled);
9540 f(m_sigma);
9541 }
9542
9544 bool operator==(const Gaussian &other) const;
9545
9547 bool operator!=(const Gaussian &other) const;
9548
9550 std::string toString() const;
9551
9553 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9554 {
9555 return stream << value.toString();
9556 }
9557
9558 private:
9559 void setFromString(const std::string &value);
9560
9561 void setFromString(const std::string &fullPath, const std::string &value);
9562
9563 std::string getString(const std::string &fullPath) const;
9564
9565 Enabled m_enabled;
9566 Sigma m_sigma;
9567
9568 friend struct DataModel::Detail::Befriend<Gaussian>;
9569 };
9570
9571 using Descendants = std::tuple<
9575
9578
9592#ifndef NO_DOC
9593 template<
9594 typename... Args,
9595 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9596 typename std::enable_if<
9597 Zivid::Detail::TypeTraits::
9598 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9599 int>::type = 0>
9600#else
9601 template<typename... Args>
9602#endif
9603 explicit Smoothing(Args &&...args)
9604 {
9605 using namespace Zivid::Detail::TypeTraits;
9606
9607 static_assert(
9608 AllArgsDecayedAreUnique<Args...>::value,
9609 "Found duplicate types among the arguments passed to Smoothing(...). "
9610 "Types should be listed at most once.");
9611
9612 set(std::forward<Args>(args)...);
9613 }
9614
9627#ifndef NO_DOC
9628 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9629#else
9630 template<typename... Args>
9631#endif
9632 void set(Args &&...args)
9633 {
9634 using namespace Zivid::Detail::TypeTraits;
9635
9636 using AllArgsAreDescendantNodes =
9637 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9638 static_assert(
9639 AllArgsAreDescendantNodes::value,
9640 "All arguments passed to set(...) must be descendant nodes.");
9641
9642 static_assert(
9643 AllArgsDecayedAreUnique<Args...>::value,
9644 "Found duplicate types among the arguments passed to set(...). "
9645 "Types should be listed at most once.");
9646
9647 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9648 }
9649
9663#ifndef NO_DOC
9664 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9665#else
9666 template<typename... Args>
9667#endif
9668 Smoothing copyWith(Args &&...args) const
9669 {
9670 using namespace Zivid::Detail::TypeTraits;
9671
9672 using AllArgsAreDescendantNodes =
9673 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9674 static_assert(
9675 AllArgsAreDescendantNodes::value,
9676 "All arguments passed to copyWith(...) must be descendant nodes.");
9677
9678 static_assert(
9679 AllArgsDecayedAreUnique<Args...>::value,
9680 "Found duplicate types among the arguments passed to copyWith(...). "
9681 "Types should be listed at most once.");
9682
9683 auto copy{ *this };
9684 copy.set(std::forward<Args>(args)...);
9685 return copy;
9686 }
9687
9689 const Gaussian &gaussian() const
9690 {
9691 return m_gaussian;
9692 }
9693
9696 {
9697 return m_gaussian;
9698 }
9699
9701 Smoothing &set(const Gaussian &value)
9702 {
9703 m_gaussian = value;
9704 return *this;
9705 }
9706
9709 {
9710 m_gaussian.set(value);
9711 return *this;
9712 }
9713
9716 {
9717 m_gaussian.set(value);
9718 return *this;
9719 }
9720
9721 template<
9722 typename T,
9723 typename std::enable_if<
9724 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9725 int>::type = 0>
9727 {
9728 return m_gaussian;
9729 }
9730
9731 template<
9732 typename T,
9733 typename std::enable_if<
9734 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9735 int>::type = 0>
9737 {
9739 }
9740
9741 template<
9742 typename T,
9743 typename std::enable_if<
9744 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9745 int>::type = 0>
9747 {
9749 }
9750
9751 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9753 {
9754 return m_gaussian;
9755 }
9756
9758 template<typename F>
9759 void forEach(const F &f) const
9760 {
9761 f(m_gaussian);
9762 }
9763
9765 template<typename F>
9766 void forEach(const F &f)
9767 {
9768 f(m_gaussian);
9769 }
9770
9772 bool operator==(const Smoothing &other) const;
9773
9775 bool operator!=(const Smoothing &other) const;
9776
9778 std::string toString() const;
9779
9781 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
9782 {
9783 return stream << value.toString();
9784 }
9785
9786 private:
9787 void setFromString(const std::string &value);
9788
9789 void setFromString(const std::string &fullPath, const std::string &value);
9790
9791 std::string getString(const std::string &fullPath) const;
9792
9793 Gaussian m_gaussian;
9794
9795 friend struct DataModel::Detail::Befriend<Smoothing>;
9796 };
9797
9798 using Descendants = std::tuple<
9837
9840
9889#ifndef NO_DOC
9890 template<
9891 typename... Args,
9892 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9893 typename std::enable_if<
9894 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
9895 value,
9896 int>::type = 0>
9897#else
9898 template<typename... Args>
9899#endif
9900 explicit Filters(Args &&...args)
9901 {
9902 using namespace Zivid::Detail::TypeTraits;
9903
9904 static_assert(
9905 AllArgsDecayedAreUnique<Args...>::value,
9906 "Found duplicate types among the arguments passed to Filters(...). "
9907 "Types should be listed at most once.");
9908
9909 set(std::forward<Args>(args)...);
9910 }
9911
9959#ifndef NO_DOC
9960 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9961#else
9962 template<typename... Args>
9963#endif
9964 void set(Args &&...args)
9965 {
9966 using namespace Zivid::Detail::TypeTraits;
9967
9968 using AllArgsAreDescendantNodes =
9969 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9970 static_assert(
9971 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
9972
9973 static_assert(
9974 AllArgsDecayedAreUnique<Args...>::value,
9975 "Found duplicate types among the arguments passed to set(...). "
9976 "Types should be listed at most once.");
9977
9978 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9979 }
9980
10029#ifndef NO_DOC
10030 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10031#else
10032 template<typename... Args>
10033#endif
10034 Filters copyWith(Args &&...args) const
10035 {
10036 using namespace Zivid::Detail::TypeTraits;
10037
10038 using AllArgsAreDescendantNodes =
10039 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10040 static_assert(
10041 AllArgsAreDescendantNodes::value,
10042 "All arguments passed to copyWith(...) must be descendant nodes.");
10043
10044 static_assert(
10045 AllArgsDecayedAreUnique<Args...>::value,
10046 "Found duplicate types among the arguments passed to copyWith(...). "
10047 "Types should be listed at most once.");
10048
10049 auto copy{ *this };
10050 copy.set(std::forward<Args>(args)...);
10051 return copy;
10052 }
10053
10055 const Cluster &cluster() const
10056 {
10057 return m_cluster;
10058 }
10059
10062 {
10063 return m_cluster;
10064 }
10065
10067 Filters &set(const Cluster &value)
10068 {
10069 m_cluster = value;
10070 return *this;
10071 }
10072
10075 {
10076 m_cluster.set(value);
10077 return *this;
10078 }
10079
10082 {
10083 m_cluster.set(value);
10084 return *this;
10085 }
10086
10089 {
10090 m_cluster.set(value);
10091 return *this;
10092 }
10093
10096 {
10097 m_cluster.set(value);
10098 return *this;
10099 }
10100
10103 {
10104 return m_experimental;
10105 }
10106
10109 {
10110 return m_experimental;
10111 }
10112
10114 Filters &set(const Experimental &value)
10115 {
10116 m_experimental = value;
10117 return *this;
10118 }
10119
10122 {
10123 m_experimental.set(value);
10124 return *this;
10125 }
10126
10129 {
10130 m_experimental.set(value);
10131 return *this;
10132 }
10133
10136 {
10137 m_experimental.set(value);
10138 return *this;
10139 }
10140
10143 {
10144 m_experimental.set(value);
10145 return *this;
10146 }
10147
10150 {
10151 m_experimental.set(value);
10152 return *this;
10153 }
10154
10157 {
10158 m_experimental.set(value);
10159 return *this;
10160 }
10161
10164 {
10165 m_experimental.set(value);
10166 return *this;
10167 }
10168
10170 const Hole &hole() const
10171 {
10172 return m_hole;
10173 }
10174
10177 {
10178 return m_hole;
10179 }
10180
10182 Filters &set(const Hole &value)
10183 {
10184 m_hole = value;
10185 return *this;
10186 }
10187
10189 Filters &set(const Hole::Repair &value)
10190 {
10191 m_hole.set(value);
10192 return *this;
10193 }
10194
10197 {
10198 m_hole.set(value);
10199 return *this;
10200 }
10201
10204 {
10205 m_hole.set(value);
10206 return *this;
10207 }
10208
10211 {
10212 m_hole.set(value);
10213 return *this;
10214 }
10215
10217 const Noise &noise() const
10218 {
10219 return m_noise;
10220 }
10221
10224 {
10225 return m_noise;
10226 }
10227
10229 Filters &set(const Noise &value)
10230 {
10231 m_noise = value;
10232 return *this;
10233 }
10234
10237 {
10238 m_noise.set(value);
10239 return *this;
10240 }
10241
10244 {
10245 m_noise.set(value);
10246 return *this;
10247 }
10248
10251 {
10252 m_noise.set(value);
10253 return *this;
10254 }
10255
10258 {
10259 m_noise.set(value);
10260 return *this;
10261 }
10262
10265 {
10266 m_noise.set(value);
10267 return *this;
10268 }
10269
10272 {
10273 m_noise.set(value);
10274 return *this;
10275 }
10276
10279 {
10280 m_noise.set(value);
10281 return *this;
10282 }
10283
10285 const Outlier &outlier() const
10286 {
10287 return m_outlier;
10288 }
10289
10292 {
10293 return m_outlier;
10294 }
10295
10297 Filters &set(const Outlier &value)
10298 {
10299 m_outlier = value;
10300 return *this;
10301 }
10302
10305 {
10306 m_outlier.set(value);
10307 return *this;
10308 }
10309
10312 {
10313 m_outlier.set(value);
10314 return *this;
10315 }
10316
10319 {
10320 m_outlier.set(value);
10321 return *this;
10322 }
10323
10325 const Reflection &reflection() const
10326 {
10327 return m_reflection;
10328 }
10329
10332 {
10333 return m_reflection;
10334 }
10335
10337 Filters &set(const Reflection &value)
10338 {
10339 m_reflection = value;
10340 return *this;
10341 }
10342
10345 {
10346 m_reflection.set(value);
10347 return *this;
10348 }
10349
10352 {
10353 m_reflection.set(value);
10354 return *this;
10355 }
10356
10359 {
10360 m_reflection.set(value);
10361 return *this;
10362 }
10363
10365 const Smoothing &smoothing() const
10366 {
10367 return m_smoothing;
10368 }
10369
10372 {
10373 return m_smoothing;
10374 }
10375
10377 Filters &set(const Smoothing &value)
10378 {
10379 m_smoothing = value;
10380 return *this;
10381 }
10382
10385 {
10386 m_smoothing.set(value);
10387 return *this;
10388 }
10389
10392 {
10393 m_smoothing.set(value);
10394 return *this;
10395 }
10396
10399 {
10400 m_smoothing.set(value);
10401 return *this;
10402 }
10403
10404 template<
10405 typename T,
10406 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10407 0>
10409 {
10410 return m_cluster;
10411 }
10412
10413 template<
10414 typename T,
10415 typename std::enable_if<
10416 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
10417 int>::type = 0>
10419 {
10421 }
10422
10423 template<
10424 typename T,
10425 typename std::enable_if<
10426 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
10427 int>::type = 0>
10429 {
10431 }
10432
10433 template<
10434 typename T,
10435 typename std::enable_if<
10436 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
10437 int>::type = 0>
10439 {
10441 }
10442
10443 template<
10444 typename T,
10445 typename std::enable_if<
10446 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10447 int>::type = 0>
10449 {
10451 }
10452
10453 template<
10454 typename T,
10455 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10456 type = 0>
10458 {
10459 return m_experimental;
10460 }
10461
10462 template<
10463 typename T,
10464 typename std::enable_if<
10465 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10466 int>::type = 0>
10468 {
10470 }
10471
10472 template<
10473 typename T,
10474 typename std::enable_if<
10475 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10476 value,
10477 int>::type = 0>
10479 {
10480 return m_experimental
10482 }
10483
10484 template<
10485 typename T,
10486 typename std::enable_if<
10487 std::is_same<
10488 T,
10490 value,
10491 int>::type = 0>
10493 {
10494 return m_experimental
10496 }
10497
10498 template<
10499 typename T,
10500 typename std::enable_if<
10501 std::is_same<
10502 T,
10504 value,
10505 int>::type = 0>
10507 {
10508 return m_experimental
10510 }
10511
10512 template<
10513 typename T,
10514 typename std::enable_if<
10515 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10516 value,
10517 int>::type = 0>
10519 {
10520 return m_experimental
10522 }
10523
10524 template<
10525 typename T,
10526 typename std::enable_if<
10527 std::is_same<
10528 T,
10530 int>::type = 0>
10532 {
10533 return m_experimental
10535 }
10536
10537 template<
10538 typename T,
10539 typename std::enable_if<
10540 std::is_same<
10541 T,
10543 int>::type = 0>
10545 {
10546 return m_experimental
10548 }
10549
10550 template<
10551 typename T,
10552 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
10554 {
10555 return m_hole;
10556 }
10557
10558 template<
10559 typename T,
10560 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
10561 type = 0>
10563 {
10565 }
10566
10567 template<
10568 typename T,
10569 typename std::enable_if<
10570 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
10571 int>::type = 0>
10573 {
10575 }
10576
10577 template<
10578 typename T,
10579 typename std::enable_if<
10580 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
10581 int>::type = 0>
10583 {
10585 }
10586
10587 template<
10588 typename T,
10589 typename std::enable_if<
10590 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
10591 int>::type = 0>
10593 {
10595 }
10596
10597 template<
10598 typename T,
10599 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10600 0>
10602 {
10603 return m_noise;
10604 }
10605
10606 template<
10607 typename T,
10608 typename std::
10609 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
10611 {
10613 }
10614
10615 template<
10616 typename T,
10617 typename std::enable_if<
10618 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10619 int>::type = 0>
10621 {
10623 }
10624
10625 template<
10626 typename T,
10627 typename std::enable_if<
10628 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10629 int>::type = 0>
10631 {
10633 }
10634
10635 template<
10636 typename T,
10637 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10638 type = 0>
10640 {
10642 }
10643
10644 template<
10645 typename T,
10646 typename std::enable_if<
10647 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
10648 int>::type = 0>
10650 {
10652 }
10653
10654 template<
10655 typename T,
10656 typename std::enable_if<
10657 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
10658 int>::type = 0>
10660 {
10662 }
10663
10664 template<
10665 typename T,
10666 typename std::enable_if<
10667 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10668 int>::type = 0>
10670 {
10672 }
10673
10674 template<
10675 typename T,
10676 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10677 0>
10679 {
10680 return m_outlier;
10681 }
10682
10683 template<
10684 typename T,
10685 typename std::enable_if<
10686 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
10687 int>::type = 0>
10689 {
10691 }
10692
10693 template<
10694 typename T,
10695 typename std::enable_if<
10696 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10697 int>::type = 0>
10699 {
10701 }
10702
10703 template<
10704 typename T,
10705 typename std::enable_if<
10706 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10707 int>::type = 0>
10709 {
10711 }
10712
10713 template<
10714 typename T,
10715 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10716 type = 0>
10718 {
10719 return m_reflection;
10720 }
10721
10722 template<
10723 typename T,
10724 typename std::enable_if<
10725 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
10726 int>::type = 0>
10728 {
10730 }
10731
10732 template<
10733 typename T,
10734 typename std::enable_if<
10735 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
10736 int>::type = 0>
10738 {
10740 }
10741
10742 template<
10743 typename T,
10744 typename std::enable_if<
10745 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
10746 int>::type = 0>
10748 {
10750 }
10751
10752 template<
10753 typename T,
10754 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
10755 type = 0>
10757 {
10758 return m_smoothing;
10759 }
10760
10761 template<
10762 typename T,
10763 typename std::enable_if<
10764 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
10765 int>::type = 0>
10767 {
10769 }
10770
10771 template<
10772 typename T,
10773 typename std::enable_if<
10774 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10775 int>::type = 0>
10777 {
10779 }
10780
10781 template<
10782 typename T,
10783 typename std::enable_if<
10784 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10785 int>::type = 0>
10787 {
10789 }
10790
10791 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
10793 {
10794 return m_cluster;
10795 }
10796
10797 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
10799 {
10800 return m_experimental;
10801 }
10802
10803 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
10805 {
10806 return m_hole;
10807 }
10808
10809 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
10811 {
10812 return m_noise;
10813 }
10814
10815 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
10817 {
10818 return m_outlier;
10819 }
10820
10821 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
10823 {
10824 return m_reflection;
10825 }
10826
10827 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
10829 {
10830 return m_smoothing;
10831 }
10832
10834 template<typename F>
10835 void forEach(const F &f) const
10836 {
10837 f(m_cluster);
10838 f(m_experimental);
10839 f(m_hole);
10840 f(m_noise);
10841 f(m_outlier);
10842 f(m_reflection);
10843 f(m_smoothing);
10844 }
10845
10847 template<typename F>
10848 void forEach(const F &f)
10849 {
10850 f(m_cluster);
10851 f(m_experimental);
10852 f(m_hole);
10853 f(m_noise);
10854 f(m_outlier);
10855 f(m_reflection);
10856 f(m_smoothing);
10857 }
10858
10860 bool operator==(const Filters &other) const;
10861
10863 bool operator!=(const Filters &other) const;
10864
10866 std::string toString() const;
10867
10869 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
10870 {
10871 return stream << value.toString();
10872 }
10873
10874 private:
10875 void setFromString(const std::string &value);
10876
10877 void setFromString(const std::string &fullPath, const std::string &value);
10878
10879 std::string getString(const std::string &fullPath) const;
10880
10881 Cluster m_cluster;
10882 Experimental m_experimental;
10883 Hole m_hole;
10884 Noise m_noise;
10885 Outlier m_outlier;
10886 Reflection m_reflection;
10887 Smoothing m_smoothing;
10888
10889 friend struct DataModel::Detail::Befriend<Filters>;
10890 };
10891
10894
10895 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
10897 {
10898 public:
10900 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
10901
10903 static constexpr const char *path{ "Processing/Resampling" };
10904
10906 static constexpr const char *name{ "Resampling" };
10907
10909 static constexpr const char *description{
10910 R"description(Settings for changing the output resolution of the point cloud.
10911)description"
10912 };
10913
10937
10938 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
10940 {
10941 public:
10943 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
10944
10946 static constexpr const char *path{ "Processing/Resampling/Mode" };
10947
10949 static constexpr const char *name{ "Mode" };
10950
10952 static constexpr const char *description{
10953 R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
10954is performed after all other processing has been completed.
10955
10956Downsampling is used to reduce the number of points in the point cloud. This is done by
10957combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
10958a new point cloud. This downsample functionality is identical to the downsample method
10959on the PointCloud class. The averaging process reduces noise in the point cloud, but it
10960will not improve capture speed. To improve capture speed, consider using the subsampling
10961modes found in Settings/Sampling/Pixel.
10962
10963Upsampling is used to increase the number of points in the point cloud. It is not possible
10964to upsample beyond the full resolution of the camera, so upsampling may only be used in
10965combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
10966combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
10967resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
10968blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
10969groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
10970new points based on an interpolation of the surrounding original points. The points in the
10971new point cloud that correspond to points in the original point cloud are left unchanged.
10972Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
10973pixels in the point cloud compared to no upsampling, so users should be aware of increased
10974computational cost related to copying and analyzing this data.
10975)description"
10976 };
10977
10979 enum class ValueType
10980 {
10981 disabled,
10982 downsample2x2,
10983 downsample4x4,
10984 upsample2x2,
10985 upsample4x4
10986 };
10987 static const Mode disabled;
10988 static const Mode downsample2x2;
10989 static const Mode downsample4x4;
10990 static const Mode upsample2x2;
10991 static const Mode upsample4x4;
10992
10994 static std::set<ValueType> validValues()
10995 {
10996 return { ValueType::disabled,
10997 ValueType::downsample2x2,
10998 ValueType::downsample4x4,
10999 ValueType::upsample2x2,
11000 ValueType::upsample4x4 };
11001 }
11002
11004 Mode() = default;
11005
11007 explicit constexpr Mode(ValueType value)
11008 : m_opt{ verifyValue(value) }
11009 {}
11010
11016
11018 bool hasValue() const;
11019
11021 void reset();
11022
11024 std::string toString() const;
11025
11027 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
11028 {
11029 return stream << Mode{ value }.toString();
11030 }
11031
11033 bool operator==(const Mode &other) const
11034 {
11035 return m_opt == other.m_opt;
11036 }
11037
11039 bool operator!=(const Mode &other) const
11040 {
11041 return m_opt != other.m_opt;
11042 }
11043
11045 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
11046 {
11047 return stream << value.toString();
11048 }
11049
11050 private:
11051 void setFromString(const std::string &value);
11052
11053 constexpr ValueType static verifyValue(const ValueType &value)
11054 {
11055 return value == ValueType::disabled || value == ValueType::downsample2x2
11056 || value == ValueType::downsample4x4 || value == ValueType::upsample2x2
11057 || value == ValueType::upsample4x4
11058 ? value
11059 : throw std::invalid_argument{
11060 "Invalid value: Mode{ "
11061 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
11062 + " }"
11063 };
11064 }
11065
11066 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
11067
11068 friend struct DataModel::Detail::Befriend<Mode>;
11069 };
11070
11071 using Descendants = std::tuple<Settings::Processing::Resampling::Mode>;
11072
11075
11087#ifndef NO_DOC
11088 template<
11089 typename... Args,
11090 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11091 typename std::enable_if<
11092 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11093 value,
11094 int>::type = 0>
11095#else
11096 template<typename... Args>
11097#endif
11098 explicit Resampling(Args &&...args)
11099 {
11100 using namespace Zivid::Detail::TypeTraits;
11101
11102 static_assert(
11103 AllArgsDecayedAreUnique<Args...>::value,
11104 "Found duplicate types among the arguments passed to Resampling(...). "
11105 "Types should be listed at most once.");
11106
11107 set(std::forward<Args>(args)...);
11108 }
11109
11120#ifndef NO_DOC
11121 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11122#else
11123 template<typename... Args>
11124#endif
11125 void set(Args &&...args)
11126 {
11127 using namespace Zivid::Detail::TypeTraits;
11128
11129 using AllArgsAreDescendantNodes =
11130 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11131 static_assert(
11132 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11133
11134 static_assert(
11135 AllArgsDecayedAreUnique<Args...>::value,
11136 "Found duplicate types among the arguments passed to set(...). "
11137 "Types should be listed at most once.");
11138
11139 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11140 }
11141
11153#ifndef NO_DOC
11154 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11155#else
11156 template<typename... Args>
11157#endif
11158 Resampling copyWith(Args &&...args) const
11159 {
11160 using namespace Zivid::Detail::TypeTraits;
11161
11162 using AllArgsAreDescendantNodes =
11163 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11164 static_assert(
11165 AllArgsAreDescendantNodes::value,
11166 "All arguments passed to copyWith(...) must be descendant nodes.");
11167
11168 static_assert(
11169 AllArgsDecayedAreUnique<Args...>::value,
11170 "Found duplicate types among the arguments passed to copyWith(...). "
11171 "Types should be listed at most once.");
11172
11173 auto copy{ *this };
11174 copy.set(std::forward<Args>(args)...);
11175 return copy;
11176 }
11177
11179 const Mode &mode() const
11180 {
11181 return m_mode;
11182 }
11183
11186 {
11187 return m_mode;
11188 }
11189
11191 Resampling &set(const Mode &value)
11192 {
11193 m_mode = value;
11194 return *this;
11195 }
11196
11197 template<
11198 typename T,
11199 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type =
11200 0>
11202 {
11203 return m_mode;
11204 }
11205
11206 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11208 {
11209 return m_mode;
11210 }
11211
11213 template<typename F>
11214 void forEach(const F &f) const
11215 {
11216 f(m_mode);
11217 }
11218
11220 template<typename F>
11221 void forEach(const F &f)
11222 {
11223 f(m_mode);
11224 }
11225
11227 bool operator==(const Resampling &other) const;
11228
11230 bool operator!=(const Resampling &other) const;
11231
11233 std::string toString() const;
11234
11236 friend std::ostream &operator<<(std::ostream &stream, const Resampling &value)
11237 {
11238 return stream << value.toString();
11239 }
11240
11241 private:
11242 void setFromString(const std::string &value);
11243
11244 void setFromString(const std::string &fullPath, const std::string &value);
11245
11246 std::string getString(const std::string &fullPath) const;
11247
11248 Mode m_mode;
11249
11250 friend struct DataModel::Detail::Befriend<Resampling>;
11251 };
11252
11253 using Descendants = std::tuple<
11303
11306
11366#ifndef NO_DOC
11367 template<
11368 typename... Args,
11369 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11370 typename std::enable_if<
11371 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11372 value,
11373 int>::type = 0>
11374#else
11375 template<typename... Args>
11376#endif
11377 explicit Processing(Args &&...args)
11378 {
11379 using namespace Zivid::Detail::TypeTraits;
11380
11381 static_assert(
11382 AllArgsDecayedAreUnique<Args...>::value,
11383 "Found duplicate types among the arguments passed to Processing(...). "
11384 "Types should be listed at most once.");
11385
11386 set(std::forward<Args>(args)...);
11387 }
11388
11447#ifndef NO_DOC
11448 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11449#else
11450 template<typename... Args>
11451#endif
11452 void set(Args &&...args)
11453 {
11454 using namespace Zivid::Detail::TypeTraits;
11455
11456 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11457 static_assert(
11458 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11459
11460 static_assert(
11461 AllArgsDecayedAreUnique<Args...>::value,
11462 "Found duplicate types among the arguments passed to set(...). "
11463 "Types should be listed at most once.");
11464
11465 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11466 }
11467
11527#ifndef NO_DOC
11528 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11529#else
11530 template<typename... Args>
11531#endif
11532 Processing copyWith(Args &&...args) const
11533 {
11534 using namespace Zivid::Detail::TypeTraits;
11535
11536 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11537 static_assert(
11538 AllArgsAreDescendantNodes::value,
11539 "All arguments passed to copyWith(...) must be descendant nodes.");
11540
11541 static_assert(
11542 AllArgsDecayedAreUnique<Args...>::value,
11543 "Found duplicate types among the arguments passed to copyWith(...). "
11544 "Types should be listed at most once.");
11545
11546 auto copy{ *this };
11547 copy.set(std::forward<Args>(args)...);
11548 return copy;
11549 }
11550
11552 const Color &color() const
11553 {
11554 return m_color;
11555 }
11556
11559 {
11560 return m_color;
11561 }
11562
11564 Processing &set(const Color &value)
11565 {
11566 m_color = value;
11567 return *this;
11568 }
11569
11572 {
11573 m_color.set(value);
11574 return *this;
11575 }
11576
11579 {
11580 m_color.set(value);
11581 return *this;
11582 }
11583
11586 {
11587 m_color.set(value);
11588 return *this;
11589 }
11590
11593 {
11594 m_color.set(value);
11595 return *this;
11596 }
11597
11600 {
11601 m_color.set(value);
11602 return *this;
11603 }
11604
11607 {
11608 m_color.set(value);
11609 return *this;
11610 }
11611
11614 {
11615 m_color.set(value);
11616 return *this;
11617 }
11618
11620 const Filters &filters() const
11621 {
11622 return m_filters;
11623 }
11624
11627 {
11628 return m_filters;
11629 }
11630
11632 Processing &set(const Filters &value)
11633 {
11634 m_filters = value;
11635 return *this;
11636 }
11637
11640 {
11641 m_filters.set(value);
11642 return *this;
11643 }
11644
11647 {
11648 m_filters.set(value);
11649 return *this;
11650 }
11651
11654 {
11655 m_filters.set(value);
11656 return *this;
11657 }
11658
11661 {
11662 m_filters.set(value);
11663 return *this;
11664 }
11665
11668 {
11669 m_filters.set(value);
11670 return *this;
11671 }
11672
11675 {
11676 m_filters.set(value);
11677 return *this;
11678 }
11679
11682 {
11683 m_filters.set(value);
11684 return *this;
11685 }
11686
11689 {
11690 m_filters.set(value);
11691 return *this;
11692 }
11693
11696 {
11697 m_filters.set(value);
11698 return *this;
11699 }
11700
11703 {
11704 m_filters.set(value);
11705 return *this;
11706 }
11707
11710 {
11711 m_filters.set(value);
11712 return *this;
11713 }
11714
11717 {
11718 m_filters.set(value);
11719 return *this;
11720 }
11721
11724 {
11725 m_filters.set(value);
11726 return *this;
11727 }
11728
11731 {
11732 m_filters.set(value);
11733 return *this;
11734 }
11735
11738 {
11739 m_filters.set(value);
11740 return *this;
11741 }
11742
11745 {
11746 m_filters.set(value);
11747 return *this;
11748 }
11749
11752 {
11753 m_filters.set(value);
11754 return *this;
11755 }
11756
11759 {
11760 m_filters.set(value);
11761 return *this;
11762 }
11763
11766 {
11767 m_filters.set(value);
11768 return *this;
11769 }
11770
11773 {
11774 m_filters.set(value);
11775 return *this;
11776 }
11777
11780 {
11781 m_filters.set(value);
11782 return *this;
11783 }
11784
11787 {
11788 m_filters.set(value);
11789 return *this;
11790 }
11791
11794 {
11795 m_filters.set(value);
11796 return *this;
11797 }
11798
11801 {
11802 m_filters.set(value);
11803 return *this;
11804 }
11805
11808 {
11809 m_filters.set(value);
11810 return *this;
11811 }
11812
11815 {
11816 m_filters.set(value);
11817 return *this;
11818 }
11819
11822 {
11823 m_filters.set(value);
11824 return *this;
11825 }
11826
11829 {
11830 m_filters.set(value);
11831 return *this;
11832 }
11833
11836 {
11837 m_filters.set(value);
11838 return *this;
11839 }
11840
11843 {
11844 m_filters.set(value);
11845 return *this;
11846 }
11847
11850 {
11851 m_filters.set(value);
11852 return *this;
11853 }
11854
11857 {
11858 m_filters.set(value);
11859 return *this;
11860 }
11861
11864 {
11865 m_filters.set(value);
11866 return *this;
11867 }
11868
11871 {
11872 m_filters.set(value);
11873 return *this;
11874 }
11875
11878 {
11879 m_filters.set(value);
11880 return *this;
11881 }
11882
11885 {
11886 m_filters.set(value);
11887 return *this;
11888 }
11889
11892 {
11893 m_filters.set(value);
11894 return *this;
11895 }
11896
11899 {
11900 m_filters.set(value);
11901 return *this;
11902 }
11903
11905 const Resampling &resampling() const
11906 {
11907 return m_resampling;
11908 }
11909
11912 {
11913 return m_resampling;
11914 }
11915
11918 {
11919 m_resampling = value;
11920 return *this;
11921 }
11922
11925 {
11926 m_resampling.set(value);
11927 return *this;
11928 }
11929
11930 template<
11931 typename T,
11932 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
11934 {
11935 return m_color;
11936 }
11937
11938 template<
11939 typename T,
11940 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
11942 {
11943 return m_color.get<Settings::Processing::Color::Balance>();
11944 }
11945
11946 template<
11947 typename T,
11948 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
11949 0>
11951 {
11952 return m_color.get<Settings::Processing::Color::Balance::Blue>();
11953 }
11954
11955 template<
11956 typename T,
11957 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
11958 type = 0>
11960 {
11961 return m_color.get<Settings::Processing::Color::Balance::Green>();
11962 }
11963
11964 template<
11965 typename T,
11966 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
11967 0>
11969 {
11970 return m_color.get<Settings::Processing::Color::Balance::Red>();
11971 }
11972
11973 template<
11974 typename T,
11975 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
11976 0>
11978 {
11980 }
11981
11982 template<
11983 typename T,
11984 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
11985 type = 0>
11987 {
11989 }
11990
11991 template<
11992 typename T,
11993 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
11995 {
11996 return m_color.get<Settings::Processing::Color::Gamma>();
11997 }
11998
11999 template<
12000 typename T,
12001 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
12003 {
12004 return m_filters;
12005 }
12006
12007 template<
12008 typename T,
12009 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
12011 {
12012 return m_filters.get<Settings::Processing::Filters::Cluster>();
12013 }
12014
12015 template<
12016 typename T,
12017 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
12018 type = 0>
12020 {
12022 }
12023
12024 template<
12025 typename T,
12026 typename std::enable_if<
12027 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
12028 int>::type = 0>
12030 {
12032 }
12033
12034 template<
12035 typename T,
12036 typename std::enable_if<
12037 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
12038 int>::type = 0>
12040 {
12042 }
12043
12044 template<
12045 typename T,
12046 typename std::enable_if<
12047 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
12048 int>::type = 0>
12050 {
12052 }
12053
12054 template<
12055 typename T,
12056 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
12057 type = 0>
12059 {
12061 }
12062
12063 template<
12064 typename T,
12065 typename std::enable_if<
12066 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
12067 int>::type = 0>
12069 {
12071 }
12072
12073 template<
12074 typename T,
12075 typename std::enable_if<
12076 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
12077 int>::type = 0>
12079 {
12081 }
12082
12083 template<
12084 typename T,
12085 typename std::enable_if<
12086 std::is_same<
12087 T,
12089 int>::type = 0>
12091 {
12092 return m_filters
12094 }
12095
12096 template<
12097 typename T,
12098 typename std::enable_if<
12099 std::is_same<
12100 T,
12102 int>::type = 0>
12104 {
12105 return m_filters
12107 }
12108
12109 template<
12110 typename T,
12111 typename std::enable_if<
12112 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
12113 int>::type = 0>
12115 {
12117 }
12118
12119 template<
12120 typename T,
12121 typename std::enable_if<
12122 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12123 value,
12124 int>::type = 0>
12126 {
12127 return m_filters
12129 }
12130
12131 template<
12132 typename T,
12133 typename std::enable_if<
12134 std::is_same<
12135 T,
12137 int>::type = 0>
12139 {
12140 return m_filters
12142 }
12143
12144 template<
12145 typename T,
12146 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
12148 {
12149 return m_filters.get<Settings::Processing::Filters::Hole>();
12150 }
12151
12152 template<
12153 typename T,
12154 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
12155 type = 0>
12157 {
12159 }
12160
12161 template<
12162 typename T,
12163 typename std::enable_if<
12164 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
12165 int>::type = 0>
12167 {
12169 }
12170
12171 template<
12172 typename T,
12173 typename std::enable_if<
12174 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
12175 int>::type = 0>
12177 {
12179 }
12180
12181 template<
12182 typename T,
12183 typename std::enable_if<
12184 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
12185 int>::type = 0>
12187 {
12189 }
12190
12191 template<
12192 typename T,
12193 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12195 {
12196 return m_filters.get<Settings::Processing::Filters::Noise>();
12197 }
12198
12199 template<
12200 typename T,
12201 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12202 type = 0>
12204 {
12206 }
12207
12208 template<
12209 typename T,
12210 typename std::enable_if<
12211 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
12212 int>::type = 0>
12214 {
12216 }
12217
12218 template<
12219 typename T,
12220 typename std::enable_if<
12221 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12222 int>::type = 0>
12224 {
12226 }
12227
12228 template<
12229 typename T,
12230 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12231 type = 0>
12233 {
12235 }
12236
12237 template<
12238 typename T,
12239 typename std::enable_if<
12240 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12241 int>::type = 0>
12243 {
12245 }
12246
12247 template<
12248 typename T,
12249 typename std::
12250 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12252 {
12254 }
12255
12256 template<
12257 typename T,
12258 typename std::enable_if<
12259 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12260 int>::type = 0>
12262 {
12264 }
12265
12266 template<
12267 typename T,
12268 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12270 {
12271 return m_filters.get<Settings::Processing::Filters::Outlier>();
12272 }
12273
12274 template<
12275 typename T,
12276 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12277 type = 0>
12279 {
12281 }
12282
12283 template<
12284 typename T,
12285 typename std::enable_if<
12286 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
12287 int>::type = 0>
12289 {
12291 }
12292
12293 template<
12294 typename T,
12295 typename std::enable_if<
12296 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12297 int>::type = 0>
12299 {
12301 }
12302
12303 template<
12304 typename T,
12305 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12306 0>
12308 {
12310 }
12311
12312 template<
12313 typename T,
12314 typename std::enable_if<
12315 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
12316 int>::type = 0>
12318 {
12320 }
12321
12322 template<
12323 typename T,
12324 typename std::enable_if<
12325 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
12326 int>::type = 0>
12328 {
12330 }
12331
12332 template<
12333 typename T,
12334 typename std::enable_if<
12335 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
12336 int>::type = 0>
12338 {
12340 }
12341
12342 template<
12343 typename T,
12344 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12345 0>
12347 {
12349 }
12350
12351 template<
12352 typename T,
12353 typename std::enable_if<
12354 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
12355 int>::type = 0>
12357 {
12359 }
12360
12361 template<
12362 typename T,
12363 typename std::enable_if<
12364 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
12365 int>::type = 0>
12367 {
12369 }
12370
12371 template<
12372 typename T,
12373 typename std::enable_if<
12374 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12375 int>::type = 0>
12377 {
12379 }
12380
12381 template<
12382 typename T,
12383 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
12385 {
12386 return m_resampling;
12387 }
12388
12389 template<
12390 typename T,
12391 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
12393 {
12394 return m_resampling.get<Settings::Processing::Resampling::Mode>();
12395 }
12396
12397 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12399 {
12400 return m_color;
12401 }
12402
12403 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12405 {
12406 return m_filters;
12407 }
12408
12409 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
12411 {
12412 return m_resampling;
12413 }
12414
12416 template<typename F>
12417 void forEach(const F &f) const
12418 {
12419 f(m_color);
12420 f(m_filters);
12421 f(m_resampling);
12422 }
12423
12425 template<typename F>
12426 void forEach(const F &f)
12427 {
12428 f(m_color);
12429 f(m_filters);
12430 f(m_resampling);
12431 }
12432
12434 bool operator==(const Processing &other) const;
12435
12437 bool operator!=(const Processing &other) const;
12438
12440 std::string toString() const;
12441
12443 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12444 {
12445 return stream << value.toString();
12446 }
12447
12448 private:
12449 void setFromString(const std::string &value);
12450
12451 void setFromString(const std::string &fullPath, const std::string &value);
12452
12453 std::string getString(const std::string &fullPath) const;
12454
12455 Color m_color;
12456 Filters m_filters;
12457 Resampling m_resampling;
12458
12459 friend struct DataModel::Detail::Befriend<Processing>;
12460 };
12461
12464
12465 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12467 {
12468 public:
12470 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12471
12473 static constexpr const char *path{ "RegionOfInterest" };
12474
12476 static constexpr const char *name{ "RegionOfInterest" };
12477
12479 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12480)description" };
12481
12498
12499 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12501 {
12502 public:
12504 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12505
12507 static constexpr const char *path{ "RegionOfInterest/Box" };
12508
12510 static constexpr const char *name{ "Box" };
12511
12513 static constexpr const char *description{
12514 R"description(Removes points outside the given three-dimensional box.
12515
12516Using this feature may significantly speed up acquisition and processing time, because
12517one can avoid acquiring and processing data that is guaranteed to fall outside of the
12518region of interest. The degree of speed-up depends on the size and shape of the box.
12519Generally, a smaller box yields a greater speed-up.
12520
12521The box is defined by three points: O, A and B. These points define two vectors,
12522OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12523This gives 4 points O, A, B and (O + OA + OB), that together form a
12524parallelogram in 3D.
12525
12526Two extents can be provided, to extrude the parallelogram along the surface
12527normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12528The surface normal vector is defined by the cross product OA x OB.
12529)description"
12530 };
12531
12533
12534 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12536 {
12537 public:
12539 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12540
12542 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12543
12545 static constexpr const char *name{ "Enabled" };
12546
12548 static constexpr const char *description{
12549 R"description(Enable or disable box filter.)description"
12550 };
12551
12553 using ValueType = bool;
12554 static const Enabled yes;
12555 static const Enabled no;
12556
12558 static std::set<bool> validValues()
12559 {
12560 return { false, true };
12561 }
12562
12564 Enabled() = default;
12565
12567 explicit constexpr Enabled(bool value)
12568 : m_opt{ value }
12569 {}
12570
12575 bool value() const;
12576
12578 bool hasValue() const;
12579
12581 void reset();
12582
12584 std::string toString() const;
12585
12587 bool operator==(const Enabled &other) const
12588 {
12589 return m_opt == other.m_opt;
12590 }
12591
12593 bool operator!=(const Enabled &other) const
12594 {
12595 return m_opt != other.m_opt;
12596 }
12597
12599 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12600 {
12601 return stream << value.toString();
12602 }
12603
12604 private:
12605 void setFromString(const std::string &value);
12606
12607 Zivid::DataModel::Detail::Optional<bool> m_opt;
12608
12609 friend struct DataModel::Detail::Befriend<Enabled>;
12610 };
12611
12613
12614 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12616 {
12617 public:
12619 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12620
12622 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12623
12625 static constexpr const char *name{ "Extents" };
12626
12628 static constexpr const char *description{
12629 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12630 };
12631
12634
12636 Extents() = default;
12637
12639 explicit constexpr Extents(Zivid::Range<double> value)
12640 : m_opt{ value }
12641 {}
12642
12648
12650 bool hasValue() const;
12651
12653 void reset();
12654
12656 std::string toString() const;
12657
12659 explicit constexpr Extents(double minValue, double maxValue)
12660 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12661 {}
12662
12664 bool operator==(const Extents &other) const
12665 {
12666 return m_opt == other.m_opt;
12667 }
12668
12670 bool operator!=(const Extents &other) const
12671 {
12672 return m_opt != other.m_opt;
12673 }
12674
12676 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12677 {
12678 return stream << value.toString();
12679 }
12680
12681 private:
12682 void setFromString(const std::string &value);
12683
12684 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
12685
12686 friend struct DataModel::Detail::Befriend<Extents>;
12687 };
12688
12690
12691 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12693 {
12694 public:
12696 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12697
12699 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12700
12702 static constexpr const char *name{ "PointA" };
12703
12705 static constexpr const char *description{
12706 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram.)description"
12707 };
12708
12711
12713 PointA() = default;
12714
12716 explicit constexpr PointA(Zivid::PointXYZ value)
12717 : m_opt{ value }
12718 {}
12719
12725
12727 bool hasValue() const;
12728
12730 void reset();
12731
12733 std::string toString() const;
12734
12736 explicit constexpr PointA(float x, float y, float z)
12737 : PointA{ Zivid::PointXYZ{ x, y, z } }
12738 {}
12739
12741 bool operator==(const PointA &other) const
12742 {
12743 return m_opt == other.m_opt;
12744 }
12745
12747 bool operator!=(const PointA &other) const
12748 {
12749 return m_opt != other.m_opt;
12750 }
12751
12753 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12754 {
12755 return stream << value.toString();
12756 }
12757
12758 private:
12759 void setFromString(const std::string &value);
12760
12761 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12762
12763 friend struct DataModel::Detail::Befriend<PointA>;
12764 };
12765
12767
12768 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12770 {
12771 public:
12773 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12774
12776 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12777
12779 static constexpr const char *name{ "PointB" };
12780
12782 static constexpr const char *description{
12783 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram.)description"
12784 };
12785
12788
12790 PointB() = default;
12791
12793 explicit constexpr PointB(Zivid::PointXYZ value)
12794 : m_opt{ value }
12795 {}
12796
12802
12804 bool hasValue() const;
12805
12807 void reset();
12808
12810 std::string toString() const;
12811
12813 explicit constexpr PointB(float x, float y, float z)
12814 : PointB{ Zivid::PointXYZ{ x, y, z } }
12815 {}
12816
12818 bool operator==(const PointB &other) const
12819 {
12820 return m_opt == other.m_opt;
12821 }
12822
12824 bool operator!=(const PointB &other) const
12825 {
12826 return m_opt != other.m_opt;
12827 }
12828
12830 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
12831 {
12832 return stream << value.toString();
12833 }
12834
12835 private:
12836 void setFromString(const std::string &value);
12837
12838 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12839
12840 friend struct DataModel::Detail::Befriend<PointB>;
12841 };
12842
12844
12845 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12847 {
12848 public:
12850 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12851
12853 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
12854
12856 static constexpr const char *name{ "PointO" };
12857
12859 static constexpr const char *description{
12860 R"description(The point at the intersection of two adjacent edges defining a parallelogram.)description"
12861 };
12862
12865
12867 PointO() = default;
12868
12870 explicit constexpr PointO(Zivid::PointXYZ value)
12871 : m_opt{ value }
12872 {}
12873
12879
12881 bool hasValue() const;
12882
12884 void reset();
12885
12887 std::string toString() const;
12888
12890 explicit constexpr PointO(float x, float y, float z)
12891 : PointO{ Zivid::PointXYZ{ x, y, z } }
12892 {}
12893
12895 bool operator==(const PointO &other) const
12896 {
12897 return m_opt == other.m_opt;
12898 }
12899
12901 bool operator!=(const PointO &other) const
12902 {
12903 return m_opt != other.m_opt;
12904 }
12905
12907 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
12908 {
12909 return stream << value.toString();
12910 }
12911
12912 private:
12913 void setFromString(const std::string &value);
12914
12915 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12916
12917 friend struct DataModel::Detail::Befriend<PointO>;
12918 };
12919
12920 using Descendants = std::tuple<
12926
12929
12945#ifndef NO_DOC
12946 template<
12947 typename... Args,
12948 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
12949 typename std::enable_if<
12950 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
12951 value,
12952 int>::type = 0>
12953#else
12954 template<typename... Args>
12955#endif
12956 explicit Box(Args &&...args)
12957 {
12958 using namespace Zivid::Detail::TypeTraits;
12959
12960 static_assert(
12961 AllArgsDecayedAreUnique<Args...>::value,
12962 "Found duplicate types among the arguments passed to Box(...). "
12963 "Types should be listed at most once.");
12964
12965 set(std::forward<Args>(args)...);
12966 }
12967
12982#ifndef NO_DOC
12983 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
12984#else
12985 template<typename... Args>
12986#endif
12987 void set(Args &&...args)
12988 {
12989 using namespace Zivid::Detail::TypeTraits;
12990
12991 using AllArgsAreDescendantNodes =
12992 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
12993 static_assert(
12994 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
12995
12996 static_assert(
12997 AllArgsDecayedAreUnique<Args...>::value,
12998 "Found duplicate types among the arguments passed to set(...). "
12999 "Types should be listed at most once.");
13000
13001 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13002 }
13003
13019#ifndef NO_DOC
13020 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13021#else
13022 template<typename... Args>
13023#endif
13024 Box copyWith(Args &&...args) const
13025 {
13026 using namespace Zivid::Detail::TypeTraits;
13027
13028 using AllArgsAreDescendantNodes =
13029 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13030 static_assert(
13031 AllArgsAreDescendantNodes::value,
13032 "All arguments passed to copyWith(...) must be descendant nodes.");
13033
13034 static_assert(
13035 AllArgsDecayedAreUnique<Args...>::value,
13036 "Found duplicate types among the arguments passed to copyWith(...). "
13037 "Types should be listed at most once.");
13038
13039 auto copy{ *this };
13040 copy.set(std::forward<Args>(args)...);
13041 return copy;
13042 }
13043
13045 const Enabled &isEnabled() const
13046 {
13047 return m_enabled;
13048 }
13049
13052 {
13053 return m_enabled;
13054 }
13055
13057 Box &set(const Enabled &value)
13058 {
13059 m_enabled = value;
13060 return *this;
13061 }
13062
13064 const Extents &extents() const
13065 {
13066 return m_extents;
13067 }
13068
13071 {
13072 return m_extents;
13073 }
13074
13076 Box &set(const Extents &value)
13077 {
13078 m_extents = value;
13079 return *this;
13080 }
13081
13083 const PointA &pointA() const
13084 {
13085 return m_pointA;
13086 }
13087
13090 {
13091 return m_pointA;
13092 }
13093
13095 Box &set(const PointA &value)
13096 {
13097 m_pointA = value;
13098 return *this;
13099 }
13100
13102 const PointB &pointB() const
13103 {
13104 return m_pointB;
13105 }
13106
13109 {
13110 return m_pointB;
13111 }
13112
13114 Box &set(const PointB &value)
13115 {
13116 m_pointB = value;
13117 return *this;
13118 }
13119
13121 const PointO &pointO() const
13122 {
13123 return m_pointO;
13124 }
13125
13128 {
13129 return m_pointO;
13130 }
13131
13133 Box &set(const PointO &value)
13134 {
13135 m_pointO = value;
13136 return *this;
13137 }
13138
13139 template<
13140 typename T,
13141 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
13142 type = 0>
13144 {
13145 return m_enabled;
13146 }
13147
13148 template<
13149 typename T,
13150 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
13151 type = 0>
13153 {
13154 return m_extents;
13155 }
13156
13157 template<
13158 typename T,
13159 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13160 type = 0>
13162 {
13163 return m_pointA;
13164 }
13165
13166 template<
13167 typename T,
13168 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13169 type = 0>
13171 {
13172 return m_pointB;
13173 }
13174
13175 template<
13176 typename T,
13177 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13178 type = 0>
13180 {
13181 return m_pointO;
13182 }
13183
13184 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13186 {
13187 return m_enabled;
13188 }
13189
13190 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13192 {
13193 return m_extents;
13194 }
13195
13196 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13198 {
13199 return m_pointA;
13200 }
13201
13202 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13204 {
13205 return m_pointB;
13206 }
13207
13208 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13210 {
13211 return m_pointO;
13212 }
13213
13215 template<typename F>
13216 void forEach(const F &f) const
13217 {
13218 f(m_enabled);
13219 f(m_extents);
13220 f(m_pointA);
13221 f(m_pointB);
13222 f(m_pointO);
13223 }
13224
13226 template<typename F>
13227 void forEach(const F &f)
13228 {
13229 f(m_enabled);
13230 f(m_extents);
13231 f(m_pointA);
13232 f(m_pointB);
13233 f(m_pointO);
13234 }
13235
13237 bool operator==(const Box &other) const;
13238
13240 bool operator!=(const Box &other) const;
13241
13243 std::string toString() const;
13244
13246 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13247 {
13248 return stream << value.toString();
13249 }
13250
13251 private:
13252 void setFromString(const std::string &value);
13253
13254 void setFromString(const std::string &fullPath, const std::string &value);
13255
13256 std::string getString(const std::string &fullPath) const;
13257
13258 Enabled m_enabled;
13259 Extents m_extents;
13260 PointA m_pointA;
13261 PointB m_pointB;
13262 PointO m_pointO;
13263
13264 friend struct DataModel::Detail::Befriend<Box>;
13265 };
13266
13270
13271 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13273 {
13274 public:
13276 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13277
13279 static constexpr const char *path{ "RegionOfInterest/Depth" };
13280
13282 static constexpr const char *name{ "Depth" };
13283
13285 static constexpr const char *description{
13286 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13287falls above a given maximum or below a given minimum.
13288)description"
13289 };
13290
13292
13293 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13295 {
13296 public:
13298 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13299
13301 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13302
13304 static constexpr const char *name{ "Enabled" };
13305
13307 static constexpr const char *description{
13308 R"description(Enable or disable depth filter.)description"
13309 };
13310
13312 using ValueType = bool;
13313 static const Enabled yes;
13314 static const Enabled no;
13315
13317 static std::set<bool> validValues()
13318 {
13319 return { false, true };
13320 }
13321
13323 Enabled() = default;
13324
13326 explicit constexpr Enabled(bool value)
13327 : m_opt{ value }
13328 {}
13329
13334 bool value() const;
13335
13337 bool hasValue() const;
13338
13340 void reset();
13341
13343 std::string toString() const;
13344
13346 bool operator==(const Enabled &other) const
13347 {
13348 return m_opt == other.m_opt;
13349 }
13350
13352 bool operator!=(const Enabled &other) const
13353 {
13354 return m_opt != other.m_opt;
13355 }
13356
13358 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13359 {
13360 return stream << value.toString();
13361 }
13362
13363 private:
13364 void setFromString(const std::string &value);
13365
13366 Zivid::DataModel::Detail::Optional<bool> m_opt;
13367
13368 friend struct DataModel::Detail::Befriend<Enabled>;
13369 };
13370
13372
13373 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13375 {
13376 public:
13378 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13379
13381 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13382
13384 static constexpr const char *name{ "Range" };
13385
13387 static constexpr const char *description{
13388 R"description(Specify the minimum and maximum Z value that will be included.)description"
13389 };
13390
13393
13395 Range() = default;
13396
13398 explicit constexpr Range(Zivid::Range<double> value)
13399 : m_opt{ value }
13400 {}
13401
13407
13409 bool hasValue() const;
13410
13412 void reset();
13413
13415 std::string toString() const;
13416
13418 explicit constexpr Range(double minValue, double maxValue)
13419 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13420 {}
13421
13423 bool operator==(const Range &other) const
13424 {
13425 return m_opt == other.m_opt;
13426 }
13427
13429 bool operator!=(const Range &other) const
13430 {
13431 return m_opt != other.m_opt;
13432 }
13433
13435 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13436 {
13437 return stream << value.toString();
13438 }
13439
13440 private:
13441 void setFromString(const std::string &value);
13442
13443 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
13444
13445 friend struct DataModel::Detail::Befriend<Range>;
13446 };
13447
13449 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13450
13453
13466#ifndef NO_DOC
13467 template<
13468 typename... Args,
13469 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13470 typename std::enable_if<
13471 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13472 value,
13473 int>::type = 0>
13474#else
13475 template<typename... Args>
13476#endif
13477 explicit Depth(Args &&...args)
13478 {
13479 using namespace Zivid::Detail::TypeTraits;
13480
13481 static_assert(
13482 AllArgsDecayedAreUnique<Args...>::value,
13483 "Found duplicate types among the arguments passed to Depth(...). "
13484 "Types should be listed at most once.");
13485
13486 set(std::forward<Args>(args)...);
13487 }
13488
13500#ifndef NO_DOC
13501 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13502#else
13503 template<typename... Args>
13504#endif
13505 void set(Args &&...args)
13506 {
13507 using namespace Zivid::Detail::TypeTraits;
13508
13509 using AllArgsAreDescendantNodes =
13510 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13511 static_assert(
13512 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13513
13514 static_assert(
13515 AllArgsDecayedAreUnique<Args...>::value,
13516 "Found duplicate types among the arguments passed to set(...). "
13517 "Types should be listed at most once.");
13518
13519 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13520 }
13521
13534#ifndef NO_DOC
13535 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13536#else
13537 template<typename... Args>
13538#endif
13539 Depth copyWith(Args &&...args) const
13540 {
13541 using namespace Zivid::Detail::TypeTraits;
13542
13543 using AllArgsAreDescendantNodes =
13544 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13545 static_assert(
13546 AllArgsAreDescendantNodes::value,
13547 "All arguments passed to copyWith(...) must be descendant nodes.");
13548
13549 static_assert(
13550 AllArgsDecayedAreUnique<Args...>::value,
13551 "Found duplicate types among the arguments passed to copyWith(...). "
13552 "Types should be listed at most once.");
13553
13554 auto copy{ *this };
13555 copy.set(std::forward<Args>(args)...);
13556 return copy;
13557 }
13558
13560 const Enabled &isEnabled() const
13561 {
13562 return m_enabled;
13563 }
13564
13567 {
13568 return m_enabled;
13569 }
13570
13572 Depth &set(const Enabled &value)
13573 {
13574 m_enabled = value;
13575 return *this;
13576 }
13577
13579 const Range &range() const
13580 {
13581 return m_range;
13582 }
13583
13586 {
13587 return m_range;
13588 }
13589
13591 Depth &set(const Range &value)
13592 {
13593 m_range = value;
13594 return *this;
13595 }
13596
13597 template<
13598 typename T,
13599 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13600 type = 0>
13602 {
13603 return m_enabled;
13604 }
13605
13606 template<
13607 typename T,
13608 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13609 type = 0>
13611 {
13612 return m_range;
13613 }
13614
13615 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13617 {
13618 return m_enabled;
13619 }
13620
13621 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13623 {
13624 return m_range;
13625 }
13626
13628 template<typename F>
13629 void forEach(const F &f) const
13630 {
13631 f(m_enabled);
13632 f(m_range);
13633 }
13634
13636 template<typename F>
13637 void forEach(const F &f)
13638 {
13639 f(m_enabled);
13640 f(m_range);
13641 }
13642
13644 bool operator==(const Depth &other) const;
13645
13647 bool operator!=(const Depth &other) const;
13648
13650 std::string toString() const;
13651
13653 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13654 {
13655 return stream << value.toString();
13656 }
13657
13658 private:
13659 void setFromString(const std::string &value);
13660
13661 void setFromString(const std::string &fullPath, const std::string &value);
13662
13663 std::string getString(const std::string &fullPath) const;
13664
13665 Enabled m_enabled;
13666 Range m_range;
13667
13668 friend struct DataModel::Detail::Befriend<Depth>;
13669 };
13670
13671 using Descendants = std::tuple<
13681
13684
13704#ifndef NO_DOC
13705 template<
13706 typename... Args,
13707 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13708 typename std::enable_if<
13709 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13710 value,
13711 int>::type = 0>
13712#else
13713 template<typename... Args>
13714#endif
13715 explicit RegionOfInterest(Args &&...args)
13716 {
13717 using namespace Zivid::Detail::TypeTraits;
13718
13719 static_assert(
13720 AllArgsDecayedAreUnique<Args...>::value,
13721 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13722 "Types should be listed at most once.");
13723
13724 set(std::forward<Args>(args)...);
13725 }
13726
13745#ifndef NO_DOC
13746 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13747#else
13748 template<typename... Args>
13749#endif
13750 void set(Args &&...args)
13751 {
13752 using namespace Zivid::Detail::TypeTraits;
13753
13754 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13755 static_assert(
13756 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13757
13758 static_assert(
13759 AllArgsDecayedAreUnique<Args...>::value,
13760 "Found duplicate types among the arguments passed to set(...). "
13761 "Types should be listed at most once.");
13762
13763 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13764 }
13765
13785#ifndef NO_DOC
13786 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13787#else
13788 template<typename... Args>
13789#endif
13790 RegionOfInterest copyWith(Args &&...args) const
13791 {
13792 using namespace Zivid::Detail::TypeTraits;
13793
13794 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13795 static_assert(
13796 AllArgsAreDescendantNodes::value,
13797 "All arguments passed to copyWith(...) must be descendant nodes.");
13798
13799 static_assert(
13800 AllArgsDecayedAreUnique<Args...>::value,
13801 "Found duplicate types among the arguments passed to copyWith(...). "
13802 "Types should be listed at most once.");
13803
13804 auto copy{ *this };
13805 copy.set(std::forward<Args>(args)...);
13806 return copy;
13807 }
13808
13810 const Box &box() const
13811 {
13812 return m_box;
13813 }
13814
13817 {
13818 return m_box;
13819 }
13820
13822 RegionOfInterest &set(const Box &value)
13823 {
13824 m_box = value;
13825 return *this;
13826 }
13827
13830 {
13831 m_box.set(value);
13832 return *this;
13833 }
13834
13837 {
13838 m_box.set(value);
13839 return *this;
13840 }
13841
13844 {
13845 m_box.set(value);
13846 return *this;
13847 }
13848
13851 {
13852 m_box.set(value);
13853 return *this;
13854 }
13855
13858 {
13859 m_box.set(value);
13860 return *this;
13861 }
13862
13864 const Depth &depth() const
13865 {
13866 return m_depth;
13867 }
13868
13871 {
13872 return m_depth;
13873 }
13874
13877 {
13878 m_depth = value;
13879 return *this;
13880 }
13881
13884 {
13885 m_depth.set(value);
13886 return *this;
13887 }
13888
13891 {
13892 m_depth.set(value);
13893 return *this;
13894 }
13895
13896 template<
13897 typename T,
13898 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
13900 {
13901 return m_box;
13902 }
13903
13904 template<
13905 typename T,
13906 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
13907 0>
13909 {
13910 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
13911 }
13912
13913 template<
13914 typename T,
13915 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
13916 0>
13918 {
13919 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
13920 }
13921
13922 template<
13923 typename T,
13924 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
13926 {
13927 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
13928 }
13929
13930 template<
13931 typename T,
13932 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
13934 {
13935 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
13936 }
13937
13938 template<
13939 typename T,
13940 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
13942 {
13943 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
13944 }
13945
13946 template<
13947 typename T,
13948 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
13950 {
13951 return m_depth;
13952 }
13953
13954 template<
13955 typename T,
13956 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
13957 0>
13959 {
13960 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
13961 }
13962
13963 template<
13964 typename T,
13965 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
13966 0>
13968 {
13969 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
13970 }
13971
13972 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13974 {
13975 return m_box;
13976 }
13977
13978 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13980 {
13981 return m_depth;
13982 }
13983
13985 template<typename F>
13986 void forEach(const F &f) const
13987 {
13988 f(m_box);
13989 f(m_depth);
13990 }
13991
13993 template<typename F>
13994 void forEach(const F &f)
13995 {
13996 f(m_box);
13997 f(m_depth);
13998 }
13999
14001 bool operator==(const RegionOfInterest &other) const;
14002
14004 bool operator!=(const RegionOfInterest &other) const;
14005
14007 std::string toString() const;
14008
14010 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
14011 {
14012 return stream << value.toString();
14013 }
14014
14015 private:
14016 void setFromString(const std::string &value);
14017
14018 void setFromString(const std::string &fullPath, const std::string &value);
14019
14020 std::string getString(const std::string &fullPath) const;
14021
14022 Box m_box;
14023 Depth m_depth;
14024
14025 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
14026 };
14027
14030
14031 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14033 {
14034 public:
14036 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
14037
14039 static constexpr const char *path{ "Sampling" };
14040
14042 static constexpr const char *name{ "Sampling" };
14043
14045 static constexpr const char *description{ R"description(Sampling settings.
14046)description" };
14047
14053
14054 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14056 {
14057 public:
14059 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14060
14062 static constexpr const char *path{ "Sampling/Color" };
14063
14065 static constexpr const char *name{ "Color" };
14066
14068 static constexpr const char *description{
14069 R"description(Choose how to sample colors for the pointcloud. The `rgb` option gives all
14070colors for a regular Zivid camera. The `disabled` option gives no colors and
14071can allow for faster captures. It is also useful if you want to avoid projecting
14072white light in the subsampling modes under `Sampling::Pixel`.
14073)description"
14074 };
14075
14077 enum class ValueType
14078 {
14079 rgb,
14080 disabled
14081 };
14082 static const Color rgb;
14083 static const Color disabled;
14084
14086 static std::set<ValueType> validValues()
14087 {
14088 return { ValueType::rgb, ValueType::disabled };
14089 }
14090
14092 Color() = default;
14093
14095 explicit constexpr Color(ValueType value)
14096 : m_opt{ verifyValue(value) }
14097 {}
14098
14104
14106 bool hasValue() const;
14107
14109 void reset();
14110
14112 std::string toString() const;
14113
14115 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
14116 {
14117 return stream << Color{ value }.toString();
14118 }
14119
14121 bool operator==(const Color &other) const
14122 {
14123 return m_opt == other.m_opt;
14124 }
14125
14127 bool operator!=(const Color &other) const
14128 {
14129 return m_opt != other.m_opt;
14130 }
14131
14133 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
14134 {
14135 return stream << value.toString();
14136 }
14137
14138 private:
14139 void setFromString(const std::string &value);
14140
14141 constexpr ValueType static verifyValue(const ValueType &value)
14142 {
14143 return value == ValueType::rgb || value == ValueType::disabled
14144 ? value
14145 : throw std::invalid_argument{
14146 "Invalid value: Color{ "
14147 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14148 };
14149 }
14150
14151 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
14152
14153 friend struct DataModel::Detail::Befriend<Color>;
14154 };
14155
14165
14166 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14168 {
14169 public:
14171 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14172
14174 static constexpr const char *path{ "Sampling/Pixel" };
14175
14177 static constexpr const char *name{ "Pixel" };
14178
14180 static constexpr const char *description{
14181 R"description(Set whether the full image sensor should be used with white projector light or
14182only specific color channels with corresponding projector light.
14183Using only a specific color channel will subsample pixels and give a
14184smaller resolution.
14185
14186Subsampling decreases the capture time, as less data will be captured and processed.
14187Picking a specific color channel can also help reduce noise and effects of ambient light.
14188Projecting blue light will in most cases give better data than red light.
14189)description"
14190 };
14191
14193 enum class ValueType
14194 {
14195 all,
14196 blueSubsample2x2,
14197 redSubsample2x2,
14198 blueSubsample4x4,
14199 redSubsample4x4
14200 };
14201 static const Pixel all;
14203 static const Pixel redSubsample2x2;
14205 static const Pixel redSubsample4x4;
14206
14208 static std::set<ValueType> validValues()
14209 {
14210 return { ValueType::all,
14211 ValueType::blueSubsample2x2,
14212 ValueType::redSubsample2x2,
14213 ValueType::blueSubsample4x4,
14214 ValueType::redSubsample4x4 };
14215 }
14216
14218 Pixel() = default;
14219
14221 explicit constexpr Pixel(ValueType value)
14222 : m_opt{ verifyValue(value) }
14223 {}
14224
14230
14232 bool hasValue() const;
14233
14235 void reset();
14236
14238 std::string toString() const;
14239
14241 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14242 {
14243 return stream << Pixel{ value }.toString();
14244 }
14245
14247 bool operator==(const Pixel &other) const
14248 {
14249 return m_opt == other.m_opt;
14250 }
14251
14253 bool operator!=(const Pixel &other) const
14254 {
14255 return m_opt != other.m_opt;
14256 }
14257
14259 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14260 {
14261 return stream << value.toString();
14262 }
14263
14264 private:
14265 void setFromString(const std::string &value);
14266
14267 constexpr ValueType static verifyValue(const ValueType &value)
14268 {
14269 return value == ValueType::all || value == ValueType::blueSubsample2x2
14270 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14271 || value == ValueType::redSubsample4x4
14272 ? value
14273 : throw std::invalid_argument{
14274 "Invalid value: Pixel{ "
14275 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14276 };
14277 }
14278
14279 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
14280
14281 friend struct DataModel::Detail::Befriend<Pixel>;
14282 };
14283
14284 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14285
14288
14301#ifndef NO_DOC
14302 template<
14303 typename... Args,
14304 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14305 typename std::enable_if<
14306 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14307 value,
14308 int>::type = 0>
14309#else
14310 template<typename... Args>
14311#endif
14312 explicit Sampling(Args &&...args)
14313 {
14314 using namespace Zivid::Detail::TypeTraits;
14315
14316 static_assert(
14317 AllArgsDecayedAreUnique<Args...>::value,
14318 "Found duplicate types among the arguments passed to Sampling(...). "
14319 "Types should be listed at most once.");
14320
14321 set(std::forward<Args>(args)...);
14322 }
14323
14335#ifndef NO_DOC
14336 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14337#else
14338 template<typename... Args>
14339#endif
14340 void set(Args &&...args)
14341 {
14342 using namespace Zivid::Detail::TypeTraits;
14343
14344 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14345 static_assert(
14346 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14347
14348 static_assert(
14349 AllArgsDecayedAreUnique<Args...>::value,
14350 "Found duplicate types among the arguments passed to set(...). "
14351 "Types should be listed at most once.");
14352
14353 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14354 }
14355
14368#ifndef NO_DOC
14369 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14370#else
14371 template<typename... Args>
14372#endif
14373 Sampling copyWith(Args &&...args) const
14374 {
14375 using namespace Zivid::Detail::TypeTraits;
14376
14377 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14378 static_assert(
14379 AllArgsAreDescendantNodes::value,
14380 "All arguments passed to copyWith(...) must be descendant nodes.");
14381
14382 static_assert(
14383 AllArgsDecayedAreUnique<Args...>::value,
14384 "Found duplicate types among the arguments passed to copyWith(...). "
14385 "Types should be listed at most once.");
14386
14387 auto copy{ *this };
14388 copy.set(std::forward<Args>(args)...);
14389 return copy;
14390 }
14391
14393 const Color &color() const
14394 {
14395 return m_color;
14396 }
14397
14400 {
14401 return m_color;
14402 }
14403
14405 Sampling &set(const Color &value)
14406 {
14407 m_color = value;
14408 return *this;
14409 }
14410
14412 const Pixel &pixel() const
14413 {
14414 return m_pixel;
14415 }
14416
14419 {
14420 return m_pixel;
14421 }
14422
14424 Sampling &set(const Pixel &value)
14425 {
14426 m_pixel = value;
14427 return *this;
14428 }
14429
14430 template<
14431 typename T,
14432 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14434 {
14435 return m_color;
14436 }
14437
14438 template<
14439 typename T,
14440 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14442 {
14443 return m_pixel;
14444 }
14445
14446 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14448 {
14449 return m_color;
14450 }
14451
14452 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14454 {
14455 return m_pixel;
14456 }
14457
14459 template<typename F>
14460 void forEach(const F &f) const
14461 {
14462 f(m_color);
14463 f(m_pixel);
14464 }
14465
14467 template<typename F>
14468 void forEach(const F &f)
14469 {
14470 f(m_color);
14471 f(m_pixel);
14472 }
14473
14475 bool operator==(const Sampling &other) const;
14476
14478 bool operator!=(const Sampling &other) const;
14479
14481 std::string toString() const;
14482
14484 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14485 {
14486 return stream << value.toString();
14487 }
14488
14489 private:
14490 void setFromString(const std::string &value);
14491
14492 void setFromString(const std::string &fullPath, const std::string &value);
14493
14494 std::string getString(const std::string &fullPath) const;
14495
14496 Color m_color;
14497 Pixel m_pixel;
14498
14499 friend struct DataModel::Detail::Befriend<Sampling>;
14500 };
14501
14502 using Descendants = std::tuple<
14570
14573
14575 explicit Settings(const std::string &fileName);
14576
14654#ifndef NO_DOC
14655 template<
14656 typename... Args,
14657 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14658 typename std::enable_if<
14659 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14660 int>::type = 0>
14661#else
14662 template<typename... Args>
14663#endif
14664 explicit Settings(Args &&...args)
14665 {
14666 using namespace Zivid::Detail::TypeTraits;
14667
14668 static_assert(
14669 AllArgsDecayedAreUnique<Args...>::value,
14670 "Found duplicate types among the arguments passed to Settings(...). "
14671 "Types should be listed at most once.");
14672
14673 set(std::forward<Args>(args)...);
14674 }
14675
14752#ifndef NO_DOC
14753 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14754#else
14755 template<typename... Args>
14756#endif
14757 void set(Args &&...args)
14758 {
14759 using namespace Zivid::Detail::TypeTraits;
14760
14761 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14762 static_assert(
14763 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14764
14765 static_assert(
14766 AllArgsDecayedAreUnique<Args...>::value,
14767 "Found duplicate types among the arguments passed to set(...). "
14768 "Types should be listed at most once.");
14769
14770 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14771 }
14772
14850#ifndef NO_DOC
14851 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14852#else
14853 template<typename... Args>
14854#endif
14855 Settings copyWith(Args &&...args) const
14856 {
14857 using namespace Zivid::Detail::TypeTraits;
14858
14859 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14860 static_assert(
14861 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
14862
14863 static_assert(
14864 AllArgsDecayedAreUnique<Args...>::value,
14865 "Found duplicate types among the arguments passed to copyWith(...). "
14866 "Types should be listed at most once.");
14867
14868 auto copy{ *this };
14869 copy.set(std::forward<Args>(args)...);
14870 return copy;
14871 }
14872
14875 {
14876 return m_acquisitions;
14877 }
14878
14881 {
14882 return m_acquisitions;
14883 }
14884
14887 {
14888 m_acquisitions = value;
14889 return *this;
14890 }
14891
14894 {
14895 return m_diagnostics;
14896 }
14897
14900 {
14901 return m_diagnostics;
14902 }
14903
14905 Settings &set(const Diagnostics &value)
14906 {
14907 m_diagnostics = value;
14908 return *this;
14909 }
14910
14913 {
14914 m_diagnostics.set(value);
14915 return *this;
14916 }
14917
14919 const Engine &engine() const
14920 {
14921 return m_engine;
14922 }
14923
14926 {
14927 return m_engine;
14928 }
14929
14931 Settings &set(const Engine &value)
14932 {
14933 m_engine = value;
14934 return *this;
14935 }
14936
14938 const Processing &processing() const
14939 {
14940 return m_processing;
14941 }
14942
14945 {
14946 return m_processing;
14947 }
14948
14950 Settings &set(const Processing &value)
14951 {
14952 m_processing = value;
14953 return *this;
14954 }
14955
14958 {
14959 m_processing.set(value);
14960 return *this;
14961 }
14962
14965 {
14966 m_processing.set(value);
14967 return *this;
14968 }
14969
14972 {
14973 m_processing.set(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 return m_regionOfInterest;
15303 }
15304
15307 {
15308 return m_regionOfInterest;
15309 }
15310
15313 {
15314 m_regionOfInterest = value;
15315 return *this;
15316 }
15317
15320 {
15321 m_regionOfInterest.set(value);
15322 return *this;
15323 }
15324
15327 {
15328 m_regionOfInterest.set(value);
15329 return *this;
15330 }
15331
15334 {
15335 m_regionOfInterest.set(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
15382 const Sampling &sampling() const
15383 {
15384 return m_sampling;
15385 }
15386
15389 {
15390 return m_sampling;
15391 }
15392
15394 Settings &set(const Sampling &value)
15395 {
15396 m_sampling = value;
15397 return *this;
15398 }
15399
15402 {
15403 m_sampling.set(value);
15404 return *this;
15405 }
15406
15409 {
15410 m_sampling.set(value);
15411 return *this;
15412 }
15413
15414 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15416 {
15417 return m_acquisitions;
15418 }
15419
15420 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15422 {
15423 return m_diagnostics;
15424 }
15425
15426 template<
15427 typename T,
15428 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15430 {
15431 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15432 }
15433
15434 template<typename T, typename std::enable_if<std::is_same<T, Settings::Engine>::value, int>::type = 0>
15435 const Settings::Engine &get() const
15436 {
15437 return m_engine;
15438 }
15439
15440 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15442 {
15443 return m_processing;
15444 }
15445
15446 template<
15447 typename T,
15448 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15450 {
15451 return m_processing.get<Settings::Processing::Color>();
15452 }
15453
15454 template<
15455 typename T,
15456 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15458 {
15459 return m_processing.get<Settings::Processing::Color::Balance>();
15460 }
15461
15462 template<
15463 typename T,
15464 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15466 {
15467 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15468 }
15469
15470 template<
15471 typename T,
15472 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15474 {
15475 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15476 }
15477
15478 template<
15479 typename T,
15480 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15482 {
15483 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15484 }
15485
15486 template<
15487 typename T,
15488 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15490 {
15491 return m_processing.get<Settings::Processing::Color::Experimental>();
15492 }
15493
15494 template<
15495 typename T,
15496 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15497 type = 0>
15499 {
15500 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15501 }
15502
15503 template<
15504 typename T,
15505 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15507 {
15508 return m_processing.get<Settings::Processing::Color::Gamma>();
15509 }
15510
15511 template<
15512 typename T,
15513 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15515 {
15516 return m_processing.get<Settings::Processing::Filters>();
15517 }
15518
15519 template<
15520 typename T,
15521 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15523 {
15524 return m_processing.get<Settings::Processing::Filters::Cluster>();
15525 }
15526
15527 template<
15528 typename T,
15529 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15530 type = 0>
15532 {
15534 }
15535
15536 template<
15537 typename T,
15538 typename std::enable_if<
15539 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
15540 int>::type = 0>
15542 {
15544 }
15545
15546 template<
15547 typename T,
15548 typename std::enable_if<
15549 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
15550 int>::type = 0>
15552 {
15554 }
15555
15556 template<
15557 typename T,
15558 typename std::enable_if<
15559 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15560 int>::type = 0>
15562 {
15564 }
15565
15566 template<
15567 typename T,
15568 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15570 {
15571 return m_processing.get<Settings::Processing::Filters::Experimental>();
15572 }
15573
15574 template<
15575 typename T,
15576 typename std::enable_if<
15577 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
15578 int>::type = 0>
15580 {
15582 }
15583
15584 template<
15585 typename T,
15586 typename std::enable_if<
15587 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
15588 int>::type = 0>
15590 {
15592 }
15593
15594 template<
15595 typename T,
15596 typename std::enable_if<
15597 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15598 value,
15599 int>::type = 0>
15601 {
15602 return m_processing
15604 }
15605
15606 template<
15607 typename T,
15608 typename std::enable_if<
15609 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15610 value,
15611 int>::type = 0>
15613 {
15614 return m_processing
15616 }
15617
15618 template<
15619 typename T,
15620 typename std::enable_if<
15621 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15622 int>::type = 0>
15624 {
15626 }
15627
15628 template<
15629 typename T,
15630 typename std::enable_if<
15631 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15632 value,
15633 int>::type = 0>
15635 {
15636 return m_processing
15638 }
15639
15640 template<
15641 typename T,
15642 typename std::enable_if<
15643 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15644 value,
15645 int>::type = 0>
15647 {
15648 return m_processing
15650 }
15651
15652 template<
15653 typename T,
15654 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
15656 {
15657 return m_processing.get<Settings::Processing::Filters::Hole>();
15658 }
15659
15660 template<
15661 typename T,
15662 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::type = 0>
15664 {
15665 return m_processing.get<Settings::Processing::Filters::Hole::Repair>();
15666 }
15667
15668 template<
15669 typename T,
15670 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value, int>::
15671 type = 0>
15673 {
15675 }
15676
15677 template<
15678 typename T,
15679 typename std::
15680 enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value, int>::type = 0>
15682 {
15684 }
15685
15686 template<
15687 typename T,
15688 typename std::enable_if<
15689 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
15690 int>::type = 0>
15692 {
15694 }
15695
15696 template<
15697 typename T,
15698 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15700 {
15701 return m_processing.get<Settings::Processing::Filters::Noise>();
15702 }
15703
15704 template<
15705 typename T,
15706 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15707 0>
15709 {
15711 }
15712
15713 template<
15714 typename T,
15715 typename std::enable_if<
15716 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
15717 int>::type = 0>
15719 {
15721 }
15722
15723 template<
15724 typename T,
15725 typename std::enable_if<
15726 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
15727 int>::type = 0>
15729 {
15731 }
15732
15733 template<
15734 typename T,
15735 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
15736 0>
15738 {
15740 }
15741
15742 template<
15743 typename T,
15744 typename std::
15745 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
15747 {
15749 }
15750
15751 template<
15752 typename T,
15753 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
15754 type = 0>
15756 {
15758 }
15759
15760 template<
15761 typename T,
15762 typename std::enable_if<
15763 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
15764 int>::type = 0>
15766 {
15768 }
15769
15770 template<
15771 typename T,
15772 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
15774 {
15775 return m_processing.get<Settings::Processing::Filters::Outlier>();
15776 }
15777
15778 template<
15779 typename T,
15780 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
15781 type = 0>
15783 {
15785 }
15786
15787 template<
15788 typename T,
15789 typename std::enable_if<
15790 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
15791 int>::type = 0>
15793 {
15795 }
15796
15797 template<
15798 typename T,
15799 typename std::enable_if<
15800 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
15801 int>::type = 0>
15803 {
15805 }
15806
15807 template<
15808 typename T,
15809 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
15811 {
15812 return m_processing.get<Settings::Processing::Filters::Reflection>();
15813 }
15814
15815 template<
15816 typename T,
15817 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
15818 type = 0>
15820 {
15822 }
15823
15824 template<
15825 typename T,
15826 typename std::enable_if<
15827 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
15828 int>::type = 0>
15830 {
15832 }
15833
15834 template<
15835 typename T,
15836 typename std::enable_if<
15837 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
15838 int>::type = 0>
15840 {
15842 }
15843
15844 template<
15845 typename T,
15846 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
15848 {
15849 return m_processing.get<Settings::Processing::Filters::Smoothing>();
15850 }
15851
15852 template<
15853 typename T,
15854 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
15855 type = 0>
15857 {
15859 }
15860
15861 template<
15862 typename T,
15863 typename std::enable_if<
15864 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
15865 int>::type = 0>
15867 {
15869 }
15870
15871 template<
15872 typename T,
15873 typename std::enable_if<
15874 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
15875 int>::type = 0>
15877 {
15879 }
15880
15881 template<
15882 typename T,
15883 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
15885 {
15886 return m_processing.get<Settings::Processing::Resampling>();
15887 }
15888
15889 template<
15890 typename T,
15891 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
15893 {
15894 return m_processing.get<Settings::Processing::Resampling::Mode>();
15895 }
15896
15897 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
15899 {
15900 return m_regionOfInterest;
15901 }
15902
15903 template<
15904 typename T,
15905 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
15907 {
15908 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
15909 }
15910
15911 template<
15912 typename T,
15913 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
15915 {
15916 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
15917 }
15918
15919 template<
15920 typename T,
15921 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
15923 {
15924 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
15925 }
15926
15927 template<
15928 typename T,
15929 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
15931 {
15932 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
15933 }
15934
15935 template<
15936 typename T,
15937 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
15939 {
15940 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
15941 }
15942
15943 template<
15944 typename T,
15945 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
15947 {
15948 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
15949 }
15950
15951 template<
15952 typename T,
15953 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
15955 {
15956 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
15957 }
15958
15959 template<
15960 typename T,
15961 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
15963 {
15964 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
15965 }
15966
15967 template<
15968 typename T,
15969 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
15971 {
15972 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
15973 }
15974
15975 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
15977 {
15978 return m_sampling;
15979 }
15980
15981 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
15983 {
15984 return m_sampling.get<Settings::Sampling::Color>();
15985 }
15986
15987 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
15989 {
15990 return m_sampling.get<Settings::Sampling::Pixel>();
15991 }
15992
15993 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
15995 {
15996 return m_acquisitions;
15997 }
15998
15999 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
16001 {
16002 return m_diagnostics;
16003 }
16004
16005 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
16006 const Settings::Engine &get() const
16007 {
16008 return m_engine;
16009 }
16010
16011 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
16013 {
16014 return m_processing;
16015 }
16016
16017 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
16019 {
16020 return m_regionOfInterest;
16021 }
16022
16023 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
16025 {
16026 return m_sampling;
16027 }
16028
16030 template<typename F>
16031 void forEach(const F &f) const
16032 {
16033 f(m_acquisitions);
16034 f(m_diagnostics);
16035 f(m_engine);
16036 f(m_processing);
16037 f(m_regionOfInterest);
16038 f(m_sampling);
16039 }
16040
16042 template<typename F>
16043 void forEach(const F &f)
16044 {
16045 f(m_acquisitions);
16046 f(m_diagnostics);
16047 f(m_engine);
16048 f(m_processing);
16049 f(m_regionOfInterest);
16050 f(m_sampling);
16051 }
16052
16054 bool operator==(const Settings &other) const;
16055
16057 bool operator!=(const Settings &other) const;
16058
16060 std::string toString() const;
16061
16063 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
16064 {
16065 return stream << value.toString();
16066 }
16067
16069 void save(const std::string &fileName) const;
16070
16072 void load(const std::string &fileName);
16073
16074 private:
16075 void setFromString(const std::string &value);
16076
16077 void setFromString(const std::string &fullPath, const std::string &value);
16078
16079 std::string getString(const std::string &fullPath) const;
16080
16081 Acquisitions m_acquisitions;
16082 Diagnostics m_diagnostics;
16083 Engine m_engine;
16084 Processing m_processing;
16085 RegionOfInterest m_regionOfInterest;
16086 Sampling m_sampling;
16087
16088 friend struct DataModel::Detail::Befriend<Settings>;
16089 };
16090
16091#ifndef NO_DOC
16093 namespace Detail
16094 {
16095 ZIVID_CORE_EXPORT void save(const Settings &dataModel, std::ostream &ostream);
16096 ZIVID_CORE_EXPORT void load(Settings &dataModel, std::istream &istream);
16097 } // namespace Detail
16098#endif
16099
16100#ifndef NO_DOC
16101 template<>
16102 struct Settings::Version<24>
16103 {
16104 using Type = Settings;
16105 };
16106#endif
16107
16108} // namespace Zivid
16109
16110#ifdef _MSC_VER
16111# pragma warning(pop)
16112#endif
16113
16114#ifndef NO_DOC
16115# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
16116namespace std // NOLINT
16117{
16118
16119 template<>
16120 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
16121 {};
16122
16123 template<size_t i>
16124 struct tuple_element<i, Zivid::Settings::Diagnostics>
16125 {
16126 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
16127
16128 using type // NOLINT
16129 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
16130 };
16131
16132 template<>
16133 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 3>
16134 {};
16135
16136 template<size_t i>
16137 struct tuple_element<i, Zivid::Settings::Processing>
16138 {
16139 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 3");
16140
16141 using type // NOLINT
16142 = decltype(declval<Zivid::Settings::Processing>().get<i>());
16143 };
16144
16145 template<>
16146 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
16147 {};
16148
16149 template<size_t i>
16150 struct tuple_element<i, Zivid::Settings::Processing::Color>
16151 {
16152 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
16153
16154 using type // NOLINT
16155 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
16156 };
16157
16158 template<>
16159 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16160 {};
16161
16162 template<size_t i>
16163 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16164 {
16165 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16166
16167 using type // NOLINT
16168 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16169 };
16170
16171 template<>
16172 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16173 {};
16174
16175 template<size_t i>
16176 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16177 {
16178 static_assert(
16179 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16180 "Index must be less than 1");
16181
16182 using type // NOLINT
16183 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16184 };
16185
16186 template<>
16187 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 7>
16188 {};
16189
16190 template<size_t i>
16191 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16192 {
16193 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 7");
16194
16195 using type // NOLINT
16196 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16197 };
16198
16199 template<>
16200 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16201 {};
16202
16203 template<size_t i>
16204 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16205 {
16206 static_assert(
16207 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16208 "Index must be less than 1");
16209
16210 using type // NOLINT
16211 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16212 };
16213
16214 template<>
16215 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16216 {};
16217
16218 template<size_t i>
16219 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16220 {
16221 static_assert(
16222 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16223 "Index must be less than 3");
16224
16225 using type // NOLINT
16226 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16227 };
16228
16229 template<>
16230 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
16231 {};
16232
16233 template<size_t i>
16234 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16235 {
16236 static_assert(
16237 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16238 "Index must be less than 1");
16239
16240 using type // NOLINT
16241 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16242 };
16243
16244 template<>
16245 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16246 : integral_constant<size_t, 2>
16247 {};
16248
16249 template<size_t i>
16250 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16251 {
16252 static_assert(
16253 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16254 "Index must be less than 2");
16255
16256 using type // NOLINT
16257 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16258 };
16259
16260 template<>
16261 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16262 : integral_constant<size_t, 2>
16263 {};
16264
16265 template<size_t i>
16266 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16267 {
16268 static_assert(
16269 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16270 "Index must be less than 2");
16271
16272 using type // NOLINT
16273 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16274 .get<i>());
16275 };
16276
16277 template<>
16278 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16279 : integral_constant<size_t, 2>
16280 {};
16281
16282 template<size_t i>
16283 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16284 {
16285 static_assert(
16286 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16287 "Index must be less than 2");
16288
16289 using type // NOLINT
16290 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16291 .get<i>());
16292 };
16293
16294 template<>
16295 struct tuple_size<Zivid::Settings::Processing::Filters::Hole> : integral_constant<size_t, 1>
16296 {};
16297
16298 template<size_t i>
16299 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole>
16300 {
16301 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Hole>::value, "Index must be less than 1");
16302
16303 using type // NOLINT
16304 = decltype(declval<Zivid::Settings::Processing::Filters::Hole>().get<i>());
16305 };
16306
16307 template<>
16308 struct tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair> : integral_constant<size_t, 3>
16309 {};
16310
16311 template<size_t i>
16312 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole::Repair>
16313 {
16314 static_assert(
16315 i < tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair>::value,
16316 "Index must be less than 3");
16317
16318 using type // NOLINT
16319 = decltype(declval<Zivid::Settings::Processing::Filters::Hole::Repair>().get<i>());
16320 };
16321
16322 template<>
16323 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16324 {};
16325
16326 template<size_t i>
16327 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16328 {
16329 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16330
16331 using type // NOLINT
16332 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16333 };
16334
16335 template<>
16336 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16337 {};
16338
16339 template<size_t i>
16340 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16341 {
16342 static_assert(
16343 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16344 "Index must be less than 2");
16345
16346 using type // NOLINT
16347 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16348 };
16349
16350 template<>
16351 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16352 {};
16353
16354 template<size_t i>
16355 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16356 {
16357 static_assert(
16358 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16359 "Index must be less than 1");
16360
16361 using type // NOLINT
16362 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16363 };
16364
16365 template<>
16366 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16367 {};
16368
16369 template<size_t i>
16370 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16371 {
16372 static_assert(
16373 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16374 "Index must be less than 1");
16375
16376 using type // NOLINT
16377 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16378 };
16379
16380 template<>
16381 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16382 {};
16383
16384 template<size_t i>
16385 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16386 {
16387 static_assert(
16388 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16389 "Index must be less than 1");
16390
16391 using type // NOLINT
16392 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16393 };
16394
16395 template<>
16396 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16397 {};
16398
16399 template<size_t i>
16400 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16401 {
16402 static_assert(
16403 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16404 "Index must be less than 2");
16405
16406 using type // NOLINT
16407 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16408 };
16409
16410 template<>
16411 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16412 {};
16413
16414 template<size_t i>
16415 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16416 {
16417 static_assert(
16418 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16419 "Index must be less than 1");
16420
16421 using type // NOLINT
16422 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16423 };
16424
16425 template<>
16426 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16427 {};
16428
16429 template<size_t i>
16430 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16431 {
16432 static_assert(
16433 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16434 "Index must be less than 2");
16435
16436 using type // NOLINT
16437 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16438 };
16439
16440 template<>
16441 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16442 {};
16443
16444 template<size_t i>
16445 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16446 {
16447 static_assert(
16448 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16449 "Index must be less than 1");
16450
16451 using type // NOLINT
16452 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16453 };
16454
16455 template<>
16456 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16457 {};
16458
16459 template<size_t i>
16460 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16461 {
16462 static_assert(
16463 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16464 "Index must be less than 2");
16465
16466 using type // NOLINT
16467 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16468 };
16469
16470 template<>
16471 struct tuple_size<Zivid::Settings::Processing::Resampling> : integral_constant<size_t, 1>
16472 {};
16473
16474 template<size_t i>
16475 struct tuple_element<i, Zivid::Settings::Processing::Resampling>
16476 {
16477 static_assert(i < tuple_size<Zivid::Settings::Processing::Resampling>::value, "Index must be less than 1");
16478
16479 using type // NOLINT
16480 = decltype(declval<Zivid::Settings::Processing::Resampling>().get<i>());
16481 };
16482
16483 template<>
16484 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16485 {};
16486
16487 template<size_t i>
16488 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16489 {
16490 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16491
16492 using type // NOLINT
16493 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16494 };
16495
16496 template<>
16497 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16498 {};
16499
16500 template<size_t i>
16501 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16502 {
16503 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16504
16505 using type // NOLINT
16506 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16507 };
16508
16509 template<>
16510 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16511 {};
16512
16513 template<size_t i>
16514 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16515 {
16516 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16517
16518 using type // NOLINT
16519 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16520 };
16521
16522 template<>
16523 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16524 {};
16525
16526 template<size_t i>
16527 struct tuple_element<i, Zivid::Settings::Sampling>
16528 {
16529 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16530
16531 using type // NOLINT
16532 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16533 };
16534
16535 template<>
16536 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 6>
16537 {};
16538
16539 template<size_t i>
16540 struct tuple_element<i, Zivid::Settings>
16541 {
16542 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 6");
16543
16544 using type // NOLINT
16545 = decltype(declval<Zivid::Settings>().get<i>());
16546 };
16547
16548} // namespace std
16549# endif
16550#endif
16551
16552// If we have access to the DataModel library, automatically include internal DataModel
16553// header. This header is necessary for serialization and deserialization.
16554#if defined(__has_include) && !defined(NO_DOC)
16555# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16556# include "Zivid/SettingsInternal.h"
16557# endif
16558#endif
#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:133
bool operator<(const Aperture &other) const
Comparison operator.
Definition Settings.h:196
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream.
Definition Settings.h:220
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:208
bool operator>(const Aperture &other) const
Comparison operator.
Definition Settings.h:202
bool operator==(const Aperture &other) const
Comparison operator.
Definition Settings.h:184
bool operator>=(const Aperture &other) const
Comparison operator.
Definition Settings.h:214
bool operator!=(const Aperture &other) const
Comparison operator.
Definition Settings.h:190
Aperture()=default
Default constructor.
constexpr Aperture(double value)
Constructor.
Definition Settings.h:164
double ValueType
The type of the underlying value.
Definition Settings.h:152
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Aperture.
Definition Settings.h:155
bool hasValue() const
Check if the value is set.
Brightness controls the light output from the projector.
Definition Settings.h:256
bool operator<=(const Brightness &other) const
Comparison operator.
Definition Settings.h:339
bool operator!=(const Brightness &other) const
Comparison operator.
Definition Settings.h:321
bool operator>=(const Brightness &other) const
Comparison operator.
Definition Settings.h:345
bool operator<(const Brightness &other) const
Comparison operator.
Definition Settings.h:327
bool operator>(const Brightness &other) const
Comparison operator.
Definition Settings.h:333
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Brightness.
Definition Settings.h:286
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:351
constexpr Brightness(double value)
Constructor.
Definition Settings.h:295
bool hasValue() const
Check if the value is set.
Brightness()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:283
bool operator==(const Brightness &other) const
Comparison operator.
Definition Settings.h:315
Exposure time for each single image in the measurement. Affects frame rate.
Definition Settings.h:377
bool operator>=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:456
bool operator<(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:438
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:444
std::chrono::microseconds ValueType
The type of the underlying value.
Definition Settings.h:394
bool operator==(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:426
bool operator!=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:432
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:397
constexpr ExposureTime(std::chrono::microseconds value)
Constructor.
Definition Settings.h:406
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream.
Definition Settings.h:462
bool operator<=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:450
Analog gain in the camera.
Definition Settings.h:489
bool operator==(const Gain &other) const
Comparison operator.
Definition Settings.h:536
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream.
Definition Settings.h:572
constexpr Gain(double value)
Constructor.
Definition Settings.h:516
bool operator>=(const Gain &other) const
Comparison operator.
Definition Settings.h:566
void reset()
Reset the node to unset state.
bool operator<=(const Gain &other) const
Comparison operator.
Definition Settings.h:560
static constexpr Range< double > validRange()
The range of valid values for Gain.
Definition Settings.h:507
double value() const
Get the value.
Gain()=default
Default constructor.
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:504
std::string toString() const
Get the value as string.
bool operator!=(const Gain &other) const
Comparison operator.
Definition Settings.h:542
bool operator>(const Gain &other) const
Comparison operator.
Definition Settings.h:554
bool operator<(const Gain &other) const
Comparison operator.
Definition Settings.h:548
Settings for a single acquisition.
Definition Settings.h:113
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:846
Acquisition & set(const Aperture &value)
Set Aperture.
Definition Settings.h:725
const Aperture & aperture() const
Get Aperture.
Definition Settings.h:713
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition Settings.h:594
Gain & gain()
Get Gain.
Definition Settings.h:776
const Settings::Acquisition::Aperture & get() const
Definition Settings.h:791
Brightness & brightness()
Get Brightness.
Definition Settings.h:738
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream.
Definition Settings.h:874
bool operator==(const Acquisition &other) const
Equality operator.
const Settings::Acquisition::ExposureTime & get() const
Definition Settings.h:807
bool operator!=(const Acquisition &other) const
Inequality operator.
const ExposureTime & exposureTime() const
Get ExposureTime.
Definition Settings.h:751
Acquisition & set(const Brightness &value)
Set Brightness.
Definition Settings.h:744
Acquisition & set(const ExposureTime &value)
Set ExposureTime.
Definition Settings.h:763
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:658
const Brightness & brightness() const
Get Brightness.
Definition Settings.h:732
const Settings::Acquisition::Gain & get() const
Definition Settings.h:815
Acquisition & set(const Gain &value)
Set Gain.
Definition Settings.h:782
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:693
Aperture & aperture()
Get Aperture.
Definition Settings.h:719
const Settings::Acquisition::Brightness & get() const
Definition Settings.h:799
ExposureTime & exposureTime()
Get ExposureTime.
Definition Settings.h:757
const Gain & gain() const
Get Gain.
Definition Settings.h:770
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:856
List of Acquisition objects.
Definition Settings.h:898
bool operator!=(const Acquisitions &other) const
Comparison operator.
Definition Settings.h:1036
std::vector< Settings::Acquisition >::const_iterator ConstIterator
Constant iterator type for Acquisitions.
Definition Settings.h:1015
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:997
std::vector< Settings::Acquisition >::iterator Iterator
Iterator type for Acquisitions.
Definition Settings.h:1006
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:930
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream.
Definition Settings.h:1042
void forEach(const F &f)
Run the given function on each element in the list.
Definition Settings.h:987
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor.
Definition Settings.h:925
std::vector< Settings::Acquisition > ValueType
The type of the underlying value.
Definition Settings.h:913
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions.
Definition Settings.h:916
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:1091
static const Enabled no
Off/disabled.
Definition Settings.h:1108
bool hasValue() const
Check if the value is set.
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:1111
void reset()
Reset the node to unset state.
Enabled()=default
Default constructor.
bool ValueType
The type of the underlying value.
Definition Settings.h:1106
static const Enabled yes
On/enabled.
Definition Settings.h:1107
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:1140
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:1152
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:1120
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:1146
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:1065
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream.
Definition Settings.h:1327
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:1305
std::tuple< Settings::Diagnostics::Enabled > Descendants
Definition Settings.h:1165
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:1251
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:1312
Diagnostics()
Default constructor.
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:1277
bool operator==(const Diagnostics &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1219
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:1292
bool operator!=(const Diagnostics &other) const
Inequality operator.
Diagnostics & set(const Enabled &value)
Set Enabled.
Definition Settings.h:1283
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:1271
Set the Zivid Vision Engine to use.
Definition Settings.h:1364
std::string toString() const
Get the value as string.
bool operator==(const Engine &other) const
Comparison operator.
Definition Settings.h:1441
bool operator!=(const Engine &other) const
Comparison operator.
Definition Settings.h:1447
static const Engine omni
omni
Definition Settings.h:1403
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream.
Definition Settings.h:1453
static std::set< ValueType > validValues()
All valid values of Engine.
Definition Settings.h:1406
void reset()
Reset the node to unset state.
ValueType value() const
Get the value.
static const Engine stripe
stripe
Definition Settings.h:1402
static const Engine phase
phase
Definition Settings.h:1401
Engine()=default
Default constructor.
ValueType
The type of the underlying value.
Definition Settings.h:1396
constexpr Engine(ValueType value)
Constructor.
Definition Settings.h:1415
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:1435
Digital gain applied to blue channel.
Definition Settings.h:1536
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings.h:1621
void reset()
Reset the node to unset state.
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings.h:1585
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings.h:1615
std::string toString() const
Get the value as string.
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings.h:1597
constexpr Blue(double value)
Constructor.
Definition Settings.h:1565
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings.h:1609
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings.h:1591
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:1553
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings.h:1603
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings.h:1556
Digital gain applied to green channel.
Definition Settings.h:1648
void reset()
Reset the node to unset state.
bool operator>(const Green &other) const
Comparison operator.
Definition Settings.h:1715
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:1733
double ValueType
The type of the underlying value.
Definition Settings.h:1665
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings.h:1727
constexpr Green(double value)
Constructor.
Definition Settings.h:1677
bool operator==(const Green &other) const
Comparison operator.
Definition Settings.h:1697
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings.h:1703
std::string toString() const
Get the value as string.
bool operator<(const Green &other) const
Comparison operator.
Definition Settings.h:1709
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings.h:1668
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings.h:1721
Digital gain applied to red channel.
Definition Settings.h:1760
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings.h:1815
constexpr Red(double value)
Constructor.
Definition Settings.h:1789
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings.h:1845
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings.h:1839
double ValueType
The type of the underlying value.
Definition Settings.h:1777
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings.h:1780
bool operator==(const Red &other) const
Comparison operator.
Definition Settings.h:1809
bool operator<(const Red &other) const
Comparison operator.
Definition Settings.h:1821
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings.h:1827
bool hasValue() const
Check if the value is set.
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings.h:1833
std::string toString() const
Get the value as string.
Color balance settings.
Definition Settings.h:1518
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1929
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:2091
bool operator!=(const Balance &other) const
Inequality operator.
Balance & set(const Red &value)
Set Red.
Definition Settings.h:2036
Green & green()
Get Green.
Definition Settings.h:2011
std::string toString() const
Get the value as string.
Red & red()
Get Red.
Definition Settings.h:2030
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition Settings.h:1868
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:1965
Balance & set(const Blue &value)
Set Blue.
Definition Settings.h:1998
Blue & blue()
Get Blue.
Definition Settings.h:1992
const Red & red() const
Get Red.
Definition Settings.h:2024
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2100
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2057
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2066
Balance & set(const Green &value)
Set Green.
Definition Settings.h:2017
const Green & green() const
Get Green.
Definition Settings.h:2005
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings.h:2117
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2047
const Blue & blue() const
Get Blue.
Definition Settings.h:1986
This setting controls how the color image is computed.
Definition Settings.h:2181
static const Mode toneMapping
toneMapping
Definition Settings.h:2227
std::string toString() const
Get the value as string.
static const Mode automatic
automatic
Definition Settings.h:2225
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:2277
void reset()
Reset the node to unset state.
static const Mode useFirstAcquisition
useFirstAcquisition
Definition Settings.h:2226
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:2271
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:2265
ValueType
The type of the underlying value.
Definition Settings.h:2220
bool hasValue() const
Check if the value is set.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:2239
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:2230
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:2259
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition Settings.h:2140
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition Settings.h:2302
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:2469
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2454
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2356
std::string toString() const
Get the value as string.
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:2423
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:2447
bool operator==(const Experimental &other) const
Equality operator.
Mode & mode()
Get Mode.
Definition Settings.h:2417
const Mode & mode() const
Get Mode.
Definition Settings.h:2411
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2434
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:2390
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings.h:2492
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings.h:2579
double value() const
Get the value.
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings.h:2561
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings.h:2514
Gamma()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:2511
bool hasValue() const
Check if the value is set.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2573
constexpr Gamma(double value)
Constructor.
Definition Settings.h:2523
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2549
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings.h:2555
std::string toString() const
Get the value as string.
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings.h:2543
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2567
Color settings.
Definition Settings.h:1500
Color & set(const Gamma &value)
Set Gamma.
Definition Settings.h:2812
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:2876
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2849
bool operator==(const Color &other) const
Equality operator.
Color & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:2793
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2840
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2674
Color & set(const Experimental &value)
Set Experimental.
Definition Settings.h:2786
Color & set(const Balance &value)
Set Balance.
Definition Settings.h:2746
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings.h:2927
const Balance & balance() const
Get Balance.
Definition Settings.h:2734
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:2774
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2910
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:2858
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings.h:2760
Experimental & experimental()
Get Experimental.
Definition Settings.h:2780
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:2601
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings.h:2753
Gamma & gamma()
Get Gamma.
Definition Settings.h:2806
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:2713
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2868
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings.h:2767
const Gamma & gamma() const
Get Gamma.
Definition Settings.h:2800
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:2822
Balance & balance()
Get Balance.
Definition Settings.h:2740
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:2901
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2831
Enable or disable cluster removal.
Definition Settings.h:3008
bool ValueType
The type of the underlying value.
Definition Settings.h:3025
static const Enabled no
Off/disabled.
Definition Settings.h:3027
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3039
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3030
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3065
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3071
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3059
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:3026
Maximum normalized distance between neighboring points that are still classified as belonging to the ...
Definition Settings.h:3091
constexpr MaxNeighborDistance(double value)
Constructor.
Definition Settings.h:3125
bool operator!=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3151
double ValueType
The type of the underlying value.
Definition Settings.h:3113
bool operator>=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3175
bool operator<(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3157
static constexpr Range< double > validRange()
The range of valid values for MaxNeighborDistance.
Definition Settings.h:3116
bool operator<=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3169
friend std::ostream & operator<<(std::ostream &stream, const MaxNeighborDistance &value)
Operator to serialize the value to a stream.
Definition Settings.h:3181
bool operator==(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3145
bool operator>(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3163
Clusters with area below this threshold are removed by the filter. The area is given in mm^2.
Definition Settings.h:3210
bool operator>=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3291
double ValueType
The type of the underlying value.
Definition Settings.h:3229
friend std::ostream & operator<<(std::ostream &stream, const MinArea &value)
Operator to serialize the value to a stream.
Definition Settings.h:3297
bool operator<(const MinArea &other) const
Comparison operator.
Definition Settings.h:3273
bool operator!=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3267
bool operator<=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3285
constexpr MinArea(double value)
Constructor.
Definition Settings.h:3241
std::string toString() const
Get the value as string.
bool operator>(const MinArea &other) const
Comparison operator.
Definition Settings.h:3279
static constexpr Range< double > validRange()
The range of valid values for MinArea.
Definition Settings.h:3232
bool operator==(const MinArea &other) const
Comparison operator.
Definition Settings.h:3261
Cluster removal filter.
Definition Settings.h:2990
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:3571
const MaxNeighborDistance & maxNeighborDistance() const
Get MaxNeighborDistance.
Definition Settings.h:3457
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:3438
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3510
std::string toString() const
Get the value as string.
MinArea & minArea()
Get MinArea.
Definition Settings.h:3482
const MinArea & minArea() const
Get MinArea.
Definition Settings.h:3476
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:3320
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:3417
Removal & set(const MaxNeighborDistance &value)
Set MaxNeighborDistance.
Definition Settings.h:3469
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3520
Removal & set(const MinArea &value)
Set MinArea.
Definition Settings.h:3488
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:3545
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3499
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:3444
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3381
bool operator==(const Removal &other) const
Equality operator.
MaxNeighborDistance & maxNeighborDistance()
Get MaxNeighborDistance.
Definition Settings.h:3463
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3554
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:3450
Removes floating points and isolated clusters from the point cloud.
Definition Settings.h:2969
const Removal & removal() const
Get Removal.
Definition Settings.h:3712
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3787
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:3756
Cluster & set(const Removal::MaxNeighborDistance &value)
Set Removal::MaxNeighborDistance.
Definition Settings.h:3738
bool operator!=(const Cluster &other) const
Inequality operator.
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3777
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:3590
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:3691
Removal & removal()
Get Removal.
Definition Settings.h:3718
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3807
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:3800
Cluster & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:3731
Cluster & set(const Removal &value)
Set Removal.
Definition Settings.h:3724
Cluster & set(const Removal::MinArea &value)
Set Removal::MinArea.
Definition Settings.h:3745
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3766
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3654
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:3822
Enable or disable contrast distortion correction.
Definition Settings.h:3913
bool ValueType
The type of the underlying value.
Definition Settings.h:3932
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3937
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3946
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3978
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3966
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3972
Strength of correction. Higher values give more correction.
Definition Settings.h:3995
double ValueType
The type of the underlying value.
Definition Settings.h:4014
bool operator>(const Strength &other) const
Comparison operator.
Definition Settings.h:4064
bool operator!=(const Strength &other) const
Comparison operator.
Definition Settings.h:4052
constexpr Strength(double value)
Constructor.
Definition Settings.h:4026
static constexpr Range< double > validRange()
The range of valid values for Strength.
Definition Settings.h:4017
bool operator<=(const Strength &other) const
Comparison operator.
Definition Settings.h:4070
bool operator>=(const Strength &other) const
Comparison operator.
Definition Settings.h:4076
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream.
Definition Settings.h:4082
bool operator<(const Strength &other) const
Comparison operator.
Definition Settings.h:4058
bool operator==(const Strength &other) const
Comparison operator.
Definition Settings.h:4046
Contrast distortion correction filter.
Definition Settings.h:3891
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:4302
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4219
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:4280
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:4198
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:4265
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:4326
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4163
Correction & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4231
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4310
Correction & set(const Strength &value)
Set Strength.
Definition Settings.h:4250
const Strength & strength() const
Get Strength.
Definition Settings.h:4238
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition Settings.h:4105
Enable or disable contrast distortion removal.
Definition Settings.h:4370
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4403
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4429
bool ValueType
The type of the underlying value.
Definition Settings.h:4389
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4394
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4435
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4423
static const Enabled no
Off/disabled.
Definition Settings.h:4391
Threshold for removal. Higher values remove more points.
Definition Settings.h:4452
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4527
constexpr Threshold(double value)
Constructor.
Definition Settings.h:4483
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4509
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:4515
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:4474
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:4503
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4533
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:4521
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:4539
double ValueType
The type of the underlying value.
Definition Settings.h:4471
Contrast distortion removal filter.
Definition Settings.h:4348
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:4757
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:4562
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4620
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:4781
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:4695
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:4707
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:4655
Threshold & threshold()
Get Threshold.
Definition Settings.h:4701
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4688
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:4722
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4676
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:4736
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4765
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition Settings.h:3867
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:4981
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled.
Definition Settings.h:4948
ContrastDistortion & set(const Correction &value)
Set Correction.
Definition Settings.h:4941
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:5092
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:5116
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:4908
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:4799
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength.
Definition Settings.h:4955
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4869
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5100
ContrastDistortion & set(const Removal &value)
Set Removal.
Definition Settings.h:4974
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5071
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5043
const Removal & removal() const
Get Removal.
Definition Settings.h:4962
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5015
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5001
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5030
Removal & removal()
Get Removal.
Definition Settings.h:4968
bool operator==(const ContrastDistortion &other) const
Equality operator.
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:4988
const Correction & correction() const
Get Correction.
Definition Settings.h:4929
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5056
Correction & correction()
Get Correction.
Definition Settings.h:4935
Experimental filters. These may be renamed, moved or deleted in the future.
Definition Settings.h:3843
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5437
ContrastDistortion & contrastDistortion()
Get ContrastDistortion.
Definition Settings.h:5274
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5387
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:5247
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion.
Definition Settings.h:5280
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold.
Definition Settings.h:5322
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5207
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength.
Definition Settings.h:5301
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:5452
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5374
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:5430
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:5134
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal.
Definition Settings.h:5308
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:5333
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5345
bool operator!=(const Experimental &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5415
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled.
Definition Settings.h:5294
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion.
Definition Settings.h:5268
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:5287
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled.
Definition Settings.h:5315
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5359
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5401
Enable or disable hole repair.
Definition Settings.h:5515
static const Enabled yes
On/enabled.
Definition Settings.h:5533
static const Enabled no
Off/disabled.
Definition Settings.h:5534
bool ValueType
The type of the underlying value.
Definition Settings.h:5532
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:5572
std::string toString() const
Get the value as string.
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:5566
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:5537
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:5578
bool hasValue() const
Check if the value is set.
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:5546
Relative diameter of holes to fill. Increasing this will fill more points, but require more computati...
Definition Settings.h:5598
bool operator<(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5662
bool operator>=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5680
static constexpr Range< double > validRange()
The range of valid values for HoleSize.
Definition Settings.h:5621
friend std::ostream & operator<<(std::ostream &stream, const HoleSize &value)
Operator to serialize the value to a stream.
Definition Settings.h:5686
bool operator!=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5656
bool operator<=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5674
bool operator==(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5650
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:5630
double ValueType
The type of the underlying value.
Definition Settings.h:5618
bool operator>(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5668
Level of strictness when considering if a point should be filled. A higher level of strictness requir...
Definition Settings.h:5717
static constexpr Range< int32_t > validRange()
The range of valid values for Strictness.
Definition Settings.h:5741
bool operator>=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5800
bool operator==(const Strictness &other) const
Comparison operator.
Definition Settings.h:5770
std::string toString() const
Get the value as string.
bool operator<=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5794
bool operator>(const Strictness &other) const
Comparison operator.
Definition Settings.h:5788
int32_t ValueType
The type of the underlying value.
Definition Settings.h:5738
friend std::ostream & operator<<(std::ostream &stream, const Strictness &value)
Operator to serialize the value to a stream.
Definition Settings.h:5806
constexpr Strictness(int32_t value)
Constructor.
Definition Settings.h:5750
bool operator!=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5776
bool operator<(const Strictness &other) const
Comparison operator.
Definition Settings.h:5782
Fills in point cloud holes by interpolating remaining surrounding points.
Definition Settings.h:5494
Repair & set(const Strictness &value)
Set Strictness.
Definition Settings.h:5997
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5890
HoleSize & holeSize()
Get HoleSize.
Definition Settings.h:5972
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:6053
Repair & set(const HoleSize &value)
Set HoleSize.
Definition Settings.h:5978
bool operator==(const Repair &other) const
Equality operator.
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6018
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:5926
const Strictness & strictness() const
Get Strictness.
Definition Settings.h:5985
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6008
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:6079
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:5947
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:5953
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6028
Strictness & strictness()
Get Strictness.
Definition Settings.h:5991
bool operator!=(const Repair &other) const
Inequality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:5959
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6062
std::tuple< Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:5829
const HoleSize & holeSize() const
Get HoleSize.
Definition Settings.h:5966
Contains filters that can be used to deal with holes in the point cloud.
Definition Settings.h:5473
const Repair & repair() const
Get Repair.
Definition Settings.h:6220
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:6264
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6294
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:6098
friend std::ostream & operator<<(std::ostream &stream, const Hole &value)
Operator to send the value as string to a stream.
Definition Settings.h:6329
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6284
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:6307
Hole & set(const Repair &value)
Set Repair.
Definition Settings.h:6232
Hole & set(const Repair::Strictness &value)
Set Repair::Strictness.
Definition Settings.h:6253
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6314
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:6199
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6274
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:6226
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6162
Hole & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:6239
Hole & set(const Repair::HoleSize &value)
Set Repair::HoleSize.
Definition Settings.h:6246
Enable or disable the SNR filter.
Definition Settings.h:6390
static const Enabled yes
On/enabled.
Definition Settings.h:6408
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6447
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6441
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6412
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6421
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6453
static const Enabled no
Off/disabled.
Definition Settings.h:6409
bool ValueType
The type of the underlying value.
Definition Settings.h:6407
std::string toString() const
Get the value as string.
Discard points with signal-to-noise ratio (SNR) below the given value.
Definition Settings.h:6470
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6549
constexpr Threshold(double value)
Constructor.
Definition Settings.h:6499
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:6519
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6543
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:6490
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:6555
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:6537
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:6531
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:6487
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6525
Discard points with signal-to-noise ratio (SNR) values below a threshold.
Definition Settings.h:6370
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:6787
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6692
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:6711
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6771
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6704
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:6723
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6636
bool operator!=(const Removal &other) const
Inequality operator.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:6744
Threshold & threshold()
Get Threshold.
Definition Settings.h:6717
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:6763
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:6671
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6698
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:6734
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition Settings.h:6578
Enable or disable noise repair.
Definition Settings.h:6835
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6857
bool ValueType
The type of the underlying value.
Definition Settings.h:6852
static const Enabled no
Off/disabled.
Definition Settings.h:6854
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6892
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6866
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:6853
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6898
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6886
Get better surface coverage by repairing regions of missing data due to noisy points....
Definition Settings.h:6812
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:7056
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:7063
bool operator==(const Repair &other) const
Equality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7032
std::tuple< Settings::Processing::Filters::Noise::Repair::Enabled > Descendants
Definition Settings.h:6911
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7026
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7020
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:6999
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7043
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:7078
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6965
Enable or disable noise suppression.
Definition Settings.h:7125
static const Enabled no
Off/disabled.
Definition Settings.h:7144
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7156
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7182
bool ValueType
The type of the underlying value.
Definition Settings.h:7142
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7143
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7147
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7188
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7176
Reduce noise and outliers in the point cloud. This filter can also be used to reduce ripple effects c...
Definition Settings.h:7102
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7333
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:7346
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7316
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7310
std::string toString() const
Get the value as string.
std::tuple< Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7201
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:7289
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7255
friend std::ostream & operator<<(std::ostream &stream, const Suppression &value)
Operator to send the value as string to a stream.
Definition Settings.h:7368
bool operator!=(const Suppression &other) const
Inequality operator.
Suppression & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7322
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7353
bool operator==(const Suppression &other) const
Equality operator.
Contains filters that can be used to clean up a noisy point cloud.
Definition Settings.h:6350
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:7693
Noise & set(const Suppression &value)
Set Suppression.
Definition Settings.h:7590
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:7658
Suppression & suppression()
Get Suppression.
Definition Settings.h:7584
Removal & removal()
Get Removal.
Definition Settings.h:7525
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7668
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:7545
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:7498
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7702
const Suppression & suppression() const
Get Suppression.
Definition Settings.h:7578
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:7628
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:7385
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:7538
const Repair & repair() const
Get Repair.
Definition Settings.h:7552
Noise & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:7571
Noise & set(const Repair &value)
Set Repair.
Definition Settings.h:7564
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7458
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:7719
Repair & repair()
Get Repair.
Definition Settings.h:7558
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:7638
const Removal & removal() const
Get Removal.
Definition Settings.h:7519
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:7618
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7648
bool operator==(const Noise &other) const
Equality operator.
Noise & set(const Suppression::Enabled &value)
Set Suppression::Enabled.
Definition Settings.h:7597
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:7608
Noise & set(const Removal &value)
Set Removal.
Definition Settings.h:7531
Enable or disable the outlier filter.
Definition Settings.h:7782
bool ValueType
The type of the underlying value.
Definition Settings.h:7799
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7839
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7813
static const Enabled no
Off/disabled.
Definition Settings.h:7801
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7800
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7845
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7804
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7833
Discard point if Euclidean distance to neighboring points is above the given value.
Definition Settings.h:7862
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:7882
constexpr Threshold(double value)
Constructor.
Definition Settings.h:7891
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:7923
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:7911
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7941
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7917
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:7947
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7935
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:7929
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:7879
Discard point if Euclidean distance to neighboring points is above a threshold.
Definition Settings.h:7762
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:8179
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8084
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:8063
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8096
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8090
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:8115
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:7970
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8126
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8136
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:8103
Threshold & threshold()
Get Threshold.
Definition Settings.h:8109
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:8155
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8028
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8163
Contains a filter that removes points with large Euclidean distance to neighboring points.
Definition Settings.h:7742
const Removal & removal() const
Get Removal.
Definition Settings.h:8315
Outlier & set(const Removal &value)
Set Removal.
Definition Settings.h:8327
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8392
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:8385
bool operator!=(const Outlier &other) const
Inequality operator.
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:8341
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:8334
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8197
Removal & removal()
Get Removal.
Definition Settings.h:8321
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:8294
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream.
Definition Settings.h:8407
bool operator==(const Outlier &other) const
Equality operator.
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8372
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:8352
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8362
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8258
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition Settings.h:8468
bool ValueType
The type of the underlying value.
Definition Settings.h:8485
static const Enabled yes
On/enabled.
Definition Settings.h:8486
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8525
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8499
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:8531
static const Enabled no
Off/disabled.
Definition Settings.h:8487
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8519
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8490
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition Settings.h:8555
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8597
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8588
ValueType
The type of the underlying value.
Definition Settings.h:8580
static const Mode local
local
Definition Settings.h:8585
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8629
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8635
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8623
std::string toString() const
Get the value as string.
static const Mode global
global
Definition Settings.h:8584
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8617
Discard points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8448
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8780
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:8869
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:8816
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8718
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8660
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:8845
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:8753
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8786
Mode & mode()
Get Mode.
Definition Settings.h:8799
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8853
const Mode & mode() const
Get Mode.
Definition Settings.h:8793
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8774
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Mode &value)
Set Mode.
Definition Settings.h:8805
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:8826
Contains a filter that removes points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8428
bool operator!=(const Reflection &other) const
Inequality operator.
bool operator==(const Reflection &other) const
Equality operator.
Removal & removal()
Get Removal.
Definition Settings.h:9011
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8948
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9097
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9082
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:9075
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9024
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9052
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8887
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Mode &value)
Set Removal::Mode.
Definition Settings.h:9031
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9062
const Removal & removal() const
Get Removal.
Definition Settings.h:9005
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9042
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9017
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:8984
Enable or disable the smoothing filter.
Definition Settings.h:9156
bool ValueType
The type of the underlying value.
Definition Settings.h:9173
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9178
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9213
static const Enabled yes
On/enabled.
Definition Settings.h:9174
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9207
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9219
static const Enabled no
Off/disabled.
Definition Settings.h:9175
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9187
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:9236
double ValueType
The type of the underlying value.
Definition Settings.h:9253
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9291
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9303
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9265
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9256
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9321
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9315
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9285
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9309
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9297
Gaussian smoothing of the point cloud.
Definition Settings.h:9136
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9464
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:9529
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9510
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9470
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9344
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9553
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9477
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9458
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:9500
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:9437
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9489
Sigma & sigma()
Get Sigma.
Definition Settings.h:9483
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9402
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9537
Smoothing filters.
Definition Settings.h:9118
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:9668
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9632
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9571
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9701
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:9736
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9766
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:9715
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:9708
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9689
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:9726
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:9759
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9746
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:9781
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9695
Filter settings.
Definition Settings.h:2950
bool operator!=(const Filters &other) const
Inequality operator.
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:10688
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10351
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:10848
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10067
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10698
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:10034
Filters & set(const Hole &value)
Set Hole.
Definition Settings.h:10182
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10544
Filters & set(const Hole::Repair::HoleSize &value)
Set Hole::Repair::HoleSize.
Definition Settings.h:10203
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10257
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:10592
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10659
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10088
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10620
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:10553
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10669
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:10756
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10264
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10418
Cluster & cluster()
Get Cluster.
Definition Settings.h:10061
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:10727
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:10572
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10717
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10318
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10142
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10114
Outlier & outlier()
Get Outlier.
Definition Settings.h:10291
Filters & set(const Reflection::Removal::Mode &value)
Set Reflection::Removal::Mode.
Definition Settings.h:10358
Filters & set(const Hole::Repair::Enabled &value)
Set Hole::Repair::Enabled.
Definition Settings.h:10196
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10271
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10304
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10055
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10102
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10121
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:10869
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10081
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:10737
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10678
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10467
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:10786
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9964
Filters & set(const Hole::Repair &value)
Set Hole::Repair.
Definition Settings.h:10189
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10325
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10457
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10250
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10776
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10337
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10506
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10149
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:10835
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10428
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10297
const Noise & noise() const
Get Noise.
Definition Settings.h:10217
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10128
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:10562
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10492
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10344
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10610
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10243
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:10747
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10391
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10601
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10649
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10163
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10384
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Hole::Repair::Strictness &value)
Set Hole::Repair::Strictness.
Definition Settings.h:10210
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10311
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10074
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:10582
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10531
const Hole & hole() const
Get Hole.
Definition Settings.h:10170
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:9798
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10095
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10518
Noise & noise()
Get Noise.
Definition Settings.h:10223
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10377
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10135
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10438
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10236
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10408
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10708
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10630
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10371
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10448
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10278
Hole & hole()
Get Hole.
Definition Settings.h:10176
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:10766
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10156
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10285
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10639
Reflection & reflection()
Get Reflection.
Definition Settings.h:10331
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10229
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10398
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10365
Experimental & experimental()
Get Experimental.
Definition Settings.h:10108
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10478
Setting for upsampling or downsampling the point cloud data by some factor. This operation is perform...
Definition Settings.h:10940
void reset()
Reset the node to unset state.
static const Mode upsample2x2
upsample2x2
Definition Settings.h:10990
static const Mode downsample4x4
downsample4x4
Definition Settings.h:10989
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:11045
static const Mode upsample4x4
upsample4x4
Definition Settings.h:10991
static const Mode downsample2x2
downsample2x2
Definition Settings.h:10988
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:11039
ValueType
The type of the underlying value.
Definition Settings.h:10980
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:11033
bool hasValue() const
Check if the value is set.
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:10994
std::string toString() const
Get the value as string.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:11007
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:11027
static const Mode disabled
disabled
Definition Settings.h:10987
ValueType value() const
Get the value.
Settings for changing the output resolution of the point cloud.
Definition Settings.h:10897
Resampling & set(const Mode &value)
Set Mode.
Definition Settings.h:11191
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11125
const Mode & mode() const
Get Mode.
Definition Settings.h:11179
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:11214
Mode & mode()
Get Mode.
Definition Settings.h:11185
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:11236
std::tuple< Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11071
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:11201
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:11158
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11221
Settings related to processing of a capture, including filters and color balance.
Definition Settings.h:1480
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:11986
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:12166
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:12114
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:12176
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12356
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12327
Resampling & resampling()
Get Resampling.
Definition Settings.h:11911
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11599
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11564
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11660
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12242
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:11968
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11571
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:11884
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:11532
Filters & filters()
Get Filters.
Definition Settings.h:11626
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:11891
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12261
Processing & set(const Resampling &value)
Set Resampling.
Definition Settings.h:11917
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:11994
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11709
Processing & set(const Resampling::Mode &value)
Set Resampling::Mode.
Definition Settings.h:11924
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:11253
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12346
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11723
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:11959
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:11828
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11716
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11653
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12443
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12251
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12125
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12317
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12223
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:12156
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12376
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12213
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11578
Color & color()
Get Color.
Definition Settings.h:11558
Processing & set(const Filters::Hole::Repair::Strictness &value)
Set Filters::Hole::Repair::Strictness.
Definition Settings.h:11758
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12366
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:11849
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11765
Processing & set(const Filters::Hole &value)
Set Filters::Hole.
Definition Settings.h:11730
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11639
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12269
const Settings::Processing::Filters & get() const
Definition Settings.h:12002
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11702
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11779
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:11877
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:11941
const Filters & filters() const
Get Filters.
Definition Settings.h:11620
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11646
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:12186
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12426
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:12049
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:11898
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:11807
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11772
Processing & set(const Filters::Reflection::Removal::Mode &value)
Set Filters::Reflection::Removal::Mode.
Definition Settings.h:11870
Processing & set(const Filters::Hole::Repair::Enabled &value)
Set Filters::Hole::Repair::Enabled.
Definition Settings.h:11744
const Settings::Processing::Resampling & get() const
Definition Settings.h:12384
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:11835
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:11786
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:11950
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11667
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11674
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12203
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:11842
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11585
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:11977
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:12103
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:11821
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:11800
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:12337
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:12090
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11606
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:11863
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11695
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:12029
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12298
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:11856
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:12039
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11688
const Settings::Processing::Color & get() const
Definition Settings.h:11933
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11552
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11681
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:11814
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:12019
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12307
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12288
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11632
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:12392
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11592
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12194
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:12058
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12232
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11613
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11452
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12138
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:12010
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:12078
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:11793
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:12068
const Resampling & resampling() const
Get Resampling.
Definition Settings.h:11905
Processing & set(const Filters::Hole::Repair::HoleSize &value)
Set Filters::Hole::Repair::HoleSize.
Definition Settings.h:11751
Processing & set(const Filters::Hole::Repair &value)
Set Filters::Hole::Repair.
Definition Settings.h:11737
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:12417
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12278
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:12147
Enable or disable box filter.
Definition Settings.h:12536
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12567
bool ValueType
The type of the underlying value.
Definition Settings.h:12553
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12587
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12558
static const Enabled yes
On/enabled.
Definition Settings.h:12554
static const Enabled no
Off/disabled.
Definition Settings.h:12555
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:12599
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12593
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12616
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12664
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12639
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12659
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:12676
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12670
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12693
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12736
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12747
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12741
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:12753
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12716
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:12770
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:12818
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:12830
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:12813
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12793
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:12824
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:12847
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:12890
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:12901
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12870
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:12895
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:12907
Removes points outside the given three-dimensional box.
Definition Settings.h:12501
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:12920
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:13095
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:13024
const PointO & pointO() const
Get PointO.
Definition Settings.h:13121
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:13133
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13051
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13045
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:13076
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13143
PointA & pointA()
Get PointA.
Definition Settings.h:13089
PointB & pointB()
Get PointB.
Definition Settings.h:13108
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:13114
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13179
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13161
const Extents & extents() const
Get Extents.
Definition Settings.h:13064
const PointA & pointA() const
Get PointA.
Definition Settings.h:13083
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:12987
PointO & pointO()
Get PointO.
Definition Settings.h:13127
Extents & extents()
Get Extents.
Definition Settings.h:13070
const PointB & pointB() const
Get PointB.
Definition Settings.h:13102
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:13216
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13246
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:13170
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13227
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13152
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13057
Enable or disable depth filter.
Definition Settings.h:13295
static const Enabled yes
On/enabled.
Definition Settings.h:13313
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:13346
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13352
bool ValueType
The type of the underlying value.
Definition Settings.h:13312
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13358
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13317
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13314
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13326
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13375
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13418
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13398
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:13435
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13423
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13429
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:13273
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13572
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13579
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13591
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13560
bool operator==(const Depth &other) const
Equality operator.
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13448
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13637
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13601
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:13629
Range & range()
Get Range.
Definition Settings.h:13585
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13653
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13505
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13566
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13610
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:13539
Removes points outside the region of interest.
Definition Settings.h:12467
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13958
Depth & depth()
Get Depth.
Definition Settings.h:13870
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:13883
const Box & box() const
Get Box.
Definition Settings.h:13810
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:13822
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:14010
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:13857
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13941
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13925
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:13949
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13917
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:13671
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13967
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:13933
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13750
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:13790
Box & box()
Get Box.
Definition Settings.h:13816
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:13899
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:13986
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:13843
const Depth & depth() const
Get Depth.
Definition Settings.h:13864
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:13836
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13994
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:13829
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:13890
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:13876
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:13850
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13908
RegionOfInterest()
Default constructor.
Choose how to sample colors for the pointcloud. The rgb option gives all colors for a regular Zivid c...
Definition Settings.h:14056
ValueType
The type of the underlying value.
Definition Settings.h:14078
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:14086
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:14133
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:14095
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:14127
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:14083
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:14121
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14115
static const Color rgb
rgb
Definition Settings.h:14082
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:14168
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:14208
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14205
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14221
static const Pixel all
all
Definition Settings.h:14201
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14202
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14253
ValueType
The type of the underlying value.
Definition Settings.h:14194
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14203
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14247
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14204
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:14241
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14259
std::string toString() const
Get the value as string.
Sampling settings.
Definition Settings.h:14033
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14284
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14340
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14399
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:14373
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14412
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14484
Pixel & pixel()
Get Pixel.
Definition Settings.h:14418
const Settings::Sampling::Color & get() const
Definition Settings.h:14433
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:14460
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14441
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:14468
const Color & color() const
Get Color.
Definition Settings.h:14393
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14405
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14424
Settings used when capturing with a Zivid camera.
Definition Settings.h:79
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:15954
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:15792
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14664
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:15048
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:15773
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15347
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:15663
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15457
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:15097
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15481
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:14999
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15258
const Settings::RegionOfInterest & get() const
Definition Settings.h:15898
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15708
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:14855
const Processing & processing() const
Get Processing.
Definition Settings.h:14938
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15506
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15623
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:14950
const Settings::Sampling::Pixel & get() const
Definition Settings.h:15988
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15646
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15394
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled.
Definition Settings.h:15216
Settings & set(const Processing::Filters::Hole::Repair::Enabled &value)
Set Processing::Filters::Hole::Repair::Enabled.
Definition Settings.h:15125
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15551
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:15655
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:15104
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15265
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15401
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:14905
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15634
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15368
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:15146
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15382
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15561
const Settings::Acquisitions & get() const
Definition Settings.h:15415
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15569
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:15755
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:15782
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:15020
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:15876
const Settings::Diagnostics & get() const
Definition Settings.h:15421
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15306
const Settings::Processing::Resampling & get() const
Definition Settings.h:15884
Settings & set(const Processing::Filters::Hole &value)
Set Processing::Filters::Hole.
Definition Settings.h:15111
Settings & set(const Processing::Filters::Reflection::Removal::Mode &value)
Set Processing::Filters::Reflection::Removal::Mode.
Definition Settings.h:15251
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:15866
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:15906
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:14964
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:15946
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15361
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:15718
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:15962
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:15691
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15589
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:16031
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15473
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:15922
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15272
const Settings::Processing & get() const
Definition Settings.h:15441
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15230
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:16043
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15579
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15223
Settings & set(const Processing::Filters::Hole::Repair::HoleSize &value)
Set Processing::Filters::Hole::Repair::HoleSize.
Definition Settings.h:15132
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:15914
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15498
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:15083
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15326
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:15681
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15612
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15333
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15465
Settings & set(const Processing::Resampling::Mode &value)
Set Processing::Resampling::Mode.
Definition Settings.h:15293
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:15672
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:14874
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14757
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:15810
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:15055
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:15847
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:14502
const Settings::Processing::Filters & get() const
Definition Settings.h:15514
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:14992
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const Engine &value)
Set Engine.
Definition Settings.h:14931
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15375
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15489
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:15737
Settings & set(const Processing::Resampling &value)
Set Processing::Resampling.
Definition Settings.h:15286
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:15090
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:15930
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:14957
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15202
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:14880
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15237
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:15765
const Settings::Engine & get() const
Definition Settings.h:15435
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15522
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:15746
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:14985
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15354
const Settings::Sampling::Color & get() const
Definition Settings.h:15982
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:15027
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15319
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15188
const Engine & engine() const
Get Engine.
Definition Settings.h:14919
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:14899
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:15728
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15541
Sampling & sampling()
Get Sampling.
Definition Settings.h:15388
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15244
Processing & processing()
Get Processing.
Definition Settings.h:14944
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15340
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:14912
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15699
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15429
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15531
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:15839
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15600
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:15938
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:15062
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15408
Settings & set(const Processing::Filters::Hole::Repair::Strictness &value)
Set Processing::Filters::Hole::Repair::Strictness.
Definition Settings.h:15139
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:15006
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:15034
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:15970
const Settings::Sampling & get() const
Definition Settings.h:15976
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15167
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:15076
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:14886
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15279
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:14893
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:15153
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15174
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:15041
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15209
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15312
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:15160
Engine & engine()
Get Engine.
Definition Settings.h:14925
Settings & set(const Processing::Filters::Hole::Repair &value)
Set Processing::Filters::Hole::Repair.
Definition Settings.h:15118
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:15069
const Settings::Processing::Color & get() const
Definition Settings.h:15449
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15181
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:15829
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15195
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:15819
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:14978
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:15013
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15300
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:15892
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:15802
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:14971
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:15856
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:16063
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:54
Point with three coordinates as float.
Definition Point.h:60