Zivid C++ API 2.15.0+5fcc365b-1
Settings.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of the Zivid API
3 *
4 * Copyright 2015-2025 (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, 3.0 };
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
1487
1488 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1490 {
1491 public:
1493 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1494
1496 static constexpr const char *path{ "Engine" };
1497
1499 static constexpr const char *name{ "Engine" };
1500
1502 static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1503
1504The Phase Engine is the fastest choice in terms of both acquisition time and total capture
1505time, and is a good compromise between quality and speed. The Phase Engine is recommended for
1506objects that are diffuse, opaque, and slightly specular, and is suitable for applications in
1507logistics such as parcel induction.
1508
1509The Stripe Engine is built for exceptional point cloud quality in scenes with highly specular
1510reflective objects. This makes the engine suitable for applications such as factory automation,
1511manufacturing, and bin picking. Additional acquisition and processing time are required for
1512the Stripe Engine.
1513
1514The Omni Engine is built for exceptional point cloud quality on all scenes, including scenes
1515with extremely specular reflective objects, as well as transparent objects. This makes the Omni
1516Engine suitable for applications such as piece picking. Same as for the Stripe Engine, it trades
1517off speed for quality. The Omni Engine is only available for Zivid 2+.
1518
1519The Sage engine is built for use cases that require all points to be correct/accurate with
1520particularly high confidence. This can be very suitable for eliminating problems such as
1521reflection artifacts. This validation comes at the cost of speed, and sometimes reduced number
1522of valid points due to the removal of low-confidence data. The Sage Engine is only available
1523for Zivid 2+R.
1524)description" };
1525
1527 enum class ValueType
1528 {
1529 phase,
1530 stripe,
1531 omni,
1532 sage
1533 };
1534 static const Engine phase;
1535 static const Engine stripe;
1536 static const Engine omni;
1537 static const Engine sage;
1538
1540 static std::set<ValueType> validValues()
1541 {
1542 return { ValueType::phase, ValueType::stripe, ValueType::omni, ValueType::sage };
1543 }
1544
1546 Engine() = default;
1547
1549 explicit constexpr Engine(ValueType value)
1550 : m_opt{ verifyValue(value) }
1551 {}
1552
1558
1560 bool hasValue() const;
1561
1563 void reset();
1564
1566 std::string toString() const;
1567
1569 friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1570 {
1571 return stream << Engine{ value }.toString();
1572 }
1573
1575 bool operator==(const Engine &other) const
1576 {
1577 return m_opt == other.m_opt;
1578 }
1579
1581 bool operator!=(const Engine &other) const
1582 {
1583 return m_opt != other.m_opt;
1584 }
1585
1587 friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1588 {
1589 return stream << value.toString();
1590 }
1591
1592 private:
1593 void setFromString(const std::string &value);
1594
1595 constexpr ValueType static verifyValue(const ValueType &value)
1596 {
1597 return value == ValueType::phase || value == ValueType::stripe || value == ValueType::omni
1598 || value == ValueType::sage
1599 ? value
1600 : throw std::invalid_argument{
1601 "Invalid value: Engine{ "
1602 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1603 };
1604 }
1605
1606 std::optional<ValueType> m_opt;
1607
1608 friend struct DataModel::Detail::Befriend<Engine>;
1609 };
1610
1612
1613 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1615 {
1616 public:
1618 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1619
1621 static constexpr const char *path{ "Processing" };
1622
1624 static constexpr const char *name{ "Processing" };
1625
1627 static constexpr const char *description{
1628 R"description(Settings related to processing of a capture, including filters and color balance.)description"
1629 };
1630
1638
1639 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1641 {
1642 public:
1644 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1645
1647 static constexpr const char *path{ "Processing/Color" };
1648
1650 static constexpr const char *name{ "Color" };
1651
1653 static constexpr const char *description{ R"description(Color settings.
1654
1655These settings are deprecated as of SDK 2.14. These settings will be removed in the next SDK major
1656version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1657in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use the
1658`Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it to .yml.
1659)description" };
1660
1662
1663 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1665 {
1666 public:
1668 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
1669
1671 static constexpr const char *path{ "Processing/Color/Balance" };
1672
1674 static constexpr const char *name{ "Balance" };
1675
1677 static constexpr const char *description{ R"description(Color balance settings.)description" };
1678
1687
1688 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1690 {
1691 public:
1693 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1694
1696 static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1697
1699 static constexpr const char *name{ "Blue" };
1700
1702 static constexpr const char *description{ R"description(Digital gain applied to blue channel.
1703
1704This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1705version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1706in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1707the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1708to .yml.
1709)description" };
1710
1712 using ValueType = double;
1713
1715 static constexpr Range<double> validRange()
1716 {
1717 return { 1.0, 8.0 };
1718 }
1719
1721 Blue() = default;
1722
1724 explicit constexpr Blue(double value)
1725 : m_opt{ verifyValue(value) }
1726 {}
1727
1732 double value() const;
1733
1735 bool hasValue() const;
1736
1738 void reset();
1739
1741 std::string toString() const;
1742
1744 bool operator==(const Blue &other) const
1745 {
1746 return m_opt == other.m_opt;
1747 }
1748
1750 bool operator!=(const Blue &other) const
1751 {
1752 return m_opt != other.m_opt;
1753 }
1754
1756 bool operator<(const Blue &other) const
1757 {
1758 return m_opt < other.m_opt;
1759 }
1760
1762 bool operator>(const Blue &other) const
1763 {
1764 return m_opt > other.m_opt;
1765 }
1766
1768 bool operator<=(const Blue &other) const
1769 {
1770 return m_opt <= other.m_opt;
1771 }
1772
1774 bool operator>=(const Blue &other) const
1775 {
1776 return m_opt >= other.m_opt;
1777 }
1778
1780 friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1781 {
1782 return stream << value.toString();
1783 }
1784
1785 private:
1786 void setFromString(const std::string &value);
1787
1788 constexpr ValueType static verifyValue(const ValueType &value)
1789 {
1790 return validRange().isInRange(value)
1791 ? value
1792 : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1793 + " } is not in range ["
1794 + std::to_string(validRange().min()) + ", "
1795 + std::to_string(validRange().max()) + "]" };
1796 }
1797
1798 std::optional<double> m_opt;
1799
1800 friend struct DataModel::Detail::Befriend<Blue>;
1801 };
1802
1811
1812 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1814 {
1815 public:
1817 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1818
1820 static constexpr const char *path{ "Processing/Color/Balance/Green" };
1821
1823 static constexpr const char *name{ "Green" };
1824
1826 static constexpr const char *description{ R"description(Digital gain applied to green channel.
1827
1828This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1829version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1830in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1831the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1832to .yml.
1833)description" };
1834
1836 using ValueType = double;
1837
1839 static constexpr Range<double> validRange()
1840 {
1841 return { 1.0, 8.0 };
1842 }
1843
1845 Green() = default;
1846
1848 explicit constexpr Green(double value)
1849 : m_opt{ verifyValue(value) }
1850 {}
1851
1856 double value() const;
1857
1859 bool hasValue() const;
1860
1862 void reset();
1863
1865 std::string toString() const;
1866
1868 bool operator==(const Green &other) const
1869 {
1870 return m_opt == other.m_opt;
1871 }
1872
1874 bool operator!=(const Green &other) const
1875 {
1876 return m_opt != other.m_opt;
1877 }
1878
1880 bool operator<(const Green &other) const
1881 {
1882 return m_opt < other.m_opt;
1883 }
1884
1886 bool operator>(const Green &other) const
1887 {
1888 return m_opt > other.m_opt;
1889 }
1890
1892 bool operator<=(const Green &other) const
1893 {
1894 return m_opt <= other.m_opt;
1895 }
1896
1898 bool operator>=(const Green &other) const
1899 {
1900 return m_opt >= other.m_opt;
1901 }
1902
1904 friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1905 {
1906 return stream << value.toString();
1907 }
1908
1909 private:
1910 void setFromString(const std::string &value);
1911
1912 constexpr ValueType static verifyValue(const ValueType &value)
1913 {
1914 return validRange().isInRange(value)
1915 ? value
1916 : throw std::out_of_range{ "Green{ " + std::to_string(value)
1917 + " } is not in range ["
1918 + std::to_string(validRange().min()) + ", "
1919 + std::to_string(validRange().max()) + "]" };
1920 }
1921
1922 std::optional<double> m_opt;
1923
1924 friend struct DataModel::Detail::Befriend<Green>;
1925 };
1926
1935
1936 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
1938 {
1939 public:
1941 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
1942
1944 static constexpr const char *path{ "Processing/Color/Balance/Red" };
1945
1947 static constexpr const char *name{ "Red" };
1948
1950 static constexpr const char *description{ R"description(Digital gain applied to red channel.
1951
1952This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
1953version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
1954in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
1955the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
1956to .yml.
1957)description" };
1958
1960 using ValueType = double;
1961
1963 static constexpr Range<double> validRange()
1964 {
1965 return { 1.0, 8.0 };
1966 }
1967
1969 Red() = default;
1970
1972 explicit constexpr Red(double value)
1973 : m_opt{ verifyValue(value) }
1974 {}
1975
1980 double value() const;
1981
1983 bool hasValue() const;
1984
1986 void reset();
1987
1989 std::string toString() const;
1990
1992 bool operator==(const Red &other) const
1993 {
1994 return m_opt == other.m_opt;
1995 }
1996
1998 bool operator!=(const Red &other) const
1999 {
2000 return m_opt != other.m_opt;
2001 }
2002
2004 bool operator<(const Red &other) const
2005 {
2006 return m_opt < other.m_opt;
2007 }
2008
2010 bool operator>(const Red &other) const
2011 {
2012 return m_opt > other.m_opt;
2013 }
2014
2016 bool operator<=(const Red &other) const
2017 {
2018 return m_opt <= other.m_opt;
2019 }
2020
2022 bool operator>=(const Red &other) const
2023 {
2024 return m_opt >= other.m_opt;
2025 }
2026
2028 friend std::ostream &operator<<(std::ostream &stream, const Red &value)
2029 {
2030 return stream << value.toString();
2031 }
2032
2033 private:
2034 void setFromString(const std::string &value);
2035
2036 constexpr ValueType static verifyValue(const ValueType &value)
2037 {
2038 return validRange().isInRange(value)
2039 ? value
2040 : throw std::out_of_range{ "Red{ " + std::to_string(value)
2041 + " } is not in range ["
2042 + std::to_string(validRange().min()) + ", "
2043 + std::to_string(validRange().max()) + "]" };
2044 }
2045
2046 std::optional<double> m_opt;
2047
2048 friend struct DataModel::Detail::Befriend<Red>;
2049 };
2050
2051 using Descendants = std::tuple<
2055
2058
2072#ifndef NO_DOC
2073 template<
2074 typename... Args,
2075 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2076 typename std::enable_if<
2077 Zivid::Detail::TypeTraits::
2078 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2079 int>::type = 0>
2080#else
2081 template<typename... Args>
2082#endif
2083 explicit Balance(Args &&...args)
2084 {
2085 using namespace Zivid::Detail::TypeTraits;
2086
2087 static_assert(
2088 AllArgsDecayedAreUnique<Args...>::value,
2089 "Found duplicate types among the arguments passed to Balance(...). "
2090 "Types should be listed at most once.");
2091
2092 set(std::forward<Args>(args)...);
2093 }
2094
2107#ifndef NO_DOC
2108 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2109#else
2110 template<typename... Args>
2111#endif
2112 void set(Args &&...args)
2113 {
2114 using namespace Zivid::Detail::TypeTraits;
2115
2116 using AllArgsAreDescendantNodes =
2117 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2118 static_assert(
2119 AllArgsAreDescendantNodes::value,
2120 "All arguments passed to set(...) must be descendant nodes.");
2121
2122 static_assert(
2123 AllArgsDecayedAreUnique<Args...>::value,
2124 "Found duplicate types among the arguments passed to set(...). "
2125 "Types should be listed at most once.");
2126
2127 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2128 }
2129
2143#ifndef NO_DOC
2144 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2145#else
2146 template<typename... Args>
2147#endif
2148 Balance copyWith(Args &&...args) const
2149 {
2150 using namespace Zivid::Detail::TypeTraits;
2151
2152 using AllArgsAreDescendantNodes =
2153 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2154 static_assert(
2155 AllArgsAreDescendantNodes::value,
2156 "All arguments passed to copyWith(...) must be descendant nodes.");
2157
2158 static_assert(
2159 AllArgsDecayedAreUnique<Args...>::value,
2160 "Found duplicate types among the arguments passed to copyWith(...). "
2161 "Types should be listed at most once.");
2162
2163 auto copy{ *this };
2164 copy.set(std::forward<Args>(args)...);
2165 return copy;
2166 }
2167
2169 const Blue &blue() const
2170 {
2171 return m_blue;
2172 }
2173
2176 {
2177 return m_blue;
2178 }
2179
2181 Balance &set(const Blue &value)
2182 {
2183 m_blue = value;
2184 return *this;
2185 }
2186
2188 const Green &green() const
2189 {
2190 return m_green;
2191 }
2192
2195 {
2196 return m_green;
2197 }
2198
2200 Balance &set(const Green &value)
2201 {
2202 m_green = value;
2203 return *this;
2204 }
2205
2207 const Red &red() const
2208 {
2209 return m_red;
2210 }
2211
2214 {
2215 return m_red;
2216 }
2217
2219 Balance &set(const Red &value)
2220 {
2221 m_red = value;
2222 return *this;
2223 }
2224
2225 template<
2226 typename T,
2227 typename std::enable_if<
2228 std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2229 int>::type = 0>
2231 {
2232 return m_blue;
2233 }
2234
2235 template<
2236 typename T,
2237 typename std::enable_if<
2238 std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2239 int>::type = 0>
2241 {
2242 return m_green;
2243 }
2244
2245 template<
2246 typename T,
2247 typename std::
2248 enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
2250 {
2251 return m_red;
2252 }
2253
2254 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2256 {
2257 return m_blue;
2258 }
2259
2260 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2262 {
2263 return m_green;
2264 }
2265
2266 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2268 {
2269 return m_red;
2270 }
2271
2273 template<typename F>
2274 void forEach(const F &f) const
2275 {
2276 f(m_blue);
2277 f(m_green);
2278 f(m_red);
2279 }
2280
2282 template<typename F>
2283 void forEach(const F &f)
2284 {
2285 f(m_blue);
2286 f(m_green);
2287 f(m_red);
2288 }
2289
2291 bool operator==(const Balance &other) const;
2292
2294 bool operator!=(const Balance &other) const;
2295
2297 std::string toString() const;
2298
2300 friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
2301 {
2302 return stream << value.toString();
2303 }
2304
2305 private:
2306 void setFromString(const std::string &value);
2307
2308 void setFromString(const std::string &fullPath, const std::string &value);
2309
2310 std::string getString(const std::string &fullPath) const;
2311
2312 Blue m_blue;
2313 Green m_green;
2314 Red m_red;
2315
2316 friend struct DataModel::Detail::Befriend<Balance>;
2317 };
2318
2320
2321 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2323 {
2324 public:
2326 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
2327
2329 static constexpr const char *path{ "Processing/Color/Experimental" };
2330
2332 static constexpr const char *name{ "Experimental" };
2333
2335 static constexpr const char *description{
2336 R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
2337 };
2338
2367
2368 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2370 {
2371 public:
2373 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2374
2376 static constexpr const char *path{ "Processing/Color/Experimental/Mode" };
2377
2379 static constexpr const char *name{ "Mode" };
2380
2382 static constexpr const char *description{
2383 R"description(This setting controls how the color image is computed.
2384
2385`automatic` is the default option. `automatic` is identical to `useFirstAcquisition` for
2386single-acquisition captures and multi-acquisition captures when all the acquisitions have
2387identical (duplicated) acquisition settings. `automatic` is identical to `toneMapping` for
2388multi-acquisition HDR captures with differing acquisition settings.
2389
2390`useFirstAcquisition` uses the color data acquired from the first acquisition provided. If
2391the capture consists of more than one acquisition, then the remaining acquisitions are not used
2392for the color image. No tone mapping is performed. This option provides the most control of
2393the color image, and the color values will be consistent over repeated captures with the same
2394settings.
2395
2396`toneMapping` uses all the acquisitions to create one merged and normalized color image. For
2397HDR captures the dynamic range of the captured images is usually higher than the 8-bit color
2398image range. `toneMapping` will map the HDR color data to the 8-bit color output range by
2399applying a scaling factor. `toneMapping` can also be used for single-acquisition captures to
2400normalize the captured color image to the full 8-bit output. Note that when using `toneMapping`
2401mode the color values can be inconsistent over repeated captures if you move, add or remove
2402objects in the scene. For the most control over the colors, select the `useFirstAcquisition`
2403mode.
2404
2405This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
2406version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
2407in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
2408the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
2409to .yml.
2410)description"
2411 };
2412
2414 enum class ValueType
2415 {
2416 automatic,
2417 useFirstAcquisition,
2418 toneMapping
2419 };
2420 static const Mode automatic;
2422 static const Mode toneMapping;
2423
2425 static std::set<ValueType> validValues()
2426 {
2427 return { ValueType::automatic, ValueType::useFirstAcquisition, ValueType::toneMapping };
2428 }
2429
2431 Mode() = default;
2432
2434 explicit constexpr Mode(ValueType value)
2435 : m_opt{ verifyValue(value) }
2436 {}
2437
2443
2445 bool hasValue() const;
2446
2448 void reset();
2449
2451 std::string toString() const;
2452
2454 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
2455 {
2456 return stream << Mode{ value }.toString();
2457 }
2458
2460 bool operator==(const Mode &other) const
2461 {
2462 return m_opt == other.m_opt;
2463 }
2464
2466 bool operator!=(const Mode &other) const
2467 {
2468 return m_opt != other.m_opt;
2469 }
2470
2472 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
2473 {
2474 return stream << value.toString();
2475 }
2476
2477 private:
2478 void setFromString(const std::string &value);
2479
2480 constexpr ValueType static verifyValue(const ValueType &value)
2481 {
2482 return value == ValueType::automatic || value == ValueType::useFirstAcquisition
2483 || value == ValueType::toneMapping
2484 ? value
2485 : throw std::invalid_argument{
2486 "Invalid value: Mode{ "
2487 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
2488 + " }"
2489 };
2490 }
2491
2492 std::optional<ValueType> m_opt;
2493
2494 friend struct DataModel::Detail::Befriend<Mode>;
2495 };
2496
2497 using Descendants = std::tuple<Settings::Processing::Color::Experimental::Mode>;
2498
2501
2513#ifndef NO_DOC
2514 template<
2515 typename... Args,
2516 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2517 typename std::enable_if<
2518 Zivid::Detail::TypeTraits::
2519 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
2520 int>::type = 0>
2521#else
2522 template<typename... Args>
2523#endif
2524 explicit Experimental(Args &&...args)
2525 {
2526 using namespace Zivid::Detail::TypeTraits;
2527
2528 static_assert(
2529 AllArgsDecayedAreUnique<Args...>::value,
2530 "Found duplicate types among the arguments passed to Experimental(...). "
2531 "Types should be listed at most once.");
2532
2533 set(std::forward<Args>(args)...);
2534 }
2535
2546#ifndef NO_DOC
2547 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2548#else
2549 template<typename... Args>
2550#endif
2551 void set(Args &&...args)
2552 {
2553 using namespace Zivid::Detail::TypeTraits;
2554
2555 using AllArgsAreDescendantNodes =
2556 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2557 static_assert(
2558 AllArgsAreDescendantNodes::value,
2559 "All arguments passed to set(...) must be descendant nodes.");
2560
2561 static_assert(
2562 AllArgsDecayedAreUnique<Args...>::value,
2563 "Found duplicate types among the arguments passed to set(...). "
2564 "Types should be listed at most once.");
2565
2566 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2567 }
2568
2580#ifndef NO_DOC
2581 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2582#else
2583 template<typename... Args>
2584#endif
2585 Experimental copyWith(Args &&...args) const
2586 {
2587 using namespace Zivid::Detail::TypeTraits;
2588
2589 using AllArgsAreDescendantNodes =
2590 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2591 static_assert(
2592 AllArgsAreDescendantNodes::value,
2593 "All arguments passed to copyWith(...) must be descendant nodes.");
2594
2595 static_assert(
2596 AllArgsDecayedAreUnique<Args...>::value,
2597 "Found duplicate types among the arguments passed to copyWith(...). "
2598 "Types should be listed at most once.");
2599
2600 auto copy{ *this };
2601 copy.set(std::forward<Args>(args)...);
2602 return copy;
2603 }
2604
2606 const Mode &mode() const
2607 {
2608 return m_mode;
2609 }
2610
2613 {
2614 return m_mode;
2615 }
2616
2618 Experimental &set(const Mode &value)
2619 {
2620 m_mode = value;
2621 return *this;
2622 }
2623
2624 template<
2625 typename T,
2626 typename std::enable_if<
2627 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
2628 int>::type = 0>
2630 {
2631 return m_mode;
2632 }
2633
2634 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2636 {
2637 return m_mode;
2638 }
2639
2641 template<typename F>
2642 void forEach(const F &f) const
2643 {
2644 f(m_mode);
2645 }
2646
2648 template<typename F>
2649 void forEach(const F &f)
2650 {
2651 f(m_mode);
2652 }
2653
2655 bool operator==(const Experimental &other) const;
2656
2658 bool operator!=(const Experimental &other) const;
2659
2661 std::string toString() const;
2662
2664 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2665 {
2666 return stream << value.toString();
2667 }
2668
2669 private:
2670 void setFromString(const std::string &value);
2671
2672 void setFromString(const std::string &fullPath, const std::string &value);
2673
2674 std::string getString(const std::string &fullPath) const;
2675
2676 Mode m_mode;
2677
2678 friend struct DataModel::Detail::Befriend<Experimental>;
2679 };
2680
2690
2691 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
2693 {
2694 public:
2696 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
2697
2699 static constexpr const char *path{ "Processing/Color/Gamma" };
2700
2702 static constexpr const char *name{ "Gamma" };
2703
2705 static constexpr const char *description{
2706 R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2707greater than 1 makes the colors darker.
2708
2709This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
2710version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
2711in the `Settings/Color` node. Tip: If you want to convert an existing settings.yml file to use
2712the `Settings/Color` node, you can import the .yml file into Zivid Studio and then re-export it
2713to .yml.
2714)description"
2715 };
2716
2718 using ValueType = double;
2719
2721 static constexpr Range<double> validRange()
2722 {
2723 return { 0.25, 1.5 };
2724 }
2725
2727 Gamma() = default;
2728
2730 explicit constexpr Gamma(double value)
2731 : m_opt{ verifyValue(value) }
2732 {}
2733
2738 double value() const;
2739
2741 bool hasValue() const;
2742
2744 void reset();
2745
2747 std::string toString() const;
2748
2750 bool operator==(const Gamma &other) const
2751 {
2752 return m_opt == other.m_opt;
2753 }
2754
2756 bool operator!=(const Gamma &other) const
2757 {
2758 return m_opt != other.m_opt;
2759 }
2760
2762 bool operator<(const Gamma &other) const
2763 {
2764 return m_opt < other.m_opt;
2765 }
2766
2768 bool operator>(const Gamma &other) const
2769 {
2770 return m_opt > other.m_opt;
2771 }
2772
2774 bool operator<=(const Gamma &other) const
2775 {
2776 return m_opt <= other.m_opt;
2777 }
2778
2780 bool operator>=(const Gamma &other) const
2781 {
2782 return m_opt >= other.m_opt;
2783 }
2784
2786 friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2787 {
2788 return stream << value.toString();
2789 }
2790
2791 private:
2792 void setFromString(const std::string &value);
2793
2794 constexpr ValueType static verifyValue(const ValueType &value)
2795 {
2796 return validRange().isInRange(value)
2797 ? value
2798 : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2799 + std::to_string(validRange().min()) + ", "
2800 + std::to_string(validRange().max()) + "]" };
2801 }
2802
2803 std::optional<double> m_opt;
2804
2805 friend struct DataModel::Detail::Befriend<Gamma>;
2806 };
2807
2808 using Descendants = std::tuple<
2816
2819
2837#ifndef NO_DOC
2838 template<
2839 typename... Args,
2840 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2841 typename std::enable_if<
2842 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
2843 value,
2844 int>::type = 0>
2845#else
2846 template<typename... Args>
2847#endif
2848 explicit Color(Args &&...args)
2849 {
2850 using namespace Zivid::Detail::TypeTraits;
2851
2852 static_assert(
2853 AllArgsDecayedAreUnique<Args...>::value,
2854 "Found duplicate types among the arguments passed to Color(...). "
2855 "Types should be listed at most once.");
2856
2857 set(std::forward<Args>(args)...);
2858 }
2859
2876#ifndef NO_DOC
2877 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2878#else
2879 template<typename... Args>
2880#endif
2881 void set(Args &&...args)
2882 {
2883 using namespace Zivid::Detail::TypeTraits;
2884
2885 using AllArgsAreDescendantNodes =
2886 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2887 static_assert(
2888 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
2889
2890 static_assert(
2891 AllArgsDecayedAreUnique<Args...>::value,
2892 "Found duplicate types among the arguments passed to set(...). "
2893 "Types should be listed at most once.");
2894
2895 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2896 }
2897
2915#ifndef NO_DOC
2916 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2917#else
2918 template<typename... Args>
2919#endif
2920 Color copyWith(Args &&...args) const
2921 {
2922 using namespace Zivid::Detail::TypeTraits;
2923
2924 using AllArgsAreDescendantNodes =
2925 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2926 static_assert(
2927 AllArgsAreDescendantNodes::value,
2928 "All arguments passed to copyWith(...) must be descendant nodes.");
2929
2930 static_assert(
2931 AllArgsDecayedAreUnique<Args...>::value,
2932 "Found duplicate types among the arguments passed to copyWith(...). "
2933 "Types should be listed at most once.");
2934
2935 auto copy{ *this };
2936 copy.set(std::forward<Args>(args)...);
2937 return copy;
2938 }
2939
2941 const Balance &balance() const
2942 {
2943 return m_balance;
2944 }
2945
2948 {
2949 return m_balance;
2950 }
2951
2953 Color &set(const Balance &value)
2954 {
2955 m_balance = value;
2956 return *this;
2957 }
2958
2960 Color &set(const Balance::Blue &value)
2961 {
2962 m_balance.set(value);
2963 return *this;
2964 }
2965
2967 Color &set(const Balance::Green &value)
2968 {
2969 m_balance.set(value);
2970 return *this;
2971 }
2972
2974 Color &set(const Balance::Red &value)
2975 {
2976 m_balance.set(value);
2977 return *this;
2978 }
2979
2982 {
2983 return m_experimental;
2984 }
2985
2988 {
2989 return m_experimental;
2990 }
2991
2993 Color &set(const Experimental &value)
2994 {
2995 m_experimental = value;
2996 return *this;
2997 }
2998
3001 {
3002 m_experimental.set(value);
3003 return *this;
3004 }
3005
3007 const Gamma &gamma() const
3008 {
3009 return m_gamma;
3010 }
3011
3014 {
3015 return m_gamma;
3016 }
3017
3019 Color &set(const Gamma &value)
3020 {
3021 m_gamma = value;
3022 return *this;
3023 }
3024
3025 template<
3026 typename T,
3027 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type =
3028 0>
3030 {
3031 return m_balance;
3032 }
3033
3034 template<
3035 typename T,
3036 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::
3037 type = 0>
3039 {
3040 return m_balance.get<Settings::Processing::Color::Balance::Blue>();
3041 }
3042
3043 template<
3044 typename T,
3045 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
3046 type = 0>
3048 {
3049 return m_balance.get<Settings::Processing::Color::Balance::Green>();
3050 }
3051
3052 template<
3053 typename T,
3054 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::
3055 type = 0>
3057 {
3058 return m_balance.get<Settings::Processing::Color::Balance::Red>();
3059 }
3060
3061 template<
3062 typename T,
3063 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::
3064 type = 0>
3066 {
3067 return m_experimental;
3068 }
3069
3070 template<
3071 typename T,
3072 typename std::enable_if<
3073 std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value,
3074 int>::type = 0>
3076 {
3077 return m_experimental.get<Settings::Processing::Color::Experimental::Mode>();
3078 }
3079
3080 template<
3081 typename T,
3082 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
3084 {
3085 return m_gamma;
3086 }
3087
3088 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3090 {
3091 return m_balance;
3092 }
3093
3094 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3096 {
3097 return m_experimental;
3098 }
3099
3100 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3102 {
3103 return m_gamma;
3104 }
3105
3107 template<typename F>
3108 void forEach(const F &f) const
3109 {
3110 f(m_balance);
3111 f(m_experimental);
3112 f(m_gamma);
3113 }
3114
3116 template<typename F>
3117 void forEach(const F &f)
3118 {
3119 f(m_balance);
3120 f(m_experimental);
3121 f(m_gamma);
3122 }
3123
3125 bool operator==(const Color &other) const;
3126
3128 bool operator!=(const Color &other) const;
3129
3131 std::string toString() const;
3132
3134 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
3135 {
3136 return stream << value.toString();
3137 }
3138
3139 private:
3140 void setFromString(const std::string &value);
3141
3142 void setFromString(const std::string &fullPath, const std::string &value);
3143
3144 std::string getString(const std::string &fullPath) const;
3145
3146 Balance m_balance;
3147 Experimental m_experimental;
3148 Gamma m_gamma;
3149
3150 friend struct DataModel::Detail::Befriend<Color>;
3151 };
3152
3154
3155 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3157 {
3158 public:
3160 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3161
3163 static constexpr const char *path{ "Processing/Filters" };
3164
3166 static constexpr const char *name{ "Filters" };
3167
3169 static constexpr const char *description{ R"description(Filter settings.)description" };
3170
3173
3174 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3176 {
3177 public:
3179 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3180
3182 static constexpr const char *path{ "Processing/Filters/Cluster" };
3183
3185 static constexpr const char *name{ "Cluster" };
3186
3188 static constexpr const char *description{
3189 R"description(Removes floating points and isolated clusters from the point cloud.
3190)description"
3191 };
3192
3194
3195 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3197 {
3198 public:
3200 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
3201
3203 static constexpr const char *path{ "Processing/Filters/Cluster/Removal" };
3204
3206 static constexpr const char *name{ "Removal" };
3207
3209 static constexpr const char *description{ R"description(Cluster removal filter.)description" };
3210
3212
3213 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3215 {
3216 public:
3218 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3219
3221 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/Enabled" };
3222
3224 static constexpr const char *name{ "Enabled" };
3225
3227 static constexpr const char *description{
3228 R"description(Enable or disable cluster removal.)description"
3229 };
3230
3232 using ValueType = bool;
3233 static const Enabled yes;
3234 static const Enabled no;
3235
3237 static std::set<bool> validValues()
3238 {
3239 return { false, true };
3240 }
3241
3243 Enabled() = default;
3244
3246 explicit constexpr Enabled(bool value)
3247 : m_opt{ value }
3248 {}
3249
3254 bool value() const;
3255
3257 bool hasValue() const;
3258
3260 void reset();
3261
3263 std::string toString() const;
3264
3266 bool operator==(const Enabled &other) const
3267 {
3268 return m_opt == other.m_opt;
3269 }
3270
3272 bool operator!=(const Enabled &other) const
3273 {
3274 return m_opt != other.m_opt;
3275 }
3276
3278 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3279 {
3280 return stream << value.toString();
3281 }
3282
3283 private:
3284 void setFromString(const std::string &value);
3285
3286 std::optional<bool> m_opt;
3287
3288 friend struct DataModel::Detail::Befriend<Enabled>;
3289 };
3290
3295
3296 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3298 {
3299 public:
3301 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3302
3304 static constexpr const char *path{
3305 "Processing/Filters/Cluster/Removal/MaxNeighborDistance"
3306 };
3307
3309 static constexpr const char *name{ "MaxNeighborDistance" };
3310
3312 static constexpr const char *description{
3313 R"description(Maximum normalized distance between neighboring points that are still classified as
3314belonging to the same cluster. The default value is optimal for most scenes. On messy
3315scenes turning this setting down helps removing more bad points.
3316)description"
3317 };
3318
3320 using ValueType = double;
3321
3323 static constexpr Range<double> validRange()
3324 {
3325 return { 2.0, 10.0 };
3326 }
3327
3330
3332 explicit constexpr MaxNeighborDistance(double value)
3333 : m_opt{ verifyValue(value) }
3334 {}
3335
3340 double value() const;
3341
3343 bool hasValue() const;
3344
3346 void reset();
3347
3349 std::string toString() const;
3350
3352 bool operator==(const MaxNeighborDistance &other) const
3353 {
3354 return m_opt == other.m_opt;
3355 }
3356
3358 bool operator!=(const MaxNeighborDistance &other) const
3359 {
3360 return m_opt != other.m_opt;
3361 }
3362
3364 bool operator<(const MaxNeighborDistance &other) const
3365 {
3366 return m_opt < other.m_opt;
3367 }
3368
3370 bool operator>(const MaxNeighborDistance &other) const
3371 {
3372 return m_opt > other.m_opt;
3373 }
3374
3376 bool operator<=(const MaxNeighborDistance &other) const
3377 {
3378 return m_opt <= other.m_opt;
3379 }
3380
3382 bool operator>=(const MaxNeighborDistance &other) const
3383 {
3384 return m_opt >= other.m_opt;
3385 }
3386
3388 friend std::ostream &operator<<(std::ostream &stream, const MaxNeighborDistance &value)
3389 {
3390 return stream << value.toString();
3391 }
3392
3393 private:
3394 void setFromString(const std::string &value);
3395
3396 constexpr ValueType static verifyValue(const ValueType &value)
3397 {
3398 return validRange().isInRange(value)
3399 ? value
3400 : throw std::out_of_range{ "MaxNeighborDistance{ " + std::to_string(value)
3401 + " } is not in range ["
3402 + std::to_string(validRange().min()) + ", "
3403 + std::to_string(validRange().max()) + "]" };
3404 }
3405
3406 std::optional<double> m_opt;
3407
3408 friend struct DataModel::Detail::Befriend<MaxNeighborDistance>;
3409 };
3410
3414
3415 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
3417 {
3418 public:
3420 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
3421
3423 static constexpr const char *path{ "Processing/Filters/Cluster/Removal/MinArea" };
3424
3426 static constexpr const char *name{ "MinArea" };
3427
3429 static constexpr const char *description{
3430 R"description(Clusters with area below this threshold are removed by the filter.
3431The area is given in mm^2.
3432)description"
3433 };
3434
3436 using ValueType = double;
3437
3439 static constexpr Range<double> validRange()
3440 {
3441 return { 0.0, 1500.0 };
3442 }
3443
3445 MinArea() = default;
3446
3448 explicit constexpr MinArea(double value)
3449 : m_opt{ verifyValue(value) }
3450 {}
3451
3456 double value() const;
3457
3459 bool hasValue() const;
3460
3462 void reset();
3463
3465 std::string toString() const;
3466
3468 bool operator==(const MinArea &other) const
3469 {
3470 return m_opt == other.m_opt;
3471 }
3472
3474 bool operator!=(const MinArea &other) const
3475 {
3476 return m_opt != other.m_opt;
3477 }
3478
3480 bool operator<(const MinArea &other) const
3481 {
3482 return m_opt < other.m_opt;
3483 }
3484
3486 bool operator>(const MinArea &other) const
3487 {
3488 return m_opt > other.m_opt;
3489 }
3490
3492 bool operator<=(const MinArea &other) const
3493 {
3494 return m_opt <= other.m_opt;
3495 }
3496
3498 bool operator>=(const MinArea &other) const
3499 {
3500 return m_opt >= other.m_opt;
3501 }
3502
3504 friend std::ostream &operator<<(std::ostream &stream, const MinArea &value)
3505 {
3506 return stream << value.toString();
3507 }
3508
3509 private:
3510 void setFromString(const std::string &value);
3511
3512 constexpr ValueType static verifyValue(const ValueType &value)
3513 {
3514 return validRange().isInRange(value)
3515 ? value
3516 : throw std::out_of_range{ "MinArea{ " + std::to_string(value)
3517 + " } is not in range ["
3518 + std::to_string(validRange().min()) + ", "
3519 + std::to_string(validRange().max()) + "]" };
3520 }
3521
3522 std::optional<double> m_opt;
3523
3524 friend struct DataModel::Detail::Befriend<MinArea>;
3525 };
3526
3527 using Descendants = std::tuple<
3531
3534
3548#ifndef NO_DOC
3549 template<
3550 typename... Args,
3551 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3552 typename std::enable_if<
3553 Zivid::Detail::TypeTraits::
3554 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3555 int>::type = 0>
3556#else
3557 template<typename... Args>
3558#endif
3559 explicit Removal(Args &&...args)
3560 {
3561 using namespace Zivid::Detail::TypeTraits;
3562
3563 static_assert(
3564 AllArgsDecayedAreUnique<Args...>::value,
3565 "Found duplicate types among the arguments passed to Removal(...). "
3566 "Types should be listed at most once.");
3567
3568 set(std::forward<Args>(args)...);
3569 }
3570
3583#ifndef NO_DOC
3584 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3585#else
3586 template<typename... Args>
3587#endif
3588 void set(Args &&...args)
3589 {
3590 using namespace Zivid::Detail::TypeTraits;
3591
3592 using AllArgsAreDescendantNodes =
3593 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3594 static_assert(
3595 AllArgsAreDescendantNodes::value,
3596 "All arguments passed to set(...) must be descendant nodes.");
3597
3598 static_assert(
3599 AllArgsDecayedAreUnique<Args...>::value,
3600 "Found duplicate types among the arguments passed to set(...). "
3601 "Types should be listed at most once.");
3602
3603 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3604 }
3605
3619#ifndef NO_DOC
3620 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3621#else
3622 template<typename... Args>
3623#endif
3624 Removal copyWith(Args &&...args) const
3625 {
3626 using namespace Zivid::Detail::TypeTraits;
3627
3628 using AllArgsAreDescendantNodes =
3629 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3630 static_assert(
3631 AllArgsAreDescendantNodes::value,
3632 "All arguments passed to copyWith(...) must be descendant nodes.");
3633
3634 static_assert(
3635 AllArgsDecayedAreUnique<Args...>::value,
3636 "Found duplicate types among the arguments passed to copyWith(...). "
3637 "Types should be listed at most once.");
3638
3639 auto copy{ *this };
3640 copy.set(std::forward<Args>(args)...);
3641 return copy;
3642 }
3643
3645 const Enabled &isEnabled() const
3646 {
3647 return m_enabled;
3648 }
3649
3652 {
3653 return m_enabled;
3654 }
3655
3657 Removal &set(const Enabled &value)
3658 {
3659 m_enabled = value;
3660 return *this;
3661 }
3662
3665 {
3666 return m_maxNeighborDistance;
3667 }
3668
3671 {
3672 return m_maxNeighborDistance;
3673 }
3674
3677 {
3678 m_maxNeighborDistance = value;
3679 return *this;
3680 }
3681
3683 const MinArea &minArea() const
3684 {
3685 return m_minArea;
3686 }
3687
3690 {
3691 return m_minArea;
3692 }
3693
3695 Removal &set(const MinArea &value)
3696 {
3697 m_minArea = value;
3698 return *this;
3699 }
3700
3701 template<
3702 typename T,
3703 typename std::enable_if<
3704 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3705 int>::type = 0>
3707 {
3708 return m_enabled;
3709 }
3710
3711 template<
3712 typename T,
3713 typename std::enable_if<
3714 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3715 value,
3716 int>::type = 0>
3718 {
3719 return m_maxNeighborDistance;
3720 }
3721
3722 template<
3723 typename T,
3724 typename std::enable_if<
3725 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3726 int>::type = 0>
3728 {
3729 return m_minArea;
3730 }
3731
3732 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3734 {
3735 return m_enabled;
3736 }
3737
3738 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3740 {
3741 return m_maxNeighborDistance;
3742 }
3743
3744 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
3746 {
3747 return m_minArea;
3748 }
3749
3751 template<typename F>
3752 void forEach(const F &f) const
3753 {
3754 f(m_enabled);
3755 f(m_maxNeighborDistance);
3756 f(m_minArea);
3757 }
3758
3760 template<typename F>
3761 void forEach(const F &f)
3762 {
3763 f(m_enabled);
3764 f(m_maxNeighborDistance);
3765 f(m_minArea);
3766 }
3767
3769 bool operator==(const Removal &other) const;
3770
3772 bool operator!=(const Removal &other) const;
3773
3775 std::string toString() const;
3776
3778 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3779 {
3780 return stream << value.toString();
3781 }
3782
3783 private:
3784 void setFromString(const std::string &value);
3785
3786 void setFromString(const std::string &fullPath, const std::string &value);
3787
3788 std::string getString(const std::string &fullPath) const;
3789
3790 Enabled m_enabled;
3791 MaxNeighborDistance m_maxNeighborDistance;
3792 MinArea m_minArea;
3793
3794 friend struct DataModel::Detail::Befriend<Removal>;
3795 };
3796
3797 using Descendants = std::tuple<
3802
3805
3820#ifndef NO_DOC
3821 template<
3822 typename... Args,
3823 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3824 typename std::enable_if<
3825 Zivid::Detail::TypeTraits::
3826 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
3827 int>::type = 0>
3828#else
3829 template<typename... Args>
3830#endif
3831 explicit Cluster(Args &&...args)
3832 {
3833 using namespace Zivid::Detail::TypeTraits;
3834
3835 static_assert(
3836 AllArgsDecayedAreUnique<Args...>::value,
3837 "Found duplicate types among the arguments passed to Cluster(...). "
3838 "Types should be listed at most once.");
3839
3840 set(std::forward<Args>(args)...);
3841 }
3842
3856#ifndef NO_DOC
3857 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3858#else
3859 template<typename... Args>
3860#endif
3861 void set(Args &&...args)
3862 {
3863 using namespace Zivid::Detail::TypeTraits;
3864
3865 using AllArgsAreDescendantNodes =
3866 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3867 static_assert(
3868 AllArgsAreDescendantNodes::value,
3869 "All arguments passed to set(...) must be descendant nodes.");
3870
3871 static_assert(
3872 AllArgsDecayedAreUnique<Args...>::value,
3873 "Found duplicate types among the arguments passed to set(...). "
3874 "Types should be listed at most once.");
3875
3876 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3877 }
3878
3893#ifndef NO_DOC
3894 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3895#else
3896 template<typename... Args>
3897#endif
3898 Cluster copyWith(Args &&...args) const
3899 {
3900 using namespace Zivid::Detail::TypeTraits;
3901
3902 using AllArgsAreDescendantNodes =
3903 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3904 static_assert(
3905 AllArgsAreDescendantNodes::value,
3906 "All arguments passed to copyWith(...) must be descendant nodes.");
3907
3908 static_assert(
3909 AllArgsDecayedAreUnique<Args...>::value,
3910 "Found duplicate types among the arguments passed to copyWith(...). "
3911 "Types should be listed at most once.");
3912
3913 auto copy{ *this };
3914 copy.set(std::forward<Args>(args)...);
3915 return copy;
3916 }
3917
3919 const Removal &removal() const
3920 {
3921 return m_removal;
3922 }
3923
3926 {
3927 return m_removal;
3928 }
3929
3931 Cluster &set(const Removal &value)
3932 {
3933 m_removal = value;
3934 return *this;
3935 }
3936
3939 {
3940 m_removal.set(value);
3941 return *this;
3942 }
3943
3946 {
3947 m_removal.set(value);
3948 return *this;
3949 }
3950
3953 {
3954 m_removal.set(value);
3955 return *this;
3956 }
3957
3958 template<
3959 typename T,
3960 typename std::enable_if<
3961 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
3962 int>::type = 0>
3964 {
3965 return m_removal;
3966 }
3967
3968 template<
3969 typename T,
3970 typename std::enable_if<
3971 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
3972 int>::type = 0>
3974 {
3976 }
3977
3978 template<
3979 typename T,
3980 typename std::enable_if<
3981 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::
3982 value,
3983 int>::type = 0>
3985 {
3987 }
3988
3989 template<
3990 typename T,
3991 typename std::enable_if<
3992 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
3993 int>::type = 0>
3995 {
3997 }
3998
3999 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4001 {
4002 return m_removal;
4003 }
4004
4006 template<typename F>
4007 void forEach(const F &f) const
4008 {
4009 f(m_removal);
4010 }
4011
4013 template<typename F>
4014 void forEach(const F &f)
4015 {
4016 f(m_removal);
4017 }
4018
4020 bool operator==(const Cluster &other) const;
4021
4023 bool operator!=(const Cluster &other) const;
4024
4026 std::string toString() const;
4027
4029 friend std::ostream &operator<<(std::ostream &stream, const Cluster &value)
4030 {
4031 return stream << value.toString();
4032 }
4033
4034 private:
4035 void setFromString(const std::string &value);
4036
4037 void setFromString(const std::string &fullPath, const std::string &value);
4038
4039 std::string getString(const std::string &fullPath) const;
4040
4041 Removal m_removal;
4042
4043 friend struct DataModel::Detail::Befriend<Cluster>;
4044 };
4045
4047
4048 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4050 {
4051 public:
4053 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4054
4056 static constexpr const char *path{ "Processing/Filters/Experimental" };
4057
4059 static constexpr const char *name{ "Experimental" };
4060
4062 static constexpr const char *description{
4063 R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
4064 };
4065
4071
4072 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4074 {
4075 public:
4077 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4078
4080 static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
4081
4083 static constexpr const char *name{ "ContrastDistortion" };
4084
4086 static constexpr const char *description{
4087 R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
4088or high contrast. These artifacts are caused by blurring in the lens. The filter
4089works best when aperture values are chosen such that the camera has quite good focus.
4090The filter also supports removing the points that experience a large correction.
4091)description"
4092 };
4093
4095
4096 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4098 {
4099 public:
4101 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4102
4104 static constexpr const char *path{
4105 "Processing/Filters/Experimental/ContrastDistortion/Correction"
4106 };
4107
4109 static constexpr const char *name{ "Correction" };
4110
4112 static constexpr const char *description{
4113 R"description(Contrast distortion correction filter.)description"
4114 };
4115
4117
4118 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4120 {
4121 public:
4123 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4124
4126 static constexpr const char *path{
4127 "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
4128 };
4129
4131 static constexpr const char *name{ "Enabled" };
4132
4134 static constexpr const char *description{
4135 R"description(Enable or disable contrast distortion correction.)description"
4136 };
4137
4139 using ValueType = bool;
4140 static const Enabled yes;
4141 static const Enabled no;
4142
4144 static std::set<bool> validValues()
4145 {
4146 return { false, true };
4147 }
4148
4150 Enabled() = default;
4151
4153 explicit constexpr Enabled(bool value)
4154 : m_opt{ value }
4155 {}
4156
4161 bool value() const;
4162
4164 bool hasValue() const;
4165
4167 void reset();
4168
4170 std::string toString() const;
4171
4173 bool operator==(const Enabled &other) const
4174 {
4175 return m_opt == other.m_opt;
4176 }
4177
4179 bool operator!=(const Enabled &other) const
4180 {
4181 return m_opt != other.m_opt;
4182 }
4183
4185 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4186 {
4187 return stream << value.toString();
4188 }
4189
4190 private:
4191 void setFromString(const std::string &value);
4192
4193 std::optional<bool> m_opt;
4194
4195 friend struct DataModel::Detail::Befriend<Enabled>;
4196 };
4197
4199
4200 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4202 {
4203 public:
4205 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4206
4208 static constexpr const char *path{
4209 "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
4210 };
4211
4213 static constexpr const char *name{ "Strength" };
4214
4216 static constexpr const char *description{
4217 R"description(Strength of correction. Higher values give more correction.)description"
4218 };
4219
4221 using ValueType = double;
4222
4224 static constexpr Range<double> validRange()
4225 {
4226 return { 0.0, 1.0 };
4227 }
4228
4230 Strength() = default;
4231
4233 explicit constexpr Strength(double value)
4234 : m_opt{ verifyValue(value) }
4235 {}
4236
4241 double value() const;
4242
4244 bool hasValue() const;
4245
4247 void reset();
4248
4250 std::string toString() const;
4251
4253 bool operator==(const Strength &other) const
4254 {
4255 return m_opt == other.m_opt;
4256 }
4257
4259 bool operator!=(const Strength &other) const
4260 {
4261 return m_opt != other.m_opt;
4262 }
4263
4265 bool operator<(const Strength &other) const
4266 {
4267 return m_opt < other.m_opt;
4268 }
4269
4271 bool operator>(const Strength &other) const
4272 {
4273 return m_opt > other.m_opt;
4274 }
4275
4277 bool operator<=(const Strength &other) const
4278 {
4279 return m_opt <= other.m_opt;
4280 }
4281
4283 bool operator>=(const Strength &other) const
4284 {
4285 return m_opt >= other.m_opt;
4286 }
4287
4289 friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
4290 {
4291 return stream << value.toString();
4292 }
4293
4294 private:
4295 void setFromString(const std::string &value);
4296
4297 constexpr ValueType static verifyValue(const ValueType &value)
4298 {
4299 return validRange().isInRange(value)
4300 ? value
4301 : throw std::out_of_range{ "Strength{ " + std::to_string(value)
4302 + " } is not in range ["
4303 + std::to_string(validRange().min()) + ", "
4304 + std::to_string(validRange().max()) + "]" };
4305 }
4306
4307 std::optional<double> m_opt;
4308
4309 friend struct DataModel::Detail::Befriend<Strength>;
4310 };
4311
4312 using Descendants = std::tuple<
4315
4318
4331#ifndef NO_DOC
4332 template<
4333 typename... Args,
4334 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4335 typename std::enable_if<
4336 Zivid::Detail::TypeTraits::
4337 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4338 int>::type = 0>
4339#else
4340 template<typename... Args>
4341#endif
4342 explicit Correction(Args &&...args)
4343 {
4344 using namespace Zivid::Detail::TypeTraits;
4345
4346 static_assert(
4347 AllArgsDecayedAreUnique<Args...>::value,
4348 "Found duplicate types among the arguments passed to Correction(...). "
4349 "Types should be listed at most once.");
4350
4351 set(std::forward<Args>(args)...);
4352 }
4353
4365#ifndef NO_DOC
4366 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4367#else
4368 template<typename... Args>
4369#endif
4370 void set(Args &&...args)
4371 {
4372 using namespace Zivid::Detail::TypeTraits;
4373
4374 using AllArgsAreDescendantNodes =
4375 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4376 static_assert(
4377 AllArgsAreDescendantNodes::value,
4378 "All arguments passed to set(...) must be descendant nodes.");
4379
4380 static_assert(
4381 AllArgsDecayedAreUnique<Args...>::value,
4382 "Found duplicate types among the arguments passed to set(...). "
4383 "Types should be listed at most once.");
4384
4385 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4386 }
4387
4400#ifndef NO_DOC
4401 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4402#else
4403 template<typename... Args>
4404#endif
4405 Correction copyWith(Args &&...args) const
4406 {
4407 using namespace Zivid::Detail::TypeTraits;
4408
4409 using AllArgsAreDescendantNodes =
4410 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4411 static_assert(
4412 AllArgsAreDescendantNodes::value,
4413 "All arguments passed to copyWith(...) must be descendant nodes.");
4414
4415 static_assert(
4416 AllArgsDecayedAreUnique<Args...>::value,
4417 "Found duplicate types among the arguments passed to copyWith(...). "
4418 "Types should be listed at most once.");
4419
4420 auto copy{ *this };
4421 copy.set(std::forward<Args>(args)...);
4422 return copy;
4423 }
4424
4426 const Enabled &isEnabled() const
4427 {
4428 return m_enabled;
4429 }
4430
4433 {
4434 return m_enabled;
4435 }
4436
4438 Correction &set(const Enabled &value)
4439 {
4440 m_enabled = value;
4441 return *this;
4442 }
4443
4445 const Strength &strength() const
4446 {
4447 return m_strength;
4448 }
4449
4452 {
4453 return m_strength;
4454 }
4455
4457 Correction &set(const Strength &value)
4458 {
4459 m_strength = value;
4460 return *this;
4461 }
4462
4463 template<
4464 typename T,
4465 typename std::enable_if<
4466 std::is_same<
4467 T,
4468 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4469 Enabled>::value,
4470 int>::type = 0>
4472 get() const
4473 {
4474 return m_enabled;
4475 }
4476
4477 template<
4478 typename T,
4479 typename std::enable_if<
4480 std::is_same<
4481 T,
4482 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4483 Strength>::value,
4484 int>::type = 0>
4485 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4486 Strength &
4487 get() const
4488 {
4489 return m_strength;
4490 }
4491
4492 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4494 get() const
4495 {
4496 return m_enabled;
4497 }
4498
4499 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4500 const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
4501 Strength &
4502 get() const
4503 {
4504 return m_strength;
4505 }
4506
4508 template<typename F>
4509 void forEach(const F &f) const
4510 {
4511 f(m_enabled);
4512 f(m_strength);
4513 }
4514
4516 template<typename F>
4517 void forEach(const F &f)
4518 {
4519 f(m_enabled);
4520 f(m_strength);
4521 }
4522
4524 bool operator==(const Correction &other) const;
4525
4527 bool operator!=(const Correction &other) const;
4528
4530 std::string toString() const;
4531
4533 friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
4534 {
4535 return stream << value.toString();
4536 }
4537
4538 private:
4539 void setFromString(const std::string &value);
4540
4541 void setFromString(const std::string &fullPath, const std::string &value);
4542
4543 std::string getString(const std::string &fullPath) const;
4544
4545 Enabled m_enabled;
4546 Strength m_strength;
4547
4548 friend struct DataModel::Detail::Befriend<Correction>;
4549 };
4550
4552
4553 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4555 {
4556 public:
4558 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
4559
4561 static constexpr const char *path{
4562 "Processing/Filters/Experimental/ContrastDistortion/Removal"
4563 };
4564
4566 static constexpr const char *name{ "Removal" };
4567
4569 static constexpr const char *description{
4570 R"description(Contrast distortion removal filter.)description"
4571 };
4572
4574
4575 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4577 {
4578 public:
4580 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4581
4583 static constexpr const char *path{
4584 "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
4585 };
4586
4588 static constexpr const char *name{ "Enabled" };
4589
4591 static constexpr const char *description{
4592 R"description(Enable or disable contrast distortion removal.)description"
4593 };
4594
4596 using ValueType = bool;
4597 static const Enabled yes;
4598 static const Enabled no;
4599
4601 static std::set<bool> validValues()
4602 {
4603 return { false, true };
4604 }
4605
4607 Enabled() = default;
4608
4610 explicit constexpr Enabled(bool value)
4611 : m_opt{ value }
4612 {}
4613
4618 bool value() const;
4619
4621 bool hasValue() const;
4622
4624 void reset();
4625
4627 std::string toString() const;
4628
4630 bool operator==(const Enabled &other) const
4631 {
4632 return m_opt == other.m_opt;
4633 }
4634
4636 bool operator!=(const Enabled &other) const
4637 {
4638 return m_opt != other.m_opt;
4639 }
4640
4642 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4643 {
4644 return stream << value.toString();
4645 }
4646
4647 private:
4648 void setFromString(const std::string &value);
4649
4650 std::optional<bool> m_opt;
4651
4652 friend struct DataModel::Detail::Befriend<Enabled>;
4653 };
4654
4656
4657 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
4659 {
4660 public:
4662 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
4663
4665 static constexpr const char *path{
4666 "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
4667 };
4668
4670 static constexpr const char *name{ "Threshold" };
4671
4673 static constexpr const char *description{
4674 R"description(Threshold for removal. Higher values remove more points.)description"
4675 };
4676
4678 using ValueType = double;
4679
4681 static constexpr Range<double> validRange()
4682 {
4683 return { 0.0, 1.0 };
4684 }
4685
4687 Threshold() = default;
4688
4690 explicit constexpr Threshold(double value)
4691 : m_opt{ verifyValue(value) }
4692 {}
4693
4698 double value() const;
4699
4701 bool hasValue() const;
4702
4704 void reset();
4705
4707 std::string toString() const;
4708
4710 bool operator==(const Threshold &other) const
4711 {
4712 return m_opt == other.m_opt;
4713 }
4714
4716 bool operator!=(const Threshold &other) const
4717 {
4718 return m_opt != other.m_opt;
4719 }
4720
4722 bool operator<(const Threshold &other) const
4723 {
4724 return m_opt < other.m_opt;
4725 }
4726
4728 bool operator>(const Threshold &other) const
4729 {
4730 return m_opt > other.m_opt;
4731 }
4732
4734 bool operator<=(const Threshold &other) const
4735 {
4736 return m_opt <= other.m_opt;
4737 }
4738
4740 bool operator>=(const Threshold &other) const
4741 {
4742 return m_opt >= other.m_opt;
4743 }
4744
4746 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4747 {
4748 return stream << value.toString();
4749 }
4750
4751 private:
4752 void setFromString(const std::string &value);
4753
4754 constexpr ValueType static verifyValue(const ValueType &value)
4755 {
4756 return validRange().isInRange(value)
4757 ? value
4758 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4759 + " } is not in range ["
4760 + std::to_string(validRange().min()) + ", "
4761 + std::to_string(validRange().max()) + "]" };
4762 }
4763
4764 std::optional<double> m_opt;
4765
4766 friend struct DataModel::Detail::Befriend<Threshold>;
4767 };
4768
4769 using Descendants = std::tuple<
4772
4775
4788#ifndef NO_DOC
4789 template<
4790 typename... Args,
4791 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4792 typename std::enable_if<
4793 Zivid::Detail::TypeTraits::
4794 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
4795 int>::type = 0>
4796#else
4797 template<typename... Args>
4798#endif
4799 explicit Removal(Args &&...args)
4800 {
4801 using namespace Zivid::Detail::TypeTraits;
4802
4803 static_assert(
4804 AllArgsDecayedAreUnique<Args...>::value,
4805 "Found duplicate types among the arguments passed to Removal(...). "
4806 "Types should be listed at most once.");
4807
4808 set(std::forward<Args>(args)...);
4809 }
4810
4822#ifndef NO_DOC
4823 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4824#else
4825 template<typename... Args>
4826#endif
4827 void set(Args &&...args)
4828 {
4829 using namespace Zivid::Detail::TypeTraits;
4830
4831 using AllArgsAreDescendantNodes =
4832 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4833 static_assert(
4834 AllArgsAreDescendantNodes::value,
4835 "All arguments passed to set(...) must be descendant nodes.");
4836
4837 static_assert(
4838 AllArgsDecayedAreUnique<Args...>::value,
4839 "Found duplicate types among the arguments passed to set(...). "
4840 "Types should be listed at most once.");
4841
4842 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4843 }
4844
4857#ifndef NO_DOC
4858 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4859#else
4860 template<typename... Args>
4861#endif
4862 Removal copyWith(Args &&...args) const
4863 {
4864 using namespace Zivid::Detail::TypeTraits;
4865
4866 using AllArgsAreDescendantNodes =
4867 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4868 static_assert(
4869 AllArgsAreDescendantNodes::value,
4870 "All arguments passed to copyWith(...) must be descendant nodes.");
4871
4872 static_assert(
4873 AllArgsDecayedAreUnique<Args...>::value,
4874 "Found duplicate types among the arguments passed to copyWith(...). "
4875 "Types should be listed at most once.");
4876
4877 auto copy{ *this };
4878 copy.set(std::forward<Args>(args)...);
4879 return copy;
4880 }
4881
4883 const Enabled &isEnabled() const
4884 {
4885 return m_enabled;
4886 }
4887
4890 {
4891 return m_enabled;
4892 }
4893
4895 Removal &set(const Enabled &value)
4896 {
4897 m_enabled = value;
4898 return *this;
4899 }
4900
4902 const Threshold &threshold() const
4903 {
4904 return m_threshold;
4905 }
4906
4909 {
4910 return m_threshold;
4911 }
4912
4914 Removal &set(const Threshold &value)
4915 {
4916 m_threshold = value;
4917 return *this;
4918 }
4919
4920 template<
4921 typename T,
4922 typename std::enable_if<
4923 std::is_same<
4924 T,
4925 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4926 Enabled>::value,
4927 int>::type = 0>
4929 get() const
4930 {
4931 return m_enabled;
4932 }
4933
4934 template<
4935 typename T,
4936 typename std::enable_if<
4937 std::is_same<
4938 T,
4939 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
4940 Threshold>::value,
4941 int>::type = 0>
4943 get() const
4944 {
4945 return m_threshold;
4946 }
4947
4948 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4950 get() const
4951 {
4952 return m_enabled;
4953 }
4954
4955 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4957 get() const
4958 {
4959 return m_threshold;
4960 }
4961
4963 template<typename F>
4964 void forEach(const F &f) const
4965 {
4966 f(m_enabled);
4967 f(m_threshold);
4968 }
4969
4971 template<typename F>
4972 void forEach(const F &f)
4973 {
4974 f(m_enabled);
4975 f(m_threshold);
4976 }
4977
4979 bool operator==(const Removal &other) const;
4980
4982 bool operator!=(const Removal &other) const;
4983
4985 std::string toString() const;
4986
4988 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4989 {
4990 return stream << value.toString();
4991 }
4992
4993 private:
4994 void setFromString(const std::string &value);
4995
4996 void setFromString(const std::string &fullPath, const std::string &value);
4997
4998 std::string getString(const std::string &fullPath) const;
4999
5000 Enabled m_enabled;
5001 Threshold m_threshold;
5002
5003 friend struct DataModel::Detail::Befriend<Removal>;
5004 };
5005
5006 using Descendants = std::tuple<
5013
5016
5033#ifndef NO_DOC
5034 template<
5035 typename... Args,
5036 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5037 typename std::enable_if<
5038 Zivid::Detail::TypeTraits::
5039 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5040 int>::type = 0>
5041#else
5042 template<typename... Args>
5043#endif
5044 explicit ContrastDistortion(Args &&...args)
5045 {
5046 using namespace Zivid::Detail::TypeTraits;
5047
5048 static_assert(
5049 AllArgsDecayedAreUnique<Args...>::value,
5050 "Found duplicate types among the arguments passed to ContrastDistortion(...). "
5051 "Types should be listed at most once.");
5052
5053 set(std::forward<Args>(args)...);
5054 }
5055
5071#ifndef NO_DOC
5072 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5073#else
5074 template<typename... Args>
5075#endif
5076 void set(Args &&...args)
5077 {
5078 using namespace Zivid::Detail::TypeTraits;
5079
5080 using AllArgsAreDescendantNodes =
5081 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5082 static_assert(
5083 AllArgsAreDescendantNodes::value,
5084 "All arguments passed to set(...) must be descendant nodes.");
5085
5086 static_assert(
5087 AllArgsDecayedAreUnique<Args...>::value,
5088 "Found duplicate types among the arguments passed to set(...). "
5089 "Types should be listed at most once.");
5090
5091 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5092 }
5093
5110#ifndef NO_DOC
5111 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5112#else
5113 template<typename... Args>
5114#endif
5115 ContrastDistortion copyWith(Args &&...args) const
5116 {
5117 using namespace Zivid::Detail::TypeTraits;
5118
5119 using AllArgsAreDescendantNodes =
5120 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5121 static_assert(
5122 AllArgsAreDescendantNodes::value,
5123 "All arguments passed to copyWith(...) must be descendant nodes.");
5124
5125 static_assert(
5126 AllArgsDecayedAreUnique<Args...>::value,
5127 "Found duplicate types among the arguments passed to copyWith(...). "
5128 "Types should be listed at most once.");
5129
5130 auto copy{ *this };
5131 copy.set(std::forward<Args>(args)...);
5132 return copy;
5133 }
5134
5136 const Correction &correction() const
5137 {
5138 return m_correction;
5139 }
5140
5143 {
5144 return m_correction;
5145 }
5146
5149 {
5150 m_correction = value;
5151 return *this;
5152 }
5153
5156 {
5157 m_correction.set(value);
5158 return *this;
5159 }
5160
5163 {
5164 m_correction.set(value);
5165 return *this;
5166 }
5167
5169 const Removal &removal() const
5170 {
5171 return m_removal;
5172 }
5173
5176 {
5177 return m_removal;
5178 }
5179
5182 {
5183 m_removal = value;
5184 return *this;
5185 }
5186
5189 {
5190 m_removal.set(value);
5191 return *this;
5192 }
5193
5196 {
5197 m_removal.set(value);
5198 return *this;
5199 }
5200
5201 template<
5202 typename T,
5203 typename std::enable_if<
5204 std::is_same<
5205 T,
5207 int>::type = 0>
5209 {
5210 return m_correction;
5211 }
5212
5213 template<
5214 typename T,
5215 typename std::enable_if<
5216 std::is_same<
5217 T,
5218 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5219 Enabled>::value,
5220 int>::type = 0>
5222 get() const
5223 {
5224 return m_correction.get<
5226 }
5227
5228 template<
5229 typename T,
5230 typename std::enable_if<
5231 std::is_same<
5232 T,
5233 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::
5234 Strength>::value,
5235 int>::type = 0>
5237 get() const
5238 {
5239 return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
5240 Correction::Strength>();
5241 }
5242
5243 template<
5244 typename T,
5245 typename std::enable_if<
5246 std::is_same<
5247 T,
5249 int>::type = 0>
5251 {
5252 return m_removal;
5253 }
5254
5255 template<
5256 typename T,
5257 typename std::enable_if<
5258 std::is_same<
5259 T,
5261 value,
5262 int>::type = 0>
5264 const
5265 {
5266 return m_removal.get<
5268 }
5269
5270 template<
5271 typename T,
5272 typename std::enable_if<
5273 std::is_same<
5274 T,
5275 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::
5276 Threshold>::value,
5277 int>::type = 0>
5279 const
5280 {
5281 return m_removal.get<
5283 }
5284
5285 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5287 {
5288 return m_correction;
5289 }
5290
5291 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5293 {
5294 return m_removal;
5295 }
5296
5298 template<typename F>
5299 void forEach(const F &f) const
5300 {
5301 f(m_correction);
5302 f(m_removal);
5303 }
5304
5306 template<typename F>
5307 void forEach(const F &f)
5308 {
5309 f(m_correction);
5310 f(m_removal);
5311 }
5312
5314 bool operator==(const ContrastDistortion &other) const;
5315
5317 bool operator!=(const ContrastDistortion &other) const;
5318
5320 std::string toString() const;
5321
5323 friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
5324 {
5325 return stream << value.toString();
5326 }
5327
5328 private:
5329 void setFromString(const std::string &value);
5330
5331 void setFromString(const std::string &fullPath, const std::string &value);
5332
5333 std::string getString(const std::string &fullPath) const;
5334
5335 Correction m_correction;
5336 Removal m_removal;
5337
5338 friend struct DataModel::Detail::Befriend<ContrastDistortion>;
5339 };
5340
5341 using Descendants = std::tuple<
5349
5352
5370#ifndef NO_DOC
5371 template<
5372 typename... Args,
5373 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5374 typename std::enable_if<
5375 Zivid::Detail::TypeTraits::
5376 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
5377 int>::type = 0>
5378#else
5379 template<typename... Args>
5380#endif
5381 explicit Experimental(Args &&...args)
5382 {
5383 using namespace Zivid::Detail::TypeTraits;
5384
5385 static_assert(
5386 AllArgsDecayedAreUnique<Args...>::value,
5387 "Found duplicate types among the arguments passed to Experimental(...). "
5388 "Types should be listed at most once.");
5389
5390 set(std::forward<Args>(args)...);
5391 }
5392
5409#ifndef NO_DOC
5410 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5411#else
5412 template<typename... Args>
5413#endif
5414 void set(Args &&...args)
5415 {
5416 using namespace Zivid::Detail::TypeTraits;
5417
5418 using AllArgsAreDescendantNodes =
5419 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5420 static_assert(
5421 AllArgsAreDescendantNodes::value,
5422 "All arguments passed to set(...) must be descendant nodes.");
5423
5424 static_assert(
5425 AllArgsDecayedAreUnique<Args...>::value,
5426 "Found duplicate types among the arguments passed to set(...). "
5427 "Types should be listed at most once.");
5428
5429 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5430 }
5431
5449#ifndef NO_DOC
5450 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5451#else
5452 template<typename... Args>
5453#endif
5454 Experimental copyWith(Args &&...args) const
5455 {
5456 using namespace Zivid::Detail::TypeTraits;
5457
5458 using AllArgsAreDescendantNodes =
5459 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5460 static_assert(
5461 AllArgsAreDescendantNodes::value,
5462 "All arguments passed to copyWith(...) must be descendant nodes.");
5463
5464 static_assert(
5465 AllArgsDecayedAreUnique<Args...>::value,
5466 "Found duplicate types among the arguments passed to copyWith(...). "
5467 "Types should be listed at most once.");
5468
5469 auto copy{ *this };
5470 copy.set(std::forward<Args>(args)...);
5471 return copy;
5472 }
5473
5476 {
5477 return m_contrastDistortion;
5478 }
5479
5482 {
5483 return m_contrastDistortion;
5484 }
5485
5488 {
5489 m_contrastDistortion = value;
5490 return *this;
5491 }
5492
5495 {
5496 m_contrastDistortion.set(value);
5497 return *this;
5498 }
5499
5502 {
5503 m_contrastDistortion.set(value);
5504 return *this;
5505 }
5506
5509 {
5510 m_contrastDistortion.set(value);
5511 return *this;
5512 }
5513
5516 {
5517 m_contrastDistortion.set(value);
5518 return *this;
5519 }
5520
5523 {
5524 m_contrastDistortion.set(value);
5525 return *this;
5526 }
5527
5530 {
5531 m_contrastDistortion.set(value);
5532 return *this;
5533 }
5534
5535 template<
5536 typename T,
5537 typename std::enable_if<
5538 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
5539 int>::type = 0>
5541 {
5542 return m_contrastDistortion;
5543 }
5544
5545 template<
5546 typename T,
5547 typename std::enable_if<
5548 std::is_same<
5549 T,
5551 int>::type = 0>
5553 {
5554 return m_contrastDistortion
5556 }
5557
5558 template<
5559 typename T,
5560 typename std::enable_if<
5561 std::is_same<
5562 T,
5564 value,
5565 int>::type = 0>
5567 const
5568 {
5569 return m_contrastDistortion.get<
5571 }
5572
5573 template<
5574 typename T,
5575 typename std::enable_if<
5576 std::is_same<
5577 T,
5579 value,
5580 int>::type = 0>
5582 const
5583 {
5584 return m_contrastDistortion.get<
5586 }
5587
5588 template<
5589 typename T,
5590 typename std::enable_if<
5591 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
5592 value,
5593 int>::type = 0>
5595 {
5596 return m_contrastDistortion
5598 }
5599
5600 template<
5601 typename T,
5602 typename std::enable_if<
5603 std::is_same<
5604 T,
5606 value,
5607 int>::type = 0>
5609 {
5610 return m_contrastDistortion
5612 }
5613
5614 template<
5615 typename T,
5616 typename std::enable_if<
5617 std::is_same<
5618 T,
5620 value,
5621 int>::type = 0>
5623 const
5624 {
5625 return m_contrastDistortion
5627 }
5628
5629 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5631 {
5632 return m_contrastDistortion;
5633 }
5634
5636 template<typename F>
5637 void forEach(const F &f) const
5638 {
5639 f(m_contrastDistortion);
5640 }
5641
5643 template<typename F>
5644 void forEach(const F &f)
5645 {
5646 f(m_contrastDistortion);
5647 }
5648
5650 bool operator==(const Experimental &other) const;
5651
5653 bool operator!=(const Experimental &other) const;
5654
5656 std::string toString() const;
5657
5659 friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
5660 {
5661 return stream << value.toString();
5662 }
5663
5664 private:
5665 void setFromString(const std::string &value);
5666
5667 void setFromString(const std::string &fullPath, const std::string &value);
5668
5669 std::string getString(const std::string &fullPath) const;
5670
5671 ContrastDistortion m_contrastDistortion;
5672
5673 friend struct DataModel::Detail::Befriend<Experimental>;
5674 };
5675
5677
5678 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5680 {
5681 public:
5683 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5684
5686 static constexpr const char *path{ "Processing/Filters/Hole" };
5687
5689 static constexpr const char *name{ "Hole" };
5690
5692 static constexpr const char *description{
5693 R"description(Contains filters that can be used to deal with holes in the point cloud.)description"
5694 };
5695
5698
5699 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5701 {
5702 public:
5704 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
5705
5707 static constexpr const char *path{ "Processing/Filters/Hole/Repair" };
5708
5710 static constexpr const char *name{ "Repair" };
5711
5713 static constexpr const char *description{
5714 R"description(Fills in point cloud holes by interpolating remaining surrounding points.
5715)description"
5716 };
5717
5719
5720 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5722 {
5723 public:
5725 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5726
5728 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Enabled" };
5729
5731 static constexpr const char *name{ "Enabled" };
5732
5734 static constexpr const char *description{
5735 R"description(Enable or disable hole repair.)description"
5736 };
5737
5739 using ValueType = bool;
5740 static const Enabled yes;
5741 static const Enabled no;
5742
5744 static std::set<bool> validValues()
5745 {
5746 return { false, true };
5747 }
5748
5750 Enabled() = default;
5751
5753 explicit constexpr Enabled(bool value)
5754 : m_opt{ value }
5755 {}
5756
5761 bool value() const;
5762
5764 bool hasValue() const;
5765
5767 void reset();
5768
5770 std::string toString() const;
5771
5773 bool operator==(const Enabled &other) const
5774 {
5775 return m_opt == other.m_opt;
5776 }
5777
5779 bool operator!=(const Enabled &other) const
5780 {
5781 return m_opt != other.m_opt;
5782 }
5783
5785 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5786 {
5787 return stream << value.toString();
5788 }
5789
5790 private:
5791 void setFromString(const std::string &value);
5792
5793 std::optional<bool> m_opt;
5794
5795 friend struct DataModel::Detail::Befriend<Enabled>;
5796 };
5797
5802
5803 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5805 {
5806 public:
5808 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5809
5811 static constexpr const char *path{ "Processing/Filters/Hole/Repair/HoleSize" };
5812
5814 static constexpr const char *name{ "HoleSize" };
5815
5817 static constexpr const char *description{
5818 R"description(Relative diameter of holes to fill. Increasing this will fill more points, but require more
5819computation time. The maximum allowed hole size scales with distance, so that we allow
5820filling larger holes at greater distances, measured in mm.
5821)description"
5822 };
5823
5825 using ValueType = double;
5826
5828 static constexpr Range<double> validRange()
5829 {
5830 return { 0.0, 1.0 };
5831 }
5832
5834 HoleSize() = default;
5835
5837 explicit constexpr HoleSize(double value)
5838 : m_opt{ verifyValue(value) }
5839 {}
5840
5845 double value() const;
5846
5848 bool hasValue() const;
5849
5851 void reset();
5852
5854 std::string toString() const;
5855
5857 bool operator==(const HoleSize &other) const
5858 {
5859 return m_opt == other.m_opt;
5860 }
5861
5863 bool operator!=(const HoleSize &other) const
5864 {
5865 return m_opt != other.m_opt;
5866 }
5867
5869 bool operator<(const HoleSize &other) const
5870 {
5871 return m_opt < other.m_opt;
5872 }
5873
5875 bool operator>(const HoleSize &other) const
5876 {
5877 return m_opt > other.m_opt;
5878 }
5879
5881 bool operator<=(const HoleSize &other) const
5882 {
5883 return m_opt <= other.m_opt;
5884 }
5885
5887 bool operator>=(const HoleSize &other) const
5888 {
5889 return m_opt >= other.m_opt;
5890 }
5891
5893 friend std::ostream &operator<<(std::ostream &stream, const HoleSize &value)
5894 {
5895 return stream << value.toString();
5896 }
5897
5898 private:
5899 void setFromString(const std::string &value);
5900
5901 constexpr ValueType static verifyValue(const ValueType &value)
5902 {
5903 return validRange().isInRange(value)
5904 ? value
5905 : throw std::out_of_range{ "HoleSize{ " + std::to_string(value)
5906 + " } is not in range ["
5907 + std::to_string(validRange().min()) + ", "
5908 + std::to_string(validRange().max()) + "]" };
5909 }
5910
5911 std::optional<double> m_opt;
5912
5913 friend struct DataModel::Detail::Befriend<HoleSize>;
5914 };
5915
5921
5922 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
5924 {
5925 public:
5927 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
5928
5930 static constexpr const char *path{ "Processing/Filters/Hole/Repair/Strictness" };
5931
5933 static constexpr const char *name{ "Strictness" };
5934
5936 static constexpr const char *description{
5937 R"description(Level of strictness when considering if a point should be filled. A higher level of
5938strictness requires a missing point to be surrounded by valid points on more sides in
5939order to be filled. Increasing this will fill fewer points, but it will be less likely to
5940fill gaps that are not circular, for example between two edges.
5941)description"
5942 };
5943
5945 using ValueType = int32_t;
5946
5948 static constexpr Range<int32_t> validRange()
5949 {
5950 return { 1, 4 };
5951 }
5952
5954 Strictness() = default;
5955
5957 explicit constexpr Strictness(int32_t value)
5958 : m_opt{ verifyValue(value) }
5959 {}
5960
5965 int32_t value() const;
5966
5968 bool hasValue() const;
5969
5971 void reset();
5972
5974 std::string toString() const;
5975
5977 bool operator==(const Strictness &other) const
5978 {
5979 return m_opt == other.m_opt;
5980 }
5981
5983 bool operator!=(const Strictness &other) const
5984 {
5985 return m_opt != other.m_opt;
5986 }
5987
5989 bool operator<(const Strictness &other) const
5990 {
5991 return m_opt < other.m_opt;
5992 }
5993
5995 bool operator>(const Strictness &other) const
5996 {
5997 return m_opt > other.m_opt;
5998 }
5999
6001 bool operator<=(const Strictness &other) const
6002 {
6003 return m_opt <= other.m_opt;
6004 }
6005
6007 bool operator>=(const Strictness &other) const
6008 {
6009 return m_opt >= other.m_opt;
6010 }
6011
6013 friend std::ostream &operator<<(std::ostream &stream, const Strictness &value)
6014 {
6015 return stream << value.toString();
6016 }
6017
6018 private:
6019 void setFromString(const std::string &value);
6020
6021 constexpr ValueType static verifyValue(const ValueType &value)
6022 {
6023 return validRange().isInRange(value)
6024 ? value
6025 : throw std::out_of_range{ "Strictness{ " + std::to_string(value)
6026 + " } is not in range ["
6027 + std::to_string(validRange().min()) + ", "
6028 + std::to_string(validRange().max()) + "]" };
6029 }
6030
6031 std::optional<int32_t> m_opt;
6032
6033 friend struct DataModel::Detail::Befriend<Strictness>;
6034 };
6035
6036 using Descendants = std::tuple<
6040
6043
6057#ifndef NO_DOC
6058 template<
6059 typename... Args,
6060 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6061 typename std::enable_if<
6062 Zivid::Detail::TypeTraits::
6063 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6064 int>::type = 0>
6065#else
6066 template<typename... Args>
6067#endif
6068 explicit Repair(Args &&...args)
6069 {
6070 using namespace Zivid::Detail::TypeTraits;
6071
6072 static_assert(
6073 AllArgsDecayedAreUnique<Args...>::value,
6074 "Found duplicate types among the arguments passed to Repair(...). "
6075 "Types should be listed at most once.");
6076
6077 set(std::forward<Args>(args)...);
6078 }
6079
6092#ifndef NO_DOC
6093 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6094#else
6095 template<typename... Args>
6096#endif
6097 void set(Args &&...args)
6098 {
6099 using namespace Zivid::Detail::TypeTraits;
6100
6101 using AllArgsAreDescendantNodes =
6102 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6103 static_assert(
6104 AllArgsAreDescendantNodes::value,
6105 "All arguments passed to set(...) must be descendant nodes.");
6106
6107 static_assert(
6108 AllArgsDecayedAreUnique<Args...>::value,
6109 "Found duplicate types among the arguments passed to set(...). "
6110 "Types should be listed at most once.");
6111
6112 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6113 }
6114
6128#ifndef NO_DOC
6129 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6130#else
6131 template<typename... Args>
6132#endif
6133 Repair copyWith(Args &&...args) const
6134 {
6135 using namespace Zivid::Detail::TypeTraits;
6136
6137 using AllArgsAreDescendantNodes =
6138 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6139 static_assert(
6140 AllArgsAreDescendantNodes::value,
6141 "All arguments passed to copyWith(...) must be descendant nodes.");
6142
6143 static_assert(
6144 AllArgsDecayedAreUnique<Args...>::value,
6145 "Found duplicate types among the arguments passed to copyWith(...). "
6146 "Types should be listed at most once.");
6147
6148 auto copy{ *this };
6149 copy.set(std::forward<Args>(args)...);
6150 return copy;
6151 }
6152
6154 const Enabled &isEnabled() const
6155 {
6156 return m_enabled;
6157 }
6158
6161 {
6162 return m_enabled;
6163 }
6164
6166 Repair &set(const Enabled &value)
6167 {
6168 m_enabled = value;
6169 return *this;
6170 }
6171
6173 const HoleSize &holeSize() const
6174 {
6175 return m_holeSize;
6176 }
6177
6180 {
6181 return m_holeSize;
6182 }
6183
6185 Repair &set(const HoleSize &value)
6186 {
6187 m_holeSize = value;
6188 return *this;
6189 }
6190
6192 const Strictness &strictness() const
6193 {
6194 return m_strictness;
6195 }
6196
6199 {
6200 return m_strictness;
6201 }
6202
6204 Repair &set(const Strictness &value)
6205 {
6206 m_strictness = value;
6207 return *this;
6208 }
6209
6210 template<
6211 typename T,
6212 typename std::enable_if<
6213 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6214 int>::type = 0>
6216 {
6217 return m_enabled;
6218 }
6219
6220 template<
6221 typename T,
6222 typename std::enable_if<
6223 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6224 int>::type = 0>
6226 {
6227 return m_holeSize;
6228 }
6229
6230 template<
6231 typename T,
6232 typename std::enable_if<
6233 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6234 int>::type = 0>
6236 {
6237 return m_strictness;
6238 }
6239
6240 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6242 {
6243 return m_enabled;
6244 }
6245
6246 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6248 {
6249 return m_holeSize;
6250 }
6251
6252 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
6254 {
6255 return m_strictness;
6256 }
6257
6259 template<typename F>
6260 void forEach(const F &f) const
6261 {
6262 f(m_enabled);
6263 f(m_holeSize);
6264 f(m_strictness);
6265 }
6266
6268 template<typename F>
6269 void forEach(const F &f)
6270 {
6271 f(m_enabled);
6272 f(m_holeSize);
6273 f(m_strictness);
6274 }
6275
6277 bool operator==(const Repair &other) const;
6278
6280 bool operator!=(const Repair &other) const;
6281
6283 std::string toString() const;
6284
6286 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
6287 {
6288 return stream << value.toString();
6289 }
6290
6291 private:
6292 void setFromString(const std::string &value);
6293
6294 void setFromString(const std::string &fullPath, const std::string &value);
6295
6296 std::string getString(const std::string &fullPath) const;
6297
6298 Enabled m_enabled;
6299 HoleSize m_holeSize;
6300 Strictness m_strictness;
6301
6302 friend struct DataModel::Detail::Befriend<Repair>;
6303 };
6304
6305 using Descendants = std::tuple<
6310
6313
6328#ifndef NO_DOC
6329 template<
6330 typename... Args,
6331 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6332 typename std::enable_if<
6333 Zivid::Detail::TypeTraits::
6334 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6335 int>::type = 0>
6336#else
6337 template<typename... Args>
6338#endif
6339 explicit Hole(Args &&...args)
6340 {
6341 using namespace Zivid::Detail::TypeTraits;
6342
6343 static_assert(
6344 AllArgsDecayedAreUnique<Args...>::value,
6345 "Found duplicate types among the arguments passed to Hole(...). "
6346 "Types should be listed at most once.");
6347
6348 set(std::forward<Args>(args)...);
6349 }
6350
6364#ifndef NO_DOC
6365 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6366#else
6367 template<typename... Args>
6368#endif
6369 void set(Args &&...args)
6370 {
6371 using namespace Zivid::Detail::TypeTraits;
6372
6373 using AllArgsAreDescendantNodes =
6374 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6375 static_assert(
6376 AllArgsAreDescendantNodes::value,
6377 "All arguments passed to set(...) must be descendant nodes.");
6378
6379 static_assert(
6380 AllArgsDecayedAreUnique<Args...>::value,
6381 "Found duplicate types among the arguments passed to set(...). "
6382 "Types should be listed at most once.");
6383
6384 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6385 }
6386
6401#ifndef NO_DOC
6402 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6403#else
6404 template<typename... Args>
6405#endif
6406 Hole copyWith(Args &&...args) const
6407 {
6408 using namespace Zivid::Detail::TypeTraits;
6409
6410 using AllArgsAreDescendantNodes =
6411 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6412 static_assert(
6413 AllArgsAreDescendantNodes::value,
6414 "All arguments passed to copyWith(...) must be descendant nodes.");
6415
6416 static_assert(
6417 AllArgsDecayedAreUnique<Args...>::value,
6418 "Found duplicate types among the arguments passed to copyWith(...). "
6419 "Types should be listed at most once.");
6420
6421 auto copy{ *this };
6422 copy.set(std::forward<Args>(args)...);
6423 return copy;
6424 }
6425
6427 const Repair &repair() const
6428 {
6429 return m_repair;
6430 }
6431
6434 {
6435 return m_repair;
6436 }
6437
6439 Hole &set(const Repair &value)
6440 {
6441 m_repair = value;
6442 return *this;
6443 }
6444
6446 Hole &set(const Repair::Enabled &value)
6447 {
6448 m_repair.set(value);
6449 return *this;
6450 }
6451
6454 {
6455 m_repair.set(value);
6456 return *this;
6457 }
6458
6461 {
6462 m_repair.set(value);
6463 return *this;
6464 }
6465
6466 template<
6467 typename T,
6468 typename std::enable_if<
6469 std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value,
6470 int>::type = 0>
6472 {
6473 return m_repair;
6474 }
6475
6476 template<
6477 typename T,
6478 typename std::enable_if<
6479 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
6480 int>::type = 0>
6482 {
6484 }
6485
6486 template<
6487 typename T,
6488 typename std::enable_if<
6489 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
6490 int>::type = 0>
6492 {
6494 }
6495
6496 template<
6497 typename T,
6498 typename std::enable_if<
6499 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
6500 int>::type = 0>
6502 {
6504 }
6505
6506 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6508 {
6509 return m_repair;
6510 }
6511
6513 template<typename F>
6514 void forEach(const F &f) const
6515 {
6516 f(m_repair);
6517 }
6518
6520 template<typename F>
6521 void forEach(const F &f)
6522 {
6523 f(m_repair);
6524 }
6525
6527 bool operator==(const Hole &other) const;
6528
6530 bool operator!=(const Hole &other) const;
6531
6533 std::string toString() const;
6534
6536 friend std::ostream &operator<<(std::ostream &stream, const Hole &value)
6537 {
6538 return stream << value.toString();
6539 }
6540
6541 private:
6542 void setFromString(const std::string &value);
6543
6544 void setFromString(const std::string &fullPath, const std::string &value);
6545
6546 std::string getString(const std::string &fullPath) const;
6547
6548 Repair m_repair;
6549
6550 friend struct DataModel::Detail::Befriend<Hole>;
6551 };
6552
6554
6555 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6557 {
6558 public:
6560 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6561
6563 static constexpr const char *path{ "Processing/Filters/Noise" };
6564
6566 static constexpr const char *name{ "Noise" };
6567
6569 static constexpr const char *description{
6570 R"description(Contains filters that can be used to clean up a noisy point cloud.)description"
6571 };
6572
6574
6575 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6577 {
6578 public:
6580 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
6581
6583 static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
6584
6586 static constexpr const char *name{ "Removal" };
6587
6589 static constexpr const char *description{
6590 R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold.)description"
6591 };
6592
6594
6595 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6597 {
6598 public:
6600 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6601
6603 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
6604
6606 static constexpr const char *name{ "Enabled" };
6607
6609 static constexpr const char *description{
6610 R"description(Enable or disable the SNR filter.)description"
6611 };
6612
6614 using ValueType = bool;
6615 static const Enabled yes;
6616 static const Enabled no;
6617
6619 static std::set<bool> validValues()
6620 {
6621 return { false, true };
6622 }
6623
6625 Enabled() = default;
6626
6628 explicit constexpr Enabled(bool value)
6629 : m_opt{ value }
6630 {}
6631
6636 bool value() const;
6637
6639 bool hasValue() const;
6640
6642 void reset();
6643
6645 std::string toString() const;
6646
6648 bool operator==(const Enabled &other) const
6649 {
6650 return m_opt == other.m_opt;
6651 }
6652
6654 bool operator!=(const Enabled &other) const
6655 {
6656 return m_opt != other.m_opt;
6657 }
6658
6660 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6661 {
6662 return stream << value.toString();
6663 }
6664
6665 private:
6666 void setFromString(const std::string &value);
6667
6668 std::optional<bool> m_opt;
6669
6670 friend struct DataModel::Detail::Befriend<Enabled>;
6671 };
6672
6674
6675 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
6677 {
6678 public:
6680 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
6681
6683 static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
6684
6686 static constexpr const char *name{ "Threshold" };
6687
6689 static constexpr const char *description{
6690 R"description(Discard points with signal-to-noise ratio (SNR) below the given value.)description"
6691 };
6692
6694 using ValueType = double;
6695
6697 static constexpr Range<double> validRange()
6698 {
6699 return { 0.0, 100.0 };
6700 }
6701
6703 Threshold() = default;
6704
6706 explicit constexpr Threshold(double value)
6707 : m_opt{ verifyValue(value) }
6708 {}
6709
6714 double value() const;
6715
6717 bool hasValue() const;
6718
6720 void reset();
6721
6723 std::string toString() const;
6724
6726 bool operator==(const Threshold &other) const
6727 {
6728 return m_opt == other.m_opt;
6729 }
6730
6732 bool operator!=(const Threshold &other) const
6733 {
6734 return m_opt != other.m_opt;
6735 }
6736
6738 bool operator<(const Threshold &other) const
6739 {
6740 return m_opt < other.m_opt;
6741 }
6742
6744 bool operator>(const Threshold &other) const
6745 {
6746 return m_opt > other.m_opt;
6747 }
6748
6750 bool operator<=(const Threshold &other) const
6751 {
6752 return m_opt <= other.m_opt;
6753 }
6754
6756 bool operator>=(const Threshold &other) const
6757 {
6758 return m_opt >= other.m_opt;
6759 }
6760
6762 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
6763 {
6764 return stream << value.toString();
6765 }
6766
6767 private:
6768 void setFromString(const std::string &value);
6769
6770 constexpr ValueType static verifyValue(const ValueType &value)
6771 {
6772 return validRange().isInRange(value)
6773 ? value
6774 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
6775 + " } is not in range ["
6776 + std::to_string(validRange().min()) + ", "
6777 + std::to_string(validRange().max()) + "]" };
6778 }
6779
6780 std::optional<double> m_opt;
6781
6782 friend struct DataModel::Detail::Befriend<Threshold>;
6783 };
6784
6785 using Descendants = std::tuple<
6788
6791
6804#ifndef NO_DOC
6805 template<
6806 typename... Args,
6807 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6808 typename std::enable_if<
6809 Zivid::Detail::TypeTraits::
6810 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
6811 int>::type = 0>
6812#else
6813 template<typename... Args>
6814#endif
6815 explicit Removal(Args &&...args)
6816 {
6817 using namespace Zivid::Detail::TypeTraits;
6818
6819 static_assert(
6820 AllArgsDecayedAreUnique<Args...>::value,
6821 "Found duplicate types among the arguments passed to Removal(...). "
6822 "Types should be listed at most once.");
6823
6824 set(std::forward<Args>(args)...);
6825 }
6826
6838#ifndef NO_DOC
6839 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6840#else
6841 template<typename... Args>
6842#endif
6843 void set(Args &&...args)
6844 {
6845 using namespace Zivid::Detail::TypeTraits;
6846
6847 using AllArgsAreDescendantNodes =
6848 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6849 static_assert(
6850 AllArgsAreDescendantNodes::value,
6851 "All arguments passed to set(...) must be descendant nodes.");
6852
6853 static_assert(
6854 AllArgsDecayedAreUnique<Args...>::value,
6855 "Found duplicate types among the arguments passed to set(...). "
6856 "Types should be listed at most once.");
6857
6858 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6859 }
6860
6873#ifndef NO_DOC
6874 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6875#else
6876 template<typename... Args>
6877#endif
6878 Removal copyWith(Args &&...args) const
6879 {
6880 using namespace Zivid::Detail::TypeTraits;
6881
6882 using AllArgsAreDescendantNodes =
6883 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6884 static_assert(
6885 AllArgsAreDescendantNodes::value,
6886 "All arguments passed to copyWith(...) must be descendant nodes.");
6887
6888 static_assert(
6889 AllArgsDecayedAreUnique<Args...>::value,
6890 "Found duplicate types among the arguments passed to copyWith(...). "
6891 "Types should be listed at most once.");
6892
6893 auto copy{ *this };
6894 copy.set(std::forward<Args>(args)...);
6895 return copy;
6896 }
6897
6899 const Enabled &isEnabled() const
6900 {
6901 return m_enabled;
6902 }
6903
6906 {
6907 return m_enabled;
6908 }
6909
6911 Removal &set(const Enabled &value)
6912 {
6913 m_enabled = value;
6914 return *this;
6915 }
6916
6918 const Threshold &threshold() const
6919 {
6920 return m_threshold;
6921 }
6922
6925 {
6926 return m_threshold;
6927 }
6928
6930 Removal &set(const Threshold &value)
6931 {
6932 m_threshold = value;
6933 return *this;
6934 }
6935
6936 template<
6937 typename T,
6938 typename std::enable_if<
6939 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
6940 int>::type = 0>
6942 {
6943 return m_enabled;
6944 }
6945
6946 template<
6947 typename T,
6948 typename std::enable_if<
6949 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
6950 int>::type = 0>
6952 {
6953 return m_threshold;
6954 }
6955
6956 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6958 {
6959 return m_enabled;
6960 }
6961
6962 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6964 {
6965 return m_threshold;
6966 }
6967
6969 template<typename F>
6970 void forEach(const F &f) const
6971 {
6972 f(m_enabled);
6973 f(m_threshold);
6974 }
6975
6977 template<typename F>
6978 void forEach(const F &f)
6979 {
6980 f(m_enabled);
6981 f(m_threshold);
6982 }
6983
6985 bool operator==(const Removal &other) const;
6986
6988 bool operator!=(const Removal &other) const;
6989
6991 std::string toString() const;
6992
6994 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6995 {
6996 return stream << value.toString();
6997 }
6998
6999 private:
7000 void setFromString(const std::string &value);
7001
7002 void setFromString(const std::string &fullPath, const std::string &value);
7003
7004 std::string getString(const std::string &fullPath) const;
7005
7006 Enabled m_enabled;
7007 Threshold m_threshold;
7008
7009 friend struct DataModel::Detail::Befriend<Removal>;
7010 };
7011
7016
7017 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7019 {
7020 public:
7022 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7023
7025 static constexpr const char *path{ "Processing/Filters/Noise/Repair" };
7026
7028 static constexpr const char *name{ "Repair" };
7029
7031 static constexpr const char *description{
7032 R"description(Get better surface coverage by repairing regions of missing data due to noisy points.
7033Consider disabling this filter if you require all points in your point cloud to be of
7034high confidence.
7035)description"
7036 };
7037
7039
7040 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7042 {
7043 public:
7045 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7046
7048 static constexpr const char *path{ "Processing/Filters/Noise/Repair/Enabled" };
7049
7051 static constexpr const char *name{ "Enabled" };
7052
7054 static constexpr const char *description{
7055 R"description(Enable or disable noise repair.)description"
7056 };
7057
7059 using ValueType = bool;
7060 static const Enabled yes;
7061 static const Enabled no;
7062
7064 static std::set<bool> validValues()
7065 {
7066 return { false, true };
7067 }
7068
7070 Enabled() = default;
7071
7073 explicit constexpr Enabled(bool value)
7074 : m_opt{ value }
7075 {}
7076
7081 bool value() const;
7082
7084 bool hasValue() const;
7085
7087 void reset();
7088
7090 std::string toString() const;
7091
7093 bool operator==(const Enabled &other) const
7094 {
7095 return m_opt == other.m_opt;
7096 }
7097
7099 bool operator!=(const Enabled &other) const
7100 {
7101 return m_opt != other.m_opt;
7102 }
7103
7105 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7106 {
7107 return stream << value.toString();
7108 }
7109
7110 private:
7111 void setFromString(const std::string &value);
7112
7113 std::optional<bool> m_opt;
7114
7115 friend struct DataModel::Detail::Befriend<Enabled>;
7116 };
7117
7118 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Repair::Enabled>;
7119
7122
7134#ifndef NO_DOC
7135 template<
7136 typename... Args,
7137 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7138 typename std::enable_if<
7139 Zivid::Detail::TypeTraits::
7140 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7141 int>::type = 0>
7142#else
7143 template<typename... Args>
7144#endif
7145 explicit Repair(Args &&...args)
7146 {
7147 using namespace Zivid::Detail::TypeTraits;
7148
7149 static_assert(
7150 AllArgsDecayedAreUnique<Args...>::value,
7151 "Found duplicate types among the arguments passed to Repair(...). "
7152 "Types should be listed at most once.");
7153
7154 set(std::forward<Args>(args)...);
7155 }
7156
7167#ifndef NO_DOC
7168 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7169#else
7170 template<typename... Args>
7171#endif
7172 void set(Args &&...args)
7173 {
7174 using namespace Zivid::Detail::TypeTraits;
7175
7176 using AllArgsAreDescendantNodes =
7177 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7178 static_assert(
7179 AllArgsAreDescendantNodes::value,
7180 "All arguments passed to set(...) must be descendant nodes.");
7181
7182 static_assert(
7183 AllArgsDecayedAreUnique<Args...>::value,
7184 "Found duplicate types among the arguments passed to set(...). "
7185 "Types should be listed at most once.");
7186
7187 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7188 }
7189
7201#ifndef NO_DOC
7202 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7203#else
7204 template<typename... Args>
7205#endif
7206 Repair copyWith(Args &&...args) const
7207 {
7208 using namespace Zivid::Detail::TypeTraits;
7209
7210 using AllArgsAreDescendantNodes =
7211 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7212 static_assert(
7213 AllArgsAreDescendantNodes::value,
7214 "All arguments passed to copyWith(...) must be descendant nodes.");
7215
7216 static_assert(
7217 AllArgsDecayedAreUnique<Args...>::value,
7218 "Found duplicate types among the arguments passed to copyWith(...). "
7219 "Types should be listed at most once.");
7220
7221 auto copy{ *this };
7222 copy.set(std::forward<Args>(args)...);
7223 return copy;
7224 }
7225
7227 const Enabled &isEnabled() const
7228 {
7229 return m_enabled;
7230 }
7231
7234 {
7235 return m_enabled;
7236 }
7237
7239 Repair &set(const Enabled &value)
7240 {
7241 m_enabled = value;
7242 return *this;
7243 }
7244
7245 template<
7246 typename T,
7247 typename std::enable_if<
7248 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7249 int>::type = 0>
7251 {
7252 return m_enabled;
7253 }
7254
7255 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7257 {
7258 return m_enabled;
7259 }
7260
7262 template<typename F>
7263 void forEach(const F &f) const
7264 {
7265 f(m_enabled);
7266 }
7267
7269 template<typename F>
7270 void forEach(const F &f)
7271 {
7272 f(m_enabled);
7273 }
7274
7276 bool operator==(const Repair &other) const;
7277
7279 bool operator!=(const Repair &other) const;
7280
7282 std::string toString() const;
7283
7285 friend std::ostream &operator<<(std::ostream &stream, const Repair &value)
7286 {
7287 return stream << value.toString();
7288 }
7289
7290 private:
7291 void setFromString(const std::string &value);
7292
7293 void setFromString(const std::string &fullPath, const std::string &value);
7294
7295 std::string getString(const std::string &fullPath) const;
7296
7297 Enabled m_enabled;
7298
7299 friend struct DataModel::Detail::Befriend<Repair>;
7300 };
7301
7306
7307 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7309 {
7310 public:
7312 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7313
7315 static constexpr const char *path{ "Processing/Filters/Noise/Suppression" };
7316
7318 static constexpr const char *name{ "Suppression" };
7319
7321 static constexpr const char *description{
7322 R"description(Reduce noise and outliers in the point cloud. This filter can also be used to reduce
7323ripple effects caused by interreflections. Consider disabling this filter if you need to
7324distinguish very fine details and thus need to avoid any smoothing effects.
7325)description"
7326 };
7327
7329
7330 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7332 {
7333 public:
7335 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7336
7338 static constexpr const char *path{ "Processing/Filters/Noise/Suppression/Enabled" };
7339
7341 static constexpr const char *name{ "Enabled" };
7342
7344 static constexpr const char *description{
7345 R"description(Enable or disable noise suppression.)description"
7346 };
7347
7349 using ValueType = bool;
7350 static const Enabled yes;
7351 static const Enabled no;
7352
7354 static std::set<bool> validValues()
7355 {
7356 return { false, true };
7357 }
7358
7360 Enabled() = default;
7361
7363 explicit constexpr Enabled(bool value)
7364 : m_opt{ value }
7365 {}
7366
7371 bool value() const;
7372
7374 bool hasValue() const;
7375
7377 void reset();
7378
7380 std::string toString() const;
7381
7383 bool operator==(const Enabled &other) const
7384 {
7385 return m_opt == other.m_opt;
7386 }
7387
7389 bool operator!=(const Enabled &other) const
7390 {
7391 return m_opt != other.m_opt;
7392 }
7393
7395 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
7396 {
7397 return stream << value.toString();
7398 }
7399
7400 private:
7401 void setFromString(const std::string &value);
7402
7403 std::optional<bool> m_opt;
7404
7405 friend struct DataModel::Detail::Befriend<Enabled>;
7406 };
7407
7408 using Descendants = std::tuple<Settings::Processing::Filters::Noise::Suppression::Enabled>;
7409
7412
7424#ifndef NO_DOC
7425 template<
7426 typename... Args,
7427 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7428 typename std::enable_if<
7429 Zivid::Detail::TypeTraits::
7430 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7431 int>::type = 0>
7432#else
7433 template<typename... Args>
7434#endif
7435 explicit Suppression(Args &&...args)
7436 {
7437 using namespace Zivid::Detail::TypeTraits;
7438
7439 static_assert(
7440 AllArgsDecayedAreUnique<Args...>::value,
7441 "Found duplicate types among the arguments passed to Suppression(...). "
7442 "Types should be listed at most once.");
7443
7444 set(std::forward<Args>(args)...);
7445 }
7446
7457#ifndef NO_DOC
7458 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7459#else
7460 template<typename... Args>
7461#endif
7462 void set(Args &&...args)
7463 {
7464 using namespace Zivid::Detail::TypeTraits;
7465
7466 using AllArgsAreDescendantNodes =
7467 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7468 static_assert(
7469 AllArgsAreDescendantNodes::value,
7470 "All arguments passed to set(...) must be descendant nodes.");
7471
7472 static_assert(
7473 AllArgsDecayedAreUnique<Args...>::value,
7474 "Found duplicate types among the arguments passed to set(...). "
7475 "Types should be listed at most once.");
7476
7477 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7478 }
7479
7491#ifndef NO_DOC
7492 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7493#else
7494 template<typename... Args>
7495#endif
7496 Suppression copyWith(Args &&...args) const
7497 {
7498 using namespace Zivid::Detail::TypeTraits;
7499
7500 using AllArgsAreDescendantNodes =
7501 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7502 static_assert(
7503 AllArgsAreDescendantNodes::value,
7504 "All arguments passed to copyWith(...) must be descendant nodes.");
7505
7506 static_assert(
7507 AllArgsDecayedAreUnique<Args...>::value,
7508 "Found duplicate types among the arguments passed to copyWith(...). "
7509 "Types should be listed at most once.");
7510
7511 auto copy{ *this };
7512 copy.set(std::forward<Args>(args)...);
7513 return copy;
7514 }
7515
7517 const Enabled &isEnabled() const
7518 {
7519 return m_enabled;
7520 }
7521
7524 {
7525 return m_enabled;
7526 }
7527
7529 Suppression &set(const Enabled &value)
7530 {
7531 m_enabled = value;
7532 return *this;
7533 }
7534
7535 template<
7536 typename T,
7537 typename std::enable_if<
7538 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7539 int>::type = 0>
7541 {
7542 return m_enabled;
7543 }
7544
7545 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7547 {
7548 return m_enabled;
7549 }
7550
7552 template<typename F>
7553 void forEach(const F &f) const
7554 {
7555 f(m_enabled);
7556 }
7557
7559 template<typename F>
7560 void forEach(const F &f)
7561 {
7562 f(m_enabled);
7563 }
7564
7566 bool operator==(const Suppression &other) const;
7567
7569 bool operator!=(const Suppression &other) const;
7570
7572 std::string toString() const;
7573
7575 friend std::ostream &operator<<(std::ostream &stream, const Suppression &value)
7576 {
7577 return stream << value.toString();
7578 }
7579
7580 private:
7581 void setFromString(const std::string &value);
7582
7583 void setFromString(const std::string &fullPath, const std::string &value);
7584
7585 std::string getString(const std::string &fullPath) const;
7586
7587 Enabled m_enabled;
7588
7589 friend struct DataModel::Detail::Befriend<Suppression>;
7590 };
7591
7592 using Descendants = std::tuple<
7600
7603
7621#ifndef NO_DOC
7622 template<
7623 typename... Args,
7624 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7625 typename std::enable_if<
7626 Zivid::Detail::TypeTraits::
7627 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
7628 int>::type = 0>
7629#else
7630 template<typename... Args>
7631#endif
7632 explicit Noise(Args &&...args)
7633 {
7634 using namespace Zivid::Detail::TypeTraits;
7635
7636 static_assert(
7637 AllArgsDecayedAreUnique<Args...>::value,
7638 "Found duplicate types among the arguments passed to Noise(...). "
7639 "Types should be listed at most once.");
7640
7641 set(std::forward<Args>(args)...);
7642 }
7643
7660#ifndef NO_DOC
7661 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7662#else
7663 template<typename... Args>
7664#endif
7665 void set(Args &&...args)
7666 {
7667 using namespace Zivid::Detail::TypeTraits;
7668
7669 using AllArgsAreDescendantNodes =
7670 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7671 static_assert(
7672 AllArgsAreDescendantNodes::value,
7673 "All arguments passed to set(...) must be descendant nodes.");
7674
7675 static_assert(
7676 AllArgsDecayedAreUnique<Args...>::value,
7677 "Found duplicate types among the arguments passed to set(...). "
7678 "Types should be listed at most once.");
7679
7680 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7681 }
7682
7700#ifndef NO_DOC
7701 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7702#else
7703 template<typename... Args>
7704#endif
7705 Noise copyWith(Args &&...args) const
7706 {
7707 using namespace Zivid::Detail::TypeTraits;
7708
7709 using AllArgsAreDescendantNodes =
7710 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7711 static_assert(
7712 AllArgsAreDescendantNodes::value,
7713 "All arguments passed to copyWith(...) must be descendant nodes.");
7714
7715 static_assert(
7716 AllArgsDecayedAreUnique<Args...>::value,
7717 "Found duplicate types among the arguments passed to copyWith(...). "
7718 "Types should be listed at most once.");
7719
7720 auto copy{ *this };
7721 copy.set(std::forward<Args>(args)...);
7722 return copy;
7723 }
7724
7726 const Removal &removal() const
7727 {
7728 return m_removal;
7729 }
7730
7733 {
7734 return m_removal;
7735 }
7736
7738 Noise &set(const Removal &value)
7739 {
7740 m_removal = value;
7741 return *this;
7742 }
7743
7746 {
7747 m_removal.set(value);
7748 return *this;
7749 }
7750
7753 {
7754 m_removal.set(value);
7755 return *this;
7756 }
7757
7759 const Repair &repair() const
7760 {
7761 return m_repair;
7762 }
7763
7766 {
7767 return m_repair;
7768 }
7769
7771 Noise &set(const Repair &value)
7772 {
7773 m_repair = value;
7774 return *this;
7775 }
7776
7779 {
7780 m_repair.set(value);
7781 return *this;
7782 }
7783
7786 {
7787 return m_suppression;
7788 }
7789
7792 {
7793 return m_suppression;
7794 }
7795
7797 Noise &set(const Suppression &value)
7798 {
7799 m_suppression = value;
7800 return *this;
7801 }
7802
7805 {
7806 m_suppression.set(value);
7807 return *this;
7808 }
7809
7810 template<
7811 typename T,
7812 typename std::enable_if<
7813 std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7814 int>::type = 0>
7816 {
7817 return m_removal;
7818 }
7819
7820 template<
7821 typename T,
7822 typename std::enable_if<
7823 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7824 int>::type = 0>
7826 {
7828 }
7829
7830 template<
7831 typename T,
7832 typename std::enable_if<
7833 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7834 int>::type = 0>
7836 {
7838 }
7839
7840 template<
7841 typename T,
7842 typename std::enable_if<
7843 std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value,
7844 int>::type = 0>
7846 {
7847 return m_repair;
7848 }
7849
7850 template<
7851 typename T,
7852 typename std::enable_if<
7853 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
7854 int>::type = 0>
7856 {
7858 }
7859
7860 template<
7861 typename T,
7862 typename std::enable_if<
7863 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
7864 int>::type = 0>
7866 {
7867 return m_suppression;
7868 }
7869
7870 template<
7871 typename T,
7872 typename std::enable_if<
7873 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
7874 int>::type = 0>
7876 {
7878 }
7879
7880 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7882 {
7883 return m_removal;
7884 }
7885
7886 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7888 {
7889 return m_repair;
7890 }
7891
7892 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7894 {
7895 return m_suppression;
7896 }
7897
7899 template<typename F>
7900 void forEach(const F &f) const
7901 {
7902 f(m_removal);
7903 f(m_repair);
7904 f(m_suppression);
7905 }
7906
7908 template<typename F>
7909 void forEach(const F &f)
7910 {
7911 f(m_removal);
7912 f(m_repair);
7913 f(m_suppression);
7914 }
7915
7917 bool operator==(const Noise &other) const;
7918
7920 bool operator!=(const Noise &other) const;
7921
7923 std::string toString() const;
7924
7926 friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
7927 {
7928 return stream << value.toString();
7929 }
7930
7931 private:
7932 void setFromString(const std::string &value);
7933
7934 void setFromString(const std::string &fullPath, const std::string &value);
7935
7936 std::string getString(const std::string &fullPath) const;
7937
7938 Removal m_removal;
7939 Repair m_repair;
7940 Suppression m_suppression;
7941
7942 friend struct DataModel::Detail::Befriend<Noise>;
7943 };
7944
7946
7947 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7949 {
7950 public:
7952 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7953
7955 static constexpr const char *path{ "Processing/Filters/Outlier" };
7956
7958 static constexpr const char *name{ "Outlier" };
7959
7961 static constexpr const char *description{
7962 R"description(Contains a filter that removes points with large Euclidean distance to neighboring points.)description"
7963 };
7964
7966
7967 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7969 {
7970 public:
7972 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
7973
7975 static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
7976
7978 static constexpr const char *name{ "Removal" };
7979
7981 static constexpr const char *description{
7982 R"description(Discard point if Euclidean distance to neighboring points is above a threshold.)description"
7983 };
7984
7986
7987 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
7989 {
7990 public:
7992 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
7993
7995 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
7996
7998 static constexpr const char *name{ "Enabled" };
7999
8001 static constexpr const char *description{
8002 R"description(Enable or disable the outlier filter.)description"
8003 };
8004
8006 using ValueType = bool;
8007 static const Enabled yes;
8008 static const Enabled no;
8009
8011 static std::set<bool> validValues()
8012 {
8013 return { false, true };
8014 }
8015
8017 Enabled() = default;
8018
8020 explicit constexpr Enabled(bool value)
8021 : m_opt{ value }
8022 {}
8023
8028 bool value() const;
8029
8031 bool hasValue() const;
8032
8034 void reset();
8035
8037 std::string toString() const;
8038
8040 bool operator==(const Enabled &other) const
8041 {
8042 return m_opt == other.m_opt;
8043 }
8044
8046 bool operator!=(const Enabled &other) const
8047 {
8048 return m_opt != other.m_opt;
8049 }
8050
8052 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8053 {
8054 return stream << value.toString();
8055 }
8056
8057 private:
8058 void setFromString(const std::string &value);
8059
8060 std::optional<bool> m_opt;
8061
8062 friend struct DataModel::Detail::Befriend<Enabled>;
8063 };
8064
8066
8067 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8069 {
8070 public:
8072 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8073
8075 static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
8076
8078 static constexpr const char *name{ "Threshold" };
8079
8081 static constexpr const char *description{
8082 R"description(Discard point if Euclidean distance to neighboring points is above the given value.)description"
8083 };
8084
8086 using ValueType = double;
8087
8089 static constexpr Range<double> validRange()
8090 {
8091 return { 0.0, 100.0 };
8092 }
8093
8095 Threshold() = default;
8096
8098 explicit constexpr Threshold(double value)
8099 : m_opt{ verifyValue(value) }
8100 {}
8101
8106 double value() const;
8107
8109 bool hasValue() const;
8110
8112 void reset();
8113
8115 std::string toString() const;
8116
8118 bool operator==(const Threshold &other) const
8119 {
8120 return m_opt == other.m_opt;
8121 }
8122
8124 bool operator!=(const Threshold &other) const
8125 {
8126 return m_opt != other.m_opt;
8127 }
8128
8130 bool operator<(const Threshold &other) const
8131 {
8132 return m_opt < other.m_opt;
8133 }
8134
8136 bool operator>(const Threshold &other) const
8137 {
8138 return m_opt > other.m_opt;
8139 }
8140
8142 bool operator<=(const Threshold &other) const
8143 {
8144 return m_opt <= other.m_opt;
8145 }
8146
8148 bool operator>=(const Threshold &other) const
8149 {
8150 return m_opt >= other.m_opt;
8151 }
8152
8154 friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
8155 {
8156 return stream << value.toString();
8157 }
8158
8159 private:
8160 void setFromString(const std::string &value);
8161
8162 constexpr ValueType static verifyValue(const ValueType &value)
8163 {
8164 return validRange().isInRange(value)
8165 ? value
8166 : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
8167 + " } is not in range ["
8168 + std::to_string(validRange().min()) + ", "
8169 + std::to_string(validRange().max()) + "]" };
8170 }
8171
8172 std::optional<double> m_opt;
8173
8174 friend struct DataModel::Detail::Befriend<Threshold>;
8175 };
8176
8177 using Descendants = std::tuple<
8180
8183
8196#ifndef NO_DOC
8197 template<
8198 typename... Args,
8199 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8200 typename std::enable_if<
8201 Zivid::Detail::TypeTraits::
8202 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8203 int>::type = 0>
8204#else
8205 template<typename... Args>
8206#endif
8207 explicit Removal(Args &&...args)
8208 {
8209 using namespace Zivid::Detail::TypeTraits;
8210
8211 static_assert(
8212 AllArgsDecayedAreUnique<Args...>::value,
8213 "Found duplicate types among the arguments passed to Removal(...). "
8214 "Types should be listed at most once.");
8215
8216 set(std::forward<Args>(args)...);
8217 }
8218
8230#ifndef NO_DOC
8231 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8232#else
8233 template<typename... Args>
8234#endif
8235 void set(Args &&...args)
8236 {
8237 using namespace Zivid::Detail::TypeTraits;
8238
8239 using AllArgsAreDescendantNodes =
8240 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8241 static_assert(
8242 AllArgsAreDescendantNodes::value,
8243 "All arguments passed to set(...) must be descendant nodes.");
8244
8245 static_assert(
8246 AllArgsDecayedAreUnique<Args...>::value,
8247 "Found duplicate types among the arguments passed to set(...). "
8248 "Types should be listed at most once.");
8249
8250 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8251 }
8252
8265#ifndef NO_DOC
8266 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8267#else
8268 template<typename... Args>
8269#endif
8270 Removal copyWith(Args &&...args) const
8271 {
8272 using namespace Zivid::Detail::TypeTraits;
8273
8274 using AllArgsAreDescendantNodes =
8275 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8276 static_assert(
8277 AllArgsAreDescendantNodes::value,
8278 "All arguments passed to copyWith(...) must be descendant nodes.");
8279
8280 static_assert(
8281 AllArgsDecayedAreUnique<Args...>::value,
8282 "Found duplicate types among the arguments passed to copyWith(...). "
8283 "Types should be listed at most once.");
8284
8285 auto copy{ *this };
8286 copy.set(std::forward<Args>(args)...);
8287 return copy;
8288 }
8289
8291 const Enabled &isEnabled() const
8292 {
8293 return m_enabled;
8294 }
8295
8298 {
8299 return m_enabled;
8300 }
8301
8303 Removal &set(const Enabled &value)
8304 {
8305 m_enabled = value;
8306 return *this;
8307 }
8308
8310 const Threshold &threshold() const
8311 {
8312 return m_threshold;
8313 }
8314
8317 {
8318 return m_threshold;
8319 }
8320
8322 Removal &set(const Threshold &value)
8323 {
8324 m_threshold = value;
8325 return *this;
8326 }
8327
8328 template<
8329 typename T,
8330 typename std::enable_if<
8331 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8332 int>::type = 0>
8334 {
8335 return m_enabled;
8336 }
8337
8338 template<
8339 typename T,
8340 typename std::enable_if<
8341 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8342 int>::type = 0>
8344 {
8345 return m_threshold;
8346 }
8347
8348 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8350 {
8351 return m_enabled;
8352 }
8353
8354 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8356 {
8357 return m_threshold;
8358 }
8359
8361 template<typename F>
8362 void forEach(const F &f) const
8363 {
8364 f(m_enabled);
8365 f(m_threshold);
8366 }
8367
8369 template<typename F>
8370 void forEach(const F &f)
8371 {
8372 f(m_enabled);
8373 f(m_threshold);
8374 }
8375
8377 bool operator==(const Removal &other) const;
8378
8380 bool operator!=(const Removal &other) const;
8381
8383 std::string toString() const;
8384
8386 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
8387 {
8388 return stream << value.toString();
8389 }
8390
8391 private:
8392 void setFromString(const std::string &value);
8393
8394 void setFromString(const std::string &fullPath, const std::string &value);
8395
8396 std::string getString(const std::string &fullPath) const;
8397
8398 Enabled m_enabled;
8399 Threshold m_threshold;
8400
8401 friend struct DataModel::Detail::Befriend<Removal>;
8402 };
8403
8404 using Descendants = std::tuple<
8408
8411
8425#ifndef NO_DOC
8426 template<
8427 typename... Args,
8428 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8429 typename std::enable_if<
8430 Zivid::Detail::TypeTraits::
8431 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8432 int>::type = 0>
8433#else
8434 template<typename... Args>
8435#endif
8436 explicit Outlier(Args &&...args)
8437 {
8438 using namespace Zivid::Detail::TypeTraits;
8439
8440 static_assert(
8441 AllArgsDecayedAreUnique<Args...>::value,
8442 "Found duplicate types among the arguments passed to Outlier(...). "
8443 "Types should be listed at most once.");
8444
8445 set(std::forward<Args>(args)...);
8446 }
8447
8460#ifndef NO_DOC
8461 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8462#else
8463 template<typename... Args>
8464#endif
8465 void set(Args &&...args)
8466 {
8467 using namespace Zivid::Detail::TypeTraits;
8468
8469 using AllArgsAreDescendantNodes =
8470 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8471 static_assert(
8472 AllArgsAreDescendantNodes::value,
8473 "All arguments passed to set(...) must be descendant nodes.");
8474
8475 static_assert(
8476 AllArgsDecayedAreUnique<Args...>::value,
8477 "Found duplicate types among the arguments passed to set(...). "
8478 "Types should be listed at most once.");
8479
8480 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8481 }
8482
8496#ifndef NO_DOC
8497 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8498#else
8499 template<typename... Args>
8500#endif
8501 Outlier copyWith(Args &&...args) const
8502 {
8503 using namespace Zivid::Detail::TypeTraits;
8504
8505 using AllArgsAreDescendantNodes =
8506 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8507 static_assert(
8508 AllArgsAreDescendantNodes::value,
8509 "All arguments passed to copyWith(...) must be descendant nodes.");
8510
8511 static_assert(
8512 AllArgsDecayedAreUnique<Args...>::value,
8513 "Found duplicate types among the arguments passed to copyWith(...). "
8514 "Types should be listed at most once.");
8515
8516 auto copy{ *this };
8517 copy.set(std::forward<Args>(args)...);
8518 return copy;
8519 }
8520
8522 const Removal &removal() const
8523 {
8524 return m_removal;
8525 }
8526
8529 {
8530 return m_removal;
8531 }
8532
8534 Outlier &set(const Removal &value)
8535 {
8536 m_removal = value;
8537 return *this;
8538 }
8539
8542 {
8543 m_removal.set(value);
8544 return *this;
8545 }
8546
8549 {
8550 m_removal.set(value);
8551 return *this;
8552 }
8553
8554 template<
8555 typename T,
8556 typename std::enable_if<
8557 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8558 int>::type = 0>
8560 {
8561 return m_removal;
8562 }
8563
8564 template<
8565 typename T,
8566 typename std::enable_if<
8567 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8568 int>::type = 0>
8570 {
8572 }
8573
8574 template<
8575 typename T,
8576 typename std::enable_if<
8577 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8578 int>::type = 0>
8580 {
8582 }
8583
8584 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8586 {
8587 return m_removal;
8588 }
8589
8591 template<typename F>
8592 void forEach(const F &f) const
8593 {
8594 f(m_removal);
8595 }
8596
8598 template<typename F>
8599 void forEach(const F &f)
8600 {
8601 f(m_removal);
8602 }
8603
8605 bool operator==(const Outlier &other) const;
8606
8608 bool operator!=(const Outlier &other) const;
8609
8611 std::string toString() const;
8612
8614 friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
8615 {
8616 return stream << value.toString();
8617 }
8618
8619 private:
8620 void setFromString(const std::string &value);
8621
8622 void setFromString(const std::string &fullPath, const std::string &value);
8623
8624 std::string getString(const std::string &fullPath) const;
8625
8626 Removal m_removal;
8627
8628 friend struct DataModel::Detail::Befriend<Outlier>;
8629 };
8630
8632
8633 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8635 {
8636 public:
8638 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8639
8641 static constexpr const char *path{ "Processing/Filters/Reflection" };
8642
8644 static constexpr const char *name{ "Reflection" };
8645
8647 static constexpr const char *description{
8648 R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials).)description"
8649 };
8650
8652
8653 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8655 {
8656 public:
8658 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
8659
8661 static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
8662
8664 static constexpr const char *name{ "Removal" };
8665
8667 static constexpr const char *description{
8668 R"description(Discard points likely introduced by reflections (useful for shiny materials).)description"
8669 };
8670
8672
8673 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8675 {
8676 public:
8678 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8679
8681 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
8682
8684 static constexpr const char *name{ "Enabled" };
8685
8687 static constexpr const char *description{
8688 R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate.)description"
8689 };
8690
8692 using ValueType = bool;
8693 static const Enabled yes;
8694 static const Enabled no;
8695
8697 static std::set<bool> validValues()
8698 {
8699 return { false, true };
8700 }
8701
8703 Enabled() = default;
8704
8706 explicit constexpr Enabled(bool value)
8707 : m_opt{ value }
8708 {}
8709
8714 bool value() const;
8715
8717 bool hasValue() const;
8718
8720 void reset();
8721
8723 std::string toString() const;
8724
8726 bool operator==(const Enabled &other) const
8727 {
8728 return m_opt == other.m_opt;
8729 }
8730
8732 bool operator!=(const Enabled &other) const
8733 {
8734 return m_opt != other.m_opt;
8735 }
8736
8738 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
8739 {
8740 return stream << value.toString();
8741 }
8742
8743 private:
8744 void setFromString(const std::string &value);
8745
8746 std::optional<bool> m_opt;
8747
8748 friend struct DataModel::Detail::Befriend<Enabled>;
8749 };
8750
8759
8760 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8762 {
8763 public:
8765 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8766
8768 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Mode" };
8769
8771 static constexpr const char *name{ "Mode" };
8772
8774 static constexpr const char *description{
8775 R"description(The reflection filter has two modes: Local and Global. Local mode preserves more 3D data
8776on thinner objects, generally removes more reflection artifacts and processes faster than
8777the Global filter. The Global filter is generally better at removing outlier points in
8778the point cloud. It is advised to use the Outlier filter and Cluster filter together with the
8779Local Reflection filter.
8780
8781Global mode was introduced in SDK 1.0 and Local mode was introduced in SDK 2.7.
8782)description"
8783 };
8784
8786 enum class ValueType
8787 {
8788 global,
8789 local
8790 };
8791 static const Mode global;
8792 static const Mode local;
8793
8795 static std::set<ValueType> validValues()
8796 {
8797 return { ValueType::global, ValueType::local };
8798 }
8799
8801 Mode() = default;
8802
8804 explicit constexpr Mode(ValueType value)
8805 : m_opt{ verifyValue(value) }
8806 {}
8807
8813
8815 bool hasValue() const;
8816
8818 void reset();
8819
8821 std::string toString() const;
8822
8824 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8825 {
8826 return stream << Mode{ value }.toString();
8827 }
8828
8830 bool operator==(const Mode &other) const
8831 {
8832 return m_opt == other.m_opt;
8833 }
8834
8836 bool operator!=(const Mode &other) const
8837 {
8838 return m_opt != other.m_opt;
8839 }
8840
8842 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8843 {
8844 return stream << value.toString();
8845 }
8846
8847 private:
8848 void setFromString(const std::string &value);
8849
8850 constexpr ValueType static verifyValue(const ValueType &value)
8851 {
8852 return value == ValueType::global || value == ValueType::local
8853 ? value
8854 : throw std::invalid_argument{
8855 "Invalid value: Mode{ "
8856 + std::to_string(
8857 static_cast<std::underlying_type<ValueType>::type>(value))
8858 + " }"
8859 };
8860 }
8861
8862 std::optional<ValueType> m_opt;
8863
8864 friend struct DataModel::Detail::Befriend<Mode>;
8865 };
8866
8867 using Descendants = std::tuple<
8870
8873
8886#ifndef NO_DOC
8887 template<
8888 typename... Args,
8889 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8890 typename std::enable_if<
8891 Zivid::Detail::TypeTraits::
8892 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8893 int>::type = 0>
8894#else
8895 template<typename... Args>
8896#endif
8897 explicit Removal(Args &&...args)
8898 {
8899 using namespace Zivid::Detail::TypeTraits;
8900
8901 static_assert(
8902 AllArgsDecayedAreUnique<Args...>::value,
8903 "Found duplicate types among the arguments passed to Removal(...). "
8904 "Types should be listed at most once.");
8905
8906 set(std::forward<Args>(args)...);
8907 }
8908
8920#ifndef NO_DOC
8921 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8922#else
8923 template<typename... Args>
8924#endif
8925 void set(Args &&...args)
8926 {
8927 using namespace Zivid::Detail::TypeTraits;
8928
8929 using AllArgsAreDescendantNodes =
8930 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8931 static_assert(
8932 AllArgsAreDescendantNodes::value,
8933 "All arguments passed to set(...) must be descendant nodes.");
8934
8935 static_assert(
8936 AllArgsDecayedAreUnique<Args...>::value,
8937 "Found duplicate types among the arguments passed to set(...). "
8938 "Types should be listed at most once.");
8939
8940 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8941 }
8942
8955#ifndef NO_DOC
8956 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8957#else
8958 template<typename... Args>
8959#endif
8960 Removal copyWith(Args &&...args) const
8961 {
8962 using namespace Zivid::Detail::TypeTraits;
8963
8964 using AllArgsAreDescendantNodes =
8965 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8966 static_assert(
8967 AllArgsAreDescendantNodes::value,
8968 "All arguments passed to copyWith(...) must be descendant nodes.");
8969
8970 static_assert(
8971 AllArgsDecayedAreUnique<Args...>::value,
8972 "Found duplicate types among the arguments passed to copyWith(...). "
8973 "Types should be listed at most once.");
8974
8975 auto copy{ *this };
8976 copy.set(std::forward<Args>(args)...);
8977 return copy;
8978 }
8979
8981 const Enabled &isEnabled() const
8982 {
8983 return m_enabled;
8984 }
8985
8988 {
8989 return m_enabled;
8990 }
8991
8993 Removal &set(const Enabled &value)
8994 {
8995 m_enabled = value;
8996 return *this;
8997 }
8998
9000 const Mode &mode() const
9001 {
9002 return m_mode;
9003 }
9004
9007 {
9008 return m_mode;
9009 }
9010
9012 Removal &set(const Mode &value)
9013 {
9014 m_mode = value;
9015 return *this;
9016 }
9017
9018 template<
9019 typename T,
9020 typename std::enable_if<
9021 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9022 int>::type = 0>
9024 {
9025 return m_enabled;
9026 }
9027
9028 template<
9029 typename T,
9030 typename std::enable_if<
9031 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9032 int>::type = 0>
9034 {
9035 return m_mode;
9036 }
9037
9038 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9040 {
9041 return m_enabled;
9042 }
9043
9044 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9046 {
9047 return m_mode;
9048 }
9049
9051 template<typename F>
9052 void forEach(const F &f) const
9053 {
9054 f(m_enabled);
9055 f(m_mode);
9056 }
9057
9059 template<typename F>
9060 void forEach(const F &f)
9061 {
9062 f(m_enabled);
9063 f(m_mode);
9064 }
9065
9067 bool operator==(const Removal &other) const;
9068
9070 bool operator!=(const Removal &other) const;
9071
9073 std::string toString() const;
9074
9076 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
9077 {
9078 return stream << value.toString();
9079 }
9080
9081 private:
9082 void setFromString(const std::string &value);
9083
9084 void setFromString(const std::string &fullPath, const std::string &value);
9085
9086 std::string getString(const std::string &fullPath) const;
9087
9088 Enabled m_enabled;
9089 Mode m_mode;
9090
9091 friend struct DataModel::Detail::Befriend<Removal>;
9092 };
9093
9094 using Descendants = std::tuple<
9098
9101
9115#ifndef NO_DOC
9116 template<
9117 typename... Args,
9118 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9119 typename std::enable_if<
9120 Zivid::Detail::TypeTraits::
9121 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9122 int>::type = 0>
9123#else
9124 template<typename... Args>
9125#endif
9126 explicit Reflection(Args &&...args)
9127 {
9128 using namespace Zivid::Detail::TypeTraits;
9129
9130 static_assert(
9131 AllArgsDecayedAreUnique<Args...>::value,
9132 "Found duplicate types among the arguments passed to Reflection(...). "
9133 "Types should be listed at most once.");
9134
9135 set(std::forward<Args>(args)...);
9136 }
9137
9150#ifndef NO_DOC
9151 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9152#else
9153 template<typename... Args>
9154#endif
9155 void set(Args &&...args)
9156 {
9157 using namespace Zivid::Detail::TypeTraits;
9158
9159 using AllArgsAreDescendantNodes =
9160 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9161 static_assert(
9162 AllArgsAreDescendantNodes::value,
9163 "All arguments passed to set(...) must be descendant nodes.");
9164
9165 static_assert(
9166 AllArgsDecayedAreUnique<Args...>::value,
9167 "Found duplicate types among the arguments passed to set(...). "
9168 "Types should be listed at most once.");
9169
9170 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9171 }
9172
9186#ifndef NO_DOC
9187 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9188#else
9189 template<typename... Args>
9190#endif
9191 Reflection copyWith(Args &&...args) const
9192 {
9193 using namespace Zivid::Detail::TypeTraits;
9194
9195 using AllArgsAreDescendantNodes =
9196 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9197 static_assert(
9198 AllArgsAreDescendantNodes::value,
9199 "All arguments passed to copyWith(...) must be descendant nodes.");
9200
9201 static_assert(
9202 AllArgsDecayedAreUnique<Args...>::value,
9203 "Found duplicate types among the arguments passed to copyWith(...). "
9204 "Types should be listed at most once.");
9205
9206 auto copy{ *this };
9207 copy.set(std::forward<Args>(args)...);
9208 return copy;
9209 }
9210
9212 const Removal &removal() const
9213 {
9214 return m_removal;
9215 }
9216
9219 {
9220 return m_removal;
9221 }
9222
9224 Reflection &set(const Removal &value)
9225 {
9226 m_removal = value;
9227 return *this;
9228 }
9229
9232 {
9233 m_removal.set(value);
9234 return *this;
9235 }
9236
9239 {
9240 m_removal.set(value);
9241 return *this;
9242 }
9243
9244 template<
9245 typename T,
9246 typename std::enable_if<
9247 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9248 int>::type = 0>
9250 {
9251 return m_removal;
9252 }
9253
9254 template<
9255 typename T,
9256 typename std::enable_if<
9257 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9258 int>::type = 0>
9260 {
9262 }
9263
9264 template<
9265 typename T,
9266 typename std::enable_if<
9267 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9268 int>::type = 0>
9270 {
9272 }
9273
9274 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9276 {
9277 return m_removal;
9278 }
9279
9281 template<typename F>
9282 void forEach(const F &f) const
9283 {
9284 f(m_removal);
9285 }
9286
9288 template<typename F>
9289 void forEach(const F &f)
9290 {
9291 f(m_removal);
9292 }
9293
9295 bool operator==(const Reflection &other) const;
9296
9298 bool operator!=(const Reflection &other) const;
9299
9301 std::string toString() const;
9302
9304 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9305 {
9306 return stream << value.toString();
9307 }
9308
9309 private:
9310 void setFromString(const std::string &value);
9311
9312 void setFromString(const std::string &fullPath, const std::string &value);
9313
9314 std::string getString(const std::string &fullPath) const;
9315
9316 Removal m_removal;
9317
9318 friend struct DataModel::Detail::Befriend<Reflection>;
9319 };
9320
9322
9323 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9325 {
9326 public:
9328 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9329
9331 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9332
9334 static constexpr const char *name{ "Smoothing" };
9335
9337 static constexpr const char *description{ R"description(Smoothing filters.)description" };
9338
9340
9341 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9343 {
9344 public:
9346 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9347
9349 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9350
9352 static constexpr const char *name{ "Gaussian" };
9353
9355 static constexpr const char *description{
9356 R"description(Gaussian smoothing of the point cloud.)description"
9357 };
9358
9360
9361 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9363 {
9364 public:
9366 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9367
9369 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9370
9372 static constexpr const char *name{ "Enabled" };
9373
9375 static constexpr const char *description{
9376 R"description(Enable or disable the smoothing filter.)description"
9377 };
9378
9380 using ValueType = bool;
9381 static const Enabled yes;
9382 static const Enabled no;
9383
9385 static std::set<bool> validValues()
9386 {
9387 return { false, true };
9388 }
9389
9391 Enabled() = default;
9392
9394 explicit constexpr Enabled(bool value)
9395 : m_opt{ value }
9396 {}
9397
9402 bool value() const;
9403
9405 bool hasValue() const;
9406
9408 void reset();
9409
9411 std::string toString() const;
9412
9414 bool operator==(const Enabled &other) const
9415 {
9416 return m_opt == other.m_opt;
9417 }
9418
9420 bool operator!=(const Enabled &other) const
9421 {
9422 return m_opt != other.m_opt;
9423 }
9424
9426 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9427 {
9428 return stream << value.toString();
9429 }
9430
9431 private:
9432 void setFromString(const std::string &value);
9433
9434 std::optional<bool> m_opt;
9435
9436 friend struct DataModel::Detail::Befriend<Enabled>;
9437 };
9438
9440
9441 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9443 {
9444 public:
9446 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9447
9449 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9450
9452 static constexpr const char *name{ "Sigma" };
9453
9455 static constexpr const char *description{
9456 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients).)description"
9457 };
9458
9460 using ValueType = double;
9461
9463 static constexpr Range<double> validRange()
9464 {
9465 return { 0.5, 5 };
9466 }
9467
9469 Sigma() = default;
9470
9472 explicit constexpr Sigma(double value)
9473 : m_opt{ verifyValue(value) }
9474 {}
9475
9480 double value() const;
9481
9483 bool hasValue() const;
9484
9486 void reset();
9487
9489 std::string toString() const;
9490
9492 bool operator==(const Sigma &other) const
9493 {
9494 return m_opt == other.m_opt;
9495 }
9496
9498 bool operator!=(const Sigma &other) const
9499 {
9500 return m_opt != other.m_opt;
9501 }
9502
9504 bool operator<(const Sigma &other) const
9505 {
9506 return m_opt < other.m_opt;
9507 }
9508
9510 bool operator>(const Sigma &other) const
9511 {
9512 return m_opt > other.m_opt;
9513 }
9514
9516 bool operator<=(const Sigma &other) const
9517 {
9518 return m_opt <= other.m_opt;
9519 }
9520
9522 bool operator>=(const Sigma &other) const
9523 {
9524 return m_opt >= other.m_opt;
9525 }
9526
9528 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9529 {
9530 return stream << value.toString();
9531 }
9532
9533 private:
9534 void setFromString(const std::string &value);
9535
9536 constexpr ValueType static verifyValue(const ValueType &value)
9537 {
9538 return validRange().isInRange(value)
9539 ? value
9540 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9541 + " } is not in range ["
9542 + std::to_string(validRange().min()) + ", "
9543 + std::to_string(validRange().max()) + "]" };
9544 }
9545
9546 std::optional<double> m_opt;
9547
9548 friend struct DataModel::Detail::Befriend<Sigma>;
9549 };
9550
9551 using Descendants = std::tuple<
9554
9557
9570#ifndef NO_DOC
9571 template<
9572 typename... Args,
9573 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9574 typename std::enable_if<
9575 Zivid::Detail::TypeTraits::
9576 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9577 int>::type = 0>
9578#else
9579 template<typename... Args>
9580#endif
9581 explicit Gaussian(Args &&...args)
9582 {
9583 using namespace Zivid::Detail::TypeTraits;
9584
9585 static_assert(
9586 AllArgsDecayedAreUnique<Args...>::value,
9587 "Found duplicate types among the arguments passed to Gaussian(...). "
9588 "Types should be listed at most once.");
9589
9590 set(std::forward<Args>(args)...);
9591 }
9592
9604#ifndef NO_DOC
9605 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9606#else
9607 template<typename... Args>
9608#endif
9609 void set(Args &&...args)
9610 {
9611 using namespace Zivid::Detail::TypeTraits;
9612
9613 using AllArgsAreDescendantNodes =
9614 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9615 static_assert(
9616 AllArgsAreDescendantNodes::value,
9617 "All arguments passed to set(...) must be descendant nodes.");
9618
9619 static_assert(
9620 AllArgsDecayedAreUnique<Args...>::value,
9621 "Found duplicate types among the arguments passed to set(...). "
9622 "Types should be listed at most once.");
9623
9624 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9625 }
9626
9639#ifndef NO_DOC
9640 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9641#else
9642 template<typename... Args>
9643#endif
9644 Gaussian copyWith(Args &&...args) const
9645 {
9646 using namespace Zivid::Detail::TypeTraits;
9647
9648 using AllArgsAreDescendantNodes =
9649 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9650 static_assert(
9651 AllArgsAreDescendantNodes::value,
9652 "All arguments passed to copyWith(...) must be descendant nodes.");
9653
9654 static_assert(
9655 AllArgsDecayedAreUnique<Args...>::value,
9656 "Found duplicate types among the arguments passed to copyWith(...). "
9657 "Types should be listed at most once.");
9658
9659 auto copy{ *this };
9660 copy.set(std::forward<Args>(args)...);
9661 return copy;
9662 }
9663
9665 const Enabled &isEnabled() const
9666 {
9667 return m_enabled;
9668 }
9669
9672 {
9673 return m_enabled;
9674 }
9675
9677 Gaussian &set(const Enabled &value)
9678 {
9679 m_enabled = value;
9680 return *this;
9681 }
9682
9684 const Sigma &sigma() const
9685 {
9686 return m_sigma;
9687 }
9688
9691 {
9692 return m_sigma;
9693 }
9694
9696 Gaussian &set(const Sigma &value)
9697 {
9698 m_sigma = value;
9699 return *this;
9700 }
9701
9702 template<
9703 typename T,
9704 typename std::enable_if<
9705 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9706 int>::type = 0>
9708 {
9709 return m_enabled;
9710 }
9711
9712 template<
9713 typename T,
9714 typename std::enable_if<
9715 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9716 int>::type = 0>
9718 {
9719 return m_sigma;
9720 }
9721
9722 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9724 {
9725 return m_enabled;
9726 }
9727
9728 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9730 {
9731 return m_sigma;
9732 }
9733
9735 template<typename F>
9736 void forEach(const F &f) const
9737 {
9738 f(m_enabled);
9739 f(m_sigma);
9740 }
9741
9743 template<typename F>
9744 void forEach(const F &f)
9745 {
9746 f(m_enabled);
9747 f(m_sigma);
9748 }
9749
9751 bool operator==(const Gaussian &other) const;
9752
9754 bool operator!=(const Gaussian &other) const;
9755
9757 std::string toString() const;
9758
9760 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9761 {
9762 return stream << value.toString();
9763 }
9764
9765 private:
9766 void setFromString(const std::string &value);
9767
9768 void setFromString(const std::string &fullPath, const std::string &value);
9769
9770 std::string getString(const std::string &fullPath) const;
9771
9772 Enabled m_enabled;
9773 Sigma m_sigma;
9774
9775 friend struct DataModel::Detail::Befriend<Gaussian>;
9776 };
9777
9778 using Descendants = std::tuple<
9782
9785
9799#ifndef NO_DOC
9800 template<
9801 typename... Args,
9802 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9803 typename std::enable_if<
9804 Zivid::Detail::TypeTraits::
9805 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9806 int>::type = 0>
9807#else
9808 template<typename... Args>
9809#endif
9810 explicit Smoothing(Args &&...args)
9811 {
9812 using namespace Zivid::Detail::TypeTraits;
9813
9814 static_assert(
9815 AllArgsDecayedAreUnique<Args...>::value,
9816 "Found duplicate types among the arguments passed to Smoothing(...). "
9817 "Types should be listed at most once.");
9818
9819 set(std::forward<Args>(args)...);
9820 }
9821
9834#ifndef NO_DOC
9835 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9836#else
9837 template<typename... Args>
9838#endif
9839 void set(Args &&...args)
9840 {
9841 using namespace Zivid::Detail::TypeTraits;
9842
9843 using AllArgsAreDescendantNodes =
9844 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9845 static_assert(
9846 AllArgsAreDescendantNodes::value,
9847 "All arguments passed to set(...) must be descendant nodes.");
9848
9849 static_assert(
9850 AllArgsDecayedAreUnique<Args...>::value,
9851 "Found duplicate types among the arguments passed to set(...). "
9852 "Types should be listed at most once.");
9853
9854 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9855 }
9856
9870#ifndef NO_DOC
9871 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9872#else
9873 template<typename... Args>
9874#endif
9875 Smoothing copyWith(Args &&...args) const
9876 {
9877 using namespace Zivid::Detail::TypeTraits;
9878
9879 using AllArgsAreDescendantNodes =
9880 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9881 static_assert(
9882 AllArgsAreDescendantNodes::value,
9883 "All arguments passed to copyWith(...) must be descendant nodes.");
9884
9885 static_assert(
9886 AllArgsDecayedAreUnique<Args...>::value,
9887 "Found duplicate types among the arguments passed to copyWith(...). "
9888 "Types should be listed at most once.");
9889
9890 auto copy{ *this };
9891 copy.set(std::forward<Args>(args)...);
9892 return copy;
9893 }
9894
9896 const Gaussian &gaussian() const
9897 {
9898 return m_gaussian;
9899 }
9900
9903 {
9904 return m_gaussian;
9905 }
9906
9908 Smoothing &set(const Gaussian &value)
9909 {
9910 m_gaussian = value;
9911 return *this;
9912 }
9913
9916 {
9917 m_gaussian.set(value);
9918 return *this;
9919 }
9920
9923 {
9924 m_gaussian.set(value);
9925 return *this;
9926 }
9927
9928 template<
9929 typename T,
9930 typename std::enable_if<
9931 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9932 int>::type = 0>
9934 {
9935 return m_gaussian;
9936 }
9937
9938 template<
9939 typename T,
9940 typename std::enable_if<
9941 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9942 int>::type = 0>
9944 {
9946 }
9947
9948 template<
9949 typename T,
9950 typename std::enable_if<
9951 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9952 int>::type = 0>
9954 {
9956 }
9957
9958 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9960 {
9961 return m_gaussian;
9962 }
9963
9965 template<typename F>
9966 void forEach(const F &f) const
9967 {
9968 f(m_gaussian);
9969 }
9970
9972 template<typename F>
9973 void forEach(const F &f)
9974 {
9975 f(m_gaussian);
9976 }
9977
9979 bool operator==(const Smoothing &other) const;
9980
9982 bool operator!=(const Smoothing &other) const;
9983
9985 std::string toString() const;
9986
9988 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
9989 {
9990 return stream << value.toString();
9991 }
9992
9993 private:
9994 void setFromString(const std::string &value);
9995
9996 void setFromString(const std::string &fullPath, const std::string &value);
9997
9998 std::string getString(const std::string &fullPath) const;
9999
10000 Gaussian m_gaussian;
10001
10002 friend struct DataModel::Detail::Befriend<Smoothing>;
10003 };
10004
10005 using Descendants = std::tuple<
10044
10047
10096#ifndef NO_DOC
10097 template<
10098 typename... Args,
10099 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
10100 typename std::enable_if<
10101 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
10102 value,
10103 int>::type = 0>
10104#else
10105 template<typename... Args>
10106#endif
10107 explicit Filters(Args &&...args)
10108 {
10109 using namespace Zivid::Detail::TypeTraits;
10110
10111 static_assert(
10112 AllArgsDecayedAreUnique<Args...>::value,
10113 "Found duplicate types among the arguments passed to Filters(...). "
10114 "Types should be listed at most once.");
10115
10116 set(std::forward<Args>(args)...);
10117 }
10118
10166#ifndef NO_DOC
10167 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
10168#else
10169 template<typename... Args>
10170#endif
10171 void set(Args &&...args)
10172 {
10173 using namespace Zivid::Detail::TypeTraits;
10174
10175 using AllArgsAreDescendantNodes =
10176 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10177 static_assert(
10178 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
10179
10180 static_assert(
10181 AllArgsDecayedAreUnique<Args...>::value,
10182 "Found duplicate types among the arguments passed to set(...). "
10183 "Types should be listed at most once.");
10184
10185 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
10186 }
10187
10236#ifndef NO_DOC
10237 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10238#else
10239 template<typename... Args>
10240#endif
10241 Filters copyWith(Args &&...args) const
10242 {
10243 using namespace Zivid::Detail::TypeTraits;
10244
10245 using AllArgsAreDescendantNodes =
10246 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10247 static_assert(
10248 AllArgsAreDescendantNodes::value,
10249 "All arguments passed to copyWith(...) must be descendant nodes.");
10250
10251 static_assert(
10252 AllArgsDecayedAreUnique<Args...>::value,
10253 "Found duplicate types among the arguments passed to copyWith(...). "
10254 "Types should be listed at most once.");
10255
10256 auto copy{ *this };
10257 copy.set(std::forward<Args>(args)...);
10258 return copy;
10259 }
10260
10262 const Cluster &cluster() const
10263 {
10264 return m_cluster;
10265 }
10266
10269 {
10270 return m_cluster;
10271 }
10272
10274 Filters &set(const Cluster &value)
10275 {
10276 m_cluster = value;
10277 return *this;
10278 }
10279
10282 {
10283 m_cluster.set(value);
10284 return *this;
10285 }
10286
10289 {
10290 m_cluster.set(value);
10291 return *this;
10292 }
10293
10296 {
10297 m_cluster.set(value);
10298 return *this;
10299 }
10300
10303 {
10304 m_cluster.set(value);
10305 return *this;
10306 }
10307
10310 {
10311 return m_experimental;
10312 }
10313
10316 {
10317 return m_experimental;
10318 }
10319
10321 Filters &set(const Experimental &value)
10322 {
10323 m_experimental = value;
10324 return *this;
10325 }
10326
10329 {
10330 m_experimental.set(value);
10331 return *this;
10332 }
10333
10336 {
10337 m_experimental.set(value);
10338 return *this;
10339 }
10340
10343 {
10344 m_experimental.set(value);
10345 return *this;
10346 }
10347
10350 {
10351 m_experimental.set(value);
10352 return *this;
10353 }
10354
10357 {
10358 m_experimental.set(value);
10359 return *this;
10360 }
10361
10364 {
10365 m_experimental.set(value);
10366 return *this;
10367 }
10368
10371 {
10372 m_experimental.set(value);
10373 return *this;
10374 }
10375
10377 const Hole &hole() const
10378 {
10379 return m_hole;
10380 }
10381
10384 {
10385 return m_hole;
10386 }
10387
10389 Filters &set(const Hole &value)
10390 {
10391 m_hole = value;
10392 return *this;
10393 }
10394
10396 Filters &set(const Hole::Repair &value)
10397 {
10398 m_hole.set(value);
10399 return *this;
10400 }
10401
10404 {
10405 m_hole.set(value);
10406 return *this;
10407 }
10408
10411 {
10412 m_hole.set(value);
10413 return *this;
10414 }
10415
10418 {
10419 m_hole.set(value);
10420 return *this;
10421 }
10422
10424 const Noise &noise() const
10425 {
10426 return m_noise;
10427 }
10428
10431 {
10432 return m_noise;
10433 }
10434
10436 Filters &set(const Noise &value)
10437 {
10438 m_noise = value;
10439 return *this;
10440 }
10441
10444 {
10445 m_noise.set(value);
10446 return *this;
10447 }
10448
10451 {
10452 m_noise.set(value);
10453 return *this;
10454 }
10455
10458 {
10459 m_noise.set(value);
10460 return *this;
10461 }
10462
10465 {
10466 m_noise.set(value);
10467 return *this;
10468 }
10469
10472 {
10473 m_noise.set(value);
10474 return *this;
10475 }
10476
10479 {
10480 m_noise.set(value);
10481 return *this;
10482 }
10483
10486 {
10487 m_noise.set(value);
10488 return *this;
10489 }
10490
10492 const Outlier &outlier() const
10493 {
10494 return m_outlier;
10495 }
10496
10499 {
10500 return m_outlier;
10501 }
10502
10504 Filters &set(const Outlier &value)
10505 {
10506 m_outlier = value;
10507 return *this;
10508 }
10509
10512 {
10513 m_outlier.set(value);
10514 return *this;
10515 }
10516
10519 {
10520 m_outlier.set(value);
10521 return *this;
10522 }
10523
10526 {
10527 m_outlier.set(value);
10528 return *this;
10529 }
10530
10532 const Reflection &reflection() const
10533 {
10534 return m_reflection;
10535 }
10536
10539 {
10540 return m_reflection;
10541 }
10542
10544 Filters &set(const Reflection &value)
10545 {
10546 m_reflection = value;
10547 return *this;
10548 }
10549
10552 {
10553 m_reflection.set(value);
10554 return *this;
10555 }
10556
10559 {
10560 m_reflection.set(value);
10561 return *this;
10562 }
10563
10566 {
10567 m_reflection.set(value);
10568 return *this;
10569 }
10570
10572 const Smoothing &smoothing() const
10573 {
10574 return m_smoothing;
10575 }
10576
10579 {
10580 return m_smoothing;
10581 }
10582
10584 Filters &set(const Smoothing &value)
10585 {
10586 m_smoothing = value;
10587 return *this;
10588 }
10589
10592 {
10593 m_smoothing.set(value);
10594 return *this;
10595 }
10596
10599 {
10600 m_smoothing.set(value);
10601 return *this;
10602 }
10603
10606 {
10607 m_smoothing.set(value);
10608 return *this;
10609 }
10610
10611 template<
10612 typename T,
10613 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10614 0>
10616 {
10617 return m_cluster;
10618 }
10619
10620 template<
10621 typename T,
10622 typename std::enable_if<
10623 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value,
10624 int>::type = 0>
10626 {
10628 }
10629
10630 template<
10631 typename T,
10632 typename std::enable_if<
10633 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
10634 int>::type = 0>
10636 {
10638 }
10639
10640 template<
10641 typename T,
10642 typename std::enable_if<
10643 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
10644 int>::type = 0>
10646 {
10648 }
10649
10650 template<
10651 typename T,
10652 typename std::enable_if<
10653 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10654 int>::type = 0>
10656 {
10658 }
10659
10660 template<
10661 typename T,
10662 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10663 type = 0>
10665 {
10666 return m_experimental;
10667 }
10668
10669 template<
10670 typename T,
10671 typename std::enable_if<
10672 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10673 int>::type = 0>
10675 {
10677 }
10678
10679 template<
10680 typename T,
10681 typename std::enable_if<
10682 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10683 value,
10684 int>::type = 0>
10686 {
10687 return m_experimental
10689 }
10690
10691 template<
10692 typename T,
10693 typename std::enable_if<
10694 std::is_same<
10695 T,
10697 value,
10698 int>::type = 0>
10700 {
10701 return m_experimental
10703 }
10704
10705 template<
10706 typename T,
10707 typename std::enable_if<
10708 std::is_same<
10709 T,
10711 value,
10712 int>::type = 0>
10714 {
10715 return m_experimental
10717 }
10718
10719 template<
10720 typename T,
10721 typename std::enable_if<
10722 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10723 value,
10724 int>::type = 0>
10726 {
10727 return m_experimental
10729 }
10730
10731 template<
10732 typename T,
10733 typename std::enable_if<
10734 std::is_same<
10735 T,
10737 int>::type = 0>
10739 {
10740 return m_experimental
10742 }
10743
10744 template<
10745 typename T,
10746 typename std::enable_if<
10747 std::is_same<
10748 T,
10750 int>::type = 0>
10752 {
10753 return m_experimental
10755 }
10756
10757 template<
10758 typename T,
10759 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
10761 {
10762 return m_hole;
10763 }
10764
10765 template<
10766 typename T,
10767 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
10768 type = 0>
10770 {
10772 }
10773
10774 template<
10775 typename T,
10776 typename std::enable_if<
10777 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
10778 int>::type = 0>
10780 {
10782 }
10783
10784 template<
10785 typename T,
10786 typename std::enable_if<
10787 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
10788 int>::type = 0>
10790 {
10792 }
10793
10794 template<
10795 typename T,
10796 typename std::enable_if<
10797 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
10798 int>::type = 0>
10800 {
10802 }
10803
10804 template<
10805 typename T,
10806 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10807 0>
10809 {
10810 return m_noise;
10811 }
10812
10813 template<
10814 typename T,
10815 typename std::
10816 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type = 0>
10818 {
10820 }
10821
10822 template<
10823 typename T,
10824 typename std::enable_if<
10825 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
10826 int>::type = 0>
10828 {
10830 }
10831
10832 template<
10833 typename T,
10834 typename std::enable_if<
10835 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10836 int>::type = 0>
10838 {
10840 }
10841
10842 template<
10843 typename T,
10844 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10845 type = 0>
10847 {
10849 }
10850
10851 template<
10852 typename T,
10853 typename std::enable_if<
10854 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
10855 int>::type = 0>
10857 {
10859 }
10860
10861 template<
10862 typename T,
10863 typename std::enable_if<
10864 std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value,
10865 int>::type = 0>
10867 {
10869 }
10870
10871 template<
10872 typename T,
10873 typename std::enable_if<
10874 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10875 int>::type = 0>
10877 {
10879 }
10880
10881 template<
10882 typename T,
10883 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10884 0>
10886 {
10887 return m_outlier;
10888 }
10889
10890 template<
10891 typename T,
10892 typename std::enable_if<
10893 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
10894 int>::type = 0>
10896 {
10898 }
10899
10900 template<
10901 typename T,
10902 typename std::enable_if<
10903 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
10904 int>::type = 0>
10906 {
10908 }
10909
10910 template<
10911 typename T,
10912 typename std::enable_if<
10913 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10914 int>::type = 0>
10916 {
10918 }
10919
10920 template<
10921 typename T,
10922 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10923 type = 0>
10925 {
10926 return m_reflection;
10927 }
10928
10929 template<
10930 typename T,
10931 typename std::enable_if<
10932 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
10933 int>::type = 0>
10935 {
10937 }
10938
10939 template<
10940 typename T,
10941 typename std::enable_if<
10942 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
10943 int>::type = 0>
10945 {
10947 }
10948
10949 template<
10950 typename T,
10951 typename std::enable_if<
10952 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
10953 int>::type = 0>
10955 {
10957 }
10958
10959 template<
10960 typename T,
10961 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
10962 type = 0>
10964 {
10965 return m_smoothing;
10966 }
10967
10968 template<
10969 typename T,
10970 typename std::enable_if<
10971 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
10972 int>::type = 0>
10974 {
10976 }
10977
10978 template<
10979 typename T,
10980 typename std::enable_if<
10981 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
10982 int>::type = 0>
10984 {
10986 }
10987
10988 template<
10989 typename T,
10990 typename std::enable_if<
10991 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
10992 int>::type = 0>
10994 {
10996 }
10997
10998 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11000 {
11001 return m_cluster;
11002 }
11003
11004 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
11006 {
11007 return m_experimental;
11008 }
11009
11010 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
11012 {
11013 return m_hole;
11014 }
11015
11016 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
11018 {
11019 return m_noise;
11020 }
11021
11022 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
11024 {
11025 return m_outlier;
11026 }
11027
11028 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
11030 {
11031 return m_reflection;
11032 }
11033
11034 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
11036 {
11037 return m_smoothing;
11038 }
11039
11041 template<typename F>
11042 void forEach(const F &f) const
11043 {
11044 f(m_cluster);
11045 f(m_experimental);
11046 f(m_hole);
11047 f(m_noise);
11048 f(m_outlier);
11049 f(m_reflection);
11050 f(m_smoothing);
11051 }
11052
11054 template<typename F>
11055 void forEach(const F &f)
11056 {
11057 f(m_cluster);
11058 f(m_experimental);
11059 f(m_hole);
11060 f(m_noise);
11061 f(m_outlier);
11062 f(m_reflection);
11063 f(m_smoothing);
11064 }
11065
11067 bool operator==(const Filters &other) const;
11068
11070 bool operator!=(const Filters &other) const;
11071
11073 std::string toString() const;
11074
11076 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
11077 {
11078 return stream << value.toString();
11079 }
11080
11081 private:
11082 void setFromString(const std::string &value);
11083
11084 void setFromString(const std::string &fullPath, const std::string &value);
11085
11086 std::string getString(const std::string &fullPath) const;
11087
11088 Cluster m_cluster;
11089 Experimental m_experimental;
11090 Hole m_hole;
11091 Noise m_noise;
11092 Outlier m_outlier;
11093 Reflection m_reflection;
11094 Smoothing m_smoothing;
11095
11096 friend struct DataModel::Detail::Befriend<Filters>;
11097 };
11098
11101
11102 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11104 {
11105 public:
11107 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
11108
11110 static constexpr const char *path{ "Processing/Resampling" };
11111
11113 static constexpr const char *name{ "Resampling" };
11114
11116 static constexpr const char *description{
11117 R"description(Settings for changing the output resolution of the point cloud.
11118)description"
11119 };
11120
11144
11145 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11147 {
11148 public:
11150 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
11151
11153 static constexpr const char *path{ "Processing/Resampling/Mode" };
11154
11156 static constexpr const char *name{ "Mode" };
11157
11159 static constexpr const char *description{
11160 R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
11161is performed after all other processing has been completed.
11162
11163Downsampling is used to reduce the number of points in the point cloud. This is done by
11164combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
11165a new point cloud. This downsample functionality is identical to the downsample method
11166on the PointCloud class. The averaging process reduces noise in the point cloud, but it
11167will not improve capture speed. To improve capture speed, consider using the subsampling
11168modes found in Settings/Sampling/Pixel.
11169
11170Upsampling is used to increase the number of points in the point cloud. It is not possible
11171to upsample beyond the full resolution of the camera, so upsampling may only be used in
11172combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
11173combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
11174resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
11175blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
11176groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
11177new points based on an interpolation of the surrounding original points. The points in the
11178new point cloud that correspond to points in the original point cloud are left unchanged.
11179Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
11180pixels in the point cloud compared to no upsampling, so users should be aware of increased
11181computational cost related to copying and analyzing this data.
11182)description"
11183 };
11184
11186 enum class ValueType
11187 {
11188 disabled,
11189 downsample2x2,
11190 downsample4x4,
11191 upsample2x2,
11192 upsample4x4
11193 };
11194 static const Mode disabled;
11195 static const Mode downsample2x2;
11196 static const Mode downsample4x4;
11197 static const Mode upsample2x2;
11198 static const Mode upsample4x4;
11199
11201 static std::set<ValueType> validValues()
11202 {
11203 return { ValueType::disabled,
11204 ValueType::downsample2x2,
11205 ValueType::downsample4x4,
11206 ValueType::upsample2x2,
11207 ValueType::upsample4x4 };
11208 }
11209
11211 Mode() = default;
11212
11214 explicit constexpr Mode(ValueType value)
11215 : m_opt{ verifyValue(value) }
11216 {}
11217
11223
11225 bool hasValue() const;
11226
11228 void reset();
11229
11231 std::string toString() const;
11232
11234 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
11235 {
11236 return stream << Mode{ value }.toString();
11237 }
11238
11240 bool operator==(const Mode &other) const
11241 {
11242 return m_opt == other.m_opt;
11243 }
11244
11246 bool operator!=(const Mode &other) const
11247 {
11248 return m_opt != other.m_opt;
11249 }
11250
11252 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
11253 {
11254 return stream << value.toString();
11255 }
11256
11257 private:
11258 void setFromString(const std::string &value);
11259
11260 constexpr ValueType static verifyValue(const ValueType &value)
11261 {
11262 return value == ValueType::disabled || value == ValueType::downsample2x2
11263 || value == ValueType::downsample4x4 || value == ValueType::upsample2x2
11264 || value == ValueType::upsample4x4
11265 ? value
11266 : throw std::invalid_argument{
11267 "Invalid value: Mode{ "
11268 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
11269 + " }"
11270 };
11271 }
11272
11273 std::optional<ValueType> m_opt;
11274
11275 friend struct DataModel::Detail::Befriend<Mode>;
11276 };
11277
11278 using Descendants = std::tuple<Settings::Processing::Resampling::Mode>;
11279
11282
11294#ifndef NO_DOC
11295 template<
11296 typename... Args,
11297 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11298 typename std::enable_if<
11299 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11300 value,
11301 int>::type = 0>
11302#else
11303 template<typename... Args>
11304#endif
11305 explicit Resampling(Args &&...args)
11306 {
11307 using namespace Zivid::Detail::TypeTraits;
11308
11309 static_assert(
11310 AllArgsDecayedAreUnique<Args...>::value,
11311 "Found duplicate types among the arguments passed to Resampling(...). "
11312 "Types should be listed at most once.");
11313
11314 set(std::forward<Args>(args)...);
11315 }
11316
11327#ifndef NO_DOC
11328 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11329#else
11330 template<typename... Args>
11331#endif
11332 void set(Args &&...args)
11333 {
11334 using namespace Zivid::Detail::TypeTraits;
11335
11336 using AllArgsAreDescendantNodes =
11337 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11338 static_assert(
11339 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11340
11341 static_assert(
11342 AllArgsDecayedAreUnique<Args...>::value,
11343 "Found duplicate types among the arguments passed to set(...). "
11344 "Types should be listed at most once.");
11345
11346 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11347 }
11348
11360#ifndef NO_DOC
11361 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11362#else
11363 template<typename... Args>
11364#endif
11365 Resampling copyWith(Args &&...args) const
11366 {
11367 using namespace Zivid::Detail::TypeTraits;
11368
11369 using AllArgsAreDescendantNodes =
11370 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11371 static_assert(
11372 AllArgsAreDescendantNodes::value,
11373 "All arguments passed to copyWith(...) must be descendant nodes.");
11374
11375 static_assert(
11376 AllArgsDecayedAreUnique<Args...>::value,
11377 "Found duplicate types among the arguments passed to copyWith(...). "
11378 "Types should be listed at most once.");
11379
11380 auto copy{ *this };
11381 copy.set(std::forward<Args>(args)...);
11382 return copy;
11383 }
11384
11386 const Mode &mode() const
11387 {
11388 return m_mode;
11389 }
11390
11393 {
11394 return m_mode;
11395 }
11396
11398 Resampling &set(const Mode &value)
11399 {
11400 m_mode = value;
11401 return *this;
11402 }
11403
11404 template<
11405 typename T,
11406 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type =
11407 0>
11409 {
11410 return m_mode;
11411 }
11412
11413 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11415 {
11416 return m_mode;
11417 }
11418
11420 template<typename F>
11421 void forEach(const F &f) const
11422 {
11423 f(m_mode);
11424 }
11425
11427 template<typename F>
11428 void forEach(const F &f)
11429 {
11430 f(m_mode);
11431 }
11432
11434 bool operator==(const Resampling &other) const;
11435
11437 bool operator!=(const Resampling &other) const;
11438
11440 std::string toString() const;
11441
11443 friend std::ostream &operator<<(std::ostream &stream, const Resampling &value)
11444 {
11445 return stream << value.toString();
11446 }
11447
11448 private:
11449 void setFromString(const std::string &value);
11450
11451 void setFromString(const std::string &fullPath, const std::string &value);
11452
11453 std::string getString(const std::string &fullPath) const;
11454
11455 Mode m_mode;
11456
11457 friend struct DataModel::Detail::Befriend<Resampling>;
11458 };
11459
11460 using Descendants = std::tuple<
11510
11513
11573#ifndef NO_DOC
11574 template<
11575 typename... Args,
11576 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11577 typename std::enable_if<
11578 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11579 value,
11580 int>::type = 0>
11581#else
11582 template<typename... Args>
11583#endif
11584 explicit Processing(Args &&...args)
11585 {
11586 using namespace Zivid::Detail::TypeTraits;
11587
11588 static_assert(
11589 AllArgsDecayedAreUnique<Args...>::value,
11590 "Found duplicate types among the arguments passed to Processing(...). "
11591 "Types should be listed at most once.");
11592
11593 set(std::forward<Args>(args)...);
11594 }
11595
11654#ifndef NO_DOC
11655 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11656#else
11657 template<typename... Args>
11658#endif
11659 void set(Args &&...args)
11660 {
11661 using namespace Zivid::Detail::TypeTraits;
11662
11663 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11664 static_assert(
11665 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11666
11667 static_assert(
11668 AllArgsDecayedAreUnique<Args...>::value,
11669 "Found duplicate types among the arguments passed to set(...). "
11670 "Types should be listed at most once.");
11671
11672 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11673 }
11674
11734#ifndef NO_DOC
11735 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11736#else
11737 template<typename... Args>
11738#endif
11739 Processing copyWith(Args &&...args) const
11740 {
11741 using namespace Zivid::Detail::TypeTraits;
11742
11743 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11744 static_assert(
11745 AllArgsAreDescendantNodes::value,
11746 "All arguments passed to copyWith(...) must be descendant nodes.");
11747
11748 static_assert(
11749 AllArgsDecayedAreUnique<Args...>::value,
11750 "Found duplicate types among the arguments passed to copyWith(...). "
11751 "Types should be listed at most once.");
11752
11753 auto copy{ *this };
11754 copy.set(std::forward<Args>(args)...);
11755 return copy;
11756 }
11757
11759 const Color &color() const
11760 {
11761 return m_color;
11762 }
11763
11766 {
11767 return m_color;
11768 }
11769
11771 Processing &set(const Color &value)
11772 {
11773 m_color = value;
11774 return *this;
11775 }
11776
11779 {
11780 m_color.set(value);
11781 return *this;
11782 }
11783
11786 {
11787 m_color.set(value);
11788 return *this;
11789 }
11790
11793 {
11794 m_color.set(value);
11795 return *this;
11796 }
11797
11800 {
11801 m_color.set(value);
11802 return *this;
11803 }
11804
11807 {
11808 m_color.set(value);
11809 return *this;
11810 }
11811
11814 {
11815 m_color.set(value);
11816 return *this;
11817 }
11818
11821 {
11822 m_color.set(value);
11823 return *this;
11824 }
11825
11827 const Filters &filters() const
11828 {
11829 return m_filters;
11830 }
11831
11834 {
11835 return m_filters;
11836 }
11837
11839 Processing &set(const Filters &value)
11840 {
11841 m_filters = value;
11842 return *this;
11843 }
11844
11847 {
11848 m_filters.set(value);
11849 return *this;
11850 }
11851
11854 {
11855 m_filters.set(value);
11856 return *this;
11857 }
11858
11861 {
11862 m_filters.set(value);
11863 return *this;
11864 }
11865
11868 {
11869 m_filters.set(value);
11870 return *this;
11871 }
11872
11875 {
11876 m_filters.set(value);
11877 return *this;
11878 }
11879
11882 {
11883 m_filters.set(value);
11884 return *this;
11885 }
11886
11889 {
11890 m_filters.set(value);
11891 return *this;
11892 }
11893
11896 {
11897 m_filters.set(value);
11898 return *this;
11899 }
11900
11903 {
11904 m_filters.set(value);
11905 return *this;
11906 }
11907
11910 {
11911 m_filters.set(value);
11912 return *this;
11913 }
11914
11917 {
11918 m_filters.set(value);
11919 return *this;
11920 }
11921
11924 {
11925 m_filters.set(value);
11926 return *this;
11927 }
11928
11931 {
11932 m_filters.set(value);
11933 return *this;
11934 }
11935
11938 {
11939 m_filters.set(value);
11940 return *this;
11941 }
11942
11945 {
11946 m_filters.set(value);
11947 return *this;
11948 }
11949
11952 {
11953 m_filters.set(value);
11954 return *this;
11955 }
11956
11959 {
11960 m_filters.set(value);
11961 return *this;
11962 }
11963
11966 {
11967 m_filters.set(value);
11968 return *this;
11969 }
11970
11973 {
11974 m_filters.set(value);
11975 return *this;
11976 }
11977
11980 {
11981 m_filters.set(value);
11982 return *this;
11983 }
11984
11987 {
11988 m_filters.set(value);
11989 return *this;
11990 }
11991
11994 {
11995 m_filters.set(value);
11996 return *this;
11997 }
11998
12001 {
12002 m_filters.set(value);
12003 return *this;
12004 }
12005
12008 {
12009 m_filters.set(value);
12010 return *this;
12011 }
12012
12015 {
12016 m_filters.set(value);
12017 return *this;
12018 }
12019
12022 {
12023 m_filters.set(value);
12024 return *this;
12025 }
12026
12029 {
12030 m_filters.set(value);
12031 return *this;
12032 }
12033
12036 {
12037 m_filters.set(value);
12038 return *this;
12039 }
12040
12043 {
12044 m_filters.set(value);
12045 return *this;
12046 }
12047
12050 {
12051 m_filters.set(value);
12052 return *this;
12053 }
12054
12057 {
12058 m_filters.set(value);
12059 return *this;
12060 }
12061
12064 {
12065 m_filters.set(value);
12066 return *this;
12067 }
12068
12071 {
12072 m_filters.set(value);
12073 return *this;
12074 }
12075
12078 {
12079 m_filters.set(value);
12080 return *this;
12081 }
12082
12085 {
12086 m_filters.set(value);
12087 return *this;
12088 }
12089
12092 {
12093 m_filters.set(value);
12094 return *this;
12095 }
12096
12099 {
12100 m_filters.set(value);
12101 return *this;
12102 }
12103
12106 {
12107 m_filters.set(value);
12108 return *this;
12109 }
12110
12112 const Resampling &resampling() const
12113 {
12114 return m_resampling;
12115 }
12116
12119 {
12120 return m_resampling;
12121 }
12122
12125 {
12126 m_resampling = value;
12127 return *this;
12128 }
12129
12132 {
12133 m_resampling.set(value);
12134 return *this;
12135 }
12136
12137 template<
12138 typename T,
12139 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
12141 {
12142 return m_color;
12143 }
12144
12145 template<
12146 typename T,
12147 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
12149 {
12150 return m_color.get<Settings::Processing::Color::Balance>();
12151 }
12152
12153 template<
12154 typename T,
12155 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
12156 0>
12158 {
12159 return m_color.get<Settings::Processing::Color::Balance::Blue>();
12160 }
12161
12162 template<
12163 typename T,
12164 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
12165 type = 0>
12167 {
12168 return m_color.get<Settings::Processing::Color::Balance::Green>();
12169 }
12170
12171 template<
12172 typename T,
12173 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
12174 0>
12176 {
12177 return m_color.get<Settings::Processing::Color::Balance::Red>();
12178 }
12179
12180 template<
12181 typename T,
12182 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
12183 0>
12185 {
12187 }
12188
12189 template<
12190 typename T,
12191 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
12192 type = 0>
12194 {
12196 }
12197
12198 template<
12199 typename T,
12200 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
12202 {
12203 return m_color.get<Settings::Processing::Color::Gamma>();
12204 }
12205
12206 template<
12207 typename T,
12208 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
12210 {
12211 return m_filters;
12212 }
12213
12214 template<
12215 typename T,
12216 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
12218 {
12219 return m_filters.get<Settings::Processing::Filters::Cluster>();
12220 }
12221
12222 template<
12223 typename T,
12224 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
12225 type = 0>
12227 {
12229 }
12230
12231 template<
12232 typename T,
12233 typename std::enable_if<
12234 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
12235 int>::type = 0>
12237 {
12239 }
12240
12241 template<
12242 typename T,
12243 typename std::enable_if<
12244 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
12245 int>::type = 0>
12247 {
12249 }
12250
12251 template<
12252 typename T,
12253 typename std::enable_if<
12254 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
12255 int>::type = 0>
12257 {
12259 }
12260
12261 template<
12262 typename T,
12263 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
12264 type = 0>
12266 {
12268 }
12269
12270 template<
12271 typename T,
12272 typename std::enable_if<
12273 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
12274 int>::type = 0>
12276 {
12278 }
12279
12280 template<
12281 typename T,
12282 typename std::enable_if<
12283 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
12284 int>::type = 0>
12286 {
12288 }
12289
12290 template<
12291 typename T,
12292 typename std::enable_if<
12293 std::is_same<
12294 T,
12296 int>::type = 0>
12298 {
12299 return m_filters
12301 }
12302
12303 template<
12304 typename T,
12305 typename std::enable_if<
12306 std::is_same<
12307 T,
12309 int>::type = 0>
12311 {
12312 return m_filters
12314 }
12315
12316 template<
12317 typename T,
12318 typename std::enable_if<
12319 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
12320 int>::type = 0>
12322 {
12324 }
12325
12326 template<
12327 typename T,
12328 typename std::enable_if<
12329 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12330 value,
12331 int>::type = 0>
12333 {
12334 return m_filters
12336 }
12337
12338 template<
12339 typename T,
12340 typename std::enable_if<
12341 std::is_same<
12342 T,
12344 int>::type = 0>
12346 {
12347 return m_filters
12349 }
12350
12351 template<
12352 typename T,
12353 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
12355 {
12356 return m_filters.get<Settings::Processing::Filters::Hole>();
12357 }
12358
12359 template<
12360 typename T,
12361 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
12362 type = 0>
12364 {
12366 }
12367
12368 template<
12369 typename T,
12370 typename std::enable_if<
12371 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value,
12372 int>::type = 0>
12374 {
12376 }
12377
12378 template<
12379 typename T,
12380 typename std::enable_if<
12381 std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value,
12382 int>::type = 0>
12384 {
12386 }
12387
12388 template<
12389 typename T,
12390 typename std::enable_if<
12391 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
12392 int>::type = 0>
12394 {
12396 }
12397
12398 template<
12399 typename T,
12400 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12402 {
12403 return m_filters.get<Settings::Processing::Filters::Noise>();
12404 }
12405
12406 template<
12407 typename T,
12408 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12409 type = 0>
12411 {
12413 }
12414
12415 template<
12416 typename T,
12417 typename std::enable_if<
12418 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
12419 int>::type = 0>
12421 {
12423 }
12424
12425 template<
12426 typename T,
12427 typename std::enable_if<
12428 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12429 int>::type = 0>
12431 {
12433 }
12434
12435 template<
12436 typename T,
12437 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12438 type = 0>
12440 {
12442 }
12443
12444 template<
12445 typename T,
12446 typename std::enable_if<
12447 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12448 int>::type = 0>
12450 {
12452 }
12453
12454 template<
12455 typename T,
12456 typename std::
12457 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12459 {
12461 }
12462
12463 template<
12464 typename T,
12465 typename std::enable_if<
12466 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12467 int>::type = 0>
12469 {
12471 }
12472
12473 template<
12474 typename T,
12475 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12477 {
12478 return m_filters.get<Settings::Processing::Filters::Outlier>();
12479 }
12480
12481 template<
12482 typename T,
12483 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12484 type = 0>
12486 {
12488 }
12489
12490 template<
12491 typename T,
12492 typename std::enable_if<
12493 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
12494 int>::type = 0>
12496 {
12498 }
12499
12500 template<
12501 typename T,
12502 typename std::enable_if<
12503 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12504 int>::type = 0>
12506 {
12508 }
12509
12510 template<
12511 typename T,
12512 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12513 0>
12515 {
12517 }
12518
12519 template<
12520 typename T,
12521 typename std::enable_if<
12522 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
12523 int>::type = 0>
12525 {
12527 }
12528
12529 template<
12530 typename T,
12531 typename std::enable_if<
12532 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
12533 int>::type = 0>
12535 {
12537 }
12538
12539 template<
12540 typename T,
12541 typename std::enable_if<
12542 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
12543 int>::type = 0>
12545 {
12547 }
12548
12549 template<
12550 typename T,
12551 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12552 0>
12554 {
12556 }
12557
12558 template<
12559 typename T,
12560 typename std::enable_if<
12561 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
12562 int>::type = 0>
12564 {
12566 }
12567
12568 template<
12569 typename T,
12570 typename std::enable_if<
12571 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
12572 int>::type = 0>
12574 {
12576 }
12577
12578 template<
12579 typename T,
12580 typename std::enable_if<
12581 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12582 int>::type = 0>
12584 {
12586 }
12587
12588 template<
12589 typename T,
12590 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
12592 {
12593 return m_resampling;
12594 }
12595
12596 template<
12597 typename T,
12598 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
12600 {
12601 return m_resampling.get<Settings::Processing::Resampling::Mode>();
12602 }
12603
12604 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12606 {
12607 return m_color;
12608 }
12609
12610 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12612 {
12613 return m_filters;
12614 }
12615
12616 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
12618 {
12619 return m_resampling;
12620 }
12621
12623 template<typename F>
12624 void forEach(const F &f) const
12625 {
12626 f(m_color);
12627 f(m_filters);
12628 f(m_resampling);
12629 }
12630
12632 template<typename F>
12633 void forEach(const F &f)
12634 {
12635 f(m_color);
12636 f(m_filters);
12637 f(m_resampling);
12638 }
12639
12641 bool operator==(const Processing &other) const;
12642
12644 bool operator!=(const Processing &other) const;
12645
12647 std::string toString() const;
12648
12650 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12651 {
12652 return stream << value.toString();
12653 }
12654
12655 private:
12656 void setFromString(const std::string &value);
12657
12658 void setFromString(const std::string &fullPath, const std::string &value);
12659
12660 std::string getString(const std::string &fullPath) const;
12661
12662 Color m_color;
12663 Filters m_filters;
12664 Resampling m_resampling;
12665
12666 friend struct DataModel::Detail::Befriend<Processing>;
12667 };
12668
12671
12672 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12674 {
12675 public:
12677 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12678
12680 static constexpr const char *path{ "RegionOfInterest" };
12681
12683 static constexpr const char *name{ "RegionOfInterest" };
12684
12686 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12687)description" };
12688
12705
12706 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12708 {
12709 public:
12711 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12712
12714 static constexpr const char *path{ "RegionOfInterest/Box" };
12715
12717 static constexpr const char *name{ "Box" };
12718
12720 static constexpr const char *description{
12721 R"description(Removes points outside the given three-dimensional box.
12722
12723Using this feature may significantly speed up acquisition and processing time, because
12724one can avoid acquiring and processing data that is guaranteed to fall outside of the
12725region of interest. The degree of speed-up depends on the size and shape of the box.
12726Generally, a smaller box yields a greater speed-up.
12727
12728The box is defined by three points: O, A and B. These points define two vectors,
12729OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12730This gives 4 points O, A, B and (O + OA + OB), that together form a
12731parallelogram in 3D.
12732
12733Two extents can be provided, to extrude the parallelogram along the surface
12734normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12735The surface normal vector is defined by the cross product OA x OB.
12736)description"
12737 };
12738
12740
12741 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12743 {
12744 public:
12746 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12747
12749 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12750
12752 static constexpr const char *name{ "Enabled" };
12753
12755 static constexpr const char *description{
12756 R"description(Enable or disable box filter.)description"
12757 };
12758
12760 using ValueType = bool;
12761 static const Enabled yes;
12762 static const Enabled no;
12763
12765 static std::set<bool> validValues()
12766 {
12767 return { false, true };
12768 }
12769
12771 Enabled() = default;
12772
12774 explicit constexpr Enabled(bool value)
12775 : m_opt{ value }
12776 {}
12777
12782 bool value() const;
12783
12785 bool hasValue() const;
12786
12788 void reset();
12789
12791 std::string toString() const;
12792
12794 bool operator==(const Enabled &other) const
12795 {
12796 return m_opt == other.m_opt;
12797 }
12798
12800 bool operator!=(const Enabled &other) const
12801 {
12802 return m_opt != other.m_opt;
12803 }
12804
12806 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12807 {
12808 return stream << value.toString();
12809 }
12810
12811 private:
12812 void setFromString(const std::string &value);
12813
12814 std::optional<bool> m_opt;
12815
12816 friend struct DataModel::Detail::Befriend<Enabled>;
12817 };
12818
12820
12821 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12823 {
12824 public:
12826 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12827
12829 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12830
12832 static constexpr const char *name{ "Extents" };
12833
12835 static constexpr const char *description{
12836 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12837 };
12838
12841
12843 Extents() = default;
12844
12846 explicit constexpr Extents(Zivid::Range<double> value)
12847 : m_opt{ value }
12848 {}
12849
12855
12857 bool hasValue() const;
12858
12860 void reset();
12861
12863 std::string toString() const;
12864
12866 explicit constexpr Extents(double minValue, double maxValue)
12867 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12868 {}
12869
12871 bool operator==(const Extents &other) const
12872 {
12873 return m_opt == other.m_opt;
12874 }
12875
12877 bool operator!=(const Extents &other) const
12878 {
12879 return m_opt != other.m_opt;
12880 }
12881
12883 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12884 {
12885 return stream << value.toString();
12886 }
12887
12888 private:
12889 void setFromString(const std::string &value);
12890
12891 std::optional<Zivid::Range<double>> m_opt;
12892
12893 friend struct DataModel::Detail::Befriend<Extents>;
12894 };
12895
12897
12898 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12900 {
12901 public:
12903 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12904
12906 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12907
12909 static constexpr const char *name{ "PointA" };
12910
12912 static constexpr const char *description{
12913 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram.)description"
12914 };
12915
12918
12920 PointA() = default;
12921
12923 explicit constexpr PointA(Zivid::PointXYZ value)
12924 : m_opt{ value }
12925 {}
12926
12932
12934 bool hasValue() const;
12935
12937 void reset();
12938
12940 std::string toString() const;
12941
12943 explicit constexpr PointA(float x, float y, float z)
12944 : PointA{ Zivid::PointXYZ{ x, y, z } }
12945 {}
12946
12948 bool operator==(const PointA &other) const
12949 {
12950 return m_opt == other.m_opt;
12951 }
12952
12954 bool operator!=(const PointA &other) const
12955 {
12956 return m_opt != other.m_opt;
12957 }
12958
12960 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12961 {
12962 return stream << value.toString();
12963 }
12964
12965 private:
12966 void setFromString(const std::string &value);
12967
12968 std::optional<Zivid::PointXYZ> m_opt;
12969
12970 friend struct DataModel::Detail::Befriend<PointA>;
12971 };
12972
12974
12975 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12977 {
12978 public:
12980 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12981
12983 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12984
12986 static constexpr const char *name{ "PointB" };
12987
12989 static constexpr const char *description{
12990 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram.)description"
12991 };
12992
12995
12997 PointB() = default;
12998
13000 explicit constexpr PointB(Zivid::PointXYZ value)
13001 : m_opt{ value }
13002 {}
13003
13009
13011 bool hasValue() const;
13012
13014 void reset();
13015
13017 std::string toString() const;
13018
13020 explicit constexpr PointB(float x, float y, float z)
13021 : PointB{ Zivid::PointXYZ{ x, y, z } }
13022 {}
13023
13025 bool operator==(const PointB &other) const
13026 {
13027 return m_opt == other.m_opt;
13028 }
13029
13031 bool operator!=(const PointB &other) const
13032 {
13033 return m_opt != other.m_opt;
13034 }
13035
13037 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
13038 {
13039 return stream << value.toString();
13040 }
13041
13042 private:
13043 void setFromString(const std::string &value);
13044
13045 std::optional<Zivid::PointXYZ> m_opt;
13046
13047 friend struct DataModel::Detail::Befriend<PointB>;
13048 };
13049
13051
13052 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13054 {
13055 public:
13057 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13058
13060 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
13061
13063 static constexpr const char *name{ "PointO" };
13064
13066 static constexpr const char *description{
13067 R"description(The point at the intersection of two adjacent edges defining a parallelogram.)description"
13068 };
13069
13072
13074 PointO() = default;
13075
13077 explicit constexpr PointO(Zivid::PointXYZ value)
13078 : m_opt{ value }
13079 {}
13080
13086
13088 bool hasValue() const;
13089
13091 void reset();
13092
13094 std::string toString() const;
13095
13097 explicit constexpr PointO(float x, float y, float z)
13098 : PointO{ Zivid::PointXYZ{ x, y, z } }
13099 {}
13100
13102 bool operator==(const PointO &other) const
13103 {
13104 return m_opt == other.m_opt;
13105 }
13106
13108 bool operator!=(const PointO &other) const
13109 {
13110 return m_opt != other.m_opt;
13111 }
13112
13114 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
13115 {
13116 return stream << value.toString();
13117 }
13118
13119 private:
13120 void setFromString(const std::string &value);
13121
13122 std::optional<Zivid::PointXYZ> m_opt;
13123
13124 friend struct DataModel::Detail::Befriend<PointO>;
13125 };
13126
13127 using Descendants = std::tuple<
13133
13136
13152#ifndef NO_DOC
13153 template<
13154 typename... Args,
13155 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13156 typename std::enable_if<
13157 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13158 value,
13159 int>::type = 0>
13160#else
13161 template<typename... Args>
13162#endif
13163 explicit Box(Args &&...args)
13164 {
13165 using namespace Zivid::Detail::TypeTraits;
13166
13167 static_assert(
13168 AllArgsDecayedAreUnique<Args...>::value,
13169 "Found duplicate types among the arguments passed to Box(...). "
13170 "Types should be listed at most once.");
13171
13172 set(std::forward<Args>(args)...);
13173 }
13174
13189#ifndef NO_DOC
13190 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13191#else
13192 template<typename... Args>
13193#endif
13194 void set(Args &&...args)
13195 {
13196 using namespace Zivid::Detail::TypeTraits;
13197
13198 using AllArgsAreDescendantNodes =
13199 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13200 static_assert(
13201 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13202
13203 static_assert(
13204 AllArgsDecayedAreUnique<Args...>::value,
13205 "Found duplicate types among the arguments passed to set(...). "
13206 "Types should be listed at most once.");
13207
13208 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13209 }
13210
13226#ifndef NO_DOC
13227 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13228#else
13229 template<typename... Args>
13230#endif
13231 Box copyWith(Args &&...args) const
13232 {
13233 using namespace Zivid::Detail::TypeTraits;
13234
13235 using AllArgsAreDescendantNodes =
13236 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13237 static_assert(
13238 AllArgsAreDescendantNodes::value,
13239 "All arguments passed to copyWith(...) must be descendant nodes.");
13240
13241 static_assert(
13242 AllArgsDecayedAreUnique<Args...>::value,
13243 "Found duplicate types among the arguments passed to copyWith(...). "
13244 "Types should be listed at most once.");
13245
13246 auto copy{ *this };
13247 copy.set(std::forward<Args>(args)...);
13248 return copy;
13249 }
13250
13252 const Enabled &isEnabled() const
13253 {
13254 return m_enabled;
13255 }
13256
13259 {
13260 return m_enabled;
13261 }
13262
13264 Box &set(const Enabled &value)
13265 {
13266 m_enabled = value;
13267 return *this;
13268 }
13269
13271 const Extents &extents() const
13272 {
13273 return m_extents;
13274 }
13275
13278 {
13279 return m_extents;
13280 }
13281
13283 Box &set(const Extents &value)
13284 {
13285 m_extents = value;
13286 return *this;
13287 }
13288
13290 const PointA &pointA() const
13291 {
13292 return m_pointA;
13293 }
13294
13297 {
13298 return m_pointA;
13299 }
13300
13302 Box &set(const PointA &value)
13303 {
13304 m_pointA = value;
13305 return *this;
13306 }
13307
13309 const PointB &pointB() const
13310 {
13311 return m_pointB;
13312 }
13313
13316 {
13317 return m_pointB;
13318 }
13319
13321 Box &set(const PointB &value)
13322 {
13323 m_pointB = value;
13324 return *this;
13325 }
13326
13328 const PointO &pointO() const
13329 {
13330 return m_pointO;
13331 }
13332
13335 {
13336 return m_pointO;
13337 }
13338
13340 Box &set(const PointO &value)
13341 {
13342 m_pointO = value;
13343 return *this;
13344 }
13345
13346 template<
13347 typename T,
13348 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
13349 type = 0>
13351 {
13352 return m_enabled;
13353 }
13354
13355 template<
13356 typename T,
13357 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
13358 type = 0>
13360 {
13361 return m_extents;
13362 }
13363
13364 template<
13365 typename T,
13366 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13367 type = 0>
13369 {
13370 return m_pointA;
13371 }
13372
13373 template<
13374 typename T,
13375 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13376 type = 0>
13378 {
13379 return m_pointB;
13380 }
13381
13382 template<
13383 typename T,
13384 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13385 type = 0>
13387 {
13388 return m_pointO;
13389 }
13390
13391 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13393 {
13394 return m_enabled;
13395 }
13396
13397 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13399 {
13400 return m_extents;
13401 }
13402
13403 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13405 {
13406 return m_pointA;
13407 }
13408
13409 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13411 {
13412 return m_pointB;
13413 }
13414
13415 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13417 {
13418 return m_pointO;
13419 }
13420
13422 template<typename F>
13423 void forEach(const F &f) const
13424 {
13425 f(m_enabled);
13426 f(m_extents);
13427 f(m_pointA);
13428 f(m_pointB);
13429 f(m_pointO);
13430 }
13431
13433 template<typename F>
13434 void forEach(const F &f)
13435 {
13436 f(m_enabled);
13437 f(m_extents);
13438 f(m_pointA);
13439 f(m_pointB);
13440 f(m_pointO);
13441 }
13442
13444 bool operator==(const Box &other) const;
13445
13447 bool operator!=(const Box &other) const;
13448
13450 std::string toString() const;
13451
13453 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13454 {
13455 return stream << value.toString();
13456 }
13457
13458 private:
13459 void setFromString(const std::string &value);
13460
13461 void setFromString(const std::string &fullPath, const std::string &value);
13462
13463 std::string getString(const std::string &fullPath) const;
13464
13465 Enabled m_enabled;
13466 Extents m_extents;
13467 PointA m_pointA;
13468 PointB m_pointB;
13469 PointO m_pointO;
13470
13471 friend struct DataModel::Detail::Befriend<Box>;
13472 };
13473
13477
13478 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13480 {
13481 public:
13483 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13484
13486 static constexpr const char *path{ "RegionOfInterest/Depth" };
13487
13489 static constexpr const char *name{ "Depth" };
13490
13492 static constexpr const char *description{
13493 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13494falls above a given maximum or below a given minimum.
13495)description"
13496 };
13497
13499
13500 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13502 {
13503 public:
13505 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13506
13508 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13509
13511 static constexpr const char *name{ "Enabled" };
13512
13514 static constexpr const char *description{
13515 R"description(Enable or disable depth filter.)description"
13516 };
13517
13519 using ValueType = bool;
13520 static const Enabled yes;
13521 static const Enabled no;
13522
13524 static std::set<bool> validValues()
13525 {
13526 return { false, true };
13527 }
13528
13530 Enabled() = default;
13531
13533 explicit constexpr Enabled(bool value)
13534 : m_opt{ value }
13535 {}
13536
13541 bool value() const;
13542
13544 bool hasValue() const;
13545
13547 void reset();
13548
13550 std::string toString() const;
13551
13553 bool operator==(const Enabled &other) const
13554 {
13555 return m_opt == other.m_opt;
13556 }
13557
13559 bool operator!=(const Enabled &other) const
13560 {
13561 return m_opt != other.m_opt;
13562 }
13563
13565 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13566 {
13567 return stream << value.toString();
13568 }
13569
13570 private:
13571 void setFromString(const std::string &value);
13572
13573 std::optional<bool> m_opt;
13574
13575 friend struct DataModel::Detail::Befriend<Enabled>;
13576 };
13577
13579
13580 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13582 {
13583 public:
13585 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13586
13588 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13589
13591 static constexpr const char *name{ "Range" };
13592
13594 static constexpr const char *description{
13595 R"description(Specify the minimum and maximum Z value that will be included.)description"
13596 };
13597
13600
13602 Range() = default;
13603
13605 explicit constexpr Range(Zivid::Range<double> value)
13606 : m_opt{ value }
13607 {}
13608
13614
13616 bool hasValue() const;
13617
13619 void reset();
13620
13622 std::string toString() const;
13623
13625 explicit constexpr Range(double minValue, double maxValue)
13626 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13627 {}
13628
13630 bool operator==(const Range &other) const
13631 {
13632 return m_opt == other.m_opt;
13633 }
13634
13636 bool operator!=(const Range &other) const
13637 {
13638 return m_opt != other.m_opt;
13639 }
13640
13642 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13643 {
13644 return stream << value.toString();
13645 }
13646
13647 private:
13648 void setFromString(const std::string &value);
13649
13650 std::optional<Zivid::Range<double>> m_opt;
13651
13652 friend struct DataModel::Detail::Befriend<Range>;
13653 };
13654
13656 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13657
13660
13673#ifndef NO_DOC
13674 template<
13675 typename... Args,
13676 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13677 typename std::enable_if<
13678 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13679 value,
13680 int>::type = 0>
13681#else
13682 template<typename... Args>
13683#endif
13684 explicit Depth(Args &&...args)
13685 {
13686 using namespace Zivid::Detail::TypeTraits;
13687
13688 static_assert(
13689 AllArgsDecayedAreUnique<Args...>::value,
13690 "Found duplicate types among the arguments passed to Depth(...). "
13691 "Types should be listed at most once.");
13692
13693 set(std::forward<Args>(args)...);
13694 }
13695
13707#ifndef NO_DOC
13708 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13709#else
13710 template<typename... Args>
13711#endif
13712 void set(Args &&...args)
13713 {
13714 using namespace Zivid::Detail::TypeTraits;
13715
13716 using AllArgsAreDescendantNodes =
13717 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13718 static_assert(
13719 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13720
13721 static_assert(
13722 AllArgsDecayedAreUnique<Args...>::value,
13723 "Found duplicate types among the arguments passed to set(...). "
13724 "Types should be listed at most once.");
13725
13726 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13727 }
13728
13741#ifndef NO_DOC
13742 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13743#else
13744 template<typename... Args>
13745#endif
13746 Depth copyWith(Args &&...args) const
13747 {
13748 using namespace Zivid::Detail::TypeTraits;
13749
13750 using AllArgsAreDescendantNodes =
13751 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13752 static_assert(
13753 AllArgsAreDescendantNodes::value,
13754 "All arguments passed to copyWith(...) must be descendant nodes.");
13755
13756 static_assert(
13757 AllArgsDecayedAreUnique<Args...>::value,
13758 "Found duplicate types among the arguments passed to copyWith(...). "
13759 "Types should be listed at most once.");
13760
13761 auto copy{ *this };
13762 copy.set(std::forward<Args>(args)...);
13763 return copy;
13764 }
13765
13767 const Enabled &isEnabled() const
13768 {
13769 return m_enabled;
13770 }
13771
13774 {
13775 return m_enabled;
13776 }
13777
13779 Depth &set(const Enabled &value)
13780 {
13781 m_enabled = value;
13782 return *this;
13783 }
13784
13786 const Range &range() const
13787 {
13788 return m_range;
13789 }
13790
13793 {
13794 return m_range;
13795 }
13796
13798 Depth &set(const Range &value)
13799 {
13800 m_range = value;
13801 return *this;
13802 }
13803
13804 template<
13805 typename T,
13806 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13807 type = 0>
13809 {
13810 return m_enabled;
13811 }
13812
13813 template<
13814 typename T,
13815 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13816 type = 0>
13818 {
13819 return m_range;
13820 }
13821
13822 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13824 {
13825 return m_enabled;
13826 }
13827
13828 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13830 {
13831 return m_range;
13832 }
13833
13835 template<typename F>
13836 void forEach(const F &f) const
13837 {
13838 f(m_enabled);
13839 f(m_range);
13840 }
13841
13843 template<typename F>
13844 void forEach(const F &f)
13845 {
13846 f(m_enabled);
13847 f(m_range);
13848 }
13849
13851 bool operator==(const Depth &other) const;
13852
13854 bool operator!=(const Depth &other) const;
13855
13857 std::string toString() const;
13858
13860 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13861 {
13862 return stream << value.toString();
13863 }
13864
13865 private:
13866 void setFromString(const std::string &value);
13867
13868 void setFromString(const std::string &fullPath, const std::string &value);
13869
13870 std::string getString(const std::string &fullPath) const;
13871
13872 Enabled m_enabled;
13873 Range m_range;
13874
13875 friend struct DataModel::Detail::Befriend<Depth>;
13876 };
13877
13878 using Descendants = std::tuple<
13888
13891
13911#ifndef NO_DOC
13912 template<
13913 typename... Args,
13914 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13915 typename std::enable_if<
13916 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13917 value,
13918 int>::type = 0>
13919#else
13920 template<typename... Args>
13921#endif
13922 explicit RegionOfInterest(Args &&...args)
13923 {
13924 using namespace Zivid::Detail::TypeTraits;
13925
13926 static_assert(
13927 AllArgsDecayedAreUnique<Args...>::value,
13928 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13929 "Types should be listed at most once.");
13930
13931 set(std::forward<Args>(args)...);
13932 }
13933
13952#ifndef NO_DOC
13953 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13954#else
13955 template<typename... Args>
13956#endif
13957 void set(Args &&...args)
13958 {
13959 using namespace Zivid::Detail::TypeTraits;
13960
13961 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13962 static_assert(
13963 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13964
13965 static_assert(
13966 AllArgsDecayedAreUnique<Args...>::value,
13967 "Found duplicate types among the arguments passed to set(...). "
13968 "Types should be listed at most once.");
13969
13970 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13971 }
13972
13992#ifndef NO_DOC
13993 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13994#else
13995 template<typename... Args>
13996#endif
13997 RegionOfInterest copyWith(Args &&...args) const
13998 {
13999 using namespace Zivid::Detail::TypeTraits;
14000
14001 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14002 static_assert(
14003 AllArgsAreDescendantNodes::value,
14004 "All arguments passed to copyWith(...) must be descendant nodes.");
14005
14006 static_assert(
14007 AllArgsDecayedAreUnique<Args...>::value,
14008 "Found duplicate types among the arguments passed to copyWith(...). "
14009 "Types should be listed at most once.");
14010
14011 auto copy{ *this };
14012 copy.set(std::forward<Args>(args)...);
14013 return copy;
14014 }
14015
14017 const Box &box() const
14018 {
14019 return m_box;
14020 }
14021
14024 {
14025 return m_box;
14026 }
14027
14029 RegionOfInterest &set(const Box &value)
14030 {
14031 m_box = value;
14032 return *this;
14033 }
14034
14037 {
14038 m_box.set(value);
14039 return *this;
14040 }
14041
14044 {
14045 m_box.set(value);
14046 return *this;
14047 }
14048
14051 {
14052 m_box.set(value);
14053 return *this;
14054 }
14055
14058 {
14059 m_box.set(value);
14060 return *this;
14061 }
14062
14065 {
14066 m_box.set(value);
14067 return *this;
14068 }
14069
14071 const Depth &depth() const
14072 {
14073 return m_depth;
14074 }
14075
14078 {
14079 return m_depth;
14080 }
14081
14084 {
14085 m_depth = value;
14086 return *this;
14087 }
14088
14091 {
14092 m_depth.set(value);
14093 return *this;
14094 }
14095
14098 {
14099 m_depth.set(value);
14100 return *this;
14101 }
14102
14103 template<
14104 typename T,
14105 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
14107 {
14108 return m_box;
14109 }
14110
14111 template<
14112 typename T,
14113 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
14114 0>
14116 {
14117 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
14118 }
14119
14120 template<
14121 typename T,
14122 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
14123 0>
14125 {
14126 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
14127 }
14128
14129 template<
14130 typename T,
14131 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
14133 {
14134 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
14135 }
14136
14137 template<
14138 typename T,
14139 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
14141 {
14142 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
14143 }
14144
14145 template<
14146 typename T,
14147 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
14149 {
14150 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
14151 }
14152
14153 template<
14154 typename T,
14155 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
14157 {
14158 return m_depth;
14159 }
14160
14161 template<
14162 typename T,
14163 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
14164 0>
14166 {
14167 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
14168 }
14169
14170 template<
14171 typename T,
14172 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
14173 0>
14175 {
14176 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
14177 }
14178
14179 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14181 {
14182 return m_box;
14183 }
14184
14185 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14187 {
14188 return m_depth;
14189 }
14190
14192 template<typename F>
14193 void forEach(const F &f) const
14194 {
14195 f(m_box);
14196 f(m_depth);
14197 }
14198
14200 template<typename F>
14201 void forEach(const F &f)
14202 {
14203 f(m_box);
14204 f(m_depth);
14205 }
14206
14208 bool operator==(const RegionOfInterest &other) const;
14209
14211 bool operator!=(const RegionOfInterest &other) const;
14212
14214 std::string toString() const;
14215
14217 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
14218 {
14219 return stream << value.toString();
14220 }
14221
14222 private:
14223 void setFromString(const std::string &value);
14224
14225 void setFromString(const std::string &fullPath, const std::string &value);
14226
14227 std::string getString(const std::string &fullPath) const;
14228
14229 Box m_box;
14230 Depth m_depth;
14231
14232 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
14233 };
14234
14237
14238 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14240 {
14241 public:
14243 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
14244
14246 static constexpr const char *path{ "Sampling" };
14247
14249 static constexpr const char *name{ "Sampling" };
14250
14252 static constexpr const char *description{ R"description(Sampling settings.
14253)description" };
14254
14268
14269 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14271 {
14272 public:
14274 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14275
14277 static constexpr const char *path{ "Sampling/Color" };
14278
14280 static constexpr const char *name{ "Color" };
14281
14283 static constexpr const char *description{
14284 R"description(Choose how to sample colors for the point cloud. The `rgb` option gives a 2D image
14285with full colors. The `grayscale` option gives a grayscale (r=g=b) 2D image, which
14286can be acquired faster than full colors. The `disabled` option gives no colors and
14287can allow for even faster captures.
14288
14289The `grayscale` option is not available on all camera models.
14290
14291This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
14292version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
14293in the `Settings/Color` field. Tip: If you want to convert an existing settings.yml file to
14294the recommended API, you can import the .yml file into Zivid Studio and then re-export it to
14295.yml.
14296)description"
14297 };
14298
14300 enum class ValueType
14301 {
14302 rgb,
14303 disabled,
14304 grayscale
14305 };
14306 static const Color rgb;
14307 static const Color disabled;
14308 static const Color grayscale;
14309
14311 static std::set<ValueType> validValues()
14312 {
14313 return { ValueType::rgb, ValueType::disabled, ValueType::grayscale };
14314 }
14315
14317 Color() = default;
14318
14320 explicit constexpr Color(ValueType value)
14321 : m_opt{ verifyValue(value) }
14322 {}
14323
14329
14331 bool hasValue() const;
14332
14334 void reset();
14335
14337 std::string toString() const;
14338
14340 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
14341 {
14342 return stream << Color{ value }.toString();
14343 }
14344
14346 bool operator==(const Color &other) const
14347 {
14348 return m_opt == other.m_opt;
14349 }
14350
14352 bool operator!=(const Color &other) const
14353 {
14354 return m_opt != other.m_opt;
14355 }
14356
14358 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
14359 {
14360 return stream << value.toString();
14361 }
14362
14363 private:
14364 void setFromString(const std::string &value);
14365
14366 constexpr ValueType static verifyValue(const ValueType &value)
14367 {
14368 return value == ValueType::rgb || value == ValueType::disabled || value == ValueType::grayscale
14369 ? value
14370 : throw std::invalid_argument{
14371 "Invalid value: Color{ "
14372 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14373 };
14374 }
14375
14376 std::optional<ValueType> m_opt;
14377
14378 friend struct DataModel::Detail::Befriend<Color>;
14379 };
14380
14393
14394 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14396 {
14397 public:
14399 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14400
14402 static constexpr const char *path{ "Sampling/Pixel" };
14403
14405 static constexpr const char *name{ "Pixel" };
14406
14408 static constexpr const char *description{
14409 R"description(For Zivid 2/2+, this setting controls whether to read out the full image sensor and
14410use white projector light or to subsample pixels for specific color channels with
14411corresponding projector light. Picking a specific color channel can help reduce noise
14412and effects of ambient light - projecting blue light is recommended.
14413
14414For Zivid 2+R, the user does not have to set the projection color and should only
14415consider whether to scale the resolution `by2x2` or `by4x4`. Both of these modes
14416will boost the signal strength by about 4x compared to `all`, so the user should
14417consider a corresponding reduction in exposure time.
14418
14419Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.
14420)description"
14421 };
14422
14424 enum class ValueType
14425 {
14426 all,
14427 blueSubsample2x2,
14428 redSubsample2x2,
14429 blueSubsample4x4,
14430 redSubsample4x4,
14431 by2x2,
14432 by4x4
14433 };
14434 static const Pixel all;
14436 static const Pixel redSubsample2x2;
14438 static const Pixel redSubsample4x4;
14439 static const Pixel by2x2;
14440 static const Pixel by4x4;
14441
14443 static std::set<ValueType> validValues()
14444 {
14445 return { ValueType::all,
14446 ValueType::blueSubsample2x2,
14447 ValueType::redSubsample2x2,
14448 ValueType::blueSubsample4x4,
14449 ValueType::redSubsample4x4,
14450 ValueType::by2x2,
14451 ValueType::by4x4 };
14452 }
14453
14455 Pixel() = default;
14456
14458 explicit constexpr Pixel(ValueType value)
14459 : m_opt{ verifyValue(value) }
14460 {}
14461
14467
14469 bool hasValue() const;
14470
14472 void reset();
14473
14475 std::string toString() const;
14476
14478 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14479 {
14480 return stream << Pixel{ value }.toString();
14481 }
14482
14484 bool operator==(const Pixel &other) const
14485 {
14486 return m_opt == other.m_opt;
14487 }
14488
14490 bool operator!=(const Pixel &other) const
14491 {
14492 return m_opt != other.m_opt;
14493 }
14494
14496 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14497 {
14498 return stream << value.toString();
14499 }
14500
14501 private:
14502 void setFromString(const std::string &value);
14503
14504 constexpr ValueType static verifyValue(const ValueType &value)
14505 {
14506 return value == ValueType::all || value == ValueType::blueSubsample2x2
14507 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14508 || value == ValueType::redSubsample4x4 || value == ValueType::by2x2
14509 || value == ValueType::by4x4
14510 ? value
14511 : throw std::invalid_argument{
14512 "Invalid value: Pixel{ "
14513 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14514 };
14515 }
14516
14517 std::optional<ValueType> m_opt;
14518
14519 friend struct DataModel::Detail::Befriend<Pixel>;
14520 };
14521
14522 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14523
14526
14539#ifndef NO_DOC
14540 template<
14541 typename... Args,
14542 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14543 typename std::enable_if<
14544 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14545 value,
14546 int>::type = 0>
14547#else
14548 template<typename... Args>
14549#endif
14550 explicit Sampling(Args &&...args)
14551 {
14552 using namespace Zivid::Detail::TypeTraits;
14553
14554 static_assert(
14555 AllArgsDecayedAreUnique<Args...>::value,
14556 "Found duplicate types among the arguments passed to Sampling(...). "
14557 "Types should be listed at most once.");
14558
14559 set(std::forward<Args>(args)...);
14560 }
14561
14573#ifndef NO_DOC
14574 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14575#else
14576 template<typename... Args>
14577#endif
14578 void set(Args &&...args)
14579 {
14580 using namespace Zivid::Detail::TypeTraits;
14581
14582 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14583 static_assert(
14584 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14585
14586 static_assert(
14587 AllArgsDecayedAreUnique<Args...>::value,
14588 "Found duplicate types among the arguments passed to set(...). "
14589 "Types should be listed at most once.");
14590
14591 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14592 }
14593
14606#ifndef NO_DOC
14607 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14608#else
14609 template<typename... Args>
14610#endif
14611 Sampling copyWith(Args &&...args) const
14612 {
14613 using namespace Zivid::Detail::TypeTraits;
14614
14615 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14616 static_assert(
14617 AllArgsAreDescendantNodes::value,
14618 "All arguments passed to copyWith(...) must be descendant nodes.");
14619
14620 static_assert(
14621 AllArgsDecayedAreUnique<Args...>::value,
14622 "Found duplicate types among the arguments passed to copyWith(...). "
14623 "Types should be listed at most once.");
14624
14625 auto copy{ *this };
14626 copy.set(std::forward<Args>(args)...);
14627 return copy;
14628 }
14629
14631 const Color &color() const
14632 {
14633 return m_color;
14634 }
14635
14638 {
14639 return m_color;
14640 }
14641
14643 Sampling &set(const Color &value)
14644 {
14645 m_color = value;
14646 return *this;
14647 }
14648
14650 const Pixel &pixel() const
14651 {
14652 return m_pixel;
14653 }
14654
14657 {
14658 return m_pixel;
14659 }
14660
14662 Sampling &set(const Pixel &value)
14663 {
14664 m_pixel = value;
14665 return *this;
14666 }
14667
14668 template<
14669 typename T,
14670 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14672 {
14673 return m_color;
14674 }
14675
14676 template<
14677 typename T,
14678 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14680 {
14681 return m_pixel;
14682 }
14683
14684 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14686 {
14687 return m_color;
14688 }
14689
14690 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14692 {
14693 return m_pixel;
14694 }
14695
14697 template<typename F>
14698 void forEach(const F &f) const
14699 {
14700 f(m_color);
14701 f(m_pixel);
14702 }
14703
14705 template<typename F>
14706 void forEach(const F &f)
14707 {
14708 f(m_color);
14709 f(m_pixel);
14710 }
14711
14713 bool operator==(const Sampling &other) const;
14714
14716 bool operator!=(const Sampling &other) const;
14717
14719 std::string toString() const;
14720
14722 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14723 {
14724 return stream << value.toString();
14725 }
14726
14727 private:
14728 void setFromString(const std::string &value);
14729
14730 void setFromString(const std::string &fullPath, const std::string &value);
14731
14732 std::string getString(const std::string &fullPath) const;
14733
14734 Color m_color;
14735 Pixel m_pixel;
14736
14737 friend struct DataModel::Detail::Befriend<Sampling>;
14738 };
14739
14740 using Descendants = std::tuple<
14809
14812
14814 explicit Settings(const std::string &fileName);
14815
14821 [[nodiscard]] static Settings fromSerialized(const std::string &value);
14822
14828 std::string serialize() const;
14829
14908#ifndef NO_DOC
14909 template<
14910 typename... Args,
14911 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14912 typename std::enable_if<
14913 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14914 int>::type = 0>
14915#else
14916 template<typename... Args>
14917#endif
14918 explicit Settings(Args &&...args)
14919 {
14920 using namespace Zivid::Detail::TypeTraits;
14921
14922 static_assert(
14923 AllArgsDecayedAreUnique<Args...>::value,
14924 "Found duplicate types among the arguments passed to Settings(...). "
14925 "Types should be listed at most once.");
14926
14927 set(std::forward<Args>(args)...);
14928 }
14929
15007#ifndef NO_DOC
15008 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
15009#else
15010 template<typename... Args>
15011#endif
15012 void set(Args &&...args)
15013 {
15014 using namespace Zivid::Detail::TypeTraits;
15015
15016 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15017 static_assert(
15018 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
15019
15020 static_assert(
15021 AllArgsDecayedAreUnique<Args...>::value,
15022 "Found duplicate types among the arguments passed to set(...). "
15023 "Types should be listed at most once.");
15024
15025 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
15026 }
15027
15106#ifndef NO_DOC
15107 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
15108#else
15109 template<typename... Args>
15110#endif
15111 Settings copyWith(Args &&...args) const
15112 {
15113 using namespace Zivid::Detail::TypeTraits;
15114
15115 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15116 static_assert(
15117 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
15118
15119 static_assert(
15120 AllArgsDecayedAreUnique<Args...>::value,
15121 "Found duplicate types among the arguments passed to copyWith(...). "
15122 "Types should be listed at most once.");
15123
15124 auto copy{ *this };
15125 copy.set(std::forward<Args>(args)...);
15126 return copy;
15127 }
15128
15131 {
15132 return m_acquisitions;
15133 }
15134
15137 {
15138 return m_acquisitions;
15139 }
15140
15143 {
15144 m_acquisitions = value;
15145 return *this;
15146 }
15147
15149 const Color &color() const
15150 {
15151 return m_color;
15152 }
15153
15156 {
15157 return m_color;
15158 }
15159
15161 Settings &set(const Color &value)
15162 {
15163 m_color = value;
15164 return *this;
15165 }
15166
15169 {
15170 return m_diagnostics;
15171 }
15172
15175 {
15176 return m_diagnostics;
15177 }
15178
15180 Settings &set(const Diagnostics &value)
15181 {
15182 m_diagnostics = value;
15183 return *this;
15184 }
15185
15188 {
15189 m_diagnostics.set(value);
15190 return *this;
15191 }
15192
15194 const Engine &engine() const
15195 {
15196 return m_engine;
15197 }
15198
15201 {
15202 return m_engine;
15203 }
15204
15206 Settings &set(const Engine &value)
15207 {
15208 m_engine = value;
15209 return *this;
15210 }
15211
15213 const Processing &processing() const
15214 {
15215 return m_processing;
15216 }
15217
15220 {
15221 return m_processing;
15222 }
15223
15225 Settings &set(const Processing &value)
15226 {
15227 m_processing = value;
15228 return *this;
15229 }
15230
15233 {
15234 m_processing.set(value);
15235 return *this;
15236 }
15237
15240 {
15241 m_processing.set(value);
15242 return *this;
15243 }
15244
15247 {
15248 m_processing.set(value);
15249 return *this;
15250 }
15251
15254 {
15255 m_processing.set(value);
15256 return *this;
15257 }
15258
15261 {
15262 m_processing.set(value);
15263 return *this;
15264 }
15265
15268 {
15269 m_processing.set(value);
15270 return *this;
15271 }
15272
15275 {
15276 m_processing.set(value);
15277 return *this;
15278 }
15279
15282 {
15283 m_processing.set(value);
15284 return *this;
15285 }
15286
15289 {
15290 m_processing.set(value);
15291 return *this;
15292 }
15293
15296 {
15297 m_processing.set(value);
15298 return *this;
15299 }
15300
15303 {
15304 m_processing.set(value);
15305 return *this;
15306 }
15307
15310 {
15311 m_processing.set(value);
15312 return *this;
15313 }
15314
15317 {
15318 m_processing.set(value);
15319 return *this;
15320 }
15321
15324 {
15325 m_processing.set(value);
15326 return *this;
15327 }
15328
15331 {
15332 m_processing.set(value);
15333 return *this;
15334 }
15335
15338 {
15339 m_processing.set(value);
15340 return *this;
15341 }
15342
15345 {
15346 m_processing.set(value);
15347 return *this;
15348 }
15349
15352 {
15353 m_processing.set(value);
15354 return *this;
15355 }
15356
15359 {
15360 m_processing.set(value);
15361 return *this;
15362 }
15363
15366 {
15367 m_processing.set(value);
15368 return *this;
15369 }
15370
15373 {
15374 m_processing.set(value);
15375 return *this;
15376 }
15377
15380 {
15381 m_processing.set(value);
15382 return *this;
15383 }
15384
15387 {
15388 m_processing.set(value);
15389 return *this;
15390 }
15391
15394 {
15395 m_processing.set(value);
15396 return *this;
15397 }
15398
15401 {
15402 m_processing.set(value);
15403 return *this;
15404 }
15405
15408 {
15409 m_processing.set(value);
15410 return *this;
15411 }
15412
15415 {
15416 m_processing.set(value);
15417 return *this;
15418 }
15419
15422 {
15423 m_processing.set(value);
15424 return *this;
15425 }
15426
15429 {
15430 m_processing.set(value);
15431 return *this;
15432 }
15433
15436 {
15437 m_processing.set(value);
15438 return *this;
15439 }
15440
15443 {
15444 m_processing.set(value);
15445 return *this;
15446 }
15447
15450 {
15451 m_processing.set(value);
15452 return *this;
15453 }
15454
15457 {
15458 m_processing.set(value);
15459 return *this;
15460 }
15461
15464 {
15465 m_processing.set(value);
15466 return *this;
15467 }
15468
15471 {
15472 m_processing.set(value);
15473 return *this;
15474 }
15475
15478 {
15479 m_processing.set(value);
15480 return *this;
15481 }
15482
15485 {
15486 m_processing.set(value);
15487 return *this;
15488 }
15489
15492 {
15493 m_processing.set(value);
15494 return *this;
15495 }
15496
15499 {
15500 m_processing.set(value);
15501 return *this;
15502 }
15503
15506 {
15507 m_processing.set(value);
15508 return *this;
15509 }
15510
15513 {
15514 m_processing.set(value);
15515 return *this;
15516 }
15517
15520 {
15521 m_processing.set(value);
15522 return *this;
15523 }
15524
15527 {
15528 m_processing.set(value);
15529 return *this;
15530 }
15531
15534 {
15535 m_processing.set(value);
15536 return *this;
15537 }
15538
15541 {
15542 m_processing.set(value);
15543 return *this;
15544 }
15545
15548 {
15549 m_processing.set(value);
15550 return *this;
15551 }
15552
15555 {
15556 m_processing.set(value);
15557 return *this;
15558 }
15559
15562 {
15563 m_processing.set(value);
15564 return *this;
15565 }
15566
15569 {
15570 m_processing.set(value);
15571 return *this;
15572 }
15573
15576 {
15577 return m_regionOfInterest;
15578 }
15579
15582 {
15583 return m_regionOfInterest;
15584 }
15585
15588 {
15589 m_regionOfInterest = value;
15590 return *this;
15591 }
15592
15595 {
15596 m_regionOfInterest.set(value);
15597 return *this;
15598 }
15599
15602 {
15603 m_regionOfInterest.set(value);
15604 return *this;
15605 }
15606
15609 {
15610 m_regionOfInterest.set(value);
15611 return *this;
15612 }
15613
15616 {
15617 m_regionOfInterest.set(value);
15618 return *this;
15619 }
15620
15623 {
15624 m_regionOfInterest.set(value);
15625 return *this;
15626 }
15627
15630 {
15631 m_regionOfInterest.set(value);
15632 return *this;
15633 }
15634
15637 {
15638 m_regionOfInterest.set(value);
15639 return *this;
15640 }
15641
15644 {
15645 m_regionOfInterest.set(value);
15646 return *this;
15647 }
15648
15651 {
15652 m_regionOfInterest.set(value);
15653 return *this;
15654 }
15655
15657 const Sampling &sampling() const
15658 {
15659 return m_sampling;
15660 }
15661
15664 {
15665 return m_sampling;
15666 }
15667
15669 Settings &set(const Sampling &value)
15670 {
15671 m_sampling = value;
15672 return *this;
15673 }
15674
15677 {
15678 m_sampling.set(value);
15679 return *this;
15680 }
15681
15684 {
15685 m_sampling.set(value);
15686 return *this;
15687 }
15688
15689 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15691 {
15692 return m_acquisitions;
15693 }
15694
15695 template<typename T, typename std::enable_if<std::is_same<T, Settings::Color>::value, int>::type = 0>
15696 const Settings::Color &get() const
15697 {
15698 return m_color;
15699 }
15700
15701 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15703 {
15704 return m_diagnostics;
15705 }
15706
15707 template<
15708 typename T,
15709 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15711 {
15712 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15713 }
15714
15715 template<typename T, typename std::enable_if<std::is_same<T, Settings::Engine>::value, int>::type = 0>
15716 const Settings::Engine &get() const
15717 {
15718 return m_engine;
15719 }
15720
15721 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15723 {
15724 return m_processing;
15725 }
15726
15727 template<
15728 typename T,
15729 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15731 {
15732 return m_processing.get<Settings::Processing::Color>();
15733 }
15734
15735 template<
15736 typename T,
15737 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15739 {
15740 return m_processing.get<Settings::Processing::Color::Balance>();
15741 }
15742
15743 template<
15744 typename T,
15745 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15747 {
15748 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15749 }
15750
15751 template<
15752 typename T,
15753 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15755 {
15756 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15757 }
15758
15759 template<
15760 typename T,
15761 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15763 {
15764 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15765 }
15766
15767 template<
15768 typename T,
15769 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15771 {
15772 return m_processing.get<Settings::Processing::Color::Experimental>();
15773 }
15774
15775 template<
15776 typename T,
15777 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15778 type = 0>
15780 {
15781 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15782 }
15783
15784 template<
15785 typename T,
15786 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15788 {
15789 return m_processing.get<Settings::Processing::Color::Gamma>();
15790 }
15791
15792 template<
15793 typename T,
15794 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15796 {
15797 return m_processing.get<Settings::Processing::Filters>();
15798 }
15799
15800 template<
15801 typename T,
15802 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15804 {
15805 return m_processing.get<Settings::Processing::Filters::Cluster>();
15806 }
15807
15808 template<
15809 typename T,
15810 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15811 type = 0>
15813 {
15815 }
15816
15817 template<
15818 typename T,
15819 typename std::enable_if<
15820 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::Enabled>::value,
15821 int>::type = 0>
15823 {
15825 }
15826
15827 template<
15828 typename T,
15829 typename std::enable_if<
15830 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance>::value,
15831 int>::type = 0>
15833 {
15835 }
15836
15837 template<
15838 typename T,
15839 typename std::enable_if<
15840 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15841 int>::type = 0>
15843 {
15845 }
15846
15847 template<
15848 typename T,
15849 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15851 {
15852 return m_processing.get<Settings::Processing::Filters::Experimental>();
15853 }
15854
15855 template<
15856 typename T,
15857 typename std::enable_if<
15858 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
15859 int>::type = 0>
15861 {
15863 }
15864
15865 template<
15866 typename T,
15867 typename std::enable_if<
15868 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
15869 int>::type = 0>
15871 {
15873 }
15874
15875 template<
15876 typename T,
15877 typename std::enable_if<
15878 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15879 value,
15880 int>::type = 0>
15882 {
15883 return m_processing
15885 }
15886
15887 template<
15888 typename T,
15889 typename std::enable_if<
15890 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15891 value,
15892 int>::type = 0>
15894 {
15895 return m_processing
15897 }
15898
15899 template<
15900 typename T,
15901 typename std::enable_if<
15902 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15903 int>::type = 0>
15905 {
15907 }
15908
15909 template<
15910 typename T,
15911 typename std::enable_if<
15912 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15913 value,
15914 int>::type = 0>
15916 {
15917 return m_processing
15919 }
15920
15921 template<
15922 typename T,
15923 typename std::enable_if<
15924 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15925 value,
15926 int>::type = 0>
15928 {
15929 return m_processing
15931 }
15932
15933 template<
15934 typename T,
15935 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
15937 {
15938 return m_processing.get<Settings::Processing::Filters::Hole>();
15939 }
15940
15941 template<
15942 typename T,
15943 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::type = 0>
15945 {
15946 return m_processing.get<Settings::Processing::Filters::Hole::Repair>();
15947 }
15948
15949 template<
15950 typename T,
15951 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value, int>::
15952 type = 0>
15954 {
15956 }
15957
15958 template<
15959 typename T,
15960 typename std::
15961 enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value, int>::type = 0>
15963 {
15965 }
15966
15967 template<
15968 typename T,
15969 typename std::enable_if<
15970 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
15971 int>::type = 0>
15973 {
15975 }
15976
15977 template<
15978 typename T,
15979 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15981 {
15982 return m_processing.get<Settings::Processing::Filters::Noise>();
15983 }
15984
15985 template<
15986 typename T,
15987 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15988 0>
15990 {
15992 }
15993
15994 template<
15995 typename T,
15996 typename std::enable_if<
15997 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
15998 int>::type = 0>
16000 {
16002 }
16003
16004 template<
16005 typename T,
16006 typename std::enable_if<
16007 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
16008 int>::type = 0>
16010 {
16012 }
16013
16014 template<
16015 typename T,
16016 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
16017 0>
16019 {
16021 }
16022
16023 template<
16024 typename T,
16025 typename std::
16026 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
16028 {
16030 }
16031
16032 template<
16033 typename T,
16034 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
16035 type = 0>
16037 {
16039 }
16040
16041 template<
16042 typename T,
16043 typename std::enable_if<
16044 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
16045 int>::type = 0>
16047 {
16049 }
16050
16051 template<
16052 typename T,
16053 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
16055 {
16056 return m_processing.get<Settings::Processing::Filters::Outlier>();
16057 }
16058
16059 template<
16060 typename T,
16061 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
16062 type = 0>
16064 {
16066 }
16067
16068 template<
16069 typename T,
16070 typename std::enable_if<
16071 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
16072 int>::type = 0>
16074 {
16076 }
16077
16078 template<
16079 typename T,
16080 typename std::enable_if<
16081 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
16082 int>::type = 0>
16084 {
16086 }
16087
16088 template<
16089 typename T,
16090 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
16092 {
16093 return m_processing.get<Settings::Processing::Filters::Reflection>();
16094 }
16095
16096 template<
16097 typename T,
16098 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
16099 type = 0>
16101 {
16103 }
16104
16105 template<
16106 typename T,
16107 typename std::enable_if<
16108 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
16109 int>::type = 0>
16111 {
16113 }
16114
16115 template<
16116 typename T,
16117 typename std::enable_if<
16118 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
16119 int>::type = 0>
16121 {
16123 }
16124
16125 template<
16126 typename T,
16127 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
16129 {
16130 return m_processing.get<Settings::Processing::Filters::Smoothing>();
16131 }
16132
16133 template<
16134 typename T,
16135 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
16136 type = 0>
16138 {
16140 }
16141
16142 template<
16143 typename T,
16144 typename std::enable_if<
16145 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
16146 int>::type = 0>
16148 {
16150 }
16151
16152 template<
16153 typename T,
16154 typename std::enable_if<
16155 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
16156 int>::type = 0>
16158 {
16160 }
16161
16162 template<
16163 typename T,
16164 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
16166 {
16167 return m_processing.get<Settings::Processing::Resampling>();
16168 }
16169
16170 template<
16171 typename T,
16172 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
16174 {
16175 return m_processing.get<Settings::Processing::Resampling::Mode>();
16176 }
16177
16178 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
16180 {
16181 return m_regionOfInterest;
16182 }
16183
16184 template<
16185 typename T,
16186 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
16188 {
16189 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
16190 }
16191
16192 template<
16193 typename T,
16194 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
16196 {
16197 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
16198 }
16199
16200 template<
16201 typename T,
16202 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
16204 {
16205 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
16206 }
16207
16208 template<
16209 typename T,
16210 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
16212 {
16213 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
16214 }
16215
16216 template<
16217 typename T,
16218 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
16220 {
16221 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
16222 }
16223
16224 template<
16225 typename T,
16226 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
16228 {
16229 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
16230 }
16231
16232 template<
16233 typename T,
16234 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
16236 {
16237 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
16238 }
16239
16240 template<
16241 typename T,
16242 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
16244 {
16245 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
16246 }
16247
16248 template<
16249 typename T,
16250 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
16252 {
16253 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
16254 }
16255
16256 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
16258 {
16259 return m_sampling;
16260 }
16261
16262 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
16264 {
16265 return m_sampling.get<Settings::Sampling::Color>();
16266 }
16267
16268 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
16270 {
16271 return m_sampling.get<Settings::Sampling::Pixel>();
16272 }
16273
16274 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
16276 {
16277 return m_acquisitions;
16278 }
16279
16280 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
16281 const Settings::Color &get() const
16282 {
16283 return m_color;
16284 }
16285
16286 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
16288 {
16289 return m_diagnostics;
16290 }
16291
16292 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
16293 const Settings::Engine &get() const
16294 {
16295 return m_engine;
16296 }
16297
16298 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
16300 {
16301 return m_processing;
16302 }
16303
16304 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
16306 {
16307 return m_regionOfInterest;
16308 }
16309
16310 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
16312 {
16313 return m_sampling;
16314 }
16315
16317 template<typename F>
16318 void forEach(const F &f) const
16319 {
16320 f(m_acquisitions);
16321 f(m_color);
16322 f(m_diagnostics);
16323 f(m_engine);
16324 f(m_processing);
16325 f(m_regionOfInterest);
16326 f(m_sampling);
16327 }
16328
16330 template<typename F>
16331 void forEach(const F &f)
16332 {
16333 f(m_acquisitions);
16334 f(m_color);
16335 f(m_diagnostics);
16336 f(m_engine);
16337 f(m_processing);
16338 f(m_regionOfInterest);
16339 f(m_sampling);
16340 }
16341
16343 bool operator==(const Settings &other) const;
16344
16346 bool operator!=(const Settings &other) const;
16347
16349 std::string toString() const;
16350
16352 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
16353 {
16354 return stream << value.toString();
16355 }
16356
16358 void save(const std::string &fileName) const;
16359
16361 void load(const std::string &fileName);
16362
16363 private:
16364 void setFromString(const std::string &value);
16365
16366 void setFromString(const std::string &fullPath, const std::string &value);
16367
16368 std::string getString(const std::string &fullPath) const;
16369
16370 Acquisitions m_acquisitions;
16371 Color m_color;
16372 Diagnostics m_diagnostics;
16373 Engine m_engine;
16374 Processing m_processing;
16375 RegionOfInterest m_regionOfInterest;
16376 Sampling m_sampling;
16377
16378 friend struct DataModel::Detail::Befriend<Settings>;
16379 };
16380
16381#ifndef NO_DOC
16382 template<>
16383 struct Settings::Version<27>
16384 {
16385 using Type = Settings;
16386 };
16387#endif
16388
16389} // namespace Zivid
16390
16391#ifndef NO_DOC
16393namespace Zivid::Detail
16394{
16395
16396 ZIVID_CORE_EXPORT void save(const Zivid::Settings &dataModel, std::ostream &ostream);
16397 ZIVID_CORE_EXPORT void load(Zivid::Settings &dataModel, std::istream &istream);
16398
16399 ZIVID_CORE_EXPORT std::vector<uint8_t> serializeToBinaryVector(const Zivid::Settings &source);
16400 ZIVID_CORE_EXPORT void deserializeFromBinaryVector(Zivid::Settings &dest, const std::vector<uint8_t> &data);
16401
16402} // namespace Zivid::Detail
16403#endif
16404
16405#ifdef _MSC_VER
16406# pragma warning(pop)
16407#endif
16408
16409#ifndef NO_DOC
16410# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
16411namespace std // NOLINT
16412{
16413
16414 template<>
16415 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
16416 {};
16417
16418 template<size_t i>
16419 struct tuple_element<i, Zivid::Settings::Diagnostics>
16420 {
16421 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
16422
16423 using type // NOLINT
16424 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
16425 };
16426
16427 template<>
16428 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 3>
16429 {};
16430
16431 template<size_t i>
16432 struct tuple_element<i, Zivid::Settings::Processing>
16433 {
16434 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 3");
16435
16436 using type // NOLINT
16437 = decltype(declval<Zivid::Settings::Processing>().get<i>());
16438 };
16439
16440 template<>
16441 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
16442 {};
16443
16444 template<size_t i>
16445 struct tuple_element<i, Zivid::Settings::Processing::Color>
16446 {
16447 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
16448
16449 using type // NOLINT
16450 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
16451 };
16452
16453 template<>
16454 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16455 {};
16456
16457 template<size_t i>
16458 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16459 {
16460 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16461
16462 using type // NOLINT
16463 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16464 };
16465
16466 template<>
16467 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16468 {};
16469
16470 template<size_t i>
16471 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16472 {
16473 static_assert(
16474 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16475 "Index must be less than 1");
16476
16477 using type // NOLINT
16478 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16479 };
16480
16481 template<>
16482 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 7>
16483 {};
16484
16485 template<size_t i>
16486 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16487 {
16488 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 7");
16489
16490 using type // NOLINT
16491 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16492 };
16493
16494 template<>
16495 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16496 {};
16497
16498 template<size_t i>
16499 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16500 {
16501 static_assert(
16502 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16503 "Index must be less than 1");
16504
16505 using type // NOLINT
16506 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16507 };
16508
16509 template<>
16510 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16511 {};
16512
16513 template<size_t i>
16514 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16515 {
16516 static_assert(
16517 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16518 "Index must be less than 3");
16519
16520 using type // NOLINT
16521 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16522 };
16523
16524 template<>
16525 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
16526 {};
16527
16528 template<size_t i>
16529 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16530 {
16531 static_assert(
16532 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16533 "Index must be less than 1");
16534
16535 using type // NOLINT
16536 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16537 };
16538
16539 template<>
16540 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16541 : integral_constant<size_t, 2>
16542 {};
16543
16544 template<size_t i>
16545 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16546 {
16547 static_assert(
16548 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16549 "Index must be less than 2");
16550
16551 using type // NOLINT
16552 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16553 };
16554
16555 template<>
16556 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16557 : integral_constant<size_t, 2>
16558 {};
16559
16560 template<size_t i>
16561 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16562 {
16563 static_assert(
16564 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16565 "Index must be less than 2");
16566
16567 using type // NOLINT
16568 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16569 .get<i>());
16570 };
16571
16572 template<>
16573 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16574 : integral_constant<size_t, 2>
16575 {};
16576
16577 template<size_t i>
16578 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16579 {
16580 static_assert(
16581 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16582 "Index must be less than 2");
16583
16584 using type // NOLINT
16585 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16586 .get<i>());
16587 };
16588
16589 template<>
16590 struct tuple_size<Zivid::Settings::Processing::Filters::Hole> : integral_constant<size_t, 1>
16591 {};
16592
16593 template<size_t i>
16594 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole>
16595 {
16596 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Hole>::value, "Index must be less than 1");
16597
16598 using type // NOLINT
16599 = decltype(declval<Zivid::Settings::Processing::Filters::Hole>().get<i>());
16600 };
16601
16602 template<>
16603 struct tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair> : integral_constant<size_t, 3>
16604 {};
16605
16606 template<size_t i>
16607 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole::Repair>
16608 {
16609 static_assert(
16610 i < tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair>::value,
16611 "Index must be less than 3");
16612
16613 using type // NOLINT
16614 = decltype(declval<Zivid::Settings::Processing::Filters::Hole::Repair>().get<i>());
16615 };
16616
16617 template<>
16618 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16619 {};
16620
16621 template<size_t i>
16622 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16623 {
16624 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16625
16626 using type // NOLINT
16627 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16628 };
16629
16630 template<>
16631 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16632 {};
16633
16634 template<size_t i>
16635 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16636 {
16637 static_assert(
16638 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16639 "Index must be less than 2");
16640
16641 using type // NOLINT
16642 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16643 };
16644
16645 template<>
16646 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16647 {};
16648
16649 template<size_t i>
16650 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16651 {
16652 static_assert(
16653 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16654 "Index must be less than 1");
16655
16656 using type // NOLINT
16657 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16658 };
16659
16660 template<>
16661 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16662 {};
16663
16664 template<size_t i>
16665 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16666 {
16667 static_assert(
16668 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16669 "Index must be less than 1");
16670
16671 using type // NOLINT
16672 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16673 };
16674
16675 template<>
16676 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16677 {};
16678
16679 template<size_t i>
16680 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16681 {
16682 static_assert(
16683 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16684 "Index must be less than 1");
16685
16686 using type // NOLINT
16687 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16688 };
16689
16690 template<>
16691 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16692 {};
16693
16694 template<size_t i>
16695 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16696 {
16697 static_assert(
16698 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16699 "Index must be less than 2");
16700
16701 using type // NOLINT
16702 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16703 };
16704
16705 template<>
16706 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16707 {};
16708
16709 template<size_t i>
16710 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16711 {
16712 static_assert(
16713 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16714 "Index must be less than 1");
16715
16716 using type // NOLINT
16717 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16718 };
16719
16720 template<>
16721 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16722 {};
16723
16724 template<size_t i>
16725 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16726 {
16727 static_assert(
16728 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16729 "Index must be less than 2");
16730
16731 using type // NOLINT
16732 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16733 };
16734
16735 template<>
16736 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16737 {};
16738
16739 template<size_t i>
16740 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16741 {
16742 static_assert(
16743 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16744 "Index must be less than 1");
16745
16746 using type // NOLINT
16747 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16748 };
16749
16750 template<>
16751 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16752 {};
16753
16754 template<size_t i>
16755 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16756 {
16757 static_assert(
16758 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16759 "Index must be less than 2");
16760
16761 using type // NOLINT
16762 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16763 };
16764
16765 template<>
16766 struct tuple_size<Zivid::Settings::Processing::Resampling> : integral_constant<size_t, 1>
16767 {};
16768
16769 template<size_t i>
16770 struct tuple_element<i, Zivid::Settings::Processing::Resampling>
16771 {
16772 static_assert(i < tuple_size<Zivid::Settings::Processing::Resampling>::value, "Index must be less than 1");
16773
16774 using type // NOLINT
16775 = decltype(declval<Zivid::Settings::Processing::Resampling>().get<i>());
16776 };
16777
16778 template<>
16779 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16780 {};
16781
16782 template<size_t i>
16783 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16784 {
16785 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16786
16787 using type // NOLINT
16788 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16789 };
16790
16791 template<>
16792 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16793 {};
16794
16795 template<size_t i>
16796 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16797 {
16798 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16799
16800 using type // NOLINT
16801 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16802 };
16803
16804 template<>
16805 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16806 {};
16807
16808 template<size_t i>
16809 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16810 {
16811 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16812
16813 using type // NOLINT
16814 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16815 };
16816
16817 template<>
16818 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16819 {};
16820
16821 template<size_t i>
16822 struct tuple_element<i, Zivid::Settings::Sampling>
16823 {
16824 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16825
16826 using type // NOLINT
16827 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16828 };
16829
16830 template<>
16831 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 7>
16832 {};
16833
16834 template<size_t i>
16835 struct tuple_element<i, Zivid::Settings>
16836 {
16837 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 7");
16838
16839 using type // NOLINT
16840 = decltype(declval<Zivid::Settings>().get<i>());
16841 };
16842
16843} // namespace std
16844# endif
16845#endif
16846
16847// If we have access to the DataModel library, automatically include internal DataModel
16848// header. This header is necessary for serialization and deserialization.
16849#if defined(__has_include) && !defined(NO_DOC)
16850# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16851# include "Zivid/SettingsInternal.h"
16852# endif
16853#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:1490
std::string toString() const
Get the value as string.
bool operator==(const Engine &other) const
Comparison operator.
Definition Settings.h:1575
bool operator!=(const Engine &other) const
Comparison operator.
Definition Settings.h:1581
static const Engine omni
omni
Definition Settings.h:1536
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream.
Definition Settings.h:1587
static const Engine sage
sage
Definition Settings.h:1537
static std::set< ValueType > validValues()
All valid values of Engine.
Definition Settings.h:1540
void reset()
Reset the node to unset state.
ValueType value() const
Get the value.
static const Engine stripe
stripe
Definition Settings.h:1535
static const Engine phase
phase
Definition Settings.h:1534
Engine()=default
Default constructor.
ValueType
The type of the underlying value.
Definition Settings.h:1528
constexpr Engine(ValueType value)
Constructor.
Definition Settings.h:1549
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:1569
Digital gain applied to blue channel.
Definition Settings.h:1690
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream.
Definition Settings.h:1780
void reset()
Reset the node to unset state.
bool operator==(const Blue &other) const
Comparison operator.
Definition Settings.h:1744
bool operator>=(const Blue &other) const
Comparison operator.
Definition Settings.h:1774
std::string toString() const
Get the value as string.
bool operator<(const Blue &other) const
Comparison operator.
Definition Settings.h:1756
constexpr Blue(double value)
Constructor.
Definition Settings.h:1724
bool operator<=(const Blue &other) const
Comparison operator.
Definition Settings.h:1768
bool operator!=(const Blue &other) const
Comparison operator.
Definition Settings.h:1750
bool hasValue() const
Check if the value is set.
double ValueType
The type of the underlying value.
Definition Settings.h:1712
bool operator>(const Blue &other) const
Comparison operator.
Definition Settings.h:1762
static constexpr Range< double > validRange()
The range of valid values for Blue.
Definition Settings.h:1715
Digital gain applied to green channel.
Definition Settings.h:1814
void reset()
Reset the node to unset state.
bool operator>(const Green &other) const
Comparison operator.
Definition Settings.h:1886
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:1904
double ValueType
The type of the underlying value.
Definition Settings.h:1836
bool operator>=(const Green &other) const
Comparison operator.
Definition Settings.h:1898
constexpr Green(double value)
Constructor.
Definition Settings.h:1848
bool operator==(const Green &other) const
Comparison operator.
Definition Settings.h:1868
bool operator!=(const Green &other) const
Comparison operator.
Definition Settings.h:1874
std::string toString() const
Get the value as string.
bool operator<(const Green &other) const
Comparison operator.
Definition Settings.h:1880
static constexpr Range< double > validRange()
The range of valid values for Green.
Definition Settings.h:1839
bool operator<=(const Green &other) const
Comparison operator.
Definition Settings.h:1892
Digital gain applied to red channel.
Definition Settings.h:1938
bool operator!=(const Red &other) const
Comparison operator.
Definition Settings.h:1998
constexpr Red(double value)
Constructor.
Definition Settings.h:1972
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream.
Definition Settings.h:2028
bool operator>=(const Red &other) const
Comparison operator.
Definition Settings.h:2022
double ValueType
The type of the underlying value.
Definition Settings.h:1960
static constexpr Range< double > validRange()
The range of valid values for Red.
Definition Settings.h:1963
bool operator==(const Red &other) const
Comparison operator.
Definition Settings.h:1992
bool operator<(const Red &other) const
Comparison operator.
Definition Settings.h:2004
void reset()
Reset the node to unset state.
bool operator>(const Red &other) const
Comparison operator.
Definition Settings.h:2010
bool hasValue() const
Check if the value is set.
bool operator<=(const Red &other) const
Comparison operator.
Definition Settings.h:2016
std::string toString() const
Get the value as string.
Color balance settings.
Definition Settings.h:1665
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2112
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:2274
bool operator!=(const Balance &other) const
Inequality operator.
Balance & set(const Red &value)
Set Red.
Definition Settings.h:2219
Green & green()
Get Green.
Definition Settings.h:2194
std::string toString() const
Get the value as string.
Red & red()
Get Red.
Definition Settings.h:2213
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition Settings.h:2051
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:2148
Balance & set(const Blue &value)
Set Blue.
Definition Settings.h:2181
Blue & blue()
Get Blue.
Definition Settings.h:2175
const Red & red() const
Get Red.
Definition Settings.h:2207
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2283
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:2240
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:2249
Balance & set(const Green &value)
Set Green.
Definition Settings.h:2200
const Green & green() const
Get Green.
Definition Settings.h:2188
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream.
Definition Settings.h:2300
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:2230
const Blue & blue() const
Get Blue.
Definition Settings.h:2169
This setting controls how the color image is computed.
Definition Settings.h:2370
static const Mode toneMapping
toneMapping
Definition Settings.h:2422
std::string toString() const
Get the value as string.
static const Mode automatic
automatic
Definition Settings.h:2420
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:2472
void reset()
Reset the node to unset state.
static const Mode useFirstAcquisition
useFirstAcquisition
Definition Settings.h:2421
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:2466
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:2460
ValueType
The type of the underlying value.
Definition Settings.h:2415
bool hasValue() const
Check if the value is set.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:2434
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:2425
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:2454
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition Settings.h:2323
std::tuple< Settings::Processing::Color::Experimental::Mode > Descendants
Definition Settings.h:2497
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:2664
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:2649
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2551
std::string toString() const
Get the value as string.
Experimental & set(const Mode &value)
Set Mode.
Definition Settings.h:2618
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:2642
bool operator==(const Experimental &other) const
Equality operator.
Mode & mode()
Get Mode.
Definition Settings.h:2612
const Mode & mode() const
Get Mode.
Definition Settings.h:2606
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:2629
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:2585
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition Settings.h:2693
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream.
Definition Settings.h:2786
double value() const
Get the value.
bool operator>(const Gamma &other) const
Comparison operator.
Definition Settings.h:2768
void reset()
Reset the node to unset state.
static constexpr Range< double > validRange()
The range of valid values for Gamma.
Definition Settings.h:2721
Gamma()=default
Default constructor.
double ValueType
The type of the underlying value.
Definition Settings.h:2718
bool hasValue() const
Check if the value is set.
bool operator>=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2780
constexpr Gamma(double value)
Constructor.
Definition Settings.h:2730
bool operator!=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2756
bool operator<(const Gamma &other) const
Comparison operator.
Definition Settings.h:2762
std::string toString() const
Get the value as string.
bool operator==(const Gamma &other) const
Comparison operator.
Definition Settings.h:2750
bool operator<=(const Gamma &other) const
Comparison operator.
Definition Settings.h:2774
Color settings.
Definition Settings.h:1641
Color & set(const Gamma &value)
Set Gamma.
Definition Settings.h:3019
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:3083
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:3056
bool operator==(const Color &other) const
Equality operator.
Color & set(const Experimental::Mode &value)
Set Experimental::Mode.
Definition Settings.h:3000
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:3047
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:2881
Color & set(const Experimental &value)
Set Experimental.
Definition Settings.h:2993
Color & set(const Balance &value)
Set Balance.
Definition Settings.h:2953
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream.
Definition Settings.h:3134
const Balance & balance() const
Get Balance.
Definition Settings.h:2941
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:2981
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3117
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:3065
Color & set(const Balance::Green &value)
Set Balance::Green.
Definition Settings.h:2967
Experimental & experimental()
Get Experimental.
Definition Settings.h:2987
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:2808
Color & set(const Balance::Blue &value)
Set Balance::Blue.
Definition Settings.h:2960
Gamma & gamma()
Get Gamma.
Definition Settings.h:3013
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:2920
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:3075
Color & set(const Balance::Red &value)
Set Balance::Red.
Definition Settings.h:2974
const Gamma & gamma() const
Get Gamma.
Definition Settings.h:3007
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:3029
Balance & balance()
Get Balance.
Definition Settings.h:2947
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:3108
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:3038
Enable or disable cluster removal.
Definition Settings.h:3215
bool ValueType
The type of the underlying value.
Definition Settings.h:3232
static const Enabled no
Off/disabled.
Definition Settings.h:3234
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:3246
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:3237
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:3272
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:3278
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:3266
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:3233
Maximum normalized distance between neighboring points that are still classified as belonging to the ...
Definition Settings.h:3298
constexpr MaxNeighborDistance(double value)
Constructor.
Definition Settings.h:3332
bool operator!=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3358
double ValueType
The type of the underlying value.
Definition Settings.h:3320
bool operator>=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3382
bool operator<(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3364
static constexpr Range< double > validRange()
The range of valid values for MaxNeighborDistance.
Definition Settings.h:3323
bool operator<=(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3376
friend std::ostream & operator<<(std::ostream &stream, const MaxNeighborDistance &value)
Operator to serialize the value to a stream.
Definition Settings.h:3388
bool operator==(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3352
bool operator>(const MaxNeighborDistance &other) const
Comparison operator.
Definition Settings.h:3370
Clusters with area below this threshold are removed by the filter. The area is given in mm^2.
Definition Settings.h:3417
bool operator>=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3498
double ValueType
The type of the underlying value.
Definition Settings.h:3436
friend std::ostream & operator<<(std::ostream &stream, const MinArea &value)
Operator to serialize the value to a stream.
Definition Settings.h:3504
bool operator<(const MinArea &other) const
Comparison operator.
Definition Settings.h:3480
bool operator!=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3474
bool operator<=(const MinArea &other) const
Comparison operator.
Definition Settings.h:3492
constexpr MinArea(double value)
Constructor.
Definition Settings.h:3448
std::string toString() const
Get the value as string.
bool operator>(const MinArea &other) const
Comparison operator.
Definition Settings.h:3486
static constexpr Range< double > validRange()
The range of valid values for MinArea.
Definition Settings.h:3439
bool operator==(const MinArea &other) const
Comparison operator.
Definition Settings.h:3468
Cluster removal filter.
Definition Settings.h:3197
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:3778
const MaxNeighborDistance & maxNeighborDistance() const
Get MaxNeighborDistance.
Definition Settings.h:3664
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:3645
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3717
std::string toString() const
Get the value as string.
MinArea & minArea()
Get MinArea.
Definition Settings.h:3689
const MinArea & minArea() const
Get MinArea.
Definition Settings.h:3683
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:3527
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:3624
Removal & set(const MaxNeighborDistance &value)
Set MaxNeighborDistance.
Definition Settings.h:3676
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3727
Removal & set(const MinArea &value)
Set MinArea.
Definition Settings.h:3695
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:3752
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3706
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:3651
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3588
bool operator==(const Removal &other) const
Equality operator.
MaxNeighborDistance & maxNeighborDistance()
Get MaxNeighborDistance.
Definition Settings.h:3670
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:3761
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:3657
Removes floating points and isolated clusters from the point cloud.
Definition Settings.h:3176
const Removal & removal() const
Get Removal.
Definition Settings.h:3919
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:3994
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:3963
Cluster & set(const Removal::MaxNeighborDistance &value)
Set Removal::MaxNeighborDistance.
Definition Settings.h:3945
bool operator!=(const Cluster &other) const
Inequality operator.
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:3984
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:3797
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:3898
Removal & removal()
Get Removal.
Definition Settings.h:3925
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4014
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:4007
Cluster & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:3938
Cluster & set(const Removal &value)
Set Removal.
Definition Settings.h:3931
Cluster & set(const Removal::MinArea &value)
Set Removal::MinArea.
Definition Settings.h:3952
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:3973
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:3861
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:4029
Enable or disable contrast distortion correction.
Definition Settings.h:4120
bool ValueType
The type of the underlying value.
Definition Settings.h:4139
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4144
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4153
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4185
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4173
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4179
Strength of correction. Higher values give more correction.
Definition Settings.h:4202
double ValueType
The type of the underlying value.
Definition Settings.h:4221
bool operator>(const Strength &other) const
Comparison operator.
Definition Settings.h:4271
bool operator!=(const Strength &other) const
Comparison operator.
Definition Settings.h:4259
constexpr Strength(double value)
Constructor.
Definition Settings.h:4233
static constexpr Range< double > validRange()
The range of valid values for Strength.
Definition Settings.h:4224
bool operator<=(const Strength &other) const
Comparison operator.
Definition Settings.h:4277
bool operator>=(const Strength &other) const
Comparison operator.
Definition Settings.h:4283
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream.
Definition Settings.h:4289
bool operator<(const Strength &other) const
Comparison operator.
Definition Settings.h:4265
bool operator==(const Strength &other) const
Comparison operator.
Definition Settings.h:4253
Contrast distortion correction filter.
Definition Settings.h:4098
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:4509
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4426
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:4487
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:4405
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:4472
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:4533
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4370
Correction & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4438
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4517
Correction & set(const Strength &value)
Set Strength.
Definition Settings.h:4457
const Strength & strength() const
Get Strength.
Definition Settings.h:4445
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition Settings.h:4312
Enable or disable contrast distortion removal.
Definition Settings.h:4577
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:4610
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:4636
bool ValueType
The type of the underlying value.
Definition Settings.h:4596
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:4601
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:4642
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:4630
static const Enabled no
Off/disabled.
Definition Settings.h:4598
Threshold for removal. Higher values remove more points.
Definition Settings.h:4659
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4734
constexpr Threshold(double value)
Constructor.
Definition Settings.h:4690
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4716
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:4722
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:4681
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:4710
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:4740
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:4728
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:4746
double ValueType
The type of the underlying value.
Definition Settings.h:4678
Contrast distortion removal filter.
Definition Settings.h:4555
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:4964
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition Settings.h:4769
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:4827
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:4988
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:4902
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:4914
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:4862
Threshold & threshold()
Get Threshold.
Definition Settings.h:4908
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:4895
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:4929
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:4883
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:4943
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:4972
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition Settings.h:4074
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:5188
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled.
Definition Settings.h:5155
ContrastDistortion & set(const Correction &value)
Set Correction.
Definition Settings.h:5148
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:5299
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:5323
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:5115
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:5006
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength.
Definition Settings.h:5162
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5076
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5307
ContrastDistortion & set(const Removal &value)
Set Removal.
Definition Settings.h:5181
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5278
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5250
const Removal & removal() const
Get Removal.
Definition Settings.h:5169
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5222
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5208
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5237
Removal & removal()
Get Removal.
Definition Settings.h:5175
bool operator==(const ContrastDistortion &other) const
Equality operator.
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:5195
const Correction & correction() const
Get Correction.
Definition Settings.h:5136
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5263
Correction & correction()
Get Correction.
Definition Settings.h:5142
Experimental filters. These may be renamed, moved or deleted in the future.
Definition Settings.h:4050
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:5644
ContrastDistortion & contrastDistortion()
Get ContrastDistortion.
Definition Settings.h:5481
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:5594
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:5454
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion.
Definition Settings.h:5487
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold.
Definition Settings.h:5529
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:5414
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength.
Definition Settings.h:5508
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream.
Definition Settings.h:5659
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:5581
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:5637
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:5341
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal.
Definition Settings.h:5515
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:5540
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:5552
bool operator!=(const Experimental &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:5622
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled.
Definition Settings.h:5501
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion.
Definition Settings.h:5475
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:5494
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled.
Definition Settings.h:5522
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:5566
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:5608
Enable or disable hole repair.
Definition Settings.h:5722
static const Enabled yes
On/enabled.
Definition Settings.h:5740
static const Enabled no
Off/disabled.
Definition Settings.h:5741
bool ValueType
The type of the underlying value.
Definition Settings.h:5739
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:5779
std::string toString() const
Get the value as string.
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:5773
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:5744
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:5785
bool hasValue() const
Check if the value is set.
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:5753
Relative diameter of holes to fill. Increasing this will fill more points, but require more computati...
Definition Settings.h:5805
bool operator<(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5869
bool operator>=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5887
static constexpr Range< double > validRange()
The range of valid values for HoleSize.
Definition Settings.h:5828
friend std::ostream & operator<<(std::ostream &stream, const HoleSize &value)
Operator to serialize the value to a stream.
Definition Settings.h:5893
bool operator!=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5863
bool operator<=(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5881
bool operator==(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5857
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:5837
double ValueType
The type of the underlying value.
Definition Settings.h:5825
bool operator>(const HoleSize &other) const
Comparison operator.
Definition Settings.h:5875
Level of strictness when considering if a point should be filled. A higher level of strictness requir...
Definition Settings.h:5924
static constexpr Range< int32_t > validRange()
The range of valid values for Strictness.
Definition Settings.h:5948
bool operator>=(const Strictness &other) const
Comparison operator.
Definition Settings.h:6007
bool operator==(const Strictness &other) const
Comparison operator.
Definition Settings.h:5977
std::string toString() const
Get the value as string.
bool operator<=(const Strictness &other) const
Comparison operator.
Definition Settings.h:6001
bool operator>(const Strictness &other) const
Comparison operator.
Definition Settings.h:5995
int32_t ValueType
The type of the underlying value.
Definition Settings.h:5945
friend std::ostream & operator<<(std::ostream &stream, const Strictness &value)
Operator to serialize the value to a stream.
Definition Settings.h:6013
constexpr Strictness(int32_t value)
Constructor.
Definition Settings.h:5957
bool operator!=(const Strictness &other) const
Comparison operator.
Definition Settings.h:5983
bool operator<(const Strictness &other) const
Comparison operator.
Definition Settings.h:5989
Fills in point cloud holes by interpolating remaining surrounding points.
Definition Settings.h:5701
Repair & set(const Strictness &value)
Set Strictness.
Definition Settings.h:6204
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6097
HoleSize & holeSize()
Get HoleSize.
Definition Settings.h:6179
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:6260
Repair & set(const HoleSize &value)
Set HoleSize.
Definition Settings.h:6185
bool operator==(const Repair &other) const
Equality operator.
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6225
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:6133
const Strictness & strictness() const
Get Strictness.
Definition Settings.h:6192
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6215
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:6286
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6154
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6160
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6235
Strictness & strictness()
Get Strictness.
Definition Settings.h:6198
bool operator!=(const Repair &other) const
Inequality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6166
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6269
std::tuple< Settings::Processing::Filters::Hole::Repair::Enabled, Settings::Processing::Filters::Hole::Repair::HoleSize, Settings::Processing::Filters::Hole::Repair::Strictness > Descendants
Definition Settings.h:6036
const HoleSize & holeSize() const
Get HoleSize.
Definition Settings.h:6173
Contains filters that can be used to deal with holes in the point cloud.
Definition Settings.h:5680
const Repair & repair() const
Get Repair.
Definition Settings.h:6427
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:6471
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:6501
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:6305
friend std::ostream & operator<<(std::ostream &stream, const Hole &value)
Operator to send the value as string to a stream.
Definition Settings.h:6536
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:6491
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:6514
Hole & set(const Repair &value)
Set Repair.
Definition Settings.h:6439
Hole & set(const Repair::Strictness &value)
Set Repair::Strictness.
Definition Settings.h:6460
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6521
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:6406
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:6481
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:6433
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6369
Hole & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:6446
Hole & set(const Repair::HoleSize &value)
Set Repair::HoleSize.
Definition Settings.h:6453
Enable or disable the SNR filter.
Definition Settings.h:6597
static const Enabled yes
On/enabled.
Definition Settings.h:6615
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:6654
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:6648
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:6619
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:6628
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:6660
static const Enabled no
Off/disabled.
Definition Settings.h:6616
bool ValueType
The type of the underlying value.
Definition Settings.h:6614
std::string toString() const
Get the value as string.
Discard points with signal-to-noise ratio (SNR) below the given value.
Definition Settings.h:6677
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6756
constexpr Threshold(double value)
Constructor.
Definition Settings.h:6706
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:6726
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6750
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:6697
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:6762
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:6744
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:6738
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:6694
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:6732
Discard points with signal-to-noise ratio (SNR) values below a threshold.
Definition Settings.h:6577
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:6994
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:6899
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:6918
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:6978
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:6911
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:6930
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:6843
bool operator!=(const Removal &other) const
Inequality operator.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:6951
Threshold & threshold()
Get Threshold.
Definition Settings.h:6924
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:6970
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:6878
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:6905
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:6941
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition Settings.h:6785
Enable or disable noise repair.
Definition Settings.h:7042
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7064
bool ValueType
The type of the underlying value.
Definition Settings.h:7059
static const Enabled no
Off/disabled.
Definition Settings.h:7061
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7099
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7073
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:7060
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7105
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7093
Get better surface coverage by repairing regions of missing data due to noisy points....
Definition Settings.h:7019
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:7263
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:7270
bool operator==(const Repair &other) const
Equality operator.
Repair & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7239
std::tuple< Settings::Processing::Filters::Noise::Repair::Enabled > Descendants
Definition Settings.h:7118
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7233
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7227
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:7206
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7250
friend std::ostream & operator<<(std::ostream &stream, const Repair &value)
Operator to send the value as string to a stream.
Definition Settings.h:7285
std::string toString() const
Get the value as string.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7172
Enable or disable noise suppression.
Definition Settings.h:7332
static const Enabled no
Off/disabled.
Definition Settings.h:7351
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:7363
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:7389
bool ValueType
The type of the underlying value.
Definition Settings.h:7349
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:7350
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:7354
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:7395
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:7383
Reduce noise and outliers in the point cloud. This filter can also be used to reduce ripple effects c...
Definition Settings.h:7309
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7540
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:7553
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:7523
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:7517
std::string toString() const
Get the value as string.
std::tuple< Settings::Processing::Filters::Noise::Suppression::Enabled > Descendants
Definition Settings.h:7408
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:7496
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7462
friend std::ostream & operator<<(std::ostream &stream, const Suppression &value)
Operator to send the value as string to a stream.
Definition Settings.h:7575
bool operator!=(const Suppression &other) const
Inequality operator.
Suppression & set(const Enabled &value)
Set Enabled.
Definition Settings.h:7529
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7560
bool operator==(const Suppression &other) const
Equality operator.
Contains filters that can be used to clean up a noisy point cloud.
Definition Settings.h:6557
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:7900
Noise & set(const Suppression &value)
Set Suppression.
Definition Settings.h:7797
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:7865
Suppression & suppression()
Get Suppression.
Definition Settings.h:7791
Removal & removal()
Get Removal.
Definition Settings.h:7732
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:7875
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:7752
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:7705
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:7909
const Suppression & suppression() const
Get Suppression.
Definition Settings.h:7785
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:7835
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:7592
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:7745
const Repair & repair() const
Get Repair.
Definition Settings.h:7759
Noise & set(const Repair::Enabled &value)
Set Repair::Enabled.
Definition Settings.h:7778
Noise & set(const Repair &value)
Set Repair.
Definition Settings.h:7771
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:7665
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:7926
Repair & repair()
Get Repair.
Definition Settings.h:7765
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:7845
const Removal & removal() const
Get Removal.
Definition Settings.h:7726
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:7825
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:7855
bool operator==(const Noise &other) const
Equality operator.
Noise & set(const Suppression::Enabled &value)
Set Suppression::Enabled.
Definition Settings.h:7804
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:7815
Noise & set(const Removal &value)
Set Removal.
Definition Settings.h:7738
Enable or disable the outlier filter.
Definition Settings.h:7989
bool ValueType
The type of the underlying value.
Definition Settings.h:8006
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8046
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8020
static const Enabled no
Off/disabled.
Definition Settings.h:8008
std::string toString() const
Get the value as string.
static const Enabled yes
On/enabled.
Definition Settings.h:8007
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:8052
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8011
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8040
Discard point if Euclidean distance to neighboring points is above the given value.
Definition Settings.h:8069
static constexpr Range< double > validRange()
The range of valid values for Threshold.
Definition Settings.h:8089
constexpr Threshold(double value)
Constructor.
Definition Settings.h:8098
bool operator<(const Threshold &other) const
Comparison operator.
Definition Settings.h:8130
bool operator==(const Threshold &other) const
Comparison operator.
Definition Settings.h:8118
bool operator>=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8148
bool operator!=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8124
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream.
Definition Settings.h:8154
bool operator<=(const Threshold &other) const
Comparison operator.
Definition Settings.h:8142
bool operator>(const Threshold &other) const
Comparison operator.
Definition Settings.h:8136
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition Settings.h:8086
Discard point if Euclidean distance to neighboring points is above a threshold.
Definition Settings.h:7969
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:8386
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8291
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:8270
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8303
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8297
Removal & set(const Threshold &value)
Set Threshold.
Definition Settings.h:8322
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8177
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8333
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8343
const Threshold & threshold() const
Get Threshold.
Definition Settings.h:8310
Threshold & threshold()
Get Threshold.
Definition Settings.h:8316
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:8362
bool operator==(const Removal &other) const
Equality operator.
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8235
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8370
Contains a filter that removes points with large Euclidean distance to neighboring points.
Definition Settings.h:7949
const Removal & removal() const
Get Removal.
Definition Settings.h:8522
Outlier & set(const Removal &value)
Set Removal.
Definition Settings.h:8534
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:8599
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:8592
bool operator!=(const Outlier &other) const
Inequality operator.
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold.
Definition Settings.h:8548
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:8541
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition Settings.h:8404
Removal & removal()
Get Removal.
Definition Settings.h:8528
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:8501
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream.
Definition Settings.h:8614
bool operator==(const Outlier &other) const
Equality operator.
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:8579
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:8559
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:8569
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8465
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition Settings.h:8675
bool ValueType
The type of the underlying value.
Definition Settings.h:8692
static const Enabled yes
On/enabled.
Definition Settings.h:8693
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:8732
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:8706
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:8738
static const Enabled no
Off/disabled.
Definition Settings.h:8694
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:8726
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:8697
The reflection filter has two modes: Local and Global. Local mode preserves more 3D data on thinner o...
Definition Settings.h:8762
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8804
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8795
ValueType
The type of the underlying value.
Definition Settings.h:8787
static const Mode local
local
Definition Settings.h:8792
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8836
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8842
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8830
std::string toString() const
Get the value as string.
static const Mode global
global
Definition Settings.h:8791
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8824
Discard points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8655
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8987
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:9076
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:9023
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8925
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8867
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:9052
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:8960
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:8993
Mode & mode()
Get Mode.
Definition Settings.h:9006
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9060
const Mode & mode() const
Get Mode.
Definition Settings.h:9000
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8981
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Mode &value)
Set Mode.
Definition Settings.h:9012
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9033
Contains a filter that removes points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8635
bool operator!=(const Reflection &other) const
Inequality operator.
bool operator==(const Reflection &other) const
Equality operator.
Removal & removal()
Get Removal.
Definition Settings.h:9218
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9155
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9304
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9289
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:9282
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9231
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9259
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:9094
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Mode &value)
Set Removal::Mode.
Definition Settings.h:9238
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9269
const Removal & removal() const
Get Removal.
Definition Settings.h:9212
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9249
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9224
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:9191
Enable or disable the smoothing filter.
Definition Settings.h:9363
bool ValueType
The type of the underlying value.
Definition Settings.h:9380
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9385
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9420
static const Enabled yes
On/enabled.
Definition Settings.h:9381
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9414
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9426
static const Enabled no
Off/disabled.
Definition Settings.h:9382
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9394
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:9443
double ValueType
The type of the underlying value.
Definition Settings.h:9460
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9498
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9510
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9472
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9463
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9528
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9522
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9492
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9516
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9504
Gaussian smoothing of the point cloud.
Definition Settings.h:9343
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9671
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:9736
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9717
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9677
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9551
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9760
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9684
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9665
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:9707
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:9644
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9696
Sigma & sigma()
Get Sigma.
Definition Settings.h:9690
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9609
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9744
Smoothing filters.
Definition Settings.h:9325
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:9875
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9839
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9778
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9908
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:9943
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9973
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:9922
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:9915
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9896
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:9933
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:9966
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9953
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:9988
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9902
Filter settings.
Definition Settings.h:3157
bool operator!=(const Filters &other) const
Inequality operator.
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:10895
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10558
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11055
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10274
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10905
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:10241
Filters & set(const Hole &value)
Set Hole.
Definition Settings.h:10389
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10751
Filters & set(const Hole::Repair::HoleSize &value)
Set Hole::Repair::HoleSize.
Definition Settings.h:10410
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10464
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:10799
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10866
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10295
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10827
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:10760
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10876
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:10963
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10471
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10625
Cluster & cluster()
Get Cluster.
Definition Settings.h:10268
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:10934
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:10779
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10924
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10525
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10349
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10321
Outlier & outlier()
Get Outlier.
Definition Settings.h:10498
Filters & set(const Reflection::Removal::Mode &value)
Set Reflection::Removal::Mode.
Definition Settings.h:10565
Filters & set(const Hole::Repair::Enabled &value)
Set Hole::Repair::Enabled.
Definition Settings.h:10403
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10478
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10511
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10262
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10309
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10328
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:11076
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10288
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:10944
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10885
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10674
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:10993
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:10171
Filters & set(const Hole::Repair &value)
Set Hole::Repair.
Definition Settings.h:10396
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10532
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10664
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10457
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10983
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10544
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10713
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10356
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:11042
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10635
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10504
const Noise & noise() const
Get Noise.
Definition Settings.h:10424
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10335
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:10769
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10699
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10551
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10817
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10450
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:10954
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10598
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10808
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10856
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10370
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10591
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Hole::Repair::Strictness &value)
Set Hole::Repair::Strictness.
Definition Settings.h:10417
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10518
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10281
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:10789
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10738
const Hole & hole() const
Get Hole.
Definition Settings.h:10377
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:10005
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10302
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10725
Noise & noise()
Get Noise.
Definition Settings.h:10430
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10584
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10342
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10645
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10443
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10615
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10915
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10837
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10578
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10655
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10485
Hole & hole()
Get Hole.
Definition Settings.h:10383
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:10973
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10363
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10492
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10846
Reflection & reflection()
Get Reflection.
Definition Settings.h:10538
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10436
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10605
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10572
Experimental & experimental()
Get Experimental.
Definition Settings.h:10315
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10685
Setting for upsampling or downsampling the point cloud data by some factor. This operation is perform...
Definition Settings.h:11147
void reset()
Reset the node to unset state.
static const Mode upsample2x2
upsample2x2
Definition Settings.h:11197
static const Mode downsample4x4
downsample4x4
Definition Settings.h:11196
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:11252
static const Mode upsample4x4
upsample4x4
Definition Settings.h:11198
static const Mode downsample2x2
downsample2x2
Definition Settings.h:11195
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:11246
ValueType
The type of the underlying value.
Definition Settings.h:11187
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:11240
bool hasValue() const
Check if the value is set.
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:11201
std::string toString() const
Get the value as string.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:11214
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:11234
static const Mode disabled
disabled
Definition Settings.h:11194
ValueType value() const
Get the value.
Settings for changing the output resolution of the point cloud.
Definition Settings.h:11104
Resampling & set(const Mode &value)
Set Mode.
Definition Settings.h:11398
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11332
const Mode & mode() const
Get Mode.
Definition Settings.h:11386
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:11421
Mode & mode()
Get Mode.
Definition Settings.h:11392
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:11443
std::tuple< Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11278
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:11408
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:11365
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11428
Settings related to processing of a capture, including filters and color balance.
Definition Settings.h:1615
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:12193
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:12373
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:12321
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:12383
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12563
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12534
Resampling & resampling()
Get Resampling.
Definition Settings.h:12118
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11806
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11771
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11867
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12449
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:12175
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11778
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:12091
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:11739
Filters & filters()
Get Filters.
Definition Settings.h:11833
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:12098
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12468
Processing & set(const Resampling &value)
Set Resampling.
Definition Settings.h:12124
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:12201
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11916
Processing & set(const Resampling::Mode &value)
Set Resampling::Mode.
Definition Settings.h:12131
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:11460
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12553
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11930
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:12166
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:12035
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11923
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11860
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12650
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12458
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12332
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12524
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12430
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:12363
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12583
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12420
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11785
Color & color()
Get Color.
Definition Settings.h:11765
Processing & set(const Filters::Hole::Repair::Strictness &value)
Set Filters::Hole::Repair::Strictness.
Definition Settings.h:11965
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12573
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:12056
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11972
Processing & set(const Filters::Hole &value)
Set Filters::Hole.
Definition Settings.h:11937
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11846
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12476
const Settings::Processing::Filters & get() const
Definition Settings.h:12209
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11909
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11986
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:12084
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:12148
const Filters & filters() const
Get Filters.
Definition Settings.h:11827
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11853
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:12393
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12633
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:12256
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:12105
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:12014
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11979
Processing & set(const Filters::Reflection::Removal::Mode &value)
Set Filters::Reflection::Removal::Mode.
Definition Settings.h:12077
Processing & set(const Filters::Hole::Repair::Enabled &value)
Set Filters::Hole::Repair::Enabled.
Definition Settings.h:11951
const Settings::Processing::Resampling & get() const
Definition Settings.h:12591
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:12042
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:11993
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:12157
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11874
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11881
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12410
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:12049
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11792
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:12184
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:12310
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:12028
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:12007
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:12544
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:12297
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11813
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:12070
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11902
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:12236
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12505
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:12063
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:12246
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11895
const Settings::Processing::Color & get() const
Definition Settings.h:12140
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11759
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11888
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:12021
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:12226
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12514
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12495
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11839
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:12599
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11799
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12401
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:12265
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12439
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11820
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11659
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12345
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:12217
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:12285
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:12000
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:12275
const Resampling & resampling() const
Get Resampling.
Definition Settings.h:12112
Processing & set(const Filters::Hole::Repair::HoleSize &value)
Set Filters::Hole::Repair::HoleSize.
Definition Settings.h:11958
Processing & set(const Filters::Hole::Repair &value)
Set Filters::Hole::Repair.
Definition Settings.h:11944
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:12624
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12485
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:12354
Enable or disable box filter.
Definition Settings.h:12743
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12774
bool ValueType
The type of the underlying value.
Definition Settings.h:12760
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12794
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12765
static const Enabled yes
On/enabled.
Definition Settings.h:12761
static const Enabled no
Off/disabled.
Definition Settings.h:12762
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:12806
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12800
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12823
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12871
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12846
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12866
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:12883
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12877
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12900
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12943
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12954
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12948
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:12960
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12923
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:12977
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:13025
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:13037
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:13020
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13000
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:13031
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:13054
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:13097
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:13108
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13077
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:13102
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:13114
Removes points outside the given three-dimensional box.
Definition Settings.h:12708
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:13127
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:13302
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:13231
const PointO & pointO() const
Get PointO.
Definition Settings.h:13328
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:13340
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13258
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13252
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:13283
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13350
PointA & pointA()
Get PointA.
Definition Settings.h:13296
PointB & pointB()
Get PointB.
Definition Settings.h:13315
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:13321
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13386
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13368
const Extents & extents() const
Get Extents.
Definition Settings.h:13271
const PointA & pointA() const
Get PointA.
Definition Settings.h:13290
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13194
PointO & pointO()
Get PointO.
Definition Settings.h:13334
Extents & extents()
Get Extents.
Definition Settings.h:13277
const PointB & pointB() const
Get PointB.
Definition Settings.h:13309
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:13423
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13453
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:13377
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13434
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13359
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13264
Enable or disable depth filter.
Definition Settings.h:13502
static const Enabled yes
On/enabled.
Definition Settings.h:13520
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:13553
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13559
bool ValueType
The type of the underlying value.
Definition Settings.h:13519
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13565
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13524
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13521
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13533
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13582
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13625
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13605
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:13642
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13630
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13636
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:13480
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13779
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13786
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13798
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13767
bool operator==(const Depth &other) const
Equality operator.
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13655
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13844
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13808
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:13836
Range & range()
Get Range.
Definition Settings.h:13792
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13860
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13712
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13773
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13817
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:13746
Removes points outside the region of interest.
Definition Settings.h:12674
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:14165
Depth & depth()
Get Depth.
Definition Settings.h:14077
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:14090
const Box & box() const
Get Box.
Definition Settings.h:14017
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:14029
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:14217
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:14064
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:14148
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:14132
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:14156
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:14124
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:13878
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:14174
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:14140
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13957
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:13997
Box & box()
Get Box.
Definition Settings.h:14023
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:14106
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:14193
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:14050
const Depth & depth() const
Get Depth.
Definition Settings.h:14071
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:14043
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:14201
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:14036
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:14097
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:14083
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:14057
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:14115
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:14271
ValueType
The type of the underlying value.
Definition Settings.h:14301
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:14311
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:14358
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:14320
static const Color grayscale
grayscale
Definition Settings.h:14308
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:14352
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:14307
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:14346
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14340
static const Color rgb
rgb
Definition Settings.h:14306
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:14396
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:14443
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14438
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14458
static const Pixel all
all
Definition Settings.h:14434
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14435
static const Pixel by2x2
by2x2
Definition Settings.h:14439
static const Pixel by4x4
by4x4
Definition Settings.h:14440
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14490
ValueType
The type of the underlying value.
Definition Settings.h:14425
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14436
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14484
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14437
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:14478
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14496
std::string toString() const
Get the value as string.
Sampling settings.
Definition Settings.h:14240
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14522
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14578
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14637
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:14611
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14650
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14722
Pixel & pixel()
Get Pixel.
Definition Settings.h:14656
const Settings::Sampling::Color & get() const
Definition Settings.h:14671
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:14698
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14679
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:14706
const Color & color() const
Get Color.
Definition Settings.h:14631
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14643
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14662
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:16235
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:16073
const Settings::Color & get() const
Definition Settings.h:15696
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14918
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:15323
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:16054
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15622
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:15944
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15738
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:15372
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15762
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:15274
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15533
const Settings::RegionOfInterest & get() const
Definition Settings.h:16179
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15989
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:15111
const Processing & processing() const
Get Processing.
Definition Settings.h:15213
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15787
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15904
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:15225
const Settings::Sampling::Pixel & get() const
Definition Settings.h:16269
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15927
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15669
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:15491
Settings & set(const Processing::Filters::Hole::Repair::Enabled &value)
Set Processing::Filters::Hole::Repair::Enabled.
Definition Settings.h:15400
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15832
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:15936
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:15379
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15540
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15676
Color & color()
Get Color.
Definition Settings.h:15155
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:15180
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15915
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15643
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:15421
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15657
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15842
const Settings::Acquisitions & get() const
Definition Settings.h:15690
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15850
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:16036
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:16063
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:15295
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:16157
const Settings::Diagnostics & get() const
Definition Settings.h:15702
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15581
const Settings::Processing::Resampling & get() const
Definition Settings.h:16165
Settings & set(const Processing::Filters::Hole &value)
Set Processing::Filters::Hole.
Definition Settings.h:15386
Settings & set(const Processing::Filters::Reflection::Removal::Mode &value)
Set Processing::Filters::Reflection::Removal::Mode.
Definition Settings.h:15526
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:16147
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:16187
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:15239
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:16227
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15636
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:15999
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:16243
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:15972
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15870
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:16318
std::string serialize() const
Serialize to a string.
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15754
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:16203
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15547
const Settings::Processing & get() const
Definition Settings.h:15722
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15505
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:16331
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15860
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15498
Settings & set(const Processing::Filters::Hole::Repair::HoleSize &value)
Set Processing::Filters::Hole::Repair::HoleSize.
Definition Settings.h:15407
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:16195
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15779
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:15358
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15601
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:15962
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15893
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15608
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15746
Settings & set(const Processing::Resampling::Mode &value)
Set Processing::Resampling::Mode.
Definition Settings.h:15568
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:15953
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:15130
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:15012
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:16091
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:15330
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:16128
const Settings::Processing::Filters & get() const
Definition Settings.h:15795
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:15267
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const Engine &value)
Set Engine.
Definition Settings.h:15206
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15650
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15770
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:16018
Settings & set(const Processing::Resampling &value)
Set Processing::Resampling.
Definition Settings.h:15561
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:15365
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:16211
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:15232
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15477
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:15136
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15512
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:16046
const Settings::Engine & get() const
Definition Settings.h:15716
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15803
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:16027
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:15260
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15629
const Settings::Sampling::Color & get() const
Definition Settings.h:16263
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:15302
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15594
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15463
const Engine & engine() const
Get Engine.
Definition Settings.h:15194
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:15174
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:16009
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15822
const Color & color() const
Get Color.
Definition Settings.h:15149
Sampling & sampling()
Get Sampling.
Definition Settings.h:15663
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15519
Processing & processing()
Get Processing.
Definition Settings.h:15219
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15615
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:15187
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15980
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15710
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15812
Settings & set(const Color &value)
Set Color.
Definition Settings.h:15161
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:16120
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15881
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:16219
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:15337
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15683
Settings & set(const Processing::Filters::Hole::Repair::Strictness &value)
Set Processing::Filters::Hole::Repair::Strictness.
Definition Settings.h:15414
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:15281
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:15309
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:16251
const Settings::Sampling & get() const
Definition Settings.h:16257
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15442
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:15351
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:15142
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15554
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:15168
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:15428
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15449
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:15316
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15484
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15587
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:15435
Engine & engine()
Get Engine.
Definition Settings.h:15200
Settings & set(const Processing::Filters::Hole::Repair &value)
Set Processing::Filters::Hole::Repair.
Definition Settings.h:15393
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:15344
const Settings::Processing::Color & get() const
Definition Settings.h:15730
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15456
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:16110
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15470
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:16100
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:15253
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:15288
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15575
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:16173
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:16083
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:14740
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:15246
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:16137
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:16352
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