Zivid C++ API 2.11.1+de9b5dae-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{ 22 };
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 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
1345
1346 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1348 {
1349 public:
1351 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1352
1354 static constexpr const char *path{ "Experimental" };
1355
1357 static constexpr const char *name{ "Experimental" };
1358
1360 static constexpr const char *description{
1361 R"description(Experimental features. These settings may be changed, renamed, moved or deleted in the future.)description"
1362 };
1363
1384
1385 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1387 {
1388 public:
1390 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1391
1393 static constexpr const char *path{ "Experimental/Engine" };
1394
1396 static constexpr const char *name{ "Engine" };
1397
1399 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1400
1401The Phase Engine is the fastest choice in terms of both acquisition time and total capture
1402time, and is a good compromise between quality and speed. The Phase Engine is recommended for
1403objects that are diffuse, opaque, and slightly specular, and is suitable for applications in
1404logistics such as parcel induction.
1405
1406The Stripe Engine is built for exceptional point cloud quality in scenes with highly specular
1407reflective objects. This makes the engine suitable for applications such as factory automation,
1408manufacturing, and bin picking. Additional acquisition and processing time are required for
1409the Stripe Engine.
1410
1411The Omni Engine is built for exceptional point cloud quality on all scenes, including scenes
1412with extremely specular reflective objects, as well as transparent objects. This makes the Omni
1413Engine suitable for applications such as piece picking. Same as for the Stripe Engine, it trades
1414off speed for quality. The Omni Engine is only available for Zivid 2+.
1415
1416The Stripe and Omni engines are currently experimental, and may be changed and improved
1417in the future.
1418)description" };
1419
1421 enum class ValueType
1422 {
1423 phase,
1424 stripe,
1425 omni
1426 };
1427 static const Engine phase;
1428 static const Engine stripe;
1429 static const Engine omni;
1430
1432 static std::set<ValueType> validValues()
1433 {
1434 return { ValueType::phase, ValueType::stripe, ValueType::omni };
1435 }
1436
1438 Engine() = default;
1439
1441 explicit constexpr Engine(ValueType value)
1442 : m_opt{ verifyValue(value) }
1443 {}
1444
1450
1452 bool hasValue() const;
1453
1455 void reset();
1456
1458 std::string toString() const;
1459
1461 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1462 {
1463 return stream << Engine{ value }.toString();
1464 }
1465
1467 bool operator==(const Engine &other) const
1468 {
1469 return m_opt == other.m_opt;
1470 }
1471
1473 bool operator!=(const Engine &other) const
1474 {
1475 return m_opt != other.m_opt;
1476 }
1477
1479 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1480 {
1481 return stream << value.toString();
1482 }
1483
1484 private:
1485 void setFromString(const std::string &value);
1486
1487 constexpr ValueType static verifyValue(const ValueType &value)
1488 {
1489 return value == ValueType::phase || value == ValueType::stripe || value == ValueType::omni
1490 ? value
1491 : throw std::invalid_argument{
1492 "Invalid value: Engine{ "
1493 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1494 };
1495 }
1496
1497 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1498
1499 friend struct DataModel::Detail::Befriend<Engine>;
1500 };
1501
1502 using Descendants = std::tuple<Settings::Experimental::Engine>;
1503
1506
1518#ifndef NO_DOC
1519 template<
1520 typename... Args,
1521 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1522 typename std::enable_if<
1523 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1524 value,
1525 int>::type = 0>
1526#else
1527 template<typename... Args>
1528#endif
1529 explicit Experimental(Args &&...args)
1530 {
1531 using namespace Zivid::Detail::TypeTraits;
1532
1533 static_assert(
1534 AllArgsDecayedAreUnique<Args...>::value,
1535 "Found duplicate types among the arguments passed to Experimental(...). "
1536 "Types should be listed at most once.");
1537
1538 set(std::forward<Args>(args)...);
1539 }
1540
1551#ifndef NO_DOC
1552 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1553#else
1554 template<typename... Args>
1555#endif
1556 void set(Args &&...args)
1557 {
1558 using namespace Zivid::Detail::TypeTraits;
1559
1560 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1561 static_assert(
1562 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1563
1564 static_assert(
1565 AllArgsDecayedAreUnique<Args...>::value,
1566 "Found duplicate types among the arguments passed to set(...). "
1567 "Types should be listed at most once.");
1568
1569 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1570 }
1571
1583#ifndef NO_DOC
1584 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1585#else
1586 template<typename... Args>
1587#endif
1588 Experimental copyWith(Args &&...args) const
1589 {
1590 using namespace Zivid::Detail::TypeTraits;
1591
1592 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1593 static_assert(
1594 AllArgsAreDescendantNodes::value,
1595 "All arguments passed to copyWith(...) must be descendant nodes.");
1596
1597 static_assert(
1598 AllArgsDecayedAreUnique<Args...>::value,
1599 "Found duplicate types among the arguments passed to copyWith(...). "
1600 "Types should be listed at most once.");
1601
1602 auto copy{ *this };
1603 copy.set(std::forward<Args>(args)...);
1604 return copy;
1605 }
1606
1608 const Engine &engine() const
1609 {
1610 return m_engine;
1611 }
1612
1615 {
1616 return m_engine;
1617 }
1618
1620 Experimental &set(const Engine &value)
1621 {
1622 m_engine = value;
1623 return *this;
1624 }
1625
1626 template<
1627 typename T,
1628 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
1630 {
1631 return m_engine;
1632 }
1633
1634 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1636 {
1637 return m_engine;
1638 }
1639
1641 template<typename F>
1642 void forEach(const F &f) const
1643 {
1644 f(m_engine);
1645 }
1646
1648 template<typename F>
1649 void forEach(const F &f)
1650 {
1651 f(m_engine);
1652 }
1653
1655 bool operator==(const Experimental &other) const;
1656
1658 bool operator!=(const Experimental &other) const;
1659
1661 std::string toString() const;
1662
1664 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
1665 {
1666 return stream << value.toString();
1667 }
1668
1669 private:
1670 void setFromString(const std::string &value);
1671
1672 void setFromString(const std::string &fullPath, const std::string &value);
1673
1674 std::string getString(const std::string &fullPath) const;
1675
1676 Engine m_engine;
1677
1678 friend struct DataModel::Detail::Befriend<Experimental>;
1679 };
1680
1682
1683 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1685 {
1686 public:
1688 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1689
1691 static constexpr const char *path{ "Processing" };
1692
1694 static constexpr const char *name{ "Processing" };
1695
1697 static constexpr const char *description{
1698 R"description(Settings related to processing of a capture, including filters and color balance)description"
1699 };
1700
1702
1703 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1705 {
1706 public:
1708 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1709
1711 static constexpr const char *path{ "Processing/Color" };
1712
1714 static constexpr const char *name{ "Color" };
1715
1717 static constexpr const char *description{ R"description(Color settings)description" };
1718
1720
1721 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1723 {
1724 public:
1726 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1727
1729 static constexpr const char *path{ "Processing/Color/Balance" };
1730
1732 static constexpr const char *name{ "Balance" };
1733
1735 static constexpr const char *description{ R"description(Color balance settings)description" };
1736
1738
1739 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1741 {
1742 public:
1744 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1745
1747 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1748
1750 static constexpr const char *name{ "Blue" };
1751
1753 static constexpr const char *description{
1754 R"description(Digital gain applied to blue channel)description"
1755 };
1756
1758 using ValueType = double;
1759
1761 static constexpr Range<double> validRange()
1762 {
1763 return { 1.0, 8.0 };
1764 }
1765
1767 Blue() = default;
1768
1770 explicit constexpr Blue(double value)
1771 : m_opt{ verifyValue(value) }
1772 {}
1773
1778 double value() const;
1779
1781 bool hasValue() const;
1782
1784 void reset();
1785
1787 std::string toString() const;
1788
1790 bool operator==(const Blue &other) const
1791 {
1792 return m_opt == other.m_opt;
1793 }
1794
1796 bool operator!=(const Blue &other) const
1797 {
1798 return m_opt != other.m_opt;
1799 }
1800
1802 bool operator<(const Blue &other) const
1803 {
1804 return m_opt < other.m_opt;
1805 }
1806
1808 bool operator>(const Blue &other) const
1809 {
1810 return m_opt > other.m_opt;
1811 }
1812
1814 bool operator<=(const Blue &other) const
1815 {
1816 return m_opt <= other.m_opt;
1817 }
1818
1820 bool operator>=(const Blue &other) const
1821 {
1822 return m_opt >= other.m_opt;
1823 }
1824
1826 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1827 {
1828 return stream << value.toString();
1829 }
1830
1831 private:
1832 void setFromString(const std::string &value);
1833
1834 constexpr ValueType static verifyValue(const ValueType &value)
1835 {
1836 return validRange().isInRange(value)
1837 ? value
1838 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1839 + " } is not in range ["
1840 + std::to_string(validRange().min()) + ", "
1841 + std::to_string(validRange().max()) + "]" };
1842 }
1843
1844 Zivid::DataModel::Detail::Optional<double> m_opt;
1845
1846 friend struct DataModel::Detail::Befriend<Blue>;
1847 };
1848
1850
1851 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1853 {
1854 public:
1856 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1857
1859 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1860
1862 static constexpr const char *name{ "Green" };
1863
1865 static constexpr const char *description{
1866 R"description(Digital gain applied to green channel)description"
1867 };
1868
1870 using ValueType = double;
1871
1873 static constexpr Range<double> validRange()
1874 {
1875 return { 1.0, 8.0 };
1876 }
1877
1879 Green() = default;
1880
1882 explicit constexpr Green(double value)
1883 : m_opt{ verifyValue(value) }
1884 {}
1885
1890 double value() const;
1891
1893 bool hasValue() const;
1894
1896 void reset();
1897
1899 std::string toString() const;
1900
1902 bool operator==(const Green &other) const
1903 {
1904 return m_opt == other.m_opt;
1905 }
1906
1908 bool operator!=(const Green &other) const
1909 {
1910 return m_opt != other.m_opt;
1911 }
1912
1914 bool operator<(const Green &other) const
1915 {
1916 return m_opt < other.m_opt;
1917 }
1918
1920 bool operator>(const Green &other) const
1921 {
1922 return m_opt > other.m_opt;
1923 }
1924
1926 bool operator<=(const Green &other) const
1927 {
1928 return m_opt <= other.m_opt;
1929 }
1930
1932 bool operator>=(const Green &other) const
1933 {
1934 return m_opt >= other.m_opt;
1935 }
1936
1938 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1939 {
1940 return stream << value.toString();
1941 }
1942
1943 private:
1944 void setFromString(const std::string &value);
1945
1946 constexpr ValueType static verifyValue(const ValueType &value)
1947 {
1948 return validRange().isInRange(value)
1949 ? value
1950 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1951 + " } is not in range ["
1952 + std::to_string(validRange().min()) + ", "
1953 + std::to_string(validRange().max()) + "]" };
1954 }
1955
1956 Zivid::DataModel::Detail::Optional<double> m_opt;
1957
1958 friend struct DataModel::Detail::Befriend<Green>;
1959 };
1960
1962
1963 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1965 {
1966 public:
1968 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1969
1971 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1972
1974 static constexpr const char *name{ "Red" };
1975
1977 static constexpr const char *description{
1978 R"description(Digital gain applied to red channel)description"
1979 };
1980
1982 using ValueType = double;
1983
1985 static constexpr Range<double> validRange()
1986 {
1987 return { 1.0, 8.0 };
1988 }
1989
1991 Red() = default;
1992
1994 explicit constexpr Red(double value)
1995 : m_opt{ verifyValue(value) }
1996 {}
1997
2002 double value() const;
2003
2005 bool hasValue() const;
2006
2008 void reset();
2009
2011 std::string toString() const;
2012
2014 bool operator==(const Red &other) const
2015 {
2016 return m_opt == other.m_opt;
2017 }
2018
2020 bool operator!=(const Red &other) const
2021 {
2022 return m_opt != other.m_opt;
2023 }
2024
2026 bool operator<(const Red &other) const
2027 {
2028 return m_opt < other.m_opt;
2029 }
2030
2032 bool operator>(const Red &other) const
2033 {
2034 return m_opt > other.m_opt;
2035 }
2036
2038 bool operator<=(const Red &other) const
2039 {
2040 return m_opt <= other.m_opt;
2041 }
2042
2044 bool operator>=(const Red &other) const
2045 {
2046 return m_opt >= other.m_opt;
2047 }
2048
2050 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
2051 {
2052 return stream << value.toString();
2053 }
2054
2055 private:
2056 void setFromString(const std::string &value);
2057
2058 constexpr ValueType static verifyValue(const ValueType &value)
2059 {
2060 return validRange().isInRange(value)
2061 ? value
2062 : throw std::out_of_range{ "Red{ " + std::to_string(value)
2063 + " } is not in range ["
2064 + std::to_string(validRange().min()) + ", "
2065 + std::to_string(validRange().max()) + "]" };
2066 }
2067
2068 Zivid::DataModel::Detail::Optional<double> m_opt;
2069
2070 friend struct DataModel::Detail::Befriend<Red>;
2071 };
2072
2073 using Descendants = std::tuple<
2077
2080
2094#ifndef NO_DOC
2095 template<
2096 typename... Args,
2097 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2098 typename std::enable_if<
2099 Zivid::Detail::TypeTraits::
2100 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2101 int>::type = 0>
2102#else
2103 template<typename... Args>
2104#endif
2105 explicit Balance(Args &&...args)
2106 {
2107 using namespace Zivid::Detail::TypeTraits;
2108
2109 static_assert(
2110 AllArgsDecayedAreUnique<Args...>::value,
2111 "Found duplicate types among the arguments passed to Balance(...). "
2112 "Types should be listed at most once.");
2113
2114 set(std::forward<Args>(args)...);
2115 }
2116
2129#ifndef NO_DOC
2130 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2131#else
2132 template<typename... Args>
2133#endif
2134 void set(Args &&...args)
2135 {
2136 using namespace Zivid::Detail::TypeTraits;
2137
2138 using AllArgsAreDescendantNodes =
2139 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2140 static_assert(
2141 AllArgsAreDescendantNodes::value,
2142 "All arguments passed to set(...) must be descendant nodes.");
2143
2144 static_assert(
2145 AllArgsDecayedAreUnique<Args...>::value,
2146 "Found duplicate types among the arguments passed to set(...). "
2147 "Types should be listed at most once.");
2148
2149 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2150 }
2151
2165#ifndef NO_DOC
2166 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2167#else
2168 template<typename... Args>
2169#endif
2170 Balance copyWith(Args &&...args) const
2171 {
2172 using namespace Zivid::Detail::TypeTraits;
2173
2174 using AllArgsAreDescendantNodes =
2175 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2176 static_assert(
2177 AllArgsAreDescendantNodes::value,
2178 "All arguments passed to copyWith(...) must be descendant nodes.");
2179
2180 static_assert(
2181 AllArgsDecayedAreUnique<Args...>::value,
2182 "Found duplicate types among the arguments passed to copyWith(...). "
2183 "Types should be listed at most once.");
2184
2185 auto copy{ *this };
2186 copy.set(std::forward<Args>(args)...);
2187 return copy;
2188 }
2189
2191 const Blue &blue() const
2192 {
2193 return m_blue;
2194 }
2195
2198 {
2199 return m_blue;
2200 }
2201
2203 Balance &set(const Blue &value)
2204 {
2205 m_blue = value;
2206 return *this;
2207 }
2208
2210 const Green &green() const
2211 {
2212 return m_green;
2213 }
2214
2217 {
2218 return m_green;
2219 }
2220
2222 Balance &set(const Green &value)
2223 {
2224 m_green = value;
2225 return *this;
2226 }
2227
2229 const Red &red() const
2230 {
2231 return m_red;
2232 }
2233
2236 {
2237 return m_red;
2238 }
2239
2241 Balance &set(const Red &value)
2242 {
2243 m_red = value;
2244 return *this;
2245 }
2246
2247 template<
2248 typename T,
2249 typename std::enable_if<
2250 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2251 int>::type = 0>
2253 {
2254 return m_blue;
2255 }
2256
2257 template<
2258 typename T,
2259 typename std::enable_if<
2260 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2261 int>::type = 0>
2263 {
2264 return m_green;
2265 }
2266
2267 template<
2268 typename T,
2269 typename std::
2270 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2272 {
2273 return m_red;
2274 }
2275
2276 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2278 {
2279 return m_blue;
2280 }
2281
2282 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2284 {
2285 return m_green;
2286 }
2287
2288 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2290 {
2291 return m_red;
2292 }
2293
2295 template<typename F>
2296 void forEach(const F &f) const
2297 {
2298 f(m_blue);
2299 f(m_green);
2300 f(m_red);
2301 }
2302
2304 template<typename F>
2305 void forEach(const F &f)
2306 {
2307 f(m_blue);
2308 f(m_green);
2309 f(m_red);
2310 }
2311
2313 bool operator==(const Balance &other) const;
2314
2316 bool operator!=(const Balance &other) const;
2317
2319 std::string toString() const;
2320
2322 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2323 {
2324 return stream << value.toString();
2325 }
2326
2327 private:
2328 void setFromString(const std::string &value);
2329
2330 void setFromString(const std::string &fullPath, const std::string &value);
2331
2332 std::string getString(const std::string &fullPath) const;
2333
2334 Blue m_blue;
2335 Green m_green;
2336 Red m_red;
2337
2338 friend struct DataModel::Detail::Befriend<Balance>;
2339 };
2340
2342
2343 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2345 {
2346 public:
2348 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2349
2351 static constexpr const char *path{ "Processing/Color/Experimental" };
2352
2354 static constexpr const char *name{ "Experimental" };
2355
2357 static constexpr const char *description{
2358 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2359 };
2360
2383
2384 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2386 {
2387 public:
2389 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2390
2392 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2393
2395 static constexpr const char *name{ "Mode" };
2396
2398 static constexpr const char *description{
2399 R"description(This setting controls how the color image is computed.
2400
2401`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2402single-acquisition captures and multi-acquisition captures when all the acquisitions have
2403identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2404multi-acquisition HDR captures with differing acquisition settings.
2405
2406`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2407the capture consists of more than one acquisition, then the remaining acquisitions are not used
2408for the color image. No tone mapping is performed. This option provides the most control of
2409the color image, and the color values will be consistent over repeated captures with the same
2410settings.
2411
2412`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2413HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2414image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2415applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2416normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2417mode the color values can be inconsistent over repeated captures if you move, add or remove
2418objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2419mode.
2420)description"
2421 };
2422
2424 enum class ValueType
2425 {
2426 automatic,
2427 useFirstAcquisition,
2428 toneMapping
2429 };
2430 static const Mode automatic;
2432 static const Mode toneMapping;
2433
2435 static std::set<ValueType> validValues()
2436 {
2437 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2438 }
2439
2441 Mode() = default;
2442
2444 explicit constexpr Mode(ValueType value)
2445 : m_opt{ verifyValue(value) }
2446 {}
2447
2453
2455 bool hasValue() const;
2456
2458 void reset();
2459
2461 std::string toString() const;
2462
2464 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2465 {
2466 return stream << Mode{ value }.toString();
2467 }
2468
2470 bool operator==(const Mode &other) const
2471 {
2472 return m_opt == other.m_opt;
2473 }
2474
2476 bool operator!=(const Mode &other) const
2477 {
2478 return m_opt != other.m_opt;
2479 }
2480
2482 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2483 {
2484 return stream << value.toString();
2485 }
2486
2487 private:
2488 void setFromString(const std::string &value);
2489
2490 constexpr ValueType static verifyValue(const ValueType &value)
2491 {
2492 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2493 || value == ValueType::toneMapping
2494 ? value
2495 : throw std::invalid_argument{
2496 "Invalid value: Mode{ "
2497 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2498 + " }"
2499 };
2500 }
2501
2502 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2503
2504 friend struct DataModel::Detail::Befriend<Mode>;
2505 };
2506
2507 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2508
2511
2523#ifndef NO_DOC
2524 template<
2525 typename... Args,
2526 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2527 typename std::enable_if<
2528 Zivid::Detail::TypeTraits::
2529 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2530 int>::type = 0>
2531#else
2532 template<typename... Args>
2533#endif
2534 explicit Experimental(Args &&...args)
2535 {
2536 using namespace Zivid::Detail::TypeTraits;
2537
2538 static_assert(
2539 AllArgsDecayedAreUnique<Args...>::value,
2540 "Found duplicate types among the arguments passed to Experimental(...). "
2541 "Types should be listed at most once.");
2542
2543 set(std::forward<Args>(args)...);
2544 }
2545
2556#ifndef NO_DOC
2557 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2558#else
2559 template<typename... Args>
2560#endif
2561 void set(Args &&...args)
2562 {
2563 using namespace Zivid::Detail::TypeTraits;
2564
2565 using AllArgsAreDescendantNodes =
2566 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2567 static_assert(
2568 AllArgsAreDescendantNodes::value,
2569 "All arguments passed to set(...) must be descendant nodes.");
2570
2571 static_assert(
2572 AllArgsDecayedAreUnique<Args...>::value,
2573 "Found duplicate types among the arguments passed to set(...). "
2574 "Types should be listed at most once.");
2575
2576 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2577 }
2578
2590#ifndef NO_DOC
2591 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2592#else
2593 template<typename... Args>
2594#endif
2595 Experimental copyWith(Args &&...args) const
2596 {
2597 using namespace Zivid::Detail::TypeTraits;
2598
2599 using AllArgsAreDescendantNodes =
2600 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2601 static_assert(
2602 AllArgsAreDescendantNodes::value,
2603 "All arguments passed to copyWith(...) must be descendant nodes.");
2604
2605 static_assert(
2606 AllArgsDecayedAreUnique<Args...>::value,
2607 "Found duplicate types among the arguments passed to copyWith(...). "
2608 "Types should be listed at most once.");
2609
2610 auto copy{ *this };
2611 copy.set(std::forward<Args>(args)...);
2612 return copy;
2613 }
2614
2616 const Mode &mode() const
2617 {
2618 return m_mode;
2619 }
2620
2623 {
2624 return m_mode;
2625 }
2626
2628 Experimental &set(const Mode &value)
2629 {
2630 m_mode = value;
2631 return *this;
2632 }
2633
2634 template<
2635 typename T,
2636 typename std::enable_if<
2637 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2638 int>::type = 0>
2640 {
2641 return m_mode;
2642 }
2643
2644 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2646 {
2647 return m_mode;
2648 }
2649
2651 template<typename F>
2652 void forEach(const F &f) const
2653 {
2654 f(m_mode);
2655 }
2656
2658 template<typename F>
2659 void forEach(const F &f)
2660 {
2661 f(m_mode);
2662 }
2663
2665 bool operator==(const Experimental &other) const;
2666
2668 bool operator!=(const Experimental &other) const;
2669
2671 std::string toString() const;
2672
2674 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2675 {
2676 return stream << value.toString();
2677 }
2678
2679 private:
2680 void setFromString(const std::string &value);
2681
2682 void setFromString(const std::string &fullPath, const std::string &value);
2683
2684 std::string getString(const std::string &fullPath) const;
2685
2686 Mode m_mode;
2687
2688 friend struct DataModel::Detail::Befriend<Experimental>;
2689 };
2690
2694
2695 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2697 {
2698 public:
2700 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2701
2703 static constexpr const char *path{ "Processing/Color/Gamma" };
2704
2706 static constexpr const char *name{ "Gamma" };
2707
2709 static constexpr const char *description{
2710 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2711greater than 1 makes the colors darker.
2712)description"
2713 };
2714
2716 using ValueType = double;
2717
2719 static constexpr Range<double> validRange()
2720 {
2721 return { 0.25, 1.5 };
2722 }
2723
2725 Gamma() = default;
2726
2728 explicit constexpr Gamma(double value)
2729 : m_opt{ verifyValue(value) }
2730 {}
2731
2736 double value() const;
2737
2739 bool hasValue() const;
2740
2742 void reset();
2743
2745 std::string toString() const;
2746
2748 bool operator==(const Gamma &other) const
2749 {
2750 return m_opt == other.m_opt;
2751 }
2752
2754 bool operator!=(const Gamma &other) const
2755 {
2756 return m_opt != other.m_opt;
2757 }
2758
2760 bool operator<(const Gamma &other) const
2761 {
2762 return m_opt < other.m_opt;
2763 }
2764
2766 bool operator>(const Gamma &other) const
2767 {
2768 return m_opt > other.m_opt;
2769 }
2770
2772 bool operator<=(const Gamma &other) const
2773 {
2774 return m_opt <= other.m_opt;
2775 }
2776
2778 bool operator>=(const Gamma &other) const
2779 {
2780 return m_opt >= other.m_opt;
2781 }
2782
2784 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2785 {
2786 return stream << value.toString();
2787 }
2788
2789 private:
2790 void setFromString(const std::string &value);
2791
2792 constexpr ValueType static verifyValue(const ValueType &value)
2793 {
2794 return validRange().isInRange(value)
2795 ? value
2796 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2797 + std::to_string(validRange().min()) + ", "
2798 + std::to_string(validRange().max()) + "]" };
2799 }
2800
2801 Zivid::DataModel::Detail::Optional<double> m_opt;
2802
2803 friend struct DataModel::Detail::Befriend<Gamma>;
2804 };
2805
2806 using Descendants = std::tuple<
2814
2817
2835#ifndef NO_DOC
2836 template<
2837 typename... Args,
2838 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2839 typename std::enable_if<
2840 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2841 value,
2842 int>::type = 0>
2843#else
2844 template<typename... Args>
2845#endif
2846 explicit Color(Args &&...args)
2847 {
2848 using namespace Zivid::Detail::TypeTraits;
2849
2850 static_assert(
2851 AllArgsDecayedAreUnique<Args...>::value,
2852 "Found duplicate types among the arguments passed to Color(...). "
2853 "Types should be listed at most once.");
2854
2855 set(std::forward<Args>(args)...);
2856 }
2857
2874#ifndef NO_DOC
2875 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2876#else
2877 template<typename... Args>
2878#endif
2879 void set(Args &&...args)
2880 {
2881 using namespace Zivid::Detail::TypeTraits;
2882
2883 using AllArgsAreDescendantNodes =
2884 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2885 static_assert(
2886 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2887
2888 static_assert(
2889 AllArgsDecayedAreUnique<Args...>::value,
2890 "Found duplicate types among the arguments passed to set(...). "
2891 "Types should be listed at most once.");
2892
2893 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2894 }
2895
2913#ifndef NO_DOC
2914 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2915#else
2916 template<typename... Args>
2917#endif
2918 Color copyWith(Args &&...args) const
2919 {
2920 using namespace Zivid::Detail::TypeTraits;
2921
2922 using AllArgsAreDescendantNodes =
2923 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2924 static_assert(
2925 AllArgsAreDescendantNodes::value,
2926 "All arguments passed to copyWith(...) must be descendant nodes.");
2927
2928 static_assert(
2929 AllArgsDecayedAreUnique<Args...>::value,
2930 "Found duplicate types among the arguments passed to copyWith(...). "
2931 "Types should be listed at most once.");
2932
2933 auto copy{ *this };
2934 copy.set(std::forward<Args>(args)...);
2935 return copy;
2936 }
2937
2939 const Balance &balance() const
2940 {
2941 return m_balance;
2942 }
2943
2946 {
2947 return m_balance;
2948 }
2949
2951 Color &set(const Balance &value)
2952 {
2953 m_balance = value;
2954 return *this;
2955 }
2956
2958 Color &set(const Balance::Blue &value)
2959 {
2960 m_balance.set(value);
2961 return *this;
2962 }
2963
2965 Color &set(const Balance::Green &value)
2966 {
2967 m_balance.set(value);
2968 return *this;
2969 }
2970
2972 Color &set(const Balance::Red &value)
2973 {
2974 m_balance.set(value);
2975 return *this;
2976 }
2977
2980 {
2981 return m_experimental;
2982 }
2983
2986 {
2987 return m_experimental;
2988 }
2989
2991 Color &set(const Experimental &value)
2992 {
2993 m_experimental = value;
2994 return *this;
2995 }
2996
2999 {
3000 m_experimental.set(value);
3001 return *this;
3002 }
3003
3005 const Gamma &gamma() const
3006 {
3007 return m_gamma;
3008 }
3009
3012 {
3013 return m_gamma;
3014 }
3015
3017 Color &set(const Gamma &value)
3018 {
3019 m_gamma = value;
3020 return *this;
3021 }
3022
3023 template<
3024 typename T,
3025 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
3026 0>
3028 {
3029 return m_balance;
3030 }
3031
3032 template<
3033 typename T,
3034 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
3035 type = 0>
3037 {
3038 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
3039 }
3040
3041 template<
3042 typename T,
3043 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
3044 type = 0>
3046 {
3047 return m_balance.get<Settings::Processing::Color::Balance::Green>();
3048 }
3049
3050 template<
3051 typename T,
3052 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
3053 type = 0>
3055 {
3056 return m_balance.get<Settings::Processing::Color::Balance::Red>();
3057 }
3058
3059 template<
3060 typename T,
3061 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
3062 type = 0>
3064 {
3065 return m_experimental;
3066 }
3067
3068 template<
3069 typename T,
3070 typename std::enable_if<
3071 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
3072 int>::type = 0>
3074 {
3075 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
3076 }
3077
3078 template<
3079 typename T,
3080 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
3082 {
3083 return m_gamma;
3084 }
3085
3086 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3088 {
3089 return m_balance;
3090 }
3091
3092 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3094 {
3095 return m_experimental;
3096 }
3097
3098 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3100 {
3101 return m_gamma;
3102 }
3103
3105 template<typename F>
3106 void forEach(const F &f) const
3107 {
3108 f(m_balance);
3109 f(m_experimental);
3110 f(m_gamma);
3111 }
3112
3114 template<typename F>
3115 void forEach(const F &f)
3116 {
3117 f(m_balance);
3118 f(m_experimental);
3119 f(m_gamma);
3120 }
3121
3123 bool operator==(const Color &other) const;
3124
3126 bool operator!=(const Color &other) const;
3127
3129 std::string toString() const;
3130
3132 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
3133 {
3134 return stream << value.toString();
3135 }
3136
3137 private:
3138 void setFromString(const std::string &value);
3139
3140 void setFromString(const std::string &fullPath, const std::string &value);
3141
3142 std::string getString(const std::string &fullPath) const;
3143
3144 Balance m_balance;
3145 Experimental m_experimental;
3146 Gamma m_gamma;
3147
3148 friend struct DataModel::Detail::Befriend<Color>;
3149 };
3150
3152
3153 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3155 {
3156 public:
3158 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3159
3161 static constexpr const char *path{ "Processing/Filters" };
3162
3164 static constexpr const char *name{ "Filters" };
3165
3167 static constexpr const char *description{ R"description(Filters)description" };
3168
3171
3172 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3174 {
3175 public:
3177 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3178
3180 static constexpr const char *path{ "Processing/Filters/Cluster" };
3181
3183 static constexpr const char *name{ "Cluster" };
3184
3186 static constexpr const char *description{
3187 R"description(Removes floating points and isolated clusters from the point cloud.
3188)description"
3189 };
3190
3192
3193 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3195 {
3196 public:
3198 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3199
3201 static constexpr const char *path{ "Processing/Filters/Cluster/Removal" };
3202
3204 static constexpr const char *name{ "Removal" };
3205
3207 static constexpr const char *description{ R"description(Removal)description" };
3208
3210
3211 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3213 {
3214 public:
3216 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3217
3219 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/Enabled" };
3220
3222 static constexpr const char *name{ "Enabled" };
3223
3225 static constexpr const char *description{ R"description(Enabled)description" };
3226
3228 using ValueType = bool;
3229 static const Enabled yes;
3230 static const Enabled no;
3231
3233 static std::set<bool> validValues()
3234 {
3235 return { false, true };
3236 }
3237
3239 Enabled() = default;
3240
3242 explicit constexpr Enabled(bool value)
3243 : m_opt{ value }
3244 {}
3245
3250 bool value() const;
3251
3253 bool hasValue() const;
3254
3256 void reset();
3257
3259 std::string toString() const;
3260
3262 bool operator==(const Enabled &other) const
3263 {
3264 return m_opt == other.m_opt;
3265 }
3266
3268 bool operator!=(const Enabled &other) const
3269 {
3270 return m_opt != other.m_opt;
3271 }
3272
3274 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3275 {
3276 return stream << value.toString();
3277 }
3278
3279 private:
3280 void setFromString(const std::string &value);
3281
3282 Zivid::DataModel::Detail::Optional<bool> m_opt;
3283
3284 friend struct DataModel::Detail::Befriend<Enabled>;
3285 };
3286
3291
3292 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3294 {
3295 public:
3297 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3298
3300 static constexpr const char *path{
3301 "Processing/Filters/Cluster/Removal/MaxNeighborDistance"
3302 };
3303
3305 static constexpr const char *name{ "MaxNeighborDistance" };
3306
3308 static constexpr const char *description{
3309 R"description(Maximum normalized distance between neighboring points that are still classified as
3310belonging to the same cluster. The default value is optimal for most scenes. On messy
3311scenes turning this setting down helps removing more bad points.
3312)description"
3313 };
3314
3316 using ValueType = double;
3317
3319 static constexpr Range<double> validRange()
3320 {
3321 return { 2.0, 10.0 };
3322 }
3323
3326
3328 explicit constexpr MaxNeighborDistance(double value)
3329 : m_opt{ verifyValue(value) }
3330 {}
3331
3336 double value() const;
3337
3339 bool hasValue() const;
3340
3342 void reset();
3343
3345 std::string toString() const;
3346
3348 bool operator==(const MaxNeighborDistance &other) const
3349 {
3350 return m_opt == other.m_opt;
3351 }
3352
3354 bool operator!=(const MaxNeighborDistance &other) const
3355 {
3356 return m_opt != other.m_opt;
3357 }
3358
3360 bool operator<(const MaxNeighborDistance &other) const
3361 {
3362 return m_opt < other.m_opt;
3363 }
3364
3366 bool operator>(const MaxNeighborDistance &other) const
3367 {
3368 return m_opt > other.m_opt;
3369 }
3370
3372 bool operator<=(const MaxNeighborDistance &other) const
3373 {
3374 return m_opt <= other.m_opt;
3375 }
3376
3378 bool operator>=(const MaxNeighborDistance &other) const
3379 {
3380 return m_opt >= other.m_opt;
3381 }
3382
3384 friend std::ostream &operator<<(std::ostream &stream, const MaxNeighborDistance &value)
3385 {
3386 return stream << value.toString();
3387 }
3388
3389 private:
3390 void setFromString(const std::string &value);
3391
3392 constexpr ValueType static verifyValue(const ValueType &value)
3393 {
3394 return validRange().isInRange(value)
3395 ? value
3396 : throw std::out_of_range{ "MaxNeighborDistance{ " + std::to_string(value)
3397 + " } is not in range ["
3398 + std::to_string(validRange().min()) + ", "
3399 + std::to_string(validRange().max()) + "]" };
3400 }
3401
3402 Zivid::DataModel::Detail::Optional<double> m_opt;
3403
3404 friend struct DataModel::Detail::Befriend<MaxNeighborDistance>;
3405 };
3406
3410
3411 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3413 {
3414 public:
3416 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3417
3419 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/MinArea" };
3420
3422 static constexpr const char *name{ "MinArea" };
3423
3425 static constexpr const char *description{
3426 R"description(Clusters with area below this threshold are removed by the filter.
3427The area is given in mm^2.
3428)description"
3429 };
3430
3432 using ValueType = double;
3433
3435 static constexpr Range<double> validRange()
3436 {
3437 return { 0.0, 1500.0 };
3438 }
3439
3441 MinArea() = default;
3442
3444 explicit constexpr MinArea(double value)
3445 : m_opt{ verifyValue(value) }
3446 {}
3447
3452 double value() const;
3453
3455 bool hasValue() const;
3456
3458 void reset();
3459
3461 std::string toString() const;
3462
3464 bool operator==(const MinArea &other) const
3465 {
3466 return m_opt == other.m_opt;
3467 }
3468
3470 bool operator!=(const MinArea &other) const
3471 {
3472 return m_opt != other.m_opt;
3473 }
3474
3476 bool operator<(const MinArea &other) const
3477 {
3478 return m_opt < other.m_opt;
3479 }
3480
3482 bool operator>(const MinArea &other) const
3483 {
3484 return m_opt > other.m_opt;
3485 }
3486
3488 bool operator<=(const MinArea &other) const
3489 {
3490 return m_opt <= other.m_opt;
3491 }
3492
3494 bool operator>=(const MinArea &other) const
3495 {
3496 return m_opt >= other.m_opt;
3497 }
3498
3500 friend std::ostream &operator<<(std::ostream &stream, const MinArea &value)
3501 {
3502 return stream << value.toString();
3503 }
3504
3505 private:
3506 void setFromString(const std::string &value);
3507
3508 constexpr ValueType static verifyValue(const ValueType &value)
3509 {
3510 return validRange().isInRange(value)
3511 ? value
3512 : throw std::out_of_range{ "MinArea{ " + std::to_string(value)
3513 + " } is not in range ["
3514 + std::to_string(validRange().min()) + ", "
3515 + std::to_string(validRange().max()) + "]" };
3516 }
3517
3518 Zivid::DataModel::Detail::Optional<double> m_opt;
3519
3520 friend struct DataModel::Detail::Befriend<MinArea>;
3521 };
3522
3523 using Descendants = std::tuple<
3527
3530
3544#ifndef NO_DOC
3545 template<
3546 typename... Args,
3547 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3548 typename std::enable_if<
3549 Zivid::Detail::TypeTraits::
3550 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3551 int>::type = 0>
3552#else
3553 template<typename... Args>
3554#endif
3555 explicit Removal(Args &&...args)
3556 {
3557 using namespace Zivid::Detail::TypeTraits;
3558
3559 static_assert(
3560 AllArgsDecayedAreUnique<Args...>::value,
3561 "Found duplicate types among the arguments passed to Removal(...). "
3562 "Types should be listed at most once.");
3563
3564 set(std::forward<Args>(args)...);
3565 }
3566
3579#ifndef NO_DOC
3580 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3581#else
3582 template<typename... Args>
3583#endif
3584 void set(Args &&...args)
3585 {
3586 using namespace Zivid::Detail::TypeTraits;
3587
3588 using AllArgsAreDescendantNodes =
3589 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3590 static_assert(
3591 AllArgsAreDescendantNodes::value,
3592 "All arguments passed to set(...) must be descendant nodes.");
3593
3594 static_assert(
3595 AllArgsDecayedAreUnique<Args...>::value,
3596 "Found duplicate types among the arguments passed to set(...). "
3597 "Types should be listed at most once.");
3598
3599 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3600 }
3601
3615#ifndef NO_DOC
3616 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3617#else
3618 template<typename... Args>
3619#endif
3620 Removal copyWith(Args &&...args) const
3621 {
3622 using namespace Zivid::Detail::TypeTraits;
3623
3624 using AllArgsAreDescendantNodes =
3625 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3626 static_assert(
3627 AllArgsAreDescendantNodes::value,
3628 "All arguments passed to copyWith(...) must be descendant nodes.");
3629
3630 static_assert(
3631 AllArgsDecayedAreUnique<Args...>::value,
3632 "Found duplicate types among the arguments passed to copyWith(...). "
3633 "Types should be listed at most once.");
3634
3635 auto copy{ *this };
3636 copy.set(std::forward<Args>(args)...);
3637 return copy;
3638 }
3639
3641 const Enabled &isEnabled() const
3642 {
3643 return m_enabled;
3644 }
3645
3648 {
3649 return m_enabled;
3650 }
3651
3653 Removal &set(const Enabled &value)
3654 {
3655 m_enabled = value;
3656 return *this;
3657 }
3658
3661 {
3662 return m_maxNeighborDistance;
3663 }
3664
3667 {
3668 return m_maxNeighborDistance;
3669 }
3670
3673 {
3674 m_maxNeighborDistance = value;
3675 return *this;
3676 }
3677
3679 const MinArea &minArea() const
3680 {
3681 return m_minArea;
3682 }
3683
3686 {
3687 return m_minArea;
3688 }
3689
3691 Removal &set(const MinArea &value)
3692 {
3693 m_minArea = value;
3694 return *this;
3695 }
3696
3697 template<
3698 typename T,
3699 typename std::enable_if<
3700 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3701 int>::type = 0>
3703 {
3704 return m_enabled;
3705 }
3706
3707 template<
3708 typename T,
3709 typename std::enable_if<
3710 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3711 value,
3712 int>::type = 0>
3714 {
3715 return m_maxNeighborDistance;
3716 }
3717
3718 template<
3719 typename T,
3720 typename std::enable_if<
3721 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3722 int>::type = 0>
3724 {
3725 return m_minArea;
3726 }
3727
3728 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3730 {
3731 return m_enabled;
3732 }
3733
3734 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3736 {
3737 return m_maxNeighborDistance;
3738 }
3739
3740 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3742 {
3743 return m_minArea;
3744 }
3745
3747 template<typename F>
3748 void forEach(const F &f) const
3749 {
3750 f(m_enabled);
3751 f(m_maxNeighborDistance);
3752 f(m_minArea);
3753 }
3754
3756 template<typename F>
3757 void forEach(const F &f)
3758 {
3759 f(m_enabled);
3760 f(m_maxNeighborDistance);
3761 f(m_minArea);
3762 }
3763
3765 bool operator==(const Removal &other) const;
3766
3768 bool operator!=(const Removal &other) const;
3769
3771 std::string toString() const;
3772
3774 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3775 {
3776 return stream << value.toString();
3777 }
3778
3779 private:
3780 void setFromString(const std::string &value);
3781
3782 void setFromString(const std::string &fullPath, const std::string &value);
3783
3784 std::string getString(const std::string &fullPath) const;
3785
3786 Enabled m_enabled;
3787 MaxNeighborDistance m_maxNeighborDistance;
3788 MinArea m_minArea;
3789
3790 friend struct DataModel::Detail::Befriend<Removal>;
3791 };
3792
3793 using Descendants = std::tuple<
3798
3801
3816#ifndef NO_DOC
3817 template<
3818 typename... Args,
3819 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3820 typename std::enable_if<
3821 Zivid::Detail::TypeTraits::
3822 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3823 int>::type = 0>
3824#else
3825 template<typename... Args>
3826#endif
3827 explicit Cluster(Args &&...args)
3828 {
3829 using namespace Zivid::Detail::TypeTraits;
3830
3831 static_assert(
3832 AllArgsDecayedAreUnique<Args...>::value,
3833 "Found duplicate types among the arguments passed to Cluster(...). "
3834 "Types should be listed at most once.");
3835
3836 set(std::forward<Args>(args)...);
3837 }
3838
3852#ifndef NO_DOC
3853 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3854#else
3855 template<typename... Args>
3856#endif
3857 void set(Args &&...args)
3858 {
3859 using namespace Zivid::Detail::TypeTraits;
3860
3861 using AllArgsAreDescendantNodes =
3862 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3863 static_assert(
3864 AllArgsAreDescendantNodes::value,
3865 "All arguments passed to set(...) must be descendant nodes.");
3866
3867 static_assert(
3868 AllArgsDecayedAreUnique<Args...>::value,
3869 "Found duplicate types among the arguments passed to set(...). "
3870 "Types should be listed at most once.");
3871
3872 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3873 }
3874
3889#ifndef NO_DOC
3890 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3891#else
3892 template<typename... Args>
3893#endif
3894 Cluster copyWith(Args &&...args) const
3895 {
3896 using namespace Zivid::Detail::TypeTraits;
3897
3898 using AllArgsAreDescendantNodes =
3899 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3900 static_assert(
3901 AllArgsAreDescendantNodes::value,
3902 "All arguments passed to copyWith(...) must be descendant nodes.");
3903
3904 static_assert(
3905 AllArgsDecayedAreUnique<Args...>::value,
3906 "Found duplicate types among the arguments passed to copyWith(...). "
3907 "Types should be listed at most once.");
3908
3909 auto copy{ *this };
3910 copy.set(std::forward<Args>(args)...);
3911 return copy;
3912 }
3913
3915 const Removal &removal() const
3916 {
3917 return m_removal;
3918 }
3919
3922 {
3923 return m_removal;
3924 }
3925
3927 Cluster &set(const Removal &value)
3928 {
3929 m_removal = value;
3930 return *this;
3931 }
3932
3935 {
3936 m_removal.set(value);
3937 return *this;
3938 }
3939
3942 {
3943 m_removal.set(value);
3944 return *this;
3945 }
3946
3949 {
3950 m_removal.set(value);
3951 return *this;
3952 }
3953
3954 template<
3955 typename T,
3956 typename std::enable_if<
3957 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
3958 int>::type = 0>
3960 {
3961 return m_removal;
3962 }
3963
3964 template<
3965 typename T,
3966 typename std::enable_if<
3967 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3968 int>::type = 0>
3970 {
3972 }
3973
3974 template<
3975 typename T,
3976 typename std::enable_if<
3977 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3978 value,
3979 int>::type = 0>
3981 {
3983 }
3984
3985 template<
3986 typename T,
3987 typename std::enable_if<
3988 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3989 int>::type = 0>
3991 {
3993 }
3994
3995 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3997 {
3998 return m_removal;
3999 }
4000
4002 template<typename F>
4003 void forEach(const F &f) const
4004 {
4005 f(m_removal);
4006 }
4007
4009 template<typename F>
4010 void forEach(const F &f)
4011 {
4012 f(m_removal);
4013 }
4014
4016 bool operator==(const Cluster &other) const;
4017
4019 bool operator!=(const Cluster &other) const;
4020
4022 std::string toString() const;
4023
4025 friend std::ostream &operator<<(std::ostream &stream, const Cluster &value)
4026 {
4027 return stream << value.toString();
4028 }
4029
4030 private:
4031 void setFromString(const std::string &value);
4032
4033 void setFromString(const std::string &fullPath, const std::string &value);
4034
4035 std::string getString(const std::string &fullPath) const;
4036
4037 Removal m_removal;
4038
4039 friend struct DataModel::Detail::Befriend<Cluster>;
4040 };
4041
4043
4044 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4046 {
4047 public:
4049 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4050
4052 static constexpr const char *path{ "Processing/Filters/Experimental" };
4053
4055 static constexpr const char *name{ "Experimental" };
4056
4058 static constexpr const char *description{
4059 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
4060 };
4061
4067
4068 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4070 {
4071 public:
4073 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4074
4076 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
4077
4079 static constexpr const char *name{ "ContrastDistortion" };
4080
4082 static constexpr const char *description{
4083 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
4084or high contrast. These artifacts are caused by blurring in the lens. The filter
4085works best when aperture values are chosen such that the camera has quite good focus.
4086The filter also supports removing the points that experience a large correction.
4087)description"
4088 };
4089
4091
4092 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4094 {
4095 public:
4097 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4098
4100 static constexpr const char *path{
4101 "Processing/Filters/Experimental/ContrastDistortion/Correction"
4102 };
4103
4105 static constexpr const char *name{ "Correction" };
4106
4108 static constexpr const char *description{ R"description(Correction)description" };
4109
4111
4112 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4114 {
4115 public:
4117 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4118
4120 static constexpr const char *path{
4121 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
4122 };
4123
4125 static constexpr const char *name{ "Enabled" };
4126
4128 static constexpr const char *description{ R"description(Enabled)description" };
4129
4131 using ValueType = bool;
4132 static const Enabled yes;
4133 static const Enabled no;
4134
4136 static std::set<bool> validValues()
4137 {
4138 return { false, true };
4139 }
4140
4142 Enabled() = default;
4143
4145 explicit constexpr Enabled(bool value)
4146 : m_opt{ value }
4147 {}
4148
4153 bool value() const;
4154
4156 bool hasValue() const;
4157
4159 void reset();
4160
4162 std::string toString() const;
4163
4165 bool operator==(const Enabled &other) const
4166 {
4167 return m_opt == other.m_opt;
4168 }
4169
4171 bool operator!=(const Enabled &other) const
4172 {
4173 return m_opt != other.m_opt;
4174 }
4175
4177 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4178 {
4179 return stream << value.toString();
4180 }
4181
4182 private:
4183 void setFromString(const std::string &value);
4184
4185 Zivid::DataModel::Detail::Optional<bool> m_opt;
4186
4187 friend struct DataModel::Detail::Befriend<Enabled>;
4188 };
4189
4191
4192 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4194 {
4195 public:
4197 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4198
4200 static constexpr const char *path{
4201 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
4202 };
4203
4205 static constexpr const char *name{ "Strength" };
4206
4208 static constexpr const char *description{
4209 R"description(Higher values gives more correction.)description"
4210 };
4211
4213 using ValueType = double;
4214
4216 static constexpr Range<double> validRange()
4217 {
4218 return { 0.0, 1.0 };
4219 }
4220
4222 Strength() = default;
4223
4225 explicit constexpr Strength(double value)
4226 : m_opt{ verifyValue(value) }
4227 {}
4228
4233 double value() const;
4234
4236 bool hasValue() const;
4237
4239 void reset();
4240
4242 std::string toString() const;
4243
4245 bool operator==(const Strength &other) const
4246 {
4247 return m_opt == other.m_opt;
4248 }
4249
4251 bool operator!=(const Strength &other) const
4252 {
4253 return m_opt != other.m_opt;
4254 }
4255
4257 bool operator<(const Strength &other) const
4258 {
4259 return m_opt < other.m_opt;
4260 }
4261
4263 bool operator>(const Strength &other) const
4264 {
4265 return m_opt > other.m_opt;
4266 }
4267
4269 bool operator<=(const Strength &other) const
4270 {
4271 return m_opt <= other.m_opt;
4272 }
4273
4275 bool operator>=(const Strength &other) const
4276 {
4277 return m_opt >= other.m_opt;
4278 }
4279
4281 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
4282 {
4283 return stream << value.toString();
4284 }
4285
4286 private:
4287 void setFromString(const std::string &value);
4288
4289 constexpr ValueType static verifyValue(const ValueType &value)
4290 {
4291 return validRange().isInRange(value)
4292 ? value
4293 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
4294 + " } is not in range ["
4295 + std::to_string(validRange().min()) + ", "
4296 + std::to_string(validRange().max()) + "]" };
4297 }
4298
4299 Zivid::DataModel::Detail::Optional<double> m_opt;
4300
4301 friend struct DataModel::Detail::Befriend<Strength>;
4302 };
4303
4304 using Descendants = std::tuple<
4307
4310
4323#ifndef NO_DOC
4324 template<
4325 typename... Args,
4326 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4327 typename std::enable_if<
4328 Zivid::Detail::TypeTraits::
4329 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4330 int>::type = 0>
4331#else
4332 template<typename... Args>
4333#endif
4334 explicit Correction(Args &&...args)
4335 {
4336 using namespace Zivid::Detail::TypeTraits;
4337
4338 static_assert(
4339 AllArgsDecayedAreUnique<Args...>::value,
4340 "Found duplicate types among the arguments passed to Correction(...). "
4341 "Types should be listed at most once.");
4342
4343 set(std::forward<Args>(args)...);
4344 }
4345
4357#ifndef NO_DOC
4358 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4359#else
4360 template<typename... Args>
4361#endif
4362 void set(Args &&...args)
4363 {
4364 using namespace Zivid::Detail::TypeTraits;
4365
4366 using AllArgsAreDescendantNodes =
4367 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4368 static_assert(
4369 AllArgsAreDescendantNodes::value,
4370 "All arguments passed to set(...) must be descendant nodes.");
4371
4372 static_assert(
4373 AllArgsDecayedAreUnique<Args...>::value,
4374 "Found duplicate types among the arguments passed to set(...). "
4375 "Types should be listed at most once.");
4376
4377 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4378 }
4379
4392#ifndef NO_DOC
4393 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4394#else
4395 template<typename... Args>
4396#endif
4397 Correction copyWith(Args &&...args) const
4398 {
4399 using namespace Zivid::Detail::TypeTraits;
4400
4401 using AllArgsAreDescendantNodes =
4402 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4403 static_assert(
4404 AllArgsAreDescendantNodes::value,
4405 "All arguments passed to copyWith(...) must be descendant nodes.");
4406
4407 static_assert(
4408 AllArgsDecayedAreUnique<Args...>::value,
4409 "Found duplicate types among the arguments passed to copyWith(...). "
4410 "Types should be listed at most once.");
4411
4412 auto copy{ *this };
4413 copy.set(std::forward<Args>(args)...);
4414 return copy;
4415 }
4416
4418 const Enabled &isEnabled() const
4419 {
4420 return m_enabled;
4421 }
4422
4425 {
4426 return m_enabled;
4427 }
4428
4430 Correction &set(const Enabled &value)
4431 {
4432 m_enabled = value;
4433 return *this;
4434 }
4435
4437 const Strength &strength() const
4438 {
4439 return m_strength;
4440 }
4441
4444 {
4445 return m_strength;
4446 }
4447
4449 Correction &set(const Strength &value)
4450 {
4451 m_strength = value;
4452 return *this;
4453 }
4454
4455 template<
4456 typename T,
4457 typename std::enable_if<
4458 std::is_same<
4459 T,
4460 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4461 Enabled>::value,
4462 int>::type = 0>
4464 get() const
4465 {
4466 return m_enabled;
4467 }
4468
4469 template<
4470 typename T,
4471 typename std::enable_if<
4472 std::is_same<
4473 T,
4474 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4475 Strength>::value,
4476 int>::type = 0>
4477 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4478 Strength &
4479 get() const
4480 {
4481 return m_strength;
4482 }
4483
4484 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4486 get() const
4487 {
4488 return m_enabled;
4489 }
4490
4491 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4492 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4493 Strength &
4494 get() const
4495 {
4496 return m_strength;
4497 }
4498
4500 template<typename F>
4501 void forEach(const F &f) const
4502 {
4503 f(m_enabled);
4504 f(m_strength);
4505 }
4506
4508 template<typename F>
4509 void forEach(const F &f)
4510 {
4511 f(m_enabled);
4512 f(m_strength);
4513 }
4514
4516 bool operator==(const Correction &other) const;
4517
4519 bool operator!=(const Correction &other) const;
4520
4522 std::string toString() const;
4523
4525 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
4526 {
4527 return stream << value.toString();
4528 }
4529
4530 private:
4531 void setFromString(const std::string &value);
4532
4533 void setFromString(const std::string &fullPath, const std::string &value);
4534
4535 std::string getString(const std::string &fullPath) const;
4536
4537 Enabled m_enabled;
4538 Strength m_strength;
4539
4540 friend struct DataModel::Detail::Befriend<Correction>;
4541 };
4542
4544
4545 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4547 {
4548 public:
4550 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4551
4553 static constexpr const char *path{
4554 "Processing/Filters/Experimental/ContrastDistortion/Removal"
4555 };
4556
4558 static constexpr const char *name{ "Removal" };
4559
4561 static constexpr const char *description{ R"description(Removal)description" };
4562
4564
4565 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4567 {
4568 public:
4570 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4571
4573 static constexpr const char *path{
4574 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
4575 };
4576
4578 static constexpr const char *name{ "Enabled" };
4579
4581 static constexpr const char *description{ R"description(Enabled)description" };
4582
4584 using ValueType = bool;
4585 static const Enabled yes;
4586 static const Enabled no;
4587
4589 static std::set<bool> validValues()
4590 {
4591 return { false, true };
4592 }
4593
4595 Enabled() = default;
4596
4598 explicit constexpr Enabled(bool value)
4599 : m_opt{ value }
4600 {}
4601
4606 bool value() const;
4607
4609 bool hasValue() const;
4610
4612 void reset();
4613
4615 std::string toString() const;
4616
4618 bool operator==(const Enabled &other) const
4619 {
4620 return m_opt == other.m_opt;
4621 }
4622
4624 bool operator!=(const Enabled &other) const
4625 {
4626 return m_opt != other.m_opt;
4627 }
4628
4630 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4631 {
4632 return stream << value.toString();
4633 }
4634
4635 private:
4636 void setFromString(const std::string &value);
4637
4638 Zivid::DataModel::Detail::Optional<bool> m_opt;
4639
4640 friend struct DataModel::Detail::Befriend<Enabled>;
4641 };
4642
4644
4645 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4647 {
4648 public:
4650 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4651
4653 static constexpr const char *path{
4654 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
4655 };
4656
4658 static constexpr const char *name{ "Threshold" };
4659
4661 static constexpr const char *description{
4662 R"description(Higher values remove more points.)description"
4663 };
4664
4666 using ValueType = double;
4667
4669 static constexpr Range<double> validRange()
4670 {
4671 return { 0.0, 1.0 };
4672 }
4673
4675 Threshold() = default;
4676
4678 explicit constexpr Threshold(double value)
4679 : m_opt{ verifyValue(value) }
4680 {}
4681
4686 double value() const;
4687
4689 bool hasValue() const;
4690
4692 void reset();
4693
4695 std::string toString() const;
4696
4698 bool operator==(const Threshold &other) const
4699 {
4700 return m_opt == other.m_opt;
4701 }
4702
4704 bool operator!=(const Threshold &other) const
4705 {
4706 return m_opt != other.m_opt;
4707 }
4708
4710 bool operator<(const Threshold &other) const
4711 {
4712 return m_opt < other.m_opt;
4713 }
4714
4716 bool operator>(const Threshold &other) const
4717 {
4718 return m_opt > other.m_opt;
4719 }
4720
4722 bool operator<=(const Threshold &other) const
4723 {
4724 return m_opt <= other.m_opt;
4725 }
4726
4728 bool operator>=(const Threshold &other) const
4729 {
4730 return m_opt >= other.m_opt;
4731 }
4732
4734 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4735 {
4736 return stream << value.toString();
4737 }
4738
4739 private:
4740 void setFromString(const std::string &value);
4741
4742 constexpr ValueType static verifyValue(const ValueType &value)
4743 {
4744 return validRange().isInRange(value)
4745 ? value
4746 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4747 + " } is not in range ["
4748 + std::to_string(validRange().min()) + ", "
4749 + std::to_string(validRange().max()) + "]" };
4750 }
4751
4752 Zivid::DataModel::Detail::Optional<double> m_opt;
4753
4754 friend struct DataModel::Detail::Befriend<Threshold>;
4755 };
4756
4757 using Descendants = std::tuple<
4760
4763
4776#ifndef NO_DOC
4777 template<
4778 typename... Args,
4779 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4780 typename std::enable_if<
4781 Zivid::Detail::TypeTraits::
4782 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4783 int>::type = 0>
4784#else
4785 template<typename... Args>
4786#endif
4787 explicit Removal(Args &&...args)
4788 {
4789 using namespace Zivid::Detail::TypeTraits;
4790
4791 static_assert(
4792 AllArgsDecayedAreUnique<Args...>::value,
4793 "Found duplicate types among the arguments passed to Removal(...). "
4794 "Types should be listed at most once.");
4795
4796 set(std::forward<Args>(args)...);
4797 }
4798
4810#ifndef NO_DOC
4811 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4812#else
4813 template<typename... Args>
4814#endif
4815 void set(Args &&...args)
4816 {
4817 using namespace Zivid::Detail::TypeTraits;
4818
4819 using AllArgsAreDescendantNodes =
4820 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4821 static_assert(
4822 AllArgsAreDescendantNodes::value,
4823 "All arguments passed to set(...) must be descendant nodes.");
4824
4825 static_assert(
4826 AllArgsDecayedAreUnique<Args...>::value,
4827 "Found duplicate types among the arguments passed to set(...). "
4828 "Types should be listed at most once.");
4829
4830 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4831 }
4832
4845#ifndef NO_DOC
4846 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4847#else
4848 template<typename... Args>
4849#endif
4850 Removal copyWith(Args &&...args) const
4851 {
4852 using namespace Zivid::Detail::TypeTraits;
4853
4854 using AllArgsAreDescendantNodes =
4855 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4856 static_assert(
4857 AllArgsAreDescendantNodes::value,
4858 "All arguments passed to copyWith(...) must be descendant nodes.");
4859
4860 static_assert(
4861 AllArgsDecayedAreUnique<Args...>::value,
4862 "Found duplicate types among the arguments passed to copyWith(...). "
4863 "Types should be listed at most once.");
4864
4865 auto copy{ *this };
4866 copy.set(std::forward<Args>(args)...);
4867 return copy;
4868 }
4869
4871 const Enabled &isEnabled() const
4872 {
4873 return m_enabled;
4874 }
4875
4878 {
4879 return m_enabled;
4880 }
4881
4883 Removal &set(const Enabled &value)
4884 {
4885 m_enabled = value;
4886 return *this;
4887 }
4888
4890 const Threshold &threshold() const
4891 {
4892 return m_threshold;
4893 }
4894
4897 {
4898 return m_threshold;
4899 }
4900
4902 Removal &set(const Threshold &value)
4903 {
4904 m_threshold = value;
4905 return *this;
4906 }
4907
4908 template<
4909 typename T,
4910 typename std::enable_if<
4911 std::is_same<
4912 T,
4913 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4914 Enabled>::value,
4915 int>::type = 0>
4917 get() const
4918 {
4919 return m_enabled;
4920 }
4921
4922 template<
4923 typename T,
4924 typename std::enable_if<
4925 std::is_same<
4926 T,
4927 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4928 Threshold>::value,
4929 int>::type = 0>
4931 get() const
4932 {
4933 return m_threshold;
4934 }
4935
4936 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4938 get() const
4939 {
4940 return m_enabled;
4941 }
4942
4943 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4945 get() const
4946 {
4947 return m_threshold;
4948 }
4949
4951 template<typename F>
4952 void forEach(const F &f) const
4953 {
4954 f(m_enabled);
4955 f(m_threshold);
4956 }
4957
4959 template<typename F>
4960 void forEach(const F &f)
4961 {
4962 f(m_enabled);
4963 f(m_threshold);
4964 }
4965
4967 bool operator==(const Removal &other) const;
4968
4970 bool operator!=(const Removal &other) const;
4971
4973 std::string toString() const;
4974
4976 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4977 {
4978 return stream << value.toString();
4979 }
4980
4981 private:
4982 void setFromString(const std::string &value);
4983
4984 void setFromString(const std::string &fullPath, const std::string &value);
4985
4986 std::string getString(const std::string &fullPath) const;
4987
4988 Enabled m_enabled;
4989 Threshold m_threshold;
4990
4991 friend struct DataModel::Detail::Befriend<Removal>;
4992 };
4993
4994 using Descendants = std::tuple<
5001
5004
5021#ifndef NO_DOC
5022 template<
5023 typename... Args,
5024 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5025 typename std::enable_if<
5026 Zivid::Detail::TypeTraits::
5027 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5028 int>::type = 0>
5029#else
5030 template<typename... Args>
5031#endif
5032 explicit ContrastDistortion(Args &&...args)
5033 {
5034 using namespace Zivid::Detail::TypeTraits;
5035
5036 static_assert(
5037 AllArgsDecayedAreUnique<Args...>::value,
5038 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
5039 "Types should be listed at most once.");
5040
5041 set(std::forward<Args>(args)...);
5042 }
5043
5059#ifndef NO_DOC
5060 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5061#else
5062 template<typename... Args>
5063#endif
5064 void set(Args &&...args)
5065 {
5066 using namespace Zivid::Detail::TypeTraits;
5067
5068 using AllArgsAreDescendantNodes =
5069 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5070 static_assert(
5071 AllArgsAreDescendantNodes::value,
5072 "All arguments passed to set(...) must be descendant nodes.");
5073
5074 static_assert(
5075 AllArgsDecayedAreUnique<Args...>::value,
5076 "Found duplicate types among the arguments passed to set(...). "
5077 "Types should be listed at most once.");
5078
5079 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5080 }
5081
5098#ifndef NO_DOC
5099 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5100#else
5101 template<typename... Args>
5102#endif
5103 ContrastDistortion copyWith(Args &&...args) const
5104 {
5105 using namespace Zivid::Detail::TypeTraits;
5106
5107 using AllArgsAreDescendantNodes =
5108 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5109 static_assert(
5110 AllArgsAreDescendantNodes::value,
5111 "All arguments passed to copyWith(...) must be descendant nodes.");
5112
5113 static_assert(
5114 AllArgsDecayedAreUnique<Args...>::value,
5115 "Found duplicate types among the arguments passed to copyWith(...). "
5116 "Types should be listed at most once.");
5117
5118 auto copy{ *this };
5119 copy.set(std::forward<Args>(args)...);
5120 return copy;
5121 }
5122
5124 const Correction &correction() const
5125 {
5126 return m_correction;
5127 }
5128
5131 {
5132 return m_correction;
5133 }
5134
5137 {
5138 m_correction = value;
5139 return *this;
5140 }
5141
5144 {
5145 m_correction.set(value);
5146 return *this;
5147 }
5148
5151 {
5152 m_correction.set(value);
5153 return *this;
5154 }
5155
5157 const Removal &removal() const
5158 {
5159 return m_removal;
5160 }
5161
5164 {
5165 return m_removal;
5166 }
5167
5170 {
5171 m_removal = value;
5172 return *this;
5173 }
5174
5177 {
5178 m_removal.set(value);
5179 return *this;
5180 }
5181
5184 {
5185 m_removal.set(value);
5186 return *this;
5187 }
5188
5189 template<
5190 typename T,
5191 typename std::enable_if<
5192 std::is_same<
5193 T,
5195 int>::type = 0>
5197 {
5198 return m_correction;
5199 }
5200
5201 template<
5202 typename T,
5203 typename std::enable_if<
5204 std::is_same<
5205 T,
5206 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5207 Enabled>::value,
5208 int>::type = 0>
5210 get() const
5211 {
5212 return m_correction.get<
5214 }
5215
5216 template<
5217 typename T,
5218 typename std::enable_if<
5219 std::is_same<
5220 T,
5221 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5222 Strength>::value,
5223 int>::type = 0>
5225 get() const
5226 {
5227 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
5228 Correction::Strength>();
5229 }
5230
5231 template<
5232 typename T,
5233 typename std::enable_if<
5234 std::is_same<
5235 T,
5237 int>::type = 0>
5239 {
5240 return m_removal;
5241 }
5242
5243 template<
5244 typename T,
5245 typename std::enable_if<
5246 std::is_same<
5247 T,
5249 value,
5250 int>::type = 0>
5252 const
5253 {
5254 return m_removal.get<
5256 }
5257
5258 template<
5259 typename T,
5260 typename std::enable_if<
5261 std::is_same<
5262 T,
5263 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
5264 Threshold>::value,
5265 int>::type = 0>
5267 const
5268 {
5269 return m_removal.get<
5271 }
5272
5273 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5275 {
5276 return m_correction;
5277 }
5278
5279 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5281 {
5282 return m_removal;
5283 }
5284
5286 template<typename F>
5287 void forEach(const F &f) const
5288 {
5289 f(m_correction);
5290 f(m_removal);
5291 }
5292
5294 template<typename F>
5295 void forEach(const F &f)
5296 {
5297 f(m_correction);
5298 f(m_removal);
5299 }
5300
5302 bool operator==(const ContrastDistortion &other) const;
5303
5305 bool operator!=(const ContrastDistortion &other) const;
5306
5308 std::string toString() const;
5309
5311 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
5312 {
5313 return stream << value.toString();
5314 }
5315
5316 private:
5317 void setFromString(const std::string &value);
5318
5319 void setFromString(const std::string &fullPath, const std::string &value);
5320
5321 std::string getString(const std::string &fullPath) const;
5322
5323 Correction m_correction;
5324 Removal m_removal;
5325
5326 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
5327 };
5328
5331
5332 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5334 {
5335 public:
5337 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5338
5340 static constexpr const char *path{ "Processing/Filters/Experimental/HoleFilling" };
5341
5343 static constexpr const char *name{ "HoleFilling" };
5344
5346 static constexpr const char *description{
5347 R"description(Fills in removed points by interpolating remaining surrounding points.
5348)description"
5349 };
5350
5352
5353 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5355 {
5356 public:
5358 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5359
5361 static constexpr const char *path{ "Processing/Filters/Experimental/HoleFilling/Enabled" };
5362
5364 static constexpr const char *name{ "Enabled" };
5365
5367 static constexpr const char *description{ R"description(Enabled)description" };
5368
5370 using ValueType = bool;
5371 static const Enabled yes;
5372 static const Enabled no;
5373
5375 static std::set<bool> validValues()
5376 {
5377 return { false, true };
5378 }
5379
5381 Enabled() = default;
5382
5384 explicit constexpr Enabled(bool value)
5385 : m_opt{ value }
5386 {}
5387
5392 bool value() const;
5393
5395 bool hasValue() const;
5396
5398 void reset();
5399
5401 std::string toString() const;
5402
5404 bool operator==(const Enabled &other) const
5405 {
5406 return m_opt == other.m_opt;
5407 }
5408
5410 bool operator!=(const Enabled &other) const
5411 {
5412 return m_opt != other.m_opt;
5413 }
5414
5416 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5417 {
5418 return stream << value.toString();
5419 }
5420
5421 private:
5422 void setFromString(const std::string &value);
5423
5424 Zivid::DataModel::Detail::Optional<bool> m_opt;
5425
5426 friend struct DataModel::Detail::Befriend<Enabled>;
5427 };
5428
5433
5434 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5436 {
5437 public:
5439 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5440
5442 static constexpr const char *path{ "Processing/Filters/Experimental/HoleFilling/HoleSize" };
5443
5445 static constexpr const char *name{ "HoleSize" };
5446
5448 static constexpr const char *description{
5449 R"description(Relative diameter of holes to fill. Increasing this will fill more points, but require more
5450computation time. The maximum allowed hole size scales with distance, so that we allow
5451filling larger holes at greater distances, measured in mm.
5452)description"
5453 };
5454
5456 using ValueType = double;
5457
5459 static constexpr Range<double> validRange()
5460 {
5461 return { 0.0, 1.0 };
5462 }
5463
5465 HoleSize() = default;
5466
5468 explicit constexpr HoleSize(double value)
5469 : m_opt{ verifyValue(value) }
5470 {}
5471
5476 double value() const;
5477
5479 bool hasValue() const;
5480
5482 void reset();
5483
5485 std::string toString() const;
5486
5488 bool operator==(const HoleSize &other) const
5489 {
5490 return m_opt == other.m_opt;
5491 }
5492
5494 bool operator!=(const HoleSize &other) const
5495 {
5496 return m_opt != other.m_opt;
5497 }
5498
5500 bool operator<(const HoleSize &other) const
5501 {
5502 return m_opt < other.m_opt;
5503 }
5504
5506 bool operator>(const HoleSize &other) const
5507 {
5508 return m_opt > other.m_opt;
5509 }
5510
5512 bool operator<=(const HoleSize &other) const
5513 {
5514 return m_opt <= other.m_opt;
5515 }
5516
5518 bool operator>=(const HoleSize &other) const
5519 {
5520 return m_opt >= other.m_opt;
5521 }
5522
5524 friend std::ostream &operator<<(std::ostream &stream, const HoleSize &value)
5525 {
5526 return stream << value.toString();
5527 }
5528
5529 private:
5530 void setFromString(const std::string &value);
5531
5532 constexpr ValueType static verifyValue(const ValueType &value)
5533 {
5534 return validRange().isInRange(value)
5535 ? value
5536 : throw std::out_of_range{ "HoleSize{ " + std::to_string(value)
5537 + " } is not in range ["
5538 + std::to_string(validRange().min()) + ", "
5539 + std::to_string(validRange().max()) + "]" };
5540 }
5541
5542 Zivid::DataModel::Detail::Optional<double> m_opt;
5543
5544 friend struct DataModel::Detail::Befriend<HoleSize>;
5545 };
5546
5552
5553 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5555 {
5556 public:
5558 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5559
5561 static constexpr const char *path{
5562 "Processing/Filters/Experimental/HoleFilling/Strictness"
5563 };
5564
5566 static constexpr const char *name{ "Strictness" };
5567
5569 static constexpr const char *description{
5570 R"description(Level of strictness when considering if a point should be filled. A higher level of
5571strictness requires a missing point to be surrounded by valid points on more sides in
5572order to be filled. Increasing this will fill fewer points, but it will be less likely to
5573fill gaps that are not circular, for example between two edges.
5574)description"
5575 };
5576
5578 using ValueType = int32_t;
5579
5581 static constexpr Range<int32_t> validRange()
5582 {
5583 return { 1, 4 };
5584 }
5585
5587 Strictness() = default;
5588
5590 explicit constexpr Strictness(int32_t value)
5591 : m_opt{ verifyValue(value) }
5592 {}
5593
5598 int32_t value() const;
5599
5601 bool hasValue() const;
5602
5604 void reset();
5605
5607 std::string toString() const;
5608
5610 bool operator==(const Strictness &other) const
5611 {
5612 return m_opt == other.m_opt;
5613 }
5614
5616 bool operator!=(const Strictness &other) const
5617 {
5618 return m_opt != other.m_opt;
5619 }
5620
5622 bool operator<(const Strictness &other) const
5623 {
5624 return m_opt < other.m_opt;
5625 }
5626
5628 bool operator>(const Strictness &other) const
5629 {
5630 return m_opt > other.m_opt;
5631 }
5632
5634 bool operator<=(const Strictness &other) const
5635 {
5636 return m_opt <= other.m_opt;
5637 }
5638
5640 bool operator>=(const Strictness &other) const
5641 {
5642 return m_opt >= other.m_opt;
5643 }
5644
5646 friend std::ostream &operator<<(std::ostream &stream, const Strictness &value)
5647 {
5648 return stream << value.toString();
5649 }
5650
5651 private:
5652 void setFromString(const std::string &value);
5653
5654 constexpr ValueType static verifyValue(const ValueType &value)
5655 {
5656 return validRange().isInRange(value)
5657 ? value
5658 : throw std::out_of_range{ "Strictness{ " + std::to_string(value)
5659 + " } is not in range ["
5660 + std::to_string(validRange().min()) + ", "
5661 + std::to_string(validRange().max()) + "]" };
5662 }
5663
5664 Zivid::DataModel::Detail::Optional<int32_t> m_opt;
5665
5666 friend struct DataModel::Detail::Befriend<Strictness>;
5667 };
5668
5669 using Descendants = std::tuple<
5673
5676
5690#ifndef NO_DOC
5691 template<
5692 typename... Args,
5693 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5694 typename std::enable_if<
5695 Zivid::Detail::TypeTraits::
5696 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5697 int>::type = 0>
5698#else
5699 template<typename... Args>
5700#endif
5701 explicit HoleFilling(Args &&...args)
5702 {
5703 using namespace Zivid::Detail::TypeTraits;
5704
5705 static_assert(
5706 AllArgsDecayedAreUnique<Args...>::value,
5707 "Found duplicate types among the arguments passed to HoleFilling(...). "
5708 "Types should be listed at most once.");
5709
5710 set(std::forward<Args>(args)...);
5711 }
5712
5725#ifndef NO_DOC
5726 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5727#else
5728 template<typename... Args>
5729#endif
5730 void set(Args &&...args)
5731 {
5732 using namespace Zivid::Detail::TypeTraits;
5733
5734 using AllArgsAreDescendantNodes =
5735 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5736 static_assert(
5737 AllArgsAreDescendantNodes::value,
5738 "All arguments passed to set(...) must be descendant nodes.");
5739
5740 static_assert(
5741 AllArgsDecayedAreUnique<Args...>::value,
5742 "Found duplicate types among the arguments passed to set(...). "
5743 "Types should be listed at most once.");
5744
5745 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5746 }
5747
5761#ifndef NO_DOC
5762 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5763#else
5764 template<typename... Args>
5765#endif
5766 HoleFilling copyWith(Args &&...args) const
5767 {
5768 using namespace Zivid::Detail::TypeTraits;
5769
5770 using AllArgsAreDescendantNodes =
5771 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5772 static_assert(
5773 AllArgsAreDescendantNodes::value,
5774 "All arguments passed to copyWith(...) must be descendant nodes.");
5775
5776 static_assert(
5777 AllArgsDecayedAreUnique<Args...>::value,
5778 "Found duplicate types among the arguments passed to copyWith(...). "
5779 "Types should be listed at most once.");
5780
5781 auto copy{ *this };
5782 copy.set(std::forward<Args>(args)...);
5783 return copy;
5784 }
5785
5787 const Enabled &isEnabled() const
5788 {
5789 return m_enabled;
5790 }
5791
5794 {
5795 return m_enabled;
5796 }
5797
5799 HoleFilling &set(const Enabled &value)
5800 {
5801 m_enabled = value;
5802 return *this;
5803 }
5804
5806 const HoleSize &holeSize() const
5807 {
5808 return m_holeSize;
5809 }
5810
5813 {
5814 return m_holeSize;
5815 }
5816
5818 HoleFilling &set(const HoleSize &value)
5819 {
5820 m_holeSize = value;
5821 return *this;
5822 }
5823
5825 const Strictness &strictness() const
5826 {
5827 return m_strictness;
5828 }
5829
5832 {
5833 return m_strictness;
5834 }
5835
5838 {
5839 m_strictness = value;
5840 return *this;
5841 }
5842
5843 template<
5844 typename T,
5845 typename std::enable_if<
5846 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Enabled>::
5847 value,
5848 int>::type = 0>
5850 {
5851 return m_enabled;
5852 }
5853
5854 template<
5855 typename T,
5856 typename std::enable_if<
5857 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize>::
5858 value,
5859 int>::type = 0>
5861 {
5862 return m_holeSize;
5863 }
5864
5865 template<
5866 typename T,
5867 typename std::enable_if<
5868 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Strictness>::
5869 value,
5870 int>::type = 0>
5872 {
5873 return m_strictness;
5874 }
5875
5876 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5878 {
5879 return m_enabled;
5880 }
5881
5882 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5884 {
5885 return m_holeSize;
5886 }
5887
5888 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
5890 {
5891 return m_strictness;
5892 }
5893
5895 template<typename F>
5896 void forEach(const F &f) const
5897 {
5898 f(m_enabled);
5899 f(m_holeSize);
5900 f(m_strictness);
5901 }
5902
5904 template<typename F>
5905 void forEach(const F &f)
5906 {
5907 f(m_enabled);
5908 f(m_holeSize);
5909 f(m_strictness);
5910 }
5911
5913 bool operator==(const HoleFilling &other) const;
5914
5916 bool operator!=(const HoleFilling &other) const;
5917
5919 std::string toString() const;
5920
5922 friend std::ostream &operator<<(std::ostream &stream, const HoleFilling &value)
5923 {
5924 return stream << value.toString();
5925 }
5926
5927 private:
5928 void setFromString(const std::string &value);
5929
5930 void setFromString(const std::string &fullPath, const std::string &value);
5931
5932 std::string getString(const std::string &fullPath) const;
5933
5934 Enabled m_enabled;
5935 HoleSize m_holeSize;
5936 Strictness m_strictness;
5937
5938 friend struct DataModel::Detail::Befriend<HoleFilling>;
5939 };
5940
5941 using Descendants = std::tuple<
5953
5956
5978#ifndef NO_DOC
5979 template<
5980 typename... Args,
5981 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5982 typename std::enable_if<
5983 Zivid::Detail::TypeTraits::
5984 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5985 int>::type = 0>
5986#else
5987 template<typename... Args>
5988#endif
5989 explicit Experimental(Args &&...args)
5990 {
5991 using namespace Zivid::Detail::TypeTraits;
5992
5993 static_assert(
5994 AllArgsDecayedAreUnique<Args...>::value,
5995 "Found duplicate types among the arguments passed to Experimental(...). "
5996 "Types should be listed at most once.");
5997
5998 set(std::forward<Args>(args)...);
5999 }
6000
6021#ifndef NO_DOC
6022 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6023#else
6024 template<typename... Args>
6025#endif
6026 void set(Args &&...args)
6027 {
6028 using namespace Zivid::Detail::TypeTraits;
6029
6030 using AllArgsAreDescendantNodes =
6031 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6032 static_assert(
6033 AllArgsAreDescendantNodes::value,
6034 "All arguments passed to set(...) must be descendant nodes.");
6035
6036 static_assert(
6037 AllArgsDecayedAreUnique<Args...>::value,
6038 "Found duplicate types among the arguments passed to set(...). "
6039 "Types should be listed at most once.");
6040
6041 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6042 }
6043
6065#ifndef NO_DOC
6066 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6067#else
6068 template<typename... Args>
6069#endif
6070 Experimental copyWith(Args &&...args) const
6071 {
6072 using namespace Zivid::Detail::TypeTraits;
6073
6074 using AllArgsAreDescendantNodes =
6075 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6076 static_assert(
6077 AllArgsAreDescendantNodes::value,
6078 "All arguments passed to copyWith(...) must be descendant nodes.");
6079
6080 static_assert(
6081 AllArgsDecayedAreUnique<Args...>::value,
6082 "Found duplicate types among the arguments passed to copyWith(...). "
6083 "Types should be listed at most once.");
6084
6085 auto copy{ *this };
6086 copy.set(std::forward<Args>(args)...);
6087 return copy;
6088 }
6089
6092 {
6093 return m_contrastDistortion;
6094 }
6095
6098 {
6099 return m_contrastDistortion;
6100 }
6101
6104 {
6105 m_contrastDistortion = value;
6106 return *this;
6107 }
6108
6111 {
6112 m_contrastDistortion.set(value);
6113 return *this;
6114 }
6115
6118 {
6119 m_contrastDistortion.set(value);
6120 return *this;
6121 }
6122
6125 {
6126 m_contrastDistortion.set(value);
6127 return *this;
6128 }
6129
6132 {
6133 m_contrastDistortion.set(value);
6134 return *this;
6135 }
6136
6139 {
6140 m_contrastDistortion.set(value);
6141 return *this;
6142 }
6143
6146 {
6147 m_contrastDistortion.set(value);
6148 return *this;
6149 }
6150
6153 {
6154 return m_holeFilling;
6155 }
6156
6159 {
6160 return m_holeFilling;
6161 }
6162
6165 {
6166 m_holeFilling = value;
6167 return *this;
6168 }
6169
6172 {
6173 m_holeFilling.set(value);
6174 return *this;
6175 }
6176
6179 {
6180 m_holeFilling.set(value);
6181 return *this;
6182 }
6183
6186 {
6187 m_holeFilling.set(value);
6188 return *this;
6189 }
6190
6191 template<
6192 typename T,
6193 typename std::enable_if<
6194 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
6195 int>::type = 0>
6197 {
6198 return m_contrastDistortion;
6199 }
6200
6201 template<
6202 typename T,
6203 typename std::enable_if<
6204 std::is_same<
6205 T,
6207 int>::type = 0>
6209 {
6210 return m_contrastDistortion
6212 }
6213
6214 template<
6215 typename T,
6216 typename std::enable_if<
6217 std::is_same<
6218 T,
6220 value,
6221 int>::type = 0>
6223 const
6224 {
6225 return m_contrastDistortion.get<
6227 }
6228
6229 template<
6230 typename T,
6231 typename std::enable_if<
6232 std::is_same<
6233 T,
6235 value,
6236 int>::type = 0>
6238 const
6239 {
6240 return m_contrastDistortion.get<
6242 }
6243
6244 template<
6245 typename T,
6246 typename std::enable_if<
6247 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
6248 value,
6249 int>::type = 0>
6251 {
6252 return m_contrastDistortion
6254 }
6255
6256 template<
6257 typename T,
6258 typename std::enable_if<
6259 std::is_same<
6260 T,
6262 value,
6263 int>::type = 0>
6265 {
6266 return m_contrastDistortion
6268 }
6269
6270 template<
6271 typename T,
6272 typename std::enable_if<
6273 std::is_same<
6274 T,
6276 value,
6277 int>::type = 0>
6279 const
6280 {
6281 return m_contrastDistortion
6283 }
6284
6285 template<
6286 typename T,
6287 typename std::enable_if<
6288 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling>::value,
6289 int>::type = 0>
6291 {
6292 return m_holeFilling;
6293 }
6294
6295 template<
6296 typename T,
6297 typename std::enable_if<
6298 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Enabled>::value,
6299 int>::type = 0>
6301 {
6303 }
6304
6305 template<
6306 typename T,
6307 typename std::enable_if<
6308 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize>::value,
6309 int>::type = 0>
6311 {
6313 }
6314
6315 template<
6316 typename T,
6317 typename std::enable_if<
6318 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Strictness>::
6319 value,
6320 int>::type = 0>
6322 {
6323 return m_holeFilling
6325 }
6326
6327 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6329 {
6330 return m_contrastDistortion;
6331 }
6332
6333 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6335 {
6336 return m_holeFilling;
6337 }
6338
6340 template<typename F>
6341 void forEach(const F &f) const
6342 {
6343 f(m_contrastDistortion);
6344 f(m_holeFilling);
6345 }
6346
6348 template<typename F>
6349 void forEach(const F &f)
6350 {
6351 f(m_contrastDistortion);
6352 f(m_holeFilling);
6353 }
6354
6356 bool operator==(const Experimental &other) const;
6357
6359 bool operator!=(const Experimental &other) const;
6360
6362 std::string toString() const;
6363
6365 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
6366 {
6367 return stream << value.toString();
6368 }
6369
6370 private:
6371 void setFromString(const std::string &value);
6372
6373 void setFromString(const std::string &fullPath, const std::string &value);
6374
6375 std::string getString(const std::string &fullPath) const;
6376
6377 ContrastDistortion m_contrastDistortion;
6378 HoleFilling m_holeFilling;
6379
6380 friend struct DataModel::Detail::Befriend<Experimental>;
6381 };
6382
6384
6385 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6387 {
6388 public:
6390 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6391
6393 static constexpr const char *path{ "Processing/Filters/Noise" };
6394
6396 static constexpr const char *name{ "Noise" };
6397
6399 static constexpr const char *description{
6400 R"description(Contains filters that can be used to clean up a noisy point cloud)description"
6401 };
6402
6404
6405 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6407 {
6408 public:
6410 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6411
6413 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
6414
6416 static constexpr const char *name{ "Removal" };
6417
6419 static constexpr const char *description{
6420 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold)description"
6421 };
6422
6424
6425 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6427 {
6428 public:
6430 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6431
6433 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
6434
6436 static constexpr const char *name{ "Enabled" };
6437
6439 static constexpr const char *description{
6440 R"description(Enable or disable the SNR filter)description"
6441 };
6442
6444 using ValueType = bool;
6445 static const Enabled yes;
6446 static const Enabled no;
6447
6449 static std::set<bool> validValues()
6450 {
6451 return { false, true };
6452 }
6453
6455 Enabled() = default;
6456
6458 explicit constexpr Enabled(bool value)
6459 : m_opt{ value }
6460 {}
6461
6466 bool value() const;
6467
6469 bool hasValue() const;
6470
6472 void reset();
6473
6475 std::string toString() const;
6476
6478 bool operator==(const Enabled &other) const
6479 {
6480 return m_opt == other.m_opt;
6481 }
6482
6484 bool operator!=(const Enabled &other) const
6485 {
6486 return m_opt != other.m_opt;
6487 }
6488
6490 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6491 {
6492 return stream << value.toString();
6493 }
6494
6495 private:
6496 void setFromString(const std::string &value);
6497
6498 Zivid::DataModel::Detail::Optional<bool> m_opt;
6499
6500 friend struct DataModel::Detail::Befriend<Enabled>;
6501 };
6502
6504
6505 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6507 {
6508 public:
6510 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6511
6513 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
6514
6516 static constexpr const char *name{ "Threshold" };
6517
6519 static constexpr const char *description{
6520 R"description(Discard points with signal-to-noise ratio (SNR) below the given value)description"
6521 };
6522
6524 using ValueType = double;
6525
6527 static constexpr Range<double> validRange()
6528 {
6529 return { 0.0, 100.0 };
6530 }
6531
6533 Threshold() = default;
6534
6536 explicit constexpr Threshold(double value)
6537 : m_opt{ verifyValue(value) }
6538 {}
6539
6544 double value() const;
6545
6547 bool hasValue() const;
6548
6550 void reset();
6551
6553 std::string toString() const;
6554
6556 bool operator==(const Threshold &other) const
6557 {
6558 return m_opt == other.m_opt;
6559 }
6560
6562 bool operator!=(const Threshold &other) const
6563 {
6564 return m_opt != other.m_opt;
6565 }
6566
6568 bool operator<(const Threshold &other) const
6569 {
6570 return m_opt < other.m_opt;
6571 }
6572
6574 bool operator>(const Threshold &other) const
6575 {
6576 return m_opt > other.m_opt;
6577 }
6578
6580 bool operator<=(const Threshold &other) const
6581 {
6582 return m_opt <= other.m_opt;
6583 }
6584
6586 bool operator>=(const Threshold &other) const
6587 {
6588 return m_opt >= other.m_opt;
6589 }
6590
6592 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
6593 {
6594 return stream << value.toString();
6595 }
6596
6597 private:
6598 void setFromString(const std::string &value);
6599
6600 constexpr ValueType static verifyValue(const ValueType &value)
6601 {
6602 return validRange().isInRange(value)
6603 ? value
6604 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
6605 + " } is not in range ["
6606 + std::to_string(validRange().min()) + ", "
6607 + std::to_string(validRange().max()) + "]" };
6608 }
6609
6610 Zivid::DataModel::Detail::Optional<double> m_opt;
6611
6612 friend struct DataModel::Detail::Befriend<Threshold>;
6613 };
6614
6615 using Descendants = std::tuple<
6618
6621
6634#ifndef NO_DOC
6635 template<
6636 typename... Args,
6637 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6638 typename std::enable_if<
6639 Zivid::Detail::TypeTraits::
6640 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6641 int>::type = 0>
6642#else
6643 template<typename... Args>
6644#endif
6645 explicit Removal(Args &&...args)
6646 {
6647 using namespace Zivid::Detail::TypeTraits;
6648
6649 static_assert(
6650 AllArgsDecayedAreUnique<Args...>::value,
6651 "Found duplicate types among the arguments passed to Removal(...). "
6652 "Types should be listed at most once.");
6653
6654 set(std::forward<Args>(args)...);
6655 }
6656
6668#ifndef NO_DOC
6669 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6670#else
6671 template<typename... Args>
6672#endif
6673 void set(Args &&...args)
6674 {
6675 using namespace Zivid::Detail::TypeTraits;
6676
6677 using AllArgsAreDescendantNodes =
6678 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6679 static_assert(
6680 AllArgsAreDescendantNodes::value,
6681 "All arguments passed to set(...) must be descendant nodes.");
6682
6683 static_assert(
6684 AllArgsDecayedAreUnique<Args...>::value,
6685 "Found duplicate types among the arguments passed to set(...). "
6686 "Types should be listed at most once.");
6687
6688 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6689 }
6690
6703#ifndef NO_DOC
6704 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6705#else
6706 template<typename... Args>
6707#endif
6708 Removal copyWith(Args &&...args) const
6709 {
6710 using namespace Zivid::Detail::TypeTraits;
6711
6712 using AllArgsAreDescendantNodes =
6713 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6714 static_assert(
6715 AllArgsAreDescendantNodes::value,
6716 "All arguments passed to copyWith(...) must be descendant nodes.");
6717
6718 static_assert(
6719 AllArgsDecayedAreUnique<Args...>::value,
6720 "Found duplicate types among the arguments passed to copyWith(...). "
6721 "Types should be listed at most once.");
6722
6723 auto copy{ *this };
6724 copy.set(std::forward<Args>(args)...);
6725 return copy;
6726 }
6727
6729 const Enabled &isEnabled() const
6730 {
6731 return m_enabled;
6732 }
6733
6736 {
6737 return m_enabled;
6738 }
6739
6741 Removal &set(const Enabled &value)
6742 {
6743 m_enabled = value;
6744 return *this;
6745 }
6746
6748 const Threshold &threshold() const
6749 {
6750 return m_threshold;
6751 }
6752
6755 {
6756 return m_threshold;
6757 }
6758
6760 Removal &set(const Threshold &value)
6761 {
6762 m_threshold = value;
6763 return *this;
6764 }
6765
6766 template<
6767 typename T,
6768 typename std::enable_if<
6769 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
6770 int>::type = 0>
6772 {
6773 return m_enabled;
6774 }
6775
6776 template<
6777 typename T,
6778 typename std::enable_if<
6779 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
6780 int>::type = 0>
6782 {
6783 return m_threshold;
6784 }
6785
6786 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6788 {
6789 return m_enabled;
6790 }
6791
6792 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6794 {
6795 return m_threshold;
6796 }
6797
6799 template<typename F>
6800 void forEach(const F &f) const
6801 {
6802 f(m_enabled);
6803 f(m_threshold);
6804 }
6805
6807 template<typename F>
6808 void forEach(const F &f)
6809 {
6810 f(m_enabled);
6811 f(m_threshold);
6812 }
6813
6815 bool operator==(const Removal &other) const;
6816
6818 bool operator!=(const Removal &other) const;
6819
6821 std::string toString() const;
6822
6824 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6825 {
6826 return stream << value.toString();
6827 }
6828
6829 private:
6830 void setFromString(const std::string &value);
6831
6832 void setFromString(const std::string &fullPath, const std::string &value);
6833
6834 std::string getString(const std::string &fullPath) const;
6835
6836 Enabled m_enabled;
6837 Threshold m_threshold;
6838
6839 friend struct DataModel::Detail::Befriend<Removal>;
6840 };
6841
6846
6847 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6849 {
6850 public:
6852 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6853
6855 static constexpr const char *path{ "Processing/Filters/Noise/Repair" };
6856
6858 static constexpr const char *name{ "Repair" };
6859
6861 static constexpr const char *description{
6862 R"description(Get better surface coverage by repairing regions of missing data due to noisy points.
6863Consider disabling this filter if you require all points in your point cloud to be of
6864high confidence.
6865)description"
6866 };
6867
6869
6870 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6872 {
6873 public:
6875 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6876
6878 static constexpr const char *path{ "Processing/Filters/Noise/Repair/Enabled" };
6879
6881 static constexpr const char *name{ "Enabled" };
6882
6884 static constexpr const char *description{
6885 R"description(Enable or disable noise repair)description"
6886 };
6887
6889 using ValueType = bool;
6890 static const Enabled yes;
6891 static const Enabled no;
6892
6894 static std::set<bool> validValues()
6895 {
6896 return { false, true };
6897 }
6898
6900 Enabled() = default;
6901
6903 explicit constexpr Enabled(bool value)
6904 : m_opt{ value }
6905 {}
6906
6911 bool value() const;
6912
6914 bool hasValue() const;
6915
6917 void reset();
6918
6920 std::string toString() const;
6921
6923 bool operator==(const Enabled &other) const
6924 {
6925 return m_opt == other.m_opt;
6926 }
6927
6929 bool operator!=(const Enabled &other) const
6930 {
6931 return m_opt != other.m_opt;
6932 }
6933
6935 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6936 {
6937 return stream << value.toString();
6938 }
6939
6940 private:
6941 void setFromString(const std::string &value);
6942
6943 Zivid::DataModel::Detail::Optional<bool> m_opt;
6944
6945 friend struct DataModel::Detail::Befriend<Enabled>;
6946 };
6947
6948 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Repair::Enabled>;
6949
6952
6964#ifndef NO_DOC
6965 template<
6966 typename... Args,
6967 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6968 typename std::enable_if<
6969 Zivid::Detail::TypeTraits::
6970 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6971 int>::type = 0>
6972#else
6973 template<typename... Args>
6974#endif
6975 explicit Repair(Args &&...args)
6976 {
6977 using namespace Zivid::Detail::TypeTraits;
6978
6979 static_assert(
6980 AllArgsDecayedAreUnique<Args...>::value,
6981 "Found duplicate types among the arguments passed to Repair(...). "
6982 "Types should be listed at most once.");
6983
6984 set(std::forward<Args>(args)...);
6985 }
6986
6997#ifndef NO_DOC
6998 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6999#else
7000 template<typename... Args>
7001#endif
7002 void set(Args &&...args)
7003 {
7004 using namespace Zivid::Detail::TypeTraits;
7005
7006 using AllArgsAreDescendantNodes =
7007 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7008 static_assert(
7009 AllArgsAreDescendantNodes::value,
7010 "All arguments passed to set(...) must be descendant nodes.");
7011
7012 static_assert(
7013 AllArgsDecayedAreUnique<Args...>::value,
7014 "Found duplicate types among the arguments passed to set(...). "
7015 "Types should be listed at most once.");
7016
7017 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7018 }
7019
7031#ifndef NO_DOC
7032 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7033#else
7034 template<typename... Args>
7035#endif
7036 Repair copyWith(Args &&...args) const
7037 {
7038 using namespace Zivid::Detail::TypeTraits;
7039
7040 using AllArgsAreDescendantNodes =
7041 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7042 static_assert(
7043 AllArgsAreDescendantNodes::value,
7044 "All arguments passed to copyWith(...) must be descendant nodes.");
7045
7046 static_assert(
7047 AllArgsDecayedAreUnique<Args...>::value,
7048 "Found duplicate types among the arguments passed to copyWith(...). "
7049 "Types should be listed at most once.");
7050
7051 auto copy{ *this };
7052 copy.set(std::forward<Args>(args)...);
7053 return copy;
7054 }
7055
7057 const Enabled &isEnabled() const
7058 {
7059 return m_enabled;
7060 }
7061
7064 {
7065 return m_enabled;
7066 }
7067
7069 Repair &set(const Enabled &value)
7070 {
7071 m_enabled = value;
7072 return *this;
7073 }
7074
7075 template<
7076 typename T,
7077 typename std::enable_if<
7078 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7079 int>::type = 0>
7081 {
7082 return m_enabled;
7083 }
7084
7085 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7087 {
7088 return m_enabled;
7089 }
7090
7092 template<typename F>
7093 void forEach(const F &f) const
7094 {
7095 f(m_enabled);
7096 }
7097
7099 template<typename F>
7100 void forEach(const F &f)
7101 {
7102 f(m_enabled);
7103 }
7104
7106 bool operator==(const Repair &other) const;
7107
7109 bool operator!=(const Repair &other) const;
7110
7112 std::string toString() const;
7113
7115 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
7116 {
7117 return stream << value.toString();
7118 }
7119
7120 private:
7121 void setFromString(const std::string &value);
7122
7123 void setFromString(const std::string &fullPath, const std::string &value);
7124
7125 std::string getString(const std::string &fullPath) const;
7126
7127 Enabled m_enabled;
7128
7129 friend struct DataModel::Detail::Befriend<Repair>;
7130 };
7131
7136
7137 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7139 {
7140 public:
7142 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7143
7145 static constexpr const char *path{ "Processing/Filters/Noise/Suppression" };
7146
7148 static constexpr const char *name{ "Suppression" };
7149
7151 static constexpr const char *description{
7152 R"description(Reduce noise and outliers in the point cloud. This filter can also be used to reduce
7153ripple effects caused by interreflections. Consider disabling this filter if you need to
7154distinguish very fine details and thus need to avoid any smoothing effects.
7155)description"
7156 };
7157
7159
7160 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7162 {
7163 public:
7165 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7166
7168 static constexpr const char *path{ "Processing/Filters/Noise/Suppression/Enabled" };
7169
7171 static constexpr const char *name{ "Enabled" };
7172
7174 static constexpr const char *description{
7175 R"description(Enable or disable noise suppression)description"
7176 };
7177
7179 using ValueType = bool;
7180 static const Enabled yes;
7181 static const Enabled no;
7182
7184 static std::set<bool> validValues()
7185 {
7186 return { false, true };
7187 }
7188
7190 Enabled() = default;
7191
7193 explicit constexpr Enabled(bool value)
7194 : m_opt{ value }
7195 {}
7196
7201 bool value() const;
7202
7204 bool hasValue() const;
7205
7207 void reset();
7208
7210 std::string toString() const;
7211
7213 bool operator==(const Enabled &other) const
7214 {
7215 return m_opt == other.m_opt;
7216 }
7217
7219 bool operator!=(const Enabled &other) const
7220 {
7221 return m_opt != other.m_opt;
7222 }
7223
7225 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7226 {
7227 return stream << value.toString();
7228 }
7229
7230 private:
7231 void setFromString(const std::string &value);
7232
7233 Zivid::DataModel::Detail::Optional<bool> m_opt;
7234
7235 friend struct DataModel::Detail::Befriend<Enabled>;
7236 };
7237
7238 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Suppression::Enabled>;
7239
7242
7254#ifndef NO_DOC
7255 template<
7256 typename... Args,
7257 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7258 typename std::enable_if<
7259 Zivid::Detail::TypeTraits::
7260 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7261 int>::type = 0>
7262#else
7263 template<typename... Args>
7264#endif
7265 explicit Suppression(Args &&...args)
7266 {
7267 using namespace Zivid::Detail::TypeTraits;
7268
7269 static_assert(
7270 AllArgsDecayedAreUnique<Args...>::value,
7271 "Found duplicate types among the arguments passed to Suppression(...). "
7272 "Types should be listed at most once.");
7273
7274 set(std::forward<Args>(args)...);
7275 }
7276
7287#ifndef NO_DOC
7288 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7289#else
7290 template<typename... Args>
7291#endif
7292 void set(Args &&...args)
7293 {
7294 using namespace Zivid::Detail::TypeTraits;
7295
7296 using AllArgsAreDescendantNodes =
7297 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7298 static_assert(
7299 AllArgsAreDescendantNodes::value,
7300 "All arguments passed to set(...) must be descendant nodes.");
7301
7302 static_assert(
7303 AllArgsDecayedAreUnique<Args...>::value,
7304 "Found duplicate types among the arguments passed to set(...). "
7305 "Types should be listed at most once.");
7306
7307 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7308 }
7309
7321#ifndef NO_DOC
7322 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7323#else
7324 template<typename... Args>
7325#endif
7326 Suppression copyWith(Args &&...args) const
7327 {
7328 using namespace Zivid::Detail::TypeTraits;
7329
7330 using AllArgsAreDescendantNodes =
7331 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7332 static_assert(
7333 AllArgsAreDescendantNodes::value,
7334 "All arguments passed to copyWith(...) must be descendant nodes.");
7335
7336 static_assert(
7337 AllArgsDecayedAreUnique<Args...>::value,
7338 "Found duplicate types among the arguments passed to copyWith(...). "
7339 "Types should be listed at most once.");
7340
7341 auto copy{ *this };
7342 copy.set(std::forward<Args>(args)...);
7343 return copy;
7344 }
7345
7347 const Enabled &isEnabled() const
7348 {
7349 return m_enabled;
7350 }
7351
7354 {
7355 return m_enabled;
7356 }
7357
7359 Suppression &set(const Enabled &value)
7360 {
7361 m_enabled = value;
7362 return *this;
7363 }
7364
7365 template<
7366 typename T,
7367 typename std::enable_if<
7368 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7369 int>::type = 0>
7371 {
7372 return m_enabled;
7373 }
7374
7375 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7377 {
7378 return m_enabled;
7379 }
7380
7382 template<typename F>
7383 void forEach(const F &f) const
7384 {
7385 f(m_enabled);
7386 }
7387
7389 template<typename F>
7390 void forEach(const F &f)
7391 {
7392 f(m_enabled);
7393 }
7394
7396 bool operator==(const Suppression &other) const;
7397
7399 bool operator!=(const Suppression &other) const;
7400
7402 std::string toString() const;
7403
7405 friend std::ostream &operator<<(std::ostream &stream, const Suppression &value)
7406 {
7407 return stream << value.toString();
7408 }
7409
7410 private:
7411 void setFromString(const std::string &value);
7412
7413 void setFromString(const std::string &fullPath, const std::string &value);
7414
7415 std::string getString(const std::string &fullPath) const;
7416
7417 Enabled m_enabled;
7418
7419 friend struct DataModel::Detail::Befriend<Suppression>;
7420 };
7421
7422 using Descendants = std::tuple<
7430
7433
7451#ifndef NO_DOC
7452 template<
7453 typename... Args,
7454 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7455 typename std::enable_if<
7456 Zivid::Detail::TypeTraits::
7457 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7458 int>::type = 0>
7459#else
7460 template<typename... Args>
7461#endif
7462 explicit Noise(Args &&...args)
7463 {
7464 using namespace Zivid::Detail::TypeTraits;
7465
7466 static_assert(
7467 AllArgsDecayedAreUnique<Args...>::value,
7468 "Found duplicate types among the arguments passed to Noise(...). "
7469 "Types should be listed at most once.");
7470
7471 set(std::forward<Args>(args)...);
7472 }
7473
7490#ifndef NO_DOC
7491 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7492#else
7493 template<typename... Args>
7494#endif
7495 void set(Args &&...args)
7496 {
7497 using namespace Zivid::Detail::TypeTraits;
7498
7499 using AllArgsAreDescendantNodes =
7500 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7501 static_assert(
7502 AllArgsAreDescendantNodes::value,
7503 "All arguments passed to set(...) must be descendant nodes.");
7504
7505 static_assert(
7506 AllArgsDecayedAreUnique<Args...>::value,
7507 "Found duplicate types among the arguments passed to set(...). "
7508 "Types should be listed at most once.");
7509
7510 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7511 }
7512
7530#ifndef NO_DOC
7531 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7532#else
7533 template<typename... Args>
7534#endif
7535 Noise copyWith(Args &&...args) const
7536 {
7537 using namespace Zivid::Detail::TypeTraits;
7538
7539 using AllArgsAreDescendantNodes =
7540 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7541 static_assert(
7542 AllArgsAreDescendantNodes::value,
7543 "All arguments passed to copyWith(...) must be descendant nodes.");
7544
7545 static_assert(
7546 AllArgsDecayedAreUnique<Args...>::value,
7547 "Found duplicate types among the arguments passed to copyWith(...). "
7548 "Types should be listed at most once.");
7549
7550 auto copy{ *this };
7551 copy.set(std::forward<Args>(args)...);
7552 return copy;
7553 }
7554
7556 const Removal &removal() const
7557 {
7558 return m_removal;
7559 }
7560
7563 {
7564 return m_removal;
7565 }
7566
7568 Noise &set(const Removal &value)
7569 {
7570 m_removal = value;
7571 return *this;
7572 }
7573
7576 {
7577 m_removal.set(value);
7578 return *this;
7579 }
7580
7583 {
7584 m_removal.set(value);
7585 return *this;
7586 }
7587
7589 const Repair &repair() const
7590 {
7591 return m_repair;
7592 }
7593
7596 {
7597 return m_repair;
7598 }
7599
7601 Noise &set(const Repair &value)
7602 {
7603 m_repair = value;
7604 return *this;
7605 }
7606
7609 {
7610 m_repair.set(value);
7611 return *this;
7612 }
7613
7616 {
7617 return m_suppression;
7618 }
7619
7622 {
7623 return m_suppression;
7624 }
7625
7627 Noise &set(const Suppression &value)
7628 {
7629 m_suppression = value;
7630 return *this;
7631 }
7632
7635 {
7636 m_suppression.set(value);
7637 return *this;
7638 }
7639
7640 template<
7641 typename T,
7642 typename std::enable_if<
7643 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7644 int>::type = 0>
7646 {
7647 return m_removal;
7648 }
7649
7650 template<
7651 typename T,
7652 typename std::enable_if<
7653 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7654 int>::type = 0>
7656 {
7658 }
7659
7660 template<
7661 typename T,
7662 typename std::enable_if<
7663 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7664 int>::type = 0>
7666 {
7668 }
7669
7670 template<
7671 typename T,
7672 typename std::enable_if<
7673 std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value,
7674 int>::type = 0>
7676 {
7677 return m_repair;
7678 }
7679
7680 template<
7681 typename T,
7682 typename std::enable_if<
7683 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7684 int>::type = 0>
7686 {
7688 }
7689
7690 template<
7691 typename T,
7692 typename std::enable_if<
7693 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
7694 int>::type = 0>
7696 {
7697 return m_suppression;
7698 }
7699
7700 template<
7701 typename T,
7702 typename std::enable_if<
7703 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7704 int>::type = 0>
7706 {
7708 }
7709
7710 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7712 {
7713 return m_removal;
7714 }
7715
7716 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7718 {
7719 return m_repair;
7720 }
7721
7722 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7724 {
7725 return m_suppression;
7726 }
7727
7729 template<typename F>
7730 void forEach(const F &f) const
7731 {
7732 f(m_removal);
7733 f(m_repair);
7734 f(m_suppression);
7735 }
7736
7738 template<typename F>
7739 void forEach(const F &f)
7740 {
7741 f(m_removal);
7742 f(m_repair);
7743 f(m_suppression);
7744 }
7745
7747 bool operator==(const Noise &other) const;
7748
7750 bool operator!=(const Noise &other) const;
7751
7753 std::string toString() const;
7754
7756 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
7757 {
7758 return stream << value.toString();
7759 }
7760
7761 private:
7762 void setFromString(const std::string &value);
7763
7764 void setFromString(const std::string &fullPath, const std::string &value);
7765
7766 std::string getString(const std::string &fullPath) const;
7767
7768 Removal m_removal;
7769 Repair m_repair;
7770 Suppression m_suppression;
7771
7772 friend struct DataModel::Detail::Befriend<Noise>;
7773 };
7774
7776
7777 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7779 {
7780 public:
7782 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7783
7785 static constexpr const char *path{ "Processing/Filters/Outlier" };
7786
7788 static constexpr const char *name{ "Outlier" };
7789
7791 static constexpr const char *description{
7792 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points)description"
7793 };
7794
7796
7797 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7799 {
7800 public:
7802 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7803
7805 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
7806
7808 static constexpr const char *name{ "Removal" };
7809
7811 static constexpr const char *description{
7812 R"description(Discard point if Euclidean distance to neighboring points is above a threshold)description"
7813 };
7814
7816
7817 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7819 {
7820 public:
7822 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7823
7825 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
7826
7828 static constexpr const char *name{ "Enabled" };
7829
7831 static constexpr const char *description{
7832 R"description(Enable or disable the outlier filter)description"
7833 };
7834
7836 using ValueType = bool;
7837 static const Enabled yes;
7838 static const Enabled no;
7839
7841 static std::set<bool> validValues()
7842 {
7843 return { false, true };
7844 }
7845
7847 Enabled() = default;
7848
7850 explicit constexpr Enabled(bool value)
7851 : m_opt{ value }
7852 {}
7853
7858 bool value() const;
7859
7861 bool hasValue() const;
7862
7864 void reset();
7865
7867 std::string toString() const;
7868
7870 bool operator==(const Enabled &other) const
7871 {
7872 return m_opt == other.m_opt;
7873 }
7874
7876 bool operator!=(const Enabled &other) const
7877 {
7878 return m_opt != other.m_opt;
7879 }
7880
7882 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7883 {
7884 return stream << value.toString();
7885 }
7886
7887 private:
7888 void setFromString(const std::string &value);
7889
7890 Zivid::DataModel::Detail::Optional<bool> m_opt;
7891
7892 friend struct DataModel::Detail::Befriend<Enabled>;
7893 };
7894
7896
7897 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7899 {
7900 public:
7902 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7903
7905 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
7906
7908 static constexpr const char *name{ "Threshold" };
7909
7911 static constexpr const char *description{
7912 R"description(Discard point if Euclidean distance to neighboring points is above the given value)description"
7913 };
7914
7916 using ValueType = double;
7917
7919 static constexpr Range<double> validRange()
7920 {
7921 return { 0.0, 100.0 };
7922 }
7923
7925 Threshold() = default;
7926
7928 explicit constexpr Threshold(double value)
7929 : m_opt{ verifyValue(value) }
7930 {}
7931
7936 double value() const;
7937
7939 bool hasValue() const;
7940
7942 void reset();
7943
7945 std::string toString() const;
7946
7948 bool operator==(const Threshold &other) const
7949 {
7950 return m_opt == other.m_opt;
7951 }
7952
7954 bool operator!=(const Threshold &other) const
7955 {
7956 return m_opt != other.m_opt;
7957 }
7958
7960 bool operator<(const Threshold &other) const
7961 {
7962 return m_opt < other.m_opt;
7963 }
7964
7966 bool operator>(const Threshold &other) const
7967 {
7968 return m_opt > other.m_opt;
7969 }
7970
7972 bool operator<=(const Threshold &other) const
7973 {
7974 return m_opt <= other.m_opt;
7975 }
7976
7978 bool operator>=(const Threshold &other) const
7979 {
7980 return m_opt >= other.m_opt;
7981 }
7982
7984 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
7985 {
7986 return stream << value.toString();
7987 }
7988
7989 private:
7990 void setFromString(const std::string &value);
7991
7992 constexpr ValueType static verifyValue(const ValueType &value)
7993 {
7994 return validRange().isInRange(value)
7995 ? value
7996 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
7997 + " } is not in range ["
7998 + std::to_string(validRange().min()) + ", "
7999 + std::to_string(validRange().max()) + "]" };
8000 }
8001
8002 Zivid::DataModel::Detail::Optional<double> m_opt;
8003
8004 friend struct DataModel::Detail::Befriend<Threshold>;
8005 };
8006
8007 using Descendants = std::tuple<
8010
8013
8026#ifndef NO_DOC
8027 template<
8028 typename... Args,
8029 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8030 typename std::enable_if<
8031 Zivid::Detail::TypeTraits::
8032 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8033 int>::type = 0>
8034#else
8035 template<typename... Args>
8036#endif
8037 explicit Removal(Args &&...args)
8038 {
8039 using namespace Zivid::Detail::TypeTraits;
8040
8041 static_assert(
8042 AllArgsDecayedAreUnique<Args...>::value,
8043 "Found duplicate types among the arguments passed to Removal(...). "
8044 "Types should be listed at most once.");
8045
8046 set(std::forward<Args>(args)...);
8047 }
8048
8060#ifndef NO_DOC
8061 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8062#else
8063 template<typename... Args>
8064#endif
8065 void set(Args &&...args)
8066 {
8067 using namespace Zivid::Detail::TypeTraits;
8068
8069 using AllArgsAreDescendantNodes =
8070 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8071 static_assert(
8072 AllArgsAreDescendantNodes::value,
8073 "All arguments passed to set(...) must be descendant nodes.");
8074
8075 static_assert(
8076 AllArgsDecayedAreUnique<Args...>::value,
8077 "Found duplicate types among the arguments passed to set(...). "
8078 "Types should be listed at most once.");
8079
8080 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8081 }
8082
8095#ifndef NO_DOC
8096 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8097#else
8098 template<typename... Args>
8099#endif
8100 Removal copyWith(Args &&...args) const
8101 {
8102 using namespace Zivid::Detail::TypeTraits;
8103
8104 using AllArgsAreDescendantNodes =
8105 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8106 static_assert(
8107 AllArgsAreDescendantNodes::value,
8108 "All arguments passed to copyWith(...) must be descendant nodes.");
8109
8110 static_assert(
8111 AllArgsDecayedAreUnique<Args...>::value,
8112 "Found duplicate types among the arguments passed to copyWith(...). "
8113 "Types should be listed at most once.");
8114
8115 auto copy{ *this };
8116 copy.set(std::forward<Args>(args)...);
8117 return copy;
8118 }
8119
8121 const Enabled &isEnabled() const
8122 {
8123 return m_enabled;
8124 }
8125
8128 {
8129 return m_enabled;
8130 }
8131
8133 Removal &set(const Enabled &value)
8134 {
8135 m_enabled = value;
8136 return *this;
8137 }
8138
8140 const Threshold &threshold() const
8141 {
8142 return m_threshold;
8143 }
8144
8147 {
8148 return m_threshold;
8149 }
8150
8152 Removal &set(const Threshold &value)
8153 {
8154 m_threshold = value;
8155 return *this;
8156 }
8157
8158 template<
8159 typename T,
8160 typename std::enable_if<
8161 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8162 int>::type = 0>
8164 {
8165 return m_enabled;
8166 }
8167
8168 template<
8169 typename T,
8170 typename std::enable_if<
8171 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8172 int>::type = 0>
8174 {
8175 return m_threshold;
8176 }
8177
8178 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8180 {
8181 return m_enabled;
8182 }
8183
8184 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8186 {
8187 return m_threshold;
8188 }
8189
8191 template<typename F>
8192 void forEach(const F &f) const
8193 {
8194 f(m_enabled);
8195 f(m_threshold);
8196 }
8197
8199 template<typename F>
8200 void forEach(const F &f)
8201 {
8202 f(m_enabled);
8203 f(m_threshold);
8204 }
8205
8207 bool operator==(const Removal &other) const;
8208
8210 bool operator!=(const Removal &other) const;
8211
8213 std::string toString() const;
8214
8216 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8217 {
8218 return stream << value.toString();
8219 }
8220
8221 private:
8222 void setFromString(const std::string &value);
8223
8224 void setFromString(const std::string &fullPath, const std::string &value);
8225
8226 std::string getString(const std::string &fullPath) const;
8227
8228 Enabled m_enabled;
8229 Threshold m_threshold;
8230
8231 friend struct DataModel::Detail::Befriend<Removal>;
8232 };
8233
8234 using Descendants = std::tuple<
8238
8241
8255#ifndef NO_DOC
8256 template<
8257 typename... Args,
8258 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8259 typename std::enable_if<
8260 Zivid::Detail::TypeTraits::
8261 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8262 int>::type = 0>
8263#else
8264 template<typename... Args>
8265#endif
8266 explicit Outlier(Args &&...args)
8267 {
8268 using namespace Zivid::Detail::TypeTraits;
8269
8270 static_assert(
8271 AllArgsDecayedAreUnique<Args...>::value,
8272 "Found duplicate types among the arguments passed to Outlier(...). "
8273 "Types should be listed at most once.");
8274
8275 set(std::forward<Args>(args)...);
8276 }
8277
8290#ifndef NO_DOC
8291 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8292#else
8293 template<typename... Args>
8294#endif
8295 void set(Args &&...args)
8296 {
8297 using namespace Zivid::Detail::TypeTraits;
8298
8299 using AllArgsAreDescendantNodes =
8300 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8301 static_assert(
8302 AllArgsAreDescendantNodes::value,
8303 "All arguments passed to set(...) must be descendant nodes.");
8304
8305 static_assert(
8306 AllArgsDecayedAreUnique<Args...>::value,
8307 "Found duplicate types among the arguments passed to set(...). "
8308 "Types should be listed at most once.");
8309
8310 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8311 }
8312
8326#ifndef NO_DOC
8327 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8328#else
8329 template<typename... Args>
8330#endif
8331 Outlier copyWith(Args &&...args) const
8332 {
8333 using namespace Zivid::Detail::TypeTraits;
8334
8335 using AllArgsAreDescendantNodes =
8336 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8337 static_assert(
8338 AllArgsAreDescendantNodes::value,
8339 "All arguments passed to copyWith(...) must be descendant nodes.");
8340
8341 static_assert(
8342 AllArgsDecayedAreUnique<Args...>::value,
8343 "Found duplicate types among the arguments passed to copyWith(...). "
8344 "Types should be listed at most once.");
8345
8346 auto copy{ *this };
8347 copy.set(std::forward<Args>(args)...);
8348 return copy;
8349 }
8350
8352 const Removal &removal() const
8353 {
8354 return m_removal;
8355 }
8356
8359 {
8360 return m_removal;
8361 }
8362
8364 Outlier &set(const Removal &value)
8365 {
8366 m_removal = value;
8367 return *this;
8368 }
8369
8372 {
8373 m_removal.set(value);
8374 return *this;
8375 }
8376
8379 {
8380 m_removal.set(value);
8381 return *this;
8382 }
8383
8384 template<
8385 typename T,
8386 typename std::enable_if<
8387 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8388 int>::type = 0>
8390 {
8391 return m_removal;
8392 }
8393
8394 template<
8395 typename T,
8396 typename std::enable_if<
8397 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8398 int>::type = 0>
8400 {
8402 }
8403
8404 template<
8405 typename T,
8406 typename std::enable_if<
8407 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8408 int>::type = 0>
8410 {
8412 }
8413
8414 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8416 {
8417 return m_removal;
8418 }
8419
8421 template<typename F>
8422 void forEach(const F &f) const
8423 {
8424 f(m_removal);
8425 }
8426
8428 template<typename F>
8429 void forEach(const F &f)
8430 {
8431 f(m_removal);
8432 }
8433
8435 bool operator==(const Outlier &other) const;
8436
8438 bool operator!=(const Outlier &other) const;
8439
8441 std::string toString() const;
8442
8444 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
8445 {
8446 return stream << value.toString();
8447 }
8448
8449 private:
8450 void setFromString(const std::string &value);
8451
8452 void setFromString(const std::string &fullPath, const std::string &value);
8453
8454 std::string getString(const std::string &fullPath) const;
8455
8456 Removal m_removal;
8457
8458 friend struct DataModel::Detail::Befriend<Outlier>;
8459 };
8460
8462
8463 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8465 {
8466 public:
8468 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8469
8471 static constexpr const char *path{ "Processing/Filters/Reflection" };
8472
8474 static constexpr const char *name{ "Reflection" };
8475
8477 static constexpr const char *description{
8478 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials))description"
8479 };
8480
8482
8483 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8485 {
8486 public:
8488 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8489
8491 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
8492
8494 static constexpr const char *name{ "Removal" };
8495
8497 static constexpr const char *description{
8498 R"description(Discard points likely introduced by reflections (useful for shiny materials))description"
8499 };
8500
8502
8503 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8505 {
8506 public:
8508 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8509
8511 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
8512
8514 static constexpr const char *name{ "Enabled" };
8515
8517 static constexpr const char *description{
8518 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate)description"
8519 };
8520
8522 using ValueType = bool;
8523 static const Enabled yes;
8524 static const Enabled no;
8525
8527 static std::set<bool> validValues()
8528 {
8529 return { false, true };
8530 }
8531
8533 Enabled() = default;
8534
8536 explicit constexpr Enabled(bool value)
8537 : m_opt{ value }
8538 {}
8539
8544 bool value() const;
8545
8547 bool hasValue() const;
8548
8550 void reset();
8551
8553 std::string toString() const;
8554
8556 bool operator==(const Enabled &other) const
8557 {
8558 return m_opt == other.m_opt;
8559 }
8560
8562 bool operator!=(const Enabled &other) const
8563 {
8564 return m_opt != other.m_opt;
8565 }
8566
8568 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8569 {
8570 return stream << value.toString();
8571 }
8572
8573 private:
8574 void setFromString(const std::string &value);
8575
8576 Zivid::DataModel::Detail::Optional<bool> m_opt;
8577
8578 friend struct DataModel::Detail::Befriend<Enabled>;
8579 };
8580
8582
8583 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8585 {
8586 public:
8588 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8589
8591 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Experimental" };
8592
8594 static constexpr const char *name{ "Experimental" };
8595
8597 static constexpr const char *description{
8598 R"description(Experimental reflection filter related settings)description"
8599 };
8600
8609
8610 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8612 {
8613 public:
8615 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8616
8618 static constexpr const char *path{
8619 "Processing/Filters/Reflection/Removal/Experimental/Mode"
8620 };
8621
8623 static constexpr const char *name{ "Mode" };
8624
8626 static constexpr const char *description{
8627 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
8628on thinner objects, generally removes more reflection artifacts and processes faster than
8629the Global filter. The Global filter is generally better at removing outlier points in
8630the point cloud. It is advised to use the Outlier filter together with the Local
8631Reflection filter.
8632
8633Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
8634)description"
8635 };
8636
8638 enum class ValueType
8639 {
8640 global,
8641 local
8642 };
8643 static const Mode global;
8644 static const Mode local;
8645
8647 static std::set<ValueType> validValues()
8648 {
8649 return { ValueType::global, ValueType::local };
8650 }
8651
8653 Mode() = default;
8654
8656 explicit constexpr Mode(ValueType value)
8657 : m_opt{ verifyValue(value) }
8658 {}
8659
8665
8667 bool hasValue() const;
8668
8670 void reset();
8671
8673 std::string toString() const;
8674
8676 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8677 {
8678 return stream << Mode{ value }.toString();
8679 }
8680
8682 bool operator==(const Mode &other) const
8683 {
8684 return m_opt == other.m_opt;
8685 }
8686
8688 bool operator!=(const Mode &other) const
8689 {
8690 return m_opt != other.m_opt;
8691 }
8692
8694 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8695 {
8696 return stream << value.toString();
8697 }
8698
8699 private:
8700 void setFromString(const std::string &value);
8701
8702 constexpr ValueType static verifyValue(const ValueType &value)
8703 {
8704 return value == ValueType::global || value == ValueType::local
8705 ? value
8706 : throw std::invalid_argument{
8707 "Invalid value: Mode{ "
8708 + std::to_string(
8709 static_cast<std::underlying_type<ValueType>::type>(value))
8710 + " }"
8711 };
8712 }
8713
8714 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
8715
8716 friend struct DataModel::Detail::Befriend<Mode>;
8717 };
8718
8720 std::tuple<Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>;
8721
8724
8736#ifndef NO_DOC
8737 template<
8738 typename... Args,
8739 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8740 typename std::enable_if<
8741 Zivid::Detail::TypeTraits::
8742 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8743 int>::type = 0>
8744#else
8745 template<typename... Args>
8746#endif
8747 explicit Experimental(Args &&...args)
8748 {
8749 using namespace Zivid::Detail::TypeTraits;
8750
8751 static_assert(
8752 AllArgsDecayedAreUnique<Args...>::value,
8753 "Found duplicate types among the arguments passed to Experimental(...). "
8754 "Types should be listed at most once.");
8755
8756 set(std::forward<Args>(args)...);
8757 }
8758
8769#ifndef NO_DOC
8770 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8771#else
8772 template<typename... Args>
8773#endif
8774 void set(Args &&...args)
8775 {
8776 using namespace Zivid::Detail::TypeTraits;
8777
8778 using AllArgsAreDescendantNodes =
8779 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8780 static_assert(
8781 AllArgsAreDescendantNodes::value,
8782 "All arguments passed to set(...) must be descendant nodes.");
8783
8784 static_assert(
8785 AllArgsDecayedAreUnique<Args...>::value,
8786 "Found duplicate types among the arguments passed to set(...). "
8787 "Types should be listed at most once.");
8788
8789 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8790 }
8791
8803#ifndef NO_DOC
8804 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8805#else
8806 template<typename... Args>
8807#endif
8808 Experimental copyWith(Args &&...args) const
8809 {
8810 using namespace Zivid::Detail::TypeTraits;
8811
8812 using AllArgsAreDescendantNodes =
8813 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8814 static_assert(
8815 AllArgsAreDescendantNodes::value,
8816 "All arguments passed to copyWith(...) must be descendant nodes.");
8817
8818 static_assert(
8819 AllArgsDecayedAreUnique<Args...>::value,
8820 "Found duplicate types among the arguments passed to copyWith(...). "
8821 "Types should be listed at most once.");
8822
8823 auto copy{ *this };
8824 copy.set(std::forward<Args>(args)...);
8825 return copy;
8826 }
8827
8829 const Mode &mode() const
8830 {
8831 return m_mode;
8832 }
8833
8836 {
8837 return m_mode;
8838 }
8839
8841 Experimental &set(const Mode &value)
8842 {
8843 m_mode = value;
8844 return *this;
8845 }
8846
8847 template<
8848 typename T,
8849 typename std::enable_if<
8850 std::is_same<
8851 T,
8853 int>::type = 0>
8855 {
8856 return m_mode;
8857 }
8858
8859 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8861 {
8862 return m_mode;
8863 }
8864
8866 template<typename F>
8867 void forEach(const F &f) const
8868 {
8869 f(m_mode);
8870 }
8871
8873 template<typename F>
8874 void forEach(const F &f)
8875 {
8876 f(m_mode);
8877 }
8878
8880 bool operator==(const Experimental &other) const;
8881
8883 bool operator!=(const Experimental &other) const;
8884
8886 std::string toString() const;
8887
8889 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
8890 {
8891 return stream << value.toString();
8892 }
8893
8894 private:
8895 void setFromString(const std::string &value);
8896
8897 void setFromString(const std::string &fullPath, const std::string &value);
8898
8899 std::string getString(const std::string &fullPath) const;
8900
8901 Mode m_mode;
8902
8903 friend struct DataModel::Detail::Befriend<Experimental>;
8904 };
8905
8906 using Descendants = std::tuple<
8910
8913
8927#ifndef NO_DOC
8928 template<
8929 typename... Args,
8930 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8931 typename std::enable_if<
8932 Zivid::Detail::TypeTraits::
8933 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8934 int>::type = 0>
8935#else
8936 template<typename... Args>
8937#endif
8938 explicit Removal(Args &&...args)
8939 {
8940 using namespace Zivid::Detail::TypeTraits;
8941
8942 static_assert(
8943 AllArgsDecayedAreUnique<Args...>::value,
8944 "Found duplicate types among the arguments passed to Removal(...). "
8945 "Types should be listed at most once.");
8946
8947 set(std::forward<Args>(args)...);
8948 }
8949
8962#ifndef NO_DOC
8963 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8964#else
8965 template<typename... Args>
8966#endif
8967 void set(Args &&...args)
8968 {
8969 using namespace Zivid::Detail::TypeTraits;
8970
8971 using AllArgsAreDescendantNodes =
8972 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8973 static_assert(
8974 AllArgsAreDescendantNodes::value,
8975 "All arguments passed to set(...) must be descendant nodes.");
8976
8977 static_assert(
8978 AllArgsDecayedAreUnique<Args...>::value,
8979 "Found duplicate types among the arguments passed to set(...). "
8980 "Types should be listed at most once.");
8981
8982 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8983 }
8984
8998#ifndef NO_DOC
8999 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9000#else
9001 template<typename... Args>
9002#endif
9003 Removal copyWith(Args &&...args) const
9004 {
9005 using namespace Zivid::Detail::TypeTraits;
9006
9007 using AllArgsAreDescendantNodes =
9008 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9009 static_assert(
9010 AllArgsAreDescendantNodes::value,
9011 "All arguments passed to copyWith(...) must be descendant nodes.");
9012
9013 static_assert(
9014 AllArgsDecayedAreUnique<Args...>::value,
9015 "Found duplicate types among the arguments passed to copyWith(...). "
9016 "Types should be listed at most once.");
9017
9018 auto copy{ *this };
9019 copy.set(std::forward<Args>(args)...);
9020 return copy;
9021 }
9022
9024 const Enabled &isEnabled() const
9025 {
9026 return m_enabled;
9027 }
9028
9031 {
9032 return m_enabled;
9033 }
9034
9036 Removal &set(const Enabled &value)
9037 {
9038 m_enabled = value;
9039 return *this;
9040 }
9041
9044 {
9045 return m_experimental;
9046 }
9047
9050 {
9051 return m_experimental;
9052 }
9053
9055 Removal &set(const Experimental &value)
9056 {
9057 m_experimental = value;
9058 return *this;
9059 }
9060
9063 {
9064 m_experimental.set(value);
9065 return *this;
9066 }
9067
9068 template<
9069 typename T,
9070 typename std::enable_if<
9071 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9072 int>::type = 0>
9074 {
9075 return m_enabled;
9076 }
9077
9078 template<
9079 typename T,
9080 typename std::enable_if<
9081 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::
9082 value,
9083 int>::type = 0>
9085 {
9086 return m_experimental;
9087 }
9088
9089 template<
9090 typename T,
9091 typename std::enable_if<
9092 std::is_same<
9093 T,
9095 int>::type = 0>
9097 {
9098 return m_experimental
9100 }
9101
9102 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9104 {
9105 return m_enabled;
9106 }
9107
9108 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9110 {
9111 return m_experimental;
9112 }
9113
9115 template<typename F>
9116 void forEach(const F &f) const
9117 {
9118 f(m_enabled);
9119 f(m_experimental);
9120 }
9121
9123 template<typename F>
9124 void forEach(const F &f)
9125 {
9126 f(m_enabled);
9127 f(m_experimental);
9128 }
9129
9131 bool operator==(const Removal &other) const;
9132
9134 bool operator!=(const Removal &other) const;
9135
9137 std::string toString() const;
9138
9140 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
9141 {
9142 return stream << value.toString();
9143 }
9144
9145 private:
9146 void setFromString(const std::string &value);
9147
9148 void setFromString(const std::string &fullPath, const std::string &value);
9149
9150 std::string getString(const std::string &fullPath) const;
9151
9152 Enabled m_enabled;
9153 Experimental m_experimental;
9154
9155 friend struct DataModel::Detail::Befriend<Removal>;
9156 };
9157
9158 using Descendants = std::tuple<
9163
9166
9181#ifndef NO_DOC
9182 template<
9183 typename... Args,
9184 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9185 typename std::enable_if<
9186 Zivid::Detail::TypeTraits::
9187 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9188 int>::type = 0>
9189#else
9190 template<typename... Args>
9191#endif
9192 explicit Reflection(Args &&...args)
9193 {
9194 using namespace Zivid::Detail::TypeTraits;
9195
9196 static_assert(
9197 AllArgsDecayedAreUnique<Args...>::value,
9198 "Found duplicate types among the arguments passed to Reflection(...). "
9199 "Types should be listed at most once.");
9200
9201 set(std::forward<Args>(args)...);
9202 }
9203
9217#ifndef NO_DOC
9218 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9219#else
9220 template<typename... Args>
9221#endif
9222 void set(Args &&...args)
9223 {
9224 using namespace Zivid::Detail::TypeTraits;
9225
9226 using AllArgsAreDescendantNodes =
9227 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9228 static_assert(
9229 AllArgsAreDescendantNodes::value,
9230 "All arguments passed to set(...) must be descendant nodes.");
9231
9232 static_assert(
9233 AllArgsDecayedAreUnique<Args...>::value,
9234 "Found duplicate types among the arguments passed to set(...). "
9235 "Types should be listed at most once.");
9236
9237 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9238 }
9239
9254#ifndef NO_DOC
9255 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9256#else
9257 template<typename... Args>
9258#endif
9259 Reflection copyWith(Args &&...args) const
9260 {
9261 using namespace Zivid::Detail::TypeTraits;
9262
9263 using AllArgsAreDescendantNodes =
9264 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9265 static_assert(
9266 AllArgsAreDescendantNodes::value,
9267 "All arguments passed to copyWith(...) must be descendant nodes.");
9268
9269 static_assert(
9270 AllArgsDecayedAreUnique<Args...>::value,
9271 "Found duplicate types among the arguments passed to copyWith(...). "
9272 "Types should be listed at most once.");
9273
9274 auto copy{ *this };
9275 copy.set(std::forward<Args>(args)...);
9276 return copy;
9277 }
9278
9280 const Removal &removal() const
9281 {
9282 return m_removal;
9283 }
9284
9287 {
9288 return m_removal;
9289 }
9290
9292 Reflection &set(const Removal &value)
9293 {
9294 m_removal = value;
9295 return *this;
9296 }
9297
9300 {
9301 m_removal.set(value);
9302 return *this;
9303 }
9304
9307 {
9308 m_removal.set(value);
9309 return *this;
9310 }
9311
9314 {
9315 m_removal.set(value);
9316 return *this;
9317 }
9318
9319 template<
9320 typename T,
9321 typename std::enable_if<
9322 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9323 int>::type = 0>
9325 {
9326 return m_removal;
9327 }
9328
9329 template<
9330 typename T,
9331 typename std::enable_if<
9332 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9333 int>::type = 0>
9335 {
9337 }
9338
9339 template<
9340 typename T,
9341 typename std::enable_if<
9342 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
9343 int>::type = 0>
9345 {
9347 }
9348
9349 template<
9350 typename T,
9351 typename std::enable_if<
9352 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::
9353 value,
9354 int>::type = 0>
9356 {
9358 }
9359
9360 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9362 {
9363 return m_removal;
9364 }
9365
9367 template<typename F>
9368 void forEach(const F &f) const
9369 {
9370 f(m_removal);
9371 }
9372
9374 template<typename F>
9375 void forEach(const F &f)
9376 {
9377 f(m_removal);
9378 }
9379
9381 bool operator==(const Reflection &other) const;
9382
9384 bool operator!=(const Reflection &other) const;
9385
9387 std::string toString() const;
9388
9390 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9391 {
9392 return stream << value.toString();
9393 }
9394
9395 private:
9396 void setFromString(const std::string &value);
9397
9398 void setFromString(const std::string &fullPath, const std::string &value);
9399
9400 std::string getString(const std::string &fullPath) const;
9401
9402 Removal m_removal;
9403
9404 friend struct DataModel::Detail::Befriend<Reflection>;
9405 };
9406
9408
9409 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9411 {
9412 public:
9414 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9415
9417 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9418
9420 static constexpr const char *name{ "Smoothing" };
9421
9423 static constexpr const char *description{ R"description(Smoothing filters)description" };
9424
9426
9427 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9429 {
9430 public:
9432 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9433
9435 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9436
9438 static constexpr const char *name{ "Gaussian" };
9439
9441 static constexpr const char *description{
9442 R"description(Gaussian smoothing of the point cloud)description"
9443 };
9444
9446
9447 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9449 {
9450 public:
9452 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9453
9455 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9456
9458 static constexpr const char *name{ "Enabled" };
9459
9461 static constexpr const char *description{
9462 R"description(Enable or disable the smoothing filter)description"
9463 };
9464
9466 using ValueType = bool;
9467 static const Enabled yes;
9468 static const Enabled no;
9469
9471 static std::set<bool> validValues()
9472 {
9473 return { false, true };
9474 }
9475
9477 Enabled() = default;
9478
9480 explicit constexpr Enabled(bool value)
9481 : m_opt{ value }
9482 {}
9483
9488 bool value() const;
9489
9491 bool hasValue() const;
9492
9494 void reset();
9495
9497 std::string toString() const;
9498
9500 bool operator==(const Enabled &other) const
9501 {
9502 return m_opt == other.m_opt;
9503 }
9504
9506 bool operator!=(const Enabled &other) const
9507 {
9508 return m_opt != other.m_opt;
9509 }
9510
9512 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9513 {
9514 return stream << value.toString();
9515 }
9516
9517 private:
9518 void setFromString(const std::string &value);
9519
9520 Zivid::DataModel::Detail::Optional<bool> m_opt;
9521
9522 friend struct DataModel::Detail::Befriend<Enabled>;
9523 };
9524
9526
9527 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9529 {
9530 public:
9532 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9533
9535 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9536
9538 static constexpr const char *name{ "Sigma" };
9539
9541 static constexpr const char *description{
9542 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients))description"
9543 };
9544
9546 using ValueType = double;
9547
9549 static constexpr Range<double> validRange()
9550 {
9551 return { 0.5, 5 };
9552 }
9553
9555 Sigma() = default;
9556
9558 explicit constexpr Sigma(double value)
9559 : m_opt{ verifyValue(value) }
9560 {}
9561
9566 double value() const;
9567
9569 bool hasValue() const;
9570
9572 void reset();
9573
9575 std::string toString() const;
9576
9578 bool operator==(const Sigma &other) const
9579 {
9580 return m_opt == other.m_opt;
9581 }
9582
9584 bool operator!=(const Sigma &other) const
9585 {
9586 return m_opt != other.m_opt;
9587 }
9588
9590 bool operator<(const Sigma &other) const
9591 {
9592 return m_opt < other.m_opt;
9593 }
9594
9596 bool operator>(const Sigma &other) const
9597 {
9598 return m_opt > other.m_opt;
9599 }
9600
9602 bool operator<=(const Sigma &other) const
9603 {
9604 return m_opt <= other.m_opt;
9605 }
9606
9608 bool operator>=(const Sigma &other) const
9609 {
9610 return m_opt >= other.m_opt;
9611 }
9612
9614 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9615 {
9616 return stream << value.toString();
9617 }
9618
9619 private:
9620 void setFromString(const std::string &value);
9621
9622 constexpr ValueType static verifyValue(const ValueType &value)
9623 {
9624 return validRange().isInRange(value)
9625 ? value
9626 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9627 + " } is not in range ["
9628 + std::to_string(validRange().min()) + ", "
9629 + std::to_string(validRange().max()) + "]" };
9630 }
9631
9632 Zivid::DataModel::Detail::Optional<double> m_opt;
9633
9634 friend struct DataModel::Detail::Befriend<Sigma>;
9635 };
9636
9637 using Descendants = std::tuple<
9640
9643
9656#ifndef NO_DOC
9657 template<
9658 typename... Args,
9659 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9660 typename std::enable_if<
9661 Zivid::Detail::TypeTraits::
9662 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9663 int>::type = 0>
9664#else
9665 template<typename... Args>
9666#endif
9667 explicit Gaussian(Args &&...args)
9668 {
9669 using namespace Zivid::Detail::TypeTraits;
9670
9671 static_assert(
9672 AllArgsDecayedAreUnique<Args...>::value,
9673 "Found duplicate types among the arguments passed to Gaussian(...). "
9674 "Types should be listed at most once.");
9675
9676 set(std::forward<Args>(args)...);
9677 }
9678
9690#ifndef NO_DOC
9691 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9692#else
9693 template<typename... Args>
9694#endif
9695 void set(Args &&...args)
9696 {
9697 using namespace Zivid::Detail::TypeTraits;
9698
9699 using AllArgsAreDescendantNodes =
9700 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9701 static_assert(
9702 AllArgsAreDescendantNodes::value,
9703 "All arguments passed to set(...) must be descendant nodes.");
9704
9705 static_assert(
9706 AllArgsDecayedAreUnique<Args...>::value,
9707 "Found duplicate types among the arguments passed to set(...). "
9708 "Types should be listed at most once.");
9709
9710 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9711 }
9712
9725#ifndef NO_DOC
9726 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9727#else
9728 template<typename... Args>
9729#endif
9730 Gaussian copyWith(Args &&...args) const
9731 {
9732 using namespace Zivid::Detail::TypeTraits;
9733
9734 using AllArgsAreDescendantNodes =
9735 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9736 static_assert(
9737 AllArgsAreDescendantNodes::value,
9738 "All arguments passed to copyWith(...) must be descendant nodes.");
9739
9740 static_assert(
9741 AllArgsDecayedAreUnique<Args...>::value,
9742 "Found duplicate types among the arguments passed to copyWith(...). "
9743 "Types should be listed at most once.");
9744
9745 auto copy{ *this };
9746 copy.set(std::forward<Args>(args)...);
9747 return copy;
9748 }
9749
9751 const Enabled &isEnabled() const
9752 {
9753 return m_enabled;
9754 }
9755
9758 {
9759 return m_enabled;
9760 }
9761
9763 Gaussian &set(const Enabled &value)
9764 {
9765 m_enabled = value;
9766 return *this;
9767 }
9768
9770 const Sigma &sigma() const
9771 {
9772 return m_sigma;
9773 }
9774
9777 {
9778 return m_sigma;
9779 }
9780
9782 Gaussian &set(const Sigma &value)
9783 {
9784 m_sigma = value;
9785 return *this;
9786 }
9787
9788 template<
9789 typename T,
9790 typename std::enable_if<
9791 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9792 int>::type = 0>
9794 {
9795 return m_enabled;
9796 }
9797
9798 template<
9799 typename T,
9800 typename std::enable_if<
9801 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9802 int>::type = 0>
9804 {
9805 return m_sigma;
9806 }
9807
9808 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9810 {
9811 return m_enabled;
9812 }
9813
9814 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9816 {
9817 return m_sigma;
9818 }
9819
9821 template<typename F>
9822 void forEach(const F &f) const
9823 {
9824 f(m_enabled);
9825 f(m_sigma);
9826 }
9827
9829 template<typename F>
9830 void forEach(const F &f)
9831 {
9832 f(m_enabled);
9833 f(m_sigma);
9834 }
9835
9837 bool operator==(const Gaussian &other) const;
9838
9840 bool operator!=(const Gaussian &other) const;
9841
9843 std::string toString() const;
9844
9846 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9847 {
9848 return stream << value.toString();
9849 }
9850
9851 private:
9852 void setFromString(const std::string &value);
9853
9854 void setFromString(const std::string &fullPath, const std::string &value);
9855
9856 std::string getString(const std::string &fullPath) const;
9857
9858 Enabled m_enabled;
9859 Sigma m_sigma;
9860
9861 friend struct DataModel::Detail::Befriend<Gaussian>;
9862 };
9863
9864 using Descendants = std::tuple<
9868
9871
9885#ifndef NO_DOC
9886 template<
9887 typename... Args,
9888 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9889 typename std::enable_if<
9890 Zivid::Detail::TypeTraits::
9891 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9892 int>::type = 0>
9893#else
9894 template<typename... Args>
9895#endif
9896 explicit Smoothing(Args &&...args)
9897 {
9898 using namespace Zivid::Detail::TypeTraits;
9899
9900 static_assert(
9901 AllArgsDecayedAreUnique<Args...>::value,
9902 "Found duplicate types among the arguments passed to Smoothing(...). "
9903 "Types should be listed at most once.");
9904
9905 set(std::forward<Args>(args)...);
9906 }
9907
9920#ifndef NO_DOC
9921 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9922#else
9923 template<typename... Args>
9924#endif
9925 void set(Args &&...args)
9926 {
9927 using namespace Zivid::Detail::TypeTraits;
9928
9929 using AllArgsAreDescendantNodes =
9930 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9931 static_assert(
9932 AllArgsAreDescendantNodes::value,
9933 "All arguments passed to set(...) must be descendant nodes.");
9934
9935 static_assert(
9936 AllArgsDecayedAreUnique<Args...>::value,
9937 "Found duplicate types among the arguments passed to set(...). "
9938 "Types should be listed at most once.");
9939
9940 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9941 }
9942
9956#ifndef NO_DOC
9957 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9958#else
9959 template<typename... Args>
9960#endif
9961 Smoothing copyWith(Args &&...args) const
9962 {
9963 using namespace Zivid::Detail::TypeTraits;
9964
9965 using AllArgsAreDescendantNodes =
9966 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9967 static_assert(
9968 AllArgsAreDescendantNodes::value,
9969 "All arguments passed to copyWith(...) must be descendant nodes.");
9970
9971 static_assert(
9972 AllArgsDecayedAreUnique<Args...>::value,
9973 "Found duplicate types among the arguments passed to copyWith(...). "
9974 "Types should be listed at most once.");
9975
9976 auto copy{ *this };
9977 copy.set(std::forward<Args>(args)...);
9978 return copy;
9979 }
9980
9982 const Gaussian &gaussian() const
9983 {
9984 return m_gaussian;
9985 }
9986
9989 {
9990 return m_gaussian;
9991 }
9992
9994 Smoothing &set(const Gaussian &value)
9995 {
9996 m_gaussian = value;
9997 return *this;
9998 }
9999
10002 {
10003 m_gaussian.set(value);
10004 return *this;
10005 }
10006
10009 {
10010 m_gaussian.set(value);
10011 return *this;
10012 }
10013
10014 template<
10015 typename T,
10016 typename std::enable_if<
10017 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
10018 int>::type = 0>
10020 {
10021 return m_gaussian;
10022 }
10023
10024 template<
10025 typename T,
10026 typename std::enable_if<
10027 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10028 int>::type = 0>
10030 {
10032 }
10033
10034 template<
10035 typename T,
10036 typename std::enable_if<
10037 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10038 int>::type = 0>
10040 {
10042 }
10043
10044 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
10046 {
10047 return m_gaussian;
10048 }
10049
10051 template<typename F>
10052 void forEach(const F &f) const
10053 {
10054 f(m_gaussian);
10055 }
10056
10058 template<typename F>
10059 void forEach(const F &f)
10060 {
10061 f(m_gaussian);
10062 }
10063
10065 bool operator==(const Smoothing &other) const;
10066
10068 bool operator!=(const Smoothing &other) const;
10069
10071 std::string toString() const;
10072
10074 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
10075 {
10076 return stream << value.toString();
10077 }
10078
10079 private:
10080 void setFromString(const std::string &value);
10081
10082 void setFromString(const std::string &fullPath, const std::string &value);
10083
10084 std::string getString(const std::string &fullPath) const;
10085
10086 Gaussian m_gaussian;
10087
10088 friend struct DataModel::Detail::Befriend<Smoothing>;
10089 };
10090
10091 using Descendants = std::tuple<
10130
10133
10182#ifndef NO_DOC
10183 template<
10184 typename... Args,
10185 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
10186 typename std::enable_if<
10187 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
10188 value,
10189 int>::type = 0>
10190#else
10191 template<typename... Args>
10192#endif
10193 explicit Filters(Args &&...args)
10194 {
10195 using namespace Zivid::Detail::TypeTraits;
10196
10197 static_assert(
10198 AllArgsDecayedAreUnique<Args...>::value,
10199 "Found duplicate types among the arguments passed to Filters(...). "
10200 "Types should be listed at most once.");
10201
10202 set(std::forward<Args>(args)...);
10203 }
10204
10252#ifndef NO_DOC
10253 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
10254#else
10255 template<typename... Args>
10256#endif
10257 void set(Args &&...args)
10258 {
10259 using namespace Zivid::Detail::TypeTraits;
10260
10261 using AllArgsAreDescendantNodes =
10262 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10263 static_assert(
10264 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
10265
10266 static_assert(
10267 AllArgsDecayedAreUnique<Args...>::value,
10268 "Found duplicate types among the arguments passed to set(...). "
10269 "Types should be listed at most once.");
10270
10271 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
10272 }
10273
10322#ifndef NO_DOC
10323 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10324#else
10325 template<typename... Args>
10326#endif
10327 Filters copyWith(Args &&...args) const
10328 {
10329 using namespace Zivid::Detail::TypeTraits;
10330
10331 using AllArgsAreDescendantNodes =
10332 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10333 static_assert(
10334 AllArgsAreDescendantNodes::value,
10335 "All arguments passed to copyWith(...) must be descendant nodes.");
10336
10337 static_assert(
10338 AllArgsDecayedAreUnique<Args...>::value,
10339 "Found duplicate types among the arguments passed to copyWith(...). "
10340 "Types should be listed at most once.");
10341
10342 auto copy{ *this };
10343 copy.set(std::forward<Args>(args)...);
10344 return copy;
10345 }
10346
10348 const Cluster &cluster() const
10349 {
10350 return m_cluster;
10351 }
10352
10355 {
10356 return m_cluster;
10357 }
10358
10360 Filters &set(const Cluster &value)
10361 {
10362 m_cluster = value;
10363 return *this;
10364 }
10365
10368 {
10369 m_cluster.set(value);
10370 return *this;
10371 }
10372
10375 {
10376 m_cluster.set(value);
10377 return *this;
10378 }
10379
10382 {
10383 m_cluster.set(value);
10384 return *this;
10385 }
10386
10389 {
10390 m_cluster.set(value);
10391 return *this;
10392 }
10393
10396 {
10397 return m_experimental;
10398 }
10399
10402 {
10403 return m_experimental;
10404 }
10405
10407 Filters &set(const Experimental &value)
10408 {
10409 m_experimental = value;
10410 return *this;
10411 }
10412
10415 {
10416 m_experimental.set(value);
10417 return *this;
10418 }
10419
10422 {
10423 m_experimental.set(value);
10424 return *this;
10425 }
10426
10429 {
10430 m_experimental.set(value);
10431 return *this;
10432 }
10433
10436 {
10437 m_experimental.set(value);
10438 return *this;
10439 }
10440
10443 {
10444 m_experimental.set(value);
10445 return *this;
10446 }
10447
10450 {
10451 m_experimental.set(value);
10452 return *this;
10453 }
10454
10457 {
10458 m_experimental.set(value);
10459 return *this;
10460 }
10461
10464 {
10465 m_experimental.set(value);
10466 return *this;
10467 }
10468
10471 {
10472 m_experimental.set(value);
10473 return *this;
10474 }
10475
10478 {
10479 m_experimental.set(value);
10480 return *this;
10481 }
10482
10485 {
10486 m_experimental.set(value);
10487 return *this;
10488 }
10489
10491 const Noise &noise() const
10492 {
10493 return m_noise;
10494 }
10495
10498 {
10499 return m_noise;
10500 }
10501
10503 Filters &set(const Noise &value)
10504 {
10505 m_noise = value;
10506 return *this;
10507 }
10508
10511 {
10512 m_noise.set(value);
10513 return *this;
10514 }
10515
10518 {
10519 m_noise.set(value);
10520 return *this;
10521 }
10522
10525 {
10526 m_noise.set(value);
10527 return *this;
10528 }
10529
10532 {
10533 m_noise.set(value);
10534 return *this;
10535 }
10536
10539 {
10540 m_noise.set(value);
10541 return *this;
10542 }
10543
10546 {
10547 m_noise.set(value);
10548 return *this;
10549 }
10550
10553 {
10554 m_noise.set(value);
10555 return *this;
10556 }
10557
10559 const Outlier &outlier() const
10560 {
10561 return m_outlier;
10562 }
10563
10566 {
10567 return m_outlier;
10568 }
10569
10571 Filters &set(const Outlier &value)
10572 {
10573 m_outlier = value;
10574 return *this;
10575 }
10576
10579 {
10580 m_outlier.set(value);
10581 return *this;
10582 }
10583
10586 {
10587 m_outlier.set(value);
10588 return *this;
10589 }
10590
10593 {
10594 m_outlier.set(value);
10595 return *this;
10596 }
10597
10599 const Reflection &reflection() const
10600 {
10601 return m_reflection;
10602 }
10603
10606 {
10607 return m_reflection;
10608 }
10609
10611 Filters &set(const Reflection &value)
10612 {
10613 m_reflection = value;
10614 return *this;
10615 }
10616
10619 {
10620 m_reflection.set(value);
10621 return *this;
10622 }
10623
10626 {
10627 m_reflection.set(value);
10628 return *this;
10629 }
10630
10633 {
10634 m_reflection.set(value);
10635 return *this;
10636 }
10637
10640 {
10641 m_reflection.set(value);
10642 return *this;
10643 }
10644
10646 const Smoothing &smoothing() const
10647 {
10648 return m_smoothing;
10649 }
10650
10653 {
10654 return m_smoothing;
10655 }
10656
10658 Filters &set(const Smoothing &value)
10659 {
10660 m_smoothing = value;
10661 return *this;
10662 }
10663
10666 {
10667 m_smoothing.set(value);
10668 return *this;
10669 }
10670
10673 {
10674 m_smoothing.set(value);
10675 return *this;
10676 }
10677
10680 {
10681 m_smoothing.set(value);
10682 return *this;
10683 }
10684
10685 template<
10686 typename T,
10687 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10688 0>
10690 {
10691 return m_cluster;
10692 }
10693
10694 template<
10695 typename T,
10696 typename std::enable_if<
10697 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
10698 int>::type = 0>
10700 {
10702 }
10703
10704 template<
10705 typename T,
10706 typename std::enable_if<
10707 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
10708 int>::type = 0>
10710 {
10712 }
10713
10714 template<
10715 typename T,
10716 typename std::enable_if<
10717 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
10718 int>::type = 0>
10720 {
10722 }
10723
10724 template<
10725 typename T,
10726 typename std::enable_if<
10727 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10728 int>::type = 0>
10730 {
10732 }
10733
10734 template<
10735 typename T,
10736 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10737 type = 0>
10739 {
10740 return m_experimental;
10741 }
10742
10743 template<
10744 typename T,
10745 typename std::enable_if<
10746 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10747 int>::type = 0>
10749 {
10751 }
10752
10753 template<
10754 typename T,
10755 typename std::enable_if<
10756 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10757 value,
10758 int>::type = 0>
10760 {
10761 return m_experimental
10763 }
10764
10765 template<
10766 typename T,
10767 typename std::enable_if<
10768 std::is_same<
10769 T,
10771 value,
10772 int>::type = 0>
10774 {
10775 return m_experimental
10777 }
10778
10779 template<
10780 typename T,
10781 typename std::enable_if<
10782 std::is_same<
10783 T,
10785 value,
10786 int>::type = 0>
10788 {
10789 return m_experimental
10791 }
10792
10793 template<
10794 typename T,
10795 typename std::enable_if<
10796 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10797 value,
10798 int>::type = 0>
10800 {
10801 return m_experimental
10803 }
10804
10805 template<
10806 typename T,
10807 typename std::enable_if<
10808 std::is_same<
10809 T,
10811 int>::type = 0>
10813 {
10814 return m_experimental
10816 }
10817
10818 template<
10819 typename T,
10820 typename std::enable_if<
10821 std::is_same<
10822 T,
10824 int>::type = 0>
10826 {
10827 return m_experimental
10829 }
10830
10831 template<
10832 typename T,
10833 typename std::enable_if<
10834 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling>::value,
10835 int>::type = 0>
10837 {
10839 }
10840
10841 template<
10842 typename T,
10843 typename std::enable_if<
10844 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Enabled>::value,
10845 int>::type = 0>
10847 {
10849 }
10850
10851 template<
10852 typename T,
10853 typename std::enable_if<
10854 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize>::value,
10855 int>::type = 0>
10857 {
10859 }
10860
10861 template<
10862 typename T,
10863 typename std::enable_if<
10864 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Strictness>::value,
10865 int>::type = 0>
10867 {
10869 }
10870
10871 template<
10872 typename T,
10873 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10874 0>
10876 {
10877 return m_noise;
10878 }
10879
10880 template<
10881 typename T,
10882 typename std::
10883 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
10885 {
10887 }
10888
10889 template<
10890 typename T,
10891 typename std::enable_if<
10892 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10893 int>::type = 0>
10895 {
10897 }
10898
10899 template<
10900 typename T,
10901 typename std::enable_if<
10902 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10903 int>::type = 0>
10905 {
10907 }
10908
10909 template<
10910 typename T,
10911 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10912 type = 0>
10914 {
10916 }
10917
10918 template<
10919 typename T,
10920 typename std::enable_if<
10921 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
10922 int>::type = 0>
10924 {
10926 }
10927
10928 template<
10929 typename T,
10930 typename std::enable_if<
10931 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
10932 int>::type = 0>
10934 {
10936 }
10937
10938 template<
10939 typename T,
10940 typename std::enable_if<
10941 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10942 int>::type = 0>
10944 {
10946 }
10947
10948 template<
10949 typename T,
10950 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10951 0>
10953 {
10954 return m_outlier;
10955 }
10956
10957 template<
10958 typename T,
10959 typename std::enable_if<
10960 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
10961 int>::type = 0>
10963 {
10965 }
10966
10967 template<
10968 typename T,
10969 typename std::enable_if<
10970 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10971 int>::type = 0>
10973 {
10975 }
10976
10977 template<
10978 typename T,
10979 typename std::enable_if<
10980 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10981 int>::type = 0>
10983 {
10985 }
10986
10987 template<
10988 typename T,
10989 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10990 type = 0>
10992 {
10993 return m_reflection;
10994 }
10995
10996 template<
10997 typename T,
10998 typename std::enable_if<
10999 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
11000 int>::type = 0>
11002 {
11004 }
11005
11006 template<
11007 typename T,
11008 typename std::enable_if<
11009 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
11010 int>::type = 0>
11012 {
11014 }
11015
11016 template<
11017 typename T,
11018 typename std::enable_if<
11019 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
11020 int>::type = 0>
11022 {
11024 }
11025
11026 template<
11027 typename T,
11028 typename std::enable_if<
11029 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
11030 int>::type = 0>
11032 {
11034 }
11035
11036 template<
11037 typename T,
11038 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
11039 type = 0>
11041 {
11042 return m_smoothing;
11043 }
11044
11045 template<
11046 typename T,
11047 typename std::enable_if<
11048 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
11049 int>::type = 0>
11051 {
11053 }
11054
11055 template<
11056 typename T,
11057 typename std::enable_if<
11058 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
11059 int>::type = 0>
11061 {
11063 }
11064
11065 template<
11066 typename T,
11067 typename std::enable_if<
11068 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
11069 int>::type = 0>
11071 {
11073 }
11074
11075 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11077 {
11078 return m_cluster;
11079 }
11080
11081 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
11083 {
11084 return m_experimental;
11085 }
11086
11087 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
11089 {
11090 return m_noise;
11091 }
11092
11093 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
11095 {
11096 return m_outlier;
11097 }
11098
11099 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
11101 {
11102 return m_reflection;
11103 }
11104
11105 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
11107 {
11108 return m_smoothing;
11109 }
11110
11112 template<typename F>
11113 void forEach(const F &f) const
11114 {
11115 f(m_cluster);
11116 f(m_experimental);
11117 f(m_noise);
11118 f(m_outlier);
11119 f(m_reflection);
11120 f(m_smoothing);
11121 }
11122
11124 template<typename F>
11125 void forEach(const F &f)
11126 {
11127 f(m_cluster);
11128 f(m_experimental);
11129 f(m_noise);
11130 f(m_outlier);
11131 f(m_reflection);
11132 f(m_smoothing);
11133 }
11134
11136 bool operator==(const Filters &other) const;
11137
11139 bool operator!=(const Filters &other) const;
11140
11142 std::string toString() const;
11143
11145 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
11146 {
11147 return stream << value.toString();
11148 }
11149
11150 private:
11151 void setFromString(const std::string &value);
11152
11153 void setFromString(const std::string &fullPath, const std::string &value);
11154
11155 std::string getString(const std::string &fullPath) const;
11156
11157 Cluster m_cluster;
11158 Experimental m_experimental;
11159 Noise m_noise;
11160 Outlier m_outlier;
11161 Reflection m_reflection;
11162 Smoothing m_smoothing;
11163
11164 friend struct DataModel::Detail::Befriend<Filters>;
11165 };
11166
11167 using Descendants = std::tuple<
11215
11218
11276#ifndef NO_DOC
11277 template<
11278 typename... Args,
11279 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11280 typename std::enable_if<
11281 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11282 value,
11283 int>::type = 0>
11284#else
11285 template<typename... Args>
11286#endif
11287 explicit Processing(Args &&...args)
11288 {
11289 using namespace Zivid::Detail::TypeTraits;
11290
11291 static_assert(
11292 AllArgsDecayedAreUnique<Args...>::value,
11293 "Found duplicate types among the arguments passed to Processing(...). "
11294 "Types should be listed at most once.");
11295
11296 set(std::forward<Args>(args)...);
11297 }
11298
11355#ifndef NO_DOC
11356 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11357#else
11358 template<typename... Args>
11359#endif
11360 void set(Args &&...args)
11361 {
11362 using namespace Zivid::Detail::TypeTraits;
11363
11364 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11365 static_assert(
11366 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11367
11368 static_assert(
11369 AllArgsDecayedAreUnique<Args...>::value,
11370 "Found duplicate types among the arguments passed to set(...). "
11371 "Types should be listed at most once.");
11372
11373 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11374 }
11375
11433#ifndef NO_DOC
11434 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11435#else
11436 template<typename... Args>
11437#endif
11438 Processing copyWith(Args &&...args) const
11439 {
11440 using namespace Zivid::Detail::TypeTraits;
11441
11442 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11443 static_assert(
11444 AllArgsAreDescendantNodes::value,
11445 "All arguments passed to copyWith(...) must be descendant nodes.");
11446
11447 static_assert(
11448 AllArgsDecayedAreUnique<Args...>::value,
11449 "Found duplicate types among the arguments passed to copyWith(...). "
11450 "Types should be listed at most once.");
11451
11452 auto copy{ *this };
11453 copy.set(std::forward<Args>(args)...);
11454 return copy;
11455 }
11456
11458 const Color &color() const
11459 {
11460 return m_color;
11461 }
11462
11465 {
11466 return m_color;
11467 }
11468
11470 Processing &set(const Color &value)
11471 {
11472 m_color = value;
11473 return *this;
11474 }
11475
11478 {
11479 m_color.set(value);
11480 return *this;
11481 }
11482
11485 {
11486 m_color.set(value);
11487 return *this;
11488 }
11489
11492 {
11493 m_color.set(value);
11494 return *this;
11495 }
11496
11499 {
11500 m_color.set(value);
11501 return *this;
11502 }
11503
11506 {
11507 m_color.set(value);
11508 return *this;
11509 }
11510
11513 {
11514 m_color.set(value);
11515 return *this;
11516 }
11517
11520 {
11521 m_color.set(value);
11522 return *this;
11523 }
11524
11526 const Filters &filters() const
11527 {
11528 return m_filters;
11529 }
11530
11533 {
11534 return m_filters;
11535 }
11536
11538 Processing &set(const Filters &value)
11539 {
11540 m_filters = value;
11541 return *this;
11542 }
11543
11546 {
11547 m_filters.set(value);
11548 return *this;
11549 }
11550
11553 {
11554 m_filters.set(value);
11555 return *this;
11556 }
11557
11560 {
11561 m_filters.set(value);
11562 return *this;
11563 }
11564
11567 {
11568 m_filters.set(value);
11569 return *this;
11570 }
11571
11574 {
11575 m_filters.set(value);
11576 return *this;
11577 }
11578
11581 {
11582 m_filters.set(value);
11583 return *this;
11584 }
11585
11588 {
11589 m_filters.set(value);
11590 return *this;
11591 }
11592
11595 {
11596 m_filters.set(value);
11597 return *this;
11598 }
11599
11602 {
11603 m_filters.set(value);
11604 return *this;
11605 }
11606
11609 {
11610 m_filters.set(value);
11611 return *this;
11612 }
11613
11616 {
11617 m_filters.set(value);
11618 return *this;
11619 }
11620
11623 {
11624 m_filters.set(value);
11625 return *this;
11626 }
11627
11630 {
11631 m_filters.set(value);
11632 return *this;
11633 }
11634
11637 {
11638 m_filters.set(value);
11639 return *this;
11640 }
11641
11644 {
11645 m_filters.set(value);
11646 return *this;
11647 }
11648
11651 {
11652 m_filters.set(value);
11653 return *this;
11654 }
11655
11658 {
11659 m_filters.set(value);
11660 return *this;
11661 }
11662
11665 {
11666 m_filters.set(value);
11667 return *this;
11668 }
11669
11672 {
11673 m_filters.set(value);
11674 return *this;
11675 }
11676
11679 {
11680 m_filters.set(value);
11681 return *this;
11682 }
11683
11686 {
11687 m_filters.set(value);
11688 return *this;
11689 }
11690
11693 {
11694 m_filters.set(value);
11695 return *this;
11696 }
11697
11700 {
11701 m_filters.set(value);
11702 return *this;
11703 }
11704
11707 {
11708 m_filters.set(value);
11709 return *this;
11710 }
11711
11714 {
11715 m_filters.set(value);
11716 return *this;
11717 }
11718
11721 {
11722 m_filters.set(value);
11723 return *this;
11724 }
11725
11728 {
11729 m_filters.set(value);
11730 return *this;
11731 }
11732
11735 {
11736 m_filters.set(value);
11737 return *this;
11738 }
11739
11742 {
11743 m_filters.set(value);
11744 return *this;
11745 }
11746
11749 {
11750 m_filters.set(value);
11751 return *this;
11752 }
11753
11756 {
11757 m_filters.set(value);
11758 return *this;
11759 }
11760
11763 {
11764 m_filters.set(value);
11765 return *this;
11766 }
11767
11770 {
11771 m_filters.set(value);
11772 return *this;
11773 }
11774
11777 {
11778 m_filters.set(value);
11779 return *this;
11780 }
11781
11784 {
11785 m_filters.set(value);
11786 return *this;
11787 }
11788
11791 {
11792 m_filters.set(value);
11793 return *this;
11794 }
11795
11798 {
11799 m_filters.set(value);
11800 return *this;
11801 }
11802
11805 {
11806 m_filters.set(value);
11807 return *this;
11808 }
11809
11810 template<
11811 typename T,
11812 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
11814 {
11815 return m_color;
11816 }
11817
11818 template<
11819 typename T,
11820 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
11822 {
11823 return m_color.get<Settings::Processing::Color::Balance>();
11824 }
11825
11826 template<
11827 typename T,
11828 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
11829 0>
11831 {
11832 return m_color.get<Settings::Processing::Color::Balance::Blue>();
11833 }
11834
11835 template<
11836 typename T,
11837 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
11838 type = 0>
11840 {
11841 return m_color.get<Settings::Processing::Color::Balance::Green>();
11842 }
11843
11844 template<
11845 typename T,
11846 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
11847 0>
11849 {
11850 return m_color.get<Settings::Processing::Color::Balance::Red>();
11851 }
11852
11853 template<
11854 typename T,
11855 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
11856 0>
11858 {
11860 }
11861
11862 template<
11863 typename T,
11864 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
11865 type = 0>
11867 {
11869 }
11870
11871 template<
11872 typename T,
11873 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
11875 {
11876 return m_color.get<Settings::Processing::Color::Gamma>();
11877 }
11878
11879 template<
11880 typename T,
11881 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
11883 {
11884 return m_filters;
11885 }
11886
11887 template<
11888 typename T,
11889 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
11891 {
11892 return m_filters.get<Settings::Processing::Filters::Cluster>();
11893 }
11894
11895 template<
11896 typename T,
11897 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
11898 type = 0>
11900 {
11902 }
11903
11904 template<
11905 typename T,
11906 typename std::enable_if<
11907 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
11908 int>::type = 0>
11910 {
11912 }
11913
11914 template<
11915 typename T,
11916 typename std::enable_if<
11917 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
11918 int>::type = 0>
11920 {
11922 }
11923
11924 template<
11925 typename T,
11926 typename std::enable_if<
11927 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
11928 int>::type = 0>
11930 {
11932 }
11933
11934 template<
11935 typename T,
11936 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
11937 type = 0>
11939 {
11941 }
11942
11943 template<
11944 typename T,
11945 typename std::enable_if<
11946 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
11947 int>::type = 0>
11949 {
11951 }
11952
11953 template<
11954 typename T,
11955 typename std::enable_if<
11956 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
11957 int>::type = 0>
11959 {
11961 }
11962
11963 template<
11964 typename T,
11965 typename std::enable_if<
11966 std::is_same<
11967 T,
11969 int>::type = 0>
11971 {
11972 return m_filters
11974 }
11975
11976 template<
11977 typename T,
11978 typename std::enable_if<
11979 std::is_same<
11980 T,
11982 int>::type = 0>
11984 {
11985 return m_filters
11987 }
11988
11989 template<
11990 typename T,
11991 typename std::enable_if<
11992 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
11993 int>::type = 0>
11995 {
11997 }
11998
11999 template<
12000 typename T,
12001 typename std::enable_if<
12002 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12003 value,
12004 int>::type = 0>
12006 {
12007 return m_filters
12009 }
12010
12011 template<
12012 typename T,
12013 typename std::enable_if<
12014 std::is_same<
12015 T,
12017 int>::type = 0>
12019 {
12020 return m_filters
12022 }
12023
12024 template<
12025 typename T,
12026 typename std::enable_if<
12027 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling>::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::Experimental::HoleFilling::Enabled>::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::Experimental::HoleFilling::HoleSize>::value,
12048 int>::type = 0>
12050 {
12052 }
12053
12054 template<
12055 typename T,
12056 typename std::enable_if<
12057 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Strictness>::value,
12058 int>::type = 0>
12060 {
12062 }
12063
12064 template<
12065 typename T,
12066 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12068 {
12069 return m_filters.get<Settings::Processing::Filters::Noise>();
12070 }
12071
12072 template<
12073 typename T,
12074 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12075 type = 0>
12077 {
12079 }
12080
12081 template<
12082 typename T,
12083 typename std::enable_if<
12084 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
12085 int>::type = 0>
12087 {
12089 }
12090
12091 template<
12092 typename T,
12093 typename std::enable_if<
12094 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12095 int>::type = 0>
12097 {
12099 }
12100
12101 template<
12102 typename T,
12103 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12104 type = 0>
12106 {
12108 }
12109
12110 template<
12111 typename T,
12112 typename std::enable_if<
12113 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12114 int>::type = 0>
12116 {
12118 }
12119
12120 template<
12121 typename T,
12122 typename std::
12123 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12125 {
12127 }
12128
12129 template<
12130 typename T,
12131 typename std::enable_if<
12132 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12133 int>::type = 0>
12135 {
12137 }
12138
12139 template<
12140 typename T,
12141 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12143 {
12144 return m_filters.get<Settings::Processing::Filters::Outlier>();
12145 }
12146
12147 template<
12148 typename T,
12149 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12150 type = 0>
12152 {
12154 }
12155
12156 template<
12157 typename T,
12158 typename std::enable_if<
12159 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
12160 int>::type = 0>
12162 {
12164 }
12165
12166 template<
12167 typename T,
12168 typename std::enable_if<
12169 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12170 int>::type = 0>
12172 {
12174 }
12175
12176 template<
12177 typename T,
12178 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12179 0>
12181 {
12183 }
12184
12185 template<
12186 typename T,
12187 typename std::enable_if<
12188 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
12189 int>::type = 0>
12191 {
12193 }
12194
12195 template<
12196 typename T,
12197 typename std::enable_if<
12198 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
12199 int>::type = 0>
12201 {
12203 }
12204
12205 template<
12206 typename T,
12207 typename std::enable_if<
12208 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
12209 int>::type = 0>
12211 {
12213 }
12214
12215 template<
12216 typename T,
12217 typename std::enable_if<
12218 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
12219 int>::type = 0>
12221 {
12223 }
12224
12225 template<
12226 typename T,
12227 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12228 0>
12230 {
12232 }
12233
12234 template<
12235 typename T,
12236 typename std::enable_if<
12237 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
12238 int>::type = 0>
12240 {
12242 }
12243
12244 template<
12245 typename T,
12246 typename std::enable_if<
12247 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
12248 int>::type = 0>
12250 {
12252 }
12253
12254 template<
12255 typename T,
12256 typename std::enable_if<
12257 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12258 int>::type = 0>
12260 {
12262 }
12263
12264 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12266 {
12267 return m_color;
12268 }
12269
12270 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12272 {
12273 return m_filters;
12274 }
12275
12277 template<typename F>
12278 void forEach(const F &f) const
12279 {
12280 f(m_color);
12281 f(m_filters);
12282 }
12283
12285 template<typename F>
12286 void forEach(const F &f)
12287 {
12288 f(m_color);
12289 f(m_filters);
12290 }
12291
12293 bool operator==(const Processing &other) const;
12294
12296 bool operator!=(const Processing &other) const;
12297
12299 std::string toString() const;
12300
12302 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12303 {
12304 return stream << value.toString();
12305 }
12306
12307 private:
12308 void setFromString(const std::string &value);
12309
12310 void setFromString(const std::string &fullPath, const std::string &value);
12311
12312 std::string getString(const std::string &fullPath) const;
12313
12314 Color m_color;
12315 Filters m_filters;
12316
12317 friend struct DataModel::Detail::Befriend<Processing>;
12318 };
12319
12322
12323 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12325 {
12326 public:
12328 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12329
12331 static constexpr const char *path{ "RegionOfInterest" };
12332
12334 static constexpr const char *name{ "RegionOfInterest" };
12335
12337 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12338)description" };
12339
12351
12352 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12354 {
12355 public:
12357 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12358
12360 static constexpr const char *path{ "RegionOfInterest/Box" };
12361
12363 static constexpr const char *name{ "Box" };
12364
12366 static constexpr const char *description{ R"description(Removes the points outside the box.
12367
12368The box is defined by three points: O, A and B. These points define two vectors,
12369OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12370This gives 4 points O, A, B and (O + OA + OB), that together form a
12371parallelogram in 3D.
12372
12373Two extents can be provided, to extrude the parallelogram along the surface
12374normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12375The surface normal vector is defined by the cross product OA x OB.
12376)description" };
12377
12379
12380 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12382 {
12383 public:
12385 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12386
12388 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12389
12391 static constexpr const char *name{ "Enabled" };
12392
12394 static constexpr const char *description{ R"description(Enabled)description" };
12395
12397 using ValueType = bool;
12398 static const Enabled yes;
12399 static const Enabled no;
12400
12402 static std::set<bool> validValues()
12403 {
12404 return { false, true };
12405 }
12406
12408 Enabled() = default;
12409
12411 explicit constexpr Enabled(bool value)
12412 : m_opt{ value }
12413 {}
12414
12419 bool value() const;
12420
12422 bool hasValue() const;
12423
12425 void reset();
12426
12428 std::string toString() const;
12429
12431 bool operator==(const Enabled &other) const
12432 {
12433 return m_opt == other.m_opt;
12434 }
12435
12437 bool operator!=(const Enabled &other) const
12438 {
12439 return m_opt != other.m_opt;
12440 }
12441
12443 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12444 {
12445 return stream << value.toString();
12446 }
12447
12448 private:
12449 void setFromString(const std::string &value);
12450
12451 Zivid::DataModel::Detail::Optional<bool> m_opt;
12452
12453 friend struct DataModel::Detail::Befriend<Enabled>;
12454 };
12455
12457
12458 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12460 {
12461 public:
12463 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12464
12466 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12467
12469 static constexpr const char *name{ "Extents" };
12470
12472 static constexpr const char *description{
12473 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12474 };
12475
12478
12480 Extents() = default;
12481
12483 explicit constexpr Extents(Zivid::Range<double> value)
12484 : m_opt{ value }
12485 {}
12486
12492
12494 bool hasValue() const;
12495
12497 void reset();
12498
12500 std::string toString() const;
12501
12503 explicit constexpr Extents(double minValue, double maxValue)
12504 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12505 {}
12506
12508 bool operator==(const Extents &other) const
12509 {
12510 return m_opt == other.m_opt;
12511 }
12512
12514 bool operator!=(const Extents &other) const
12515 {
12516 return m_opt != other.m_opt;
12517 }
12518
12520 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12521 {
12522 return stream << value.toString();
12523 }
12524
12525 private:
12526 void setFromString(const std::string &value);
12527
12528 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
12529
12530 friend struct DataModel::Detail::Befriend<Extents>;
12531 };
12532
12534
12535 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12537 {
12538 public:
12540 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12541
12543 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12544
12546 static constexpr const char *name{ "PointA" };
12547
12549 static constexpr const char *description{
12550 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram)description"
12551 };
12552
12555
12557 PointA() = default;
12558
12560 explicit constexpr PointA(Zivid::PointXYZ value)
12561 : m_opt{ value }
12562 {}
12563
12569
12571 bool hasValue() const;
12572
12574 void reset();
12575
12577 std::string toString() const;
12578
12580 explicit constexpr PointA(float x, float y, float z)
12581 : PointA{ Zivid::PointXYZ{ x, y, z } }
12582 {}
12583
12585 bool operator==(const PointA &other) const
12586 {
12587 return m_opt == other.m_opt;
12588 }
12589
12591 bool operator!=(const PointA &other) const
12592 {
12593 return m_opt != other.m_opt;
12594 }
12595
12597 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12598 {
12599 return stream << value.toString();
12600 }
12601
12602 private:
12603 void setFromString(const std::string &value);
12604
12605 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12606
12607 friend struct DataModel::Detail::Befriend<PointA>;
12608 };
12609
12611
12612 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12614 {
12615 public:
12617 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12618
12620 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12621
12623 static constexpr const char *name{ "PointB" };
12624
12626 static constexpr const char *description{
12627 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram)description"
12628 };
12629
12632
12634 PointB() = default;
12635
12637 explicit constexpr PointB(Zivid::PointXYZ value)
12638 : m_opt{ value }
12639 {}
12640
12646
12648 bool hasValue() const;
12649
12651 void reset();
12652
12654 std::string toString() const;
12655
12657 explicit constexpr PointB(float x, float y, float z)
12658 : PointB{ Zivid::PointXYZ{ x, y, z } }
12659 {}
12660
12662 bool operator==(const PointB &other) const
12663 {
12664 return m_opt == other.m_opt;
12665 }
12666
12668 bool operator!=(const PointB &other) const
12669 {
12670 return m_opt != other.m_opt;
12671 }
12672
12674 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
12675 {
12676 return stream << value.toString();
12677 }
12678
12679 private:
12680 void setFromString(const std::string &value);
12681
12682 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12683
12684 friend struct DataModel::Detail::Befriend<PointB>;
12685 };
12686
12688
12689 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12691 {
12692 public:
12694 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12695
12697 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
12698
12700 static constexpr const char *name{ "PointO" };
12701
12703 static constexpr const char *description{
12704 R"description(The point at the intersection of two adjacent edges defining a parallelogram)description"
12705 };
12706
12709
12711 PointO() = default;
12712
12714 explicit constexpr PointO(Zivid::PointXYZ value)
12715 : m_opt{ value }
12716 {}
12717
12723
12725 bool hasValue() const;
12726
12728 void reset();
12729
12731 std::string toString() const;
12732
12734 explicit constexpr PointO(float x, float y, float z)
12735 : PointO{ Zivid::PointXYZ{ x, y, z } }
12736 {}
12737
12739 bool operator==(const PointO &other) const
12740 {
12741 return m_opt == other.m_opt;
12742 }
12743
12745 bool operator!=(const PointO &other) const
12746 {
12747 return m_opt != other.m_opt;
12748 }
12749
12751 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
12752 {
12753 return stream << value.toString();
12754 }
12755
12756 private:
12757 void setFromString(const std::string &value);
12758
12759 Zivid::DataModel::Detail::Optional<Zivid::PointXYZ> m_opt;
12760
12761 friend struct DataModel::Detail::Befriend<PointO>;
12762 };
12763
12764 using Descendants = std::tuple<
12770
12773
12789#ifndef NO_DOC
12790 template<
12791 typename... Args,
12792 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
12793 typename std::enable_if<
12794 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
12795 value,
12796 int>::type = 0>
12797#else
12798 template<typename... Args>
12799#endif
12800 explicit Box(Args &&...args)
12801 {
12802 using namespace Zivid::Detail::TypeTraits;
12803
12804 static_assert(
12805 AllArgsDecayedAreUnique<Args...>::value,
12806 "Found duplicate types among the arguments passed to Box(...). "
12807 "Types should be listed at most once.");
12808
12809 set(std::forward<Args>(args)...);
12810 }
12811
12826#ifndef NO_DOC
12827 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
12828#else
12829 template<typename... Args>
12830#endif
12831 void set(Args &&...args)
12832 {
12833 using namespace Zivid::Detail::TypeTraits;
12834
12835 using AllArgsAreDescendantNodes =
12836 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
12837 static_assert(
12838 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
12839
12840 static_assert(
12841 AllArgsDecayedAreUnique<Args...>::value,
12842 "Found duplicate types among the arguments passed to set(...). "
12843 "Types should be listed at most once.");
12844
12845 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
12846 }
12847
12863#ifndef NO_DOC
12864 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
12865#else
12866 template<typename... Args>
12867#endif
12868 Box copyWith(Args &&...args) const
12869 {
12870 using namespace Zivid::Detail::TypeTraits;
12871
12872 using AllArgsAreDescendantNodes =
12873 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
12874 static_assert(
12875 AllArgsAreDescendantNodes::value,
12876 "All arguments passed to copyWith(...) must be descendant nodes.");
12877
12878 static_assert(
12879 AllArgsDecayedAreUnique<Args...>::value,
12880 "Found duplicate types among the arguments passed to copyWith(...). "
12881 "Types should be listed at most once.");
12882
12883 auto copy{ *this };
12884 copy.set(std::forward<Args>(args)...);
12885 return copy;
12886 }
12887
12889 const Enabled &isEnabled() const
12890 {
12891 return m_enabled;
12892 }
12893
12896 {
12897 return m_enabled;
12898 }
12899
12901 Box &set(const Enabled &value)
12902 {
12903 m_enabled = value;
12904 return *this;
12905 }
12906
12908 const Extents &extents() const
12909 {
12910 return m_extents;
12911 }
12912
12915 {
12916 return m_extents;
12917 }
12918
12920 Box &set(const Extents &value)
12921 {
12922 m_extents = value;
12923 return *this;
12924 }
12925
12927 const PointA &pointA() const
12928 {
12929 return m_pointA;
12930 }
12931
12934 {
12935 return m_pointA;
12936 }
12937
12939 Box &set(const PointA &value)
12940 {
12941 m_pointA = value;
12942 return *this;
12943 }
12944
12946 const PointB &pointB() const
12947 {
12948 return m_pointB;
12949 }
12950
12953 {
12954 return m_pointB;
12955 }
12956
12958 Box &set(const PointB &value)
12959 {
12960 m_pointB = value;
12961 return *this;
12962 }
12963
12965 const PointO &pointO() const
12966 {
12967 return m_pointO;
12968 }
12969
12972 {
12973 return m_pointO;
12974 }
12975
12977 Box &set(const PointO &value)
12978 {
12979 m_pointO = value;
12980 return *this;
12981 }
12982
12983 template<
12984 typename T,
12985 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
12986 type = 0>
12988 {
12989 return m_enabled;
12990 }
12991
12992 template<
12993 typename T,
12994 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
12995 type = 0>
12997 {
12998 return m_extents;
12999 }
13000
13001 template<
13002 typename T,
13003 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13004 type = 0>
13006 {
13007 return m_pointA;
13008 }
13009
13010 template<
13011 typename T,
13012 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13013 type = 0>
13015 {
13016 return m_pointB;
13017 }
13018
13019 template<
13020 typename T,
13021 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13022 type = 0>
13024 {
13025 return m_pointO;
13026 }
13027
13028 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13030 {
13031 return m_enabled;
13032 }
13033
13034 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13036 {
13037 return m_extents;
13038 }
13039
13040 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13042 {
13043 return m_pointA;
13044 }
13045
13046 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13048 {
13049 return m_pointB;
13050 }
13051
13052 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13054 {
13055 return m_pointO;
13056 }
13057
13059 template<typename F>
13060 void forEach(const F &f) const
13061 {
13062 f(m_enabled);
13063 f(m_extents);
13064 f(m_pointA);
13065 f(m_pointB);
13066 f(m_pointO);
13067 }
13068
13070 template<typename F>
13071 void forEach(const F &f)
13072 {
13073 f(m_enabled);
13074 f(m_extents);
13075 f(m_pointA);
13076 f(m_pointB);
13077 f(m_pointO);
13078 }
13079
13081 bool operator==(const Box &other) const;
13082
13084 bool operator!=(const Box &other) const;
13085
13087 std::string toString() const;
13088
13090 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13091 {
13092 return stream << value.toString();
13093 }
13094
13095 private:
13096 void setFromString(const std::string &value);
13097
13098 void setFromString(const std::string &fullPath, const std::string &value);
13099
13100 std::string getString(const std::string &fullPath) const;
13101
13102 Enabled m_enabled;
13103 Extents m_extents;
13104 PointA m_pointA;
13105 PointB m_pointB;
13106 PointO m_pointO;
13107
13108 friend struct DataModel::Detail::Befriend<Box>;
13109 };
13110
13114
13115 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13117 {
13118 public:
13120 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13121
13123 static constexpr const char *path{ "RegionOfInterest/Depth" };
13124
13126 static constexpr const char *name{ "Depth" };
13127
13129 static constexpr const char *description{
13130 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13131falls above a given maximum or below a given minimum.
13132)description"
13133 };
13134
13136
13137 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13139 {
13140 public:
13142 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13143
13145 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13146
13148 static constexpr const char *name{ "Enabled" };
13149
13151 static constexpr const char *description{ R"description(Enabled)description" };
13152
13154 using ValueType = bool;
13155 static const Enabled yes;
13156 static const Enabled no;
13157
13159 static std::set<bool> validValues()
13160 {
13161 return { false, true };
13162 }
13163
13165 Enabled() = default;
13166
13168 explicit constexpr Enabled(bool value)
13169 : m_opt{ value }
13170 {}
13171
13176 bool value() const;
13177
13179 bool hasValue() const;
13180
13182 void reset();
13183
13185 std::string toString() const;
13186
13188 bool operator==(const Enabled &other) const
13189 {
13190 return m_opt == other.m_opt;
13191 }
13192
13194 bool operator!=(const Enabled &other) const
13195 {
13196 return m_opt != other.m_opt;
13197 }
13198
13200 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13201 {
13202 return stream << value.toString();
13203 }
13204
13205 private:
13206 void setFromString(const std::string &value);
13207
13208 Zivid::DataModel::Detail::Optional<bool> m_opt;
13209
13210 friend struct DataModel::Detail::Befriend<Enabled>;
13211 };
13212
13214
13215 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13217 {
13218 public:
13220 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13221
13223 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13224
13226 static constexpr const char *name{ "Range" };
13227
13229 static constexpr const char *description{
13230 R"description(Specify the minimum and maximum Z value that will be included.)description"
13231 };
13232
13235
13237 Range() = default;
13238
13240 explicit constexpr Range(Zivid::Range<double> value)
13241 : m_opt{ value }
13242 {}
13243
13249
13251 bool hasValue() const;
13252
13254 void reset();
13255
13257 std::string toString() const;
13258
13260 explicit constexpr Range(double minValue, double maxValue)
13261 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13262 {}
13263
13265 bool operator==(const Range &other) const
13266 {
13267 return m_opt == other.m_opt;
13268 }
13269
13271 bool operator!=(const Range &other) const
13272 {
13273 return m_opt != other.m_opt;
13274 }
13275
13277 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13278 {
13279 return stream << value.toString();
13280 }
13281
13282 private:
13283 void setFromString(const std::string &value);
13284
13285 Zivid::DataModel::Detail::Optional<Zivid::Range<double>> m_opt;
13286
13287 friend struct DataModel::Detail::Befriend<Range>;
13288 };
13289
13291 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13292
13295
13308#ifndef NO_DOC
13309 template<
13310 typename... Args,
13311 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13312 typename std::enable_if<
13313 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13314 value,
13315 int>::type = 0>
13316#else
13317 template<typename... Args>
13318#endif
13319 explicit Depth(Args &&...args)
13320 {
13321 using namespace Zivid::Detail::TypeTraits;
13322
13323 static_assert(
13324 AllArgsDecayedAreUnique<Args...>::value,
13325 "Found duplicate types among the arguments passed to Depth(...). "
13326 "Types should be listed at most once.");
13327
13328 set(std::forward<Args>(args)...);
13329 }
13330
13342#ifndef NO_DOC
13343 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13344#else
13345 template<typename... Args>
13346#endif
13347 void set(Args &&...args)
13348 {
13349 using namespace Zivid::Detail::TypeTraits;
13350
13351 using AllArgsAreDescendantNodes =
13352 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13353 static_assert(
13354 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13355
13356 static_assert(
13357 AllArgsDecayedAreUnique<Args...>::value,
13358 "Found duplicate types among the arguments passed to set(...). "
13359 "Types should be listed at most once.");
13360
13361 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13362 }
13363
13376#ifndef NO_DOC
13377 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13378#else
13379 template<typename... Args>
13380#endif
13381 Depth copyWith(Args &&...args) const
13382 {
13383 using namespace Zivid::Detail::TypeTraits;
13384
13385 using AllArgsAreDescendantNodes =
13386 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13387 static_assert(
13388 AllArgsAreDescendantNodes::value,
13389 "All arguments passed to copyWith(...) must be descendant nodes.");
13390
13391 static_assert(
13392 AllArgsDecayedAreUnique<Args...>::value,
13393 "Found duplicate types among the arguments passed to copyWith(...). "
13394 "Types should be listed at most once.");
13395
13396 auto copy{ *this };
13397 copy.set(std::forward<Args>(args)...);
13398 return copy;
13399 }
13400
13402 const Enabled &isEnabled() const
13403 {
13404 return m_enabled;
13405 }
13406
13409 {
13410 return m_enabled;
13411 }
13412
13414 Depth &set(const Enabled &value)
13415 {
13416 m_enabled = value;
13417 return *this;
13418 }
13419
13421 const Range &range() const
13422 {
13423 return m_range;
13424 }
13425
13428 {
13429 return m_range;
13430 }
13431
13433 Depth &set(const Range &value)
13434 {
13435 m_range = value;
13436 return *this;
13437 }
13438
13439 template<
13440 typename T,
13441 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13442 type = 0>
13444 {
13445 return m_enabled;
13446 }
13447
13448 template<
13449 typename T,
13450 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13451 type = 0>
13453 {
13454 return m_range;
13455 }
13456
13457 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13459 {
13460 return m_enabled;
13461 }
13462
13463 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13465 {
13466 return m_range;
13467 }
13468
13470 template<typename F>
13471 void forEach(const F &f) const
13472 {
13473 f(m_enabled);
13474 f(m_range);
13475 }
13476
13478 template<typename F>
13479 void forEach(const F &f)
13480 {
13481 f(m_enabled);
13482 f(m_range);
13483 }
13484
13486 bool operator==(const Depth &other) const;
13487
13489 bool operator!=(const Depth &other) const;
13490
13492 std::string toString() const;
13493
13495 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13496 {
13497 return stream << value.toString();
13498 }
13499
13500 private:
13501 void setFromString(const std::string &value);
13502
13503 void setFromString(const std::string &fullPath, const std::string &value);
13504
13505 std::string getString(const std::string &fullPath) const;
13506
13507 Enabled m_enabled;
13508 Range m_range;
13509
13510 friend struct DataModel::Detail::Befriend<Depth>;
13511 };
13512
13513 using Descendants = std::tuple<
13523
13526
13546#ifndef NO_DOC
13547 template<
13548 typename... Args,
13549 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13550 typename std::enable_if<
13551 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13552 value,
13553 int>::type = 0>
13554#else
13555 template<typename... Args>
13556#endif
13557 explicit RegionOfInterest(Args &&...args)
13558 {
13559 using namespace Zivid::Detail::TypeTraits;
13560
13561 static_assert(
13562 AllArgsDecayedAreUnique<Args...>::value,
13563 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13564 "Types should be listed at most once.");
13565
13566 set(std::forward<Args>(args)...);
13567 }
13568
13587#ifndef NO_DOC
13588 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13589#else
13590 template<typename... Args>
13591#endif
13592 void set(Args &&...args)
13593 {
13594 using namespace Zivid::Detail::TypeTraits;
13595
13596 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13597 static_assert(
13598 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13599
13600 static_assert(
13601 AllArgsDecayedAreUnique<Args...>::value,
13602 "Found duplicate types among the arguments passed to set(...). "
13603 "Types should be listed at most once.");
13604
13605 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13606 }
13607
13627#ifndef NO_DOC
13628 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13629#else
13630 template<typename... Args>
13631#endif
13632 RegionOfInterest copyWith(Args &&...args) const
13633 {
13634 using namespace Zivid::Detail::TypeTraits;
13635
13636 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13637 static_assert(
13638 AllArgsAreDescendantNodes::value,
13639 "All arguments passed to copyWith(...) must be descendant nodes.");
13640
13641 static_assert(
13642 AllArgsDecayedAreUnique<Args...>::value,
13643 "Found duplicate types among the arguments passed to copyWith(...). "
13644 "Types should be listed at most once.");
13645
13646 auto copy{ *this };
13647 copy.set(std::forward<Args>(args)...);
13648 return copy;
13649 }
13650
13652 const Box &box() const
13653 {
13654 return m_box;
13655 }
13656
13659 {
13660 return m_box;
13661 }
13662
13664 RegionOfInterest &set(const Box &value)
13665 {
13666 m_box = value;
13667 return *this;
13668 }
13669
13672 {
13673 m_box.set(value);
13674 return *this;
13675 }
13676
13679 {
13680 m_box.set(value);
13681 return *this;
13682 }
13683
13686 {
13687 m_box.set(value);
13688 return *this;
13689 }
13690
13693 {
13694 m_box.set(value);
13695 return *this;
13696 }
13697
13700 {
13701 m_box.set(value);
13702 return *this;
13703 }
13704
13706 const Depth &depth() const
13707 {
13708 return m_depth;
13709 }
13710
13713 {
13714 return m_depth;
13715 }
13716
13719 {
13720 m_depth = value;
13721 return *this;
13722 }
13723
13726 {
13727 m_depth.set(value);
13728 return *this;
13729 }
13730
13733 {
13734 m_depth.set(value);
13735 return *this;
13736 }
13737
13738 template<
13739 typename T,
13740 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
13742 {
13743 return m_box;
13744 }
13745
13746 template<
13747 typename T,
13748 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
13749 0>
13751 {
13752 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
13753 }
13754
13755 template<
13756 typename T,
13757 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
13758 0>
13760 {
13761 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
13762 }
13763
13764 template<
13765 typename T,
13766 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
13768 {
13769 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
13770 }
13771
13772 template<
13773 typename T,
13774 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
13776 {
13777 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
13778 }
13779
13780 template<
13781 typename T,
13782 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
13784 {
13785 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
13786 }
13787
13788 template<
13789 typename T,
13790 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
13792 {
13793 return m_depth;
13794 }
13795
13796 template<
13797 typename T,
13798 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
13799 0>
13801 {
13802 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
13803 }
13804
13805 template<
13806 typename T,
13807 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
13808 0>
13810 {
13811 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
13812 }
13813
13814 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13816 {
13817 return m_box;
13818 }
13819
13820 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13822 {
13823 return m_depth;
13824 }
13825
13827 template<typename F>
13828 void forEach(const F &f) const
13829 {
13830 f(m_box);
13831 f(m_depth);
13832 }
13833
13835 template<typename F>
13836 void forEach(const F &f)
13837 {
13838 f(m_box);
13839 f(m_depth);
13840 }
13841
13843 bool operator==(const RegionOfInterest &other) const;
13844
13846 bool operator!=(const RegionOfInterest &other) const;
13847
13849 std::string toString() const;
13850
13852 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
13853 {
13854 return stream << value.toString();
13855 }
13856
13857 private:
13858 void setFromString(const std::string &value);
13859
13860 void setFromString(const std::string &fullPath, const std::string &value);
13861
13862 std::string getString(const std::string &fullPath) const;
13863
13864 Box m_box;
13865 Depth m_depth;
13866
13867 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
13868 };
13869
13872
13873 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13875 {
13876 public:
13878 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13879
13881 static constexpr const char *path{ "Sampling" };
13882
13884 static constexpr const char *name{ "Sampling" };
13885
13887 static constexpr const char *description{ R"description(Sampling group
13888)description" };
13889
13895
13896 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13898 {
13899 public:
13901 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13902
13904 static constexpr const char *path{ "Sampling/Color" };
13905
13907 static constexpr const char *name{ "Color" };
13908
13910 static constexpr const char *description{
13911 R"description(Choose how to sample colors for the pointcloud. The `rgb` option gives all
13912colors for a regular Zivid camera. The `disabled` option gives no colors and
13913can allow for faster captures. It is also useful if you want to avoid projecting
13914white light in the subsampling modes under `Sampling::Pixel`.
13915)description"
13916 };
13917
13919 enum class ValueType
13920 {
13921 rgb,
13922 disabled
13923 };
13924 static const Color rgb;
13925 static const Color disabled;
13926
13928 static std::set<ValueType> validValues()
13929 {
13930 return { ValueType::rgb, ValueType::disabled };
13931 }
13932
13934 Color() = default;
13935
13937 explicit constexpr Color(ValueType value)
13938 : m_opt{ verifyValue(value) }
13939 {}
13940
13946
13948 bool hasValue() const;
13949
13951 void reset();
13952
13954 std::string toString() const;
13955
13957 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
13958 {
13959 return stream << Color{ value }.toString();
13960 }
13961
13963 bool operator==(const Color &other) const
13964 {
13965 return m_opt == other.m_opt;
13966 }
13967
13969 bool operator!=(const Color &other) const
13970 {
13971 return m_opt != other.m_opt;
13972 }
13973
13975 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
13976 {
13977 return stream << value.toString();
13978 }
13979
13980 private:
13981 void setFromString(const std::string &value);
13982
13983 constexpr ValueType static verifyValue(const ValueType &value)
13984 {
13985 return value == ValueType::rgb || value == ValueType::disabled
13986 ? value
13987 : throw std::invalid_argument{
13988 "Invalid value: Color{ "
13989 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
13990 };
13991 }
13992
13993 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
13994
13995 friend struct DataModel::Detail::Befriend<Color>;
13996 };
13997
14007
14008 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14010 {
14011 public:
14013 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14014
14016 static constexpr const char *path{ "Sampling/Pixel" };
14017
14019 static constexpr const char *name{ "Pixel" };
14020
14022 static constexpr const char *description{
14023 R"description(Set whether the full image sensor should be used with white projector light or
14024only specific color channels with corresponding projector light.
14025Using only a specific color channel will subsample pixels and give a
14026smaller resolution.
14027
14028Subsampling decreases the capture time, as less data will be captured and processed.
14029Picking a specific color channel can also help reduce noise and effects of ambient light.
14030Projecting blue light will in most cases give better data than red light.
14031)description"
14032 };
14033
14035 enum class ValueType
14036 {
14037 all,
14038 blueSubsample2x2,
14039 redSubsample2x2,
14040 blueSubsample4x4,
14041 redSubsample4x4
14042 };
14043 static const Pixel all;
14045 static const Pixel redSubsample2x2;
14047 static const Pixel redSubsample4x4;
14048
14050 static std::set<ValueType> validValues()
14051 {
14052 return { ValueType::all,
14053 ValueType::blueSubsample2x2,
14054 ValueType::redSubsample2x2,
14055 ValueType::blueSubsample4x4,
14056 ValueType::redSubsample4x4 };
14057 }
14058
14060 Pixel() = default;
14061
14063 explicit constexpr Pixel(ValueType value)
14064 : m_opt{ verifyValue(value) }
14065 {}
14066
14072
14074 bool hasValue() const;
14075
14077 void reset();
14078
14080 std::string toString() const;
14081
14083 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14084 {
14085 return stream << Pixel{ value }.toString();
14086 }
14087
14089 bool operator==(const Pixel &other) const
14090 {
14091 return m_opt == other.m_opt;
14092 }
14093
14095 bool operator!=(const Pixel &other) const
14096 {
14097 return m_opt != other.m_opt;
14098 }
14099
14101 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14102 {
14103 return stream << value.toString();
14104 }
14105
14106 private:
14107 void setFromString(const std::string &value);
14108
14109 constexpr ValueType static verifyValue(const ValueType &value)
14110 {
14111 return value == ValueType::all || value == ValueType::blueSubsample2x2
14112 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14113 || value == ValueType::redSubsample4x4
14114 ? value
14115 : throw std::invalid_argument{
14116 "Invalid value: Pixel{ "
14117 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14118 };
14119 }
14120
14121 Zivid::DataModel::Detail::Optional<ValueType> m_opt;
14122
14123 friend struct DataModel::Detail::Befriend<Pixel>;
14124 };
14125
14126 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14127
14130
14143#ifndef NO_DOC
14144 template<
14145 typename... Args,
14146 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14147 typename std::enable_if<
14148 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14149 value,
14150 int>::type = 0>
14151#else
14152 template<typename... Args>
14153#endif
14154 explicit Sampling(Args &&...args)
14155 {
14156 using namespace Zivid::Detail::TypeTraits;
14157
14158 static_assert(
14159 AllArgsDecayedAreUnique<Args...>::value,
14160 "Found duplicate types among the arguments passed to Sampling(...). "
14161 "Types should be listed at most once.");
14162
14163 set(std::forward<Args>(args)...);
14164 }
14165
14177#ifndef NO_DOC
14178 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14179#else
14180 template<typename... Args>
14181#endif
14182 void set(Args &&...args)
14183 {
14184 using namespace Zivid::Detail::TypeTraits;
14185
14186 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14187 static_assert(
14188 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14189
14190 static_assert(
14191 AllArgsDecayedAreUnique<Args...>::value,
14192 "Found duplicate types among the arguments passed to set(...). "
14193 "Types should be listed at most once.");
14194
14195 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14196 }
14197
14210#ifndef NO_DOC
14211 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14212#else
14213 template<typename... Args>
14214#endif
14215 Sampling copyWith(Args &&...args) const
14216 {
14217 using namespace Zivid::Detail::TypeTraits;
14218
14219 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14220 static_assert(
14221 AllArgsAreDescendantNodes::value,
14222 "All arguments passed to copyWith(...) must be descendant nodes.");
14223
14224 static_assert(
14225 AllArgsDecayedAreUnique<Args...>::value,
14226 "Found duplicate types among the arguments passed to copyWith(...). "
14227 "Types should be listed at most once.");
14228
14229 auto copy{ *this };
14230 copy.set(std::forward<Args>(args)...);
14231 return copy;
14232 }
14233
14235 const Color &color() const
14236 {
14237 return m_color;
14238 }
14239
14242 {
14243 return m_color;
14244 }
14245
14247 Sampling &set(const Color &value)
14248 {
14249 m_color = value;
14250 return *this;
14251 }
14252
14254 const Pixel &pixel() const
14255 {
14256 return m_pixel;
14257 }
14258
14261 {
14262 return m_pixel;
14263 }
14264
14266 Sampling &set(const Pixel &value)
14267 {
14268 m_pixel = value;
14269 return *this;
14270 }
14271
14272 template<
14273 typename T,
14274 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14276 {
14277 return m_color;
14278 }
14279
14280 template<
14281 typename T,
14282 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14284 {
14285 return m_pixel;
14286 }
14287
14288 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14290 {
14291 return m_color;
14292 }
14293
14294 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14296 {
14297 return m_pixel;
14298 }
14299
14301 template<typename F>
14302 void forEach(const F &f) const
14303 {
14304 f(m_color);
14305 f(m_pixel);
14306 }
14307
14309 template<typename F>
14310 void forEach(const F &f)
14311 {
14312 f(m_color);
14313 f(m_pixel);
14314 }
14315
14317 bool operator==(const Sampling &other) const;
14318
14320 bool operator!=(const Sampling &other) const;
14321
14323 std::string toString() const;
14324
14326 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14327 {
14328 return stream << value.toString();
14329 }
14330
14331 private:
14332 void setFromString(const std::string &value);
14333
14334 void setFromString(const std::string &fullPath, const std::string &value);
14335
14336 std::string getString(const std::string &fullPath) const;
14337
14338 Color m_color;
14339 Pixel m_pixel;
14340
14341 friend struct DataModel::Detail::Befriend<Sampling>;
14342 };
14343
14344 using Descendants = std::tuple<
14411
14414
14416 explicit Settings(const std::string &fileName);
14417
14494#ifndef NO_DOC
14495 template<
14496 typename... Args,
14497 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14498 typename std::enable_if<
14499 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14500 int>::type = 0>
14501#else
14502 template<typename... Args>
14503#endif
14504 explicit Settings(Args &&...args)
14505 {
14506 using namespace Zivid::Detail::TypeTraits;
14507
14508 static_assert(
14509 AllArgsDecayedAreUnique<Args...>::value,
14510 "Found duplicate types among the arguments passed to Settings(...). "
14511 "Types should be listed at most once.");
14512
14513 set(std::forward<Args>(args)...);
14514 }
14515
14591#ifndef NO_DOC
14592 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14593#else
14594 template<typename... Args>
14595#endif
14596 void set(Args &&...args)
14597 {
14598 using namespace Zivid::Detail::TypeTraits;
14599
14600 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14601 static_assert(
14602 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14603
14604 static_assert(
14605 AllArgsDecayedAreUnique<Args...>::value,
14606 "Found duplicate types among the arguments passed to set(...). "
14607 "Types should be listed at most once.");
14608
14609 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14610 }
14611
14688#ifndef NO_DOC
14689 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14690#else
14691 template<typename... Args>
14692#endif
14693 Settings copyWith(Args &&...args) const
14694 {
14695 using namespace Zivid::Detail::TypeTraits;
14696
14697 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14698 static_assert(
14699 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
14700
14701 static_assert(
14702 AllArgsDecayedAreUnique<Args...>::value,
14703 "Found duplicate types among the arguments passed to copyWith(...). "
14704 "Types should be listed at most once.");
14705
14706 auto copy{ *this };
14707 copy.set(std::forward<Args>(args)...);
14708 return copy;
14709 }
14710
14713 {
14714 return m_acquisitions;
14715 }
14716
14719 {
14720 return m_acquisitions;
14721 }
14722
14725 {
14726 m_acquisitions = value;
14727 return *this;
14728 }
14729
14732 {
14733 return m_diagnostics;
14734 }
14735
14738 {
14739 return m_diagnostics;
14740 }
14741
14743 Settings &set(const Diagnostics &value)
14744 {
14745 m_diagnostics = value;
14746 return *this;
14747 }
14748
14751 {
14752 m_diagnostics.set(value);
14753 return *this;
14754 }
14755
14758 {
14759 return m_experimental;
14760 }
14761
14764 {
14765 return m_experimental;
14766 }
14767
14770 {
14771 m_experimental = value;
14772 return *this;
14773 }
14774
14777 {
14778 m_experimental.set(value);
14779 return *this;
14780 }
14781
14783 const Processing &processing() const
14784 {
14785 return m_processing;
14786 }
14787
14790 {
14791 return m_processing;
14792 }
14793
14795 Settings &set(const Processing &value)
14796 {
14797 m_processing = value;
14798 return *this;
14799 }
14800
14803 {
14804 m_processing.set(value);
14805 return *this;
14806 }
14807
14810 {
14811 m_processing.set(value);
14812 return *this;
14813 }
14814
14817 {
14818 m_processing.set(value);
14819 return *this;
14820 }
14821
14824 {
14825 m_processing.set(value);
14826 return *this;
14827 }
14828
14831 {
14832 m_processing.set(value);
14833 return *this;
14834 }
14835
14838 {
14839 m_processing.set(value);
14840 return *this;
14841 }
14842
14845 {
14846 m_processing.set(value);
14847 return *this;
14848 }
14849
14852 {
14853 m_processing.set(value);
14854 return *this;
14855 }
14856
14859 {
14860 m_processing.set(value);
14861 return *this;
14862 }
14863
14866 {
14867 m_processing.set(value);
14868 return *this;
14869 }
14870
14873 {
14874 m_processing.set(value);
14875 return *this;
14876 }
14877
14880 {
14881 m_processing.set(value);
14882 return *this;
14883 }
14884
14887 {
14888 m_processing.set(value);
14889 return *this;
14890 }
14891
14894 {
14895 m_processing.set(value);
14896 return *this;
14897 }
14898
14901 {
14902 m_processing.set(value);
14903 return *this;
14904 }
14905
14908 {
14909 m_processing.set(value);
14910 return *this;
14911 }
14912
14915 {
14916 m_processing.set(value);
14917 return *this;
14918 }
14919
14922 {
14923 m_processing.set(value);
14924 return *this;
14925 }
14926
14929 {
14930 m_processing.set(value);
14931 return *this;
14932 }
14933
14936 {
14937 m_processing.set(value);
14938 return *this;
14939 }
14940
14943 {
14944 m_processing.set(value);
14945 return *this;
14946 }
14947
14950 {
14951 m_processing.set(value);
14952 return *this;
14953 }
14954
14957 {
14958 m_processing.set(value);
14959 return *this;
14960 }
14961
14964 {
14965 m_processing.set(value);
14966 return *this;
14967 }
14968
14971 {
14972 m_processing.set(value);
14973 return *this;
14974 }
14975
14978 {
14979 m_processing.set(value);
14980 return *this;
14981 }
14982
14985 {
14986 m_processing.set(value);
14987 return *this;
14988 }
14989
14992 {
14993 m_processing.set(value);
14994 return *this;
14995 }
14996
14999 {
15000 m_processing.set(value);
15001 return *this;
15002 }
15003
15006 {
15007 m_processing.set(value);
15008 return *this;
15009 }
15010
15013 {
15014 m_processing.set(value);
15015 return *this;
15016 }
15017
15020 {
15021 m_processing.set(value);
15022 return *this;
15023 }
15024
15027 {
15028 m_processing.set(value);
15029 return *this;
15030 }
15031
15034 {
15035 m_processing.set(value);
15036 return *this;
15037 }
15038
15041 {
15042 m_processing.set(value);
15043 return *this;
15044 }
15045
15048 {
15049 m_processing.set(value);
15050 return *this;
15051 }
15052
15055 {
15056 m_processing.set(value);
15057 return *this;
15058 }
15059
15062 {
15063 m_processing.set(value);
15064 return *this;
15065 }
15066
15069 {
15070 m_processing.set(value);
15071 return *this;
15072 }
15073
15076 {
15077 m_processing.set(value);
15078 return *this;
15079 }
15080
15083 {
15084 m_processing.set(value);
15085 return *this;
15086 }
15087
15090 {
15091 m_processing.set(value);
15092 return *this;
15093 }
15094
15097 {
15098 m_processing.set(value);
15099 return *this;
15100 }
15101
15104 {
15105 m_processing.set(value);
15106 return *this;
15107 }
15108
15111 {
15112 m_processing.set(value);
15113 return *this;
15114 }
15115
15118 {
15119 m_processing.set(value);
15120 return *this;
15121 }
15122
15125 {
15126 m_processing.set(value);
15127 return *this;
15128 }
15129
15132 {
15133 return m_regionOfInterest;
15134 }
15135
15138 {
15139 return m_regionOfInterest;
15140 }
15141
15144 {
15145 m_regionOfInterest = value;
15146 return *this;
15147 }
15148
15151 {
15152 m_regionOfInterest.set(value);
15153 return *this;
15154 }
15155
15158 {
15159 m_regionOfInterest.set(value);
15160 return *this;
15161 }
15162
15165 {
15166 m_regionOfInterest.set(value);
15167 return *this;
15168 }
15169
15172 {
15173 m_regionOfInterest.set(value);
15174 return *this;
15175 }
15176
15179 {
15180 m_regionOfInterest.set(value);
15181 return *this;
15182 }
15183
15186 {
15187 m_regionOfInterest.set(value);
15188 return *this;
15189 }
15190
15193 {
15194 m_regionOfInterest.set(value);
15195 return *this;
15196 }
15197
15200 {
15201 m_regionOfInterest.set(value);
15202 return *this;
15203 }
15204
15207 {
15208 m_regionOfInterest.set(value);
15209 return *this;
15210 }
15211
15213 const Sampling &sampling() const
15214 {
15215 return m_sampling;
15216 }
15217
15220 {
15221 return m_sampling;
15222 }
15223
15225 Settings &set(const Sampling &value)
15226 {
15227 m_sampling = value;
15228 return *this;
15229 }
15230
15233 {
15234 m_sampling.set(value);
15235 return *this;
15236 }
15237
15240 {
15241 m_sampling.set(value);
15242 return *this;
15243 }
15244
15245 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15247 {
15248 return m_acquisitions;
15249 }
15250
15251 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15253 {
15254 return m_diagnostics;
15255 }
15256
15257 template<
15258 typename T,
15259 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15261 {
15262 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15263 }
15264
15265 template<typename T, typename std::enable_if<std::is_same<T, Settings::Experimental>::value, int>::type = 0>
15267 {
15268 return m_experimental;
15269 }
15270
15271 template<
15272 typename T,
15273 typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
15275 {
15276 return m_experimental.get<Settings::Experimental::Engine>();
15277 }
15278
15279 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15281 {
15282 return m_processing;
15283 }
15284
15285 template<
15286 typename T,
15287 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15289 {
15290 return m_processing.get<Settings::Processing::Color>();
15291 }
15292
15293 template<
15294 typename T,
15295 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15297 {
15298 return m_processing.get<Settings::Processing::Color::Balance>();
15299 }
15300
15301 template<
15302 typename T,
15303 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15305 {
15306 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15307 }
15308
15309 template<
15310 typename T,
15311 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15313 {
15314 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15315 }
15316
15317 template<
15318 typename T,
15319 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15321 {
15322 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15323 }
15324
15325 template<
15326 typename T,
15327 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15329 {
15330 return m_processing.get<Settings::Processing::Color::Experimental>();
15331 }
15332
15333 template<
15334 typename T,
15335 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15336 type = 0>
15338 {
15339 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15340 }
15341
15342 template<
15343 typename T,
15344 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15346 {
15347 return m_processing.get<Settings::Processing::Color::Gamma>();
15348 }
15349
15350 template<
15351 typename T,
15352 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15354 {
15355 return m_processing.get<Settings::Processing::Filters>();
15356 }
15357
15358 template<
15359 typename T,
15360 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15362 {
15363 return m_processing.get<Settings::Processing::Filters::Cluster>();
15364 }
15365
15366 template<
15367 typename T,
15368 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15369 type = 0>
15371 {
15373 }
15374
15375 template<
15376 typename T,
15377 typename std::enable_if<
15378 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
15379 int>::type = 0>
15381 {
15383 }
15384
15385 template<
15386 typename T,
15387 typename std::enable_if<
15388 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
15389 int>::type = 0>
15391 {
15393 }
15394
15395 template<
15396 typename T,
15397 typename std::enable_if<
15398 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15399 int>::type = 0>
15401 {
15403 }
15404
15405 template<
15406 typename T,
15407 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15409 {
15410 return m_processing.get<Settings::Processing::Filters::Experimental>();
15411 }
15412
15413 template<
15414 typename T,
15415 typename std::enable_if<
15416 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
15417 int>::type = 0>
15419 {
15421 }
15422
15423 template<
15424 typename T,
15425 typename std::enable_if<
15426 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
15427 int>::type = 0>
15429 {
15431 }
15432
15433 template<
15434 typename T,
15435 typename std::enable_if<
15436 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15437 value,
15438 int>::type = 0>
15440 {
15441 return m_processing
15443 }
15444
15445 template<
15446 typename T,
15447 typename std::enable_if<
15448 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15449 value,
15450 int>::type = 0>
15452 {
15453 return m_processing
15455 }
15456
15457 template<
15458 typename T,
15459 typename std::enable_if<
15460 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15461 int>::type = 0>
15463 {
15465 }
15466
15467 template<
15468 typename T,
15469 typename std::enable_if<
15470 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15471 value,
15472 int>::type = 0>
15474 {
15475 return m_processing
15477 }
15478
15479 template<
15480 typename T,
15481 typename std::enable_if<
15482 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15483 value,
15484 int>::type = 0>
15486 {
15487 return m_processing
15489 }
15490
15491 template<
15492 typename T,
15493 typename std::enable_if<
15494 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling>::value,
15495 int>::type = 0>
15497 {
15499 }
15500
15501 template<
15502 typename T,
15503 typename std::enable_if<
15504 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Enabled>::value,
15505 int>::type = 0>
15507 {
15509 }
15510
15511 template<
15512 typename T,
15513 typename std::enable_if<
15514 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize>::value,
15515 int>::type = 0>
15517 {
15519 }
15520
15521 template<
15522 typename T,
15523 typename std::enable_if<
15524 std::is_same<T, Settings::Processing::Filters::Experimental::HoleFilling::Strictness>::value,
15525 int>::type = 0>
15527 {
15529 }
15530
15531 template<
15532 typename T,
15533 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15535 {
15536 return m_processing.get<Settings::Processing::Filters::Noise>();
15537 }
15538
15539 template<
15540 typename T,
15541 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15542 0>
15544 {
15546 }
15547
15548 template<
15549 typename T,
15550 typename std::enable_if<
15551 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
15552 int>::type = 0>
15554 {
15556 }
15557
15558 template<
15559 typename T,
15560 typename std::enable_if<
15561 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
15562 int>::type = 0>
15564 {
15566 }
15567
15568 template<
15569 typename T,
15570 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
15571 0>
15573 {
15575 }
15576
15577 template<
15578 typename T,
15579 typename std::
15580 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
15582 {
15584 }
15585
15586 template<
15587 typename T,
15588 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
15589 type = 0>
15591 {
15593 }
15594
15595 template<
15596 typename T,
15597 typename std::enable_if<
15598 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
15599 int>::type = 0>
15601 {
15603 }
15604
15605 template<
15606 typename T,
15607 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
15609 {
15610 return m_processing.get<Settings::Processing::Filters::Outlier>();
15611 }
15612
15613 template<
15614 typename T,
15615 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
15616 type = 0>
15618 {
15620 }
15621
15622 template<
15623 typename T,
15624 typename std::enable_if<
15625 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
15626 int>::type = 0>
15628 {
15630 }
15631
15632 template<
15633 typename T,
15634 typename std::enable_if<
15635 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
15636 int>::type = 0>
15638 {
15640 }
15641
15642 template<
15643 typename T,
15644 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
15646 {
15647 return m_processing.get<Settings::Processing::Filters::Reflection>();
15648 }
15649
15650 template<
15651 typename T,
15652 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
15653 type = 0>
15655 {
15657 }
15658
15659 template<
15660 typename T,
15661 typename std::enable_if<
15662 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
15663 int>::type = 0>
15665 {
15667 }
15668
15669 template<
15670 typename T,
15671 typename std::enable_if<
15672 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
15673 int>::type = 0>
15675 {
15677 }
15678
15679 template<
15680 typename T,
15681 typename std::enable_if<
15682 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode>::value,
15683 int>::type = 0>
15685 {
15687 }
15688
15689 template<
15690 typename T,
15691 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
15693 {
15694 return m_processing.get<Settings::Processing::Filters::Smoothing>();
15695 }
15696
15697 template<
15698 typename T,
15699 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
15700 type = 0>
15702 {
15704 }
15705
15706 template<
15707 typename T,
15708 typename std::enable_if<
15709 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
15710 int>::type = 0>
15712 {
15714 }
15715
15716 template<
15717 typename T,
15718 typename std::enable_if<
15719 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
15720 int>::type = 0>
15722 {
15724 }
15725
15726 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
15728 {
15729 return m_regionOfInterest;
15730 }
15731
15732 template<
15733 typename T,
15734 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
15736 {
15737 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
15738 }
15739
15740 template<
15741 typename T,
15742 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
15744 {
15745 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
15746 }
15747
15748 template<
15749 typename T,
15750 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
15752 {
15753 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
15754 }
15755
15756 template<
15757 typename T,
15758 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
15760 {
15761 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
15762 }
15763
15764 template<
15765 typename T,
15766 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
15768 {
15769 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
15770 }
15771
15772 template<
15773 typename T,
15774 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
15776 {
15777 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
15778 }
15779
15780 template<
15781 typename T,
15782 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
15784 {
15785 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
15786 }
15787
15788 template<
15789 typename T,
15790 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
15792 {
15793 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
15794 }
15795
15796 template<
15797 typename T,
15798 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
15800 {
15801 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
15802 }
15803
15804 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
15806 {
15807 return m_sampling;
15808 }
15809
15810 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
15812 {
15813 return m_sampling.get<Settings::Sampling::Color>();
15814 }
15815
15816 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
15818 {
15819 return m_sampling.get<Settings::Sampling::Pixel>();
15820 }
15821
15822 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
15824 {
15825 return m_acquisitions;
15826 }
15827
15828 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
15830 {
15831 return m_diagnostics;
15832 }
15833
15834 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
15836 {
15837 return m_experimental;
15838 }
15839
15840 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
15842 {
15843 return m_processing;
15844 }
15845
15846 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
15848 {
15849 return m_regionOfInterest;
15850 }
15851
15852 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
15854 {
15855 return m_sampling;
15856 }
15857
15859 template<typename F>
15860 void forEach(const F &f) const
15861 {
15862 f(m_acquisitions);
15863 f(m_diagnostics);
15864 f(m_experimental);
15865 f(m_processing);
15866 f(m_regionOfInterest);
15867 f(m_sampling);
15868 }
15869
15871 template<typename F>
15872 void forEach(const F &f)
15873 {
15874 f(m_acquisitions);
15875 f(m_diagnostics);
15876 f(m_experimental);
15877 f(m_processing);
15878 f(m_regionOfInterest);
15879 f(m_sampling);
15880 }
15881
15883 bool operator==(const Settings &other) const;
15884
15886 bool operator!=(const Settings &other) const;
15887
15889 std::string toString() const;
15890
15892 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
15893 {
15894 return stream << value.toString();
15895 }
15896
15898 void save(const std::string &fileName) const;
15899
15901 void load(const std::string &fileName);
15902
15903 private:
15904 void setFromString(const std::string &value);
15905
15906 void setFromString(const std::string &fullPath, const std::string &value);
15907
15908 std::string getString(const std::string &fullPath) const;
15909
15910 Acquisitions m_acquisitions;
15911 Diagnostics m_diagnostics;
15912 Experimental m_experimental;
15913 Processing m_processing;
15914 RegionOfInterest m_regionOfInterest;
15915 Sampling m_sampling;
15916
15917 friend struct DataModel::Detail::Befriend<Settings>;
15918 };
15919
15920#ifndef NO_DOC
15922 namespace Detail
15923 {
15924 ZIVID_CORE_EXPORT void save(const Settings &dataModel, std::ostream &ostream);
15925 ZIVID_CORE_EXPORT void load(Settings &dataModel, std::istream &istream);
15926 } // namespace Detail
15927#endif
15928
15929#ifndef NO_DOC
15930 template<>
15931 struct Settings::Version<22>
15932 {
15933 using Type = Settings;
15934 };
15935#endif
15936
15937} // namespace Zivid
15938
15939#ifdef _MSC_VER
15940# pragma warning(pop)
15941#endif
15942
15943#ifndef NO_DOC
15944# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
15945namespace std // NOLINT
15946{
15947
15948 template<>
15949 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
15950 {};
15951
15952 template<size_t i>
15953 struct tuple_element<i, Zivid::Settings::Diagnostics>
15954 {
15955 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
15956
15957 using type // NOLINT
15958 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
15959 };
15960
15961 template<>
15962 struct tuple_size<Zivid::Settings::Experimental> : integral_constant<size_t, 1>
15963 {};
15964
15965 template<size_t i>
15966 struct tuple_element<i, Zivid::Settings::Experimental>
15967 {
15968 static_assert(i < tuple_size<Zivid::Settings::Experimental>::value, "Index must be less than 1");
15969
15970 using type // NOLINT
15971 = decltype(declval<Zivid::Settings::Experimental>().get<i>());
15972 };
15973
15974 template<>
15975 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 2>
15976 {};
15977
15978 template<size_t i>
15979 struct tuple_element<i, Zivid::Settings::Processing>
15980 {
15981 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 2");
15982
15983 using type // NOLINT
15984 = decltype(declval<Zivid::Settings::Processing>().get<i>());
15985 };
15986
15987 template<>
15988 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
15989 {};
15990
15991 template<size_t i>
15992 struct tuple_element<i, Zivid::Settings::Processing::Color>
15993 {
15994 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
15995
15996 using type // NOLINT
15997 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
15998 };
15999
16000 template<>
16001 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16002 {};
16003
16004 template<size_t i>
16005 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16006 {
16007 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16008
16009 using type // NOLINT
16010 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16011 };
16012
16013 template<>
16014 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16015 {};
16016
16017 template<size_t i>
16018 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16019 {
16020 static_assert(
16021 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16022 "Index must be less than 1");
16023
16024 using type // NOLINT
16025 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16026 };
16027
16028 template<>
16029 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 6>
16030 {};
16031
16032 template<size_t i>
16033 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16034 {
16035 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 6");
16036
16037 using type // NOLINT
16038 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16039 };
16040
16041 template<>
16042 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16043 {};
16044
16045 template<size_t i>
16046 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16047 {
16048 static_assert(
16049 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16050 "Index must be less than 1");
16051
16052 using type // NOLINT
16053 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16054 };
16055
16056 template<>
16057 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16058 {};
16059
16060 template<size_t i>
16061 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16062 {
16063 static_assert(
16064 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16065 "Index must be less than 3");
16066
16067 using type // NOLINT
16068 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16069 };
16070
16071 template<>
16072 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 2>
16073 {};
16074
16075 template<size_t i>
16076 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16077 {
16078 static_assert(
16079 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16080 "Index must be less than 2");
16081
16082 using type // NOLINT
16083 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16084 };
16085
16086 template<>
16087 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16088 : integral_constant<size_t, 2>
16089 {};
16090
16091 template<size_t i>
16092 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16093 {
16094 static_assert(
16095 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16096 "Index must be less than 2");
16097
16098 using type // NOLINT
16099 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16100 };
16101
16102 template<>
16103 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16104 : integral_constant<size_t, 2>
16105 {};
16106
16107 template<size_t i>
16108 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16109 {
16110 static_assert(
16111 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16112 "Index must be less than 2");
16113
16114 using type // NOLINT
16115 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16116 .get<i>());
16117 };
16118
16119 template<>
16120 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16121 : integral_constant<size_t, 2>
16122 {};
16123
16124 template<size_t i>
16125 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16126 {
16127 static_assert(
16128 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16129 "Index must be less than 2");
16130
16131 using type // NOLINT
16132 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16133 .get<i>());
16134 };
16135
16136 template<>
16137 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::HoleFilling> : integral_constant<size_t, 3>
16138 {};
16139
16140 template<size_t i>
16141 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::HoleFilling>
16142 {
16143 static_assert(
16144 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::HoleFilling>::value,
16145 "Index must be less than 3");
16146
16147 using type // NOLINT
16148 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::HoleFilling>().get<i>());
16149 };
16150
16151 template<>
16152 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16153 {};
16154
16155 template<size_t i>
16156 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16157 {
16158 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16159
16160 using type // NOLINT
16161 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16162 };
16163
16164 template<>
16165 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16166 {};
16167
16168 template<size_t i>
16169 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16170 {
16171 static_assert(
16172 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16173 "Index must be less than 2");
16174
16175 using type // NOLINT
16176 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16177 };
16178
16179 template<>
16180 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16181 {};
16182
16183 template<size_t i>
16184 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16185 {
16186 static_assert(
16187 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16188 "Index must be less than 1");
16189
16190 using type // NOLINT
16191 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16192 };
16193
16194 template<>
16195 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16196 {};
16197
16198 template<size_t i>
16199 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16200 {
16201 static_assert(
16202 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16203 "Index must be less than 1");
16204
16205 using type // NOLINT
16206 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16207 };
16208
16209 template<>
16210 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16211 {};
16212
16213 template<size_t i>
16214 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16215 {
16216 static_assert(
16217 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16218 "Index must be less than 1");
16219
16220 using type // NOLINT
16221 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16222 };
16223
16224 template<>
16225 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16226 {};
16227
16228 template<size_t i>
16229 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16230 {
16231 static_assert(
16232 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16233 "Index must be less than 2");
16234
16235 using type // NOLINT
16236 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16237 };
16238
16239 template<>
16240 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16241 {};
16242
16243 template<size_t i>
16244 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16245 {
16246 static_assert(
16247 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16248 "Index must be less than 1");
16249
16250 using type // NOLINT
16251 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16252 };
16253
16254 template<>
16255 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16256 {};
16257
16258 template<size_t i>
16259 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16260 {
16261 static_assert(
16262 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16263 "Index must be less than 2");
16264
16265 using type // NOLINT
16266 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16267 };
16268
16269 template<>
16270 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>
16271 : integral_constant<size_t, 1>
16272 {};
16273
16274 template<size_t i>
16275 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>
16276 {
16277 static_assert(
16278 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>::value,
16279 "Index must be less than 1");
16280
16281 using type // NOLINT
16282 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal::Experimental>().get<i>());
16283 };
16284
16285 template<>
16286 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16287 {};
16288
16289 template<size_t i>
16290 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16291 {
16292 static_assert(
16293 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16294 "Index must be less than 1");
16295
16296 using type // NOLINT
16297 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16298 };
16299
16300 template<>
16301 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16302 {};
16303
16304 template<size_t i>
16305 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16306 {
16307 static_assert(
16308 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16309 "Index must be less than 2");
16310
16311 using type // NOLINT
16312 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16313 };
16314
16315 template<>
16316 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16317 {};
16318
16319 template<size_t i>
16320 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16321 {
16322 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16323
16324 using type // NOLINT
16325 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16326 };
16327
16328 template<>
16329 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16330 {};
16331
16332 template<size_t i>
16333 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16334 {
16335 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16336
16337 using type // NOLINT
16338 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16339 };
16340
16341 template<>
16342 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16343 {};
16344
16345 template<size_t i>
16346 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16347 {
16348 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16349
16350 using type // NOLINT
16351 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16352 };
16353
16354 template<>
16355 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16356 {};
16357
16358 template<size_t i>
16359 struct tuple_element<i, Zivid::Settings::Sampling>
16360 {
16361 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16362
16363 using type // NOLINT
16364 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16365 };
16366
16367 template<>
16368 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 6>
16369 {};
16370
16371 template<size_t i>
16372 struct tuple_element<i, Zivid::Settings>
16373 {
16374 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 6");
16375
16376 using type // NOLINT
16377 = decltype(declval<Zivid::Settings>().get<i>());
16378 };
16379
16380} // namespace std
16381# endif
16382#endif
16383
16384// If we have access to the DataModel library, automatically include internal DataModel
16385// header. This header is necessary for serialization and deserialization.
16386#if defined(__has_include) && !defined(NO_DOC)
16387# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16388# include "Zivid/SettingsInternal.h"
16389# endif
16390#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
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
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition Settings.h:598
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 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:1387
ValueType value() const
Get the value.
static const Engine phase
phase
Definition Settings.h:1427
bool hasValue() const
Check if the value is set.
static const Engine omni
omni
Definition Settings.h:1429
ValueType
The type of the underlying value.
Definition Settings.h:1422
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream.
Definition Settings.h:1479
static std::set< ValueType > validValues()
All valid values of Engine.
Definition Settings.h:1432
std::string toString() const
Get the value as string.
bool operator==(const Engine &other) const
Comparison operator.
Definition Settings.h:1467
Engine()=default
Default constructor.
bool operator!=(const Engine &other) const
Comparison operator.
Definition Settings.h:1473
constexpr Engine(ValueType value)
Constructor.
Definition Settings.h:1441
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:1461
static const Engine stripe
stripe
Definition Settings.h:1428
void reset()
Reset the node to unset state.
Experimental features. These settings may be changed, renamed, moved or deleted in the future.
Definition Settings.h:1348
Engine & engine()
Get Engine.
Definition Settings.h:1614
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1556
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:1588
std::string toString() const
Get the value as string.
bool operator!=(const Experimental &other) const
Inequality operator.
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:1664
const Settings::Experimental::Engine & get() const
Definition Settings.h:1629
std::tuple< Settings::Experimental::Engine > Descendants
Definition Settings.h:1502
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:1642
bool operator==(const Experimental &other) const
Equality operator.
Experimental()
Default constructor.
Experimental & set(const Engine &value)
Set Engine.
Definition Settings.h:1620
const Engine & engine() const
Get Engine.
Definition Settings.h:1608
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:1649
Digital gain applied to blue channel.
Definition Settings.h:1741
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings.h:1826
void reset()
Reset the node to unset state.
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings.h:1790
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings.h:1820
std::string toString() const
Get the value as string.
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings.h:1802
constexpr Blue(double value)
Constructor.
Definition Settings.h:1770
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings.h:1814
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings.h:1796
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:1758
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings.h:1808
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings.h:1761
Digital gain applied to green channel.
Definition Settings.h:1853
void reset()
Reset the node to unset state.
bool operator>(const Green &other) const
Comparison operator.
Definition Settings.h:1920
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:1938
double ValueType
The type of the underlying value.
Definition Settings.h:1870
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings.h:1932
constexpr Green(double value)
Constructor.
Definition Settings.h:1882
bool operator==(const Green &other) const
Comparison operator.
Definition Settings.h:1902
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings.h:1908
std::string toString() const
Get the value as string.
bool operator<(const Green &other) const
Comparison operator.
Definition Settings.h:1914
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings.h:1873
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings.h:1926
Digital gain applied to red channel.
Definition Settings.h:1965
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings.h:2020
constexpr Red(double value)
Constructor.
Definition Settings.h:1994
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings.h:2050
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings.h:2044
double ValueType
The type of the underlying value.
Definition Settings.h:1982
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings.h:1985
bool operator==(const Red &other) const
Comparison operator.
Definition Settings.h:2014
bool operator<(const Red &other) const
Comparison operator.
Definition Settings.h:2026
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings.h:2032
bool hasValue() const
Check if the value is set.
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings.h:2038
std::string toString() const
Get the value as string.
Color balance settings.
Definition Settings.h:1723
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2134
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:2296
bool operator!=(const Balance &other) const
Inequality operator.
Balance & set(const Red &value)
Set Red.
Definition Settings.h:2241
Green & green()
Get Green.
Definition Settings.h:2216
std::string toString() const
Get the value as string.
Red & red()
Get Red.
Definition Settings.h:2235
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:2170
Balance & set(const Blue &value)
Set Blue.
Definition Settings.h:2203
Blue & blue()
Get Blue.
Definition Settings.h:2197
const Red & red() const
Get Red.
Definition Settings.h:2229
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition Settings.h:2076
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2305
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2262
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2271
Balance & set(const Green &value)
Set Green.
Definition Settings.h:2222
const Green & green() const
Get Green.
Definition Settings.h:2210
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings.h:2322
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2252
const Blue & blue() const
Get Blue.
Definition Settings.h:2191
This setting controls how the color image is computed.
Definition Settings.h:2386
static const Mode toneMapping
toneMapping
Definition Settings.h:2432
std::string toString() const
Get the value as string.
static const Mode automatic
automatic
Definition Settings.h:2430
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:2482
void reset()
Reset the node to unset state.
static const Mode useFirstAcquisition
useFirstAcquisition
Definition Settings.h:2431
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:2476
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:2470
ValueType
The type of the underlying value.
Definition Settings.h:2425
bool hasValue() const
Check if the value is set.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:2444
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:2435
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:2464
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition Settings.h:2345
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition Settings.h:2507
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:2674
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2659
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2561
std::string toString() const
Get the value as string.
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:2628
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:2652
bool operator==(const Experimental &other) const
Equality operator.
Mode & mode()
Get Mode.
Definition Settings.h:2622
const Mode & mode() const
Get Mode.
Definition Settings.h:2616
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2639
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:2595
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings.h:2697
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings.h:2784
double value() const
Get the value.
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings.h:2766
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings.h:2719
Gamma()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:2716
bool hasValue() const
Check if the value is set.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2778
constexpr Gamma(double value)
Constructor.
Definition Settings.h:2728
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2754
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings.h:2760
std::string toString() const
Get the value as string.
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings.h:2748
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2772
Color settings.
Definition Settings.h:1705
Color & set(const Gamma &value)
Set Gamma.
Definition Settings.h:3017
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:3081
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:3054
bool operator==(const Color &other) const
Equality operator.
Color & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:2998
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:3045
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2879
Color & set(const Experimental &value)
Set Experimental.
Definition Settings.h:2991
Color & set(const Balance &value)
Set Balance.
Definition Settings.h:2951
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings.h:3132
const Balance & balance() const
Get Balance.
Definition Settings.h:2939
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:2979
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3115
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:3063
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings.h:2965
Experimental & experimental()
Get Experimental.
Definition Settings.h:2985
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:2813
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings.h:2958
Gamma & gamma()
Get Gamma.
Definition Settings.h:3011
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:2918
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:3073
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings.h:2972
const Gamma & gamma() const
Get Gamma.
Definition Settings.h:3005
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:3027
Balance & balance()
Get Balance.
Definition Settings.h:2945
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:3106
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:3036
bool ValueType
The type of the underlying value.
Definition Settings.h:3228
static const Enabled no
Off/disabled.
Definition Settings.h:3230
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3242
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3233
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3268
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3274
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3262
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:3229
Maximum normalized distance between neighboring points that are still classified as belonging to the ...
Definition Settings.h:3294
constexpr MaxNeighborDistance(double value)
Constructor.
Definition Settings.h:3328
bool operator!=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3354
double ValueType
The type of the underlying value.
Definition Settings.h:3316
bool operator>=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3378
bool operator<(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3360
static constexpr Range< double > validRange()
The range of valid values for MaxNeighborDistance.
Definition Settings.h:3319
bool operator<=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3372
friend std::ostream & operator<<(std::ostream &stream, const MaxNeighborDistance &value)
Operator to serialize the value to a stream.
Definition Settings.h:3384
bool operator==(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3348
bool operator>(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3366
Clusters with area below this threshold are removed by the filter. The area is given in mm^2.
Definition Settings.h:3413
bool operator>=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3494
double ValueType
The type of the underlying value.
Definition Settings.h:3432
friend std::ostream & operator<<(std::ostream &stream, const MinArea &value)
Operator to serialize the value to a stream.
Definition Settings.h:3500
bool operator<(const MinArea &other) const
Comparison operator.
Definition Settings.h:3476
bool operator!=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3470
bool operator<=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3488
constexpr MinArea(double value)
Constructor.
Definition Settings.h:3444
std::string toString() const
Get the value as string.
bool operator>(const MinArea &other) const
Comparison operator.
Definition Settings.h:3482
static constexpr Range< double > validRange()
The range of valid values for MinArea.
Definition Settings.h:3435
bool operator==(const MinArea &other) const
Comparison operator.
Definition Settings.h:3464
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:3774
const MaxNeighborDistance & maxNeighborDistance() const
Get MaxNeighborDistance.
Definition Settings.h:3660
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:3641
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3713
std::string toString() const
Get the value as string.
MinArea & minArea()
Get MinArea.
Definition Settings.h:3685
const MinArea & minArea() const
Get MinArea.
Definition Settings.h:3679
bool operator!=(const Removal &other) const
Inequality operator.
Removal copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:3620
Removal & set(const MaxNeighborDistance &value)
Set MaxNeighborDistance.
Definition Settings.h:3672
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3723
Removal & set(const MinArea &value)
Set MinArea.
Definition Settings.h:3691
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:3748
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3702
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:3647
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3584
bool operator==(const Removal &other) const
Equality operator.
MaxNeighborDistance & maxNeighborDistance()
Get MaxNeighborDistance.
Definition Settings.h:3666
std::tuple< Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea > Descendants
Definition Settings.h:3526
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3757
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:3653
Removes floating points and isolated clusters from the point cloud.
Definition Settings.h:3174
const Removal & removal() const
Get Removal.
Definition Settings.h:3915
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3990
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:3959
Cluster & set(const Removal::MaxNeighborDistance &value)
Set Removal::MaxNeighborDistance.
Definition Settings.h:3941
bool operator!=(const Cluster &other) const
Inequality operator.
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3980
bool operator==(const Cluster &other) const
Equality operator.
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:3894
Removal & removal()
Get Removal.
Definition Settings.h:3921
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4010
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:4003
Cluster & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:3934
Cluster & set(const Removal &value)
Set Removal.
Definition Settings.h:3927
Cluster & set(const Removal::MinArea &value)
Set Removal::MinArea.
Definition Settings.h:3948
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3969
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:3797
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3857
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:4025
bool ValueType
The type of the underlying value.
Definition Settings.h:4131
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4136
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4145
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4177
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4165
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4171
Higher values gives more correction.
Definition Settings.h:4194
double ValueType
The type of the underlying value.
Definition Settings.h:4213
bool operator>(const Strength &other) const
Comparison operator.
Definition Settings.h:4263
bool operator!=(const Strength &other) const
Comparison operator.
Definition Settings.h:4251
constexpr Strength(double value)
Constructor.
Definition Settings.h:4225
static constexpr Range< double > validRange()
The range of valid values for Strength.
Definition Settings.h:4216
bool operator<=(const Strength &other) const
Comparison operator.
Definition Settings.h:4269
bool operator>=(const Strength &other) const
Comparison operator.
Definition Settings.h:4275
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream.
Definition Settings.h:4281
bool operator<(const Strength &other) const
Comparison operator.
Definition Settings.h:4257
bool operator==(const Strength &other) const
Comparison operator.
Definition Settings.h:4245
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:4501
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4418
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:4479
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition Settings.h:4306
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:4397
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:4464
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:4525
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4362
Correction & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4430
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4509
Correction & set(const Strength &value)
Set Strength.
Definition Settings.h:4449
const Strength & strength() const
Get Strength.
Definition Settings.h:4437
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4598
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4624
bool ValueType
The type of the underlying value.
Definition Settings.h:4584
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4589
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4630
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4618
static const Enabled no
Off/disabled.
Definition Settings.h:4586
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4722
constexpr Threshold(double value)
Constructor.
Definition Settings.h:4678
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4704
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:4710
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:4669
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:4698
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4728
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:4716
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:4734
double ValueType
The type of the underlying value.
Definition Settings.h:4666
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:4952
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4815
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:4976
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:4890
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:4902
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:4850
Threshold & threshold()
Get Threshold.
Definition Settings.h:4896
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4883
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:4917
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:4759
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4871
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:4931
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4960
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition Settings.h:4070
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:5176
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled.
Definition Settings.h:5143
ContrastDistortion & set(const Correction &value)
Set Correction.
Definition Settings.h:5136
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:5287
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:5311
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:5103
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:5000
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength.
Definition Settings.h:5150
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5064
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5295
ContrastDistortion & set(const Removal &value)
Set Removal.
Definition Settings.h:5169
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5266
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5238
const Removal & removal() const
Get Removal.
Definition Settings.h:5157
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5210
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5196
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5225
Removal & removal()
Get Removal.
Definition Settings.h:5163
bool operator==(const ContrastDistortion &other) const
Equality operator.
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:5183
const Correction & correction() const
Get Correction.
Definition Settings.h:5124
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5251
Correction & correction()
Get Correction.
Definition Settings.h:5130
static const Enabled no
Off/disabled.
Definition Settings.h:5372
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:5404
static const Enabled yes
On/enabled.
Definition Settings.h:5371
bool ValueType
The type of the underlying value.
Definition Settings.h:5370
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:5375
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:5410
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:5416
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:5384
Relative diameter of holes to fill. Increasing this will fill more points, but require more computati...
Definition Settings.h:5436
bool operator>=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5518
bool operator<=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5512
double ValueType
The type of the underlying value.
Definition Settings.h:5456
friend std::ostream & operator<<(std::ostream &stream, const HoleSize &value)
Operator to serialize the value to a stream.
Definition Settings.h:5524
bool operator!=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5494
bool operator>(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5506
constexpr HoleSize(double value)
Constructor.
Definition Settings.h:5468
static constexpr Range< double > validRange()
The range of valid values for HoleSize.
Definition Settings.h:5459
bool operator==(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5488
bool operator<(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5500
Level of strictness when considering if a point should be filled. A higher level of strictness requir...
Definition Settings.h:5555
bool operator==(const Strictness &other) const
Comparison operator.
Definition Settings.h:5610
bool operator<(const Strictness &other) const
Comparison operator.
Definition Settings.h:5622
bool operator>(const Strictness &other) const
Comparison operator.
Definition Settings.h:5628
bool operator<=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5634
constexpr Strictness(int32_t value)
Constructor.
Definition Settings.h:5590
bool operator!=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5616
static constexpr Range< int32_t > validRange()
The range of valid values for Strictness.
Definition Settings.h:5581
int32_t ValueType
The type of the underlying value.
Definition Settings.h:5578
friend std::ostream & operator<<(std::ostream &stream, const Strictness &value)
Operator to serialize the value to a stream.
Definition Settings.h:5646
bool operator>=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5640
Fills in removed points by interpolating remaining surrounding points.
Definition Settings.h:5334
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:5896
const Strictness & strictness() const
Get Strictness.
Definition Settings.h:5825
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5905
Strictness & strictness()
Get Strictness.
Definition Settings.h:5831
HoleFilling copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:5766
HoleSize & holeSize()
Get HoleSize.
Definition Settings.h:5812
bool operator==(const HoleFilling &other) const
Equality operator.
std::tuple< Settings::Processing::Filters::Experimental::HoleFilling::Enabled, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize, Settings::Processing::Filters::Experimental::HoleFilling::Strictness > Descendants
Definition Settings.h:5672
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:5787
HoleFilling & set(const Strictness &value)
Set Strictness.
Definition Settings.h:5837
const Settings::Processing::Filters::Experimental::HoleFilling::Strictness & get() const
Definition Settings.h:5871
const Settings::Processing::Filters::Experimental::HoleFilling::Enabled & get() const
Definition Settings.h:5849
const HoleSize & holeSize() const
Get HoleSize.
Definition Settings.h:5806
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5730
const Settings::Processing::Filters::Experimental::HoleFilling::HoleSize & get() const
Definition Settings.h:5860
HoleFilling & set(const Enabled &value)
Set Enabled.
Definition Settings.h:5799
bool operator!=(const HoleFilling &other) const
Inequality operator.
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:5793
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const HoleFilling &value)
Operator to send the value as string to a stream.
Definition Settings.h:5922
HoleFilling & set(const HoleSize &value)
Set HoleSize.
Definition Settings.h:5818
Experimental filters. These may be renamed, moved or deleted in the future.
Definition Settings.h:4046
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6349
ContrastDistortion & contrastDistortion()
Get ContrastDistortion.
Definition Settings.h:6097
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:6250
const HoleFilling & holeFilling() const
Get HoleFilling.
Definition Settings.h:6152
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:6070
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion.
Definition Settings.h:6103
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold.
Definition Settings.h:6145
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6026
const Settings::Processing::Filters::Experimental::HoleFilling::Enabled & get() const
Definition Settings.h:6300
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength.
Definition Settings.h:6124
Experimental & set(const HoleFilling::HoleSize &value)
Set HoleFilling::HoleSize.
Definition Settings.h:6178
Experimental & set(const HoleFilling::Strictness &value)
Set HoleFilling::Strictness.
Definition Settings.h:6185
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:6365
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, Settings::Processing::Filters::Experimental::HoleFilling, Settings::Processing::Filters::Experimental::HoleFilling::Enabled, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize, Settings::Processing::Filters::Experimental::HoleFilling::Strictness > Descendants
Definition Settings.h:5952
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:6237
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:6341
const Settings::Processing::Filters::Experimental::HoleFilling::Strictness & get() const
Definition Settings.h:6321
const Settings::Processing::Filters::Experimental::HoleFilling::HoleSize & get() const
Definition Settings.h:6310
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal.
Definition Settings.h:6131
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:6196
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:6208
bool operator!=(const Experimental &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:6278
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled.
Definition Settings.h:6117
Experimental & set(const HoleFilling::Enabled &value)
Set HoleFilling::Enabled.
Definition Settings.h:6171
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion.
Definition Settings.h:6091
std::string toString() const
Get the value as string.
bool operator==(const Experimental &other) const
Equality operator.
Experimental & set(const HoleFilling &value)
Set HoleFilling.
Definition Settings.h:6164
const Settings::Processing::Filters::Experimental::HoleFilling & get() const
Definition Settings.h:6290
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction.
Definition Settings.h:6110
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled.
Definition Settings.h:6138
HoleFilling & holeFilling()
Get HoleFilling.
Definition Settings.h:6158
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:6222
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:6264
Enable or disable the SNR filter.
Definition Settings.h:6427
static const Enabled yes
On/enabled.
Definition Settings.h:6445
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6484
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6478
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6449
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6458
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6490
static const Enabled no
Off/disabled.
Definition Settings.h:6446
bool ValueType
The type of the underlying value.
Definition Settings.h:6444
std::string toString() const
Get the value as string.
Discard points with signal-to-noise ratio (SNR) below the given value.
Definition Settings.h:6507
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6586
constexpr Threshold(double value)
Constructor.
Definition Settings.h:6536
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:6556
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6580
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:6527
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:6592
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:6574
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:6568
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:6524
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6562
Discard points with signal-to-noise ratio (SNR) values below a threshold.
Definition Settings.h:6407
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:6824
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6729
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:6748
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition Settings.h:6617
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6808
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6741
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:6760
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6673
bool operator!=(const Removal &other) const
Inequality operator.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:6781
Threshold & threshold()
Get Threshold.
Definition Settings.h:6754
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:6800
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:6708
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6735
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:6771
Enable or disable noise repair.
Definition Settings.h:6872
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6894
bool ValueType
The type of the underlying value.
Definition Settings.h:6889
static const Enabled no
Off/disabled.
Definition Settings.h:6891
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6929
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6903
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:6890
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6935
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6923
Get better surface coverage by repairing regions of missing data due to noisy points....
Definition Settings.h:6849
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:7093
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:7100
bool operator==(const Repair &other) const
Equality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7069
std::tuple< Settings::Processing::Filters::Noise::Repair::Enabled > Descendants
Definition Settings.h:6948
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7063
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7057
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:7036
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7080
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:7115
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7002
Enable or disable noise suppression.
Definition Settings.h:7162
static const Enabled no
Off/disabled.
Definition Settings.h:7181
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7193
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7219
bool ValueType
The type of the underlying value.
Definition Settings.h:7179
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7180
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7184
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7225
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7213
Reduce noise and outliers in the point cloud. This filter can also be used to reduce ripple effects c...
Definition Settings.h:7139
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7370
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:7383
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7353
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7347
std::string toString() const
Get the value as string.
std::tuple< Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7238
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:7326
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7292
friend std::ostream & operator<<(std::ostream &stream, const Suppression &value)
Operator to send the value as string to a stream.
Definition Settings.h:7405
bool operator!=(const Suppression &other) const
Inequality operator.
Suppression & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7359
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7390
bool operator==(const Suppression &other) const
Equality operator.
Contains filters that can be used to clean up a noisy point cloud.
Definition Settings.h:6387
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:7429
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:7730
Noise & set(const Suppression &value)
Set Suppression.
Definition Settings.h:7627
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:7695
Suppression & suppression()
Get Suppression.
Definition Settings.h:7621
Removal & removal()
Get Removal.
Definition Settings.h:7562
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7705
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:7582
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:7535
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7739
const Suppression & suppression() const
Get Suppression.
Definition Settings.h:7615
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:7665
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:7575
const Repair & repair() const
Get Repair.
Definition Settings.h:7589
Noise & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:7608
Noise & set(const Repair &value)
Set Repair.
Definition Settings.h:7601
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7495
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:7756
Repair & repair()
Get Repair.
Definition Settings.h:7595
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:7675
const Removal & removal() const
Get Removal.
Definition Settings.h:7556
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:7655
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7685
bool operator==(const Noise &other) const
Equality operator.
Noise & set(const Suppression::Enabled &value)
Set Suppression::Enabled.
Definition Settings.h:7634
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:7645
Noise & set(const Removal &value)
Set Removal.
Definition Settings.h:7568
Enable or disable the outlier filter.
Definition Settings.h:7819
bool ValueType
The type of the underlying value.
Definition Settings.h:7836
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7876
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7850
static const Enabled no
Off/disabled.
Definition Settings.h:7838
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7837
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7882
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7841
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7870
Discard point if Euclidean distance to neighboring points is above the given value.
Definition Settings.h:7899
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:7919
constexpr Threshold(double value)
Constructor.
Definition Settings.h:7928
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:7960
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:7948
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7978
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7954
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:7984
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:7972
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:7966
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:7916
Discard point if Euclidean distance to neighboring points is above a threshold.
Definition Settings.h:7799
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:8216
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8121
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:8100
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8133
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8127
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:8152
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8163
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8173
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8009
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:8140
Threshold & threshold()
Get Threshold.
Definition Settings.h:8146
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:8192
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8065
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8200
Contains a filter that removes points with large Euclidean distance to neighboring points.
Definition Settings.h:7779
const Removal & removal() const
Get Removal.
Definition Settings.h:8352
Outlier & set(const Removal &value)
Set Removal.
Definition Settings.h:8364
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8429
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:8422
bool operator!=(const Outlier &other) const
Inequality operator.
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:8378
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:8371
Removal & removal()
Get Removal.
Definition Settings.h:8358
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:8331
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream.
Definition Settings.h:8444
bool operator==(const Outlier &other) const
Equality operator.
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8409
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:8389
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8399
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8295
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8237
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition Settings.h:8505
bool ValueType
The type of the underlying value.
Definition Settings.h:8522
static const Enabled yes
On/enabled.
Definition Settings.h:8523
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8562
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8536
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:8568
static const Enabled no
Off/disabled.
Definition Settings.h:8524
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8556
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8527
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition Settings.h:8612
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8694
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8656
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8682
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8688
ValueType
The type of the underlying value.
Definition Settings.h:8639
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8647
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8676
Experimental reflection filter related settings.
Definition Settings.h:8585
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8874
bool operator!=(const Experimental &other) const
Inequality operator.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8867
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:8808
std::tuple< Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition Settings.h:8720
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:8889
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:8854
bool operator==(const Experimental &other) const
Equality operator.
const Mode & mode() const
Get Mode.
Definition Settings.h:8829
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8774
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:8841
Discard points likely introduced by reflections (useful for shiny materials)
Definition Settings.h:8485
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:9043
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9030
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:9140
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:9073
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8967
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition Settings.h:8909
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:9116
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:9096
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:9003
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9036
Removal & set(const Experimental &value)
Set Experimental.
Definition Settings.h:9055
Experimental & experimental()
Get Experimental.
Definition Settings.h:9049
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9124
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9024
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition Settings.h:9084
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:9062
Contains a filter that removes points likely introduced by reflections (useful for shiny materials)
Definition Settings.h:8465
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:9355
Reflection & set(const Removal::Experimental &value)
Set Removal::Experimental.
Definition Settings.h:9306
bool operator!=(const Reflection &other) const
Inequality operator.
bool operator==(const Reflection &other) const
Equality operator.
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode > Descendants
Definition Settings.h:9162
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition Settings.h:9344
Removal & removal()
Get Removal.
Definition Settings.h:9286
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9222
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9390
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9375
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:9368
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9299
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9334
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Experimental::Mode &value)
Set Removal::Experimental::Mode.
Definition Settings.h:9313
const Removal & removal() const
Get Removal.
Definition Settings.h:9280
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9324
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9292
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:9259
Enable or disable the smoothing filter.
Definition Settings.h:9449
bool ValueType
The type of the underlying value.
Definition Settings.h:9466
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9471
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9506
static const Enabled yes
On/enabled.
Definition Settings.h:9467
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9500
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9512
static const Enabled no
Off/disabled.
Definition Settings.h:9468
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9480
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:9529
double ValueType
The type of the underlying value.
Definition Settings.h:9546
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9584
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9596
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9558
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9549
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9614
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9608
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9578
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9602
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9590
Gaussian smoothing of the point cloud.
Definition Settings.h:9429
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9757
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:9822
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9803
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9763
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9846
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9770
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9639
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9751
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:9793
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:9730
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9782
Sigma & sigma()
Get Sigma.
Definition Settings.h:9776
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9695
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9830
Smoothing filters.
Definition Settings.h:9411
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:9961
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9925
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9994
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9867
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10029
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:10059
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:10008
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:10001
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9982
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:10019
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:10052
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:10039
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:10074
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9988
Filters.
Definition Settings.h:3155
bool operator!=(const Filters &other) const
Inequality operator.
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:10962
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10625
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11125
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10360
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10972
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:10327
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10825
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10531
std::string toString() const
Get the value as string.
Filters & set(const Reflection::Removal::Experimental &value)
Set Reflection::Removal::Experimental.
Definition Settings.h:10632
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10933
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10381
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10894
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition Settings.h:11021
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10943
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:11040
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10538
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10699
Cluster & cluster()
Get Cluster.
Definition Settings.h:10354
Filters & set(const Reflection::Removal::Experimental::Mode &value)
Set Reflection::Removal::Experimental::Mode.
Definition Settings.h:10639
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:11001
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10991
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10592
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10435
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10407
Outlier & outlier()
Get Outlier.
Definition Settings.h:10565
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10545
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10578
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10348
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10395
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10414
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:11145
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10374
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:11011
const Settings::Processing::Filters::Experimental::HoleFilling & get() const
Definition Settings.h:10836
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10952
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10748
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:11070
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:10257
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10599
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10738
Filters & set(const Experimental::HoleFilling::Enabled &value)
Set Experimental::HoleFilling::Enabled.
Definition Settings.h:10470
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10524
Filters & set(const Experimental::HoleFilling &value)
Set Experimental::HoleFilling.
Definition Settings.h:10463
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:11060
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10611
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10787
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10442
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:11113
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10709
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10571
const Noise & noise() const
Get Noise.
Definition Settings.h:10491
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10421
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10773
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10618
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10884
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10517
const Settings::Processing::Filters::Experimental::HoleFilling::Strictness & get() const
Definition Settings.h:10866
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10672
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10875
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10923
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10456
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10665
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10585
Filters & set(const Experimental::HoleFilling::HoleSize &value)
Set Experimental::HoleFilling::HoleSize.
Definition Settings.h:10477
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10367
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10812
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:11031
const Settings::Processing::Filters::Experimental::HoleFilling::HoleSize & get() const
Definition Settings.h:10856
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::Experimental::HoleFilling, Settings::Processing::Filters::Experimental::HoleFilling::Enabled, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize, Settings::Processing::Filters::Experimental::HoleFilling::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::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:10129
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10388
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10799
Noise & noise()
Get Noise.
Definition Settings.h:10497
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10658
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10428
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10719
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10510
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10689
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10982
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10904
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10652
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10729
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10552
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:11050
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10449
Filters & set(const Experimental::HoleFilling::Strictness &value)
Set Experimental::HoleFilling::Strictness.
Definition Settings.h:10484
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10559
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10913
const Settings::Processing::Filters::Experimental::HoleFilling::Enabled & get() const
Definition Settings.h:10846
Reflection & reflection()
Get Reflection.
Definition Settings.h:10605
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10503
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10679
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10646
Experimental & experimental()
Get Experimental.
Definition Settings.h:10401
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10759
Settings related to processing of a capture, including filters and color balance.
Definition Settings.h:1685
const Settings::Processing::Filters::Experimental::HoleFilling::Strictness & get() const
Definition Settings.h:12059
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:11866
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::Experimental::HoleFilling, Settings::Processing::Filters::Experimental::HoleFilling::Enabled, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize, Settings::Processing::Filters::Experimental::HoleFilling::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::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:11214
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:11994
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12239
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12200
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11505
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11470
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11566
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12115
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:11848
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11477
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:11790
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:11438
Filters & filters()
Get Filters.
Definition Settings.h:11532
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:11797
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12134
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:11874
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11615
Processing & set(const Filters::Experimental::HoleFilling::HoleSize &value)
Set Filters::Experimental::HoleFilling::HoleSize.
Definition Settings.h:11650
Processing()
Default constructor.
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12229
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11629
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:11839
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:11727
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11622
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11559
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12302
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12124
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12005
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12190
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12096
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12259
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12086
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11484
Color & color()
Get Color.
Definition Settings.h:11464
Processing & set(const Filters::Experimental::HoleFilling::Strictness &value)
Set Filters::Experimental::HoleFilling::Strictness.
Definition Settings.h:11657
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition Settings.h:12210
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12249
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:11748
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11664
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11545
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12142
const Settings::Processing::Filters & get() const
Definition Settings.h:11882
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11608
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11678
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:11783
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:11821
const Filters & filters() const
Get Filters.
Definition Settings.h:11526
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11552
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12286
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:11929
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:11804
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:11706
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11671
const Settings::Processing::Filters::Experimental::HoleFilling::Enabled & get() const
Definition Settings.h:12039
Processing & set(const Filters::Reflection::Removal::Experimental &value)
Set Filters::Reflection::Removal::Experimental.
Definition Settings.h:11769
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:11734
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:11685
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:11830
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11573
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11580
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12076
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:11741
Processing & set(const Filters::Experimental::HoleFilling &value)
Set Filters::Experimental::HoleFilling.
Definition Settings.h:11636
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11491
Processing & set(const Filters::Experimental::HoleFilling::Enabled &value)
Set Filters::Experimental::HoleFilling::Enabled.
Definition Settings.h:11643
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:11857
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:11983
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:11720
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:11699
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:11970
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11512
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:11762
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11601
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:11909
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12171
Processing & set(const Filters::Reflection::Removal::Experimental::Mode &value)
Set Filters::Reflection::Removal::Experimental::Mode.
Definition Settings.h:11776
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:11755
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:12220
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:11919
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11594
const Settings::Processing::Color & get() const
Definition Settings.h:11813
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11458
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11587
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:11713
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:11899
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12180
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12161
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11538
const Settings::Processing::Filters::Experimental::HoleFilling::HoleSize & get() const
Definition Settings.h:12049
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11498
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12067
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:11938
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12105
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11519
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11360
const Settings::Processing::Filters::Experimental::HoleFilling & get() const
Definition Settings.h:12029
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12018
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:11890
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:11958
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:11692
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:11948
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:12278
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12151
Enabled.
Definition Settings.h:12382
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12411
bool ValueType
The type of the underlying value.
Definition Settings.h:12397
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12431
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12402
static const Enabled yes
On/enabled.
Definition Settings.h:12398
static const Enabled no
Off/disabled.
Definition Settings.h:12399
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:12443
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12437
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12460
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12508
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12483
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12503
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:12520
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12514
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12537
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12580
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12591
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12585
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:12597
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12560
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:12614
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:12662
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:12674
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:12657
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12637
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:12668
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:12691
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:12734
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:12745
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12714
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:12739
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:12751
Removes the points outside the box.
Definition Settings.h:12354
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:12769
std::string toString() const
Get the value as string.
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:12939
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:12868
const PointO & pointO() const
Get PointO.
Definition Settings.h:12965
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:12977
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:12895
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:12889
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:12920
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:12987
PointA & pointA()
Get PointA.
Definition Settings.h:12933
PointB & pointB()
Get PointB.
Definition Settings.h:12952
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:12958
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13023
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13005
const Extents & extents() const
Get Extents.
Definition Settings.h:12908
const PointA & pointA() const
Get PointA.
Definition Settings.h:12927
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:12831
PointO & pointO()
Get PointO.
Definition Settings.h:12971
Extents & extents()
Get Extents.
Definition Settings.h:12914
const PointB & pointB() const
Get PointB.
Definition Settings.h:12946
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:13060
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13090
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:13014
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13071
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:12996
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:12901
Enabled.
Definition Settings.h:13139
static const Enabled yes
On/enabled.
Definition Settings.h:13155
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:13188
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13194
bool ValueType
The type of the underlying value.
Definition Settings.h:13154
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13200
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13159
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13156
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13168
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13217
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13260
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13240
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:13277
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13265
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13271
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:13117
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13414
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13421
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13433
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13291
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13402
bool operator==(const Depth &other) const
Equality 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:13479
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13443
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:13471
Range & range()
Get Range.
Definition Settings.h:13427
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13495
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13347
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13408
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13452
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:13381
Removes points outside the region of interest.
Definition Settings.h:12325
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13800
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:13522
Depth & depth()
Get Depth.
Definition Settings.h:13712
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:13725
const Box & box() const
Get Box.
Definition Settings.h:13652
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:13664
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:13852
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:13699
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13783
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13767
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:13791
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13759
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13809
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:13775
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13592
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:13632
Box & box()
Get Box.
Definition Settings.h:13658
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:13741
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:13828
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:13685
const Depth & depth() const
Get Depth.
Definition Settings.h:13706
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:13678
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13836
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:13671
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:13732
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:13718
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:13692
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13750
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:13898
ValueType
The type of the underlying value.
Definition Settings.h:13920
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:13928
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:13975
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:13937
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:13969
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:13925
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:13963
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:13957
static const Color rgb
rgb
Definition Settings.h:13924
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:14010
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:14050
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14047
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14063
static const Pixel all
all
Definition Settings.h:14043
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14044
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14095
ValueType
The type of the underlying value.
Definition Settings.h:14036
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14045
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14089
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14046
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:14083
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14101
std::string toString() const
Get the value as string.
Sampling group.
Definition Settings.h:13875
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14126
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14182
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14241
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:14215
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14254
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14326
Pixel & pixel()
Get Pixel.
Definition Settings.h:14260
const Settings::Sampling::Color & get() const
Definition Settings.h:14275
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:14302
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14283
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:14310
const Color & color() const
Get Color.
Definition Settings.h:14235
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14247
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14266
Settings used when capturing with a Zivid camera.
Definition Settings.h:79
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:15783
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:15627
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14504
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:14893
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:15608
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15178
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15296
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:14942
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:14757
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15320
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:14844
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15103
const Settings::Processing::Filters::Experimental::HoleFilling::Enabled & get() const
Definition Settings.h:15506
const Settings::RegionOfInterest & get() const
Definition Settings.h:15727
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15543
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:14693
const Processing & processing() const
Get Processing.
Definition Settings.h:14783
const Settings::Processing::Filters::Experimental::HoleFilling::HoleSize & get() const
Definition Settings.h:15516
const Settings::Experimental & get() const
Definition Settings.h:15266
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15345
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15462
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:14795
const Settings::Sampling::Pixel & get() const
Definition Settings.h:15817
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15485
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15225
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled.
Definition Settings.h:15054
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15390
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:14949
Settings & set(const Experimental::Engine &value)
Set Experimental::Engine.
Definition Settings.h:14776
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15110
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15232
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:14743
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15473
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15199
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:14984
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15213
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15400
const Settings::Acquisitions & get() const
Definition Settings.h:15246
const Settings::Processing::Filters::Experimental::HoleFilling & get() const
Definition Settings.h:15496
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15408
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:15590
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:15617
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:14865
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:15721
Settings & set(const Processing::Filters::Reflection::Removal::Experimental &value)
Set Processing::Filters::Reflection::Removal::Experimental.
Definition Settings.h:15089
const Settings::Diagnostics & get() const
Definition Settings.h:15252
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15137
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:15711
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:15735
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:14809
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:15775
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15192
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:15553
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:15791
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15428
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:15860
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15312
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:15751
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15117
const Settings::Processing & get() const
Definition Settings.h:15280
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15068
const Settings::Experimental::Engine & get() const
Definition Settings.h:15274
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:15872
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15418
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15061
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:15743
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15337
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:14928
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15157
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15451
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15164
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15304
std::tuple< Settings::Acquisitions, Settings::Diagnostics, Settings::Diagnostics::Enabled, Settings::Experimental, Settings::Experimental::Engine, Settings::Processing, Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::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::Experimental::HoleFilling, Settings::Processing::Filters::Experimental::HoleFilling::Enabled, Settings::Processing::Filters::Experimental::HoleFilling::HoleSize, Settings::Processing::Filters::Experimental::HoleFilling::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::Experimental, Settings::Processing::Filters::Reflection::Removal::Experimental::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma, 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:14410
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:14712
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14596
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:15645
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:14900
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:15692
const Settings::Processing::Filters & get() const
Definition Settings.h:15353
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:14837
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15206
const Settings::Processing::Filters::Experimental::HoleFilling::Strictness & get() const
Definition Settings.h:15526
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15328
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:15572
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:14935
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:15759
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:14802
Experimental & experimental()
Get Experimental.
Definition Settings.h:14763
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15040
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:14718
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15075
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:15600
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15361
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:15581
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:14830
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15185
const Settings::Sampling::Color & get() const
Definition Settings.h:15811
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:14872
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15150
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15026
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:14737
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:15563
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15380
const Settings::Processing::Filters::Reflection::Removal::Experimental & get() const
Definition Settings.h:15674
Sampling & sampling()
Get Sampling.
Definition Settings.h:15219
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15082
Processing & processing()
Get Processing.
Definition Settings.h:14789
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15171
Settings & set(const Processing::Filters::Experimental::HoleFilling::Enabled &value)
Set Processing::Filters::Experimental::HoleFilling::Enabled.
Definition Settings.h:14963
Settings & set(const Processing::Filters::Experimental::HoleFilling &value)
Set Processing::Filters::Experimental::HoleFilling.
Definition Settings.h:14956
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:14750
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15534
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15260
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15370
Settings & set(const Processing::Filters::Experimental::HoleFilling::Strictness &value)
Set Processing::Filters::Experimental::HoleFilling::Strictness.
Definition Settings.h:14977
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15439
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:15767
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:14907
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15239
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:14851
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:14879
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:15799
const Settings::Sampling & get() const
Definition Settings.h:15805
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15005
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:14921
Settings & set(const Processing::Filters::Reflection::Removal::Experimental::Mode &value)
Set Processing::Filters::Reflection::Removal::Experimental::Mode.
Definition Settings.h:15096
Settings & set(const Processing::Filters::Experimental::HoleFilling::HoleSize &value)
Set Processing::Filters::Experimental::HoleFilling::HoleSize.
Definition Settings.h:14970
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:14724
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15124
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:14731
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:14991
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15012
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:14886
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15047
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15143
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:14998
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:14914
const Settings::Processing::Color & get() const
Definition Settings.h:15288
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15019
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:15664
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15033
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:15654
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:14823
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:14858
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15131
Settings & set(const Experimental &value)
Set Experimental.
Definition Settings.h:14769
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:15637
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:14816
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:15701
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:15892
const Settings::Processing::Filters::Reflection::Removal::Experimental::Mode & get() const
Definition Settings.h:15684
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