Zivid C++ API 2.14.0+e4a0c4a9-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 <optional>
53#include <set>
54#include <sstream>
55#include <string>
56#include <tuple>
57#include <utility>
58#include <vector>
59
65#include "Zivid/Point.h"
66#include "Zivid/Range.h"
67#include "Zivid/Settings2D.h"
68
69#ifdef _MSC_VER
70# pragma warning(push)
71# pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
72#endif
73
74namespace Zivid
75{
76
78
79 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
81 {
82 public:
84 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
85
87 static constexpr const char *path{ "" };
88
90 static constexpr const char *name{ "Settings" };
91
93 static constexpr const char *description{
94 R"description(Settings used when capturing a 3D capture or 2D+3D capture with a Zivid camera.)description"
95 };
96
97 static constexpr size_t version{ 27 };
98
99#ifndef NO_DOC
100 template<size_t>
101 struct Version;
102
103 using LatestVersion = Zivid::Settings;
104
105 // Short identifier. This value is not guaranteed to be universally unique
106 // Todo(ZIVID-2808): Move this to internal DataModelExt header
107 static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
108
109#endif
110
112
113 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
115 {
116 public:
118 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
119
121 static constexpr const char *path{ "Acquisition" };
122
124 static constexpr const char *name{ "Acquisition" };
125
127 static constexpr const char *description{ R"description(Settings for a single acquisition.)description" };
128
132
133 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
135 {
136 public:
138 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
139
141 static constexpr const char *path{ "Acquisition/Aperture" };
142
144 static constexpr const char *name{ "Aperture" };
145
147 static constexpr const char *description{
148 R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
149the effective aperture diameter).
150)description"
151 };
152
154 using ValueType = double;
155
157 static constexpr Range<double> validRange()
158 {
159 return { 1.4, 32.0 };
160 }
161
163 Aperture() = default;
164
166 explicit constexpr Aperture(double value)
167 : m_opt{ verifyValue(value) }
168 {}
169
174 double value() const;
175
177 bool hasValue() const;
178
180 void reset();
181
183 std::string toString() const;
184
186 bool operator==(const Aperture &other) const
187 {
188 return m_opt == other.m_opt;
189 }
190
192 bool operator!=(const Aperture &other) const
193 {
194 return m_opt != other.m_opt;
195 }
196
198 bool operator<(const Aperture &other) const
199 {
200 return m_opt < other.m_opt;
201 }
202
204 bool operator>(const Aperture &other) const
205 {
206 return m_opt > other.m_opt;
207 }
208
210 bool operator<=(const Aperture &other) const
211 {
212 return m_opt <= other.m_opt;
213 }
214
216 bool operator>=(const Aperture &other) const
217 {
218 return m_opt >= other.m_opt;
219 }
220
222 friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
223 {
224 return stream << value.toString();
225 }
226
227 private:
228 void setFromString(const std::string &value);
229
230 constexpr ValueType static verifyValue(const ValueType &value)
231 {
232 return validRange().isInRange(value)
233 ? value
234 : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
235 + std::to_string(validRange().min()) + ", "
236 + std::to_string(validRange().max()) + "]" };
237 }
238
239 std::optional<double> m_opt;
240
241 friend struct DataModel::Detail::Befriend<Aperture>;
242 };
243
255
256 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
258 {
259 public:
261 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
262
264 static constexpr const char *path{ "Acquisition/Brightness" };
265
267 static constexpr const char *name{ "Brightness" };
268
270 static constexpr const char *description{
271 R"description(Brightness controls the light output from the projector.
272
273Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
274or in case of high levels of ambient lighting.
275
276When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
277can capture) will be reduced. The duty cycle in boost mode is 50%. The duty cycle is calculated
278over a 10 second period. This limitation is enforced automatically by the camera. Calling capture
279when the duty cycle limit has been reached will cause the camera to first wait (sleep) for a
280duration of time to cool down, before capture will start.
281)description"
282 };
283
285 using ValueType = double;
286
288 static constexpr Range<double> validRange()
289 {
290 return { 0, 2.5 };
291 }
292
294 Brightness() = default;
295
297 explicit constexpr Brightness(double value)
298 : m_opt{ verifyValue(value) }
299 {}
300
305 double value() const;
306
308 bool hasValue() const;
309
311 void reset();
312
314 std::string toString() const;
315
317 bool operator==(const Brightness &other) const
318 {
319 return m_opt == other.m_opt;
320 }
321
323 bool operator!=(const Brightness &other) const
324 {
325 return m_opt != other.m_opt;
326 }
327
329 bool operator<(const Brightness &other) const
330 {
331 return m_opt < other.m_opt;
332 }
333
335 bool operator>(const Brightness &other) const
336 {
337 return m_opt > other.m_opt;
338 }
339
341 bool operator<=(const Brightness &other) const
342 {
343 return m_opt <= other.m_opt;
344 }
345
347 bool operator>=(const Brightness &other) const
348 {
349 return m_opt >= other.m_opt;
350 }
351
353 friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
354 {
355 return stream << value.toString();
356 }
357
358 private:
359 void setFromString(const std::string &value);
360
361 constexpr ValueType static verifyValue(const ValueType &value)
362 {
363 return validRange().isInRange(value)
364 ? value
365 : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
366 + " } is not in range [" + std::to_string(validRange().min())
367 + ", " + std::to_string(validRange().max()) + "]" };
368 }
369
370 std::optional<double> m_opt;
371
372 friend struct DataModel::Detail::Befriend<Brightness>;
373 };
374
376
377 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
379 {
380 public:
382 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
383
385 static constexpr const char *path{ "Acquisition/ExposureTime" };
386
388 static constexpr const char *name{ "ExposureTime" };
389
391 static constexpr const char *description{
392 R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
393 };
394
396 using ValueType = std::chrono::microseconds;
397
400 {
401 return { std::chrono::microseconds{ 900 }, std::chrono::microseconds{ 100000 } };
402 }
403
405 ExposureTime() = default;
406
408 explicit constexpr ExposureTime(std::chrono::microseconds value)
409 : m_opt{ verifyValue(value) }
410 {}
411
416 std::chrono::microseconds value() const;
417
419 bool hasValue() const;
420
422 void reset();
423
425 std::string toString() const;
426
428 bool operator==(const ExposureTime &other) const
429 {
430 return m_opt == other.m_opt;
431 }
432
434 bool operator!=(const ExposureTime &other) const
435 {
436 return m_opt != other.m_opt;
437 }
438
440 bool operator<(const ExposureTime &other) const
441 {
442 return m_opt < other.m_opt;
443 }
444
446 bool operator>(const ExposureTime &other) const
447 {
448 return m_opt > other.m_opt;
449 }
450
452 bool operator<=(const ExposureTime &other) const
453 {
454 return m_opt <= other.m_opt;
455 }
456
458 bool operator>=(const ExposureTime &other) const
459 {
460 return m_opt >= other.m_opt;
461 }
462
464 friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
465 {
466 return stream << value.toString();
467 }
468
469 private:
470 void setFromString(const std::string &value);
471
472 constexpr ValueType static verifyValue(const ValueType &value)
473 {
474 return validRange().isInRange(value)
475 ? value
476 : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
477 + " } is not in range ["
478 + std::to_string(validRange().min().count()) + ", "
479 + std::to_string(validRange().max().count()) + "]" };
480 }
481
482 std::optional<std::chrono::microseconds> m_opt;
483
484 friend struct DataModel::Detail::Befriend<ExposureTime>;
485 };
486
488
489 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
491 {
492 public:
494 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
495
497 static constexpr const char *path{ "Acquisition/Gain" };
498
500 static constexpr const char *name{ "Gain" };
501
503 static constexpr const char *description{ R"description(Analog gain in the camera.)description" };
504
506 using ValueType = double;
507
509 static constexpr Range<double> validRange()
510 {
511 return { 1, 16 };
512 }
513
515 Gain() = default;
516
518 explicit constexpr Gain(double value)
519 : m_opt{ verifyValue(value) }
520 {}
521
526 double value() const;
527
529 bool hasValue() const;
530
532 void reset();
533
535 std::string toString() const;
536
538 bool operator==(const Gain &other) const
539 {
540 return m_opt == other.m_opt;
541 }
542
544 bool operator!=(const Gain &other) const
545 {
546 return m_opt != other.m_opt;
547 }
548
550 bool operator<(const Gain &other) const
551 {
552 return m_opt < other.m_opt;
553 }
554
556 bool operator>(const Gain &other) const
557 {
558 return m_opt > other.m_opt;
559 }
560
562 bool operator<=(const Gain &other) const
563 {
564 return m_opt <= other.m_opt;
565 }
566
568 bool operator>=(const Gain &other) const
569 {
570 return m_opt >= other.m_opt;
571 }
572
574 friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
575 {
576 return stream << value.toString();
577 }
578
579 private:
580 void setFromString(const std::string &value);
581
582 constexpr ValueType static verifyValue(const ValueType &value)
583 {
584 return validRange().isInRange(value)
585 ? value
586 : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
587 + std::to_string(validRange().min()) + ", "
588 + std::to_string(validRange().max()) + "]" };
589 }
590
591 std::optional<double> m_opt;
592
593 friend struct DataModel::Detail::Befriend<Gain>;
594 };
595
596 using Descendants = std::tuple<
601
604
619#ifndef NO_DOC
620 template<
621 typename... Args,
622 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
623 typename std::enable_if<
624 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
625 value,
626 int>::type = 0>
627#else
628 template<typename... Args>
629#endif
630 explicit Acquisition(Args &&...args)
631 {
632 using namespace Zivid::Detail::TypeTraits;
633
634 static_assert(
635 AllArgsDecayedAreUnique<Args...>::value,
636 "Found duplicate types among the arguments passed to Acquisition(...). "
637 "Types should be listed at most once.");
638
639 set(std::forward<Args>(args)...);
640 }
641
655#ifndef NO_DOC
656 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
657#else
658 template<typename... Args>
659#endif
660 void set(Args &&...args)
661 {
662 using namespace Zivid::Detail::TypeTraits;
663
664 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
665 static_assert(
666 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
667
668 static_assert(
669 AllArgsDecayedAreUnique<Args...>::value,
670 "Found duplicate types among the arguments passed to set(...). "
671 "Types should be listed at most once.");
672
673 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
674 }
675
690#ifndef NO_DOC
691 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
692#else
693 template<typename... Args>
694#endif
695 Acquisition copyWith(Args &&...args) const
696 {
697 using namespace Zivid::Detail::TypeTraits;
698
699 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
700 static_assert(
701 AllArgsAreDescendantNodes::value,
702 "All arguments passed to copyWith(...) must be descendant nodes.");
703
704 static_assert(
705 AllArgsDecayedAreUnique<Args...>::value,
706 "Found duplicate types among the arguments passed to copyWith(...). "
707 "Types should be listed at most once.");
708
709 auto copy{ *this };
710 copy.set(std::forward<Args>(args)...);
711 return copy;
712 }
713
715 const Aperture &aperture() const
716 {
717 return m_aperture;
718 }
719
722 {
723 return m_aperture;
724 }
725
727 Acquisition &set(const Aperture &value)
728 {
729 m_aperture = value;
730 return *this;
731 }
732
734 const Brightness &brightness() const
735 {
736 return m_brightness;
737 }
738
741 {
742 return m_brightness;
743 }
744
747 {
748 m_brightness = value;
749 return *this;
750 }
751
754 {
755 return m_exposureTime;
756 }
757
760 {
761 return m_exposureTime;
762 }
763
766 {
767 m_exposureTime = value;
768 return *this;
769 }
770
772 const Gain &gain() const
773 {
774 return m_gain;
775 }
776
779 {
780 return m_gain;
781 }
782
784 Acquisition &set(const Gain &value)
785 {
786 m_gain = value;
787 return *this;
788 }
789
790 template<
791 typename T,
792 typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
794 {
795 return m_aperture;
796 }
797
798 template<
799 typename T,
800 typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
802 {
803 return m_brightness;
804 }
805
806 template<
807 typename T,
808 typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
810 {
811 return m_exposureTime;
812 }
813
814 template<
815 typename T,
816 typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
818 {
819 return m_gain;
820 }
821
822 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
824 {
825 return m_aperture;
826 }
827
828 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
830 {
831 return m_brightness;
832 }
833
834 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
836 {
837 return m_exposureTime;
838 }
839
840 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
842 {
843 return m_gain;
844 }
845
847 template<typename F>
848 void forEach(const F &f) const
849 {
850 f(m_aperture);
851 f(m_brightness);
852 f(m_exposureTime);
853 f(m_gain);
854 }
855
857 template<typename F>
858 void forEach(const F &f)
859 {
860 f(m_aperture);
861 f(m_brightness);
862 f(m_exposureTime);
863 f(m_gain);
864 }
865
867 bool operator==(const Acquisition &other) const;
868
870 bool operator!=(const Acquisition &other) const;
871
873 std::string toString() const;
874
876 friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
877 {
878 return stream << value.toString();
879 }
880
881 private:
882 void setFromString(const std::string &value);
883
884 void setFromString(const std::string &fullPath, const std::string &value);
885
886 std::string getString(const std::string &fullPath) const;
887
888 Aperture m_aperture;
889 Brightness m_brightness;
890 ExposureTime m_exposureTime;
891 Gain m_gain;
892
893 friend struct DataModel::Detail::Befriend<Acquisition>;
894 };
895
897
898 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
900 {
901 public:
903 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafDataModelList;
904
906 static constexpr const char *path{ "Acquisitions" };
907
909 static constexpr const char *name{ "Acquisitions" };
910
912 static constexpr const char *description{ R"description(List of Acquisition objects.)description" };
913
915 using ValueType = std::vector<Settings::Acquisition>;
916
919 {
920 return { 0, std::numeric_limits<ValueType::size_type>::max() };
921 }
922
924 Acquisitions() = default;
925
927 explicit Acquisitions(std::vector<Settings::Acquisition> value)
928 : m_value{ std::move(value) }
929 {}
930
932 explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
933 : Acquisitions{ ValueType{ value } }
934 {}
935
937 const std::vector<Settings::Acquisition> &value() const;
938
940 std::string toString() const;
941
943 std::size_t size() const noexcept;
944
946 bool isEmpty() const noexcept;
947
953 template<typename... Args>
954 void emplaceBack(Args &&...args)
955 {
956 m_value.emplace_back(std::forward<Args>(args)...);
957 }
958
964 Settings::Acquisition &at(std::size_t pos);
965
971 const Settings::Acquisition &at(std::size_t pos) const;
972
979
985 const Settings::Acquisition &operator[](std::size_t pos) const;
986
988 template<typename F>
989 void forEach(const F &f)
990 {
991 for(auto &child : m_value)
992 {
993 f(child);
994 }
995 }
996
998 template<typename F>
999 void forEach(const F &f) const
1000 {
1001 for(const auto &child : m_value)
1002 {
1003 f(child);
1004 }
1005 }
1006
1008 using Iterator = std::vector<Settings::Acquisition>::iterator;
1009
1011 Iterator begin() noexcept;
1012
1014 Iterator end() noexcept;
1015
1017 using ConstIterator = std::vector<Settings::Acquisition>::const_iterator;
1018
1020 ConstIterator begin() const noexcept;
1021
1023 ConstIterator end() const noexcept;
1024
1026 ConstIterator cbegin() const noexcept;
1027
1029 ConstIterator cend() const noexcept;
1030
1032 bool operator==(const Acquisitions &other) const
1033 {
1034 return m_value == other.m_value;
1035 }
1036
1038 bool operator!=(const Acquisitions &other) const
1039 {
1040 return m_value != other.m_value;
1041 }
1042
1044 friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
1045 {
1046 return stream << value.toString();
1047 }
1048
1049 private:
1050 void setFromString(const std::string &value);
1051
1052 std::vector<Settings::Acquisition> m_value{};
1053
1054 friend struct DataModel::Detail::Befriend<Acquisitions>;
1055 };
1056
1078
1079 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1081 {
1082 public:
1084 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1085
1087 static constexpr const char *path{ "Color" };
1088
1090 static constexpr const char *name{ "Color" };
1091
1093 static constexpr const char *description{
1094 R"description(Specify the settings used for the 2D color image when doing a 2D+3D capture. The value type of this node
1095is a `Zivid::Settings2D` object.
1096
1097This setting was introduced in SDK 2.14, as the recommended way to define the acquisition and processing
1098settings for the 2D color image when doing 2D+3D captures.
1099
1100When this setting is set, it controls how the 2D color image of the 2D+3D capture is acquired and processed.
1101This setting can be used to specify custom acquisition and processing settings that apply only to the 2D
1102color image. These provided settings does not affect the 3D acquisition or processing.
1103
1104When this setting is not set, then the 2D color image is acquired based on `Settings/Acquisitions` and
1105`Settings/Sampling/Color`, and processed based on `Settings/Processing/Color`. If `Settings/Sampling/Color`
1106is set to `disabled`, then no 2D color image is acquired. This behavior is to be consistent with SDK 2.13
1107and earlier.
1108
1109In the next SDK major version, SDK 3.0, only this `Color` setting will control the 2D color image settings.
1110The `Settings/Sampling/Color` and `Settings/Processing/Color` settings are deprecated as of 2.14, and will
1111be removed from the API in SDK 3.0. Zivid recommends all users to use `Settings/Color` to define the 2D
1112color image settings. Tip: If you want to convert an existing settings.yml file to use `Settings/Color`,
1113you can import the .yml file into Zivid Studio and then re-export it to .yml.
1114)description"
1115 };
1116
1119
1121 Color() = default;
1122
1124 explicit Color(Zivid::Settings2D value)
1125 : m_opt{ std::move(value) }
1126 {}
1127
1132 const Zivid::Settings2D &value() const;
1133
1139
1141 bool hasValue() const;
1142
1144 void reset();
1145
1147 std::string toString() const;
1148
1150 bool operator==(const Color &other) const
1151 {
1152 return m_opt == other.m_opt;
1153 }
1154
1156 bool operator!=(const Color &other) const
1157 {
1158 return m_opt != other.m_opt;
1159 }
1160
1162 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
1163 {
1164 return stream << value.toString();
1165 }
1166
1167 private:
1168 void setFromString(const std::string &value);
1169
1170 std::optional<Zivid::Settings2D> m_opt;
1171
1172 friend struct DataModel::Detail::Befriend<Color>;
1173 };
1174
1182
1183 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1185 {
1186 public:
1188 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1189
1191 static constexpr const char *path{ "Diagnostics" };
1192
1194 static constexpr const char *name{ "Diagnostics" };
1195
1197 static constexpr const char *description{
1198 R"description(When Diagnostics is enabled, additional diagnostic data is recorded during capture and included when saving
1199the frame to a .zdf file. This enables Zivid's Customer Success team to provide better assistance and more
1200thorough troubleshooting.
1201
1202Enabling Diagnostics increases the capture time and the RAM usage. It will also increase the size of the
1203.zdf file. It is recommended to enable Diagnostics only when reporting issues to Zivid's support team.
1204)description"
1205 };
1206
1208
1209 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1211 {
1212 public:
1214 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1215
1217 static constexpr const char *path{ "Diagnostics/Enabled" };
1218
1220 static constexpr const char *name{ "Enabled" };
1221
1223 static constexpr const char *description{ R"description(Enable or disable diagnostics.)description" };
1224
1226 using ValueType = bool;
1227 static const Enabled yes;
1228 static const Enabled no;
1229
1231 static std::set<bool> validValues()
1232 {
1233 return { false, true };
1234 }
1235
1237 Enabled() = default;
1238
1240 explicit constexpr Enabled(bool value)
1241 : m_opt{ value }
1242 {}
1243
1248 bool value() const;
1249
1251 bool hasValue() const;
1252
1254 void reset();
1255
1257 std::string toString() const;
1258
1260 bool operator==(const Enabled &other) const
1261 {
1262 return m_opt == other.m_opt;
1263 }
1264
1266 bool operator!=(const Enabled &other) const
1267 {
1268 return m_opt != other.m_opt;
1269 }
1270
1272 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1273 {
1274 return stream << value.toString();
1275 }
1276
1277 private:
1278 void setFromString(const std::string &value);
1279
1280 std::optional<bool> m_opt;
1281
1282 friend struct DataModel::Detail::Befriend<Enabled>;
1283 };
1284
1285 using Descendants = std::tuple<Settings::Diagnostics::Enabled>;
1286
1289
1301#ifndef NO_DOC
1302 template<
1303 typename... Args,
1304 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1305 typename std::enable_if<
1306 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
1307 value,
1308 int>::type = 0>
1309#else
1310 template<typename... Args>
1311#endif
1312 explicit Diagnostics(Args &&...args)
1313 {
1314 using namespace Zivid::Detail::TypeTraits;
1315
1316 static_assert(
1317 AllArgsDecayedAreUnique<Args...>::value,
1318 "Found duplicate types among the arguments passed to Diagnostics(...). "
1319 "Types should be listed at most once.");
1320
1321 set(std::forward<Args>(args)...);
1322 }
1323
1334#ifndef NO_DOC
1335 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1336#else
1337 template<typename... Args>
1338#endif
1339 void set(Args &&...args)
1340 {
1341 using namespace Zivid::Detail::TypeTraits;
1342
1343 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1344 static_assert(
1345 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
1346
1347 static_assert(
1348 AllArgsDecayedAreUnique<Args...>::value,
1349 "Found duplicate types among the arguments passed to set(...). "
1350 "Types should be listed at most once.");
1351
1352 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1353 }
1354
1366#ifndef NO_DOC
1367 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1368#else
1369 template<typename... Args>
1370#endif
1371 Diagnostics copyWith(Args &&...args) const
1372 {
1373 using namespace Zivid::Detail::TypeTraits;
1374
1375 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1376 static_assert(
1377 AllArgsAreDescendantNodes::value,
1378 "All arguments passed to copyWith(...) must be descendant nodes.");
1379
1380 static_assert(
1381 AllArgsDecayedAreUnique<Args...>::value,
1382 "Found duplicate types among the arguments passed to copyWith(...). "
1383 "Types should be listed at most once.");
1384
1385 auto copy{ *this };
1386 copy.set(std::forward<Args>(args)...);
1387 return copy;
1388 }
1389
1391 const Enabled &isEnabled() const
1392 {
1393 return m_enabled;
1394 }
1395
1398 {
1399 return m_enabled;
1400 }
1401
1403 Diagnostics &set(const Enabled &value)
1404 {
1405 m_enabled = value;
1406 return *this;
1407 }
1408
1409 template<
1410 typename T,
1411 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
1413 {
1414 return m_enabled;
1415 }
1416
1417 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1419 {
1420 return m_enabled;
1421 }
1422
1424 template<typename F>
1425 void forEach(const F &f) const
1426 {
1427 f(m_enabled);
1428 }
1429
1431 template<typename F>
1432 void forEach(const F &f)
1433 {
1434 f(m_enabled);
1435 }
1436
1438 bool operator==(const Diagnostics &other) const;
1439
1441 bool operator!=(const Diagnostics &other) const;
1442
1444 std::string toString() const;
1445
1447 friend std::ostream &operator<<(std::ostream &stream, const Diagnostics &value)
1448 {
1449 return stream << value.toString();
1450 }
1451
1452 private:
1453 void setFromString(const std::string &value);
1454
1455 void setFromString(const std::string &fullPath, const std::string &value);
1456
1457 std::string getString(const std::string &fullPath) const;
1458
1459 Enabled m_enabled;
1460
1461 friend struct DataModel::Detail::Befriend<Diagnostics>;
1462 };
1463
1488
1489 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1491 {
1492 public:
1494 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1495
1497 static constexpr const char *path{ "Engine" };
1498
1500 static constexpr const char *name{ "Engine" };
1501
1503 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1504
1505The Phase Engine is the fastest choice in terms of both acquisition time and total capture
1506time, and is a good compromise between quality and speed. The Phase Engine is recommended for
1507objects that are diffuse, opaque, and slightly specular, and is suitable for applications in
1508logistics such as parcel induction.
1509
1510The Stripe Engine is built for exceptional point cloud quality in scenes with highly specular
1511reflective objects. This makes the engine suitable for applications such as factory automation,
1512manufacturing, and bin picking. Additional acquisition and processing time are required for
1513the Stripe Engine.
1514
1515The Omni Engine is built for exceptional point cloud quality on all scenes, including scenes
1516with extremely specular reflective objects, as well as transparent objects. This makes the Omni
1517Engine suitable for applications such as piece picking. Same as for the Stripe Engine, it trades
1518off speed for quality. The Omni Engine is only available for Zivid 2+.
1519
1520The Sage engine is built for use cases that require all points to be correct/accurate with
1521particularly high confidence. This can be very suitable for eliminating problems such as
1522reflection artifacts. This validation comes at the cost of speed, and sometimes reduced number
1523of valid points due to the removal of low-confidence data. The Sage Engine is only available
1524for Zivid 2+R. The Sage Engine is an experimental engine. This involves that it can be changed
1525or removed in the future.
1526)description" };
1527
1529 enum class ValueType
1530 {
1531 phase,
1532 stripe,
1533 omni,
1534 sage
1535 };
1536 static const Engine phase;
1537 static const Engine stripe;
1538 static const Engine omni;
1539 static const Engine sage;
1540
1542 static std::set<ValueType> validValues()
1543 {
1544 return { ValueType::phase, ValueType::stripe, ValueType::omni, ValueType::sage };
1545 }
1546
1548 Engine() = default;
1549
1551 explicit constexpr Engine(ValueType value)
1552 : m_opt{ verifyValue(value) }
1553 {}
1554
1560
1562 bool hasValue() const;
1563
1565 void reset();
1566
1568 std::string toString() const;
1569
1571 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1572 {
1573 return stream << Engine{ value }.toString();
1574 }
1575
1577 bool operator==(const Engine &other) const
1578 {
1579 return m_opt == other.m_opt;
1580 }
1581
1583 bool operator!=(const Engine &other) const
1584 {
1585 return m_opt != other.m_opt;
1586 }
1587
1589 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1590 {
1591 return stream << value.toString();
1592 }
1593
1594 private:
1595 void setFromString(const std::string &value);
1596
1597 constexpr ValueType static verifyValue(const ValueType &value)
1598 {
1599 return value == ValueType::phase || value == ValueType::stripe || value == ValueType::omni
1600 || value == ValueType::sage
1601 ? value
1602 : throw std::invalid_argument{
1603 "Invalid value: Engine{ "
1604 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1605 };
1606 }
1607
1608 std::optional<ValueType> m_opt;
1609
1610 friend struct DataModel::Detail::Befriend<Engine>;
1611 };
1612
1614
1615 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1617 {
1618 public:
1620 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1621
1623 static constexpr const char *path{ "Processing" };
1624
1626 static constexpr const char *name{ "Processing" };
1627
1629 static constexpr const char *description{
1630 R"description(Settings related to processing of a capture, including filters and color balance.)description"
1631 };
1632
1640
1641 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1643 {
1644 public:
1646 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1647
1649 static constexpr const char *path{ "Processing/Color" };
1650
1652 static constexpr const char *name{ "Color" };
1653
1655 static constexpr const char *description{ R"description(Color settings.
1656
1657These settings are deprecated as of SDK 2.14. These settings will be removed in the next SDK major
1658version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1659in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use the
1660`Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it to .yml.
1661)description" };
1662
1664
1665 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1667 {
1668 public:
1670 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1671
1673 static constexpr const char *path{ "Processing/Color/Balance" };
1674
1676 static constexpr const char *name{ "Balance" };
1677
1679 static constexpr const char *description{ R"description(Color balance settings.)description" };
1680
1689
1690 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1692 {
1693 public:
1695 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1696
1698 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1699
1701 static constexpr const char *name{ "Blue" };
1702
1704 static constexpr const char *description{ R"description(Digital gain applied to blue channel.
1705
1706This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1707version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1708in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1709the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1710to .yml.
1711)description" };
1712
1714 using ValueType = double;
1715
1717 static constexpr Range<double> validRange()
1718 {
1719 return { 1.0, 8.0 };
1720 }
1721
1723 Blue() = default;
1724
1726 explicit constexpr Blue(double value)
1727 : m_opt{ verifyValue(value) }
1728 {}
1729
1734 double value() const;
1735
1737 bool hasValue() const;
1738
1740 void reset();
1741
1743 std::string toString() const;
1744
1746 bool operator==(const Blue &other) const
1747 {
1748 return m_opt == other.m_opt;
1749 }
1750
1752 bool operator!=(const Blue &other) const
1753 {
1754 return m_opt != other.m_opt;
1755 }
1756
1758 bool operator<(const Blue &other) const
1759 {
1760 return m_opt < other.m_opt;
1761 }
1762
1764 bool operator>(const Blue &other) const
1765 {
1766 return m_opt > other.m_opt;
1767 }
1768
1770 bool operator<=(const Blue &other) const
1771 {
1772 return m_opt <= other.m_opt;
1773 }
1774
1776 bool operator>=(const Blue &other) const
1777 {
1778 return m_opt >= other.m_opt;
1779 }
1780
1782 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1783 {
1784 return stream << value.toString();
1785 }
1786
1787 private:
1788 void setFromString(const std::string &value);
1789
1790 constexpr ValueType static verifyValue(const ValueType &value)
1791 {
1792 return validRange().isInRange(value)
1793 ? value
1794 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1795 + " } is not in range ["
1796 + std::to_string(validRange().min()) + ", "
1797 + std::to_string(validRange().max()) + "]" };
1798 }
1799
1800 std::optional<double> m_opt;
1801
1802 friend struct DataModel::Detail::Befriend<Blue>;
1803 };
1804
1813
1814 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1816 {
1817 public:
1819 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1820
1822 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1823
1825 static constexpr const char *name{ "Green" };
1826
1828 static constexpr const char *description{ R"description(Digital gain applied to green channel.
1829
1830This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1831version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1832in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1833the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1834to .yml.
1835)description" };
1836
1838 using ValueType = double;
1839
1841 static constexpr Range<double> validRange()
1842 {
1843 return { 1.0, 8.0 };
1844 }
1845
1847 Green() = default;
1848
1850 explicit constexpr Green(double value)
1851 : m_opt{ verifyValue(value) }
1852 {}
1853
1858 double value() const;
1859
1861 bool hasValue() const;
1862
1864 void reset();
1865
1867 std::string toString() const;
1868
1870 bool operator==(const Green &other) const
1871 {
1872 return m_opt == other.m_opt;
1873 }
1874
1876 bool operator!=(const Green &other) const
1877 {
1878 return m_opt != other.m_opt;
1879 }
1880
1882 bool operator<(const Green &other) const
1883 {
1884 return m_opt < other.m_opt;
1885 }
1886
1888 bool operator>(const Green &other) const
1889 {
1890 return m_opt > other.m_opt;
1891 }
1892
1894 bool operator<=(const Green &other) const
1895 {
1896 return m_opt <= other.m_opt;
1897 }
1898
1900 bool operator>=(const Green &other) const
1901 {
1902 return m_opt >= other.m_opt;
1903 }
1904
1906 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1907 {
1908 return stream << value.toString();
1909 }
1910
1911 private:
1912 void setFromString(const std::string &value);
1913
1914 constexpr ValueType static verifyValue(const ValueType &value)
1915 {
1916 return validRange().isInRange(value)
1917 ? value
1918 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1919 + " } is not in range ["
1920 + std::to_string(validRange().min()) + ", "
1921 + std::to_string(validRange().max()) + "]" };
1922 }
1923
1924 std::optional<double> m_opt;
1925
1926 friend struct DataModel::Detail::Befriend<Green>;
1927 };
1928
1937
1938 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1940 {
1941 public:
1943 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1944
1946 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1947
1949 static constexpr const char *name{ "Red" };
1950
1952 static constexpr const char *description{ R"description(Digital gain applied to red channel.
1953
1954This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1955version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1956in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1957the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1958to .yml.
1959)description" };
1960
1962 using ValueType = double;
1963
1965 static constexpr Range<double> validRange()
1966 {
1967 return { 1.0, 8.0 };
1968 }
1969
1971 Red() = default;
1972
1974 explicit constexpr Red(double value)
1975 : m_opt{ verifyValue(value) }
1976 {}
1977
1982 double value() const;
1983
1985 bool hasValue() const;
1986
1988 void reset();
1989
1991 std::string toString() const;
1992
1994 bool operator==(const Red &other) const
1995 {
1996 return m_opt == other.m_opt;
1997 }
1998
2000 bool operator!=(const Red &other) const
2001 {
2002 return m_opt != other.m_opt;
2003 }
2004
2006 bool operator<(const Red &other) const
2007 {
2008 return m_opt < other.m_opt;
2009 }
2010
2012 bool operator>(const Red &other) const
2013 {
2014 return m_opt > other.m_opt;
2015 }
2016
2018 bool operator<=(const Red &other) const
2019 {
2020 return m_opt <= other.m_opt;
2021 }
2022
2024 bool operator>=(const Red &other) const
2025 {
2026 return m_opt >= other.m_opt;
2027 }
2028
2030 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
2031 {
2032 return stream << value.toString();
2033 }
2034
2035 private:
2036 void setFromString(const std::string &value);
2037
2038 constexpr ValueType static verifyValue(const ValueType &value)
2039 {
2040 return validRange().isInRange(value)
2041 ? value
2042 : throw std::out_of_range{ "Red{ " + std::to_string(value)
2043 + " } is not in range ["
2044 + std::to_string(validRange().min()) + ", "
2045 + std::to_string(validRange().max()) + "]" };
2046 }
2047
2048 std::optional<double> m_opt;
2049
2050 friend struct DataModel::Detail::Befriend<Red>;
2051 };
2052
2053 using Descendants = std::tuple<
2057
2060
2074#ifndef NO_DOC
2075 template<
2076 typename... Args,
2077 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2078 typename std::enable_if<
2079 Zivid::Detail::TypeTraits::
2080 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2081 int>::type = 0>
2082#else
2083 template<typename... Args>
2084#endif
2085 explicit Balance(Args &&...args)
2086 {
2087 using namespace Zivid::Detail::TypeTraits;
2088
2089 static_assert(
2090 AllArgsDecayedAreUnique<Args...>::value,
2091 "Found duplicate types among the arguments passed to Balance(...). "
2092 "Types should be listed at most once.");
2093
2094 set(std::forward<Args>(args)...);
2095 }
2096
2109#ifndef NO_DOC
2110 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2111#else
2112 template<typename... Args>
2113#endif
2114 void set(Args &&...args)
2115 {
2116 using namespace Zivid::Detail::TypeTraits;
2117
2118 using AllArgsAreDescendantNodes =
2119 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2120 static_assert(
2121 AllArgsAreDescendantNodes::value,
2122 "All arguments passed to set(...) must be descendant nodes.");
2123
2124 static_assert(
2125 AllArgsDecayedAreUnique<Args...>::value,
2126 "Found duplicate types among the arguments passed to set(...). "
2127 "Types should be listed at most once.");
2128
2129 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2130 }
2131
2145#ifndef NO_DOC
2146 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2147#else
2148 template<typename... Args>
2149#endif
2150 Balance copyWith(Args &&...args) const
2151 {
2152 using namespace Zivid::Detail::TypeTraits;
2153
2154 using AllArgsAreDescendantNodes =
2155 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2156 static_assert(
2157 AllArgsAreDescendantNodes::value,
2158 "All arguments passed to copyWith(...) must be descendant nodes.");
2159
2160 static_assert(
2161 AllArgsDecayedAreUnique<Args...>::value,
2162 "Found duplicate types among the arguments passed to copyWith(...). "
2163 "Types should be listed at most once.");
2164
2165 auto copy{ *this };
2166 copy.set(std::forward<Args>(args)...);
2167 return copy;
2168 }
2169
2171 const Blue &blue() const
2172 {
2173 return m_blue;
2174 }
2175
2178 {
2179 return m_blue;
2180 }
2181
2183 Balance &set(const Blue &value)
2184 {
2185 m_blue = value;
2186 return *this;
2187 }
2188
2190 const Green &green() const
2191 {
2192 return m_green;
2193 }
2194
2197 {
2198 return m_green;
2199 }
2200
2202 Balance &set(const Green &value)
2203 {
2204 m_green = value;
2205 return *this;
2206 }
2207
2209 const Red &red() const
2210 {
2211 return m_red;
2212 }
2213
2216 {
2217 return m_red;
2218 }
2219
2221 Balance &set(const Red &value)
2222 {
2223 m_red = value;
2224 return *this;
2225 }
2226
2227 template<
2228 typename T,
2229 typename std::enable_if<
2230 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2231 int>::type = 0>
2233 {
2234 return m_blue;
2235 }
2236
2237 template<
2238 typename T,
2239 typename std::enable_if<
2240 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2241 int>::type = 0>
2243 {
2244 return m_green;
2245 }
2246
2247 template<
2248 typename T,
2249 typename std::
2250 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2252 {
2253 return m_red;
2254 }
2255
2256 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2258 {
2259 return m_blue;
2260 }
2261
2262 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2264 {
2265 return m_green;
2266 }
2267
2268 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2270 {
2271 return m_red;
2272 }
2273
2275 template<typename F>
2276 void forEach(const F &f) const
2277 {
2278 f(m_blue);
2279 f(m_green);
2280 f(m_red);
2281 }
2282
2284 template<typename F>
2285 void forEach(const F &f)
2286 {
2287 f(m_blue);
2288 f(m_green);
2289 f(m_red);
2290 }
2291
2293 bool operator==(const Balance &other) const;
2294
2296 bool operator!=(const Balance &other) const;
2297
2299 std::string toString() const;
2300
2302 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2303 {
2304 return stream << value.toString();
2305 }
2306
2307 private:
2308 void setFromString(const std::string &value);
2309
2310 void setFromString(const std::string &fullPath, const std::string &value);
2311
2312 std::string getString(const std::string &fullPath) const;
2313
2314 Blue m_blue;
2315 Green m_green;
2316 Red m_red;
2317
2318 friend struct DataModel::Detail::Befriend<Balance>;
2319 };
2320
2322
2323 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2325 {
2326 public:
2328 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2329
2331 static constexpr const char *path{ "Processing/Color/Experimental" };
2332
2334 static constexpr const char *name{ "Experimental" };
2335
2337 static constexpr const char *description{
2338 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2339 };
2340
2369
2370 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2372 {
2373 public:
2375 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2376
2378 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2379
2381 static constexpr const char *name{ "Mode" };
2382
2384 static constexpr const char *description{
2385 R"description(This setting controls how the color image is computed.
2386
2387`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2388single-acquisition captures and multi-acquisition captures when all the acquisitions have
2389identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2390multi-acquisition HDR captures with differing acquisition settings.
2391
2392`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2393the capture consists of more than one acquisition, then the remaining acquisitions are not used
2394for the color image. No tone mapping is performed. This option provides the most control of
2395the color image, and the color values will be consistent over repeated captures with the same
2396settings.
2397
2398`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2399HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2400image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2401applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2402normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2403mode the color values can be inconsistent over repeated captures if you move, add or remove
2404objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2405mode.
2406
2407This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
2408version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
2409in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
2410the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
2411to .yml.
2412)description"
2413 };
2414
2416 enum class ValueType
2417 {
2418 automatic,
2419 useFirstAcquisition,
2420 toneMapping
2421 };
2422 static const Mode automatic;
2424 static const Mode toneMapping;
2425
2427 static std::set<ValueType> validValues()
2428 {
2429 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2430 }
2431
2433 Mode() = default;
2434
2436 explicit constexpr Mode(ValueType value)
2437 : m_opt{ verifyValue(value) }
2438 {}
2439
2445
2447 bool hasValue() const;
2448
2450 void reset();
2451
2453 std::string toString() const;
2454
2456 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2457 {
2458 return stream << Mode{ value }.toString();
2459 }
2460
2462 bool operator==(const Mode &other) const
2463 {
2464 return m_opt == other.m_opt;
2465 }
2466
2468 bool operator!=(const Mode &other) const
2469 {
2470 return m_opt != other.m_opt;
2471 }
2472
2474 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2475 {
2476 return stream << value.toString();
2477 }
2478
2479 private:
2480 void setFromString(const std::string &value);
2481
2482 constexpr ValueType static verifyValue(const ValueType &value)
2483 {
2484 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2485 || value == ValueType::toneMapping
2486 ? value
2487 : throw std::invalid_argument{
2488 "Invalid value: Mode{ "
2489 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2490 + " }"
2491 };
2492 }
2493
2494 std::optional<ValueType> m_opt;
2495
2496 friend struct DataModel::Detail::Befriend<Mode>;
2497 };
2498
2499 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2500
2503
2515#ifndef NO_DOC
2516 template<
2517 typename... Args,
2518 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2519 typename std::enable_if<
2520 Zivid::Detail::TypeTraits::
2521 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2522 int>::type = 0>
2523#else
2524 template<typename... Args>
2525#endif
2526 explicit Experimental(Args &&...args)
2527 {
2528 using namespace Zivid::Detail::TypeTraits;
2529
2530 static_assert(
2531 AllArgsDecayedAreUnique<Args...>::value,
2532 "Found duplicate types among the arguments passed to Experimental(...). "
2533 "Types should be listed at most once.");
2534
2535 set(std::forward<Args>(args)...);
2536 }
2537
2548#ifndef NO_DOC
2549 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2550#else
2551 template<typename... Args>
2552#endif
2553 void set(Args &&...args)
2554 {
2555 using namespace Zivid::Detail::TypeTraits;
2556
2557 using AllArgsAreDescendantNodes =
2558 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2559 static_assert(
2560 AllArgsAreDescendantNodes::value,
2561 "All arguments passed to set(...) must be descendant nodes.");
2562
2563 static_assert(
2564 AllArgsDecayedAreUnique<Args...>::value,
2565 "Found duplicate types among the arguments passed to set(...). "
2566 "Types should be listed at most once.");
2567
2568 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2569 }
2570
2582#ifndef NO_DOC
2583 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2584#else
2585 template<typename... Args>
2586#endif
2587 Experimental copyWith(Args &&...args) const
2588 {
2589 using namespace Zivid::Detail::TypeTraits;
2590
2591 using AllArgsAreDescendantNodes =
2592 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2593 static_assert(
2594 AllArgsAreDescendantNodes::value,
2595 "All arguments passed to copyWith(...) must be descendant nodes.");
2596
2597 static_assert(
2598 AllArgsDecayedAreUnique<Args...>::value,
2599 "Found duplicate types among the arguments passed to copyWith(...). "
2600 "Types should be listed at most once.");
2601
2602 auto copy{ *this };
2603 copy.set(std::forward<Args>(args)...);
2604 return copy;
2605 }
2606
2608 const Mode &mode() const
2609 {
2610 return m_mode;
2611 }
2612
2615 {
2616 return m_mode;
2617 }
2618
2620 Experimental &set(const Mode &value)
2621 {
2622 m_mode = value;
2623 return *this;
2624 }
2625
2626 template<
2627 typename T,
2628 typename std::enable_if<
2629 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2630 int>::type = 0>
2632 {
2633 return m_mode;
2634 }
2635
2636 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2638 {
2639 return m_mode;
2640 }
2641
2643 template<typename F>
2644 void forEach(const F &f) const
2645 {
2646 f(m_mode);
2647 }
2648
2650 template<typename F>
2651 void forEach(const F &f)
2652 {
2653 f(m_mode);
2654 }
2655
2657 bool operator==(const Experimental &other) const;
2658
2660 bool operator!=(const Experimental &other) const;
2661
2663 std::string toString() const;
2664
2666 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2667 {
2668 return stream << value.toString();
2669 }
2670
2671 private:
2672 void setFromString(const std::string &value);
2673
2674 void setFromString(const std::string &fullPath, const std::string &value);
2675
2676 std::string getString(const std::string &fullPath) const;
2677
2678 Mode m_mode;
2679
2680 friend struct DataModel::Detail::Befriend<Experimental>;
2681 };
2682
2692
2693 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2695 {
2696 public:
2698 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2699
2701 static constexpr const char *path{ "Processing/Color/Gamma" };
2702
2704 static constexpr const char *name{ "Gamma" };
2705
2707 static constexpr const char *description{
2708 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2709greater than 1 makes the colors darker.
2710
2711This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
2712version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
2713in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
2714the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
2715to .yml.
2716)description"
2717 };
2718
2720 using ValueType = double;
2721
2723 static constexpr Range<double> validRange()
2724 {
2725 return { 0.25, 1.5 };
2726 }
2727
2729 Gamma() = default;
2730
2732 explicit constexpr Gamma(double value)
2733 : m_opt{ verifyValue(value) }
2734 {}
2735
2740 double value() const;
2741
2743 bool hasValue() const;
2744
2746 void reset();
2747
2749 std::string toString() const;
2750
2752 bool operator==(const Gamma &other) const
2753 {
2754 return m_opt == other.m_opt;
2755 }
2756
2758 bool operator!=(const Gamma &other) const
2759 {
2760 return m_opt != other.m_opt;
2761 }
2762
2764 bool operator<(const Gamma &other) const
2765 {
2766 return m_opt < other.m_opt;
2767 }
2768
2770 bool operator>(const Gamma &other) const
2771 {
2772 return m_opt > other.m_opt;
2773 }
2774
2776 bool operator<=(const Gamma &other) const
2777 {
2778 return m_opt <= other.m_opt;
2779 }
2780
2782 bool operator>=(const Gamma &other) const
2783 {
2784 return m_opt >= other.m_opt;
2785 }
2786
2788 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2789 {
2790 return stream << value.toString();
2791 }
2792
2793 private:
2794 void setFromString(const std::string &value);
2795
2796 constexpr ValueType static verifyValue(const ValueType &value)
2797 {
2798 return validRange().isInRange(value)
2799 ? value
2800 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2801 + std::to_string(validRange().min()) + ", "
2802 + std::to_string(validRange().max()) + "]" };
2803 }
2804
2805 std::optional<double> m_opt;
2806
2807 friend struct DataModel::Detail::Befriend<Gamma>;
2808 };
2809
2810 using Descendants = std::tuple<
2818
2821
2839#ifndef NO_DOC
2840 template<
2841 typename... Args,
2842 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2843 typename std::enable_if<
2844 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2845 value,
2846 int>::type = 0>
2847#else
2848 template<typename... Args>
2849#endif
2850 explicit Color(Args &&...args)
2851 {
2852 using namespace Zivid::Detail::TypeTraits;
2853
2854 static_assert(
2855 AllArgsDecayedAreUnique<Args...>::value,
2856 "Found duplicate types among the arguments passed to Color(...). "
2857 "Types should be listed at most once.");
2858
2859 set(std::forward<Args>(args)...);
2860 }
2861
2878#ifndef NO_DOC
2879 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2880#else
2881 template<typename... Args>
2882#endif
2883 void set(Args &&...args)
2884 {
2885 using namespace Zivid::Detail::TypeTraits;
2886
2887 using AllArgsAreDescendantNodes =
2888 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2889 static_assert(
2890 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2891
2892 static_assert(
2893 AllArgsDecayedAreUnique<Args...>::value,
2894 "Found duplicate types among the arguments passed to set(...). "
2895 "Types should be listed at most once.");
2896
2897 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2898 }
2899
2917#ifndef NO_DOC
2918 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2919#else
2920 template<typename... Args>
2921#endif
2922 Color copyWith(Args &&...args) const
2923 {
2924 using namespace Zivid::Detail::TypeTraits;
2925
2926 using AllArgsAreDescendantNodes =
2927 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2928 static_assert(
2929 AllArgsAreDescendantNodes::value,
2930 "All arguments passed to copyWith(...) must be descendant nodes.");
2931
2932 static_assert(
2933 AllArgsDecayedAreUnique<Args...>::value,
2934 "Found duplicate types among the arguments passed to copyWith(...). "
2935 "Types should be listed at most once.");
2936
2937 auto copy{ *this };
2938 copy.set(std::forward<Args>(args)...);
2939 return copy;
2940 }
2941
2943 const Balance &balance() const
2944 {
2945 return m_balance;
2946 }
2947
2950 {
2951 return m_balance;
2952 }
2953
2955 Color &set(const Balance &value)
2956 {
2957 m_balance = value;
2958 return *this;
2959 }
2960
2962 Color &set(const Balance::Blue &value)
2963 {
2964 m_balance.set(value);
2965 return *this;
2966 }
2967
2969 Color &set(const Balance::Green &value)
2970 {
2971 m_balance.set(value);
2972 return *this;
2973 }
2974
2976 Color &set(const Balance::Red &value)
2977 {
2978 m_balance.set(value);
2979 return *this;
2980 }
2981
2984 {
2985 return m_experimental;
2986 }
2987
2990 {
2991 return m_experimental;
2992 }
2993
2995 Color &set(const Experimental &value)
2996 {
2997 m_experimental = value;
2998 return *this;
2999 }
3000
3003 {
3004 m_experimental.set(value);
3005 return *this;
3006 }
3007
3009 const Gamma &gamma() const
3010 {
3011 return m_gamma;
3012 }
3013
3016 {
3017 return m_gamma;
3018 }
3019
3021 Color &set(const Gamma &value)
3022 {
3023 m_gamma = value;
3024 return *this;
3025 }
3026
3027 template<
3028 typename T,
3029 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
3030 0>
3032 {
3033 return m_balance;
3034 }
3035
3036 template<
3037 typename T,
3038 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
3039 type = 0>
3041 {
3042 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
3043 }
3044
3045 template<
3046 typename T,
3047 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
3048 type = 0>
3050 {
3051 return m_balance.get<Settings::Processing::Color::Balance::Green>();
3052 }
3053
3054 template<
3055 typename T,
3056 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
3057 type = 0>
3059 {
3060 return m_balance.get<Settings::Processing::Color::Balance::Red>();
3061 }
3062
3063 template<
3064 typename T,
3065 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
3066 type = 0>
3068 {
3069 return m_experimental;
3070 }
3071
3072 template<
3073 typename T,
3074 typename std::enable_if<
3075 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
3076 int>::type = 0>
3078 {
3079 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
3080 }
3081
3082 template<
3083 typename T,
3084 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
3086 {
3087 return m_gamma;
3088 }
3089
3090 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3092 {
3093 return m_balance;
3094 }
3095
3096 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3098 {
3099 return m_experimental;
3100 }
3101
3102 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3104 {
3105 return m_gamma;
3106 }
3107
3109 template<typename F>
3110 void forEach(const F &f) const
3111 {
3112 f(m_balance);
3113 f(m_experimental);
3114 f(m_gamma);
3115 }
3116
3118 template<typename F>
3119 void forEach(const F &f)
3120 {
3121 f(m_balance);
3122 f(m_experimental);
3123 f(m_gamma);
3124 }
3125
3127 bool operator==(const Color &other) const;
3128
3130 bool operator!=(const Color &other) const;
3131
3133 std::string toString() const;
3134
3136 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
3137 {
3138 return stream << value.toString();
3139 }
3140
3141 private:
3142 void setFromString(const std::string &value);
3143
3144 void setFromString(const std::string &fullPath, const std::string &value);
3145
3146 std::string getString(const std::string &fullPath) const;
3147
3148 Balance m_balance;
3149 Experimental m_experimental;
3150 Gamma m_gamma;
3151
3152 friend struct DataModel::Detail::Befriend<Color>;
3153 };
3154
3156
3157 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3159 {
3160 public:
3162 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3163
3165 static constexpr const char *path{ "Processing/Filters" };
3166
3168 static constexpr const char *name{ "Filters" };
3169
3171 static constexpr const char *description{ R"description(Filter settings.)description" };
3172
3175
3176 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3178 {
3179 public:
3181 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3182
3184 static constexpr const char *path{ "Processing/Filters/Cluster" };
3185
3187 static constexpr const char *name{ "Cluster" };
3188
3190 static constexpr const char *description{
3191 R"description(Removes floating points and isolated clusters from the point cloud.
3192)description"
3193 };
3194
3196
3197 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3199 {
3200 public:
3202 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3203
3205 static constexpr const char *path{ "Processing/Filters/Cluster/Removal" };
3206
3208 static constexpr const char *name{ "Removal" };
3209
3211 static constexpr const char *description{ R"description(Cluster removal filter.)description" };
3212
3214
3215 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3217 {
3218 public:
3220 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3221
3223 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/Enabled" };
3224
3226 static constexpr const char *name{ "Enabled" };
3227
3229 static constexpr const char *description{
3230 R"description(Enable or disable cluster removal.)description"
3231 };
3232
3234 using ValueType = bool;
3235 static const Enabled yes;
3236 static const Enabled no;
3237
3239 static std::set<bool> validValues()
3240 {
3241 return { false, true };
3242 }
3243
3245 Enabled() = default;
3246
3248 explicit constexpr Enabled(bool value)
3249 : m_opt{ value }
3250 {}
3251
3256 bool value() const;
3257
3259 bool hasValue() const;
3260
3262 void reset();
3263
3265 std::string toString() const;
3266
3268 bool operator==(const Enabled &other) const
3269 {
3270 return m_opt == other.m_opt;
3271 }
3272
3274 bool operator!=(const Enabled &other) const
3275 {
3276 return m_opt != other.m_opt;
3277 }
3278
3280 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3281 {
3282 return stream << value.toString();
3283 }
3284
3285 private:
3286 void setFromString(const std::string &value);
3287
3288 std::optional<bool> m_opt;
3289
3290 friend struct DataModel::Detail::Befriend<Enabled>;
3291 };
3292
3297
3298 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3300 {
3301 public:
3303 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3304
3306 static constexpr const char *path{
3307 "Processing/Filters/Cluster/Removal/MaxNeighborDistance"
3308 };
3309
3311 static constexpr const char *name{ "MaxNeighborDistance" };
3312
3314 static constexpr const char *description{
3315 R"description(Maximum normalized distance between neighboring points that are still classified as
3316belonging to the same cluster. The default value is optimal for most scenes. On messy
3317scenes turning this setting down helps removing more bad points.
3318)description"
3319 };
3320
3322 using ValueType = double;
3323
3325 static constexpr Range<double> validRange()
3326 {
3327 return { 2.0, 10.0 };
3328 }
3329
3332
3334 explicit constexpr MaxNeighborDistance(double value)
3335 : m_opt{ verifyValue(value) }
3336 {}
3337
3342 double value() const;
3343
3345 bool hasValue() const;
3346
3348 void reset();
3349
3351 std::string toString() const;
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 bool operator>=(const MaxNeighborDistance &other) const
3385 {
3386 return m_opt >= other.m_opt;
3387 }
3388
3390 friend std::ostream &operator<<(std::ostream &stream, const MaxNeighborDistance &value)
3391 {
3392 return stream << value.toString();
3393 }
3394
3395 private:
3396 void setFromString(const std::string &value);
3397
3398 constexpr ValueType static verifyValue(const ValueType &value)
3399 {
3400 return validRange().isInRange(value)
3401 ? value
3402 : throw std::out_of_range{ "MaxNeighborDistance{ " + std::to_string(value)
3403 + " } is not in range ["
3404 + std::to_string(validRange().min()) + ", "
3405 + std::to_string(validRange().max()) + "]" };
3406 }
3407
3408 std::optional<double> m_opt;
3409
3410 friend struct DataModel::Detail::Befriend<MaxNeighborDistance>;
3411 };
3412
3416
3417 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3419 {
3420 public:
3422 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3423
3425 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/MinArea" };
3426
3428 static constexpr const char *name{ "MinArea" };
3429
3431 static constexpr const char *description{
3432 R"description(Clusters with area below this threshold are removed by the filter.
3433The area is given in mm^2.
3434)description"
3435 };
3436
3438 using ValueType = double;
3439
3441 static constexpr Range<double> validRange()
3442 {
3443 return { 0.0, 1500.0 };
3444 }
3445
3447 MinArea() = default;
3448
3450 explicit constexpr MinArea(double value)
3451 : m_opt{ verifyValue(value) }
3452 {}
3453
3458 double value() const;
3459
3461 bool hasValue() const;
3462
3464 void reset();
3465
3467 std::string toString() const;
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 bool operator>=(const MinArea &other) const
3501 {
3502 return m_opt >= other.m_opt;
3503 }
3504
3506 friend std::ostream &operator<<(std::ostream &stream, const MinArea &value)
3507 {
3508 return stream << value.toString();
3509 }
3510
3511 private:
3512 void setFromString(const std::string &value);
3513
3514 constexpr ValueType static verifyValue(const ValueType &value)
3515 {
3516 return validRange().isInRange(value)
3517 ? value
3518 : throw std::out_of_range{ "MinArea{ " + std::to_string(value)
3519 + " } is not in range ["
3520 + std::to_string(validRange().min()) + ", "
3521 + std::to_string(validRange().max()) + "]" };
3522 }
3523
3524 std::optional<double> m_opt;
3525
3526 friend struct DataModel::Detail::Befriend<MinArea>;
3527 };
3528
3529 using Descendants = std::tuple<
3533
3536
3550#ifndef NO_DOC
3551 template<
3552 typename... Args,
3553 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3554 typename std::enable_if<
3555 Zivid::Detail::TypeTraits::
3556 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3557 int>::type = 0>
3558#else
3559 template<typename... Args>
3560#endif
3561 explicit Removal(Args &&...args)
3562 {
3563 using namespace Zivid::Detail::TypeTraits;
3564
3565 static_assert(
3566 AllArgsDecayedAreUnique<Args...>::value,
3567 "Found duplicate types among the arguments passed to Removal(...). "
3568 "Types should be listed at most once.");
3569
3570 set(std::forward<Args>(args)...);
3571 }
3572
3585#ifndef NO_DOC
3586 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3587#else
3588 template<typename... Args>
3589#endif
3590 void set(Args &&...args)
3591 {
3592 using namespace Zivid::Detail::TypeTraits;
3593
3594 using AllArgsAreDescendantNodes =
3595 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3596 static_assert(
3597 AllArgsAreDescendantNodes::value,
3598 "All arguments passed to set(...) must be descendant nodes.");
3599
3600 static_assert(
3601 AllArgsDecayedAreUnique<Args...>::value,
3602 "Found duplicate types among the arguments passed to set(...). "
3603 "Types should be listed at most once.");
3604
3605 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3606 }
3607
3621#ifndef NO_DOC
3622 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3623#else
3624 template<typename... Args>
3625#endif
3626 Removal copyWith(Args &&...args) const
3627 {
3628 using namespace Zivid::Detail::TypeTraits;
3629
3630 using AllArgsAreDescendantNodes =
3631 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3632 static_assert(
3633 AllArgsAreDescendantNodes::value,
3634 "All arguments passed to copyWith(...) must be descendant nodes.");
3635
3636 static_assert(
3637 AllArgsDecayedAreUnique<Args...>::value,
3638 "Found duplicate types among the arguments passed to copyWith(...). "
3639 "Types should be listed at most once.");
3640
3641 auto copy{ *this };
3642 copy.set(std::forward<Args>(args)...);
3643 return copy;
3644 }
3645
3647 const Enabled &isEnabled() const
3648 {
3649 return m_enabled;
3650 }
3651
3654 {
3655 return m_enabled;
3656 }
3657
3659 Removal &set(const Enabled &value)
3660 {
3661 m_enabled = value;
3662 return *this;
3663 }
3664
3667 {
3668 return m_maxNeighborDistance;
3669 }
3670
3673 {
3674 return m_maxNeighborDistance;
3675 }
3676
3679 {
3680 m_maxNeighborDistance = value;
3681 return *this;
3682 }
3683
3685 const MinArea &minArea() const
3686 {
3687 return m_minArea;
3688 }
3689
3692 {
3693 return m_minArea;
3694 }
3695
3697 Removal &set(const MinArea &value)
3698 {
3699 m_minArea = value;
3700 return *this;
3701 }
3702
3703 template<
3704 typename T,
3705 typename std::enable_if<
3706 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3707 int>::type = 0>
3709 {
3710 return m_enabled;
3711 }
3712
3713 template<
3714 typename T,
3715 typename std::enable_if<
3716 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3717 value,
3718 int>::type = 0>
3720 {
3721 return m_maxNeighborDistance;
3722 }
3723
3724 template<
3725 typename T,
3726 typename std::enable_if<
3727 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3728 int>::type = 0>
3730 {
3731 return m_minArea;
3732 }
3733
3734 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3736 {
3737 return m_enabled;
3738 }
3739
3740 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3742 {
3743 return m_maxNeighborDistance;
3744 }
3745
3746 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3748 {
3749 return m_minArea;
3750 }
3751
3753 template<typename F>
3754 void forEach(const F &f) const
3755 {
3756 f(m_enabled);
3757 f(m_maxNeighborDistance);
3758 f(m_minArea);
3759 }
3760
3762 template<typename F>
3763 void forEach(const F &f)
3764 {
3765 f(m_enabled);
3766 f(m_maxNeighborDistance);
3767 f(m_minArea);
3768 }
3769
3771 bool operator==(const Removal &other) const;
3772
3774 bool operator!=(const Removal &other) const;
3775
3777 std::string toString() const;
3778
3780 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3781 {
3782 return stream << value.toString();
3783 }
3784
3785 private:
3786 void setFromString(const std::string &value);
3787
3788 void setFromString(const std::string &fullPath, const std::string &value);
3789
3790 std::string getString(const std::string &fullPath) const;
3791
3792 Enabled m_enabled;
3793 MaxNeighborDistance m_maxNeighborDistance;
3794 MinArea m_minArea;
3795
3796 friend struct DataModel::Detail::Befriend<Removal>;
3797 };
3798
3799 using Descendants = std::tuple<
3804
3807
3822#ifndef NO_DOC
3823 template<
3824 typename... Args,
3825 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3826 typename std::enable_if<
3827 Zivid::Detail::TypeTraits::
3828 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3829 int>::type = 0>
3830#else
3831 template<typename... Args>
3832#endif
3833 explicit Cluster(Args &&...args)
3834 {
3835 using namespace Zivid::Detail::TypeTraits;
3836
3837 static_assert(
3838 AllArgsDecayedAreUnique<Args...>::value,
3839 "Found duplicate types among the arguments passed to Cluster(...). "
3840 "Types should be listed at most once.");
3841
3842 set(std::forward<Args>(args)...);
3843 }
3844
3858#ifndef NO_DOC
3859 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3860#else
3861 template<typename... Args>
3862#endif
3863 void set(Args &&...args)
3864 {
3865 using namespace Zivid::Detail::TypeTraits;
3866
3867 using AllArgsAreDescendantNodes =
3868 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3869 static_assert(
3870 AllArgsAreDescendantNodes::value,
3871 "All arguments passed to set(...) must be descendant nodes.");
3872
3873 static_assert(
3874 AllArgsDecayedAreUnique<Args...>::value,
3875 "Found duplicate types among the arguments passed to set(...). "
3876 "Types should be listed at most once.");
3877
3878 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3879 }
3880
3895#ifndef NO_DOC
3896 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3897#else
3898 template<typename... Args>
3899#endif
3900 Cluster copyWith(Args &&...args) const
3901 {
3902 using namespace Zivid::Detail::TypeTraits;
3903
3904 using AllArgsAreDescendantNodes =
3905 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3906 static_assert(
3907 AllArgsAreDescendantNodes::value,
3908 "All arguments passed to copyWith(...) must be descendant nodes.");
3909
3910 static_assert(
3911 AllArgsDecayedAreUnique<Args...>::value,
3912 "Found duplicate types among the arguments passed to copyWith(...). "
3913 "Types should be listed at most once.");
3914
3915 auto copy{ *this };
3916 copy.set(std::forward<Args>(args)...);
3917 return copy;
3918 }
3919
3921 const Removal &removal() const
3922 {
3923 return m_removal;
3924 }
3925
3928 {
3929 return m_removal;
3930 }
3931
3933 Cluster &set(const Removal &value)
3934 {
3935 m_removal = value;
3936 return *this;
3937 }
3938
3941 {
3942 m_removal.set(value);
3943 return *this;
3944 }
3945
3948 {
3949 m_removal.set(value);
3950 return *this;
3951 }
3952
3955 {
3956 m_removal.set(value);
3957 return *this;
3958 }
3959
3960 template<
3961 typename T,
3962 typename std::enable_if<
3963 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
3964 int>::type = 0>
3966 {
3967 return m_removal;
3968 }
3969
3970 template<
3971 typename T,
3972 typename std::enable_if<
3973 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3974 int>::type = 0>
3976 {
3978 }
3979
3980 template<
3981 typename T,
3982 typename std::enable_if<
3983 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3984 value,
3985 int>::type = 0>
3987 {
3989 }
3990
3991 template<
3992 typename T,
3993 typename std::enable_if<
3994 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3995 int>::type = 0>
3997 {
3999 }
4000
4001 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4003 {
4004 return m_removal;
4005 }
4006
4008 template<typename F>
4009 void forEach(const F &f) const
4010 {
4011 f(m_removal);
4012 }
4013
4015 template<typename F>
4016 void forEach(const F &f)
4017 {
4018 f(m_removal);
4019 }
4020
4022 bool operator==(const Cluster &other) const;
4023
4025 bool operator!=(const Cluster &other) const;
4026
4028 std::string toString() const;
4029
4031 friend std::ostream &operator<<(std::ostream &stream, const Cluster &value)
4032 {
4033 return stream << value.toString();
4034 }
4035
4036 private:
4037 void setFromString(const std::string &value);
4038
4039 void setFromString(const std::string &fullPath, const std::string &value);
4040
4041 std::string getString(const std::string &fullPath) const;
4042
4043 Removal m_removal;
4044
4045 friend struct DataModel::Detail::Befriend<Cluster>;
4046 };
4047
4049
4050 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4052 {
4053 public:
4055 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4056
4058 static constexpr const char *path{ "Processing/Filters/Experimental" };
4059
4061 static constexpr const char *name{ "Experimental" };
4062
4064 static constexpr const char *description{
4065 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
4066 };
4067
4073
4074 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4076 {
4077 public:
4079 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4080
4082 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
4083
4085 static constexpr const char *name{ "ContrastDistortion" };
4086
4088 static constexpr const char *description{
4089 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
4090or high contrast. These artifacts are caused by blurring in the lens. The filter
4091works best when aperture values are chosen such that the camera has quite good focus.
4092The filter also supports removing the points that experience a large correction.
4093)description"
4094 };
4095
4097
4098 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4100 {
4101 public:
4103 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4104
4106 static constexpr const char *path{
4107 "Processing/Filters/Experimental/ContrastDistortion/Correction"
4108 };
4109
4111 static constexpr const char *name{ "Correction" };
4112
4114 static constexpr const char *description{
4115 R"description(Contrast distortion correction filter.)description"
4116 };
4117
4119
4120 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4122 {
4123 public:
4125 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4126
4128 static constexpr const char *path{
4129 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
4130 };
4131
4133 static constexpr const char *name{ "Enabled" };
4134
4136 static constexpr const char *description{
4137 R"description(Enable or disable contrast distortion correction.)description"
4138 };
4139
4141 using ValueType = bool;
4142 static const Enabled yes;
4143 static const Enabled no;
4144
4146 static std::set<bool> validValues()
4147 {
4148 return { false, true };
4149 }
4150
4152 Enabled() = default;
4153
4155 explicit constexpr Enabled(bool value)
4156 : m_opt{ value }
4157 {}
4158
4163 bool value() const;
4164
4166 bool hasValue() const;
4167
4169 void reset();
4170
4172 std::string toString() const;
4173
4175 bool operator==(const Enabled &other) const
4176 {
4177 return m_opt == other.m_opt;
4178 }
4179
4181 bool operator!=(const Enabled &other) const
4182 {
4183 return m_opt != other.m_opt;
4184 }
4185
4187 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4188 {
4189 return stream << value.toString();
4190 }
4191
4192 private:
4193 void setFromString(const std::string &value);
4194
4195 std::optional<bool> m_opt;
4196
4197 friend struct DataModel::Detail::Befriend<Enabled>;
4198 };
4199
4201
4202 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4204 {
4205 public:
4207 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4208
4210 static constexpr const char *path{
4211 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
4212 };
4213
4215 static constexpr const char *name{ "Strength" };
4216
4218 static constexpr const char *description{
4219 R"description(Strength of correction. Higher values give more correction.)description"
4220 };
4221
4223 using ValueType = double;
4224
4226 static constexpr Range<double> validRange()
4227 {
4228 return { 0.0, 1.0 };
4229 }
4230
4232 Strength() = default;
4233
4235 explicit constexpr Strength(double value)
4236 : m_opt{ verifyValue(value) }
4237 {}
4238
4243 double value() const;
4244
4246 bool hasValue() const;
4247
4249 void reset();
4250
4252 std::string toString() const;
4253
4255 bool operator==(const Strength &other) const
4256 {
4257 return m_opt == other.m_opt;
4258 }
4259
4261 bool operator!=(const Strength &other) const
4262 {
4263 return m_opt != other.m_opt;
4264 }
4265
4267 bool operator<(const Strength &other) const
4268 {
4269 return m_opt < other.m_opt;
4270 }
4271
4273 bool operator>(const Strength &other) const
4274 {
4275 return m_opt > other.m_opt;
4276 }
4277
4279 bool operator<=(const Strength &other) const
4280 {
4281 return m_opt <= other.m_opt;
4282 }
4283
4285 bool operator>=(const Strength &other) const
4286 {
4287 return m_opt >= other.m_opt;
4288 }
4289
4291 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
4292 {
4293 return stream << value.toString();
4294 }
4295
4296 private:
4297 void setFromString(const std::string &value);
4298
4299 constexpr ValueType static verifyValue(const ValueType &value)
4300 {
4301 return validRange().isInRange(value)
4302 ? value
4303 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
4304 + " } is not in range ["
4305 + std::to_string(validRange().min()) + ", "
4306 + std::to_string(validRange().max()) + "]" };
4307 }
4308
4309 std::optional<double> m_opt;
4310
4311 friend struct DataModel::Detail::Befriend<Strength>;
4312 };
4313
4314 using Descendants = std::tuple<
4317
4320
4333#ifndef NO_DOC
4334 template<
4335 typename... Args,
4336 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4337 typename std::enable_if<
4338 Zivid::Detail::TypeTraits::
4339 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4340 int>::type = 0>
4341#else
4342 template<typename... Args>
4343#endif
4344 explicit Correction(Args &&...args)
4345 {
4346 using namespace Zivid::Detail::TypeTraits;
4347
4348 static_assert(
4349 AllArgsDecayedAreUnique<Args...>::value,
4350 "Found duplicate types among the arguments passed to Correction(...). "
4351 "Types should be listed at most once.");
4352
4353 set(std::forward<Args>(args)...);
4354 }
4355
4367#ifndef NO_DOC
4368 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4369#else
4370 template<typename... Args>
4371#endif
4372 void set(Args &&...args)
4373 {
4374 using namespace Zivid::Detail::TypeTraits;
4375
4376 using AllArgsAreDescendantNodes =
4377 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4378 static_assert(
4379 AllArgsAreDescendantNodes::value,
4380 "All arguments passed to set(...) must be descendant nodes.");
4381
4382 static_assert(
4383 AllArgsDecayedAreUnique<Args...>::value,
4384 "Found duplicate types among the arguments passed to set(...). "
4385 "Types should be listed at most once.");
4386
4387 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4388 }
4389
4402#ifndef NO_DOC
4403 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4404#else
4405 template<typename... Args>
4406#endif
4407 Correction copyWith(Args &&...args) const
4408 {
4409 using namespace Zivid::Detail::TypeTraits;
4410
4411 using AllArgsAreDescendantNodes =
4412 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4413 static_assert(
4414 AllArgsAreDescendantNodes::value,
4415 "All arguments passed to copyWith(...) must be descendant nodes.");
4416
4417 static_assert(
4418 AllArgsDecayedAreUnique<Args...>::value,
4419 "Found duplicate types among the arguments passed to copyWith(...). "
4420 "Types should be listed at most once.");
4421
4422 auto copy{ *this };
4423 copy.set(std::forward<Args>(args)...);
4424 return copy;
4425 }
4426
4428 const Enabled &isEnabled() const
4429 {
4430 return m_enabled;
4431 }
4432
4435 {
4436 return m_enabled;
4437 }
4438
4440 Correction &set(const Enabled &value)
4441 {
4442 m_enabled = value;
4443 return *this;
4444 }
4445
4447 const Strength &strength() const
4448 {
4449 return m_strength;
4450 }
4451
4454 {
4455 return m_strength;
4456 }
4457
4459 Correction &set(const Strength &value)
4460 {
4461 m_strength = value;
4462 return *this;
4463 }
4464
4465 template<
4466 typename T,
4467 typename std::enable_if<
4468 std::is_same<
4469 T,
4470 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4471 Enabled>::value,
4472 int>::type = 0>
4474 get() const
4475 {
4476 return m_enabled;
4477 }
4478
4479 template<
4480 typename T,
4481 typename std::enable_if<
4482 std::is_same<
4483 T,
4484 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4485 Strength>::value,
4486 int>::type = 0>
4487 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4488 Strength &
4489 get() const
4490 {
4491 return m_strength;
4492 }
4493
4494 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4496 get() const
4497 {
4498 return m_enabled;
4499 }
4500
4501 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4502 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4503 Strength &
4504 get() const
4505 {
4506 return m_strength;
4507 }
4508
4510 template<typename F>
4511 void forEach(const F &f) const
4512 {
4513 f(m_enabled);
4514 f(m_strength);
4515 }
4516
4518 template<typename F>
4519 void forEach(const F &f)
4520 {
4521 f(m_enabled);
4522 f(m_strength);
4523 }
4524
4526 bool operator==(const Correction &other) const;
4527
4529 bool operator!=(const Correction &other) const;
4530
4532 std::string toString() const;
4533
4535 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
4536 {
4537 return stream << value.toString();
4538 }
4539
4540 private:
4541 void setFromString(const std::string &value);
4542
4543 void setFromString(const std::string &fullPath, const std::string &value);
4544
4545 std::string getString(const std::string &fullPath) const;
4546
4547 Enabled m_enabled;
4548 Strength m_strength;
4549
4550 friend struct DataModel::Detail::Befriend<Correction>;
4551 };
4552
4554
4555 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4557 {
4558 public:
4560 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4561
4563 static constexpr const char *path{
4564 "Processing/Filters/Experimental/ContrastDistortion/Removal"
4565 };
4566
4568 static constexpr const char *name{ "Removal" };
4569
4571 static constexpr const char *description{
4572 R"description(Contrast distortion removal filter.)description"
4573 };
4574
4576
4577 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4579 {
4580 public:
4582 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4583
4585 static constexpr const char *path{
4586 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
4587 };
4588
4590 static constexpr const char *name{ "Enabled" };
4591
4593 static constexpr const char *description{
4594 R"description(Enable or disable contrast distortion removal.)description"
4595 };
4596
4598 using ValueType = bool;
4599 static const Enabled yes;
4600 static const Enabled no;
4601
4603 static std::set<bool> validValues()
4604 {
4605 return { false, true };
4606 }
4607
4609 Enabled() = default;
4610
4612 explicit constexpr Enabled(bool value)
4613 : m_opt{ value }
4614 {}
4615
4620 bool value() const;
4621
4623 bool hasValue() const;
4624
4626 void reset();
4627
4629 std::string toString() const;
4630
4632 bool operator==(const Enabled &other) const
4633 {
4634 return m_opt == other.m_opt;
4635 }
4636
4638 bool operator!=(const Enabled &other) const
4639 {
4640 return m_opt != other.m_opt;
4641 }
4642
4644 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4645 {
4646 return stream << value.toString();
4647 }
4648
4649 private:
4650 void setFromString(const std::string &value);
4651
4652 std::optional<bool> m_opt;
4653
4654 friend struct DataModel::Detail::Befriend<Enabled>;
4655 };
4656
4658
4659 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4661 {
4662 public:
4664 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4665
4667 static constexpr const char *path{
4668 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
4669 };
4670
4672 static constexpr const char *name{ "Threshold" };
4673
4675 static constexpr const char *description{
4676 R"description(Threshold for removal. Higher values remove more points.)description"
4677 };
4678
4680 using ValueType = double;
4681
4683 static constexpr Range<double> validRange()
4684 {
4685 return { 0.0, 1.0 };
4686 }
4687
4689 Threshold() = default;
4690
4692 explicit constexpr Threshold(double value)
4693 : m_opt{ verifyValue(value) }
4694 {}
4695
4700 double value() const;
4701
4703 bool hasValue() const;
4704
4706 void reset();
4707
4709 std::string toString() const;
4710
4712 bool operator==(const Threshold &other) const
4713 {
4714 return m_opt == other.m_opt;
4715 }
4716
4718 bool operator!=(const Threshold &other) const
4719 {
4720 return m_opt != other.m_opt;
4721 }
4722
4724 bool operator<(const Threshold &other) const
4725 {
4726 return m_opt < other.m_opt;
4727 }
4728
4730 bool operator>(const Threshold &other) const
4731 {
4732 return m_opt > other.m_opt;
4733 }
4734
4736 bool operator<=(const Threshold &other) const
4737 {
4738 return m_opt <= other.m_opt;
4739 }
4740
4742 bool operator>=(const Threshold &other) const
4743 {
4744 return m_opt >= other.m_opt;
4745 }
4746
4748 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4749 {
4750 return stream << value.toString();
4751 }
4752
4753 private:
4754 void setFromString(const std::string &value);
4755
4756 constexpr ValueType static verifyValue(const ValueType &value)
4757 {
4758 return validRange().isInRange(value)
4759 ? value
4760 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4761 + " } is not in range ["
4762 + std::to_string(validRange().min()) + ", "
4763 + std::to_string(validRange().max()) + "]" };
4764 }
4765
4766 std::optional<double> m_opt;
4767
4768 friend struct DataModel::Detail::Befriend<Threshold>;
4769 };
4770
4771 using Descendants = std::tuple<
4774
4777
4790#ifndef NO_DOC
4791 template<
4792 typename... Args,
4793 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4794 typename std::enable_if<
4795 Zivid::Detail::TypeTraits::
4796 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4797 int>::type = 0>
4798#else
4799 template<typename... Args>
4800#endif
4801 explicit Removal(Args &&...args)
4802 {
4803 using namespace Zivid::Detail::TypeTraits;
4804
4805 static_assert(
4806 AllArgsDecayedAreUnique<Args...>::value,
4807 "Found duplicate types among the arguments passed to Removal(...). "
4808 "Types should be listed at most once.");
4809
4810 set(std::forward<Args>(args)...);
4811 }
4812
4824#ifndef NO_DOC
4825 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4826#else
4827 template<typename... Args>
4828#endif
4829 void set(Args &&...args)
4830 {
4831 using namespace Zivid::Detail::TypeTraits;
4832
4833 using AllArgsAreDescendantNodes =
4834 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4835 static_assert(
4836 AllArgsAreDescendantNodes::value,
4837 "All arguments passed to set(...) must be descendant nodes.");
4838
4839 static_assert(
4840 AllArgsDecayedAreUnique<Args...>::value,
4841 "Found duplicate types among the arguments passed to set(...). "
4842 "Types should be listed at most once.");
4843
4844 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4845 }
4846
4859#ifndef NO_DOC
4860 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4861#else
4862 template<typename... Args>
4863#endif
4864 Removal copyWith(Args &&...args) const
4865 {
4866 using namespace Zivid::Detail::TypeTraits;
4867
4868 using AllArgsAreDescendantNodes =
4869 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4870 static_assert(
4871 AllArgsAreDescendantNodes::value,
4872 "All arguments passed to copyWith(...) must be descendant nodes.");
4873
4874 static_assert(
4875 AllArgsDecayedAreUnique<Args...>::value,
4876 "Found duplicate types among the arguments passed to copyWith(...). "
4877 "Types should be listed at most once.");
4878
4879 auto copy{ *this };
4880 copy.set(std::forward<Args>(args)...);
4881 return copy;
4882 }
4883
4885 const Enabled &isEnabled() const
4886 {
4887 return m_enabled;
4888 }
4889
4892 {
4893 return m_enabled;
4894 }
4895
4897 Removal &set(const Enabled &value)
4898 {
4899 m_enabled = value;
4900 return *this;
4901 }
4902
4904 const Threshold &threshold() const
4905 {
4906 return m_threshold;
4907 }
4908
4911 {
4912 return m_threshold;
4913 }
4914
4916 Removal &set(const Threshold &value)
4917 {
4918 m_threshold = value;
4919 return *this;
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 Enabled>::value,
4929 int>::type = 0>
4931 get() const
4932 {
4933 return m_enabled;
4934 }
4935
4936 template<
4937 typename T,
4938 typename std::enable_if<
4939 std::is_same<
4940 T,
4941 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4942 Threshold>::value,
4943 int>::type = 0>
4945 get() const
4946 {
4947 return m_threshold;
4948 }
4949
4950 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4952 get() const
4953 {
4954 return m_enabled;
4955 }
4956
4957 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4959 get() const
4960 {
4961 return m_threshold;
4962 }
4963
4965 template<typename F>
4966 void forEach(const F &f) const
4967 {
4968 f(m_enabled);
4969 f(m_threshold);
4970 }
4971
4973 template<typename F>
4974 void forEach(const F &f)
4975 {
4976 f(m_enabled);
4977 f(m_threshold);
4978 }
4979
4981 bool operator==(const Removal &other) const;
4982
4984 bool operator!=(const Removal &other) const;
4985
4987 std::string toString() const;
4988
4990 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4991 {
4992 return stream << value.toString();
4993 }
4994
4995 private:
4996 void setFromString(const std::string &value);
4997
4998 void setFromString(const std::string &fullPath, const std::string &value);
4999
5000 std::string getString(const std::string &fullPath) const;
5001
5002 Enabled m_enabled;
5003 Threshold m_threshold;
5004
5005 friend struct DataModel::Detail::Befriend<Removal>;
5006 };
5007
5008 using Descendants = std::tuple<
5015
5018
5035#ifndef NO_DOC
5036 template<
5037 typename... Args,
5038 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5039 typename std::enable_if<
5040 Zivid::Detail::TypeTraits::
5041 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5042 int>::type = 0>
5043#else
5044 template<typename... Args>
5045#endif
5046 explicit ContrastDistortion(Args &&...args)
5047 {
5048 using namespace Zivid::Detail::TypeTraits;
5049
5050 static_assert(
5051 AllArgsDecayedAreUnique<Args...>::value,
5052 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
5053 "Types should be listed at most once.");
5054
5055 set(std::forward<Args>(args)...);
5056 }
5057
5073#ifndef NO_DOC
5074 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5075#else
5076 template<typename... Args>
5077#endif
5078 void set(Args &&...args)
5079 {
5080 using namespace Zivid::Detail::TypeTraits;
5081
5082 using AllArgsAreDescendantNodes =
5083 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5084 static_assert(
5085 AllArgsAreDescendantNodes::value,
5086 "All arguments passed to set(...) must be descendant nodes.");
5087
5088 static_assert(
5089 AllArgsDecayedAreUnique<Args...>::value,
5090 "Found duplicate types among the arguments passed to set(...). "
5091 "Types should be listed at most once.");
5092
5093 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5094 }
5095
5112#ifndef NO_DOC
5113 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5114#else
5115 template<typename... Args>
5116#endif
5117 ContrastDistortion copyWith(Args &&...args) const
5118 {
5119 using namespace Zivid::Detail::TypeTraits;
5120
5121 using AllArgsAreDescendantNodes =
5122 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5123 static_assert(
5124 AllArgsAreDescendantNodes::value,
5125 "All arguments passed to copyWith(...) must be descendant nodes.");
5126
5127 static_assert(
5128 AllArgsDecayedAreUnique<Args...>::value,
5129 "Found duplicate types among the arguments passed to copyWith(...). "
5130 "Types should be listed at most once.");
5131
5132 auto copy{ *this };
5133 copy.set(std::forward<Args>(args)...);
5134 return copy;
5135 }
5136
5138 const Correction &correction() const
5139 {
5140 return m_correction;
5141 }
5142
5145 {
5146 return m_correction;
5147 }
5148
5151 {
5152 m_correction = value;
5153 return *this;
5154 }
5155
5158 {
5159 m_correction.set(value);
5160 return *this;
5161 }
5162
5165 {
5166 m_correction.set(value);
5167 return *this;
5168 }
5169
5171 const Removal &removal() const
5172 {
5173 return m_removal;
5174 }
5175
5178 {
5179 return m_removal;
5180 }
5181
5184 {
5185 m_removal = value;
5186 return *this;
5187 }
5188
5191 {
5192 m_removal.set(value);
5193 return *this;
5194 }
5195
5198 {
5199 m_removal.set(value);
5200 return *this;
5201 }
5202
5203 template<
5204 typename T,
5205 typename std::enable_if<
5206 std::is_same<
5207 T,
5209 int>::type = 0>
5211 {
5212 return m_correction;
5213 }
5214
5215 template<
5216 typename T,
5217 typename std::enable_if<
5218 std::is_same<
5219 T,
5220 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5221 Enabled>::value,
5222 int>::type = 0>
5224 get() const
5225 {
5226 return m_correction.get<
5228 }
5229
5230 template<
5231 typename T,
5232 typename std::enable_if<
5233 std::is_same<
5234 T,
5235 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5236 Strength>::value,
5237 int>::type = 0>
5239 get() const
5240 {
5241 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
5242 Correction::Strength>();
5243 }
5244
5245 template<
5246 typename T,
5247 typename std::enable_if<
5248 std::is_same<
5249 T,
5251 int>::type = 0>
5253 {
5254 return m_removal;
5255 }
5256
5257 template<
5258 typename T,
5259 typename std::enable_if<
5260 std::is_same<
5261 T,
5263 value,
5264 int>::type = 0>
5266 const
5267 {
5268 return m_removal.get<
5270 }
5271
5272 template<
5273 typename T,
5274 typename std::enable_if<
5275 std::is_same<
5276 T,
5277 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
5278 Threshold>::value,
5279 int>::type = 0>
5281 const
5282 {
5283 return m_removal.get<
5285 }
5286
5287 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5289 {
5290 return m_correction;
5291 }
5292
5293 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5295 {
5296 return m_removal;
5297 }
5298
5300 template<typename F>
5301 void forEach(const F &f) const
5302 {
5303 f(m_correction);
5304 f(m_removal);
5305 }
5306
5308 template<typename F>
5309 void forEach(const F &f)
5310 {
5311 f(m_correction);
5312 f(m_removal);
5313 }
5314
5316 bool operator==(const ContrastDistortion &other) const;
5317
5319 bool operator!=(const ContrastDistortion &other) const;
5320
5322 std::string toString() const;
5323
5325 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
5326 {
5327 return stream << value.toString();
5328 }
5329
5330 private:
5331 void setFromString(const std::string &value);
5332
5333 void setFromString(const std::string &fullPath, const std::string &value);
5334
5335 std::string getString(const std::string &fullPath) const;
5336
5337 Correction m_correction;
5338 Removal m_removal;
5339
5340 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
5341 };
5342
5343 using Descendants = std::tuple<
5351
5354
5372#ifndef NO_DOC
5373 template<
5374 typename... Args,
5375 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5376 typename std::enable_if<
5377 Zivid::Detail::TypeTraits::
5378 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5379 int>::type = 0>
5380#else
5381 template<typename... Args>
5382#endif
5383 explicit Experimental(Args &&...args)
5384 {
5385 using namespace Zivid::Detail::TypeTraits;
5386
5387 static_assert(
5388 AllArgsDecayedAreUnique<Args...>::value,
5389 "Found duplicate types among the arguments passed to Experimental(...). "
5390 "Types should be listed at most once.");
5391
5392 set(std::forward<Args>(args)...);
5393 }
5394
5411#ifndef NO_DOC
5412 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5413#else
5414 template<typename... Args>
5415#endif
5416 void set(Args &&...args)
5417 {
5418 using namespace Zivid::Detail::TypeTraits;
5419
5420 using AllArgsAreDescendantNodes =
5421 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5422 static_assert(
5423 AllArgsAreDescendantNodes::value,
5424 "All arguments passed to set(...) must be descendant nodes.");
5425
5426 static_assert(
5427 AllArgsDecayedAreUnique<Args...>::value,
5428 "Found duplicate types among the arguments passed to set(...). "
5429 "Types should be listed at most once.");
5430
5431 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5432 }
5433
5451#ifndef NO_DOC
5452 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5453#else
5454 template<typename... Args>
5455#endif
5456 Experimental copyWith(Args &&...args) const
5457 {
5458 using namespace Zivid::Detail::TypeTraits;
5459
5460 using AllArgsAreDescendantNodes =
5461 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5462 static_assert(
5463 AllArgsAreDescendantNodes::value,
5464 "All arguments passed to copyWith(...) must be descendant nodes.");
5465
5466 static_assert(
5467 AllArgsDecayedAreUnique<Args...>::value,
5468 "Found duplicate types among the arguments passed to copyWith(...). "
5469 "Types should be listed at most once.");
5470
5471 auto copy{ *this };
5472 copy.set(std::forward<Args>(args)...);
5473 return copy;
5474 }
5475
5478 {
5479 return m_contrastDistortion;
5480 }
5481
5484 {
5485 return m_contrastDistortion;
5486 }
5487
5490 {
5491 m_contrastDistortion = value;
5492 return *this;
5493 }
5494
5497 {
5498 m_contrastDistortion.set(value);
5499 return *this;
5500 }
5501
5504 {
5505 m_contrastDistortion.set(value);
5506 return *this;
5507 }
5508
5511 {
5512 m_contrastDistortion.set(value);
5513 return *this;
5514 }
5515
5518 {
5519 m_contrastDistortion.set(value);
5520 return *this;
5521 }
5522
5525 {
5526 m_contrastDistortion.set(value);
5527 return *this;
5528 }
5529
5532 {
5533 m_contrastDistortion.set(value);
5534 return *this;
5535 }
5536
5537 template<
5538 typename T,
5539 typename std::enable_if<
5540 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
5541 int>::type = 0>
5543 {
5544 return m_contrastDistortion;
5545 }
5546
5547 template<
5548 typename T,
5549 typename std::enable_if<
5550 std::is_same<
5551 T,
5553 int>::type = 0>
5555 {
5556 return m_contrastDistortion
5558 }
5559
5560 template<
5561 typename T,
5562 typename std::enable_if<
5563 std::is_same<
5564 T,
5566 value,
5567 int>::type = 0>
5569 const
5570 {
5571 return m_contrastDistortion.get<
5573 }
5574
5575 template<
5576 typename T,
5577 typename std::enable_if<
5578 std::is_same<
5579 T,
5581 value,
5582 int>::type = 0>
5584 const
5585 {
5586 return m_contrastDistortion.get<
5588 }
5589
5590 template<
5591 typename T,
5592 typename std::enable_if<
5593 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
5594 value,
5595 int>::type = 0>
5597 {
5598 return m_contrastDistortion
5600 }
5601
5602 template<
5603 typename T,
5604 typename std::enable_if<
5605 std::is_same<
5606 T,
5608 value,
5609 int>::type = 0>
5611 {
5612 return m_contrastDistortion
5614 }
5615
5616 template<
5617 typename T,
5618 typename std::enable_if<
5619 std::is_same<
5620 T,
5622 value,
5623 int>::type = 0>
5625 const
5626 {
5627 return m_contrastDistortion
5629 }
5630
5631 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5633 {
5634 return m_contrastDistortion;
5635 }
5636
5638 template<typename F>
5639 void forEach(const F &f) const
5640 {
5641 f(m_contrastDistortion);
5642 }
5643
5645 template<typename F>
5646 void forEach(const F &f)
5647 {
5648 f(m_contrastDistortion);
5649 }
5650
5652 bool operator==(const Experimental &other) const;
5653
5655 bool operator!=(const Experimental &other) const;
5656
5658 std::string toString() const;
5659
5661 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
5662 {
5663 return stream << value.toString();
5664 }
5665
5666 private:
5667 void setFromString(const std::string &value);
5668
5669 void setFromString(const std::string &fullPath, const std::string &value);
5670
5671 std::string getString(const std::string &fullPath) const;
5672
5673 ContrastDistortion m_contrastDistortion;
5674
5675 friend struct DataModel::Detail::Befriend<Experimental>;
5676 };
5677
5679
5680 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5682 {
5683 public:
5685 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5686
5688 static constexpr const char *path{ "Processing/Filters/Hole" };
5689
5691 static constexpr const char *name{ "Hole" };
5692
5694 static constexpr const char *description{
5695 R"description(Contains filters that can be used to deal with holes in the point cloud.)description"
5696 };
5697
5700
5701 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5703 {
5704 public:
5706 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5707
5709 static constexpr const char *path{ "Processing/Filters/Hole/Repair" };
5710
5712 static constexpr const char *name{ "Repair" };
5713
5715 static constexpr const char *description{
5716 R"description(Fills in point cloud holes by interpolating remaining surrounding points.
5717)description"
5718 };
5719
5721
5722 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5724 {
5725 public:
5727 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5728
5730 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Enabled" };
5731
5733 static constexpr const char *name{ "Enabled" };
5734
5736 static constexpr const char *description{
5737 R"description(Enable or disable hole repair.)description"
5738 };
5739
5741 using ValueType = bool;
5742 static const Enabled yes;
5743 static const Enabled no;
5744
5746 static std::set<bool> validValues()
5747 {
5748 return { false, true };
5749 }
5750
5752 Enabled() = default;
5753
5755 explicit constexpr Enabled(bool value)
5756 : m_opt{ value }
5757 {}
5758
5763 bool value() const;
5764
5766 bool hasValue() const;
5767
5769 void reset();
5770
5772 std::string toString() const;
5773
5775 bool operator==(const Enabled &other) const
5776 {
5777 return m_opt == other.m_opt;
5778 }
5779
5781 bool operator!=(const Enabled &other) const
5782 {
5783 return m_opt != other.m_opt;
5784 }
5785
5787 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5788 {
5789 return stream << value.toString();
5790 }
5791
5792 private:
5793 void setFromString(const std::string &value);
5794
5795 std::optional<bool> m_opt;
5796
5797 friend struct DataModel::Detail::Befriend<Enabled>;
5798 };
5799
5804
5805 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5807 {
5808 public:
5810 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5811
5813 static constexpr const char *path{ "Processing/Filters/Hole/Repair/HoleSize" };
5814
5816 static constexpr const char *name{ "HoleSize" };
5817
5819 static constexpr const char *description{
5820 R"description(Relative diameter of holes to fill. Increasing this will fill more points, but require more
5821computation time. The maximum allowed hole size scales with distance, so that we allow
5822filling larger holes at greater distances, measured in mm.
5823)description"
5824 };
5825
5827 using ValueType = double;
5828
5830 static constexpr Range<double> validRange()
5831 {
5832 return { 0.0, 1.0 };
5833 }
5834
5836 HoleSize() = default;
5837
5839 explicit constexpr HoleSize(double value)
5840 : m_opt{ verifyValue(value) }
5841 {}
5842
5847 double value() const;
5848
5850 bool hasValue() const;
5851
5853 void reset();
5854
5856 std::string toString() const;
5857
5859 bool operator==(const HoleSize &other) const
5860 {
5861 return m_opt == other.m_opt;
5862 }
5863
5865 bool operator!=(const HoleSize &other) const
5866 {
5867 return m_opt != other.m_opt;
5868 }
5869
5871 bool operator<(const HoleSize &other) const
5872 {
5873 return m_opt < other.m_opt;
5874 }
5875
5877 bool operator>(const HoleSize &other) const
5878 {
5879 return m_opt > other.m_opt;
5880 }
5881
5883 bool operator<=(const HoleSize &other) const
5884 {
5885 return m_opt <= other.m_opt;
5886 }
5887
5889 bool operator>=(const HoleSize &other) const
5890 {
5891 return m_opt >= other.m_opt;
5892 }
5893
5895 friend std::ostream &operator<<(std::ostream &stream, const HoleSize &value)
5896 {
5897 return stream << value.toString();
5898 }
5899
5900 private:
5901 void setFromString(const std::string &value);
5902
5903 constexpr ValueType static verifyValue(const ValueType &value)
5904 {
5905 return validRange().isInRange(value)
5906 ? value
5907 : throw std::out_of_range{ "HoleSize{ " + std::to_string(value)
5908 + " } is not in range ["
5909 + std::to_string(validRange().min()) + ", "
5910 + std::to_string(validRange().max()) + "]" };
5911 }
5912
5913 std::optional<double> m_opt;
5914
5915 friend struct DataModel::Detail::Befriend<HoleSize>;
5916 };
5917
5923
5924 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5926 {
5927 public:
5929 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5930
5932 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Strictness" };
5933
5935 static constexpr const char *name{ "Strictness" };
5936
5938 static constexpr const char *description{
5939 R"description(Level of strictness when considering if a point should be filled. A higher level of
5940strictness requires a missing point to be surrounded by valid points on more sides in
5941order to be filled. Increasing this will fill fewer points, but it will be less likely to
5942fill gaps that are not circular, for example between two edges.
5943)description"
5944 };
5945
5947 using ValueType = int32_t;
5948
5950 static constexpr Range<int32_t> validRange()
5951 {
5952 return { 1, 4 };
5953 }
5954
5956 Strictness() = default;
5957
5959 explicit constexpr Strictness(int32_t value)
5960 : m_opt{ verifyValue(value) }
5961 {}
5962
5967 int32_t value() const;
5968
5970 bool hasValue() const;
5971
5973 void reset();
5974
5976 std::string toString() const;
5977
5979 bool operator==(const Strictness &other) const
5980 {
5981 return m_opt == other.m_opt;
5982 }
5983
5985 bool operator!=(const Strictness &other) const
5986 {
5987 return m_opt != other.m_opt;
5988 }
5989
5991 bool operator<(const Strictness &other) const
5992 {
5993 return m_opt < other.m_opt;
5994 }
5995
5997 bool operator>(const Strictness &other) const
5998 {
5999 return m_opt > other.m_opt;
6000 }
6001
6003 bool operator<=(const Strictness &other) const
6004 {
6005 return m_opt <= other.m_opt;
6006 }
6007
6009 bool operator>=(const Strictness &other) const
6010 {
6011 return m_opt >= other.m_opt;
6012 }
6013
6015 friend std::ostream &operator<<(std::ostream &stream, const Strictness &value)
6016 {
6017 return stream << value.toString();
6018 }
6019
6020 private:
6021 void setFromString(const std::string &value);
6022
6023 constexpr ValueType static verifyValue(const ValueType &value)
6024 {
6025 return validRange().isInRange(value)
6026 ? value
6027 : throw std::out_of_range{ "Strictness{ " + std::to_string(value)
6028 + " } is not in range ["
6029 + std::to_string(validRange().min()) + ", "
6030 + std::to_string(validRange().max()) + "]" };
6031 }
6032
6033 std::optional<int32_t> m_opt;
6034
6035 friend struct DataModel::Detail::Befriend<Strictness>;
6036 };
6037
6038 using Descendants = std::tuple<
6042
6045
6059#ifndef NO_DOC
6060 template<
6061 typename... Args,
6062 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6063 typename std::enable_if<
6064 Zivid::Detail::TypeTraits::
6065 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6066 int>::type = 0>
6067#else
6068 template<typename... Args>
6069#endif
6070 explicit Repair(Args &&...args)
6071 {
6072 using namespace Zivid::Detail::TypeTraits;
6073
6074 static_assert(
6075 AllArgsDecayedAreUnique<Args...>::value,
6076 "Found duplicate types among the arguments passed to Repair(...). "
6077 "Types should be listed at most once.");
6078
6079 set(std::forward<Args>(args)...);
6080 }
6081
6094#ifndef NO_DOC
6095 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6096#else
6097 template<typename... Args>
6098#endif
6099 void set(Args &&...args)
6100 {
6101 using namespace Zivid::Detail::TypeTraits;
6102
6103 using AllArgsAreDescendantNodes =
6104 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6105 static_assert(
6106 AllArgsAreDescendantNodes::value,
6107 "All arguments passed to set(...) must be descendant nodes.");
6108
6109 static_assert(
6110 AllArgsDecayedAreUnique<Args...>::value,
6111 "Found duplicate types among the arguments passed to set(...). "
6112 "Types should be listed at most once.");
6113
6114 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6115 }
6116
6130#ifndef NO_DOC
6131 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6132#else
6133 template<typename... Args>
6134#endif
6135 Repair copyWith(Args &&...args) const
6136 {
6137 using namespace Zivid::Detail::TypeTraits;
6138
6139 using AllArgsAreDescendantNodes =
6140 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6141 static_assert(
6142 AllArgsAreDescendantNodes::value,
6143 "All arguments passed to copyWith(...) must be descendant nodes.");
6144
6145 static_assert(
6146 AllArgsDecayedAreUnique<Args...>::value,
6147 "Found duplicate types among the arguments passed to copyWith(...). "
6148 "Types should be listed at most once.");
6149
6150 auto copy{ *this };
6151 copy.set(std::forward<Args>(args)...);
6152 return copy;
6153 }
6154
6156 const Enabled &isEnabled() const
6157 {
6158 return m_enabled;
6159 }
6160
6163 {
6164 return m_enabled;
6165 }
6166
6168 Repair &set(const Enabled &value)
6169 {
6170 m_enabled = value;
6171 return *this;
6172 }
6173
6175 const HoleSize &holeSize() const
6176 {
6177 return m_holeSize;
6178 }
6179
6182 {
6183 return m_holeSize;
6184 }
6185
6187 Repair &set(const HoleSize &value)
6188 {
6189 m_holeSize = value;
6190 return *this;
6191 }
6192
6194 const Strictness &strictness() const
6195 {
6196 return m_strictness;
6197 }
6198
6201 {
6202 return m_strictness;
6203 }
6204
6206 Repair &set(const Strictness &value)
6207 {
6208 m_strictness = value;
6209 return *this;
6210 }
6211
6212 template<
6213 typename T,
6214 typename std::enable_if<
6215 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6216 int>::type = 0>
6218 {
6219 return m_enabled;
6220 }
6221
6222 template<
6223 typename T,
6224 typename std::enable_if<
6225 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6226 int>::type = 0>
6228 {
6229 return m_holeSize;
6230 }
6231
6232 template<
6233 typename T,
6234 typename std::enable_if<
6235 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6236 int>::type = 0>
6238 {
6239 return m_strictness;
6240 }
6241
6242 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6244 {
6245 return m_enabled;
6246 }
6247
6248 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6250 {
6251 return m_holeSize;
6252 }
6253
6254 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
6256 {
6257 return m_strictness;
6258 }
6259
6261 template<typename F>
6262 void forEach(const F &f) const
6263 {
6264 f(m_enabled);
6265 f(m_holeSize);
6266 f(m_strictness);
6267 }
6268
6270 template<typename F>
6271 void forEach(const F &f)
6272 {
6273 f(m_enabled);
6274 f(m_holeSize);
6275 f(m_strictness);
6276 }
6277
6279 bool operator==(const Repair &other) const;
6280
6282 bool operator!=(const Repair &other) const;
6283
6285 std::string toString() const;
6286
6288 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
6289 {
6290 return stream << value.toString();
6291 }
6292
6293 private:
6294 void setFromString(const std::string &value);
6295
6296 void setFromString(const std::string &fullPath, const std::string &value);
6297
6298 std::string getString(const std::string &fullPath) const;
6299
6300 Enabled m_enabled;
6301 HoleSize m_holeSize;
6302 Strictness m_strictness;
6303
6304 friend struct DataModel::Detail::Befriend<Repair>;
6305 };
6306
6307 using Descendants = std::tuple<
6312
6315
6330#ifndef NO_DOC
6331 template<
6332 typename... Args,
6333 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6334 typename std::enable_if<
6335 Zivid::Detail::TypeTraits::
6336 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6337 int>::type = 0>
6338#else
6339 template<typename... Args>
6340#endif
6341 explicit Hole(Args &&...args)
6342 {
6343 using namespace Zivid::Detail::TypeTraits;
6344
6345 static_assert(
6346 AllArgsDecayedAreUnique<Args...>::value,
6347 "Found duplicate types among the arguments passed to Hole(...). "
6348 "Types should be listed at most once.");
6349
6350 set(std::forward<Args>(args)...);
6351 }
6352
6366#ifndef NO_DOC
6367 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6368#else
6369 template<typename... Args>
6370#endif
6371 void set(Args &&...args)
6372 {
6373 using namespace Zivid::Detail::TypeTraits;
6374
6375 using AllArgsAreDescendantNodes =
6376 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6377 static_assert(
6378 AllArgsAreDescendantNodes::value,
6379 "All arguments passed to set(...) must be descendant nodes.");
6380
6381 static_assert(
6382 AllArgsDecayedAreUnique<Args...>::value,
6383 "Found duplicate types among the arguments passed to set(...). "
6384 "Types should be listed at most once.");
6385
6386 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6387 }
6388
6403#ifndef NO_DOC
6404 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6405#else
6406 template<typename... Args>
6407#endif
6408 Hole copyWith(Args &&...args) const
6409 {
6410 using namespace Zivid::Detail::TypeTraits;
6411
6412 using AllArgsAreDescendantNodes =
6413 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6414 static_assert(
6415 AllArgsAreDescendantNodes::value,
6416 "All arguments passed to copyWith(...) must be descendant nodes.");
6417
6418 static_assert(
6419 AllArgsDecayedAreUnique<Args...>::value,
6420 "Found duplicate types among the arguments passed to copyWith(...). "
6421 "Types should be listed at most once.");
6422
6423 auto copy{ *this };
6424 copy.set(std::forward<Args>(args)...);
6425 return copy;
6426 }
6427
6429 const Repair &repair() const
6430 {
6431 return m_repair;
6432 }
6433
6436 {
6437 return m_repair;
6438 }
6439
6441 Hole &set(const Repair &value)
6442 {
6443 m_repair = value;
6444 return *this;
6445 }
6446
6448 Hole &set(const Repair::Enabled &value)
6449 {
6450 m_repair.set(value);
6451 return *this;
6452 }
6453
6456 {
6457 m_repair.set(value);
6458 return *this;
6459 }
6460
6463 {
6464 m_repair.set(value);
6465 return *this;
6466 }
6467
6468 template<
6469 typename T,
6470 typename std::enable_if<
6471 std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value,
6472 int>::type = 0>
6474 {
6475 return m_repair;
6476 }
6477
6478 template<
6479 typename T,
6480 typename std::enable_if<
6481 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6482 int>::type = 0>
6484 {
6486 }
6487
6488 template<
6489 typename T,
6490 typename std::enable_if<
6491 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6492 int>::type = 0>
6494 {
6496 }
6497
6498 template<
6499 typename T,
6500 typename std::enable_if<
6501 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6502 int>::type = 0>
6504 {
6506 }
6507
6508 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6510 {
6511 return m_repair;
6512 }
6513
6515 template<typename F>
6516 void forEach(const F &f) const
6517 {
6518 f(m_repair);
6519 }
6520
6522 template<typename F>
6523 void forEach(const F &f)
6524 {
6525 f(m_repair);
6526 }
6527
6529 bool operator==(const Hole &other) const;
6530
6532 bool operator!=(const Hole &other) const;
6533
6535 std::string toString() const;
6536
6538 friend std::ostream &operator<<(std::ostream &stream, const Hole &value)
6539 {
6540 return stream << value.toString();
6541 }
6542
6543 private:
6544 void setFromString(const std::string &value);
6545
6546 void setFromString(const std::string &fullPath, const std::string &value);
6547
6548 std::string getString(const std::string &fullPath) const;
6549
6550 Repair m_repair;
6551
6552 friend struct DataModel::Detail::Befriend<Hole>;
6553 };
6554
6556
6557 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6559 {
6560 public:
6562 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6563
6565 static constexpr const char *path{ "Processing/Filters/Noise" };
6566
6568 static constexpr const char *name{ "Noise" };
6569
6571 static constexpr const char *description{
6572 R"description(Contains filters that can be used to clean up a noisy point cloud.)description"
6573 };
6574
6576
6577 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6579 {
6580 public:
6582 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6583
6585 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
6586
6588 static constexpr const char *name{ "Removal" };
6589
6591 static constexpr const char *description{
6592 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold.)description"
6593 };
6594
6596
6597 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6599 {
6600 public:
6602 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6603
6605 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
6606
6608 static constexpr const char *name{ "Enabled" };
6609
6611 static constexpr const char *description{
6612 R"description(Enable or disable the SNR filter.)description"
6613 };
6614
6616 using ValueType = bool;
6617 static const Enabled yes;
6618 static const Enabled no;
6619
6621 static std::set<bool> validValues()
6622 {
6623 return { false, true };
6624 }
6625
6627 Enabled() = default;
6628
6630 explicit constexpr Enabled(bool value)
6631 : m_opt{ value }
6632 {}
6633
6638 bool value() const;
6639
6641 bool hasValue() const;
6642
6644 void reset();
6645
6647 std::string toString() const;
6648
6650 bool operator==(const Enabled &other) const
6651 {
6652 return m_opt == other.m_opt;
6653 }
6654
6656 bool operator!=(const Enabled &other) const
6657 {
6658 return m_opt != other.m_opt;
6659 }
6660
6662 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6663 {
6664 return stream << value.toString();
6665 }
6666
6667 private:
6668 void setFromString(const std::string &value);
6669
6670 std::optional<bool> m_opt;
6671
6672 friend struct DataModel::Detail::Befriend<Enabled>;
6673 };
6674
6676
6677 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6679 {
6680 public:
6682 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6683
6685 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
6686
6688 static constexpr const char *name{ "Threshold" };
6689
6691 static constexpr const char *description{
6692 R"description(Discard points with signal-to-noise ratio (SNR) below the given value.)description"
6693 };
6694
6696 using ValueType = double;
6697
6699 static constexpr Range<double> validRange()
6700 {
6701 return { 0.0, 100.0 };
6702 }
6703
6705 Threshold() = default;
6706
6708 explicit constexpr Threshold(double value)
6709 : m_opt{ verifyValue(value) }
6710 {}
6711
6716 double value() const;
6717
6719 bool hasValue() const;
6720
6722 void reset();
6723
6725 std::string toString() const;
6726
6728 bool operator==(const Threshold &other) const
6729 {
6730 return m_opt == other.m_opt;
6731 }
6732
6734 bool operator!=(const Threshold &other) const
6735 {
6736 return m_opt != other.m_opt;
6737 }
6738
6740 bool operator<(const Threshold &other) const
6741 {
6742 return m_opt < other.m_opt;
6743 }
6744
6746 bool operator>(const Threshold &other) const
6747 {
6748 return m_opt > other.m_opt;
6749 }
6750
6752 bool operator<=(const Threshold &other) const
6753 {
6754 return m_opt <= other.m_opt;
6755 }
6756
6758 bool operator>=(const Threshold &other) const
6759 {
6760 return m_opt >= other.m_opt;
6761 }
6762
6764 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
6765 {
6766 return stream << value.toString();
6767 }
6768
6769 private:
6770 void setFromString(const std::string &value);
6771
6772 constexpr ValueType static verifyValue(const ValueType &value)
6773 {
6774 return validRange().isInRange(value)
6775 ? value
6776 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
6777 + " } is not in range ["
6778 + std::to_string(validRange().min()) + ", "
6779 + std::to_string(validRange().max()) + "]" };
6780 }
6781
6782 std::optional<double> m_opt;
6783
6784 friend struct DataModel::Detail::Befriend<Threshold>;
6785 };
6786
6787 using Descendants = std::tuple<
6790
6793
6806#ifndef NO_DOC
6807 template<
6808 typename... Args,
6809 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6810 typename std::enable_if<
6811 Zivid::Detail::TypeTraits::
6812 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6813 int>::type = 0>
6814#else
6815 template<typename... Args>
6816#endif
6817 explicit Removal(Args &&...args)
6818 {
6819 using namespace Zivid::Detail::TypeTraits;
6820
6821 static_assert(
6822 AllArgsDecayedAreUnique<Args...>::value,
6823 "Found duplicate types among the arguments passed to Removal(...). "
6824 "Types should be listed at most once.");
6825
6826 set(std::forward<Args>(args)...);
6827 }
6828
6840#ifndef NO_DOC
6841 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6842#else
6843 template<typename... Args>
6844#endif
6845 void set(Args &&...args)
6846 {
6847 using namespace Zivid::Detail::TypeTraits;
6848
6849 using AllArgsAreDescendantNodes =
6850 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6851 static_assert(
6852 AllArgsAreDescendantNodes::value,
6853 "All arguments passed to set(...) must be descendant nodes.");
6854
6855 static_assert(
6856 AllArgsDecayedAreUnique<Args...>::value,
6857 "Found duplicate types among the arguments passed to set(...). "
6858 "Types should be listed at most once.");
6859
6860 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6861 }
6862
6875#ifndef NO_DOC
6876 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6877#else
6878 template<typename... Args>
6879#endif
6880 Removal copyWith(Args &&...args) const
6881 {
6882 using namespace Zivid::Detail::TypeTraits;
6883
6884 using AllArgsAreDescendantNodes =
6885 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6886 static_assert(
6887 AllArgsAreDescendantNodes::value,
6888 "All arguments passed to copyWith(...) must be descendant nodes.");
6889
6890 static_assert(
6891 AllArgsDecayedAreUnique<Args...>::value,
6892 "Found duplicate types among the arguments passed to copyWith(...). "
6893 "Types should be listed at most once.");
6894
6895 auto copy{ *this };
6896 copy.set(std::forward<Args>(args)...);
6897 return copy;
6898 }
6899
6901 const Enabled &isEnabled() const
6902 {
6903 return m_enabled;
6904 }
6905
6908 {
6909 return m_enabled;
6910 }
6911
6913 Removal &set(const Enabled &value)
6914 {
6915 m_enabled = value;
6916 return *this;
6917 }
6918
6920 const Threshold &threshold() const
6921 {
6922 return m_threshold;
6923 }
6924
6927 {
6928 return m_threshold;
6929 }
6930
6932 Removal &set(const Threshold &value)
6933 {
6934 m_threshold = value;
6935 return *this;
6936 }
6937
6938 template<
6939 typename T,
6940 typename std::enable_if<
6941 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
6942 int>::type = 0>
6944 {
6945 return m_enabled;
6946 }
6947
6948 template<
6949 typename T,
6950 typename std::enable_if<
6951 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
6952 int>::type = 0>
6954 {
6955 return m_threshold;
6956 }
6957
6958 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6960 {
6961 return m_enabled;
6962 }
6963
6964 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6966 {
6967 return m_threshold;
6968 }
6969
6971 template<typename F>
6972 void forEach(const F &f) const
6973 {
6974 f(m_enabled);
6975 f(m_threshold);
6976 }
6977
6979 template<typename F>
6980 void forEach(const F &f)
6981 {
6982 f(m_enabled);
6983 f(m_threshold);
6984 }
6985
6987 bool operator==(const Removal &other) const;
6988
6990 bool operator!=(const Removal &other) const;
6991
6993 std::string toString() const;
6994
6996 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6997 {
6998 return stream << value.toString();
6999 }
7000
7001 private:
7002 void setFromString(const std::string &value);
7003
7004 void setFromString(const std::string &fullPath, const std::string &value);
7005
7006 std::string getString(const std::string &fullPath) const;
7007
7008 Enabled m_enabled;
7009 Threshold m_threshold;
7010
7011 friend struct DataModel::Detail::Befriend<Removal>;
7012 };
7013
7018
7019 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7021 {
7022 public:
7024 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7025
7027 static constexpr const char *path{ "Processing/Filters/Noise/Repair" };
7028
7030 static constexpr const char *name{ "Repair" };
7031
7033 static constexpr const char *description{
7034 R"description(Get better surface coverage by repairing regions of missing data due to noisy points.
7035Consider disabling this filter if you require all points in your point cloud to be of
7036high confidence.
7037)description"
7038 };
7039
7041
7042 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7044 {
7045 public:
7047 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7048
7050 static constexpr const char *path{ "Processing/Filters/Noise/Repair/Enabled" };
7051
7053 static constexpr const char *name{ "Enabled" };
7054
7056 static constexpr const char *description{
7057 R"description(Enable or disable noise repair.)description"
7058 };
7059
7061 using ValueType = bool;
7062 static const Enabled yes;
7063 static const Enabled no;
7064
7066 static std::set<bool> validValues()
7067 {
7068 return { false, true };
7069 }
7070
7072 Enabled() = default;
7073
7075 explicit constexpr Enabled(bool value)
7076 : m_opt{ value }
7077 {}
7078
7083 bool value() const;
7084
7086 bool hasValue() const;
7087
7089 void reset();
7090
7092 std::string toString() const;
7093
7095 bool operator==(const Enabled &other) const
7096 {
7097 return m_opt == other.m_opt;
7098 }
7099
7101 bool operator!=(const Enabled &other) const
7102 {
7103 return m_opt != other.m_opt;
7104 }
7105
7107 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7108 {
7109 return stream << value.toString();
7110 }
7111
7112 private:
7113 void setFromString(const std::string &value);
7114
7115 std::optional<bool> m_opt;
7116
7117 friend struct DataModel::Detail::Befriend<Enabled>;
7118 };
7119
7120 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Repair::Enabled>;
7121
7124
7136#ifndef NO_DOC
7137 template<
7138 typename... Args,
7139 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7140 typename std::enable_if<
7141 Zivid::Detail::TypeTraits::
7142 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7143 int>::type = 0>
7144#else
7145 template<typename... Args>
7146#endif
7147 explicit Repair(Args &&...args)
7148 {
7149 using namespace Zivid::Detail::TypeTraits;
7150
7151 static_assert(
7152 AllArgsDecayedAreUnique<Args...>::value,
7153 "Found duplicate types among the arguments passed to Repair(...). "
7154 "Types should be listed at most once.");
7155
7156 set(std::forward<Args>(args)...);
7157 }
7158
7169#ifndef NO_DOC
7170 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7171#else
7172 template<typename... Args>
7173#endif
7174 void set(Args &&...args)
7175 {
7176 using namespace Zivid::Detail::TypeTraits;
7177
7178 using AllArgsAreDescendantNodes =
7179 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7180 static_assert(
7181 AllArgsAreDescendantNodes::value,
7182 "All arguments passed to set(...) must be descendant nodes.");
7183
7184 static_assert(
7185 AllArgsDecayedAreUnique<Args...>::value,
7186 "Found duplicate types among the arguments passed to set(...). "
7187 "Types should be listed at most once.");
7188
7189 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7190 }
7191
7203#ifndef NO_DOC
7204 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7205#else
7206 template<typename... Args>
7207#endif
7208 Repair copyWith(Args &&...args) const
7209 {
7210 using namespace Zivid::Detail::TypeTraits;
7211
7212 using AllArgsAreDescendantNodes =
7213 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7214 static_assert(
7215 AllArgsAreDescendantNodes::value,
7216 "All arguments passed to copyWith(...) must be descendant nodes.");
7217
7218 static_assert(
7219 AllArgsDecayedAreUnique<Args...>::value,
7220 "Found duplicate types among the arguments passed to copyWith(...). "
7221 "Types should be listed at most once.");
7222
7223 auto copy{ *this };
7224 copy.set(std::forward<Args>(args)...);
7225 return copy;
7226 }
7227
7229 const Enabled &isEnabled() const
7230 {
7231 return m_enabled;
7232 }
7233
7236 {
7237 return m_enabled;
7238 }
7239
7241 Repair &set(const Enabled &value)
7242 {
7243 m_enabled = value;
7244 return *this;
7245 }
7246
7247 template<
7248 typename T,
7249 typename std::enable_if<
7250 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7251 int>::type = 0>
7253 {
7254 return m_enabled;
7255 }
7256
7257 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7259 {
7260 return m_enabled;
7261 }
7262
7264 template<typename F>
7265 void forEach(const F &f) const
7266 {
7267 f(m_enabled);
7268 }
7269
7271 template<typename F>
7272 void forEach(const F &f)
7273 {
7274 f(m_enabled);
7275 }
7276
7278 bool operator==(const Repair &other) const;
7279
7281 bool operator!=(const Repair &other) const;
7282
7284 std::string toString() const;
7285
7287 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
7288 {
7289 return stream << value.toString();
7290 }
7291
7292 private:
7293 void setFromString(const std::string &value);
7294
7295 void setFromString(const std::string &fullPath, const std::string &value);
7296
7297 std::string getString(const std::string &fullPath) const;
7298
7299 Enabled m_enabled;
7300
7301 friend struct DataModel::Detail::Befriend<Repair>;
7302 };
7303
7308
7309 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7311 {
7312 public:
7314 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7315
7317 static constexpr const char *path{ "Processing/Filters/Noise/Suppression" };
7318
7320 static constexpr const char *name{ "Suppression" };
7321
7323 static constexpr const char *description{
7324 R"description(Reduce noise and outliers in the point cloud. This filter can also be used to reduce
7325ripple effects caused by interreflections. Consider disabling this filter if you need to
7326distinguish very fine details and thus need to avoid any smoothing effects.
7327)description"
7328 };
7329
7331
7332 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7334 {
7335 public:
7337 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7338
7340 static constexpr const char *path{ "Processing/Filters/Noise/Suppression/Enabled" };
7341
7343 static constexpr const char *name{ "Enabled" };
7344
7346 static constexpr const char *description{
7347 R"description(Enable or disable noise suppression.)description"
7348 };
7349
7351 using ValueType = bool;
7352 static const Enabled yes;
7353 static const Enabled no;
7354
7356 static std::set<bool> validValues()
7357 {
7358 return { false, true };
7359 }
7360
7362 Enabled() = default;
7363
7365 explicit constexpr Enabled(bool value)
7366 : m_opt{ value }
7367 {}
7368
7373 bool value() const;
7374
7376 bool hasValue() const;
7377
7379 void reset();
7380
7382 std::string toString() const;
7383
7385 bool operator==(const Enabled &other) const
7386 {
7387 return m_opt == other.m_opt;
7388 }
7389
7391 bool operator!=(const Enabled &other) const
7392 {
7393 return m_opt != other.m_opt;
7394 }
7395
7397 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7398 {
7399 return stream << value.toString();
7400 }
7401
7402 private:
7403 void setFromString(const std::string &value);
7404
7405 std::optional<bool> m_opt;
7406
7407 friend struct DataModel::Detail::Befriend<Enabled>;
7408 };
7409
7410 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Suppression::Enabled>;
7411
7414
7426#ifndef NO_DOC
7427 template<
7428 typename... Args,
7429 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7430 typename std::enable_if<
7431 Zivid::Detail::TypeTraits::
7432 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7433 int>::type = 0>
7434#else
7435 template<typename... Args>
7436#endif
7437 explicit Suppression(Args &&...args)
7438 {
7439 using namespace Zivid::Detail::TypeTraits;
7440
7441 static_assert(
7442 AllArgsDecayedAreUnique<Args...>::value,
7443 "Found duplicate types among the arguments passed to Suppression(...). "
7444 "Types should be listed at most once.");
7445
7446 set(std::forward<Args>(args)...);
7447 }
7448
7459#ifndef NO_DOC
7460 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7461#else
7462 template<typename... Args>
7463#endif
7464 void set(Args &&...args)
7465 {
7466 using namespace Zivid::Detail::TypeTraits;
7467
7468 using AllArgsAreDescendantNodes =
7469 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7470 static_assert(
7471 AllArgsAreDescendantNodes::value,
7472 "All arguments passed to set(...) must be descendant nodes.");
7473
7474 static_assert(
7475 AllArgsDecayedAreUnique<Args...>::value,
7476 "Found duplicate types among the arguments passed to set(...). "
7477 "Types should be listed at most once.");
7478
7479 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7480 }
7481
7493#ifndef NO_DOC
7494 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7495#else
7496 template<typename... Args>
7497#endif
7498 Suppression copyWith(Args &&...args) const
7499 {
7500 using namespace Zivid::Detail::TypeTraits;
7501
7502 using AllArgsAreDescendantNodes =
7503 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7504 static_assert(
7505 AllArgsAreDescendantNodes::value,
7506 "All arguments passed to copyWith(...) must be descendant nodes.");
7507
7508 static_assert(
7509 AllArgsDecayedAreUnique<Args...>::value,
7510 "Found duplicate types among the arguments passed to copyWith(...). "
7511 "Types should be listed at most once.");
7512
7513 auto copy{ *this };
7514 copy.set(std::forward<Args>(args)...);
7515 return copy;
7516 }
7517
7519 const Enabled &isEnabled() const
7520 {
7521 return m_enabled;
7522 }
7523
7526 {
7527 return m_enabled;
7528 }
7529
7531 Suppression &set(const Enabled &value)
7532 {
7533 m_enabled = value;
7534 return *this;
7535 }
7536
7537 template<
7538 typename T,
7539 typename std::enable_if<
7540 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7541 int>::type = 0>
7543 {
7544 return m_enabled;
7545 }
7546
7547 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7549 {
7550 return m_enabled;
7551 }
7552
7554 template<typename F>
7555 void forEach(const F &f) const
7556 {
7557 f(m_enabled);
7558 }
7559
7561 template<typename F>
7562 void forEach(const F &f)
7563 {
7564 f(m_enabled);
7565 }
7566
7568 bool operator==(const Suppression &other) const;
7569
7571 bool operator!=(const Suppression &other) const;
7572
7574 std::string toString() const;
7575
7577 friend std::ostream &operator<<(std::ostream &stream, const Suppression &value)
7578 {
7579 return stream << value.toString();
7580 }
7581
7582 private:
7583 void setFromString(const std::string &value);
7584
7585 void setFromString(const std::string &fullPath, const std::string &value);
7586
7587 std::string getString(const std::string &fullPath) const;
7588
7589 Enabled m_enabled;
7590
7591 friend struct DataModel::Detail::Befriend<Suppression>;
7592 };
7593
7594 using Descendants = std::tuple<
7602
7605
7623#ifndef NO_DOC
7624 template<
7625 typename... Args,
7626 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7627 typename std::enable_if<
7628 Zivid::Detail::TypeTraits::
7629 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7630 int>::type = 0>
7631#else
7632 template<typename... Args>
7633#endif
7634 explicit Noise(Args &&...args)
7635 {
7636 using namespace Zivid::Detail::TypeTraits;
7637
7638 static_assert(
7639 AllArgsDecayedAreUnique<Args...>::value,
7640 "Found duplicate types among the arguments passed to Noise(...). "
7641 "Types should be listed at most once.");
7642
7643 set(std::forward<Args>(args)...);
7644 }
7645
7662#ifndef NO_DOC
7663 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7664#else
7665 template<typename... Args>
7666#endif
7667 void set(Args &&...args)
7668 {
7669 using namespace Zivid::Detail::TypeTraits;
7670
7671 using AllArgsAreDescendantNodes =
7672 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7673 static_assert(
7674 AllArgsAreDescendantNodes::value,
7675 "All arguments passed to set(...) must be descendant nodes.");
7676
7677 static_assert(
7678 AllArgsDecayedAreUnique<Args...>::value,
7679 "Found duplicate types among the arguments passed to set(...). "
7680 "Types should be listed at most once.");
7681
7682 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7683 }
7684
7702#ifndef NO_DOC
7703 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7704#else
7705 template<typename... Args>
7706#endif
7707 Noise copyWith(Args &&...args) const
7708 {
7709 using namespace Zivid::Detail::TypeTraits;
7710
7711 using AllArgsAreDescendantNodes =
7712 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7713 static_assert(
7714 AllArgsAreDescendantNodes::value,
7715 "All arguments passed to copyWith(...) must be descendant nodes.");
7716
7717 static_assert(
7718 AllArgsDecayedAreUnique<Args...>::value,
7719 "Found duplicate types among the arguments passed to copyWith(...). "
7720 "Types should be listed at most once.");
7721
7722 auto copy{ *this };
7723 copy.set(std::forward<Args>(args)...);
7724 return copy;
7725 }
7726
7728 const Removal &removal() const
7729 {
7730 return m_removal;
7731 }
7732
7735 {
7736 return m_removal;
7737 }
7738
7740 Noise &set(const Removal &value)
7741 {
7742 m_removal = value;
7743 return *this;
7744 }
7745
7748 {
7749 m_removal.set(value);
7750 return *this;
7751 }
7752
7755 {
7756 m_removal.set(value);
7757 return *this;
7758 }
7759
7761 const Repair &repair() const
7762 {
7763 return m_repair;
7764 }
7765
7768 {
7769 return m_repair;
7770 }
7771
7773 Noise &set(const Repair &value)
7774 {
7775 m_repair = value;
7776 return *this;
7777 }
7778
7781 {
7782 m_repair.set(value);
7783 return *this;
7784 }
7785
7788 {
7789 return m_suppression;
7790 }
7791
7794 {
7795 return m_suppression;
7796 }
7797
7799 Noise &set(const Suppression &value)
7800 {
7801 m_suppression = value;
7802 return *this;
7803 }
7804
7807 {
7808 m_suppression.set(value);
7809 return *this;
7810 }
7811
7812 template<
7813 typename T,
7814 typename std::enable_if<
7815 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7816 int>::type = 0>
7818 {
7819 return m_removal;
7820 }
7821
7822 template<
7823 typename T,
7824 typename std::enable_if<
7825 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7826 int>::type = 0>
7828 {
7830 }
7831
7832 template<
7833 typename T,
7834 typename std::enable_if<
7835 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7836 int>::type = 0>
7838 {
7840 }
7841
7842 template<
7843 typename T,
7844 typename std::enable_if<
7845 std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value,
7846 int>::type = 0>
7848 {
7849 return m_repair;
7850 }
7851
7852 template<
7853 typename T,
7854 typename std::enable_if<
7855 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7856 int>::type = 0>
7858 {
7860 }
7861
7862 template<
7863 typename T,
7864 typename std::enable_if<
7865 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
7866 int>::type = 0>
7868 {
7869 return m_suppression;
7870 }
7871
7872 template<
7873 typename T,
7874 typename std::enable_if<
7875 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7876 int>::type = 0>
7878 {
7880 }
7881
7882 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7884 {
7885 return m_removal;
7886 }
7887
7888 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7890 {
7891 return m_repair;
7892 }
7893
7894 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7896 {
7897 return m_suppression;
7898 }
7899
7901 template<typename F>
7902 void forEach(const F &f) const
7903 {
7904 f(m_removal);
7905 f(m_repair);
7906 f(m_suppression);
7907 }
7908
7910 template<typename F>
7911 void forEach(const F &f)
7912 {
7913 f(m_removal);
7914 f(m_repair);
7915 f(m_suppression);
7916 }
7917
7919 bool operator==(const Noise &other) const;
7920
7922 bool operator!=(const Noise &other) const;
7923
7925 std::string toString() const;
7926
7928 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
7929 {
7930 return stream << value.toString();
7931 }
7932
7933 private:
7934 void setFromString(const std::string &value);
7935
7936 void setFromString(const std::string &fullPath, const std::string &value);
7937
7938 std::string getString(const std::string &fullPath) const;
7939
7940 Removal m_removal;
7941 Repair m_repair;
7942 Suppression m_suppression;
7943
7944 friend struct DataModel::Detail::Befriend<Noise>;
7945 };
7946
7948
7949 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7951 {
7952 public:
7954 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7955
7957 static constexpr const char *path{ "Processing/Filters/Outlier" };
7958
7960 static constexpr const char *name{ "Outlier" };
7961
7963 static constexpr const char *description{
7964 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points.)description"
7965 };
7966
7968
7969 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7971 {
7972 public:
7974 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7975
7977 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
7978
7980 static constexpr const char *name{ "Removal" };
7981
7983 static constexpr const char *description{
7984 R"description(Discard point if Euclidean distance to neighboring points is above a threshold.)description"
7985 };
7986
7988
7989 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7991 {
7992 public:
7994 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7995
7997 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
7998
8000 static constexpr const char *name{ "Enabled" };
8001
8003 static constexpr const char *description{
8004 R"description(Enable or disable the outlier filter.)description"
8005 };
8006
8008 using ValueType = bool;
8009 static const Enabled yes;
8010 static const Enabled no;
8011
8013 static std::set<bool> validValues()
8014 {
8015 return { false, true };
8016 }
8017
8019 Enabled() = default;
8020
8022 explicit constexpr Enabled(bool value)
8023 : m_opt{ value }
8024 {}
8025
8030 bool value() const;
8031
8033 bool hasValue() const;
8034
8036 void reset();
8037
8039 std::string toString() const;
8040
8042 bool operator==(const Enabled &other) const
8043 {
8044 return m_opt == other.m_opt;
8045 }
8046
8048 bool operator!=(const Enabled &other) const
8049 {
8050 return m_opt != other.m_opt;
8051 }
8052
8054 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8055 {
8056 return stream << value.toString();
8057 }
8058
8059 private:
8060 void setFromString(const std::string &value);
8061
8062 std::optional<bool> m_opt;
8063
8064 friend struct DataModel::Detail::Befriend<Enabled>;
8065 };
8066
8068
8069 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8071 {
8072 public:
8074 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8075
8077 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
8078
8080 static constexpr const char *name{ "Threshold" };
8081
8083 static constexpr const char *description{
8084 R"description(Discard point if Euclidean distance to neighboring points is above the given value.)description"
8085 };
8086
8088 using ValueType = double;
8089
8091 static constexpr Range<double> validRange()
8092 {
8093 return { 0.0, 100.0 };
8094 }
8095
8097 Threshold() = default;
8098
8100 explicit constexpr Threshold(double value)
8101 : m_opt{ verifyValue(value) }
8102 {}
8103
8108 double value() const;
8109
8111 bool hasValue() const;
8112
8114 void reset();
8115
8117 std::string toString() const;
8118
8120 bool operator==(const Threshold &other) const
8121 {
8122 return m_opt == other.m_opt;
8123 }
8124
8126 bool operator!=(const Threshold &other) const
8127 {
8128 return m_opt != other.m_opt;
8129 }
8130
8132 bool operator<(const Threshold &other) const
8133 {
8134 return m_opt < other.m_opt;
8135 }
8136
8138 bool operator>(const Threshold &other) const
8139 {
8140 return m_opt > other.m_opt;
8141 }
8142
8144 bool operator<=(const Threshold &other) const
8145 {
8146 return m_opt <= other.m_opt;
8147 }
8148
8150 bool operator>=(const Threshold &other) const
8151 {
8152 return m_opt >= other.m_opt;
8153 }
8154
8156 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
8157 {
8158 return stream << value.toString();
8159 }
8160
8161 private:
8162 void setFromString(const std::string &value);
8163
8164 constexpr ValueType static verifyValue(const ValueType &value)
8165 {
8166 return validRange().isInRange(value)
8167 ? value
8168 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
8169 + " } is not in range ["
8170 + std::to_string(validRange().min()) + ", "
8171 + std::to_string(validRange().max()) + "]" };
8172 }
8173
8174 std::optional<double> m_opt;
8175
8176 friend struct DataModel::Detail::Befriend<Threshold>;
8177 };
8178
8179 using Descendants = std::tuple<
8182
8185
8198#ifndef NO_DOC
8199 template<
8200 typename... Args,
8201 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8202 typename std::enable_if<
8203 Zivid::Detail::TypeTraits::
8204 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8205 int>::type = 0>
8206#else
8207 template<typename... Args>
8208#endif
8209 explicit Removal(Args &&...args)
8210 {
8211 using namespace Zivid::Detail::TypeTraits;
8212
8213 static_assert(
8214 AllArgsDecayedAreUnique<Args...>::value,
8215 "Found duplicate types among the arguments passed to Removal(...). "
8216 "Types should be listed at most once.");
8217
8218 set(std::forward<Args>(args)...);
8219 }
8220
8232#ifndef NO_DOC
8233 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8234#else
8235 template<typename... Args>
8236#endif
8237 void set(Args &&...args)
8238 {
8239 using namespace Zivid::Detail::TypeTraits;
8240
8241 using AllArgsAreDescendantNodes =
8242 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8243 static_assert(
8244 AllArgsAreDescendantNodes::value,
8245 "All arguments passed to set(...) must be descendant nodes.");
8246
8247 static_assert(
8248 AllArgsDecayedAreUnique<Args...>::value,
8249 "Found duplicate types among the arguments passed to set(...). "
8250 "Types should be listed at most once.");
8251
8252 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8253 }
8254
8267#ifndef NO_DOC
8268 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8269#else
8270 template<typename... Args>
8271#endif
8272 Removal copyWith(Args &&...args) const
8273 {
8274 using namespace Zivid::Detail::TypeTraits;
8275
8276 using AllArgsAreDescendantNodes =
8277 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8278 static_assert(
8279 AllArgsAreDescendantNodes::value,
8280 "All arguments passed to copyWith(...) must be descendant nodes.");
8281
8282 static_assert(
8283 AllArgsDecayedAreUnique<Args...>::value,
8284 "Found duplicate types among the arguments passed to copyWith(...). "
8285 "Types should be listed at most once.");
8286
8287 auto copy{ *this };
8288 copy.set(std::forward<Args>(args)...);
8289 return copy;
8290 }
8291
8293 const Enabled &isEnabled() const
8294 {
8295 return m_enabled;
8296 }
8297
8300 {
8301 return m_enabled;
8302 }
8303
8305 Removal &set(const Enabled &value)
8306 {
8307 m_enabled = value;
8308 return *this;
8309 }
8310
8312 const Threshold &threshold() const
8313 {
8314 return m_threshold;
8315 }
8316
8319 {
8320 return m_threshold;
8321 }
8322
8324 Removal &set(const Threshold &value)
8325 {
8326 m_threshold = value;
8327 return *this;
8328 }
8329
8330 template<
8331 typename T,
8332 typename std::enable_if<
8333 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8334 int>::type = 0>
8336 {
8337 return m_enabled;
8338 }
8339
8340 template<
8341 typename T,
8342 typename std::enable_if<
8343 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8344 int>::type = 0>
8346 {
8347 return m_threshold;
8348 }
8349
8350 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8352 {
8353 return m_enabled;
8354 }
8355
8356 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8358 {
8359 return m_threshold;
8360 }
8361
8363 template<typename F>
8364 void forEach(const F &f) const
8365 {
8366 f(m_enabled);
8367 f(m_threshold);
8368 }
8369
8371 template<typename F>
8372 void forEach(const F &f)
8373 {
8374 f(m_enabled);
8375 f(m_threshold);
8376 }
8377
8379 bool operator==(const Removal &other) const;
8380
8382 bool operator!=(const Removal &other) const;
8383
8385 std::string toString() const;
8386
8388 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8389 {
8390 return stream << value.toString();
8391 }
8392
8393 private:
8394 void setFromString(const std::string &value);
8395
8396 void setFromString(const std::string &fullPath, const std::string &value);
8397
8398 std::string getString(const std::string &fullPath) const;
8399
8400 Enabled m_enabled;
8401 Threshold m_threshold;
8402
8403 friend struct DataModel::Detail::Befriend<Removal>;
8404 };
8405
8406 using Descendants = std::tuple<
8410
8413
8427#ifndef NO_DOC
8428 template<
8429 typename... Args,
8430 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8431 typename std::enable_if<
8432 Zivid::Detail::TypeTraits::
8433 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8434 int>::type = 0>
8435#else
8436 template<typename... Args>
8437#endif
8438 explicit Outlier(Args &&...args)
8439 {
8440 using namespace Zivid::Detail::TypeTraits;
8441
8442 static_assert(
8443 AllArgsDecayedAreUnique<Args...>::value,
8444 "Found duplicate types among the arguments passed to Outlier(...). "
8445 "Types should be listed at most once.");
8446
8447 set(std::forward<Args>(args)...);
8448 }
8449
8462#ifndef NO_DOC
8463 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8464#else
8465 template<typename... Args>
8466#endif
8467 void set(Args &&...args)
8468 {
8469 using namespace Zivid::Detail::TypeTraits;
8470
8471 using AllArgsAreDescendantNodes =
8472 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8473 static_assert(
8474 AllArgsAreDescendantNodes::value,
8475 "All arguments passed to set(...) must be descendant nodes.");
8476
8477 static_assert(
8478 AllArgsDecayedAreUnique<Args...>::value,
8479 "Found duplicate types among the arguments passed to set(...). "
8480 "Types should be listed at most once.");
8481
8482 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8483 }
8484
8498#ifndef NO_DOC
8499 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8500#else
8501 template<typename... Args>
8502#endif
8503 Outlier copyWith(Args &&...args) const
8504 {
8505 using namespace Zivid::Detail::TypeTraits;
8506
8507 using AllArgsAreDescendantNodes =
8508 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8509 static_assert(
8510 AllArgsAreDescendantNodes::value,
8511 "All arguments passed to copyWith(...) must be descendant nodes.");
8512
8513 static_assert(
8514 AllArgsDecayedAreUnique<Args...>::value,
8515 "Found duplicate types among the arguments passed to copyWith(...). "
8516 "Types should be listed at most once.");
8517
8518 auto copy{ *this };
8519 copy.set(std::forward<Args>(args)...);
8520 return copy;
8521 }
8522
8524 const Removal &removal() const
8525 {
8526 return m_removal;
8527 }
8528
8531 {
8532 return m_removal;
8533 }
8534
8536 Outlier &set(const Removal &value)
8537 {
8538 m_removal = value;
8539 return *this;
8540 }
8541
8544 {
8545 m_removal.set(value);
8546 return *this;
8547 }
8548
8551 {
8552 m_removal.set(value);
8553 return *this;
8554 }
8555
8556 template<
8557 typename T,
8558 typename std::enable_if<
8559 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8560 int>::type = 0>
8562 {
8563 return m_removal;
8564 }
8565
8566 template<
8567 typename T,
8568 typename std::enable_if<
8569 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8570 int>::type = 0>
8572 {
8574 }
8575
8576 template<
8577 typename T,
8578 typename std::enable_if<
8579 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8580 int>::type = 0>
8582 {
8584 }
8585
8586 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8588 {
8589 return m_removal;
8590 }
8591
8593 template<typename F>
8594 void forEach(const F &f) const
8595 {
8596 f(m_removal);
8597 }
8598
8600 template<typename F>
8601 void forEach(const F &f)
8602 {
8603 f(m_removal);
8604 }
8605
8607 bool operator==(const Outlier &other) const;
8608
8610 bool operator!=(const Outlier &other) const;
8611
8613 std::string toString() const;
8614
8616 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
8617 {
8618 return stream << value.toString();
8619 }
8620
8621 private:
8622 void setFromString(const std::string &value);
8623
8624 void setFromString(const std::string &fullPath, const std::string &value);
8625
8626 std::string getString(const std::string &fullPath) const;
8627
8628 Removal m_removal;
8629
8630 friend struct DataModel::Detail::Befriend<Outlier>;
8631 };
8632
8634
8635 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8637 {
8638 public:
8640 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8641
8643 static constexpr const char *path{ "Processing/Filters/Reflection" };
8644
8646 static constexpr const char *name{ "Reflection" };
8647
8649 static constexpr const char *description{
8650 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials).)description"
8651 };
8652
8654
8655 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8657 {
8658 public:
8660 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8661
8663 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
8664
8666 static constexpr const char *name{ "Removal" };
8667
8669 static constexpr const char *description{
8670 R"description(Discard points likely introduced by reflections (useful for shiny materials).)description"
8671 };
8672
8674
8675 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8677 {
8678 public:
8680 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8681
8683 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
8684
8686 static constexpr const char *name{ "Enabled" };
8687
8689 static constexpr const char *description{
8690 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate.)description"
8691 };
8692
8694 using ValueType = bool;
8695 static const Enabled yes;
8696 static const Enabled no;
8697
8699 static std::set<bool> validValues()
8700 {
8701 return { false, true };
8702 }
8703
8705 Enabled() = default;
8706
8708 explicit constexpr Enabled(bool value)
8709 : m_opt{ value }
8710 {}
8711
8716 bool value() const;
8717
8719 bool hasValue() const;
8720
8722 void reset();
8723
8725 std::string toString() const;
8726
8728 bool operator==(const Enabled &other) const
8729 {
8730 return m_opt == other.m_opt;
8731 }
8732
8734 bool operator!=(const Enabled &other) const
8735 {
8736 return m_opt != other.m_opt;
8737 }
8738
8740 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8741 {
8742 return stream << value.toString();
8743 }
8744
8745 private:
8746 void setFromString(const std::string &value);
8747
8748 std::optional<bool> m_opt;
8749
8750 friend struct DataModel::Detail::Befriend<Enabled>;
8751 };
8752
8761
8762 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8764 {
8765 public:
8767 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8768
8770 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Mode" };
8771
8773 static constexpr const char *name{ "Mode" };
8774
8776 static constexpr const char *description{
8777 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
8778on thinner objects, generally removes more reflection artifacts and processes faster than
8779the Global filter. The Global filter is generally better at removing outlier points in
8780the point cloud. It is advised to use the Outlier filter and Cluster filter together with the
8781Local Reflection filter.
8782
8783Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
8784)description"
8785 };
8786
8788 enum class ValueType
8789 {
8790 global,
8791 local
8792 };
8793 static const Mode global;
8794 static const Mode local;
8795
8797 static std::set<ValueType> validValues()
8798 {
8799 return { ValueType::global, ValueType::local };
8800 }
8801
8803 Mode() = default;
8804
8806 explicit constexpr Mode(ValueType value)
8807 : m_opt{ verifyValue(value) }
8808 {}
8809
8815
8817 bool hasValue() const;
8818
8820 void reset();
8821
8823 std::string toString() const;
8824
8826 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8827 {
8828 return stream << Mode{ value }.toString();
8829 }
8830
8832 bool operator==(const Mode &other) const
8833 {
8834 return m_opt == other.m_opt;
8835 }
8836
8838 bool operator!=(const Mode &other) const
8839 {
8840 return m_opt != other.m_opt;
8841 }
8842
8844 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8845 {
8846 return stream << value.toString();
8847 }
8848
8849 private:
8850 void setFromString(const std::string &value);
8851
8852 constexpr ValueType static verifyValue(const ValueType &value)
8853 {
8854 return value == ValueType::global || value == ValueType::local
8855 ? value
8856 : throw std::invalid_argument{
8857 "Invalid value: Mode{ "
8858 + std::to_string(
8859 static_cast<std::underlying_type<ValueType>::type>(value))
8860 + " }"
8861 };
8862 }
8863
8864 std::optional<ValueType> m_opt;
8865
8866 friend struct DataModel::Detail::Befriend<Mode>;
8867 };
8868
8869 using Descendants = std::tuple<
8872
8875
8888#ifndef NO_DOC
8889 template<
8890 typename... Args,
8891 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8892 typename std::enable_if<
8893 Zivid::Detail::TypeTraits::
8894 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8895 int>::type = 0>
8896#else
8897 template<typename... Args>
8898#endif
8899 explicit Removal(Args &&...args)
8900 {
8901 using namespace Zivid::Detail::TypeTraits;
8902
8903 static_assert(
8904 AllArgsDecayedAreUnique<Args...>::value,
8905 "Found duplicate types among the arguments passed to Removal(...). "
8906 "Types should be listed at most once.");
8907
8908 set(std::forward<Args>(args)...);
8909 }
8910
8922#ifndef NO_DOC
8923 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8924#else
8925 template<typename... Args>
8926#endif
8927 void set(Args &&...args)
8928 {
8929 using namespace Zivid::Detail::TypeTraits;
8930
8931 using AllArgsAreDescendantNodes =
8932 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8933 static_assert(
8934 AllArgsAreDescendantNodes::value,
8935 "All arguments passed to set(...) must be descendant nodes.");
8936
8937 static_assert(
8938 AllArgsDecayedAreUnique<Args...>::value,
8939 "Found duplicate types among the arguments passed to set(...). "
8940 "Types should be listed at most once.");
8941
8942 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8943 }
8944
8957#ifndef NO_DOC
8958 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8959#else
8960 template<typename... Args>
8961#endif
8962 Removal copyWith(Args &&...args) const
8963 {
8964 using namespace Zivid::Detail::TypeTraits;
8965
8966 using AllArgsAreDescendantNodes =
8967 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8968 static_assert(
8969 AllArgsAreDescendantNodes::value,
8970 "All arguments passed to copyWith(...) must be descendant nodes.");
8971
8972 static_assert(
8973 AllArgsDecayedAreUnique<Args...>::value,
8974 "Found duplicate types among the arguments passed to copyWith(...). "
8975 "Types should be listed at most once.");
8976
8977 auto copy{ *this };
8978 copy.set(std::forward<Args>(args)...);
8979 return copy;
8980 }
8981
8983 const Enabled &isEnabled() const
8984 {
8985 return m_enabled;
8986 }
8987
8990 {
8991 return m_enabled;
8992 }
8993
8995 Removal &set(const Enabled &value)
8996 {
8997 m_enabled = value;
8998 return *this;
8999 }
9000
9002 const Mode &mode() const
9003 {
9004 return m_mode;
9005 }
9006
9009 {
9010 return m_mode;
9011 }
9012
9014 Removal &set(const Mode &value)
9015 {
9016 m_mode = value;
9017 return *this;
9018 }
9019
9020 template<
9021 typename T,
9022 typename std::enable_if<
9023 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9024 int>::type = 0>
9026 {
9027 return m_enabled;
9028 }
9029
9030 template<
9031 typename T,
9032 typename std::enable_if<
9033 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9034 int>::type = 0>
9036 {
9037 return m_mode;
9038 }
9039
9040 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9042 {
9043 return m_enabled;
9044 }
9045
9046 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9048 {
9049 return m_mode;
9050 }
9051
9053 template<typename F>
9054 void forEach(const F &f) const
9055 {
9056 f(m_enabled);
9057 f(m_mode);
9058 }
9059
9061 template<typename F>
9062 void forEach(const F &f)
9063 {
9064 f(m_enabled);
9065 f(m_mode);
9066 }
9067
9069 bool operator==(const Removal &other) const;
9070
9072 bool operator!=(const Removal &other) const;
9073
9075 std::string toString() const;
9076
9078 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
9079 {
9080 return stream << value.toString();
9081 }
9082
9083 private:
9084 void setFromString(const std::string &value);
9085
9086 void setFromString(const std::string &fullPath, const std::string &value);
9087
9088 std::string getString(const std::string &fullPath) const;
9089
9090 Enabled m_enabled;
9091 Mode m_mode;
9092
9093 friend struct DataModel::Detail::Befriend<Removal>;
9094 };
9095
9096 using Descendants = std::tuple<
9100
9103
9117#ifndef NO_DOC
9118 template<
9119 typename... Args,
9120 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9121 typename std::enable_if<
9122 Zivid::Detail::TypeTraits::
9123 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9124 int>::type = 0>
9125#else
9126 template<typename... Args>
9127#endif
9128 explicit Reflection(Args &&...args)
9129 {
9130 using namespace Zivid::Detail::TypeTraits;
9131
9132 static_assert(
9133 AllArgsDecayedAreUnique<Args...>::value,
9134 "Found duplicate types among the arguments passed to Reflection(...). "
9135 "Types should be listed at most once.");
9136
9137 set(std::forward<Args>(args)...);
9138 }
9139
9152#ifndef NO_DOC
9153 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9154#else
9155 template<typename... Args>
9156#endif
9157 void set(Args &&...args)
9158 {
9159 using namespace Zivid::Detail::TypeTraits;
9160
9161 using AllArgsAreDescendantNodes =
9162 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9163 static_assert(
9164 AllArgsAreDescendantNodes::value,
9165 "All arguments passed to set(...) must be descendant nodes.");
9166
9167 static_assert(
9168 AllArgsDecayedAreUnique<Args...>::value,
9169 "Found duplicate types among the arguments passed to set(...). "
9170 "Types should be listed at most once.");
9171
9172 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9173 }
9174
9188#ifndef NO_DOC
9189 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9190#else
9191 template<typename... Args>
9192#endif
9193 Reflection copyWith(Args &&...args) const
9194 {
9195 using namespace Zivid::Detail::TypeTraits;
9196
9197 using AllArgsAreDescendantNodes =
9198 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9199 static_assert(
9200 AllArgsAreDescendantNodes::value,
9201 "All arguments passed to copyWith(...) must be descendant nodes.");
9202
9203 static_assert(
9204 AllArgsDecayedAreUnique<Args...>::value,
9205 "Found duplicate types among the arguments passed to copyWith(...). "
9206 "Types should be listed at most once.");
9207
9208 auto copy{ *this };
9209 copy.set(std::forward<Args>(args)...);
9210 return copy;
9211 }
9212
9214 const Removal &removal() const
9215 {
9216 return m_removal;
9217 }
9218
9221 {
9222 return m_removal;
9223 }
9224
9226 Reflection &set(const Removal &value)
9227 {
9228 m_removal = value;
9229 return *this;
9230 }
9231
9234 {
9235 m_removal.set(value);
9236 return *this;
9237 }
9238
9241 {
9242 m_removal.set(value);
9243 return *this;
9244 }
9245
9246 template<
9247 typename T,
9248 typename std::enable_if<
9249 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9250 int>::type = 0>
9252 {
9253 return m_removal;
9254 }
9255
9256 template<
9257 typename T,
9258 typename std::enable_if<
9259 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9260 int>::type = 0>
9262 {
9264 }
9265
9266 template<
9267 typename T,
9268 typename std::enable_if<
9269 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9270 int>::type = 0>
9272 {
9274 }
9275
9276 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9278 {
9279 return m_removal;
9280 }
9281
9283 template<typename F>
9284 void forEach(const F &f) const
9285 {
9286 f(m_removal);
9287 }
9288
9290 template<typename F>
9291 void forEach(const F &f)
9292 {
9293 f(m_removal);
9294 }
9295
9297 bool operator==(const Reflection &other) const;
9298
9300 bool operator!=(const Reflection &other) const;
9301
9303 std::string toString() const;
9304
9306 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9307 {
9308 return stream << value.toString();
9309 }
9310
9311 private:
9312 void setFromString(const std::string &value);
9313
9314 void setFromString(const std::string &fullPath, const std::string &value);
9315
9316 std::string getString(const std::string &fullPath) const;
9317
9318 Removal m_removal;
9319
9320 friend struct DataModel::Detail::Befriend<Reflection>;
9321 };
9322
9324
9325 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9327 {
9328 public:
9330 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9331
9333 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9334
9336 static constexpr const char *name{ "Smoothing" };
9337
9339 static constexpr const char *description{ R"description(Smoothing filters.)description" };
9340
9342
9343 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9345 {
9346 public:
9348 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9349
9351 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9352
9354 static constexpr const char *name{ "Gaussian" };
9355
9357 static constexpr const char *description{
9358 R"description(Gaussian smoothing of the point cloud.)description"
9359 };
9360
9362
9363 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9365 {
9366 public:
9368 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9369
9371 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9372
9374 static constexpr const char *name{ "Enabled" };
9375
9377 static constexpr const char *description{
9378 R"description(Enable or disable the smoothing filter.)description"
9379 };
9380
9382 using ValueType = bool;
9383 static const Enabled yes;
9384 static const Enabled no;
9385
9387 static std::set<bool> validValues()
9388 {
9389 return { false, true };
9390 }
9391
9393 Enabled() = default;
9394
9396 explicit constexpr Enabled(bool value)
9397 : m_opt{ value }
9398 {}
9399
9404 bool value() const;
9405
9407 bool hasValue() const;
9408
9410 void reset();
9411
9413 std::string toString() const;
9414
9416 bool operator==(const Enabled &other) const
9417 {
9418 return m_opt == other.m_opt;
9419 }
9420
9422 bool operator!=(const Enabled &other) const
9423 {
9424 return m_opt != other.m_opt;
9425 }
9426
9428 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9429 {
9430 return stream << value.toString();
9431 }
9432
9433 private:
9434 void setFromString(const std::string &value);
9435
9436 std::optional<bool> m_opt;
9437
9438 friend struct DataModel::Detail::Befriend<Enabled>;
9439 };
9440
9442
9443 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9445 {
9446 public:
9448 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9449
9451 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9452
9454 static constexpr const char *name{ "Sigma" };
9455
9457 static constexpr const char *description{
9458 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients).)description"
9459 };
9460
9462 using ValueType = double;
9463
9465 static constexpr Range<double> validRange()
9466 {
9467 return { 0.5, 5 };
9468 }
9469
9471 Sigma() = default;
9472
9474 explicit constexpr Sigma(double value)
9475 : m_opt{ verifyValue(value) }
9476 {}
9477
9482 double value() const;
9483
9485 bool hasValue() const;
9486
9488 void reset();
9489
9491 std::string toString() const;
9492
9494 bool operator==(const Sigma &other) const
9495 {
9496 return m_opt == other.m_opt;
9497 }
9498
9500 bool operator!=(const Sigma &other) const
9501 {
9502 return m_opt != other.m_opt;
9503 }
9504
9506 bool operator<(const Sigma &other) const
9507 {
9508 return m_opt < other.m_opt;
9509 }
9510
9512 bool operator>(const Sigma &other) const
9513 {
9514 return m_opt > other.m_opt;
9515 }
9516
9518 bool operator<=(const Sigma &other) const
9519 {
9520 return m_opt <= other.m_opt;
9521 }
9522
9524 bool operator>=(const Sigma &other) const
9525 {
9526 return m_opt >= other.m_opt;
9527 }
9528
9530 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9531 {
9532 return stream << value.toString();
9533 }
9534
9535 private:
9536 void setFromString(const std::string &value);
9537
9538 constexpr ValueType static verifyValue(const ValueType &value)
9539 {
9540 return validRange().isInRange(value)
9541 ? value
9542 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9543 + " } is not in range ["
9544 + std::to_string(validRange().min()) + ", "
9545 + std::to_string(validRange().max()) + "]" };
9546 }
9547
9548 std::optional<double> m_opt;
9549
9550 friend struct DataModel::Detail::Befriend<Sigma>;
9551 };
9552
9553 using Descendants = std::tuple<
9556
9559
9572#ifndef NO_DOC
9573 template<
9574 typename... Args,
9575 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9576 typename std::enable_if<
9577 Zivid::Detail::TypeTraits::
9578 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9579 int>::type = 0>
9580#else
9581 template<typename... Args>
9582#endif
9583 explicit Gaussian(Args &&...args)
9584 {
9585 using namespace Zivid::Detail::TypeTraits;
9586
9587 static_assert(
9588 AllArgsDecayedAreUnique<Args...>::value,
9589 "Found duplicate types among the arguments passed to Gaussian(...). "
9590 "Types should be listed at most once.");
9591
9592 set(std::forward<Args>(args)...);
9593 }
9594
9606#ifndef NO_DOC
9607 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9608#else
9609 template<typename... Args>
9610#endif
9611 void set(Args &&...args)
9612 {
9613 using namespace Zivid::Detail::TypeTraits;
9614
9615 using AllArgsAreDescendantNodes =
9616 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9617 static_assert(
9618 AllArgsAreDescendantNodes::value,
9619 "All arguments passed to set(...) must be descendant nodes.");
9620
9621 static_assert(
9622 AllArgsDecayedAreUnique<Args...>::value,
9623 "Found duplicate types among the arguments passed to set(...). "
9624 "Types should be listed at most once.");
9625
9626 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9627 }
9628
9641#ifndef NO_DOC
9642 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9643#else
9644 template<typename... Args>
9645#endif
9646 Gaussian copyWith(Args &&...args) const
9647 {
9648 using namespace Zivid::Detail::TypeTraits;
9649
9650 using AllArgsAreDescendantNodes =
9651 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9652 static_assert(
9653 AllArgsAreDescendantNodes::value,
9654 "All arguments passed to copyWith(...) must be descendant nodes.");
9655
9656 static_assert(
9657 AllArgsDecayedAreUnique<Args...>::value,
9658 "Found duplicate types among the arguments passed to copyWith(...). "
9659 "Types should be listed at most once.");
9660
9661 auto copy{ *this };
9662 copy.set(std::forward<Args>(args)...);
9663 return copy;
9664 }
9665
9667 const Enabled &isEnabled() const
9668 {
9669 return m_enabled;
9670 }
9671
9674 {
9675 return m_enabled;
9676 }
9677
9679 Gaussian &set(const Enabled &value)
9680 {
9681 m_enabled = value;
9682 return *this;
9683 }
9684
9686 const Sigma &sigma() const
9687 {
9688 return m_sigma;
9689 }
9690
9693 {
9694 return m_sigma;
9695 }
9696
9698 Gaussian &set(const Sigma &value)
9699 {
9700 m_sigma = value;
9701 return *this;
9702 }
9703
9704 template<
9705 typename T,
9706 typename std::enable_if<
9707 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9708 int>::type = 0>
9710 {
9711 return m_enabled;
9712 }
9713
9714 template<
9715 typename T,
9716 typename std::enable_if<
9717 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9718 int>::type = 0>
9720 {
9721 return m_sigma;
9722 }
9723
9724 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9726 {
9727 return m_enabled;
9728 }
9729
9730 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9732 {
9733 return m_sigma;
9734 }
9735
9737 template<typename F>
9738 void forEach(const F &f) const
9739 {
9740 f(m_enabled);
9741 f(m_sigma);
9742 }
9743
9745 template<typename F>
9746 void forEach(const F &f)
9747 {
9748 f(m_enabled);
9749 f(m_sigma);
9750 }
9751
9753 bool operator==(const Gaussian &other) const;
9754
9756 bool operator!=(const Gaussian &other) const;
9757
9759 std::string toString() const;
9760
9762 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9763 {
9764 return stream << value.toString();
9765 }
9766
9767 private:
9768 void setFromString(const std::string &value);
9769
9770 void setFromString(const std::string &fullPath, const std::string &value);
9771
9772 std::string getString(const std::string &fullPath) const;
9773
9774 Enabled m_enabled;
9775 Sigma m_sigma;
9776
9777 friend struct DataModel::Detail::Befriend<Gaussian>;
9778 };
9779
9780 using Descendants = std::tuple<
9784
9787
9801#ifndef NO_DOC
9802 template<
9803 typename... Args,
9804 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9805 typename std::enable_if<
9806 Zivid::Detail::TypeTraits::
9807 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9808 int>::type = 0>
9809#else
9810 template<typename... Args>
9811#endif
9812 explicit Smoothing(Args &&...args)
9813 {
9814 using namespace Zivid::Detail::TypeTraits;
9815
9816 static_assert(
9817 AllArgsDecayedAreUnique<Args...>::value,
9818 "Found duplicate types among the arguments passed to Smoothing(...). "
9819 "Types should be listed at most once.");
9820
9821 set(std::forward<Args>(args)...);
9822 }
9823
9836#ifndef NO_DOC
9837 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9838#else
9839 template<typename... Args>
9840#endif
9841 void set(Args &&...args)
9842 {
9843 using namespace Zivid::Detail::TypeTraits;
9844
9845 using AllArgsAreDescendantNodes =
9846 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9847 static_assert(
9848 AllArgsAreDescendantNodes::value,
9849 "All arguments passed to set(...) must be descendant nodes.");
9850
9851 static_assert(
9852 AllArgsDecayedAreUnique<Args...>::value,
9853 "Found duplicate types among the arguments passed to set(...). "
9854 "Types should be listed at most once.");
9855
9856 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9857 }
9858
9872#ifndef NO_DOC
9873 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9874#else
9875 template<typename... Args>
9876#endif
9877 Smoothing copyWith(Args &&...args) const
9878 {
9879 using namespace Zivid::Detail::TypeTraits;
9880
9881 using AllArgsAreDescendantNodes =
9882 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9883 static_assert(
9884 AllArgsAreDescendantNodes::value,
9885 "All arguments passed to copyWith(...) must be descendant nodes.");
9886
9887 static_assert(
9888 AllArgsDecayedAreUnique<Args...>::value,
9889 "Found duplicate types among the arguments passed to copyWith(...). "
9890 "Types should be listed at most once.");
9891
9892 auto copy{ *this };
9893 copy.set(std::forward<Args>(args)...);
9894 return copy;
9895 }
9896
9898 const Gaussian &gaussian() const
9899 {
9900 return m_gaussian;
9901 }
9902
9905 {
9906 return m_gaussian;
9907 }
9908
9910 Smoothing &set(const Gaussian &value)
9911 {
9912 m_gaussian = value;
9913 return *this;
9914 }
9915
9918 {
9919 m_gaussian.set(value);
9920 return *this;
9921 }
9922
9925 {
9926 m_gaussian.set(value);
9927 return *this;
9928 }
9929
9930 template<
9931 typename T,
9932 typename std::enable_if<
9933 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9934 int>::type = 0>
9936 {
9937 return m_gaussian;
9938 }
9939
9940 template<
9941 typename T,
9942 typename std::enable_if<
9943 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9944 int>::type = 0>
9946 {
9948 }
9949
9950 template<
9951 typename T,
9952 typename std::enable_if<
9953 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9954 int>::type = 0>
9956 {
9958 }
9959
9960 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9962 {
9963 return m_gaussian;
9964 }
9965
9967 template<typename F>
9968 void forEach(const F &f) const
9969 {
9970 f(m_gaussian);
9971 }
9972
9974 template<typename F>
9975 void forEach(const F &f)
9976 {
9977 f(m_gaussian);
9978 }
9979
9981 bool operator==(const Smoothing &other) const;
9982
9984 bool operator!=(const Smoothing &other) const;
9985
9987 std::string toString() const;
9988
9990 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
9991 {
9992 return stream << value.toString();
9993 }
9994
9995 private:
9996 void setFromString(const std::string &value);
9997
9998 void setFromString(const std::string &fullPath, const std::string &value);
9999
10000 std::string getString(const std::string &fullPath) const;
10001
10002 Gaussian m_gaussian;
10003
10004 friend struct DataModel::Detail::Befriend<Smoothing>;
10005 };
10006
10007 using Descendants = std::tuple<
10046
10049
10098#ifndef NO_DOC
10099 template<
10100 typename... Args,
10101 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
10102 typename std::enable_if<
10103 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
10104 value,
10105 int>::type = 0>
10106#else
10107 template<typename... Args>
10108#endif
10109 explicit Filters(Args &&...args)
10110 {
10111 using namespace Zivid::Detail::TypeTraits;
10112
10113 static_assert(
10114 AllArgsDecayedAreUnique<Args...>::value,
10115 "Found duplicate types among the arguments passed to Filters(...). "
10116 "Types should be listed at most once.");
10117
10118 set(std::forward<Args>(args)...);
10119 }
10120
10168#ifndef NO_DOC
10169 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
10170#else
10171 template<typename... Args>
10172#endif
10173 void set(Args &&...args)
10174 {
10175 using namespace Zivid::Detail::TypeTraits;
10176
10177 using AllArgsAreDescendantNodes =
10178 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10179 static_assert(
10180 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
10181
10182 static_assert(
10183 AllArgsDecayedAreUnique<Args...>::value,
10184 "Found duplicate types among the arguments passed to set(...). "
10185 "Types should be listed at most once.");
10186
10187 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
10188 }
10189
10238#ifndef NO_DOC
10239 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10240#else
10241 template<typename... Args>
10242#endif
10243 Filters copyWith(Args &&...args) const
10244 {
10245 using namespace Zivid::Detail::TypeTraits;
10246
10247 using AllArgsAreDescendantNodes =
10248 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10249 static_assert(
10250 AllArgsAreDescendantNodes::value,
10251 "All arguments passed to copyWith(...) must be descendant nodes.");
10252
10253 static_assert(
10254 AllArgsDecayedAreUnique<Args...>::value,
10255 "Found duplicate types among the arguments passed to copyWith(...). "
10256 "Types should be listed at most once.");
10257
10258 auto copy{ *this };
10259 copy.set(std::forward<Args>(args)...);
10260 return copy;
10261 }
10262
10264 const Cluster &cluster() const
10265 {
10266 return m_cluster;
10267 }
10268
10271 {
10272 return m_cluster;
10273 }
10274
10276 Filters &set(const Cluster &value)
10277 {
10278 m_cluster = value;
10279 return *this;
10280 }
10281
10284 {
10285 m_cluster.set(value);
10286 return *this;
10287 }
10288
10291 {
10292 m_cluster.set(value);
10293 return *this;
10294 }
10295
10298 {
10299 m_cluster.set(value);
10300 return *this;
10301 }
10302
10305 {
10306 m_cluster.set(value);
10307 return *this;
10308 }
10309
10312 {
10313 return m_experimental;
10314 }
10315
10318 {
10319 return m_experimental;
10320 }
10321
10323 Filters &set(const Experimental &value)
10324 {
10325 m_experimental = value;
10326 return *this;
10327 }
10328
10331 {
10332 m_experimental.set(value);
10333 return *this;
10334 }
10335
10338 {
10339 m_experimental.set(value);
10340 return *this;
10341 }
10342
10345 {
10346 m_experimental.set(value);
10347 return *this;
10348 }
10349
10352 {
10353 m_experimental.set(value);
10354 return *this;
10355 }
10356
10359 {
10360 m_experimental.set(value);
10361 return *this;
10362 }
10363
10366 {
10367 m_experimental.set(value);
10368 return *this;
10369 }
10370
10373 {
10374 m_experimental.set(value);
10375 return *this;
10376 }
10377
10379 const Hole &hole() const
10380 {
10381 return m_hole;
10382 }
10383
10386 {
10387 return m_hole;
10388 }
10389
10391 Filters &set(const Hole &value)
10392 {
10393 m_hole = value;
10394 return *this;
10395 }
10396
10398 Filters &set(const Hole::Repair &value)
10399 {
10400 m_hole.set(value);
10401 return *this;
10402 }
10403
10406 {
10407 m_hole.set(value);
10408 return *this;
10409 }
10410
10413 {
10414 m_hole.set(value);
10415 return *this;
10416 }
10417
10420 {
10421 m_hole.set(value);
10422 return *this;
10423 }
10424
10426 const Noise &noise() const
10427 {
10428 return m_noise;
10429 }
10430
10433 {
10434 return m_noise;
10435 }
10436
10438 Filters &set(const Noise &value)
10439 {
10440 m_noise = value;
10441 return *this;
10442 }
10443
10446 {
10447 m_noise.set(value);
10448 return *this;
10449 }
10450
10453 {
10454 m_noise.set(value);
10455 return *this;
10456 }
10457
10460 {
10461 m_noise.set(value);
10462 return *this;
10463 }
10464
10467 {
10468 m_noise.set(value);
10469 return *this;
10470 }
10471
10474 {
10475 m_noise.set(value);
10476 return *this;
10477 }
10478
10481 {
10482 m_noise.set(value);
10483 return *this;
10484 }
10485
10488 {
10489 m_noise.set(value);
10490 return *this;
10491 }
10492
10494 const Outlier &outlier() const
10495 {
10496 return m_outlier;
10497 }
10498
10501 {
10502 return m_outlier;
10503 }
10504
10506 Filters &set(const Outlier &value)
10507 {
10508 m_outlier = value;
10509 return *this;
10510 }
10511
10514 {
10515 m_outlier.set(value);
10516 return *this;
10517 }
10518
10521 {
10522 m_outlier.set(value);
10523 return *this;
10524 }
10525
10528 {
10529 m_outlier.set(value);
10530 return *this;
10531 }
10532
10534 const Reflection &reflection() const
10535 {
10536 return m_reflection;
10537 }
10538
10541 {
10542 return m_reflection;
10543 }
10544
10546 Filters &set(const Reflection &value)
10547 {
10548 m_reflection = value;
10549 return *this;
10550 }
10551
10554 {
10555 m_reflection.set(value);
10556 return *this;
10557 }
10558
10561 {
10562 m_reflection.set(value);
10563 return *this;
10564 }
10565
10568 {
10569 m_reflection.set(value);
10570 return *this;
10571 }
10572
10574 const Smoothing &smoothing() const
10575 {
10576 return m_smoothing;
10577 }
10578
10581 {
10582 return m_smoothing;
10583 }
10584
10586 Filters &set(const Smoothing &value)
10587 {
10588 m_smoothing = value;
10589 return *this;
10590 }
10591
10594 {
10595 m_smoothing.set(value);
10596 return *this;
10597 }
10598
10601 {
10602 m_smoothing.set(value);
10603 return *this;
10604 }
10605
10608 {
10609 m_smoothing.set(value);
10610 return *this;
10611 }
10612
10613 template<
10614 typename T,
10615 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10616 0>
10618 {
10619 return m_cluster;
10620 }
10621
10622 template<
10623 typename T,
10624 typename std::enable_if<
10625 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
10626 int>::type = 0>
10628 {
10630 }
10631
10632 template<
10633 typename T,
10634 typename std::enable_if<
10635 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
10636 int>::type = 0>
10638 {
10640 }
10641
10642 template<
10643 typename T,
10644 typename std::enable_if<
10645 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
10646 int>::type = 0>
10648 {
10650 }
10651
10652 template<
10653 typename T,
10654 typename std::enable_if<
10655 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10656 int>::type = 0>
10658 {
10660 }
10661
10662 template<
10663 typename T,
10664 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10665 type = 0>
10667 {
10668 return m_experimental;
10669 }
10670
10671 template<
10672 typename T,
10673 typename std::enable_if<
10674 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10675 int>::type = 0>
10677 {
10679 }
10680
10681 template<
10682 typename T,
10683 typename std::enable_if<
10684 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10685 value,
10686 int>::type = 0>
10688 {
10689 return m_experimental
10691 }
10692
10693 template<
10694 typename T,
10695 typename std::enable_if<
10696 std::is_same<
10697 T,
10699 value,
10700 int>::type = 0>
10702 {
10703 return m_experimental
10705 }
10706
10707 template<
10708 typename T,
10709 typename std::enable_if<
10710 std::is_same<
10711 T,
10713 value,
10714 int>::type = 0>
10716 {
10717 return m_experimental
10719 }
10720
10721 template<
10722 typename T,
10723 typename std::enable_if<
10724 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10725 value,
10726 int>::type = 0>
10728 {
10729 return m_experimental
10731 }
10732
10733 template<
10734 typename T,
10735 typename std::enable_if<
10736 std::is_same<
10737 T,
10739 int>::type = 0>
10741 {
10742 return m_experimental
10744 }
10745
10746 template<
10747 typename T,
10748 typename std::enable_if<
10749 std::is_same<
10750 T,
10752 int>::type = 0>
10754 {
10755 return m_experimental
10757 }
10758
10759 template<
10760 typename T,
10761 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
10763 {
10764 return m_hole;
10765 }
10766
10767 template<
10768 typename T,
10769 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
10770 type = 0>
10772 {
10774 }
10775
10776 template<
10777 typename T,
10778 typename std::enable_if<
10779 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
10780 int>::type = 0>
10782 {
10784 }
10785
10786 template<
10787 typename T,
10788 typename std::enable_if<
10789 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
10790 int>::type = 0>
10792 {
10794 }
10795
10796 template<
10797 typename T,
10798 typename std::enable_if<
10799 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
10800 int>::type = 0>
10802 {
10804 }
10805
10806 template<
10807 typename T,
10808 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10809 0>
10811 {
10812 return m_noise;
10813 }
10814
10815 template<
10816 typename T,
10817 typename std::
10818 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
10820 {
10822 }
10823
10824 template<
10825 typename T,
10826 typename std::enable_if<
10827 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10828 int>::type = 0>
10830 {
10832 }
10833
10834 template<
10835 typename T,
10836 typename std::enable_if<
10837 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10838 int>::type = 0>
10840 {
10842 }
10843
10844 template<
10845 typename T,
10846 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10847 type = 0>
10849 {
10851 }
10852
10853 template<
10854 typename T,
10855 typename std::enable_if<
10856 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
10857 int>::type = 0>
10859 {
10861 }
10862
10863 template<
10864 typename T,
10865 typename std::enable_if<
10866 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
10867 int>::type = 0>
10869 {
10871 }
10872
10873 template<
10874 typename T,
10875 typename std::enable_if<
10876 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10877 int>::type = 0>
10879 {
10881 }
10882
10883 template<
10884 typename T,
10885 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10886 0>
10888 {
10889 return m_outlier;
10890 }
10891
10892 template<
10893 typename T,
10894 typename std::enable_if<
10895 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
10896 int>::type = 0>
10898 {
10900 }
10901
10902 template<
10903 typename T,
10904 typename std::enable_if<
10905 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10906 int>::type = 0>
10908 {
10910 }
10911
10912 template<
10913 typename T,
10914 typename std::enable_if<
10915 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10916 int>::type = 0>
10918 {
10920 }
10921
10922 template<
10923 typename T,
10924 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10925 type = 0>
10927 {
10928 return m_reflection;
10929 }
10930
10931 template<
10932 typename T,
10933 typename std::enable_if<
10934 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
10935 int>::type = 0>
10937 {
10939 }
10940
10941 template<
10942 typename T,
10943 typename std::enable_if<
10944 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
10945 int>::type = 0>
10947 {
10949 }
10950
10951 template<
10952 typename T,
10953 typename std::enable_if<
10954 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
10955 int>::type = 0>
10957 {
10959 }
10960
10961 template<
10962 typename T,
10963 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
10964 type = 0>
10966 {
10967 return m_smoothing;
10968 }
10969
10970 template<
10971 typename T,
10972 typename std::enable_if<
10973 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
10974 int>::type = 0>
10976 {
10978 }
10979
10980 template<
10981 typename T,
10982 typename std::enable_if<
10983 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10984 int>::type = 0>
10986 {
10988 }
10989
10990 template<
10991 typename T,
10992 typename std::enable_if<
10993 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10994 int>::type = 0>
10996 {
10998 }
10999
11000 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11002 {
11003 return m_cluster;
11004 }
11005
11006 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
11008 {
11009 return m_experimental;
11010 }
11011
11012 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
11014 {
11015 return m_hole;
11016 }
11017
11018 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
11020 {
11021 return m_noise;
11022 }
11023
11024 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
11026 {
11027 return m_outlier;
11028 }
11029
11030 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
11032 {
11033 return m_reflection;
11034 }
11035
11036 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
11038 {
11039 return m_smoothing;
11040 }
11041
11043 template<typename F>
11044 void forEach(const F &f) const
11045 {
11046 f(m_cluster);
11047 f(m_experimental);
11048 f(m_hole);
11049 f(m_noise);
11050 f(m_outlier);
11051 f(m_reflection);
11052 f(m_smoothing);
11053 }
11054
11056 template<typename F>
11057 void forEach(const F &f)
11058 {
11059 f(m_cluster);
11060 f(m_experimental);
11061 f(m_hole);
11062 f(m_noise);
11063 f(m_outlier);
11064 f(m_reflection);
11065 f(m_smoothing);
11066 }
11067
11069 bool operator==(const Filters &other) const;
11070
11072 bool operator!=(const Filters &other) const;
11073
11075 std::string toString() const;
11076
11078 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
11079 {
11080 return stream << value.toString();
11081 }
11082
11083 private:
11084 void setFromString(const std::string &value);
11085
11086 void setFromString(const std::string &fullPath, const std::string &value);
11087
11088 std::string getString(const std::string &fullPath) const;
11089
11090 Cluster m_cluster;
11091 Experimental m_experimental;
11092 Hole m_hole;
11093 Noise m_noise;
11094 Outlier m_outlier;
11095 Reflection m_reflection;
11096 Smoothing m_smoothing;
11097
11098 friend struct DataModel::Detail::Befriend<Filters>;
11099 };
11100
11103
11104 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11106 {
11107 public:
11109 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
11110
11112 static constexpr const char *path{ "Processing/Resampling" };
11113
11115 static constexpr const char *name{ "Resampling" };
11116
11118 static constexpr const char *description{
11119 R"description(Settings for changing the output resolution of the point cloud.
11120)description"
11121 };
11122
11146
11147 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11149 {
11150 public:
11152 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
11153
11155 static constexpr const char *path{ "Processing/Resampling/Mode" };
11156
11158 static constexpr const char *name{ "Mode" };
11159
11161 static constexpr const char *description{
11162 R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
11163is performed after all other processing has been completed.
11164
11165Downsampling is used to reduce the number of points in the point cloud. This is done by
11166combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
11167a new point cloud. This downsample functionality is identical to the downsample method
11168on the PointCloud class. The averaging process reduces noise in the point cloud, but it
11169will not improve capture speed. To improve capture speed, consider using the subsampling
11170modes found in Settings/Sampling/Pixel.
11171
11172Upsampling is used to increase the number of points in the point cloud. It is not possible
11173to upsample beyond the full resolution of the camera, so upsampling may only be used in
11174combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
11175combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
11176resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
11177blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
11178groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
11179new points based on an interpolation of the surrounding original points. The points in the
11180new point cloud that correspond to points in the original point cloud are left unchanged.
11181Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
11182pixels in the point cloud compared to no upsampling, so users should be aware of increased
11183computational cost related to copying and analyzing this data.
11184)description"
11185 };
11186
11188 enum class ValueType
11189 {
11190 disabled,
11191 downsample2x2,
11192 downsample4x4,
11193 upsample2x2,
11194 upsample4x4
11195 };
11196 static const Mode disabled;
11197 static const Mode downsample2x2;
11198 static const Mode downsample4x4;
11199 static const Mode upsample2x2;
11200 static const Mode upsample4x4;
11201
11203 static std::set<ValueType> validValues()
11204 {
11205 return { ValueType::disabled,
11206 ValueType::downsample2x2,
11207 ValueType::downsample4x4,
11208 ValueType::upsample2x2,
11209 ValueType::upsample4x4 };
11210 }
11211
11213 Mode() = default;
11214
11216 explicit constexpr Mode(ValueType value)
11217 : m_opt{ verifyValue(value) }
11218 {}
11219
11225
11227 bool hasValue() const;
11228
11230 void reset();
11231
11233 std::string toString() const;
11234
11236 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
11237 {
11238 return stream << Mode{ value }.toString();
11239 }
11240
11242 bool operator==(const Mode &other) const
11243 {
11244 return m_opt == other.m_opt;
11245 }
11246
11248 bool operator!=(const Mode &other) const
11249 {
11250 return m_opt != other.m_opt;
11251 }
11252
11254 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
11255 {
11256 return stream << value.toString();
11257 }
11258
11259 private:
11260 void setFromString(const std::string &value);
11261
11262 constexpr ValueType static verifyValue(const ValueType &value)
11263 {
11264 return value == ValueType::disabled || value == ValueType::downsample2x2
11265 || value == ValueType::downsample4x4 || value == ValueType::upsample2x2
11266 || value == ValueType::upsample4x4
11267 ? value
11268 : throw std::invalid_argument{
11269 "Invalid value: Mode{ "
11270 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
11271 + " }"
11272 };
11273 }
11274
11275 std::optional<ValueType> m_opt;
11276
11277 friend struct DataModel::Detail::Befriend<Mode>;
11278 };
11279
11280 using Descendants = std::tuple<Settings::Processing::Resampling::Mode>;
11281
11284
11296#ifndef NO_DOC
11297 template<
11298 typename... Args,
11299 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11300 typename std::enable_if<
11301 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11302 value,
11303 int>::type = 0>
11304#else
11305 template<typename... Args>
11306#endif
11307 explicit Resampling(Args &&...args)
11308 {
11309 using namespace Zivid::Detail::TypeTraits;
11310
11311 static_assert(
11312 AllArgsDecayedAreUnique<Args...>::value,
11313 "Found duplicate types among the arguments passed to Resampling(...). "
11314 "Types should be listed at most once.");
11315
11316 set(std::forward<Args>(args)...);
11317 }
11318
11329#ifndef NO_DOC
11330 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11331#else
11332 template<typename... Args>
11333#endif
11334 void set(Args &&...args)
11335 {
11336 using namespace Zivid::Detail::TypeTraits;
11337
11338 using AllArgsAreDescendantNodes =
11339 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11340 static_assert(
11341 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11342
11343 static_assert(
11344 AllArgsDecayedAreUnique<Args...>::value,
11345 "Found duplicate types among the arguments passed to set(...). "
11346 "Types should be listed at most once.");
11347
11348 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11349 }
11350
11362#ifndef NO_DOC
11363 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11364#else
11365 template<typename... Args>
11366#endif
11367 Resampling copyWith(Args &&...args) const
11368 {
11369 using namespace Zivid::Detail::TypeTraits;
11370
11371 using AllArgsAreDescendantNodes =
11372 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11373 static_assert(
11374 AllArgsAreDescendantNodes::value,
11375 "All arguments passed to copyWith(...) must be descendant nodes.");
11376
11377 static_assert(
11378 AllArgsDecayedAreUnique<Args...>::value,
11379 "Found duplicate types among the arguments passed to copyWith(...). "
11380 "Types should be listed at most once.");
11381
11382 auto copy{ *this };
11383 copy.set(std::forward<Args>(args)...);
11384 return copy;
11385 }
11386
11388 const Mode &mode() const
11389 {
11390 return m_mode;
11391 }
11392
11395 {
11396 return m_mode;
11397 }
11398
11400 Resampling &set(const Mode &value)
11401 {
11402 m_mode = value;
11403 return *this;
11404 }
11405
11406 template<
11407 typename T,
11408 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type =
11409 0>
11411 {
11412 return m_mode;
11413 }
11414
11415 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11417 {
11418 return m_mode;
11419 }
11420
11422 template<typename F>
11423 void forEach(const F &f) const
11424 {
11425 f(m_mode);
11426 }
11427
11429 template<typename F>
11430 void forEach(const F &f)
11431 {
11432 f(m_mode);
11433 }
11434
11436 bool operator==(const Resampling &other) const;
11437
11439 bool operator!=(const Resampling &other) const;
11440
11442 std::string toString() const;
11443
11445 friend std::ostream &operator<<(std::ostream &stream, const Resampling &value)
11446 {
11447 return stream << value.toString();
11448 }
11449
11450 private:
11451 void setFromString(const std::string &value);
11452
11453 void setFromString(const std::string &fullPath, const std::string &value);
11454
11455 std::string getString(const std::string &fullPath) const;
11456
11457 Mode m_mode;
11458
11459 friend struct DataModel::Detail::Befriend<Resampling>;
11460 };
11461
11462 using Descendants = std::tuple<
11512
11515
11575#ifndef NO_DOC
11576 template<
11577 typename... Args,
11578 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11579 typename std::enable_if<
11580 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11581 value,
11582 int>::type = 0>
11583#else
11584 template<typename... Args>
11585#endif
11586 explicit Processing(Args &&...args)
11587 {
11588 using namespace Zivid::Detail::TypeTraits;
11589
11590 static_assert(
11591 AllArgsDecayedAreUnique<Args...>::value,
11592 "Found duplicate types among the arguments passed to Processing(...). "
11593 "Types should be listed at most once.");
11594
11595 set(std::forward<Args>(args)...);
11596 }
11597
11656#ifndef NO_DOC
11657 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11658#else
11659 template<typename... Args>
11660#endif
11661 void set(Args &&...args)
11662 {
11663 using namespace Zivid::Detail::TypeTraits;
11664
11665 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11666 static_assert(
11667 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11668
11669 static_assert(
11670 AllArgsDecayedAreUnique<Args...>::value,
11671 "Found duplicate types among the arguments passed to set(...). "
11672 "Types should be listed at most once.");
11673
11674 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11675 }
11676
11736#ifndef NO_DOC
11737 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11738#else
11739 template<typename... Args>
11740#endif
11741 Processing copyWith(Args &&...args) const
11742 {
11743 using namespace Zivid::Detail::TypeTraits;
11744
11745 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11746 static_assert(
11747 AllArgsAreDescendantNodes::value,
11748 "All arguments passed to copyWith(...) must be descendant nodes.");
11749
11750 static_assert(
11751 AllArgsDecayedAreUnique<Args...>::value,
11752 "Found duplicate types among the arguments passed to copyWith(...). "
11753 "Types should be listed at most once.");
11754
11755 auto copy{ *this };
11756 copy.set(std::forward<Args>(args)...);
11757 return copy;
11758 }
11759
11761 const Color &color() const
11762 {
11763 return m_color;
11764 }
11765
11768 {
11769 return m_color;
11770 }
11771
11773 Processing &set(const Color &value)
11774 {
11775 m_color = value;
11776 return *this;
11777 }
11778
11781 {
11782 m_color.set(value);
11783 return *this;
11784 }
11785
11788 {
11789 m_color.set(value);
11790 return *this;
11791 }
11792
11795 {
11796 m_color.set(value);
11797 return *this;
11798 }
11799
11802 {
11803 m_color.set(value);
11804 return *this;
11805 }
11806
11809 {
11810 m_color.set(value);
11811 return *this;
11812 }
11813
11816 {
11817 m_color.set(value);
11818 return *this;
11819 }
11820
11823 {
11824 m_color.set(value);
11825 return *this;
11826 }
11827
11829 const Filters &filters() const
11830 {
11831 return m_filters;
11832 }
11833
11836 {
11837 return m_filters;
11838 }
11839
11841 Processing &set(const Filters &value)
11842 {
11843 m_filters = value;
11844 return *this;
11845 }
11846
11849 {
11850 m_filters.set(value);
11851 return *this;
11852 }
11853
11856 {
11857 m_filters.set(value);
11858 return *this;
11859 }
11860
11863 {
11864 m_filters.set(value);
11865 return *this;
11866 }
11867
11870 {
11871 m_filters.set(value);
11872 return *this;
11873 }
11874
11877 {
11878 m_filters.set(value);
11879 return *this;
11880 }
11881
11884 {
11885 m_filters.set(value);
11886 return *this;
11887 }
11888
11891 {
11892 m_filters.set(value);
11893 return *this;
11894 }
11895
11898 {
11899 m_filters.set(value);
11900 return *this;
11901 }
11902
11905 {
11906 m_filters.set(value);
11907 return *this;
11908 }
11909
11912 {
11913 m_filters.set(value);
11914 return *this;
11915 }
11916
11919 {
11920 m_filters.set(value);
11921 return *this;
11922 }
11923
11926 {
11927 m_filters.set(value);
11928 return *this;
11929 }
11930
11933 {
11934 m_filters.set(value);
11935 return *this;
11936 }
11937
11940 {
11941 m_filters.set(value);
11942 return *this;
11943 }
11944
11947 {
11948 m_filters.set(value);
11949 return *this;
11950 }
11951
11954 {
11955 m_filters.set(value);
11956 return *this;
11957 }
11958
11961 {
11962 m_filters.set(value);
11963 return *this;
11964 }
11965
11968 {
11969 m_filters.set(value);
11970 return *this;
11971 }
11972
11975 {
11976 m_filters.set(value);
11977 return *this;
11978 }
11979
11982 {
11983 m_filters.set(value);
11984 return *this;
11985 }
11986
11989 {
11990 m_filters.set(value);
11991 return *this;
11992 }
11993
11996 {
11997 m_filters.set(value);
11998 return *this;
11999 }
12000
12003 {
12004 m_filters.set(value);
12005 return *this;
12006 }
12007
12010 {
12011 m_filters.set(value);
12012 return *this;
12013 }
12014
12017 {
12018 m_filters.set(value);
12019 return *this;
12020 }
12021
12024 {
12025 m_filters.set(value);
12026 return *this;
12027 }
12028
12031 {
12032 m_filters.set(value);
12033 return *this;
12034 }
12035
12038 {
12039 m_filters.set(value);
12040 return *this;
12041 }
12042
12045 {
12046 m_filters.set(value);
12047 return *this;
12048 }
12049
12052 {
12053 m_filters.set(value);
12054 return *this;
12055 }
12056
12059 {
12060 m_filters.set(value);
12061 return *this;
12062 }
12063
12066 {
12067 m_filters.set(value);
12068 return *this;
12069 }
12070
12073 {
12074 m_filters.set(value);
12075 return *this;
12076 }
12077
12080 {
12081 m_filters.set(value);
12082 return *this;
12083 }
12084
12087 {
12088 m_filters.set(value);
12089 return *this;
12090 }
12091
12094 {
12095 m_filters.set(value);
12096 return *this;
12097 }
12098
12101 {
12102 m_filters.set(value);
12103 return *this;
12104 }
12105
12108 {
12109 m_filters.set(value);
12110 return *this;
12111 }
12112
12114 const Resampling &resampling() const
12115 {
12116 return m_resampling;
12117 }
12118
12121 {
12122 return m_resampling;
12123 }
12124
12127 {
12128 m_resampling = value;
12129 return *this;
12130 }
12131
12134 {
12135 m_resampling.set(value);
12136 return *this;
12137 }
12138
12139 template<
12140 typename T,
12141 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
12143 {
12144 return m_color;
12145 }
12146
12147 template<
12148 typename T,
12149 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
12151 {
12152 return m_color.get<Settings::Processing::Color::Balance>();
12153 }
12154
12155 template<
12156 typename T,
12157 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
12158 0>
12160 {
12161 return m_color.get<Settings::Processing::Color::Balance::Blue>();
12162 }
12163
12164 template<
12165 typename T,
12166 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
12167 type = 0>
12169 {
12170 return m_color.get<Settings::Processing::Color::Balance::Green>();
12171 }
12172
12173 template<
12174 typename T,
12175 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
12176 0>
12178 {
12179 return m_color.get<Settings::Processing::Color::Balance::Red>();
12180 }
12181
12182 template<
12183 typename T,
12184 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
12185 0>
12187 {
12189 }
12190
12191 template<
12192 typename T,
12193 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
12194 type = 0>
12196 {
12198 }
12199
12200 template<
12201 typename T,
12202 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
12204 {
12205 return m_color.get<Settings::Processing::Color::Gamma>();
12206 }
12207
12208 template<
12209 typename T,
12210 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
12212 {
12213 return m_filters;
12214 }
12215
12216 template<
12217 typename T,
12218 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
12220 {
12221 return m_filters.get<Settings::Processing::Filters::Cluster>();
12222 }
12223
12224 template<
12225 typename T,
12226 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
12227 type = 0>
12229 {
12231 }
12232
12233 template<
12234 typename T,
12235 typename std::enable_if<
12236 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
12237 int>::type = 0>
12239 {
12241 }
12242
12243 template<
12244 typename T,
12245 typename std::enable_if<
12246 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
12247 int>::type = 0>
12249 {
12251 }
12252
12253 template<
12254 typename T,
12255 typename std::enable_if<
12256 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
12257 int>::type = 0>
12259 {
12261 }
12262
12263 template<
12264 typename T,
12265 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
12266 type = 0>
12268 {
12270 }
12271
12272 template<
12273 typename T,
12274 typename std::enable_if<
12275 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
12276 int>::type = 0>
12278 {
12280 }
12281
12282 template<
12283 typename T,
12284 typename std::enable_if<
12285 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
12286 int>::type = 0>
12288 {
12290 }
12291
12292 template<
12293 typename T,
12294 typename std::enable_if<
12295 std::is_same<
12296 T,
12298 int>::type = 0>
12300 {
12301 return m_filters
12303 }
12304
12305 template<
12306 typename T,
12307 typename std::enable_if<
12308 std::is_same<
12309 T,
12311 int>::type = 0>
12313 {
12314 return m_filters
12316 }
12317
12318 template<
12319 typename T,
12320 typename std::enable_if<
12321 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
12322 int>::type = 0>
12324 {
12326 }
12327
12328 template<
12329 typename T,
12330 typename std::enable_if<
12331 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12332 value,
12333 int>::type = 0>
12335 {
12336 return m_filters
12338 }
12339
12340 template<
12341 typename T,
12342 typename std::enable_if<
12343 std::is_same<
12344 T,
12346 int>::type = 0>
12348 {
12349 return m_filters
12351 }
12352
12353 template<
12354 typename T,
12355 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
12357 {
12358 return m_filters.get<Settings::Processing::Filters::Hole>();
12359 }
12360
12361 template<
12362 typename T,
12363 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
12364 type = 0>
12366 {
12368 }
12369
12370 template<
12371 typename T,
12372 typename std::enable_if<
12373 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
12374 int>::type = 0>
12376 {
12378 }
12379
12380 template<
12381 typename T,
12382 typename std::enable_if<
12383 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
12384 int>::type = 0>
12386 {
12388 }
12389
12390 template<
12391 typename T,
12392 typename std::enable_if<
12393 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
12394 int>::type = 0>
12396 {
12398 }
12399
12400 template<
12401 typename T,
12402 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12404 {
12405 return m_filters.get<Settings::Processing::Filters::Noise>();
12406 }
12407
12408 template<
12409 typename T,
12410 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12411 type = 0>
12413 {
12415 }
12416
12417 template<
12418 typename T,
12419 typename std::enable_if<
12420 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
12421 int>::type = 0>
12423 {
12425 }
12426
12427 template<
12428 typename T,
12429 typename std::enable_if<
12430 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12431 int>::type = 0>
12433 {
12435 }
12436
12437 template<
12438 typename T,
12439 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12440 type = 0>
12442 {
12444 }
12445
12446 template<
12447 typename T,
12448 typename std::enable_if<
12449 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12450 int>::type = 0>
12452 {
12454 }
12455
12456 template<
12457 typename T,
12458 typename std::
12459 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12461 {
12463 }
12464
12465 template<
12466 typename T,
12467 typename std::enable_if<
12468 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12469 int>::type = 0>
12471 {
12473 }
12474
12475 template<
12476 typename T,
12477 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12479 {
12480 return m_filters.get<Settings::Processing::Filters::Outlier>();
12481 }
12482
12483 template<
12484 typename T,
12485 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12486 type = 0>
12488 {
12490 }
12491
12492 template<
12493 typename T,
12494 typename std::enable_if<
12495 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
12496 int>::type = 0>
12498 {
12500 }
12501
12502 template<
12503 typename T,
12504 typename std::enable_if<
12505 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12506 int>::type = 0>
12508 {
12510 }
12511
12512 template<
12513 typename T,
12514 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12515 0>
12517 {
12519 }
12520
12521 template<
12522 typename T,
12523 typename std::enable_if<
12524 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
12525 int>::type = 0>
12527 {
12529 }
12530
12531 template<
12532 typename T,
12533 typename std::enable_if<
12534 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
12535 int>::type = 0>
12537 {
12539 }
12540
12541 template<
12542 typename T,
12543 typename std::enable_if<
12544 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
12545 int>::type = 0>
12547 {
12549 }
12550
12551 template<
12552 typename T,
12553 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12554 0>
12556 {
12558 }
12559
12560 template<
12561 typename T,
12562 typename std::enable_if<
12563 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
12564 int>::type = 0>
12566 {
12568 }
12569
12570 template<
12571 typename T,
12572 typename std::enable_if<
12573 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
12574 int>::type = 0>
12576 {
12578 }
12579
12580 template<
12581 typename T,
12582 typename std::enable_if<
12583 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12584 int>::type = 0>
12586 {
12588 }
12589
12590 template<
12591 typename T,
12592 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
12594 {
12595 return m_resampling;
12596 }
12597
12598 template<
12599 typename T,
12600 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
12602 {
12603 return m_resampling.get<Settings::Processing::Resampling::Mode>();
12604 }
12605
12606 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12608 {
12609 return m_color;
12610 }
12611
12612 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12614 {
12615 return m_filters;
12616 }
12617
12618 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
12620 {
12621 return m_resampling;
12622 }
12623
12625 template<typename F>
12626 void forEach(const F &f) const
12627 {
12628 f(m_color);
12629 f(m_filters);
12630 f(m_resampling);
12631 }
12632
12634 template<typename F>
12635 void forEach(const F &f)
12636 {
12637 f(m_color);
12638 f(m_filters);
12639 f(m_resampling);
12640 }
12641
12643 bool operator==(const Processing &other) const;
12644
12646 bool operator!=(const Processing &other) const;
12647
12649 std::string toString() const;
12650
12652 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12653 {
12654 return stream << value.toString();
12655 }
12656
12657 private:
12658 void setFromString(const std::string &value);
12659
12660 void setFromString(const std::string &fullPath, const std::string &value);
12661
12662 std::string getString(const std::string &fullPath) const;
12663
12664 Color m_color;
12665 Filters m_filters;
12666 Resampling m_resampling;
12667
12668 friend struct DataModel::Detail::Befriend<Processing>;
12669 };
12670
12673
12674 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12676 {
12677 public:
12679 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12680
12682 static constexpr const char *path{ "RegionOfInterest" };
12683
12685 static constexpr const char *name{ "RegionOfInterest" };
12686
12688 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12689)description" };
12690
12707
12708 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12710 {
12711 public:
12713 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12714
12716 static constexpr const char *path{ "RegionOfInterest/Box" };
12717
12719 static constexpr const char *name{ "Box" };
12720
12722 static constexpr const char *description{
12723 R"description(Removes points outside the given three-dimensional box.
12724
12725Using this feature may significantly speed up acquisition and processing time, because
12726one can avoid acquiring and processing data that is guaranteed to fall outside of the
12727region of interest. The degree of speed-up depends on the size and shape of the box.
12728Generally, a smaller box yields a greater speed-up.
12729
12730The box is defined by three points: O, A and B. These points define two vectors,
12731OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12732This gives 4 points O, A, B and (O + OA + OB), that together form a
12733parallelogram in 3D.
12734
12735Two extents can be provided, to extrude the parallelogram along the surface
12736normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12737The surface normal vector is defined by the cross product OA x OB.
12738)description"
12739 };
12740
12742
12743 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12745 {
12746 public:
12748 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12749
12751 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12752
12754 static constexpr const char *name{ "Enabled" };
12755
12757 static constexpr const char *description{
12758 R"description(Enable or disable box filter.)description"
12759 };
12760
12762 using ValueType = bool;
12763 static const Enabled yes;
12764 static const Enabled no;
12765
12767 static std::set<bool> validValues()
12768 {
12769 return { false, true };
12770 }
12771
12773 Enabled() = default;
12774
12776 explicit constexpr Enabled(bool value)
12777 : m_opt{ value }
12778 {}
12779
12784 bool value() const;
12785
12787 bool hasValue() const;
12788
12790 void reset();
12791
12793 std::string toString() const;
12794
12796 bool operator==(const Enabled &other) const
12797 {
12798 return m_opt == other.m_opt;
12799 }
12800
12802 bool operator!=(const Enabled &other) const
12803 {
12804 return m_opt != other.m_opt;
12805 }
12806
12808 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12809 {
12810 return stream << value.toString();
12811 }
12812
12813 private:
12814 void setFromString(const std::string &value);
12815
12816 std::optional<bool> m_opt;
12817
12818 friend struct DataModel::Detail::Befriend<Enabled>;
12819 };
12820
12822
12823 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12825 {
12826 public:
12828 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12829
12831 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12832
12834 static constexpr const char *name{ "Extents" };
12835
12837 static constexpr const char *description{
12838 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12839 };
12840
12843
12845 Extents() = default;
12846
12848 explicit constexpr Extents(Zivid::Range<double> value)
12849 : m_opt{ value }
12850 {}
12851
12857
12859 bool hasValue() const;
12860
12862 void reset();
12863
12865 std::string toString() const;
12866
12868 explicit constexpr Extents(double minValue, double maxValue)
12869 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12870 {}
12871
12873 bool operator==(const Extents &other) const
12874 {
12875 return m_opt == other.m_opt;
12876 }
12877
12879 bool operator!=(const Extents &other) const
12880 {
12881 return m_opt != other.m_opt;
12882 }
12883
12885 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12886 {
12887 return stream << value.toString();
12888 }
12889
12890 private:
12891 void setFromString(const std::string &value);
12892
12893 std::optional<Zivid::Range<double>> m_opt;
12894
12895 friend struct DataModel::Detail::Befriend<Extents>;
12896 };
12897
12899
12900 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12902 {
12903 public:
12905 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12906
12908 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12909
12911 static constexpr const char *name{ "PointA" };
12912
12914 static constexpr const char *description{
12915 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram.)description"
12916 };
12917
12920
12922 PointA() = default;
12923
12925 explicit constexpr PointA(Zivid::PointXYZ value)
12926 : m_opt{ value }
12927 {}
12928
12934
12936 bool hasValue() const;
12937
12939 void reset();
12940
12942 std::string toString() const;
12943
12945 explicit constexpr PointA(float x, float y, float z)
12946 : PointA{ Zivid::PointXYZ{ x, y, z } }
12947 {}
12948
12950 bool operator==(const PointA &other) const
12951 {
12952 return m_opt == other.m_opt;
12953 }
12954
12956 bool operator!=(const PointA &other) const
12957 {
12958 return m_opt != other.m_opt;
12959 }
12960
12962 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12963 {
12964 return stream << value.toString();
12965 }
12966
12967 private:
12968 void setFromString(const std::string &value);
12969
12970 std::optional<Zivid::PointXYZ> m_opt;
12971
12972 friend struct DataModel::Detail::Befriend<PointA>;
12973 };
12974
12976
12977 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12979 {
12980 public:
12982 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12983
12985 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12986
12988 static constexpr const char *name{ "PointB" };
12989
12991 static constexpr const char *description{
12992 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram.)description"
12993 };
12994
12997
12999 PointB() = default;
13000
13002 explicit constexpr PointB(Zivid::PointXYZ value)
13003 : m_opt{ value }
13004 {}
13005
13011
13013 bool hasValue() const;
13014
13016 void reset();
13017
13019 std::string toString() const;
13020
13022 explicit constexpr PointB(float x, float y, float z)
13023 : PointB{ Zivid::PointXYZ{ x, y, z } }
13024 {}
13025
13027 bool operator==(const PointB &other) const
13028 {
13029 return m_opt == other.m_opt;
13030 }
13031
13033 bool operator!=(const PointB &other) const
13034 {
13035 return m_opt != other.m_opt;
13036 }
13037
13039 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
13040 {
13041 return stream << value.toString();
13042 }
13043
13044 private:
13045 void setFromString(const std::string &value);
13046
13047 std::optional<Zivid::PointXYZ> m_opt;
13048
13049 friend struct DataModel::Detail::Befriend<PointB>;
13050 };
13051
13053
13054 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13056 {
13057 public:
13059 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13060
13062 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
13063
13065 static constexpr const char *name{ "PointO" };
13066
13068 static constexpr const char *description{
13069 R"description(The point at the intersection of two adjacent edges defining a parallelogram.)description"
13070 };
13071
13074
13076 PointO() = default;
13077
13079 explicit constexpr PointO(Zivid::PointXYZ value)
13080 : m_opt{ value }
13081 {}
13082
13088
13090 bool hasValue() const;
13091
13093 void reset();
13094
13096 std::string toString() const;
13097
13099 explicit constexpr PointO(float x, float y, float z)
13100 : PointO{ Zivid::PointXYZ{ x, y, z } }
13101 {}
13102
13104 bool operator==(const PointO &other) const
13105 {
13106 return m_opt == other.m_opt;
13107 }
13108
13110 bool operator!=(const PointO &other) const
13111 {
13112 return m_opt != other.m_opt;
13113 }
13114
13116 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
13117 {
13118 return stream << value.toString();
13119 }
13120
13121 private:
13122 void setFromString(const std::string &value);
13123
13124 std::optional<Zivid::PointXYZ> m_opt;
13125
13126 friend struct DataModel::Detail::Befriend<PointO>;
13127 };
13128
13129 using Descendants = std::tuple<
13135
13138
13154#ifndef NO_DOC
13155 template<
13156 typename... Args,
13157 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13158 typename std::enable_if<
13159 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13160 value,
13161 int>::type = 0>
13162#else
13163 template<typename... Args>
13164#endif
13165 explicit Box(Args &&...args)
13166 {
13167 using namespace Zivid::Detail::TypeTraits;
13168
13169 static_assert(
13170 AllArgsDecayedAreUnique<Args...>::value,
13171 "Found duplicate types among the arguments passed to Box(...). "
13172 "Types should be listed at most once.");
13173
13174 set(std::forward<Args>(args)...);
13175 }
13176
13191#ifndef NO_DOC
13192 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13193#else
13194 template<typename... Args>
13195#endif
13196 void set(Args &&...args)
13197 {
13198 using namespace Zivid::Detail::TypeTraits;
13199
13200 using AllArgsAreDescendantNodes =
13201 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13202 static_assert(
13203 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13204
13205 static_assert(
13206 AllArgsDecayedAreUnique<Args...>::value,
13207 "Found duplicate types among the arguments passed to set(...). "
13208 "Types should be listed at most once.");
13209
13210 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13211 }
13212
13228#ifndef NO_DOC
13229 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13230#else
13231 template<typename... Args>
13232#endif
13233 Box copyWith(Args &&...args) const
13234 {
13235 using namespace Zivid::Detail::TypeTraits;
13236
13237 using AllArgsAreDescendantNodes =
13238 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13239 static_assert(
13240 AllArgsAreDescendantNodes::value,
13241 "All arguments passed to copyWith(...) must be descendant nodes.");
13242
13243 static_assert(
13244 AllArgsDecayedAreUnique<Args...>::value,
13245 "Found duplicate types among the arguments passed to copyWith(...). "
13246 "Types should be listed at most once.");
13247
13248 auto copy{ *this };
13249 copy.set(std::forward<Args>(args)...);
13250 return copy;
13251 }
13252
13254 const Enabled &isEnabled() const
13255 {
13256 return m_enabled;
13257 }
13258
13261 {
13262 return m_enabled;
13263 }
13264
13266 Box &set(const Enabled &value)
13267 {
13268 m_enabled = value;
13269 return *this;
13270 }
13271
13273 const Extents &extents() const
13274 {
13275 return m_extents;
13276 }
13277
13280 {
13281 return m_extents;
13282 }
13283
13285 Box &set(const Extents &value)
13286 {
13287 m_extents = value;
13288 return *this;
13289 }
13290
13292 const PointA &pointA() const
13293 {
13294 return m_pointA;
13295 }
13296
13299 {
13300 return m_pointA;
13301 }
13302
13304 Box &set(const PointA &value)
13305 {
13306 m_pointA = value;
13307 return *this;
13308 }
13309
13311 const PointB &pointB() const
13312 {
13313 return m_pointB;
13314 }
13315
13318 {
13319 return m_pointB;
13320 }
13321
13323 Box &set(const PointB &value)
13324 {
13325 m_pointB = value;
13326 return *this;
13327 }
13328
13330 const PointO &pointO() const
13331 {
13332 return m_pointO;
13333 }
13334
13337 {
13338 return m_pointO;
13339 }
13340
13342 Box &set(const PointO &value)
13343 {
13344 m_pointO = value;
13345 return *this;
13346 }
13347
13348 template<
13349 typename T,
13350 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
13351 type = 0>
13353 {
13354 return m_enabled;
13355 }
13356
13357 template<
13358 typename T,
13359 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
13360 type = 0>
13362 {
13363 return m_extents;
13364 }
13365
13366 template<
13367 typename T,
13368 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13369 type = 0>
13371 {
13372 return m_pointA;
13373 }
13374
13375 template<
13376 typename T,
13377 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13378 type = 0>
13380 {
13381 return m_pointB;
13382 }
13383
13384 template<
13385 typename T,
13386 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13387 type = 0>
13389 {
13390 return m_pointO;
13391 }
13392
13393 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13395 {
13396 return m_enabled;
13397 }
13398
13399 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13401 {
13402 return m_extents;
13403 }
13404
13405 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13407 {
13408 return m_pointA;
13409 }
13410
13411 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13413 {
13414 return m_pointB;
13415 }
13416
13417 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13419 {
13420 return m_pointO;
13421 }
13422
13424 template<typename F>
13425 void forEach(const F &f) const
13426 {
13427 f(m_enabled);
13428 f(m_extents);
13429 f(m_pointA);
13430 f(m_pointB);
13431 f(m_pointO);
13432 }
13433
13435 template<typename F>
13436 void forEach(const F &f)
13437 {
13438 f(m_enabled);
13439 f(m_extents);
13440 f(m_pointA);
13441 f(m_pointB);
13442 f(m_pointO);
13443 }
13444
13446 bool operator==(const Box &other) const;
13447
13449 bool operator!=(const Box &other) const;
13450
13452 std::string toString() const;
13453
13455 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13456 {
13457 return stream << value.toString();
13458 }
13459
13460 private:
13461 void setFromString(const std::string &value);
13462
13463 void setFromString(const std::string &fullPath, const std::string &value);
13464
13465 std::string getString(const std::string &fullPath) const;
13466
13467 Enabled m_enabled;
13468 Extents m_extents;
13469 PointA m_pointA;
13470 PointB m_pointB;
13471 PointO m_pointO;
13472
13473 friend struct DataModel::Detail::Befriend<Box>;
13474 };
13475
13479
13480 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13482 {
13483 public:
13485 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13486
13488 static constexpr const char *path{ "RegionOfInterest/Depth" };
13489
13491 static constexpr const char *name{ "Depth" };
13492
13494 static constexpr const char *description{
13495 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13496falls above a given maximum or below a given minimum.
13497)description"
13498 };
13499
13501
13502 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13504 {
13505 public:
13507 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13508
13510 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13511
13513 static constexpr const char *name{ "Enabled" };
13514
13516 static constexpr const char *description{
13517 R"description(Enable or disable depth filter.)description"
13518 };
13519
13521 using ValueType = bool;
13522 static const Enabled yes;
13523 static const Enabled no;
13524
13526 static std::set<bool> validValues()
13527 {
13528 return { false, true };
13529 }
13530
13532 Enabled() = default;
13533
13535 explicit constexpr Enabled(bool value)
13536 : m_opt{ value }
13537 {}
13538
13543 bool value() const;
13544
13546 bool hasValue() const;
13547
13549 void reset();
13550
13552 std::string toString() const;
13553
13555 bool operator==(const Enabled &other) const
13556 {
13557 return m_opt == other.m_opt;
13558 }
13559
13561 bool operator!=(const Enabled &other) const
13562 {
13563 return m_opt != other.m_opt;
13564 }
13565
13567 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13568 {
13569 return stream << value.toString();
13570 }
13571
13572 private:
13573 void setFromString(const std::string &value);
13574
13575 std::optional<bool> m_opt;
13576
13577 friend struct DataModel::Detail::Befriend<Enabled>;
13578 };
13579
13581
13582 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13584 {
13585 public:
13587 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13588
13590 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13591
13593 static constexpr const char *name{ "Range" };
13594
13596 static constexpr const char *description{
13597 R"description(Specify the minimum and maximum Z value that will be included.)description"
13598 };
13599
13602
13604 Range() = default;
13605
13607 explicit constexpr Range(Zivid::Range<double> value)
13608 : m_opt{ value }
13609 {}
13610
13616
13618 bool hasValue() const;
13619
13621 void reset();
13622
13624 std::string toString() const;
13625
13627 explicit constexpr Range(double minValue, double maxValue)
13628 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13629 {}
13630
13632 bool operator==(const Range &other) const
13633 {
13634 return m_opt == other.m_opt;
13635 }
13636
13638 bool operator!=(const Range &other) const
13639 {
13640 return m_opt != other.m_opt;
13641 }
13642
13644 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13645 {
13646 return stream << value.toString();
13647 }
13648
13649 private:
13650 void setFromString(const std::string &value);
13651
13652 std::optional<Zivid::Range<double>> m_opt;
13653
13654 friend struct DataModel::Detail::Befriend<Range>;
13655 };
13656
13658 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13659
13662
13675#ifndef NO_DOC
13676 template<
13677 typename... Args,
13678 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13679 typename std::enable_if<
13680 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13681 value,
13682 int>::type = 0>
13683#else
13684 template<typename... Args>
13685#endif
13686 explicit Depth(Args &&...args)
13687 {
13688 using namespace Zivid::Detail::TypeTraits;
13689
13690 static_assert(
13691 AllArgsDecayedAreUnique<Args...>::value,
13692 "Found duplicate types among the arguments passed to Depth(...). "
13693 "Types should be listed at most once.");
13694
13695 set(std::forward<Args>(args)...);
13696 }
13697
13709#ifndef NO_DOC
13710 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13711#else
13712 template<typename... Args>
13713#endif
13714 void set(Args &&...args)
13715 {
13716 using namespace Zivid::Detail::TypeTraits;
13717
13718 using AllArgsAreDescendantNodes =
13719 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13720 static_assert(
13721 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13722
13723 static_assert(
13724 AllArgsDecayedAreUnique<Args...>::value,
13725 "Found duplicate types among the arguments passed to set(...). "
13726 "Types should be listed at most once.");
13727
13728 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13729 }
13730
13743#ifndef NO_DOC
13744 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13745#else
13746 template<typename... Args>
13747#endif
13748 Depth copyWith(Args &&...args) const
13749 {
13750 using namespace Zivid::Detail::TypeTraits;
13751
13752 using AllArgsAreDescendantNodes =
13753 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13754 static_assert(
13755 AllArgsAreDescendantNodes::value,
13756 "All arguments passed to copyWith(...) must be descendant nodes.");
13757
13758 static_assert(
13759 AllArgsDecayedAreUnique<Args...>::value,
13760 "Found duplicate types among the arguments passed to copyWith(...). "
13761 "Types should be listed at most once.");
13762
13763 auto copy{ *this };
13764 copy.set(std::forward<Args>(args)...);
13765 return copy;
13766 }
13767
13769 const Enabled &isEnabled() const
13770 {
13771 return m_enabled;
13772 }
13773
13776 {
13777 return m_enabled;
13778 }
13779
13781 Depth &set(const Enabled &value)
13782 {
13783 m_enabled = value;
13784 return *this;
13785 }
13786
13788 const Range &range() const
13789 {
13790 return m_range;
13791 }
13792
13795 {
13796 return m_range;
13797 }
13798
13800 Depth &set(const Range &value)
13801 {
13802 m_range = value;
13803 return *this;
13804 }
13805
13806 template<
13807 typename T,
13808 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13809 type = 0>
13811 {
13812 return m_enabled;
13813 }
13814
13815 template<
13816 typename T,
13817 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13818 type = 0>
13820 {
13821 return m_range;
13822 }
13823
13824 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13826 {
13827 return m_enabled;
13828 }
13829
13830 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13832 {
13833 return m_range;
13834 }
13835
13837 template<typename F>
13838 void forEach(const F &f) const
13839 {
13840 f(m_enabled);
13841 f(m_range);
13842 }
13843
13845 template<typename F>
13846 void forEach(const F &f)
13847 {
13848 f(m_enabled);
13849 f(m_range);
13850 }
13851
13853 bool operator==(const Depth &other) const;
13854
13856 bool operator!=(const Depth &other) const;
13857
13859 std::string toString() const;
13860
13862 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13863 {
13864 return stream << value.toString();
13865 }
13866
13867 private:
13868 void setFromString(const std::string &value);
13869
13870 void setFromString(const std::string &fullPath, const std::string &value);
13871
13872 std::string getString(const std::string &fullPath) const;
13873
13874 Enabled m_enabled;
13875 Range m_range;
13876
13877 friend struct DataModel::Detail::Befriend<Depth>;
13878 };
13879
13880 using Descendants = std::tuple<
13890
13893
13913#ifndef NO_DOC
13914 template<
13915 typename... Args,
13916 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13917 typename std::enable_if<
13918 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13919 value,
13920 int>::type = 0>
13921#else
13922 template<typename... Args>
13923#endif
13924 explicit RegionOfInterest(Args &&...args)
13925 {
13926 using namespace Zivid::Detail::TypeTraits;
13927
13928 static_assert(
13929 AllArgsDecayedAreUnique<Args...>::value,
13930 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13931 "Types should be listed at most once.");
13932
13933 set(std::forward<Args>(args)...);
13934 }
13935
13954#ifndef NO_DOC
13955 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13956#else
13957 template<typename... Args>
13958#endif
13959 void set(Args &&...args)
13960 {
13961 using namespace Zivid::Detail::TypeTraits;
13962
13963 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13964 static_assert(
13965 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13966
13967 static_assert(
13968 AllArgsDecayedAreUnique<Args...>::value,
13969 "Found duplicate types among the arguments passed to set(...). "
13970 "Types should be listed at most once.");
13971
13972 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13973 }
13974
13994#ifndef NO_DOC
13995 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13996#else
13997 template<typename... Args>
13998#endif
13999 RegionOfInterest copyWith(Args &&...args) const
14000 {
14001 using namespace Zivid::Detail::TypeTraits;
14002
14003 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14004 static_assert(
14005 AllArgsAreDescendantNodes::value,
14006 "All arguments passed to copyWith(...) must be descendant nodes.");
14007
14008 static_assert(
14009 AllArgsDecayedAreUnique<Args...>::value,
14010 "Found duplicate types among the arguments passed to copyWith(...). "
14011 "Types should be listed at most once.");
14012
14013 auto copy{ *this };
14014 copy.set(std::forward<Args>(args)...);
14015 return copy;
14016 }
14017
14019 const Box &box() const
14020 {
14021 return m_box;
14022 }
14023
14026 {
14027 return m_box;
14028 }
14029
14031 RegionOfInterest &set(const Box &value)
14032 {
14033 m_box = value;
14034 return *this;
14035 }
14036
14039 {
14040 m_box.set(value);
14041 return *this;
14042 }
14043
14046 {
14047 m_box.set(value);
14048 return *this;
14049 }
14050
14053 {
14054 m_box.set(value);
14055 return *this;
14056 }
14057
14060 {
14061 m_box.set(value);
14062 return *this;
14063 }
14064
14067 {
14068 m_box.set(value);
14069 return *this;
14070 }
14071
14073 const Depth &depth() const
14074 {
14075 return m_depth;
14076 }
14077
14080 {
14081 return m_depth;
14082 }
14083
14086 {
14087 m_depth = value;
14088 return *this;
14089 }
14090
14093 {
14094 m_depth.set(value);
14095 return *this;
14096 }
14097
14100 {
14101 m_depth.set(value);
14102 return *this;
14103 }
14104
14105 template<
14106 typename T,
14107 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
14109 {
14110 return m_box;
14111 }
14112
14113 template<
14114 typename T,
14115 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
14116 0>
14118 {
14119 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
14120 }
14121
14122 template<
14123 typename T,
14124 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
14125 0>
14127 {
14128 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
14129 }
14130
14131 template<
14132 typename T,
14133 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
14135 {
14136 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
14137 }
14138
14139 template<
14140 typename T,
14141 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
14143 {
14144 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
14145 }
14146
14147 template<
14148 typename T,
14149 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
14151 {
14152 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
14153 }
14154
14155 template<
14156 typename T,
14157 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
14159 {
14160 return m_depth;
14161 }
14162
14163 template<
14164 typename T,
14165 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
14166 0>
14168 {
14169 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
14170 }
14171
14172 template<
14173 typename T,
14174 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
14175 0>
14177 {
14178 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
14179 }
14180
14181 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14183 {
14184 return m_box;
14185 }
14186
14187 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14189 {
14190 return m_depth;
14191 }
14192
14194 template<typename F>
14195 void forEach(const F &f) const
14196 {
14197 f(m_box);
14198 f(m_depth);
14199 }
14200
14202 template<typename F>
14203 void forEach(const F &f)
14204 {
14205 f(m_box);
14206 f(m_depth);
14207 }
14208
14210 bool operator==(const RegionOfInterest &other) const;
14211
14213 bool operator!=(const RegionOfInterest &other) const;
14214
14216 std::string toString() const;
14217
14219 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
14220 {
14221 return stream << value.toString();
14222 }
14223
14224 private:
14225 void setFromString(const std::string &value);
14226
14227 void setFromString(const std::string &fullPath, const std::string &value);
14228
14229 std::string getString(const std::string &fullPath) const;
14230
14231 Box m_box;
14232 Depth m_depth;
14233
14234 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
14235 };
14236
14239
14240 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14242 {
14243 public:
14245 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
14246
14248 static constexpr const char *path{ "Sampling" };
14249
14251 static constexpr const char *name{ "Sampling" };
14252
14254 static constexpr const char *description{ R"description(Sampling settings.
14255)description" };
14256
14270
14271 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14273 {
14274 public:
14276 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14277
14279 static constexpr const char *path{ "Sampling/Color" };
14280
14282 static constexpr const char *name{ "Color" };
14283
14285 static constexpr const char *description{
14286 R"description(Choose how to sample colors for the point cloud. The `rgb` option gives a 2D image
14287with full colors. The `grayscale` option gives a grayscale (r=g=b) 2D image, which
14288can be acquired faster than full colors. The `disabled` option gives no colors and
14289can allow for even faster captures.
14290
14291The `grayscale` option is not available on all camera models.
14292
14293This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
14294version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
14295in the `Settings/Color` field. Tip: If you want to convert an existing settings.yml file to
14296the recommended API, you can import the .yml file into Zivid Studio and then re-export it to
14297.yml.
14298)description"
14299 };
14300
14302 enum class ValueType
14303 {
14304 rgb,
14305 disabled,
14306 grayscale
14307 };
14308 static const Color rgb;
14309 static const Color disabled;
14310 static const Color grayscale;
14311
14313 static std::set<ValueType> validValues()
14314 {
14315 return { ValueType::rgb, ValueType::disabled, ValueType::grayscale };
14316 }
14317
14319 Color() = default;
14320
14322 explicit constexpr Color(ValueType value)
14323 : m_opt{ verifyValue(value) }
14324 {}
14325
14331
14333 bool hasValue() const;
14334
14336 void reset();
14337
14339 std::string toString() const;
14340
14342 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
14343 {
14344 return stream << Color{ value }.toString();
14345 }
14346
14348 bool operator==(const Color &other) const
14349 {
14350 return m_opt == other.m_opt;
14351 }
14352
14354 bool operator!=(const Color &other) const
14355 {
14356 return m_opt != other.m_opt;
14357 }
14358
14360 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
14361 {
14362 return stream << value.toString();
14363 }
14364
14365 private:
14366 void setFromString(const std::string &value);
14367
14368 constexpr ValueType static verifyValue(const ValueType &value)
14369 {
14370 return value == ValueType::rgb || value == ValueType::disabled || value == ValueType::grayscale
14371 ? value
14372 : throw std::invalid_argument{
14373 "Invalid value: Color{ "
14374 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14375 };
14376 }
14377
14378 std::optional<ValueType> m_opt;
14379
14380 friend struct DataModel::Detail::Befriend<Color>;
14381 };
14382
14395
14396 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14398 {
14399 public:
14401 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14402
14404 static constexpr const char *path{ "Sampling/Pixel" };
14405
14407 static constexpr const char *name{ "Pixel" };
14408
14410 static constexpr const char *description{
14411 R"description(For Zivid 2/2+, this setting controls whether to read out the full image sensor and
14412use white projector light or to subsample pixels for specific color channels with
14413corresponding projector light. Picking a specific color channel can help reduce noise
14414and effects of ambient light - projecting blue light is recommended.
14415
14416For Zivid 2+R, the user does not have to set the projection color and should only
14417consider whether to scale the resolution `by2x2` or `by4x4`. Both of these modes
14418will boost the signal strength by about 4x compared to `all`, so the user should
14419consider a corresponding reduction in exposure time.
14420
14421Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.
14422)description"
14423 };
14424
14426 enum class ValueType
14427 {
14428 all,
14429 blueSubsample2x2,
14430 redSubsample2x2,
14431 blueSubsample4x4,
14432 redSubsample4x4,
14433 by2x2,
14434 by4x4
14435 };
14436 static const Pixel all;
14438 static const Pixel redSubsample2x2;
14440 static const Pixel redSubsample4x4;
14441 static const Pixel by2x2;
14442 static const Pixel by4x4;
14443
14445 static std::set<ValueType> validValues()
14446 {
14447 return { ValueType::all,
14448 ValueType::blueSubsample2x2,
14449 ValueType::redSubsample2x2,
14450 ValueType::blueSubsample4x4,
14451 ValueType::redSubsample4x4,
14452 ValueType::by2x2,
14453 ValueType::by4x4 };
14454 }
14455
14457 Pixel() = default;
14458
14460 explicit constexpr Pixel(ValueType value)
14461 : m_opt{ verifyValue(value) }
14462 {}
14463
14469
14471 bool hasValue() const;
14472
14474 void reset();
14475
14477 std::string toString() const;
14478
14480 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14481 {
14482 return stream << Pixel{ value }.toString();
14483 }
14484
14486 bool operator==(const Pixel &other) const
14487 {
14488 return m_opt == other.m_opt;
14489 }
14490
14492 bool operator!=(const Pixel &other) const
14493 {
14494 return m_opt != other.m_opt;
14495 }
14496
14498 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14499 {
14500 return stream << value.toString();
14501 }
14502
14503 private:
14504 void setFromString(const std::string &value);
14505
14506 constexpr ValueType static verifyValue(const ValueType &value)
14507 {
14508 return value == ValueType::all || value == ValueType::blueSubsample2x2
14509 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14510 || value == ValueType::redSubsample4x4 || value == ValueType::by2x2
14511 || value == ValueType::by4x4
14512 ? value
14513 : throw std::invalid_argument{
14514 "Invalid value: Pixel{ "
14515 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14516 };
14517 }
14518
14519 std::optional<ValueType> m_opt;
14520
14521 friend struct DataModel::Detail::Befriend<Pixel>;
14522 };
14523
14524 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14525
14528
14541#ifndef NO_DOC
14542 template<
14543 typename... Args,
14544 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14545 typename std::enable_if<
14546 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14547 value,
14548 int>::type = 0>
14549#else
14550 template<typename... Args>
14551#endif
14552 explicit Sampling(Args &&...args)
14553 {
14554 using namespace Zivid::Detail::TypeTraits;
14555
14556 static_assert(
14557 AllArgsDecayedAreUnique<Args...>::value,
14558 "Found duplicate types among the arguments passed to Sampling(...). "
14559 "Types should be listed at most once.");
14560
14561 set(std::forward<Args>(args)...);
14562 }
14563
14575#ifndef NO_DOC
14576 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14577#else
14578 template<typename... Args>
14579#endif
14580 void set(Args &&...args)
14581 {
14582 using namespace Zivid::Detail::TypeTraits;
14583
14584 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14585 static_assert(
14586 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14587
14588 static_assert(
14589 AllArgsDecayedAreUnique<Args...>::value,
14590 "Found duplicate types among the arguments passed to set(...). "
14591 "Types should be listed at most once.");
14592
14593 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14594 }
14595
14608#ifndef NO_DOC
14609 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14610#else
14611 template<typename... Args>
14612#endif
14613 Sampling copyWith(Args &&...args) const
14614 {
14615 using namespace Zivid::Detail::TypeTraits;
14616
14617 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14618 static_assert(
14619 AllArgsAreDescendantNodes::value,
14620 "All arguments passed to copyWith(...) must be descendant nodes.");
14621
14622 static_assert(
14623 AllArgsDecayedAreUnique<Args...>::value,
14624 "Found duplicate types among the arguments passed to copyWith(...). "
14625 "Types should be listed at most once.");
14626
14627 auto copy{ *this };
14628 copy.set(std::forward<Args>(args)...);
14629 return copy;
14630 }
14631
14633 const Color &color() const
14634 {
14635 return m_color;
14636 }
14637
14640 {
14641 return m_color;
14642 }
14643
14645 Sampling &set(const Color &value)
14646 {
14647 m_color = value;
14648 return *this;
14649 }
14650
14652 const Pixel &pixel() const
14653 {
14654 return m_pixel;
14655 }
14656
14659 {
14660 return m_pixel;
14661 }
14662
14664 Sampling &set(const Pixel &value)
14665 {
14666 m_pixel = value;
14667 return *this;
14668 }
14669
14670 template<
14671 typename T,
14672 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14674 {
14675 return m_color;
14676 }
14677
14678 template<
14679 typename T,
14680 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14682 {
14683 return m_pixel;
14684 }
14685
14686 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14688 {
14689 return m_color;
14690 }
14691
14692 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14694 {
14695 return m_pixel;
14696 }
14697
14699 template<typename F>
14700 void forEach(const F &f) const
14701 {
14702 f(m_color);
14703 f(m_pixel);
14704 }
14705
14707 template<typename F>
14708 void forEach(const F &f)
14709 {
14710 f(m_color);
14711 f(m_pixel);
14712 }
14713
14715 bool operator==(const Sampling &other) const;
14716
14718 bool operator!=(const Sampling &other) const;
14719
14721 std::string toString() const;
14722
14724 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14725 {
14726 return stream << value.toString();
14727 }
14728
14729 private:
14730 void setFromString(const std::string &value);
14731
14732 void setFromString(const std::string &fullPath, const std::string &value);
14733
14734 std::string getString(const std::string &fullPath) const;
14735
14736 Color m_color;
14737 Pixel m_pixel;
14738
14739 friend struct DataModel::Detail::Befriend<Sampling>;
14740 };
14741
14742 using Descendants = std::tuple<
14811
14814
14816 explicit Settings(const std::string &fileName);
14817
14823 [[nodiscard]] static Settings fromSerialized(const std::string &value);
14824
14830 std::string serialize() const;
14831
14910#ifndef NO_DOC
14911 template<
14912 typename... Args,
14913 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14914 typename std::enable_if<
14915 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14916 int>::type = 0>
14917#else
14918 template<typename... Args>
14919#endif
14920 explicit Settings(Args &&...args)
14921 {
14922 using namespace Zivid::Detail::TypeTraits;
14923
14924 static_assert(
14925 AllArgsDecayedAreUnique<Args...>::value,
14926 "Found duplicate types among the arguments passed to Settings(...). "
14927 "Types should be listed at most once.");
14928
14929 set(std::forward<Args>(args)...);
14930 }
14931
15009#ifndef NO_DOC
15010 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
15011#else
15012 template<typename... Args>
15013#endif
15014 void set(Args &&...args)
15015 {
15016 using namespace Zivid::Detail::TypeTraits;
15017
15018 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15019 static_assert(
15020 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
15021
15022 static_assert(
15023 AllArgsDecayedAreUnique<Args...>::value,
15024 "Found duplicate types among the arguments passed to set(...). "
15025 "Types should be listed at most once.");
15026
15027 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
15028 }
15029
15108#ifndef NO_DOC
15109 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
15110#else
15111 template<typename... Args>
15112#endif
15113 Settings copyWith(Args &&...args) const
15114 {
15115 using namespace Zivid::Detail::TypeTraits;
15116
15117 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15118 static_assert(
15119 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
15120
15121 static_assert(
15122 AllArgsDecayedAreUnique<Args...>::value,
15123 "Found duplicate types among the arguments passed to copyWith(...). "
15124 "Types should be listed at most once.");
15125
15126 auto copy{ *this };
15127 copy.set(std::forward<Args>(args)...);
15128 return copy;
15129 }
15130
15133 {
15134 return m_acquisitions;
15135 }
15136
15139 {
15140 return m_acquisitions;
15141 }
15142
15145 {
15146 m_acquisitions = value;
15147 return *this;
15148 }
15149
15151 const Color &color() const
15152 {
15153 return m_color;
15154 }
15155
15158 {
15159 return m_color;
15160 }
15161
15163 Settings &set(const Color &value)
15164 {
15165 m_color = value;
15166 return *this;
15167 }
15168
15171 {
15172 return m_diagnostics;
15173 }
15174
15177 {
15178 return m_diagnostics;
15179 }
15180
15182 Settings &set(const Diagnostics &value)
15183 {
15184 m_diagnostics = value;
15185 return *this;
15186 }
15187
15190 {
15191 m_diagnostics.set(value);
15192 return *this;
15193 }
15194
15196 const Engine &engine() const
15197 {
15198 return m_engine;
15199 }
15200
15203 {
15204 return m_engine;
15205 }
15206
15208 Settings &set(const Engine &value)
15209 {
15210 m_engine = value;
15211 return *this;
15212 }
15213
15215 const Processing &processing() const
15216 {
15217 return m_processing;
15218 }
15219
15222 {
15223 return m_processing;
15224 }
15225
15227 Settings &set(const Processing &value)
15228 {
15229 m_processing = value;
15230 return *this;
15231 }
15232
15235 {
15236 m_processing.set(value);
15237 return *this;
15238 }
15239
15242 {
15243 m_processing.set(value);
15244 return *this;
15245 }
15246
15249 {
15250 m_processing.set(value);
15251 return *this;
15252 }
15253
15256 {
15257 m_processing.set(value);
15258 return *this;
15259 }
15260
15263 {
15264 m_processing.set(value);
15265 return *this;
15266 }
15267
15270 {
15271 m_processing.set(value);
15272 return *this;
15273 }
15274
15277 {
15278 m_processing.set(value);
15279 return *this;
15280 }
15281
15284 {
15285 m_processing.set(value);
15286 return *this;
15287 }
15288
15291 {
15292 m_processing.set(value);
15293 return *this;
15294 }
15295
15298 {
15299 m_processing.set(value);
15300 return *this;
15301 }
15302
15305 {
15306 m_processing.set(value);
15307 return *this;
15308 }
15309
15312 {
15313 m_processing.set(value);
15314 return *this;
15315 }
15316
15319 {
15320 m_processing.set(value);
15321 return *this;
15322 }
15323
15326 {
15327 m_processing.set(value);
15328 return *this;
15329 }
15330
15333 {
15334 m_processing.set(value);
15335 return *this;
15336 }
15337
15340 {
15341 m_processing.set(value);
15342 return *this;
15343 }
15344
15347 {
15348 m_processing.set(value);
15349 return *this;
15350 }
15351
15354 {
15355 m_processing.set(value);
15356 return *this;
15357 }
15358
15361 {
15362 m_processing.set(value);
15363 return *this;
15364 }
15365
15368 {
15369 m_processing.set(value);
15370 return *this;
15371 }
15372
15375 {
15376 m_processing.set(value);
15377 return *this;
15378 }
15379
15382 {
15383 m_processing.set(value);
15384 return *this;
15385 }
15386
15389 {
15390 m_processing.set(value);
15391 return *this;
15392 }
15393
15396 {
15397 m_processing.set(value);
15398 return *this;
15399 }
15400
15403 {
15404 m_processing.set(value);
15405 return *this;
15406 }
15407
15410 {
15411 m_processing.set(value);
15412 return *this;
15413 }
15414
15417 {
15418 m_processing.set(value);
15419 return *this;
15420 }
15421
15424 {
15425 m_processing.set(value);
15426 return *this;
15427 }
15428
15431 {
15432 m_processing.set(value);
15433 return *this;
15434 }
15435
15438 {
15439 m_processing.set(value);
15440 return *this;
15441 }
15442
15445 {
15446 m_processing.set(value);
15447 return *this;
15448 }
15449
15452 {
15453 m_processing.set(value);
15454 return *this;
15455 }
15456
15459 {
15460 m_processing.set(value);
15461 return *this;
15462 }
15463
15466 {
15467 m_processing.set(value);
15468 return *this;
15469 }
15470
15473 {
15474 m_processing.set(value);
15475 return *this;
15476 }
15477
15480 {
15481 m_processing.set(value);
15482 return *this;
15483 }
15484
15487 {
15488 m_processing.set(value);
15489 return *this;
15490 }
15491
15494 {
15495 m_processing.set(value);
15496 return *this;
15497 }
15498
15501 {
15502 m_processing.set(value);
15503 return *this;
15504 }
15505
15508 {
15509 m_processing.set(value);
15510 return *this;
15511 }
15512
15515 {
15516 m_processing.set(value);
15517 return *this;
15518 }
15519
15522 {
15523 m_processing.set(value);
15524 return *this;
15525 }
15526
15529 {
15530 m_processing.set(value);
15531 return *this;
15532 }
15533
15536 {
15537 m_processing.set(value);
15538 return *this;
15539 }
15540
15543 {
15544 m_processing.set(value);
15545 return *this;
15546 }
15547
15550 {
15551 m_processing.set(value);
15552 return *this;
15553 }
15554
15557 {
15558 m_processing.set(value);
15559 return *this;
15560 }
15561
15564 {
15565 m_processing.set(value);
15566 return *this;
15567 }
15568
15571 {
15572 m_processing.set(value);
15573 return *this;
15574 }
15575
15578 {
15579 return m_regionOfInterest;
15580 }
15581
15584 {
15585 return m_regionOfInterest;
15586 }
15587
15590 {
15591 m_regionOfInterest = value;
15592 return *this;
15593 }
15594
15597 {
15598 m_regionOfInterest.set(value);
15599 return *this;
15600 }
15601
15604 {
15605 m_regionOfInterest.set(value);
15606 return *this;
15607 }
15608
15611 {
15612 m_regionOfInterest.set(value);
15613 return *this;
15614 }
15615
15618 {
15619 m_regionOfInterest.set(value);
15620 return *this;
15621 }
15622
15625 {
15626 m_regionOfInterest.set(value);
15627 return *this;
15628 }
15629
15632 {
15633 m_regionOfInterest.set(value);
15634 return *this;
15635 }
15636
15639 {
15640 m_regionOfInterest.set(value);
15641 return *this;
15642 }
15643
15646 {
15647 m_regionOfInterest.set(value);
15648 return *this;
15649 }
15650
15653 {
15654 m_regionOfInterest.set(value);
15655 return *this;
15656 }
15657
15659 const Sampling &sampling() const
15660 {
15661 return m_sampling;
15662 }
15663
15666 {
15667 return m_sampling;
15668 }
15669
15671 Settings &set(const Sampling &value)
15672 {
15673 m_sampling = value;
15674 return *this;
15675 }
15676
15679 {
15680 m_sampling.set(value);
15681 return *this;
15682 }
15683
15686 {
15687 m_sampling.set(value);
15688 return *this;
15689 }
15690
15691 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15693 {
15694 return m_acquisitions;
15695 }
15696
15697 template<typename T, typename std::enable_if<std::is_same<T, Settings::Color>::value, int>::type = 0>
15698 const Settings::Color &get() const
15699 {
15700 return m_color;
15701 }
15702
15703 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15705 {
15706 return m_diagnostics;
15707 }
15708
15709 template<
15710 typename T,
15711 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15713 {
15714 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15715 }
15716
15717 template<typename T, typename std::enable_if<std::is_same<T, Settings::Engine>::value, int>::type = 0>
15718 const Settings::Engine &get() const
15719 {
15720 return m_engine;
15721 }
15722
15723 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15725 {
15726 return m_processing;
15727 }
15728
15729 template<
15730 typename T,
15731 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15733 {
15734 return m_processing.get<Settings::Processing::Color>();
15735 }
15736
15737 template<
15738 typename T,
15739 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15741 {
15742 return m_processing.get<Settings::Processing::Color::Balance>();
15743 }
15744
15745 template<
15746 typename T,
15747 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15749 {
15750 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15751 }
15752
15753 template<
15754 typename T,
15755 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15757 {
15758 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15759 }
15760
15761 template<
15762 typename T,
15763 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15765 {
15766 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15767 }
15768
15769 template<
15770 typename T,
15771 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15773 {
15774 return m_processing.get<Settings::Processing::Color::Experimental>();
15775 }
15776
15777 template<
15778 typename T,
15779 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15780 type = 0>
15782 {
15783 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15784 }
15785
15786 template<
15787 typename T,
15788 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15790 {
15791 return m_processing.get<Settings::Processing::Color::Gamma>();
15792 }
15793
15794 template<
15795 typename T,
15796 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15798 {
15799 return m_processing.get<Settings::Processing::Filters>();
15800 }
15801
15802 template<
15803 typename T,
15804 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15806 {
15807 return m_processing.get<Settings::Processing::Filters::Cluster>();
15808 }
15809
15810 template<
15811 typename T,
15812 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15813 type = 0>
15815 {
15817 }
15818
15819 template<
15820 typename T,
15821 typename std::enable_if<
15822 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
15823 int>::type = 0>
15825 {
15827 }
15828
15829 template<
15830 typename T,
15831 typename std::enable_if<
15832 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
15833 int>::type = 0>
15835 {
15837 }
15838
15839 template<
15840 typename T,
15841 typename std::enable_if<
15842 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15843 int>::type = 0>
15845 {
15847 }
15848
15849 template<
15850 typename T,
15851 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15853 {
15854 return m_processing.get<Settings::Processing::Filters::Experimental>();
15855 }
15856
15857 template<
15858 typename T,
15859 typename std::enable_if<
15860 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
15861 int>::type = 0>
15863 {
15865 }
15866
15867 template<
15868 typename T,
15869 typename std::enable_if<
15870 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
15871 int>::type = 0>
15873 {
15875 }
15876
15877 template<
15878 typename T,
15879 typename std::enable_if<
15880 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15881 value,
15882 int>::type = 0>
15884 {
15885 return m_processing
15887 }
15888
15889 template<
15890 typename T,
15891 typename std::enable_if<
15892 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15893 value,
15894 int>::type = 0>
15896 {
15897 return m_processing
15899 }
15900
15901 template<
15902 typename T,
15903 typename std::enable_if<
15904 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15905 int>::type = 0>
15907 {
15909 }
15910
15911 template<
15912 typename T,
15913 typename std::enable_if<
15914 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15915 value,
15916 int>::type = 0>
15918 {
15919 return m_processing
15921 }
15922
15923 template<
15924 typename T,
15925 typename std::enable_if<
15926 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15927 value,
15928 int>::type = 0>
15930 {
15931 return m_processing
15933 }
15934
15935 template<
15936 typename T,
15937 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
15939 {
15940 return m_processing.get<Settings::Processing::Filters::Hole>();
15941 }
15942
15943 template<
15944 typename T,
15945 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::type = 0>
15947 {
15948 return m_processing.get<Settings::Processing::Filters::Hole::Repair>();
15949 }
15950
15951 template<
15952 typename T,
15953 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value, int>::
15954 type = 0>
15956 {
15958 }
15959
15960 template<
15961 typename T,
15962 typename std::
15963 enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value, int>::type = 0>
15965 {
15967 }
15968
15969 template<
15970 typename T,
15971 typename std::enable_if<
15972 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
15973 int>::type = 0>
15975 {
15977 }
15978
15979 template<
15980 typename T,
15981 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15983 {
15984 return m_processing.get<Settings::Processing::Filters::Noise>();
15985 }
15986
15987 template<
15988 typename T,
15989 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15990 0>
15992 {
15994 }
15995
15996 template<
15997 typename T,
15998 typename std::enable_if<
15999 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
16000 int>::type = 0>
16002 {
16004 }
16005
16006 template<
16007 typename T,
16008 typename std::enable_if<
16009 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
16010 int>::type = 0>
16012 {
16014 }
16015
16016 template<
16017 typename T,
16018 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
16019 0>
16021 {
16023 }
16024
16025 template<
16026 typename T,
16027 typename std::
16028 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
16030 {
16032 }
16033
16034 template<
16035 typename T,
16036 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
16037 type = 0>
16039 {
16041 }
16042
16043 template<
16044 typename T,
16045 typename std::enable_if<
16046 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
16047 int>::type = 0>
16049 {
16051 }
16052
16053 template<
16054 typename T,
16055 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
16057 {
16058 return m_processing.get<Settings::Processing::Filters::Outlier>();
16059 }
16060
16061 template<
16062 typename T,
16063 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
16064 type = 0>
16066 {
16068 }
16069
16070 template<
16071 typename T,
16072 typename std::enable_if<
16073 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
16074 int>::type = 0>
16076 {
16078 }
16079
16080 template<
16081 typename T,
16082 typename std::enable_if<
16083 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
16084 int>::type = 0>
16086 {
16088 }
16089
16090 template<
16091 typename T,
16092 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
16094 {
16095 return m_processing.get<Settings::Processing::Filters::Reflection>();
16096 }
16097
16098 template<
16099 typename T,
16100 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
16101 type = 0>
16103 {
16105 }
16106
16107 template<
16108 typename T,
16109 typename std::enable_if<
16110 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
16111 int>::type = 0>
16113 {
16115 }
16116
16117 template<
16118 typename T,
16119 typename std::enable_if<
16120 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
16121 int>::type = 0>
16123 {
16125 }
16126
16127 template<
16128 typename T,
16129 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
16131 {
16132 return m_processing.get<Settings::Processing::Filters::Smoothing>();
16133 }
16134
16135 template<
16136 typename T,
16137 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
16138 type = 0>
16140 {
16142 }
16143
16144 template<
16145 typename T,
16146 typename std::enable_if<
16147 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
16148 int>::type = 0>
16150 {
16152 }
16153
16154 template<
16155 typename T,
16156 typename std::enable_if<
16157 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
16158 int>::type = 0>
16160 {
16162 }
16163
16164 template<
16165 typename T,
16166 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
16168 {
16169 return m_processing.get<Settings::Processing::Resampling>();
16170 }
16171
16172 template<
16173 typename T,
16174 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
16176 {
16177 return m_processing.get<Settings::Processing::Resampling::Mode>();
16178 }
16179
16180 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
16182 {
16183 return m_regionOfInterest;
16184 }
16185
16186 template<
16187 typename T,
16188 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
16190 {
16191 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
16192 }
16193
16194 template<
16195 typename T,
16196 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
16198 {
16199 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
16200 }
16201
16202 template<
16203 typename T,
16204 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
16206 {
16207 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
16208 }
16209
16210 template<
16211 typename T,
16212 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
16214 {
16215 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
16216 }
16217
16218 template<
16219 typename T,
16220 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
16222 {
16223 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
16224 }
16225
16226 template<
16227 typename T,
16228 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
16230 {
16231 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
16232 }
16233
16234 template<
16235 typename T,
16236 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
16238 {
16239 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
16240 }
16241
16242 template<
16243 typename T,
16244 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
16246 {
16247 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
16248 }
16249
16250 template<
16251 typename T,
16252 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
16254 {
16255 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
16256 }
16257
16258 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
16260 {
16261 return m_sampling;
16262 }
16263
16264 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
16266 {
16267 return m_sampling.get<Settings::Sampling::Color>();
16268 }
16269
16270 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
16272 {
16273 return m_sampling.get<Settings::Sampling::Pixel>();
16274 }
16275
16276 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
16278 {
16279 return m_acquisitions;
16280 }
16281
16282 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
16283 const Settings::Color &get() const
16284 {
16285 return m_color;
16286 }
16287
16288 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
16290 {
16291 return m_diagnostics;
16292 }
16293
16294 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
16295 const Settings::Engine &get() const
16296 {
16297 return m_engine;
16298 }
16299
16300 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
16302 {
16303 return m_processing;
16304 }
16305
16306 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
16308 {
16309 return m_regionOfInterest;
16310 }
16311
16312 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
16314 {
16315 return m_sampling;
16316 }
16317
16319 template<typename F>
16320 void forEach(const F &f) const
16321 {
16322 f(m_acquisitions);
16323 f(m_color);
16324 f(m_diagnostics);
16325 f(m_engine);
16326 f(m_processing);
16327 f(m_regionOfInterest);
16328 f(m_sampling);
16329 }
16330
16332 template<typename F>
16333 void forEach(const F &f)
16334 {
16335 f(m_acquisitions);
16336 f(m_color);
16337 f(m_diagnostics);
16338 f(m_engine);
16339 f(m_processing);
16340 f(m_regionOfInterest);
16341 f(m_sampling);
16342 }
16343
16345 bool operator==(const Settings &other) const;
16346
16348 bool operator!=(const Settings &other) const;
16349
16351 std::string toString() const;
16352
16354 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
16355 {
16356 return stream << value.toString();
16357 }
16358
16360 void save(const std::string &fileName) const;
16361
16363 void load(const std::string &fileName);
16364
16365 private:
16366 void setFromString(const std::string &value);
16367
16368 void setFromString(const std::string &fullPath, const std::string &value);
16369
16370 std::string getString(const std::string &fullPath) const;
16371
16372 Acquisitions m_acquisitions;
16373 Color m_color;
16374 Diagnostics m_diagnostics;
16375 Engine m_engine;
16376 Processing m_processing;
16377 RegionOfInterest m_regionOfInterest;
16378 Sampling m_sampling;
16379
16380 friend struct DataModel::Detail::Befriend<Settings>;
16381 };
16382
16383#ifndef NO_DOC
16384 template<>
16385 struct Settings::Version<27>
16386 {
16387 using Type = Settings;
16388 };
16389#endif
16390
16391} // namespace Zivid
16392
16393#ifndef NO_DOC
16395namespace Zivid::Detail
16396{
16397
16398 ZIVID_CORE_EXPORT void save(const Zivid::Settings &dataModel, std::ostream &ostream);
16399 ZIVID_CORE_EXPORT void load(Zivid::Settings &dataModel, std::istream &istream);
16400
16401 ZIVID_CORE_EXPORT std::vector<uint8_t> serializeToBinaryVector(const Zivid::Settings &source);
16402 ZIVID_CORE_EXPORT void deserializeFromBinaryVector(Zivid::Settings &dest, const std::vector<uint8_t> &data);
16403
16404} // namespace Zivid::Detail
16405#endif
16406
16407#ifdef _MSC_VER
16408# pragma warning(pop)
16409#endif
16410
16411#ifndef NO_DOC
16412# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
16413namespace std // NOLINT
16414{
16415
16416 template<>
16417 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
16418 {};
16419
16420 template<size_t i>
16421 struct tuple_element<i, Zivid::Settings::Diagnostics>
16422 {
16423 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
16424
16425 using type // NOLINT
16426 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
16427 };
16428
16429 template<>
16430 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 3>
16431 {};
16432
16433 template<size_t i>
16434 struct tuple_element<i, Zivid::Settings::Processing>
16435 {
16436 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 3");
16437
16438 using type // NOLINT
16439 = decltype(declval<Zivid::Settings::Processing>().get<i>());
16440 };
16441
16442 template<>
16443 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
16444 {};
16445
16446 template<size_t i>
16447 struct tuple_element<i, Zivid::Settings::Processing::Color>
16448 {
16449 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
16450
16451 using type // NOLINT
16452 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
16453 };
16454
16455 template<>
16456 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16457 {};
16458
16459 template<size_t i>
16460 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16461 {
16462 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16463
16464 using type // NOLINT
16465 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16466 };
16467
16468 template<>
16469 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16470 {};
16471
16472 template<size_t i>
16473 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16474 {
16475 static_assert(
16476 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16477 "Index must be less than 1");
16478
16479 using type // NOLINT
16480 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16481 };
16482
16483 template<>
16484 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 7>
16485 {};
16486
16487 template<size_t i>
16488 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16489 {
16490 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 7");
16491
16492 using type // NOLINT
16493 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16494 };
16495
16496 template<>
16497 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16498 {};
16499
16500 template<size_t i>
16501 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16502 {
16503 static_assert(
16504 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16505 "Index must be less than 1");
16506
16507 using type // NOLINT
16508 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16509 };
16510
16511 template<>
16512 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16513 {};
16514
16515 template<size_t i>
16516 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16517 {
16518 static_assert(
16519 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16520 "Index must be less than 3");
16521
16522 using type // NOLINT
16523 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16524 };
16525
16526 template<>
16527 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
16528 {};
16529
16530 template<size_t i>
16531 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16532 {
16533 static_assert(
16534 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16535 "Index must be less than 1");
16536
16537 using type // NOLINT
16538 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16539 };
16540
16541 template<>
16542 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16543 : integral_constant<size_t, 2>
16544 {};
16545
16546 template<size_t i>
16547 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16548 {
16549 static_assert(
16550 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16551 "Index must be less than 2");
16552
16553 using type // NOLINT
16554 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16555 };
16556
16557 template<>
16558 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16559 : integral_constant<size_t, 2>
16560 {};
16561
16562 template<size_t i>
16563 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16564 {
16565 static_assert(
16566 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16567 "Index must be less than 2");
16568
16569 using type // NOLINT
16570 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16571 .get<i>());
16572 };
16573
16574 template<>
16575 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16576 : integral_constant<size_t, 2>
16577 {};
16578
16579 template<size_t i>
16580 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16581 {
16582 static_assert(
16583 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16584 "Index must be less than 2");
16585
16586 using type // NOLINT
16587 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16588 .get<i>());
16589 };
16590
16591 template<>
16592 struct tuple_size<Zivid::Settings::Processing::Filters::Hole> : integral_constant<size_t, 1>
16593 {};
16594
16595 template<size_t i>
16596 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole>
16597 {
16598 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Hole>::value, "Index must be less than 1");
16599
16600 using type // NOLINT
16601 = decltype(declval<Zivid::Settings::Processing::Filters::Hole>().get<i>());
16602 };
16603
16604 template<>
16605 struct tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair> : integral_constant<size_t, 3>
16606 {};
16607
16608 template<size_t i>
16609 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole::Repair>
16610 {
16611 static_assert(
16612 i < tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair>::value,
16613 "Index must be less than 3");
16614
16615 using type // NOLINT
16616 = decltype(declval<Zivid::Settings::Processing::Filters::Hole::Repair>().get<i>());
16617 };
16618
16619 template<>
16620 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16621 {};
16622
16623 template<size_t i>
16624 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16625 {
16626 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16627
16628 using type // NOLINT
16629 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16630 };
16631
16632 template<>
16633 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16634 {};
16635
16636 template<size_t i>
16637 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16638 {
16639 static_assert(
16640 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16641 "Index must be less than 2");
16642
16643 using type // NOLINT
16644 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16645 };
16646
16647 template<>
16648 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16649 {};
16650
16651 template<size_t i>
16652 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16653 {
16654 static_assert(
16655 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16656 "Index must be less than 1");
16657
16658 using type // NOLINT
16659 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16660 };
16661
16662 template<>
16663 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16664 {};
16665
16666 template<size_t i>
16667 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16668 {
16669 static_assert(
16670 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16671 "Index must be less than 1");
16672
16673 using type // NOLINT
16674 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16675 };
16676
16677 template<>
16678 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16679 {};
16680
16681 template<size_t i>
16682 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16683 {
16684 static_assert(
16685 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16686 "Index must be less than 1");
16687
16688 using type // NOLINT
16689 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16690 };
16691
16692 template<>
16693 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16694 {};
16695
16696 template<size_t i>
16697 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16698 {
16699 static_assert(
16700 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16701 "Index must be less than 2");
16702
16703 using type // NOLINT
16704 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16705 };
16706
16707 template<>
16708 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16709 {};
16710
16711 template<size_t i>
16712 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16713 {
16714 static_assert(
16715 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16716 "Index must be less than 1");
16717
16718 using type // NOLINT
16719 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16720 };
16721
16722 template<>
16723 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16724 {};
16725
16726 template<size_t i>
16727 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16728 {
16729 static_assert(
16730 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16731 "Index must be less than 2");
16732
16733 using type // NOLINT
16734 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16735 };
16736
16737 template<>
16738 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16739 {};
16740
16741 template<size_t i>
16742 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16743 {
16744 static_assert(
16745 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16746 "Index must be less than 1");
16747
16748 using type // NOLINT
16749 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16750 };
16751
16752 template<>
16753 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16754 {};
16755
16756 template<size_t i>
16757 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16758 {
16759 static_assert(
16760 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16761 "Index must be less than 2");
16762
16763 using type // NOLINT
16764 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16765 };
16766
16767 template<>
16768 struct tuple_size<Zivid::Settings::Processing::Resampling> : integral_constant<size_t, 1>
16769 {};
16770
16771 template<size_t i>
16772 struct tuple_element<i, Zivid::Settings::Processing::Resampling>
16773 {
16774 static_assert(i < tuple_size<Zivid::Settings::Processing::Resampling>::value, "Index must be less than 1");
16775
16776 using type // NOLINT
16777 = decltype(declval<Zivid::Settings::Processing::Resampling>().get<i>());
16778 };
16779
16780 template<>
16781 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16782 {};
16783
16784 template<size_t i>
16785 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16786 {
16787 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16788
16789 using type // NOLINT
16790 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16791 };
16792
16793 template<>
16794 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16795 {};
16796
16797 template<size_t i>
16798 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16799 {
16800 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16801
16802 using type // NOLINT
16803 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16804 };
16805
16806 template<>
16807 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16808 {};
16809
16810 template<size_t i>
16811 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16812 {
16813 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16814
16815 using type // NOLINT
16816 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16817 };
16818
16819 template<>
16820 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16821 {};
16822
16823 template<size_t i>
16824 struct tuple_element<i, Zivid::Settings::Sampling>
16825 {
16826 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16827
16828 using type // NOLINT
16829 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16830 };
16831
16832 template<>
16833 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 7>
16834 {};
16835
16836 template<size_t i>
16837 struct tuple_element<i, Zivid::Settings>
16838 {
16839 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 7");
16840
16841 using type // NOLINT
16842 = decltype(declval<Zivid::Settings>().get<i>());
16843 };
16844
16845} // namespace std
16846# endif
16847#endif
16848
16849// If we have access to the DataModel library, automatically include internal DataModel
16850// header. This header is necessary for serialization and deserialization.
16851#if defined(__has_include) && !defined(NO_DOC)
16852# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16853# include "Zivid/SettingsInternal.h"
16854# endif
16855#endif
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
Class describing a range of values for a given type T.
Definition Range.h:75
Settings used when capturing 2D images with a Zivid camera.
Definition Settings2D.h:79
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition Settings.h:135
bool operator<(const Aperture &other) const
Comparison operator.
Definition Settings.h:198
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream.
Definition Settings.h:222
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:210
bool operator>(const Aperture &other) const
Comparison operator.
Definition Settings.h:204
bool operator==(const Aperture &other) const
Comparison operator.
Definition Settings.h:186
bool operator>=(const Aperture &other) const
Comparison operator.
Definition Settings.h:216
bool operator!=(const Aperture &other) const
Comparison operator.
Definition Settings.h:192
Aperture()=default
Default constructor.
constexpr Aperture(double value)
Constructor.
Definition Settings.h:166
double ValueType
The type of the underlying value.
Definition Settings.h:154
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Aperture.
Definition Settings.h:157
bool hasValue() const
Check if the value is set.
Brightness controls the light output from the projector.
Definition Settings.h:258
bool operator<=(const Brightness &other) const
Comparison operator.
Definition Settings.h:341
bool operator!=(const Brightness &other) const
Comparison operator.
Definition Settings.h:323
bool operator>=(const Brightness &other) const
Comparison operator.
Definition Settings.h:347
bool operator<(const Brightness &other) const
Comparison operator.
Definition Settings.h:329
bool operator>(const Brightness &other) const
Comparison operator.
Definition Settings.h:335
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Brightness.
Definition Settings.h:288
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:353
constexpr Brightness(double value)
Constructor.
Definition Settings.h:297
bool hasValue() const
Check if the value is set.
Brightness()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:285
bool operator==(const Brightness &other) const
Comparison operator.
Definition Settings.h:317
Exposure time for each single image in the measurement. Affects frame rate.
Definition Settings.h:379
bool operator>=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:458
bool operator<(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:440
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:446
std::chrono::microseconds ValueType
The type of the underlying value.
Definition Settings.h:396
bool operator==(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:428
bool operator!=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:434
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:399
constexpr ExposureTime(std::chrono::microseconds value)
Constructor.
Definition Settings.h:408
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream.
Definition Settings.h:464
bool operator<=(const ExposureTime &other) const
Comparison operator.
Definition Settings.h:452
Analog gain in the camera.
Definition Settings.h:491
bool operator==(const Gain &other) const
Comparison operator.
Definition Settings.h:538
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream.
Definition Settings.h:574
constexpr Gain(double value)
Constructor.
Definition Settings.h:518
bool operator>=(const Gain &other) const
Comparison operator.
Definition Settings.h:568
void reset()
Reset the node to unset state.
bool operator<=(const Gain &other) const
Comparison operator.
Definition Settings.h:562
static constexpr Range< double > validRange()
The range of valid values for Gain.
Definition Settings.h:509
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:506
std::string toString() const
Get the value as string.
bool operator!=(const Gain &other) const
Comparison operator.
Definition Settings.h:544
bool operator>(const Gain &other) const
Comparison operator.
Definition Settings.h:556
bool operator<(const Gain &other) const
Comparison operator.
Definition Settings.h:550
Settings for a single acquisition.
Definition Settings.h:115
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:848
Acquisition & set(const Aperture &value)
Set Aperture.
Definition Settings.h:727
const Aperture & aperture() const
Get Aperture.
Definition Settings.h:715
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition Settings.h:596
Gain & gain()
Get Gain.
Definition Settings.h:778
const Settings::Acquisition::Aperture & get() const
Definition Settings.h:793
Brightness & brightness()
Get Brightness.
Definition Settings.h:740
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream.
Definition Settings.h:876
bool operator==(const Acquisition &other) const
Equality operator.
const Settings::Acquisition::ExposureTime & get() const
Definition Settings.h:809
bool operator!=(const Acquisition &other) const
Inequality operator.
const ExposureTime & exposureTime() const
Get ExposureTime.
Definition Settings.h:753
Acquisition & set(const Brightness &value)
Set Brightness.
Definition Settings.h:746
Acquisition & set(const ExposureTime &value)
Set ExposureTime.
Definition Settings.h:765
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:660
const Brightness & brightness() const
Get Brightness.
Definition Settings.h:734
const Settings::Acquisition::Gain & get() const
Definition Settings.h:817
Acquisition & set(const Gain &value)
Set Gain.
Definition Settings.h:784
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:695
Aperture & aperture()
Get Aperture.
Definition Settings.h:721
const Settings::Acquisition::Brightness & get() const
Definition Settings.h:801
ExposureTime & exposureTime()
Get ExposureTime.
Definition Settings.h:759
const Gain & gain() const
Get Gain.
Definition Settings.h:772
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:858
List of Acquisition objects.
Definition Settings.h:900
bool operator!=(const Acquisitions &other) const
Comparison operator.
Definition Settings.h:1038
std::vector< Settings::Acquisition >::const_iterator ConstIterator
Constant iterator type for Acquisitions.
Definition Settings.h:1017
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:999
std::vector< Settings::Acquisition >::iterator Iterator
Iterator type for Acquisitions.
Definition Settings.h:1008
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:932
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream.
Definition Settings.h:1044
void forEach(const F &f)
Run the given function on each element in the list.
Definition Settings.h:989
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor.
Definition Settings.h:927
std::vector< Settings::Acquisition > ValueType
The type of the underlying value.
Definition Settings.h:915
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions.
Definition Settings.h:918
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.
Specify the settings used for the 2D color image when doing a 2D+3D capture. The value type of this n...
Definition Settings.h:1081
std::string toString() const
Get the value as string.
Color()=default
Default constructor.
void reset()
Reset the node to unset state.
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:1162
const Zivid::Settings2D & value() const
Get the value.
Color(Zivid::Settings2D value)
Constructor.
Definition Settings.h:1124
Zivid::Settings2D & value()
Get a mutable reference to the value.
bool hasValue() const
Check if the value is set.
bool operator==(const Color &other) const
Comparison operator.
Definition Settings.h:1150
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:1156
Enable or disable diagnostics.
Definition Settings.h:1211
static const Enabled no
Off/disabled.
Definition Settings.h:1228
bool hasValue() const
Check if the value is set.
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:1231
void reset()
Reset the node to unset state.
Enabled()=default
Default constructor.
bool ValueType
The type of the underlying value.
Definition Settings.h:1226
static const Enabled yes
On/enabled.
Definition Settings.h:1227
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:1260
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:1272
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:1240
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:1266
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:1185
friend std::ostream & operator<<(std::ostream &stream, const Diagnostics &value)
Operator to send the value as string to a stream.
Definition Settings.h:1447
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:1425
std::tuple< Settings::Diagnostics::Enabled > Descendants
Definition Settings.h:1285
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:1371
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:1432
Diagnostics()
Default constructor.
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:1397
bool operator==(const Diagnostics &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:1339
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:1412
bool operator!=(const Diagnostics &other) const
Inequality operator.
Diagnostics & set(const Enabled &value)
Set Enabled.
Definition Settings.h:1403
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:1391
Set the Zivid Vision Engine to use.
Definition Settings.h:1491
std::string toString() const
Get the value as string.
bool operator==(const Engine &other) const
Comparison operator.
Definition Settings.h:1577
bool operator!=(const Engine &other) const
Comparison operator.
Definition Settings.h:1583
static const Engine omni
omni
Definition Settings.h:1538
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream.
Definition Settings.h:1589
static const Engine sage
sage
Definition Settings.h:1539
static std::set< ValueType > validValues()
All valid values of Engine.
Definition Settings.h:1542
void reset()
Reset the node to unset state.
ValueType value() const
Get the value.
static const Engine stripe
stripe
Definition Settings.h:1537
static const Engine phase
phase
Definition Settings.h:1536
Engine()=default
Default constructor.
ValueType
The type of the underlying value.
Definition Settings.h:1530
constexpr Engine(ValueType value)
Constructor.
Definition Settings.h:1551
bool hasValue() const
Check if the value is set.
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:1571
Digital gain applied to blue channel.
Definition Settings.h:1692
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings.h:1782
void reset()
Reset the node to unset state.
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings.h:1746
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings.h:1776
std::string toString() const
Get the value as string.
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings.h:1758
constexpr Blue(double value)
Constructor.
Definition Settings.h:1726
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings.h:1770
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings.h:1752
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:1714
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings.h:1764
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings.h:1717
Digital gain applied to green channel.
Definition Settings.h:1816
void reset()
Reset the node to unset state.
bool operator>(const Green &other) const
Comparison operator.
Definition Settings.h:1888
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:1906
double ValueType
The type of the underlying value.
Definition Settings.h:1838
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings.h:1900
constexpr Green(double value)
Constructor.
Definition Settings.h:1850
bool operator==(const Green &other) const
Comparison operator.
Definition Settings.h:1870
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings.h:1876
std::string toString() const
Get the value as string.
bool operator<(const Green &other) const
Comparison operator.
Definition Settings.h:1882
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings.h:1841
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings.h:1894
Digital gain applied to red channel.
Definition Settings.h:1940
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings.h:2000
constexpr Red(double value)
Constructor.
Definition Settings.h:1974
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings.h:2030
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings.h:2024
double ValueType
The type of the underlying value.
Definition Settings.h:1962
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings.h:1965
bool operator==(const Red &other) const
Comparison operator.
Definition Settings.h:1994
bool operator<(const Red &other) const
Comparison operator.
Definition Settings.h:2006
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings.h:2012
bool hasValue() const
Check if the value is set.
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings.h:2018
std::string toString() const
Get the value as string.
Color balance settings.
Definition Settings.h:1667
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2114
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:2276
bool operator!=(const Balance &other) const
Inequality operator.
Balance & set(const Red &value)
Set Red.
Definition Settings.h:2221
Green & green()
Get Green.
Definition Settings.h:2196
std::string toString() const
Get the value as string.
Red & red()
Get Red.
Definition Settings.h:2215
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition Settings.h:2053
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:2150
Balance & set(const Blue &value)
Set Blue.
Definition Settings.h:2183
Blue & blue()
Get Blue.
Definition Settings.h:2177
const Red & red() const
Get Red.
Definition Settings.h:2209
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2285
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2242
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2251
Balance & set(const Green &value)
Set Green.
Definition Settings.h:2202
const Green & green() const
Get Green.
Definition Settings.h:2190
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings.h:2302
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2232
const Blue & blue() const
Get Blue.
Definition Settings.h:2171
This setting controls how the color image is computed.
Definition Settings.h:2372
static const Mode toneMapping
toneMapping
Definition Settings.h:2424
std::string toString() const
Get the value as string.
static const Mode automatic
automatic
Definition Settings.h:2422
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:2474
void reset()
Reset the node to unset state.
static const Mode useFirstAcquisition
useFirstAcquisition
Definition Settings.h:2423
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:2468
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:2462
ValueType
The type of the underlying value.
Definition Settings.h:2417
bool hasValue() const
Check if the value is set.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:2436
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:2427
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:2456
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition Settings.h:2325
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition Settings.h:2499
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:2666
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2651
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2553
std::string toString() const
Get the value as string.
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:2620
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:2644
bool operator==(const Experimental &other) const
Equality operator.
Mode & mode()
Get Mode.
Definition Settings.h:2614
const Mode & mode() const
Get Mode.
Definition Settings.h:2608
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2631
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:2587
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings.h:2695
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings.h:2788
double value() const
Get the value.
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings.h:2770
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings.h:2723
Gamma()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:2720
bool hasValue() const
Check if the value is set.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2782
constexpr Gamma(double value)
Constructor.
Definition Settings.h:2732
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2758
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings.h:2764
std::string toString() const
Get the value as string.
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings.h:2752
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2776
Color settings.
Definition Settings.h:1643
Color & set(const Gamma &value)
Set Gamma.
Definition Settings.h:3021
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:3085
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:3058
bool operator==(const Color &other) const
Equality operator.
Color & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:3002
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:3049
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2883
Color & set(const Experimental &value)
Set Experimental.
Definition Settings.h:2995
Color & set(const Balance &value)
Set Balance.
Definition Settings.h:2955
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings.h:3136
const Balance & balance() const
Get Balance.
Definition Settings.h:2943
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:2983
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3119
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:3067
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings.h:2969
Experimental & experimental()
Get Experimental.
Definition Settings.h:2989
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:2810
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings.h:2962
Gamma & gamma()
Get Gamma.
Definition Settings.h:3015
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:2922
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:3077
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings.h:2976
const Gamma & gamma() const
Get Gamma.
Definition Settings.h:3009
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:3031
Balance & balance()
Get Balance.
Definition Settings.h:2949
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:3110
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:3040
Enable or disable cluster removal.
Definition Settings.h:3217
bool ValueType
The type of the underlying value.
Definition Settings.h:3234
static const Enabled no
Off/disabled.
Definition Settings.h:3236
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3248
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3239
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3274
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3280
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3268
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:3235
Maximum normalized distance between neighboring points that are still classified as belonging to the ...
Definition Settings.h:3300
constexpr MaxNeighborDistance(double value)
Constructor.
Definition Settings.h:3334
bool operator!=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3360
double ValueType
The type of the underlying value.
Definition Settings.h:3322
bool operator>=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3384
bool operator<(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3366
static constexpr Range< double > validRange()
The range of valid values for MaxNeighborDistance.
Definition Settings.h:3325
bool operator<=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3378
friend std::ostream & operator<<(std::ostream &stream, const MaxNeighborDistance &value)
Operator to serialize the value to a stream.
Definition Settings.h:3390
bool operator==(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3354
bool operator>(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3372
Clusters with area below this threshold are removed by the filter. The area is given in mm^2.
Definition Settings.h:3419
bool operator>=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3500
double ValueType
The type of the underlying value.
Definition Settings.h:3438
friend std::ostream & operator<<(std::ostream &stream, const MinArea &value)
Operator to serialize the value to a stream.
Definition Settings.h:3506
bool operator<(const MinArea &other) const
Comparison operator.
Definition Settings.h:3482
bool operator!=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3476
bool operator<=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3494
constexpr MinArea(double value)
Constructor.
Definition Settings.h:3450
std::string toString() const
Get the value as string.
bool operator>(const MinArea &other) const
Comparison operator.
Definition Settings.h:3488
static constexpr Range< double > validRange()
The range of valid values for MinArea.
Definition Settings.h:3441
bool operator==(const MinArea &other) const
Comparison operator.
Definition Settings.h:3470
Cluster removal filter.
Definition Settings.h:3199
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:3780
const MaxNeighborDistance & maxNeighborDistance() const
Get MaxNeighborDistance.
Definition Settings.h:3666
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:3647
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3719
std::string toString() const
Get the value as string.
MinArea & minArea()
Get MinArea.
Definition Settings.h:3691
const MinArea & minArea() const
Get MinArea.
Definition Settings.h:3685
bool operator!=(const Removal &other) const
Inequality operator.
std::tuple< Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea > Descendants
Definition Settings.h:3529
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:3626
Removal & set(const MaxNeighborDistance &value)
Set MaxNeighborDistance.
Definition Settings.h:3678
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3729
Removal & set(const MinArea &value)
Set MinArea.
Definition Settings.h:3697
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:3754
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3708
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:3653
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3590
bool operator==(const Removal &other) const
Equality operator.
MaxNeighborDistance & maxNeighborDistance()
Get MaxNeighborDistance.
Definition Settings.h:3672
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3763
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:3659
Removes floating points and isolated clusters from the point cloud.
Definition Settings.h:3178
const Removal & removal() const
Get Removal.
Definition Settings.h:3921
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3996
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:3965
Cluster & set(const Removal::MaxNeighborDistance &value)
Set Removal::MaxNeighborDistance.
Definition Settings.h:3947
bool operator!=(const Cluster &other) const
Inequality operator.
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3986
bool operator==(const Cluster &other) const
Equality operator.
std::tuple< Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea > Descendants
Definition Settings.h:3799
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:3900
Removal & removal()
Get Removal.
Definition Settings.h:3927
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4016
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:4009
Cluster & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:3940
Cluster & set(const Removal &value)
Set Removal.
Definition Settings.h:3933
Cluster & set(const Removal::MinArea &value)
Set Removal::MinArea.
Definition Settings.h:3954
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3975
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3863
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:4031
Enable or disable contrast distortion correction.
Definition Settings.h:4122
bool ValueType
The type of the underlying value.
Definition Settings.h:4141
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4146
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4155
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4187
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4175
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4181
Strength of correction. Higher values give more correction.
Definition Settings.h:4204
double ValueType
The type of the underlying value.
Definition Settings.h:4223
bool operator>(const Strength &other) const
Comparison operator.
Definition Settings.h:4273
bool operator!=(const Strength &other) const
Comparison operator.
Definition Settings.h:4261
constexpr Strength(double value)
Constructor.
Definition Settings.h:4235
static constexpr Range< double > validRange()
The range of valid values for Strength.
Definition Settings.h:4226
bool operator<=(const Strength &other) const
Comparison operator.
Definition Settings.h:4279
bool operator>=(const Strength &other) const
Comparison operator.
Definition Settings.h:4285
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream.
Definition Settings.h:4291
bool operator<(const Strength &other) const
Comparison operator.
Definition Settings.h:4267
bool operator==(const Strength &other) const
Comparison operator.
Definition Settings.h:4255
Contrast distortion correction filter.
Definition Settings.h:4100
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:4511
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4428
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:4489
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:4407
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:4474
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:4535
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4372
Correction & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4440
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4519
Correction & set(const Strength &value)
Set Strength.
Definition Settings.h:4459
const Strength & strength() const
Get Strength.
Definition Settings.h:4447
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition Settings.h:4314
Enable or disable contrast distortion removal.
Definition Settings.h:4579
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4612
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4638
bool ValueType
The type of the underlying value.
Definition Settings.h:4598
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4603
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4644
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4632
static const Enabled no
Off/disabled.
Definition Settings.h:4600
Threshold for removal. Higher values remove more points.
Definition Settings.h:4661
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4736
constexpr Threshold(double value)
Constructor.
Definition Settings.h:4692
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4718
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:4724
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:4683
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:4712
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4742
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:4730
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:4748
double ValueType
The type of the underlying value.
Definition Settings.h:4680
Contrast distortion removal filter.
Definition Settings.h:4557
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:4966
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:4771
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4829
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:4990
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:4904
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:4916
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:4864
Threshold & threshold()
Get Threshold.
Definition Settings.h:4910
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4897
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:4931
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4885
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:4945
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4974
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition Settings.h:4076
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:5190
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled.
Definition Settings.h:5157
ContrastDistortion & set(const Correction &value)
Set Correction.
Definition Settings.h:5150
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:5301
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:5325
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:5117
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:5008
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength.
Definition Settings.h:5164
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5078
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5309
ContrastDistortion & set(const Removal &value)
Set Removal.
Definition Settings.h:5183
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5280
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5252
const Removal & removal() const
Get Removal.
Definition Settings.h:5171
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5224
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5210
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5239
Removal & removal()
Get Removal.
Definition Settings.h:5177
bool operator==(const ContrastDistortion &other) const
Equality operator.
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:5197
const Correction & correction() const
Get Correction.
Definition Settings.h:5138
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5265
Correction & correction()
Get Correction.
Definition Settings.h:5144
Experimental filters. These may be renamed, moved or deleted in the future.
Definition Settings.h:4052
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5646
ContrastDistortion & contrastDistortion()
Get ContrastDistortion.
Definition Settings.h:5483
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5596
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:5456
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion.
Definition Settings.h:5489
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold.
Definition Settings.h:5531
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5416
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength.
Definition Settings.h:5510
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:5661
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5583
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:5639
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:5343
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal.
Definition Settings.h:5517
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:5542
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5554
bool operator!=(const Experimental &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5624
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled.
Definition Settings.h:5503
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion.
Definition Settings.h:5477
std::string toString() const
Get the value as string.
bool operator==(const Experimental &other) const
Equality operator.
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction.
Definition Settings.h:5496
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled.
Definition Settings.h:5524
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5568
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5610
Enable or disable hole repair.
Definition Settings.h:5724
static const Enabled yes
On/enabled.
Definition Settings.h:5742
static const Enabled no
Off/disabled.
Definition Settings.h:5743
bool ValueType
The type of the underlying value.
Definition Settings.h:5741
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:5781
std::string toString() const
Get the value as string.
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:5775
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:5746
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:5787
bool hasValue() const
Check if the value is set.
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:5755
Relative diameter of holes to fill. Increasing this will fill more points, but require more computati...
Definition Settings.h:5807
bool operator<(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5871
bool operator>=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5889
static constexpr Range< double > validRange()
The range of valid values for HoleSize.
Definition Settings.h:5830
friend std::ostream & operator<<(std::ostream &stream, const HoleSize &value)
Operator to serialize the value to a stream.
Definition Settings.h:5895
bool operator!=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5865
bool operator<=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5883
bool operator==(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5859
bool hasValue() const
Check if the value is set.
std::string toString() const
Get the value as string.
constexpr HoleSize(double value)
Constructor.
Definition Settings.h:5839
double ValueType
The type of the underlying value.
Definition Settings.h:5827
bool operator>(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5877
Level of strictness when considering if a point should be filled. A higher level of strictness requir...
Definition Settings.h:5926
static constexpr Range< int32_t > validRange()
The range of valid values for Strictness.
Definition Settings.h:5950
bool operator>=(const Strictness &other) const
Comparison operator.
Definition Settings.h:6009
bool operator==(const Strictness &other) const
Comparison operator.
Definition Settings.h:5979
std::string toString() const
Get the value as string.
bool operator<=(const Strictness &other) const
Comparison operator.
Definition Settings.h:6003
bool operator>(const Strictness &other) const
Comparison operator.
Definition Settings.h:5997
int32_t ValueType
The type of the underlying value.
Definition Settings.h:5947
friend std::ostream & operator<<(std::ostream &stream, const Strictness &value)
Operator to serialize the value to a stream.
Definition Settings.h:6015
constexpr Strictness(int32_t value)
Constructor.
Definition Settings.h:5959
bool operator!=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5985
bool operator<(const Strictness &other) const
Comparison operator.
Definition Settings.h:5991
Fills in point cloud holes by interpolating remaining surrounding points.
Definition Settings.h:5703
Repair & set(const Strictness &value)
Set Strictness.
Definition Settings.h:6206
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6099
HoleSize & holeSize()
Get HoleSize.
Definition Settings.h:6181
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:6262
Repair & set(const HoleSize &value)
Set HoleSize.
Definition Settings.h:6187
bool operator==(const Repair &other) const
Equality operator.
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6227
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:6135
const Strictness & strictness() const
Get Strictness.
Definition Settings.h:6194
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6217
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:6288
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6156
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6162
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6237
Strictness & strictness()
Get Strictness.
Definition Settings.h:6200
bool operator!=(const Repair &other) const
Inequality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6168
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6271
std::tuple< Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:6038
const HoleSize & holeSize() const
Get HoleSize.
Definition Settings.h:6175
Contains filters that can be used to deal with holes in the point cloud.
Definition Settings.h:5682
const Repair & repair() const
Get Repair.
Definition Settings.h:6429
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:6473
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6503
std::tuple< Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:6307
friend std::ostream & operator<<(std::ostream &stream, const Hole &value)
Operator to send the value as string to a stream.
Definition Settings.h:6538
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6493
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:6516
Hole & set(const Repair &value)
Set Repair.
Definition Settings.h:6441
Hole & set(const Repair::Strictness &value)
Set Repair::Strictness.
Definition Settings.h:6462
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6523
Hole copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:6408
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6483
bool operator!=(const Hole &other) const
Inequality operator.
bool operator==(const Hole &other) const
Equality operator.
std::string toString() const
Get the value as string.
Repair & repair()
Get Repair.
Definition Settings.h:6435
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6371
Hole & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:6448
Hole & set(const Repair::HoleSize &value)
Set Repair::HoleSize.
Definition Settings.h:6455
Enable or disable the SNR filter.
Definition Settings.h:6599
static const Enabled yes
On/enabled.
Definition Settings.h:6617
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6656
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6650
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6621
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6630
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6662
static const Enabled no
Off/disabled.
Definition Settings.h:6618
bool ValueType
The type of the underlying value.
Definition Settings.h:6616
std::string toString() const
Get the value as string.
Discard points with signal-to-noise ratio (SNR) below the given value.
Definition Settings.h:6679
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6758
constexpr Threshold(double value)
Constructor.
Definition Settings.h:6708
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:6728
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6752
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:6699
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:6764
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:6746
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:6740
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:6696
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6734
Discard points with signal-to-noise ratio (SNR) values below a threshold.
Definition Settings.h:6579
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:6996
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6901
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:6920
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6980
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6913
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:6932
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6845
bool operator!=(const Removal &other) const
Inequality operator.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:6953
Threshold & threshold()
Get Threshold.
Definition Settings.h:6926
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:6972
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:6880
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6907
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:6943
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition Settings.h:6787
Enable or disable noise repair.
Definition Settings.h:7044
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7066
bool ValueType
The type of the underlying value.
Definition Settings.h:7061
static const Enabled no
Off/disabled.
Definition Settings.h:7063
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7101
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7075
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:7062
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7107
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7095
Get better surface coverage by repairing regions of missing data due to noisy points....
Definition Settings.h:7021
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:7265
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:7272
bool operator==(const Repair &other) const
Equality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7241
std::tuple< Settings::Processing::Filters::Noise::Repair::Enabled > Descendants
Definition Settings.h:7120
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7235
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7229
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:7208
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7252
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:7287
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7174
Enable or disable noise suppression.
Definition Settings.h:7334
static const Enabled no
Off/disabled.
Definition Settings.h:7353
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7365
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7391
bool ValueType
The type of the underlying value.
Definition Settings.h:7351
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7352
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7356
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7397
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7385
Reduce noise and outliers in the point cloud. This filter can also be used to reduce ripple effects c...
Definition Settings.h:7311
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7542
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:7555
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7525
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7519
std::string toString() const
Get the value as string.
std::tuple< Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7410
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:7498
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7464
friend std::ostream & operator<<(std::ostream &stream, const Suppression &value)
Operator to send the value as string to a stream.
Definition Settings.h:7577
bool operator!=(const Suppression &other) const
Inequality operator.
Suppression & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7531
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7562
bool operator==(const Suppression &other) const
Equality operator.
Contains filters that can be used to clean up a noisy point cloud.
Definition Settings.h:6559
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:7902
Noise & set(const Suppression &value)
Set Suppression.
Definition Settings.h:7799
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:7867
Suppression & suppression()
Get Suppression.
Definition Settings.h:7793
Removal & removal()
Get Removal.
Definition Settings.h:7734
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7877
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:7754
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:7707
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7911
const Suppression & suppression() const
Get Suppression.
Definition Settings.h:7787
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:7837
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:7594
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:7747
const Repair & repair() const
Get Repair.
Definition Settings.h:7761
Noise & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:7780
Noise & set(const Repair &value)
Set Repair.
Definition Settings.h:7773
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7667
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:7928
Repair & repair()
Get Repair.
Definition Settings.h:7767
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:7847
const Removal & removal() const
Get Removal.
Definition Settings.h:7728
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:7827
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7857
bool operator==(const Noise &other) const
Equality operator.
Noise & set(const Suppression::Enabled &value)
Set Suppression::Enabled.
Definition Settings.h:7806
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:7817
Noise & set(const Removal &value)
Set Removal.
Definition Settings.h:7740
Enable or disable the outlier filter.
Definition Settings.h:7991
bool ValueType
The type of the underlying value.
Definition Settings.h:8008
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8048
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8022
static const Enabled no
Off/disabled.
Definition Settings.h:8010
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:8009
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:8054
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8013
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8042
Discard point if Euclidean distance to neighboring points is above the given value.
Definition Settings.h:8071
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:8091
constexpr Threshold(double value)
Constructor.
Definition Settings.h:8100
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:8132
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:8120
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8150
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8126
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:8156
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8144
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:8138
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:8088
Discard point if Euclidean distance to neighboring points is above a threshold.
Definition Settings.h:7971
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:8388
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8293
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:8272
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8305
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8299
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:8324
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8179
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8335
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8345
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:8312
Threshold & threshold()
Get Threshold.
Definition Settings.h:8318
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:8364
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8237
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8372
Contains a filter that removes points with large Euclidean distance to neighboring points.
Definition Settings.h:7951
const Removal & removal() const
Get Removal.
Definition Settings.h:8524
Outlier & set(const Removal &value)
Set Removal.
Definition Settings.h:8536
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8601
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:8594
bool operator!=(const Outlier &other) const
Inequality operator.
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:8550
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:8543
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8406
Removal & removal()
Get Removal.
Definition Settings.h:8530
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:8503
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream.
Definition Settings.h:8616
bool operator==(const Outlier &other) const
Equality operator.
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8581
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:8561
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8571
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8467
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition Settings.h:8677
bool ValueType
The type of the underlying value.
Definition Settings.h:8694
static const Enabled yes
On/enabled.
Definition Settings.h:8695
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8734
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8708
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:8740
static const Enabled no
Off/disabled.
Definition Settings.h:8696
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8728
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8699
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition Settings.h:8764
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8806
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8797
ValueType
The type of the underlying value.
Definition Settings.h:8789
static const Mode local
local
Definition Settings.h:8794
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8838
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8844
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8832
std::string toString() const
Get the value as string.
static const Mode global
global
Definition Settings.h:8793
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8826
Discard points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8657
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8989
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:9078
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:9025
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8927
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8869
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:9054
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:8962
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8995
Mode & mode()
Get Mode.
Definition Settings.h:9008
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9062
const Mode & mode() const
Get Mode.
Definition Settings.h:9002
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8983
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Mode &value)
Set Mode.
Definition Settings.h:9014
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9035
Contains a filter that removes points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8637
bool operator!=(const Reflection &other) const
Inequality operator.
bool operator==(const Reflection &other) const
Equality operator.
Removal & removal()
Get Removal.
Definition Settings.h:9220
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9157
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9306
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9291
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:9284
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9233
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9261
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:9096
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Mode &value)
Set Removal::Mode.
Definition Settings.h:9240
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9271
const Removal & removal() const
Get Removal.
Definition Settings.h:9214
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9251
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9226
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:9193
Enable or disable the smoothing filter.
Definition Settings.h:9365
bool ValueType
The type of the underlying value.
Definition Settings.h:9382
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9387
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9422
static const Enabled yes
On/enabled.
Definition Settings.h:9383
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9416
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9428
static const Enabled no
Off/disabled.
Definition Settings.h:9384
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9396
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:9445
double ValueType
The type of the underlying value.
Definition Settings.h:9462
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9500
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9512
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9474
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9465
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9530
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9524
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9494
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9518
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9506
Gaussian smoothing of the point cloud.
Definition Settings.h:9345
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9673
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:9738
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9719
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9679
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9553
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9762
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9686
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9667
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:9709
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:9646
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9698
Sigma & sigma()
Get Sigma.
Definition Settings.h:9692
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9611
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9746
Smoothing filters.
Definition Settings.h:9327
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:9877
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9841
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9780
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9910
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:9945
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9975
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:9924
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:9917
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9898
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:9935
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:9968
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9955
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:9990
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9904
Filter settings.
Definition Settings.h:3159
bool operator!=(const Filters &other) const
Inequality operator.
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:10897
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10560
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11057
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10276
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10907
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:10243
Filters & set(const Hole &value)
Set Hole.
Definition Settings.h:10391
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10753
Filters & set(const Hole::Repair::HoleSize &value)
Set Hole::Repair::HoleSize.
Definition Settings.h:10412
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10466
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:10801
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10868
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10297
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10829
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:10762
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10878
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:10965
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10473
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10627
Cluster & cluster()
Get Cluster.
Definition Settings.h:10270
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:10936
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:10781
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10926
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10527
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10351
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10323
Outlier & outlier()
Get Outlier.
Definition Settings.h:10500
Filters & set(const Reflection::Removal::Mode &value)
Set Reflection::Removal::Mode.
Definition Settings.h:10567
Filters & set(const Hole::Repair::Enabled &value)
Set Hole::Repair::Enabled.
Definition Settings.h:10405
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10480
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10513
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10264
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10311
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10330
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:11078
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10290
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:10946
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10887
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10676
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:10995
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:10173
Filters & set(const Hole::Repair &value)
Set Hole::Repair.
Definition Settings.h:10398
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10534
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10666
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10459
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10985
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10546
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10715
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10358
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:11044
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10637
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10506
const Noise & noise() const
Get Noise.
Definition Settings.h:10426
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10337
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:10771
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10701
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10553
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10819
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10452
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:10956
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10600
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10810
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10858
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10372
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10593
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Hole::Repair::Strictness &value)
Set Hole::Repair::Strictness.
Definition Settings.h:10419
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10520
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10283
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:10791
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10740
const Hole & hole() const
Get Hole.
Definition Settings.h:10379
std::tuple< Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:10007
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10304
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10727
Noise & noise()
Get Noise.
Definition Settings.h:10432
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10586
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10344
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10647
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10445
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10617
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10917
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10839
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10580
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10657
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10487
Hole & hole()
Get Hole.
Definition Settings.h:10385
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:10975
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10365
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10494
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10848
Reflection & reflection()
Get Reflection.
Definition Settings.h:10540
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10438
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10607
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10574
Experimental & experimental()
Get Experimental.
Definition Settings.h:10317
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10687
Setting for upsampling or downsampling the point cloud data by some factor. This operation is perform...
Definition Settings.h:11149
void reset()
Reset the node to unset state.
static const Mode upsample2x2
upsample2x2
Definition Settings.h:11199
static const Mode downsample4x4
downsample4x4
Definition Settings.h:11198
Mode()=default
Default constructor.
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:11254
static const Mode upsample4x4
upsample4x4
Definition Settings.h:11200
static const Mode downsample2x2
downsample2x2
Definition Settings.h:11197
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:11248
ValueType
The type of the underlying value.
Definition Settings.h:11189
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:11242
bool hasValue() const
Check if the value is set.
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:11203
std::string toString() const
Get the value as string.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:11216
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:11236
static const Mode disabled
disabled
Definition Settings.h:11196
ValueType value() const
Get the value.
Settings for changing the output resolution of the point cloud.
Definition Settings.h:11106
Resampling & set(const Mode &value)
Set Mode.
Definition Settings.h:11400
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11334
const Mode & mode() const
Get Mode.
Definition Settings.h:11388
bool operator==(const Resampling &other) const
Equality operator.
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11423
Mode & mode()
Get Mode.
Definition Settings.h:11394
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const Resampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:11445
std::tuple< Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11280
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:11410
bool operator!=(const Resampling &other) const
Inequality operator.
Resampling copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition Settings.h:11367
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11430
Settings related to processing of a capture, including filters and color balance.
Definition Settings.h:1617
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:12195
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:12375
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:12323
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:12385
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12565
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12536
Resampling & resampling()
Get Resampling.
Definition Settings.h:12120
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11808
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11773
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11869
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12451
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:12177
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11780
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:12093
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:11741
Filters & filters()
Get Filters.
Definition Settings.h:11835
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:12100
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12470
Processing & set(const Resampling &value)
Set Resampling.
Definition Settings.h:12126
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:12203
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11918
Processing & set(const Resampling::Mode &value)
Set Resampling::Mode.
Definition Settings.h:12133
Processing()
Default constructor.
std::tuple< Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma, Settings::Processing::Resampling, Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11462
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12555
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11932
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:12168
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:12037
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11925
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11862
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12652
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12460
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12334
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12526
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12432
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:12365
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12585
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12422
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11787
Color & color()
Get Color.
Definition Settings.h:11767
Processing & set(const Filters::Hole::Repair::Strictness &value)
Set Filters::Hole::Repair::Strictness.
Definition Settings.h:11967
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12575
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:12058
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11974
Processing & set(const Filters::Hole &value)
Set Filters::Hole.
Definition Settings.h:11939
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11848
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12478
const Settings::Processing::Filters & get() const
Definition Settings.h:12211
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11911
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11988
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:12086
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:12150
const Filters & filters() const
Get Filters.
Definition Settings.h:11829
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11855
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:12395
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12635
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:12258
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:12107
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:12016
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11981
Processing & set(const Filters::Reflection::Removal::Mode &value)
Set Filters::Reflection::Removal::Mode.
Definition Settings.h:12079
Processing & set(const Filters::Hole::Repair::Enabled &value)
Set Filters::Hole::Repair::Enabled.
Definition Settings.h:11953
const Settings::Processing::Resampling & get() const
Definition Settings.h:12593
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:12044
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:11995
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:12159
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11876
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11883
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12412
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:12051
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11794
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:12186
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:12312
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:12030
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:12009
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:12546
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:12299
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11815
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:12072
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11904
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:12238
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12507
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:12065
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:12248
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11897
const Settings::Processing::Color & get() const
Definition Settings.h:12142
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11761
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11890
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:12023
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:12228
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12516
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12497
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11841
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:12601
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11801
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12403
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:12267
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12441
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11822
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11661
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12347
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:12219
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:12287
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:12002
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:12277
const Resampling & resampling() const
Get Resampling.
Definition Settings.h:12114
Processing & set(const Filters::Hole::Repair::HoleSize &value)
Set Filters::Hole::Repair::HoleSize.
Definition Settings.h:11960
Processing & set(const Filters::Hole::Repair &value)
Set Filters::Hole::Repair.
Definition Settings.h:11946
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:12626
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12487
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:12356
Enable or disable box filter.
Definition Settings.h:12745
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12776
bool ValueType
The type of the underlying value.
Definition Settings.h:12762
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12796
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12767
static const Enabled yes
On/enabled.
Definition Settings.h:12763
static const Enabled no
Off/disabled.
Definition Settings.h:12764
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:12808
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12802
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12825
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12873
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12848
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12868
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:12885
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12879
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12902
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12945
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12956
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12950
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:12962
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12925
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:12979
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:13027
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:13039
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:13022
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13002
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:13033
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:13056
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:13099
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:13110
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13079
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:13104
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:13116
Removes points outside the given three-dimensional box.
Definition Settings.h:12710
std::string toString() const
Get the value as string.
std::tuple< Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO > Descendants
Definition Settings.h:13129
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:13304
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:13233
const PointO & pointO() const
Get PointO.
Definition Settings.h:13330
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:13342
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13260
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13254
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:13285
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13352
PointA & pointA()
Get PointA.
Definition Settings.h:13298
PointB & pointB()
Get PointB.
Definition Settings.h:13317
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:13323
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13388
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13370
const Extents & extents() const
Get Extents.
Definition Settings.h:13273
const PointA & pointA() const
Get PointA.
Definition Settings.h:13292
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13196
PointO & pointO()
Get PointO.
Definition Settings.h:13336
Extents & extents()
Get Extents.
Definition Settings.h:13279
const PointB & pointB() const
Get PointB.
Definition Settings.h:13311
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:13425
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13455
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:13379
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13436
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13361
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13266
Enable or disable depth filter.
Definition Settings.h:13504
static const Enabled yes
On/enabled.
Definition Settings.h:13522
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:13555
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13561
bool ValueType
The type of the underlying value.
Definition Settings.h:13521
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13567
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13526
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13523
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13535
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13584
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13627
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13607
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:13644
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13632
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13638
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:13482
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13781
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13788
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13800
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13769
bool operator==(const Depth &other) const
Equality operator.
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13657
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13846
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13810
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:13838
Range & range()
Get Range.
Definition Settings.h:13794
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13862
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13714
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13775
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13819
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:13748
Removes points outside the region of interest.
Definition Settings.h:12676
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:14167
Depth & depth()
Get Depth.
Definition Settings.h:14079
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:14092
const Box & box() const
Get Box.
Definition Settings.h:14019
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:14031
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:14219
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:14066
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:14150
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:14134
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:14158
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:14126
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:13880
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:14176
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:14142
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13959
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:13999
Box & box()
Get Box.
Definition Settings.h:14025
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:14108
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:14195
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:14052
const Depth & depth() const
Get Depth.
Definition Settings.h:14073
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:14045
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:14203
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:14038
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:14099
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:14085
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:14059
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:14117
RegionOfInterest()
Default constructor.
Choose how to sample colors for the point cloud. The rgb option gives a 2D image with full colors....
Definition Settings.h:14273
ValueType
The type of the underlying value.
Definition Settings.h:14303
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:14313
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:14360
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:14322
static const Color grayscale
grayscale
Definition Settings.h:14310
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:14354
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:14309
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:14348
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14342
static const Color rgb
rgb
Definition Settings.h:14308
ValueType value() const
Get the value.
For Zivid 2/2+, this setting controls whether to read out the full image sensor and use white project...
Definition Settings.h:14398
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:14445
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14440
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14460
static const Pixel all
all
Definition Settings.h:14436
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14437
static const Pixel by2x2
by2x2
Definition Settings.h:14441
static const Pixel by4x4
by4x4
Definition Settings.h:14442
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14492
ValueType
The type of the underlying value.
Definition Settings.h:14427
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14438
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14486
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14439
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:14480
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14498
std::string toString() const
Get the value as string.
Sampling settings.
Definition Settings.h:14242
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14524
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14580
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14639
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:14613
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14652
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14724
Pixel & pixel()
Get Pixel.
Definition Settings.h:14658
const Settings::Sampling::Color & get() const
Definition Settings.h:14673
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:14700
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14681
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:14708
const Color & color() const
Get Color.
Definition Settings.h:14633
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14645
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14664
Settings used when capturing a 3D capture or 2D+3D capture with a Zivid camera.
Definition Settings.h:81
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:16237
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:16075
const Settings::Color & get() const
Definition Settings.h:15698
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14920
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:15325
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:16056
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15624
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:15946
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15740
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:15374
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15764
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:15276
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15535
const Settings::RegionOfInterest & get() const
Definition Settings.h:16181
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15991
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:15113
const Processing & processing() const
Get Processing.
Definition Settings.h:15215
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15789
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15906
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:15227
const Settings::Sampling::Pixel & get() const
Definition Settings.h:16271
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15929
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15671
static Settings fromSerialized(const std::string &value)
Construct a new Settings instance from a previously serialized string.
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled.
Definition Settings.h:15493
Settings & set(const Processing::Filters::Hole::Repair::Enabled &value)
Set Processing::Filters::Hole::Repair::Enabled.
Definition Settings.h:15402
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15834
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:15938
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:15381
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15542
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15678
Color & color()
Get Color.
Definition Settings.h:15157
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:15182
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15917
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15645
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:15423
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15659
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15844
const Settings::Acquisitions & get() const
Definition Settings.h:15692
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15852
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:16038
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:16065
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:15297
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:16159
const Settings::Diagnostics & get() const
Definition Settings.h:15704
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15583
const Settings::Processing::Resampling & get() const
Definition Settings.h:16167
Settings & set(const Processing::Filters::Hole &value)
Set Processing::Filters::Hole.
Definition Settings.h:15388
Settings & set(const Processing::Filters::Reflection::Removal::Mode &value)
Set Processing::Filters::Reflection::Removal::Mode.
Definition Settings.h:15528
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:16149
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:16189
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:15241
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:16229
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15638
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:16001
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:16245
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:15974
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15872
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:16320
std::string serialize() const
Serialize to a string.
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15756
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:16205
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15549
const Settings::Processing & get() const
Definition Settings.h:15724
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15507
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:16333
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15862
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15500
Settings & set(const Processing::Filters::Hole::Repair::HoleSize &value)
Set Processing::Filters::Hole::Repair::HoleSize.
Definition Settings.h:15409
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:16197
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15781
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:15360
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15603
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:15964
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15895
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15610
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15748
Settings & set(const Processing::Resampling::Mode &value)
Set Processing::Resampling::Mode.
Definition Settings.h:15570
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:15955
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:15132
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:15014
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:16093
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:15332
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:16130
const Settings::Processing::Filters & get() const
Definition Settings.h:15797
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:15269
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const Engine &value)
Set Engine.
Definition Settings.h:15208
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15652
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15772
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:16020
Settings & set(const Processing::Resampling &value)
Set Processing::Resampling.
Definition Settings.h:15563
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:15367
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:16213
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:15234
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15479
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:15138
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15514
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:16048
const Settings::Engine & get() const
Definition Settings.h:15718
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15805
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:16029
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:15262
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15631
const Settings::Sampling::Color & get() const
Definition Settings.h:16265
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:15304
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15596
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15465
const Engine & engine() const
Get Engine.
Definition Settings.h:15196
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:15176
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:16011
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15824
const Color & color() const
Get Color.
Definition Settings.h:15151
Sampling & sampling()
Get Sampling.
Definition Settings.h:15665
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15521
Processing & processing()
Get Processing.
Definition Settings.h:15221
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15617
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:15189
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15982
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15712
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15814
Settings & set(const Color &value)
Set Color.
Definition Settings.h:15163
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:16122
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15883
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:16221
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:15339
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15685
Settings & set(const Processing::Filters::Hole::Repair::Strictness &value)
Set Processing::Filters::Hole::Repair::Strictness.
Definition Settings.h:15416
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:15283
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:15311
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:16253
const Settings::Sampling & get() const
Definition Settings.h:16259
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15444
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:15353
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:15144
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15556
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:15170
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:15430
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15451
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:15318
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15486
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15589
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:15437
Engine & engine()
Get Engine.
Definition Settings.h:15202
Settings & set(const Processing::Filters::Hole::Repair &value)
Set Processing::Filters::Hole::Repair.
Definition Settings.h:15395
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:15346
const Settings::Processing::Color & get() const
Definition Settings.h:15732
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15458
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:16112
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15472
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:16102
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:15255
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:15290
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15577
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:16175
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:16085
std::tuple< Settings::Acquisitions, Settings::Color, Settings::Diagnostics, Settings::Diagnostics::Enabled, Settings::Engine, Settings::Processing, Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::Mode, Settings::Processing::Color::Gamma, Settings::Processing::Filters, Settings::Processing::Filters::Cluster, Settings::Processing::Filters::Cluster::Removal, Settings::Processing::Filters::Cluster::Removal::Enabled, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance, Settings::Processing::Filters::Cluster::Removal::MinArea, Settings::Processing::Filters::Experimental, Settings::Processing::Filters::Experimental::ContrastDistortion, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold, Settings::Processing::Filters::Hole, Settings::Processing::Filters::Hole::Repair, Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness, Settings::Processing::Filters::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, Settings::Processing::Filters::Noise::Repair, Settings::Processing::Filters::Noise::Repair::Enabled, Settings::Processing::Filters::Noise::Suppression, Settings::Processing::Filters::Noise::Suppression::Enabled, Settings::Processing::Filters::Outlier, Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold, Settings::Processing::Filters::Reflection, Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode, Settings::Processing::Filters::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma, Settings::Processing::Resampling, Settings::Processing::Resampling::Mode, Settings::RegionOfInterest, Settings::RegionOfInterest::Box, Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO, Settings::RegionOfInterest::Depth, Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range, Settings::Sampling, Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14742
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:15248
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:16139
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:16354
NodeType
Definition NodeType.h:49
Definition EnvironmentInfo.h:74
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:84
Point with three coordinates as float.
Definition Point.h:60