Zivid C++ API 2.16.0+46cdaba6-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{ 200 }, 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
8764
8765 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
8767 {
8768 public:
8770 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
8771
8773 static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Mode" };
8774
8776 static constexpr const char *name{ "Mode" };
8777
8779 static constexpr const char *description{
8780 R"description(The reflection filter has two modes: Local and Global. Global mode is generally better at
8781removing outlier points in the point cloud, whereas Local mode preserves more 3D data on
8782thin objects far from the background.
8783
8784Additionally, Local mode behaves slightly differently depending on the Engine used. With
8785Phase engine or Stripe engine, Local mode will process faster than Global mode and remove
8786more reflection artifacts. Also with Stripe engine, Local mode might reduce the number of
8787points resolved on shiny and reflective objects. With Omni engine, Local mode will reduce
8788the amount of artifacts in low projector signal regions, but might also reduce coverage on
8789surfaces with low projector signal.
8790
8791It is advised to use the Cluster filter together with Local mode.
8792)description"
8793 };
8794
8796 enum class ValueType
8797 {
8798 global,
8799 local
8800 };
8801 static const Mode global;
8802 static const Mode local;
8803
8805 static std::set<ValueType> validValues()
8806 {
8807 return { ValueType::global, ValueType::local };
8808 }
8809
8811 Mode() = default;
8812
8814 explicit constexpr Mode(ValueType value)
8815 : m_opt{ verifyValue(value) }
8816 {}
8817
8823
8825 bool hasValue() const;
8826
8828 void reset();
8829
8831 std::string toString() const;
8832
8834 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
8835 {
8836 return stream << Mode{ value }.toString();
8837 }
8838
8840 bool operator==(const Mode &other) const
8841 {
8842 return m_opt == other.m_opt;
8843 }
8844
8846 bool operator!=(const Mode &other) const
8847 {
8848 return m_opt != other.m_opt;
8849 }
8850
8852 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
8853 {
8854 return stream << value.toString();
8855 }
8856
8857 private:
8858 void setFromString(const std::string &value);
8859
8860 constexpr ValueType static verifyValue(const ValueType &value)
8861 {
8862 return value == ValueType::global || value == ValueType::local
8863 ? value
8864 : throw std::invalid_argument{
8865 "Invalid value: Mode{ "
8866 + std::to_string(
8867 static_cast<std::underlying_type<ValueType>::type>(value))
8868 + " }"
8869 };
8870 }
8871
8872 std::optional<ValueType> m_opt;
8873
8874 friend struct DataModel::Detail::Befriend<Mode>;
8875 };
8876
8877 using Descendants = std::tuple<
8880
8883
8896#ifndef NO_DOC
8897 template<
8898 typename... Args,
8899 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8900 typename std::enable_if<
8901 Zivid::Detail::TypeTraits::
8902 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8903 int>::type = 0>
8904#else
8905 template<typename... Args>
8906#endif
8907 explicit Removal(Args &&...args)
8908 {
8909 using namespace Zivid::Detail::TypeTraits;
8910
8911 static_assert(
8912 AllArgsDecayedAreUnique<Args...>::value,
8913 "Found duplicate types among the arguments passed to Removal(...). "
8914 "Types should be listed at most once.");
8915
8916 set(std::forward<Args>(args)...);
8917 }
8918
8930#ifndef NO_DOC
8931 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8932#else
8933 template<typename... Args>
8934#endif
8935 void set(Args &&...args)
8936 {
8937 using namespace Zivid::Detail::TypeTraits;
8938
8939 using AllArgsAreDescendantNodes =
8940 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8941 static_assert(
8942 AllArgsAreDescendantNodes::value,
8943 "All arguments passed to set(...) must be descendant nodes.");
8944
8945 static_assert(
8946 AllArgsDecayedAreUnique<Args...>::value,
8947 "Found duplicate types among the arguments passed to set(...). "
8948 "Types should be listed at most once.");
8949
8950 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8951 }
8952
8965#ifndef NO_DOC
8966 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8967#else
8968 template<typename... Args>
8969#endif
8970 Removal copyWith(Args &&...args) const
8971 {
8972 using namespace Zivid::Detail::TypeTraits;
8973
8974 using AllArgsAreDescendantNodes =
8975 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8976 static_assert(
8977 AllArgsAreDescendantNodes::value,
8978 "All arguments passed to copyWith(...) must be descendant nodes.");
8979
8980 static_assert(
8981 AllArgsDecayedAreUnique<Args...>::value,
8982 "Found duplicate types among the arguments passed to copyWith(...). "
8983 "Types should be listed at most once.");
8984
8985 auto copy{ *this };
8986 copy.set(std::forward<Args>(args)...);
8987 return copy;
8988 }
8989
8991 const Enabled &isEnabled() const
8992 {
8993 return m_enabled;
8994 }
8995
8998 {
8999 return m_enabled;
9000 }
9001
9003 Removal &set(const Enabled &value)
9004 {
9005 m_enabled = value;
9006 return *this;
9007 }
9008
9010 const Mode &mode() const
9011 {
9012 return m_mode;
9013 }
9014
9017 {
9018 return m_mode;
9019 }
9020
9022 Removal &set(const Mode &value)
9023 {
9024 m_mode = value;
9025 return *this;
9026 }
9027
9028 template<
9029 typename T,
9030 typename std::enable_if<
9031 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9032 int>::type = 0>
9034 {
9035 return m_enabled;
9036 }
9037
9038 template<
9039 typename T,
9040 typename std::enable_if<
9041 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9042 int>::type = 0>
9044 {
9045 return m_mode;
9046 }
9047
9048 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9050 {
9051 return m_enabled;
9052 }
9053
9054 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9056 {
9057 return m_mode;
9058 }
9059
9061 template<typename F>
9062 void forEach(const F &f) const
9063 {
9064 f(m_enabled);
9065 f(m_mode);
9066 }
9067
9069 template<typename F>
9070 void forEach(const F &f)
9071 {
9072 f(m_enabled);
9073 f(m_mode);
9074 }
9075
9077 bool operator==(const Removal &other) const;
9078
9080 bool operator!=(const Removal &other) const;
9081
9083 std::string toString() const;
9084
9086 friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
9087 {
9088 return stream << value.toString();
9089 }
9090
9091 private:
9092 void setFromString(const std::string &value);
9093
9094 void setFromString(const std::string &fullPath, const std::string &value);
9095
9096 std::string getString(const std::string &fullPath) const;
9097
9098 Enabled m_enabled;
9099 Mode m_mode;
9100
9101 friend struct DataModel::Detail::Befriend<Removal>;
9102 };
9103
9104 using Descendants = std::tuple<
9108
9111
9125#ifndef NO_DOC
9126 template<
9127 typename... Args,
9128 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9129 typename std::enable_if<
9130 Zivid::Detail::TypeTraits::
9131 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9132 int>::type = 0>
9133#else
9134 template<typename... Args>
9135#endif
9136 explicit Reflection(Args &&...args)
9137 {
9138 using namespace Zivid::Detail::TypeTraits;
9139
9140 static_assert(
9141 AllArgsDecayedAreUnique<Args...>::value,
9142 "Found duplicate types among the arguments passed to Reflection(...). "
9143 "Types should be listed at most once.");
9144
9145 set(std::forward<Args>(args)...);
9146 }
9147
9160#ifndef NO_DOC
9161 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9162#else
9163 template<typename... Args>
9164#endif
9165 void set(Args &&...args)
9166 {
9167 using namespace Zivid::Detail::TypeTraits;
9168
9169 using AllArgsAreDescendantNodes =
9170 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9171 static_assert(
9172 AllArgsAreDescendantNodes::value,
9173 "All arguments passed to set(...) must be descendant nodes.");
9174
9175 static_assert(
9176 AllArgsDecayedAreUnique<Args...>::value,
9177 "Found duplicate types among the arguments passed to set(...). "
9178 "Types should be listed at most once.");
9179
9180 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9181 }
9182
9196#ifndef NO_DOC
9197 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9198#else
9199 template<typename... Args>
9200#endif
9201 Reflection copyWith(Args &&...args) const
9202 {
9203 using namespace Zivid::Detail::TypeTraits;
9204
9205 using AllArgsAreDescendantNodes =
9206 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9207 static_assert(
9208 AllArgsAreDescendantNodes::value,
9209 "All arguments passed to copyWith(...) must be descendant nodes.");
9210
9211 static_assert(
9212 AllArgsDecayedAreUnique<Args...>::value,
9213 "Found duplicate types among the arguments passed to copyWith(...). "
9214 "Types should be listed at most once.");
9215
9216 auto copy{ *this };
9217 copy.set(std::forward<Args>(args)...);
9218 return copy;
9219 }
9220
9222 const Removal &removal() const
9223 {
9224 return m_removal;
9225 }
9226
9229 {
9230 return m_removal;
9231 }
9232
9234 Reflection &set(const Removal &value)
9235 {
9236 m_removal = value;
9237 return *this;
9238 }
9239
9242 {
9243 m_removal.set(value);
9244 return *this;
9245 }
9246
9249 {
9250 m_removal.set(value);
9251 return *this;
9252 }
9253
9254 template<
9255 typename T,
9256 typename std::enable_if<
9257 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9258 int>::type = 0>
9260 {
9261 return m_removal;
9262 }
9263
9264 template<
9265 typename T,
9266 typename std::enable_if<
9267 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9268 int>::type = 0>
9270 {
9272 }
9273
9274 template<
9275 typename T,
9276 typename std::enable_if<
9277 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
9278 int>::type = 0>
9280 {
9282 }
9283
9284 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9286 {
9287 return m_removal;
9288 }
9289
9291 template<typename F>
9292 void forEach(const F &f) const
9293 {
9294 f(m_removal);
9295 }
9296
9298 template<typename F>
9299 void forEach(const F &f)
9300 {
9301 f(m_removal);
9302 }
9303
9305 bool operator==(const Reflection &other) const;
9306
9308 bool operator!=(const Reflection &other) const;
9309
9311 std::string toString() const;
9312
9314 friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
9315 {
9316 return stream << value.toString();
9317 }
9318
9319 private:
9320 void setFromString(const std::string &value);
9321
9322 void setFromString(const std::string &fullPath, const std::string &value);
9323
9324 std::string getString(const std::string &fullPath) const;
9325
9326 Removal m_removal;
9327
9328 friend struct DataModel::Detail::Befriend<Reflection>;
9329 };
9330
9332
9333 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9335 {
9336 public:
9338 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9339
9341 static constexpr const char *path{ "Processing/Filters/Smoothing" };
9342
9344 static constexpr const char *name{ "Smoothing" };
9345
9347 static constexpr const char *description{ R"description(Smoothing filters.)description" };
9348
9350
9351 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9353 {
9354 public:
9356 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
9357
9359 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
9360
9362 static constexpr const char *name{ "Gaussian" };
9363
9365 static constexpr const char *description{
9366 R"description(Gaussian smoothing of the point cloud.)description"
9367 };
9368
9370
9371 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9373 {
9374 public:
9376 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9377
9379 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
9380
9382 static constexpr const char *name{ "Enabled" };
9383
9385 static constexpr const char *description{
9386 R"description(Enable or disable the smoothing filter.)description"
9387 };
9388
9390 using ValueType = bool;
9391 static const Enabled yes;
9392 static const Enabled no;
9393
9395 static std::set<bool> validValues()
9396 {
9397 return { false, true };
9398 }
9399
9401 Enabled() = default;
9402
9404 explicit constexpr Enabled(bool value)
9405 : m_opt{ value }
9406 {}
9407
9412 bool value() const;
9413
9415 bool hasValue() const;
9416
9418 void reset();
9419
9421 std::string toString() const;
9422
9424 bool operator==(const Enabled &other) const
9425 {
9426 return m_opt == other.m_opt;
9427 }
9428
9430 bool operator!=(const Enabled &other) const
9431 {
9432 return m_opt != other.m_opt;
9433 }
9434
9436 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
9437 {
9438 return stream << value.toString();
9439 }
9440
9441 private:
9442 void setFromString(const std::string &value);
9443
9444 std::optional<bool> m_opt;
9445
9446 friend struct DataModel::Detail::Befriend<Enabled>;
9447 };
9448
9450
9451 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
9453 {
9454 public:
9456 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
9457
9459 static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
9460
9462 static constexpr const char *name{ "Sigma" };
9463
9465 static constexpr const char *description{
9466 R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients).)description"
9467 };
9468
9470 using ValueType = double;
9471
9473 static constexpr Range<double> validRange()
9474 {
9475 return { 0.5, 5 };
9476 }
9477
9479 Sigma() = default;
9480
9482 explicit constexpr Sigma(double value)
9483 : m_opt{ verifyValue(value) }
9484 {}
9485
9490 double value() const;
9491
9493 bool hasValue() const;
9494
9496 void reset();
9497
9499 std::string toString() const;
9500
9502 bool operator==(const Sigma &other) const
9503 {
9504 return m_opt == other.m_opt;
9505 }
9506
9508 bool operator!=(const Sigma &other) const
9509 {
9510 return m_opt != other.m_opt;
9511 }
9512
9514 bool operator<(const Sigma &other) const
9515 {
9516 return m_opt < other.m_opt;
9517 }
9518
9520 bool operator>(const Sigma &other) const
9521 {
9522 return m_opt > other.m_opt;
9523 }
9524
9526 bool operator<=(const Sigma &other) const
9527 {
9528 return m_opt <= other.m_opt;
9529 }
9530
9532 bool operator>=(const Sigma &other) const
9533 {
9534 return m_opt >= other.m_opt;
9535 }
9536
9538 friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
9539 {
9540 return stream << value.toString();
9541 }
9542
9543 private:
9544 void setFromString(const std::string &value);
9545
9546 constexpr ValueType static verifyValue(const ValueType &value)
9547 {
9548 return validRange().isInRange(value)
9549 ? value
9550 : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
9551 + " } is not in range ["
9552 + std::to_string(validRange().min()) + ", "
9553 + std::to_string(validRange().max()) + "]" };
9554 }
9555
9556 std::optional<double> m_opt;
9557
9558 friend struct DataModel::Detail::Befriend<Sigma>;
9559 };
9560
9561 using Descendants = std::tuple<
9564
9567
9580#ifndef NO_DOC
9581 template<
9582 typename... Args,
9583 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9584 typename std::enable_if<
9585 Zivid::Detail::TypeTraits::
9586 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9587 int>::type = 0>
9588#else
9589 template<typename... Args>
9590#endif
9591 explicit Gaussian(Args &&...args)
9592 {
9593 using namespace Zivid::Detail::TypeTraits;
9594
9595 static_assert(
9596 AllArgsDecayedAreUnique<Args...>::value,
9597 "Found duplicate types among the arguments passed to Gaussian(...). "
9598 "Types should be listed at most once.");
9599
9600 set(std::forward<Args>(args)...);
9601 }
9602
9614#ifndef NO_DOC
9615 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9616#else
9617 template<typename... Args>
9618#endif
9619 void set(Args &&...args)
9620 {
9621 using namespace Zivid::Detail::TypeTraits;
9622
9623 using AllArgsAreDescendantNodes =
9624 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9625 static_assert(
9626 AllArgsAreDescendantNodes::value,
9627 "All arguments passed to set(...) must be descendant nodes.");
9628
9629 static_assert(
9630 AllArgsDecayedAreUnique<Args...>::value,
9631 "Found duplicate types among the arguments passed to set(...). "
9632 "Types should be listed at most once.");
9633
9634 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9635 }
9636
9649#ifndef NO_DOC
9650 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9651#else
9652 template<typename... Args>
9653#endif
9654 Gaussian copyWith(Args &&...args) const
9655 {
9656 using namespace Zivid::Detail::TypeTraits;
9657
9658 using AllArgsAreDescendantNodes =
9659 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9660 static_assert(
9661 AllArgsAreDescendantNodes::value,
9662 "All arguments passed to copyWith(...) must be descendant nodes.");
9663
9664 static_assert(
9665 AllArgsDecayedAreUnique<Args...>::value,
9666 "Found duplicate types among the arguments passed to copyWith(...). "
9667 "Types should be listed at most once.");
9668
9669 auto copy{ *this };
9670 copy.set(std::forward<Args>(args)...);
9671 return copy;
9672 }
9673
9675 const Enabled &isEnabled() const
9676 {
9677 return m_enabled;
9678 }
9679
9682 {
9683 return m_enabled;
9684 }
9685
9687 Gaussian &set(const Enabled &value)
9688 {
9689 m_enabled = value;
9690 return *this;
9691 }
9692
9694 const Sigma &sigma() const
9695 {
9696 return m_sigma;
9697 }
9698
9701 {
9702 return m_sigma;
9703 }
9704
9706 Gaussian &set(const Sigma &value)
9707 {
9708 m_sigma = value;
9709 return *this;
9710 }
9711
9712 template<
9713 typename T,
9714 typename std::enable_if<
9715 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9716 int>::type = 0>
9718 {
9719 return m_enabled;
9720 }
9721
9722 template<
9723 typename T,
9724 typename std::enable_if<
9725 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9726 int>::type = 0>
9728 {
9729 return m_sigma;
9730 }
9731
9732 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9734 {
9735 return m_enabled;
9736 }
9737
9738 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9740 {
9741 return m_sigma;
9742 }
9743
9745 template<typename F>
9746 void forEach(const F &f) const
9747 {
9748 f(m_enabled);
9749 f(m_sigma);
9750 }
9751
9753 template<typename F>
9754 void forEach(const F &f)
9755 {
9756 f(m_enabled);
9757 f(m_sigma);
9758 }
9759
9761 bool operator==(const Gaussian &other) const;
9762
9764 bool operator!=(const Gaussian &other) const;
9765
9767 std::string toString() const;
9768
9770 friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
9771 {
9772 return stream << value.toString();
9773 }
9774
9775 private:
9776 void setFromString(const std::string &value);
9777
9778 void setFromString(const std::string &fullPath, const std::string &value);
9779
9780 std::string getString(const std::string &fullPath) const;
9781
9782 Enabled m_enabled;
9783 Sigma m_sigma;
9784
9785 friend struct DataModel::Detail::Befriend<Gaussian>;
9786 };
9787
9788 using Descendants = std::tuple<
9792
9795
9809#ifndef NO_DOC
9810 template<
9811 typename... Args,
9812 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
9813 typename std::enable_if<
9814 Zivid::Detail::TypeTraits::
9815 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
9816 int>::type = 0>
9817#else
9818 template<typename... Args>
9819#endif
9820 explicit Smoothing(Args &&...args)
9821 {
9822 using namespace Zivid::Detail::TypeTraits;
9823
9824 static_assert(
9825 AllArgsDecayedAreUnique<Args...>::value,
9826 "Found duplicate types among the arguments passed to Smoothing(...). "
9827 "Types should be listed at most once.");
9828
9829 set(std::forward<Args>(args)...);
9830 }
9831
9844#ifndef NO_DOC
9845 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
9846#else
9847 template<typename... Args>
9848#endif
9849 void set(Args &&...args)
9850 {
9851 using namespace Zivid::Detail::TypeTraits;
9852
9853 using AllArgsAreDescendantNodes =
9854 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9855 static_assert(
9856 AllArgsAreDescendantNodes::value,
9857 "All arguments passed to set(...) must be descendant nodes.");
9858
9859 static_assert(
9860 AllArgsDecayedAreUnique<Args...>::value,
9861 "Found duplicate types among the arguments passed to set(...). "
9862 "Types should be listed at most once.");
9863
9864 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
9865 }
9866
9880#ifndef NO_DOC
9881 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
9882#else
9883 template<typename... Args>
9884#endif
9885 Smoothing copyWith(Args &&...args) const
9886 {
9887 using namespace Zivid::Detail::TypeTraits;
9888
9889 using AllArgsAreDescendantNodes =
9890 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
9891 static_assert(
9892 AllArgsAreDescendantNodes::value,
9893 "All arguments passed to copyWith(...) must be descendant nodes.");
9894
9895 static_assert(
9896 AllArgsDecayedAreUnique<Args...>::value,
9897 "Found duplicate types among the arguments passed to copyWith(...). "
9898 "Types should be listed at most once.");
9899
9900 auto copy{ *this };
9901 copy.set(std::forward<Args>(args)...);
9902 return copy;
9903 }
9904
9906 const Gaussian &gaussian() const
9907 {
9908 return m_gaussian;
9909 }
9910
9913 {
9914 return m_gaussian;
9915 }
9916
9918 Smoothing &set(const Gaussian &value)
9919 {
9920 m_gaussian = value;
9921 return *this;
9922 }
9923
9926 {
9927 m_gaussian.set(value);
9928 return *this;
9929 }
9930
9933 {
9934 m_gaussian.set(value);
9935 return *this;
9936 }
9937
9938 template<
9939 typename T,
9940 typename std::enable_if<
9941 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9942 int>::type = 0>
9944 {
9945 return m_gaussian;
9946 }
9947
9948 template<
9949 typename T,
9950 typename std::enable_if<
9951 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9952 int>::type = 0>
9954 {
9956 }
9957
9958 template<
9959 typename T,
9960 typename std::enable_if<
9961 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9962 int>::type = 0>
9964 {
9966 }
9967
9968 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9970 {
9971 return m_gaussian;
9972 }
9973
9975 template<typename F>
9976 void forEach(const F &f) const
9977 {
9978 f(m_gaussian);
9979 }
9980
9982 template<typename F>
9983 void forEach(const F &f)
9984 {
9985 f(m_gaussian);
9986 }
9987
9989 bool operator==(const Smoothing &other) const;
9990
9992 bool operator!=(const Smoothing &other) const;
9993
9995 std::string toString() const;
9996
9998 friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
9999 {
10000 return stream << value.toString();
10001 }
10002
10003 private:
10004 void setFromString(const std::string &value);
10005
10006 void setFromString(const std::string &fullPath, const std::string &value);
10007
10008 std::string getString(const std::string &fullPath) const;
10009
10010 Gaussian m_gaussian;
10011
10012 friend struct DataModel::Detail::Befriend<Smoothing>;
10013 };
10014
10015 using Descendants = std::tuple<
10054
10057
10106#ifndef NO_DOC
10107 template<
10108 typename... Args,
10109 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
10110 typename std::enable_if<
10111 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
10112 value,
10113 int>::type = 0>
10114#else
10115 template<typename... Args>
10116#endif
10117 explicit Filters(Args &&...args)
10118 {
10119 using namespace Zivid::Detail::TypeTraits;
10120
10121 static_assert(
10122 AllArgsDecayedAreUnique<Args...>::value,
10123 "Found duplicate types among the arguments passed to Filters(...). "
10124 "Types should be listed at most once.");
10125
10126 set(std::forward<Args>(args)...);
10127 }
10128
10176#ifndef NO_DOC
10177 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
10178#else
10179 template<typename... Args>
10180#endif
10181 void set(Args &&...args)
10182 {
10183 using namespace Zivid::Detail::TypeTraits;
10184
10185 using AllArgsAreDescendantNodes =
10186 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10187 static_assert(
10188 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
10189
10190 static_assert(
10191 AllArgsDecayedAreUnique<Args...>::value,
10192 "Found duplicate types among the arguments passed to set(...). "
10193 "Types should be listed at most once.");
10194
10195 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
10196 }
10197
10246#ifndef NO_DOC
10247 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
10248#else
10249 template<typename... Args>
10250#endif
10251 Filters copyWith(Args &&...args) const
10252 {
10253 using namespace Zivid::Detail::TypeTraits;
10254
10255 using AllArgsAreDescendantNodes =
10256 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
10257 static_assert(
10258 AllArgsAreDescendantNodes::value,
10259 "All arguments passed to copyWith(...) must be descendant nodes.");
10260
10261 static_assert(
10262 AllArgsDecayedAreUnique<Args...>::value,
10263 "Found duplicate types among the arguments passed to copyWith(...). "
10264 "Types should be listed at most once.");
10265
10266 auto copy{ *this };
10267 copy.set(std::forward<Args>(args)...);
10268 return copy;
10269 }
10270
10272 const Cluster &cluster() const
10273 {
10274 return m_cluster;
10275 }
10276
10279 {
10280 return m_cluster;
10281 }
10282
10284 Filters &set(const Cluster &value)
10285 {
10286 m_cluster = value;
10287 return *this;
10288 }
10289
10292 {
10293 m_cluster.set(value);
10294 return *this;
10295 }
10296
10299 {
10300 m_cluster.set(value);
10301 return *this;
10302 }
10303
10306 {
10307 m_cluster.set(value);
10308 return *this;
10309 }
10310
10313 {
10314 m_cluster.set(value);
10315 return *this;
10316 }
10317
10320 {
10321 return m_experimental;
10322 }
10323
10326 {
10327 return m_experimental;
10328 }
10329
10331 Filters &set(const Experimental &value)
10332 {
10333 m_experimental = value;
10334 return *this;
10335 }
10336
10339 {
10340 m_experimental.set(value);
10341 return *this;
10342 }
10343
10346 {
10347 m_experimental.set(value);
10348 return *this;
10349 }
10350
10353 {
10354 m_experimental.set(value);
10355 return *this;
10356 }
10357
10360 {
10361 m_experimental.set(value);
10362 return *this;
10363 }
10364
10367 {
10368 m_experimental.set(value);
10369 return *this;
10370 }
10371
10374 {
10375 m_experimental.set(value);
10376 return *this;
10377 }
10378
10381 {
10382 m_experimental.set(value);
10383 return *this;
10384 }
10385
10387 const Hole &hole() const
10388 {
10389 return m_hole;
10390 }
10391
10394 {
10395 return m_hole;
10396 }
10397
10399 Filters &set(const Hole &value)
10400 {
10401 m_hole = value;
10402 return *this;
10403 }
10404
10406 Filters &set(const Hole::Repair &value)
10407 {
10408 m_hole.set(value);
10409 return *this;
10410 }
10411
10414 {
10415 m_hole.set(value);
10416 return *this;
10417 }
10418
10421 {
10422 m_hole.set(value);
10423 return *this;
10424 }
10425
10428 {
10429 m_hole.set(value);
10430 return *this;
10431 }
10432
10434 const Noise &noise() const
10435 {
10436 return m_noise;
10437 }
10438
10441 {
10442 return m_noise;
10443 }
10444
10446 Filters &set(const Noise &value)
10447 {
10448 m_noise = value;
10449 return *this;
10450 }
10451
10454 {
10455 m_noise.set(value);
10456 return *this;
10457 }
10458
10461 {
10462 m_noise.set(value);
10463 return *this;
10464 }
10465
10468 {
10469 m_noise.set(value);
10470 return *this;
10471 }
10472
10475 {
10476 m_noise.set(value);
10477 return *this;
10478 }
10479
10482 {
10483 m_noise.set(value);
10484 return *this;
10485 }
10486
10489 {
10490 m_noise.set(value);
10491 return *this;
10492 }
10493
10496 {
10497 m_noise.set(value);
10498 return *this;
10499 }
10500
10502 const Outlier &outlier() const
10503 {
10504 return m_outlier;
10505 }
10506
10509 {
10510 return m_outlier;
10511 }
10512
10514 Filters &set(const Outlier &value)
10515 {
10516 m_outlier = value;
10517 return *this;
10518 }
10519
10522 {
10523 m_outlier.set(value);
10524 return *this;
10525 }
10526
10529 {
10530 m_outlier.set(value);
10531 return *this;
10532 }
10533
10536 {
10537 m_outlier.set(value);
10538 return *this;
10539 }
10540
10542 const Reflection &reflection() const
10543 {
10544 return m_reflection;
10545 }
10546
10549 {
10550 return m_reflection;
10551 }
10552
10554 Filters &set(const Reflection &value)
10555 {
10556 m_reflection = value;
10557 return *this;
10558 }
10559
10562 {
10563 m_reflection.set(value);
10564 return *this;
10565 }
10566
10569 {
10570 m_reflection.set(value);
10571 return *this;
10572 }
10573
10576 {
10577 m_reflection.set(value);
10578 return *this;
10579 }
10580
10582 const Smoothing &smoothing() const
10583 {
10584 return m_smoothing;
10585 }
10586
10589 {
10590 return m_smoothing;
10591 }
10592
10594 Filters &set(const Smoothing &value)
10595 {
10596 m_smoothing = value;
10597 return *this;
10598 }
10599
10602 {
10603 m_smoothing.set(value);
10604 return *this;
10605 }
10606
10609 {
10610 m_smoothing.set(value);
10611 return *this;
10612 }
10613
10616 {
10617 m_smoothing.set(value);
10618 return *this;
10619 }
10620
10621 template<
10622 typename T,
10623 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type =
10624 0>
10626 {
10627 return m_cluster;
10628 }
10629
10630 template<
10631 typename T,
10632 typename std::enable_if<
10633 std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::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::Enabled>::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::MaxNeighborDistance>::value,
10654 int>::type = 0>
10656 {
10658 }
10659
10660 template<
10661 typename T,
10662 typename std::enable_if<
10663 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
10664 int>::type = 0>
10666 {
10668 }
10669
10670 template<
10671 typename T,
10672 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
10673 type = 0>
10675 {
10676 return m_experimental;
10677 }
10678
10679 template<
10680 typename T,
10681 typename std::enable_if<
10682 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
10683 int>::type = 0>
10685 {
10687 }
10688
10689 template<
10690 typename T,
10691 typename std::enable_if<
10692 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
10693 value,
10694 int>::type = 0>
10696 {
10697 return m_experimental
10699 }
10700
10701 template<
10702 typename T,
10703 typename std::enable_if<
10704 std::is_same<
10705 T,
10707 value,
10708 int>::type = 0>
10710 {
10711 return m_experimental
10713 }
10714
10715 template<
10716 typename T,
10717 typename std::enable_if<
10718 std::is_same<
10719 T,
10721 value,
10722 int>::type = 0>
10724 {
10725 return m_experimental
10727 }
10728
10729 template<
10730 typename T,
10731 typename std::enable_if<
10732 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
10733 value,
10734 int>::type = 0>
10736 {
10737 return m_experimental
10739 }
10740
10741 template<
10742 typename T,
10743 typename std::enable_if<
10744 std::is_same<
10745 T,
10747 int>::type = 0>
10749 {
10750 return m_experimental
10752 }
10753
10754 template<
10755 typename T,
10756 typename std::enable_if<
10757 std::is_same<
10758 T,
10760 int>::type = 0>
10762 {
10763 return m_experimental
10765 }
10766
10767 template<
10768 typename T,
10769 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
10771 {
10772 return m_hole;
10773 }
10774
10775 template<
10776 typename T,
10777 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
10778 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::Enabled>::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::HoleSize>::value,
10798 int>::type = 0>
10800 {
10802 }
10803
10804 template<
10805 typename T,
10806 typename std::enable_if<
10807 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
10808 int>::type = 0>
10810 {
10812 }
10813
10814 template<
10815 typename T,
10816 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type =
10817 0>
10819 {
10820 return m_noise;
10821 }
10822
10823 template<
10824 typename T,
10825 typename std::
10826 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, 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::Enabled>::value,
10836 int>::type = 0>
10838 {
10840 }
10841
10842 template<
10843 typename T,
10844 typename std::enable_if<
10845 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
10846 int>::type = 0>
10848 {
10850 }
10851
10852 template<
10853 typename T,
10854 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
10855 type = 0>
10857 {
10859 }
10860
10861 template<
10862 typename T,
10863 typename std::enable_if<
10864 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::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>::value,
10875 int>::type = 0>
10877 {
10879 }
10880
10881 template<
10882 typename T,
10883 typename std::enable_if<
10884 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
10885 int>::type = 0>
10887 {
10889 }
10890
10891 template<
10892 typename T,
10893 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type =
10894 0>
10896 {
10897 return m_outlier;
10898 }
10899
10900 template<
10901 typename T,
10902 typename std::enable_if<
10903 std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::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::Enabled>::value,
10914 int>::type = 0>
10916 {
10918 }
10919
10920 template<
10921 typename T,
10922 typename std::enable_if<
10923 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
10924 int>::type = 0>
10926 {
10928 }
10929
10930 template<
10931 typename T,
10932 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::
10933 type = 0>
10935 {
10936 return m_reflection;
10937 }
10938
10939 template<
10940 typename T,
10941 typename std::enable_if<
10942 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::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::Enabled>::value,
10953 int>::type = 0>
10955 {
10957 }
10958
10959 template<
10960 typename T,
10961 typename std::enable_if<
10962 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
10963 int>::type = 0>
10965 {
10967 }
10968
10969 template<
10970 typename T,
10971 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::
10972 type = 0>
10974 {
10975 return m_smoothing;
10976 }
10977
10978 template<
10979 typename T,
10980 typename std::enable_if<
10981 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::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::Enabled>::value,
10992 int>::type = 0>
10994 {
10996 }
10997
10998 template<
10999 typename T,
11000 typename std::enable_if<
11001 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
11002 int>::type = 0>
11004 {
11006 }
11007
11008 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11010 {
11011 return m_cluster;
11012 }
11013
11014 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
11016 {
11017 return m_experimental;
11018 }
11019
11020 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
11022 {
11023 return m_hole;
11024 }
11025
11026 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
11028 {
11029 return m_noise;
11030 }
11031
11032 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
11034 {
11035 return m_outlier;
11036 }
11037
11038 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
11040 {
11041 return m_reflection;
11042 }
11043
11044 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
11046 {
11047 return m_smoothing;
11048 }
11049
11051 template<typename F>
11052 void forEach(const F &f) const
11053 {
11054 f(m_cluster);
11055 f(m_experimental);
11056 f(m_hole);
11057 f(m_noise);
11058 f(m_outlier);
11059 f(m_reflection);
11060 f(m_smoothing);
11061 }
11062
11064 template<typename F>
11065 void forEach(const F &f)
11066 {
11067 f(m_cluster);
11068 f(m_experimental);
11069 f(m_hole);
11070 f(m_noise);
11071 f(m_outlier);
11072 f(m_reflection);
11073 f(m_smoothing);
11074 }
11075
11077 bool operator==(const Filters &other) const;
11078
11080 bool operator!=(const Filters &other) const;
11081
11083 std::string toString() const;
11084
11086 friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
11087 {
11088 return stream << value.toString();
11089 }
11090
11091 private:
11092 void setFromString(const std::string &value);
11093
11094 void setFromString(const std::string &fullPath, const std::string &value);
11095
11096 std::string getString(const std::string &fullPath) const;
11097
11098 Cluster m_cluster;
11099 Experimental m_experimental;
11100 Hole m_hole;
11101 Noise m_noise;
11102 Outlier m_outlier;
11103 Reflection m_reflection;
11104 Smoothing m_smoothing;
11105
11106 friend struct DataModel::Detail::Befriend<Filters>;
11107 };
11108
11111
11112 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11114 {
11115 public:
11117 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
11118
11120 static constexpr const char *path{ "Processing/Resampling" };
11121
11123 static constexpr const char *name{ "Resampling" };
11124
11126 static constexpr const char *description{
11127 R"description(Settings for changing the output resolution of the point cloud.
11128)description"
11129 };
11130
11154
11155 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
11157 {
11158 public:
11160 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
11161
11163 static constexpr const char *path{ "Processing/Resampling/Mode" };
11164
11166 static constexpr const char *name{ "Mode" };
11167
11169 static constexpr const char *description{
11170 R"description(Setting for upsampling or downsampling the point cloud data by some factor. This operation
11171is performed after all other processing has been completed.
11172
11173Downsampling is used to reduce the number of points in the point cloud. This is done by
11174combining each 2x2 or 4x4 group of pixels in the original point cloud into one pixel in
11175a new point cloud. This downsample functionality is identical to the downsample method
11176on the PointCloud class. The averaging process reduces noise in the point cloud, but it
11177will not improve capture speed. To improve capture speed, consider using the subsampling
11178modes found in Settings/Sampling/Pixel.
11179
11180Upsampling is used to increase the number of points in the point cloud. It is not possible
11181to upsample beyond the full resolution of the camera, so upsampling may only be used in
11182combination with the subsampling modes found in Settings/Sampling/Pixel. For example, one may
11183combine blueSubsample2x2 with upsample2x2 to obtain a point cloud that matches a full
11184resolution 2D capture, while retaining the speed benefits of capturing the point cloud with
11185blueSubsample2x2. Upsampling is achieved by expanding pixels in the original point cloud into
11186groups of 2x2 or 4x4 pixels in a new point cloud. Where possible, values are filled at the
11187new points based on an interpolation of the surrounding original points. The points in the
11188new point cloud that correspond to points in the original point cloud are left unchanged.
11189Note that upsampling will lead to four (upsample2x2) or sixteen (upsample4x4) times as many
11190pixels in the point cloud compared to no upsampling, so users should be aware of increased
11191computational cost related to copying and analyzing this data.
11192)description"
11193 };
11194
11196 enum class ValueType
11197 {
11198 disabled,
11199 downsample2x2,
11200 downsample4x4,
11201 upsample2x2,
11202 upsample4x4
11203 };
11204 static const Mode disabled;
11205 static const Mode downsample2x2;
11206 static const Mode downsample4x4;
11207 static const Mode upsample2x2;
11208 static const Mode upsample4x4;
11209
11211 static std::set<ValueType> validValues()
11212 {
11213 return { ValueType::disabled,
11214 ValueType::downsample2x2,
11215 ValueType::downsample4x4,
11216 ValueType::upsample2x2,
11217 ValueType::upsample4x4 };
11218 }
11219
11221 Mode() = default;
11222
11224 explicit constexpr Mode(ValueType value)
11225 : m_opt{ verifyValue(value) }
11226 {}
11227
11233
11235 bool hasValue() const;
11236
11238 void reset();
11239
11241 std::string toString() const;
11242
11244 friend std::ostream &operator<<(std::ostream &stream, const Mode::ValueType &value)
11245 {
11246 return stream << Mode{ value }.toString();
11247 }
11248
11250 bool operator==(const Mode &other) const
11251 {
11252 return m_opt == other.m_opt;
11253 }
11254
11256 bool operator!=(const Mode &other) const
11257 {
11258 return m_opt != other.m_opt;
11259 }
11260
11262 friend std::ostream &operator<<(std::ostream &stream, const Mode &value)
11263 {
11264 return stream << value.toString();
11265 }
11266
11267 private:
11268 void setFromString(const std::string &value);
11269
11270 constexpr ValueType static verifyValue(const ValueType &value)
11271 {
11272 return value == ValueType::disabled || value == ValueType::downsample2x2
11273 || value == ValueType::downsample4x4 || value == ValueType::upsample2x2
11274 || value == ValueType::upsample4x4
11275 ? value
11276 : throw std::invalid_argument{
11277 "Invalid value: Mode{ "
11278 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value))
11279 + " }"
11280 };
11281 }
11282
11283 std::optional<ValueType> m_opt;
11284
11285 friend struct DataModel::Detail::Befriend<Mode>;
11286 };
11287
11288 using Descendants = std::tuple<Settings::Processing::Resampling::Mode>;
11289
11292
11304#ifndef NO_DOC
11305 template<
11306 typename... Args,
11307 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11308 typename std::enable_if<
11309 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11310 value,
11311 int>::type = 0>
11312#else
11313 template<typename... Args>
11314#endif
11315 explicit Resampling(Args &&...args)
11316 {
11317 using namespace Zivid::Detail::TypeTraits;
11318
11319 static_assert(
11320 AllArgsDecayedAreUnique<Args...>::value,
11321 "Found duplicate types among the arguments passed to Resampling(...). "
11322 "Types should be listed at most once.");
11323
11324 set(std::forward<Args>(args)...);
11325 }
11326
11337#ifndef NO_DOC
11338 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11339#else
11340 template<typename... Args>
11341#endif
11342 void set(Args &&...args)
11343 {
11344 using namespace Zivid::Detail::TypeTraits;
11345
11346 using AllArgsAreDescendantNodes =
11347 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11348 static_assert(
11349 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11350
11351 static_assert(
11352 AllArgsDecayedAreUnique<Args...>::value,
11353 "Found duplicate types among the arguments passed to set(...). "
11354 "Types should be listed at most once.");
11355
11356 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11357 }
11358
11370#ifndef NO_DOC
11371 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11372#else
11373 template<typename... Args>
11374#endif
11375 Resampling copyWith(Args &&...args) const
11376 {
11377 using namespace Zivid::Detail::TypeTraits;
11378
11379 using AllArgsAreDescendantNodes =
11380 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11381 static_assert(
11382 AllArgsAreDescendantNodes::value,
11383 "All arguments passed to copyWith(...) must be descendant nodes.");
11384
11385 static_assert(
11386 AllArgsDecayedAreUnique<Args...>::value,
11387 "Found duplicate types among the arguments passed to copyWith(...). "
11388 "Types should be listed at most once.");
11389
11390 auto copy{ *this };
11391 copy.set(std::forward<Args>(args)...);
11392 return copy;
11393 }
11394
11396 const Mode &mode() const
11397 {
11398 return m_mode;
11399 }
11400
11403 {
11404 return m_mode;
11405 }
11406
11408 Resampling &set(const Mode &value)
11409 {
11410 m_mode = value;
11411 return *this;
11412 }
11413
11414 template<
11415 typename T,
11416 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type =
11417 0>
11419 {
11420 return m_mode;
11421 }
11422
11423 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
11425 {
11426 return m_mode;
11427 }
11428
11430 template<typename F>
11431 void forEach(const F &f) const
11432 {
11433 f(m_mode);
11434 }
11435
11437 template<typename F>
11438 void forEach(const F &f)
11439 {
11440 f(m_mode);
11441 }
11442
11444 bool operator==(const Resampling &other) const;
11445
11447 bool operator!=(const Resampling &other) const;
11448
11450 std::string toString() const;
11451
11453 friend std::ostream &operator<<(std::ostream &stream, const Resampling &value)
11454 {
11455 return stream << value.toString();
11456 }
11457
11458 private:
11459 void setFromString(const std::string &value);
11460
11461 void setFromString(const std::string &fullPath, const std::string &value);
11462
11463 std::string getString(const std::string &fullPath) const;
11464
11465 Mode m_mode;
11466
11467 friend struct DataModel::Detail::Befriend<Resampling>;
11468 };
11469
11470 using Descendants = std::tuple<
11520
11523
11583#ifndef NO_DOC
11584 template<
11585 typename... Args,
11586 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
11587 typename std::enable_if<
11588 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
11589 value,
11590 int>::type = 0>
11591#else
11592 template<typename... Args>
11593#endif
11594 explicit Processing(Args &&...args)
11595 {
11596 using namespace Zivid::Detail::TypeTraits;
11597
11598 static_assert(
11599 AllArgsDecayedAreUnique<Args...>::value,
11600 "Found duplicate types among the arguments passed to Processing(...). "
11601 "Types should be listed at most once.");
11602
11603 set(std::forward<Args>(args)...);
11604 }
11605
11664#ifndef NO_DOC
11665 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
11666#else
11667 template<typename... Args>
11668#endif
11669 void set(Args &&...args)
11670 {
11671 using namespace Zivid::Detail::TypeTraits;
11672
11673 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11674 static_assert(
11675 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
11676
11677 static_assert(
11678 AllArgsDecayedAreUnique<Args...>::value,
11679 "Found duplicate types among the arguments passed to set(...). "
11680 "Types should be listed at most once.");
11681
11682 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
11683 }
11684
11744#ifndef NO_DOC
11745 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
11746#else
11747 template<typename... Args>
11748#endif
11749 Processing copyWith(Args &&...args) const
11750 {
11751 using namespace Zivid::Detail::TypeTraits;
11752
11753 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
11754 static_assert(
11755 AllArgsAreDescendantNodes::value,
11756 "All arguments passed to copyWith(...) must be descendant nodes.");
11757
11758 static_assert(
11759 AllArgsDecayedAreUnique<Args...>::value,
11760 "Found duplicate types among the arguments passed to copyWith(...). "
11761 "Types should be listed at most once.");
11762
11763 auto copy{ *this };
11764 copy.set(std::forward<Args>(args)...);
11765 return copy;
11766 }
11767
11769 const Color &color() const
11770 {
11771 return m_color;
11772 }
11773
11776 {
11777 return m_color;
11778 }
11779
11781 Processing &set(const Color &value)
11782 {
11783 m_color = value;
11784 return *this;
11785 }
11786
11789 {
11790 m_color.set(value);
11791 return *this;
11792 }
11793
11796 {
11797 m_color.set(value);
11798 return *this;
11799 }
11800
11803 {
11804 m_color.set(value);
11805 return *this;
11806 }
11807
11810 {
11811 m_color.set(value);
11812 return *this;
11813 }
11814
11817 {
11818 m_color.set(value);
11819 return *this;
11820 }
11821
11824 {
11825 m_color.set(value);
11826 return *this;
11827 }
11828
11831 {
11832 m_color.set(value);
11833 return *this;
11834 }
11835
11837 const Filters &filters() const
11838 {
11839 return m_filters;
11840 }
11841
11844 {
11845 return m_filters;
11846 }
11847
11849 Processing &set(const Filters &value)
11850 {
11851 m_filters = value;
11852 return *this;
11853 }
11854
11857 {
11858 m_filters.set(value);
11859 return *this;
11860 }
11861
11864 {
11865 m_filters.set(value);
11866 return *this;
11867 }
11868
11871 {
11872 m_filters.set(value);
11873 return *this;
11874 }
11875
11878 {
11879 m_filters.set(value);
11880 return *this;
11881 }
11882
11885 {
11886 m_filters.set(value);
11887 return *this;
11888 }
11889
11892 {
11893 m_filters.set(value);
11894 return *this;
11895 }
11896
11899 {
11900 m_filters.set(value);
11901 return *this;
11902 }
11903
11906 {
11907 m_filters.set(value);
11908 return *this;
11909 }
11910
11913 {
11914 m_filters.set(value);
11915 return *this;
11916 }
11917
11920 {
11921 m_filters.set(value);
11922 return *this;
11923 }
11924
11927 {
11928 m_filters.set(value);
11929 return *this;
11930 }
11931
11934 {
11935 m_filters.set(value);
11936 return *this;
11937 }
11938
11941 {
11942 m_filters.set(value);
11943 return *this;
11944 }
11945
11948 {
11949 m_filters.set(value);
11950 return *this;
11951 }
11952
11955 {
11956 m_filters.set(value);
11957 return *this;
11958 }
11959
11962 {
11963 m_filters.set(value);
11964 return *this;
11965 }
11966
11969 {
11970 m_filters.set(value);
11971 return *this;
11972 }
11973
11976 {
11977 m_filters.set(value);
11978 return *this;
11979 }
11980
11983 {
11984 m_filters.set(value);
11985 return *this;
11986 }
11987
11990 {
11991 m_filters.set(value);
11992 return *this;
11993 }
11994
11997 {
11998 m_filters.set(value);
11999 return *this;
12000 }
12001
12004 {
12005 m_filters.set(value);
12006 return *this;
12007 }
12008
12011 {
12012 m_filters.set(value);
12013 return *this;
12014 }
12015
12018 {
12019 m_filters.set(value);
12020 return *this;
12021 }
12022
12025 {
12026 m_filters.set(value);
12027 return *this;
12028 }
12029
12032 {
12033 m_filters.set(value);
12034 return *this;
12035 }
12036
12039 {
12040 m_filters.set(value);
12041 return *this;
12042 }
12043
12046 {
12047 m_filters.set(value);
12048 return *this;
12049 }
12050
12053 {
12054 m_filters.set(value);
12055 return *this;
12056 }
12057
12060 {
12061 m_filters.set(value);
12062 return *this;
12063 }
12064
12067 {
12068 m_filters.set(value);
12069 return *this;
12070 }
12071
12074 {
12075 m_filters.set(value);
12076 return *this;
12077 }
12078
12081 {
12082 m_filters.set(value);
12083 return *this;
12084 }
12085
12088 {
12089 m_filters.set(value);
12090 return *this;
12091 }
12092
12095 {
12096 m_filters.set(value);
12097 return *this;
12098 }
12099
12102 {
12103 m_filters.set(value);
12104 return *this;
12105 }
12106
12109 {
12110 m_filters.set(value);
12111 return *this;
12112 }
12113
12116 {
12117 m_filters.set(value);
12118 return *this;
12119 }
12120
12122 const Resampling &resampling() const
12123 {
12124 return m_resampling;
12125 }
12126
12129 {
12130 return m_resampling;
12131 }
12132
12135 {
12136 m_resampling = value;
12137 return *this;
12138 }
12139
12142 {
12143 m_resampling.set(value);
12144 return *this;
12145 }
12146
12147 template<
12148 typename T,
12149 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
12151 {
12152 return m_color;
12153 }
12154
12155 template<
12156 typename T,
12157 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
12159 {
12160 return m_color.get<Settings::Processing::Color::Balance>();
12161 }
12162
12163 template<
12164 typename T,
12165 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type =
12166 0>
12168 {
12169 return m_color.get<Settings::Processing::Color::Balance::Blue>();
12170 }
12171
12172 template<
12173 typename T,
12174 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::
12175 type = 0>
12177 {
12178 return m_color.get<Settings::Processing::Color::Balance::Green>();
12179 }
12180
12181 template<
12182 typename T,
12183 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type =
12184 0>
12186 {
12187 return m_color.get<Settings::Processing::Color::Balance::Red>();
12188 }
12189
12190 template<
12191 typename T,
12192 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type =
12193 0>
12195 {
12197 }
12198
12199 template<
12200 typename T,
12201 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
12202 type = 0>
12204 {
12206 }
12207
12208 template<
12209 typename T,
12210 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
12212 {
12213 return m_color.get<Settings::Processing::Color::Gamma>();
12214 }
12215
12216 template<
12217 typename T,
12218 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
12220 {
12221 return m_filters;
12222 }
12223
12224 template<
12225 typename T,
12226 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
12228 {
12229 return m_filters.get<Settings::Processing::Filters::Cluster>();
12230 }
12231
12232 template<
12233 typename T,
12234 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
12235 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::Enabled>::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::MaxNeighborDistance>::value,
12255 int>::type = 0>
12257 {
12259 }
12260
12261 template<
12262 typename T,
12263 typename std::enable_if<
12264 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
12265 int>::type = 0>
12267 {
12269 }
12270
12271 template<
12272 typename T,
12273 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::
12274 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>::value,
12284 int>::type = 0>
12286 {
12288 }
12289
12290 template<
12291 typename T,
12292 typename std::enable_if<
12293 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
12294 int>::type = 0>
12296 {
12298 }
12299
12300 template<
12301 typename T,
12302 typename std::enable_if<
12303 std::is_same<
12304 T,
12306 int>::type = 0>
12308 {
12309 return m_filters
12311 }
12312
12313 template<
12314 typename T,
12315 typename std::enable_if<
12316 std::is_same<
12317 T,
12319 int>::type = 0>
12321 {
12322 return m_filters
12324 }
12325
12326 template<
12327 typename T,
12328 typename std::enable_if<
12329 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
12330 int>::type = 0>
12332 {
12334 }
12335
12336 template<
12337 typename T,
12338 typename std::enable_if<
12339 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
12340 value,
12341 int>::type = 0>
12343 {
12344 return m_filters
12346 }
12347
12348 template<
12349 typename T,
12350 typename std::enable_if<
12351 std::is_same<
12352 T,
12354 int>::type = 0>
12356 {
12357 return m_filters
12359 }
12360
12361 template<
12362 typename T,
12363 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
12365 {
12366 return m_filters.get<Settings::Processing::Filters::Hole>();
12367 }
12368
12369 template<
12370 typename T,
12371 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::
12372 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::Enabled>::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::HoleSize>::value,
12392 int>::type = 0>
12394 {
12396 }
12397
12398 template<
12399 typename T,
12400 typename std::enable_if<
12401 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
12402 int>::type = 0>
12404 {
12406 }
12407
12408 template<
12409 typename T,
12410 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
12412 {
12413 return m_filters.get<Settings::Processing::Filters::Noise>();
12414 }
12415
12416 template<
12417 typename T,
12418 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::
12419 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::Enabled>::value,
12429 int>::type = 0>
12431 {
12433 }
12434
12435 template<
12436 typename T,
12437 typename std::enable_if<
12438 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
12439 int>::type = 0>
12441 {
12443 }
12444
12445 template<
12446 typename T,
12447 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::
12448 type = 0>
12450 {
12452 }
12453
12454 template<
12455 typename T,
12456 typename std::enable_if<
12457 std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value,
12458 int>::type = 0>
12460 {
12462 }
12463
12464 template<
12465 typename T,
12466 typename std::
12467 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::type = 0>
12469 {
12471 }
12472
12473 template<
12474 typename T,
12475 typename std::enable_if<
12476 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
12477 int>::type = 0>
12479 {
12481 }
12482
12483 template<
12484 typename T,
12485 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
12487 {
12488 return m_filters.get<Settings::Processing::Filters::Outlier>();
12489 }
12490
12491 template<
12492 typename T,
12493 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
12494 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::Enabled>::value,
12504 int>::type = 0>
12506 {
12508 }
12509
12510 template<
12511 typename T,
12512 typename std::enable_if<
12513 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
12514 int>::type = 0>
12516 {
12518 }
12519
12520 template<
12521 typename T,
12522 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type =
12523 0>
12525 {
12527 }
12528
12529 template<
12530 typename T,
12531 typename std::enable_if<
12532 std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::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::Enabled>::value,
12543 int>::type = 0>
12545 {
12547 }
12548
12549 template<
12550 typename T,
12551 typename std::enable_if<
12552 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
12553 int>::type = 0>
12555 {
12557 }
12558
12559 template<
12560 typename T,
12561 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type =
12562 0>
12564 {
12566 }
12567
12568 template<
12569 typename T,
12570 typename std::enable_if<
12571 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::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::Enabled>::value,
12582 int>::type = 0>
12584 {
12586 }
12587
12588 template<
12589 typename T,
12590 typename std::enable_if<
12591 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
12592 int>::type = 0>
12594 {
12596 }
12597
12598 template<
12599 typename T,
12600 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
12602 {
12603 return m_resampling;
12604 }
12605
12606 template<
12607 typename T,
12608 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
12610 {
12611 return m_resampling.get<Settings::Processing::Resampling::Mode>();
12612 }
12613
12614 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
12616 {
12617 return m_color;
12618 }
12619
12620 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
12622 {
12623 return m_filters;
12624 }
12625
12626 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
12628 {
12629 return m_resampling;
12630 }
12631
12633 template<typename F>
12634 void forEach(const F &f) const
12635 {
12636 f(m_color);
12637 f(m_filters);
12638 f(m_resampling);
12639 }
12640
12642 template<typename F>
12643 void forEach(const F &f)
12644 {
12645 f(m_color);
12646 f(m_filters);
12647 f(m_resampling);
12648 }
12649
12651 bool operator==(const Processing &other) const;
12652
12654 bool operator!=(const Processing &other) const;
12655
12657 std::string toString() const;
12658
12660 friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
12661 {
12662 return stream << value.toString();
12663 }
12664
12665 private:
12666 void setFromString(const std::string &value);
12667
12668 void setFromString(const std::string &fullPath, const std::string &value);
12669
12670 std::string getString(const std::string &fullPath) const;
12671
12672 Color m_color;
12673 Filters m_filters;
12674 Resampling m_resampling;
12675
12676 friend struct DataModel::Detail::Befriend<Processing>;
12677 };
12678
12681
12682 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12684 {
12685 public:
12687 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12688
12690 static constexpr const char *path{ "RegionOfInterest" };
12691
12693 static constexpr const char *name{ "RegionOfInterest" };
12694
12696 static constexpr const char *description{ R"description(Removes points outside the region of interest.
12697)description" };
12698
12715
12716 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12718 {
12719 public:
12721 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
12722
12724 static constexpr const char *path{ "RegionOfInterest/Box" };
12725
12727 static constexpr const char *name{ "Box" };
12728
12730 static constexpr const char *description{
12731 R"description(Removes points outside the given three-dimensional box.
12732
12733Using this feature may significantly speed up acquisition and processing time, because
12734one can avoid acquiring and processing data that is guaranteed to fall outside of the
12735region of interest. The degree of speed-up depends on the size and shape of the box.
12736Generally, a smaller box yields a greater speed-up.
12737
12738The box is defined by three points: O, A and B. These points define two vectors,
12739OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
12740This gives 4 points O, A, B and (O + OA + OB), that together form a
12741parallelogram in 3D.
12742
12743Two extents can be provided, to extrude the parallelogram along the surface
12744normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
12745The surface normal vector is defined by the cross product OA x OB.
12746)description"
12747 };
12748
12750
12751 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12753 {
12754 public:
12756 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12757
12759 static constexpr const char *path{ "RegionOfInterest/Box/Enabled" };
12760
12762 static constexpr const char *name{ "Enabled" };
12763
12765 static constexpr const char *description{
12766 R"description(Enable or disable box filter.)description"
12767 };
12768
12770 using ValueType = bool;
12771 static const Enabled yes;
12772 static const Enabled no;
12773
12775 static std::set<bool> validValues()
12776 {
12777 return { false, true };
12778 }
12779
12781 Enabled() = default;
12782
12784 explicit constexpr Enabled(bool value)
12785 : m_opt{ value }
12786 {}
12787
12792 bool value() const;
12793
12795 bool hasValue() const;
12796
12798 void reset();
12799
12801 std::string toString() const;
12802
12804 bool operator==(const Enabled &other) const
12805 {
12806 return m_opt == other.m_opt;
12807 }
12808
12810 bool operator!=(const Enabled &other) const
12811 {
12812 return m_opt != other.m_opt;
12813 }
12814
12816 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
12817 {
12818 return stream << value.toString();
12819 }
12820
12821 private:
12822 void setFromString(const std::string &value);
12823
12824 std::optional<bool> m_opt;
12825
12826 friend struct DataModel::Detail::Befriend<Enabled>;
12827 };
12828
12830
12831 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12833 {
12834 public:
12836 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12837
12839 static constexpr const char *path{ "RegionOfInterest/Box/Extents" };
12840
12842 static constexpr const char *name{ "Extents" };
12843
12845 static constexpr const char *description{
12846 R"description(Two points on the normal describing the direction and distance from the plane from which the normal is derived.)description"
12847 };
12848
12851
12853 Extents() = default;
12854
12856 explicit constexpr Extents(Zivid::Range<double> value)
12857 : m_opt{ value }
12858 {}
12859
12865
12867 bool hasValue() const;
12868
12870 void reset();
12871
12873 std::string toString() const;
12874
12876 explicit constexpr Extents(double minValue, double maxValue)
12877 : Extents{ Zivid::Range<double>{ minValue, maxValue } }
12878 {}
12879
12881 bool operator==(const Extents &other) const
12882 {
12883 return m_opt == other.m_opt;
12884 }
12885
12887 bool operator!=(const Extents &other) const
12888 {
12889 return m_opt != other.m_opt;
12890 }
12891
12893 friend std::ostream &operator<<(std::ostream &stream, const Extents &value)
12894 {
12895 return stream << value.toString();
12896 }
12897
12898 private:
12899 void setFromString(const std::string &value);
12900
12901 std::optional<Zivid::Range<double>> m_opt;
12902
12903 friend struct DataModel::Detail::Befriend<Extents>;
12904 };
12905
12907
12908 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12910 {
12911 public:
12913 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12914
12916 static constexpr const char *path{ "RegionOfInterest/Box/PointA" };
12917
12919 static constexpr const char *name{ "PointA" };
12920
12922 static constexpr const char *description{
12923 R"description(A point such that the vector from PointO to PointA describes the first edge of the parallelogram.)description"
12924 };
12925
12928
12930 PointA() = default;
12931
12933 explicit constexpr PointA(Zivid::PointXYZ value)
12934 : m_opt{ value }
12935 {}
12936
12942
12944 bool hasValue() const;
12945
12947 void reset();
12948
12950 std::string toString() const;
12951
12953 explicit constexpr PointA(float x, float y, float z)
12954 : PointA{ Zivid::PointXYZ{ x, y, z } }
12955 {}
12956
12958 bool operator==(const PointA &other) const
12959 {
12960 return m_opt == other.m_opt;
12961 }
12962
12964 bool operator!=(const PointA &other) const
12965 {
12966 return m_opt != other.m_opt;
12967 }
12968
12970 friend std::ostream &operator<<(std::ostream &stream, const PointA &value)
12971 {
12972 return stream << value.toString();
12973 }
12974
12975 private:
12976 void setFromString(const std::string &value);
12977
12978 std::optional<Zivid::PointXYZ> m_opt;
12979
12980 friend struct DataModel::Detail::Befriend<PointA>;
12981 };
12982
12984
12985 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
12987 {
12988 public:
12990 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
12991
12993 static constexpr const char *path{ "RegionOfInterest/Box/PointB" };
12994
12996 static constexpr const char *name{ "PointB" };
12997
12999 static constexpr const char *description{
13000 R"description(A point such that the vector from PointO to PointB describes the second edge of the parallelogram.)description"
13001 };
13002
13005
13007 PointB() = default;
13008
13010 explicit constexpr PointB(Zivid::PointXYZ value)
13011 : m_opt{ value }
13012 {}
13013
13019
13021 bool hasValue() const;
13022
13024 void reset();
13025
13027 std::string toString() const;
13028
13030 explicit constexpr PointB(float x, float y, float z)
13031 : PointB{ Zivid::PointXYZ{ x, y, z } }
13032 {}
13033
13035 bool operator==(const PointB &other) const
13036 {
13037 return m_opt == other.m_opt;
13038 }
13039
13041 bool operator!=(const PointB &other) const
13042 {
13043 return m_opt != other.m_opt;
13044 }
13045
13047 friend std::ostream &operator<<(std::ostream &stream, const PointB &value)
13048 {
13049 return stream << value.toString();
13050 }
13051
13052 private:
13053 void setFromString(const std::string &value);
13054
13055 std::optional<Zivid::PointXYZ> m_opt;
13056
13057 friend struct DataModel::Detail::Befriend<PointB>;
13058 };
13059
13061
13062 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13064 {
13065 public:
13067 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13068
13070 static constexpr const char *path{ "RegionOfInterest/Box/PointO" };
13071
13073 static constexpr const char *name{ "PointO" };
13074
13076 static constexpr const char *description{
13077 R"description(The point at the intersection of two adjacent edges defining a parallelogram.)description"
13078 };
13079
13082
13084 PointO() = default;
13085
13087 explicit constexpr PointO(Zivid::PointXYZ value)
13088 : m_opt{ value }
13089 {}
13090
13096
13098 bool hasValue() const;
13099
13101 void reset();
13102
13104 std::string toString() const;
13105
13107 explicit constexpr PointO(float x, float y, float z)
13108 : PointO{ Zivid::PointXYZ{ x, y, z } }
13109 {}
13110
13112 bool operator==(const PointO &other) const
13113 {
13114 return m_opt == other.m_opt;
13115 }
13116
13118 bool operator!=(const PointO &other) const
13119 {
13120 return m_opt != other.m_opt;
13121 }
13122
13124 friend std::ostream &operator<<(std::ostream &stream, const PointO &value)
13125 {
13126 return stream << value.toString();
13127 }
13128
13129 private:
13130 void setFromString(const std::string &value);
13131
13132 std::optional<Zivid::PointXYZ> m_opt;
13133
13134 friend struct DataModel::Detail::Befriend<PointO>;
13135 };
13136
13137 using Descendants = std::tuple<
13143
13146
13162#ifndef NO_DOC
13163 template<
13164 typename... Args,
13165 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13166 typename std::enable_if<
13167 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13168 value,
13169 int>::type = 0>
13170#else
13171 template<typename... Args>
13172#endif
13173 explicit Box(Args &&...args)
13174 {
13175 using namespace Zivid::Detail::TypeTraits;
13176
13177 static_assert(
13178 AllArgsDecayedAreUnique<Args...>::value,
13179 "Found duplicate types among the arguments passed to Box(...). "
13180 "Types should be listed at most once.");
13181
13182 set(std::forward<Args>(args)...);
13183 }
13184
13199#ifndef NO_DOC
13200 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13201#else
13202 template<typename... Args>
13203#endif
13204 void set(Args &&...args)
13205 {
13206 using namespace Zivid::Detail::TypeTraits;
13207
13208 using AllArgsAreDescendantNodes =
13209 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13210 static_assert(
13211 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13212
13213 static_assert(
13214 AllArgsDecayedAreUnique<Args...>::value,
13215 "Found duplicate types among the arguments passed to set(...). "
13216 "Types should be listed at most once.");
13217
13218 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13219 }
13220
13236#ifndef NO_DOC
13237 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13238#else
13239 template<typename... Args>
13240#endif
13241 Box copyWith(Args &&...args) const
13242 {
13243 using namespace Zivid::Detail::TypeTraits;
13244
13245 using AllArgsAreDescendantNodes =
13246 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13247 static_assert(
13248 AllArgsAreDescendantNodes::value,
13249 "All arguments passed to copyWith(...) must be descendant nodes.");
13250
13251 static_assert(
13252 AllArgsDecayedAreUnique<Args...>::value,
13253 "Found duplicate types among the arguments passed to copyWith(...). "
13254 "Types should be listed at most once.");
13255
13256 auto copy{ *this };
13257 copy.set(std::forward<Args>(args)...);
13258 return copy;
13259 }
13260
13262 const Enabled &isEnabled() const
13263 {
13264 return m_enabled;
13265 }
13266
13269 {
13270 return m_enabled;
13271 }
13272
13274 Box &set(const Enabled &value)
13275 {
13276 m_enabled = value;
13277 return *this;
13278 }
13279
13281 const Extents &extents() const
13282 {
13283 return m_extents;
13284 }
13285
13288 {
13289 return m_extents;
13290 }
13291
13293 Box &set(const Extents &value)
13294 {
13295 m_extents = value;
13296 return *this;
13297 }
13298
13300 const PointA &pointA() const
13301 {
13302 return m_pointA;
13303 }
13304
13307 {
13308 return m_pointA;
13309 }
13310
13312 Box &set(const PointA &value)
13313 {
13314 m_pointA = value;
13315 return *this;
13316 }
13317
13319 const PointB &pointB() const
13320 {
13321 return m_pointB;
13322 }
13323
13326 {
13327 return m_pointB;
13328 }
13329
13331 Box &set(const PointB &value)
13332 {
13333 m_pointB = value;
13334 return *this;
13335 }
13336
13338 const PointO &pointO() const
13339 {
13340 return m_pointO;
13341 }
13342
13345 {
13346 return m_pointO;
13347 }
13348
13350 Box &set(const PointO &value)
13351 {
13352 m_pointO = value;
13353 return *this;
13354 }
13355
13356 template<
13357 typename T,
13358 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::
13359 type = 0>
13361 {
13362 return m_enabled;
13363 }
13364
13365 template<
13366 typename T,
13367 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::
13368 type = 0>
13370 {
13371 return m_extents;
13372 }
13373
13374 template<
13375 typename T,
13376 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::
13377 type = 0>
13379 {
13380 return m_pointA;
13381 }
13382
13383 template<
13384 typename T,
13385 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::
13386 type = 0>
13388 {
13389 return m_pointB;
13390 }
13391
13392 template<
13393 typename T,
13394 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::
13395 type = 0>
13397 {
13398 return m_pointO;
13399 }
13400
13401 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13403 {
13404 return m_enabled;
13405 }
13406
13407 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13409 {
13410 return m_extents;
13411 }
13412
13413 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
13415 {
13416 return m_pointA;
13417 }
13418
13419 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
13421 {
13422 return m_pointB;
13423 }
13424
13425 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
13427 {
13428 return m_pointO;
13429 }
13430
13432 template<typename F>
13433 void forEach(const F &f) const
13434 {
13435 f(m_enabled);
13436 f(m_extents);
13437 f(m_pointA);
13438 f(m_pointB);
13439 f(m_pointO);
13440 }
13441
13443 template<typename F>
13444 void forEach(const F &f)
13445 {
13446 f(m_enabled);
13447 f(m_extents);
13448 f(m_pointA);
13449 f(m_pointB);
13450 f(m_pointO);
13451 }
13452
13454 bool operator==(const Box &other) const;
13455
13457 bool operator!=(const Box &other) const;
13458
13460 std::string toString() const;
13461
13463 friend std::ostream &operator<<(std::ostream &stream, const Box &value)
13464 {
13465 return stream << value.toString();
13466 }
13467
13468 private:
13469 void setFromString(const std::string &value);
13470
13471 void setFromString(const std::string &fullPath, const std::string &value);
13472
13473 std::string getString(const std::string &fullPath) const;
13474
13475 Enabled m_enabled;
13476 Extents m_extents;
13477 PointA m_pointA;
13478 PointB m_pointB;
13479 PointO m_pointO;
13480
13481 friend struct DataModel::Detail::Befriend<Box>;
13482 };
13483
13487
13488 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13490 {
13491 public:
13493 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
13494
13496 static constexpr const char *path{ "RegionOfInterest/Depth" };
13497
13499 static constexpr const char *name{ "Depth" };
13500
13502 static constexpr const char *description{
13503 R"description(Removes points that reside outside of a depth range, meaning that their Z coordinate
13504falls above a given maximum or below a given minimum.
13505)description"
13506 };
13507
13509
13510 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13512 {
13513 public:
13515 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13516
13518 static constexpr const char *path{ "RegionOfInterest/Depth/Enabled" };
13519
13521 static constexpr const char *name{ "Enabled" };
13522
13524 static constexpr const char *description{
13525 R"description(Enable or disable depth filter.)description"
13526 };
13527
13529 using ValueType = bool;
13530 static const Enabled yes;
13531 static const Enabled no;
13532
13534 static std::set<bool> validValues()
13535 {
13536 return { false, true };
13537 }
13538
13540 Enabled() = default;
13541
13543 explicit constexpr Enabled(bool value)
13544 : m_opt{ value }
13545 {}
13546
13551 bool value() const;
13552
13554 bool hasValue() const;
13555
13557 void reset();
13558
13560 std::string toString() const;
13561
13563 bool operator==(const Enabled &other) const
13564 {
13565 return m_opt == other.m_opt;
13566 }
13567
13569 bool operator!=(const Enabled &other) const
13570 {
13571 return m_opt != other.m_opt;
13572 }
13573
13575 friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
13576 {
13577 return stream << value.toString();
13578 }
13579
13580 private:
13581 void setFromString(const std::string &value);
13582
13583 std::optional<bool> m_opt;
13584
13585 friend struct DataModel::Detail::Befriend<Enabled>;
13586 };
13587
13589
13590 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
13592 {
13593 public:
13595 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
13596
13598 static constexpr const char *path{ "RegionOfInterest/Depth/Range" };
13599
13601 static constexpr const char *name{ "Range" };
13602
13604 static constexpr const char *description{
13605 R"description(Specify the minimum and maximum Z value that will be included.)description"
13606 };
13607
13610
13612 Range() = default;
13613
13615 explicit constexpr Range(Zivid::Range<double> value)
13616 : m_opt{ value }
13617 {}
13618
13624
13626 bool hasValue() const;
13627
13629 void reset();
13630
13632 std::string toString() const;
13633
13635 explicit constexpr Range(double minValue, double maxValue)
13636 : Range{ Zivid::Range<double>{ minValue, maxValue } }
13637 {}
13638
13640 bool operator==(const Range &other) const
13641 {
13642 return m_opt == other.m_opt;
13643 }
13644
13646 bool operator!=(const Range &other) const
13647 {
13648 return m_opt != other.m_opt;
13649 }
13650
13652 friend std::ostream &operator<<(std::ostream &stream, const Range &value)
13653 {
13654 return stream << value.toString();
13655 }
13656
13657 private:
13658 void setFromString(const std::string &value);
13659
13660 std::optional<Zivid::Range<double>> m_opt;
13661
13662 friend struct DataModel::Detail::Befriend<Range>;
13663 };
13664
13666 std::tuple<Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range>;
13667
13670
13683#ifndef NO_DOC
13684 template<
13685 typename... Args,
13686 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13687 typename std::enable_if<
13688 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13689 value,
13690 int>::type = 0>
13691#else
13692 template<typename... Args>
13693#endif
13694 explicit Depth(Args &&...args)
13695 {
13696 using namespace Zivid::Detail::TypeTraits;
13697
13698 static_assert(
13699 AllArgsDecayedAreUnique<Args...>::value,
13700 "Found duplicate types among the arguments passed to Depth(...). "
13701 "Types should be listed at most once.");
13702
13703 set(std::forward<Args>(args)...);
13704 }
13705
13717#ifndef NO_DOC
13718 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13719#else
13720 template<typename... Args>
13721#endif
13722 void set(Args &&...args)
13723 {
13724 using namespace Zivid::Detail::TypeTraits;
13725
13726 using AllArgsAreDescendantNodes =
13727 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13728 static_assert(
13729 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13730
13731 static_assert(
13732 AllArgsDecayedAreUnique<Args...>::value,
13733 "Found duplicate types among the arguments passed to set(...). "
13734 "Types should be listed at most once.");
13735
13736 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13737 }
13738
13751#ifndef NO_DOC
13752 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
13753#else
13754 template<typename... Args>
13755#endif
13756 Depth copyWith(Args &&...args) const
13757 {
13758 using namespace Zivid::Detail::TypeTraits;
13759
13760 using AllArgsAreDescendantNodes =
13761 AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13762 static_assert(
13763 AllArgsAreDescendantNodes::value,
13764 "All arguments passed to copyWith(...) must be descendant nodes.");
13765
13766 static_assert(
13767 AllArgsDecayedAreUnique<Args...>::value,
13768 "Found duplicate types among the arguments passed to copyWith(...). "
13769 "Types should be listed at most once.");
13770
13771 auto copy{ *this };
13772 copy.set(std::forward<Args>(args)...);
13773 return copy;
13774 }
13775
13777 const Enabled &isEnabled() const
13778 {
13779 return m_enabled;
13780 }
13781
13784 {
13785 return m_enabled;
13786 }
13787
13789 Depth &set(const Enabled &value)
13790 {
13791 m_enabled = value;
13792 return *this;
13793 }
13794
13796 const Range &range() const
13797 {
13798 return m_range;
13799 }
13800
13803 {
13804 return m_range;
13805 }
13806
13808 Depth &set(const Range &value)
13809 {
13810 m_range = value;
13811 return *this;
13812 }
13813
13814 template<
13815 typename T,
13816 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::
13817 type = 0>
13819 {
13820 return m_enabled;
13821 }
13822
13823 template<
13824 typename T,
13825 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::
13826 type = 0>
13828 {
13829 return m_range;
13830 }
13831
13832 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
13834 {
13835 return m_enabled;
13836 }
13837
13838 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
13840 {
13841 return m_range;
13842 }
13843
13845 template<typename F>
13846 void forEach(const F &f) const
13847 {
13848 f(m_enabled);
13849 f(m_range);
13850 }
13851
13853 template<typename F>
13854 void forEach(const F &f)
13855 {
13856 f(m_enabled);
13857 f(m_range);
13858 }
13859
13861 bool operator==(const Depth &other) const;
13862
13864 bool operator!=(const Depth &other) const;
13865
13867 std::string toString() const;
13868
13870 friend std::ostream &operator<<(std::ostream &stream, const Depth &value)
13871 {
13872 return stream << value.toString();
13873 }
13874
13875 private:
13876 void setFromString(const std::string &value);
13877
13878 void setFromString(const std::string &fullPath, const std::string &value);
13879
13880 std::string getString(const std::string &fullPath) const;
13881
13882 Enabled m_enabled;
13883 Range m_range;
13884
13885 friend struct DataModel::Detail::Befriend<Depth>;
13886 };
13887
13888 using Descendants = std::tuple<
13898
13901
13921#ifndef NO_DOC
13922 template<
13923 typename... Args,
13924 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
13925 typename std::enable_if<
13926 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
13927 value,
13928 int>::type = 0>
13929#else
13930 template<typename... Args>
13931#endif
13932 explicit RegionOfInterest(Args &&...args)
13933 {
13934 using namespace Zivid::Detail::TypeTraits;
13935
13936 static_assert(
13937 AllArgsDecayedAreUnique<Args...>::value,
13938 "Found duplicate types among the arguments passed to RegionOfInterest(...). "
13939 "Types should be listed at most once.");
13940
13941 set(std::forward<Args>(args)...);
13942 }
13943
13962#ifndef NO_DOC
13963 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
13964#else
13965 template<typename... Args>
13966#endif
13967 void set(Args &&...args)
13968 {
13969 using namespace Zivid::Detail::TypeTraits;
13970
13971 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
13972 static_assert(
13973 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
13974
13975 static_assert(
13976 AllArgsDecayedAreUnique<Args...>::value,
13977 "Found duplicate types among the arguments passed to set(...). "
13978 "Types should be listed at most once.");
13979
13980 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
13981 }
13982
14002#ifndef NO_DOC
14003 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14004#else
14005 template<typename... Args>
14006#endif
14007 RegionOfInterest copyWith(Args &&...args) const
14008 {
14009 using namespace Zivid::Detail::TypeTraits;
14010
14011 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14012 static_assert(
14013 AllArgsAreDescendantNodes::value,
14014 "All arguments passed to copyWith(...) must be descendant nodes.");
14015
14016 static_assert(
14017 AllArgsDecayedAreUnique<Args...>::value,
14018 "Found duplicate types among the arguments passed to copyWith(...). "
14019 "Types should be listed at most once.");
14020
14021 auto copy{ *this };
14022 copy.set(std::forward<Args>(args)...);
14023 return copy;
14024 }
14025
14027 const Box &box() const
14028 {
14029 return m_box;
14030 }
14031
14034 {
14035 return m_box;
14036 }
14037
14039 RegionOfInterest &set(const Box &value)
14040 {
14041 m_box = value;
14042 return *this;
14043 }
14044
14047 {
14048 m_box.set(value);
14049 return *this;
14050 }
14051
14054 {
14055 m_box.set(value);
14056 return *this;
14057 }
14058
14061 {
14062 m_box.set(value);
14063 return *this;
14064 }
14065
14068 {
14069 m_box.set(value);
14070 return *this;
14071 }
14072
14075 {
14076 m_box.set(value);
14077 return *this;
14078 }
14079
14081 const Depth &depth() const
14082 {
14083 return m_depth;
14084 }
14085
14088 {
14089 return m_depth;
14090 }
14091
14094 {
14095 m_depth = value;
14096 return *this;
14097 }
14098
14101 {
14102 m_depth.set(value);
14103 return *this;
14104 }
14105
14108 {
14109 m_depth.set(value);
14110 return *this;
14111 }
14112
14113 template<
14114 typename T,
14115 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
14117 {
14118 return m_box;
14119 }
14120
14121 template<
14122 typename T,
14123 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type =
14124 0>
14126 {
14127 return m_box.get<Settings::RegionOfInterest::Box::Enabled>();
14128 }
14129
14130 template<
14131 typename T,
14132 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type =
14133 0>
14135 {
14136 return m_box.get<Settings::RegionOfInterest::Box::Extents>();
14137 }
14138
14139 template<
14140 typename T,
14141 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
14143 {
14144 return m_box.get<Settings::RegionOfInterest::Box::PointA>();
14145 }
14146
14147 template<
14148 typename T,
14149 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
14151 {
14152 return m_box.get<Settings::RegionOfInterest::Box::PointB>();
14153 }
14154
14155 template<
14156 typename T,
14157 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
14159 {
14160 return m_box.get<Settings::RegionOfInterest::Box::PointO>();
14161 }
14162
14163 template<
14164 typename T,
14165 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
14167 {
14168 return m_depth;
14169 }
14170
14171 template<
14172 typename T,
14173 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type =
14174 0>
14176 {
14177 return m_depth.get<Settings::RegionOfInterest::Depth::Enabled>();
14178 }
14179
14180 template<
14181 typename T,
14182 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type =
14183 0>
14185 {
14186 return m_depth.get<Settings::RegionOfInterest::Depth::Range>();
14187 }
14188
14189 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14191 {
14192 return m_box;
14193 }
14194
14195 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14197 {
14198 return m_depth;
14199 }
14200
14202 template<typename F>
14203 void forEach(const F &f) const
14204 {
14205 f(m_box);
14206 f(m_depth);
14207 }
14208
14210 template<typename F>
14211 void forEach(const F &f)
14212 {
14213 f(m_box);
14214 f(m_depth);
14215 }
14216
14218 bool operator==(const RegionOfInterest &other) const;
14219
14221 bool operator!=(const RegionOfInterest &other) const;
14222
14224 std::string toString() const;
14225
14227 friend std::ostream &operator<<(std::ostream &stream, const RegionOfInterest &value)
14228 {
14229 return stream << value.toString();
14230 }
14231
14232 private:
14233 void setFromString(const std::string &value);
14234
14235 void setFromString(const std::string &fullPath, const std::string &value);
14236
14237 std::string getString(const std::string &fullPath) const;
14238
14239 Box m_box;
14240 Depth m_depth;
14241
14242 friend struct DataModel::Detail::Befriend<RegionOfInterest>;
14243 };
14244
14247
14248 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14250 {
14251 public:
14253 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
14254
14256 static constexpr const char *path{ "Sampling" };
14257
14259 static constexpr const char *name{ "Sampling" };
14260
14262 static constexpr const char *description{ R"description(Sampling settings.
14263)description" };
14264
14278
14279 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14281 {
14282 public:
14284 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14285
14287 static constexpr const char *path{ "Sampling/Color" };
14288
14290 static constexpr const char *name{ "Color" };
14291
14293 static constexpr const char *description{
14294 R"description(Choose how to sample colors for the point cloud. The `rgb` option gives a 2D image
14295with full colors. The `grayscale` option gives a grayscale (r=g=b) 2D image, which
14296can be acquired faster than full colors. The `disabled` option gives no colors and
14297can allow for even faster captures.
14298
14299The `grayscale` option is not available on all camera models.
14300
14301This setting is deprecated as of SDK 2.14. This setting will be removed in the next SDK major
14302version (SDK 3.0). The recommended way to do a 2D+3D capture is to set a `Settings2D` object
14303in the `Settings/Color` field. Tip: If you want to convert an existing settings.yml file to
14304the recommended API, you can import the .yml file into Zivid Studio and then re-export it to
14305.yml.
14306)description"
14307 };
14308
14310 enum class ValueType
14311 {
14312 rgb,
14313 disabled,
14314 grayscale
14315 };
14316 static const Color rgb;
14317 static const Color disabled;
14318 static const Color grayscale;
14319
14321 static std::set<ValueType> validValues()
14322 {
14323 return { ValueType::rgb, ValueType::disabled, ValueType::grayscale };
14324 }
14325
14327 Color() = default;
14328
14330 explicit constexpr Color(ValueType value)
14331 : m_opt{ verifyValue(value) }
14332 {}
14333
14339
14341 bool hasValue() const;
14342
14344 void reset();
14345
14347 std::string toString() const;
14348
14350 friend std::ostream &operator<<(std::ostream &stream, const Color::ValueType &value)
14351 {
14352 return stream << Color{ value }.toString();
14353 }
14354
14356 bool operator==(const Color &other) const
14357 {
14358 return m_opt == other.m_opt;
14359 }
14360
14362 bool operator!=(const Color &other) const
14363 {
14364 return m_opt != other.m_opt;
14365 }
14366
14368 friend std::ostream &operator<<(std::ostream &stream, const Color &value)
14369 {
14370 return stream << value.toString();
14371 }
14372
14373 private:
14374 void setFromString(const std::string &value);
14375
14376 constexpr ValueType static verifyValue(const ValueType &value)
14377 {
14378 return value == ValueType::rgb || value == ValueType::disabled || value == ValueType::grayscale
14379 ? value
14380 : throw std::invalid_argument{
14381 "Invalid value: Color{ "
14382 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14383 };
14384 }
14385
14386 std::optional<ValueType> m_opt;
14387
14388 friend struct DataModel::Detail::Befriend<Color>;
14389 };
14390
14403
14404 // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding)
14406 {
14407 public:
14409 static constexpr DataModel::NodeType nodeType = DataModel::NodeType::leafValue;
14410
14412 static constexpr const char *path{ "Sampling/Pixel" };
14413
14415 static constexpr const char *name{ "Pixel" };
14416
14418 static constexpr const char *description{
14419 R"description(For Zivid 2/2+, this setting controls whether to read out the full image sensor and
14420use white projector light or to subsample pixels for specific color channels with
14421corresponding projector light. Picking a specific color channel can help reduce noise
14422and effects of ambient light - projecting blue light is recommended.
14423
14424For Zivid 2+R, the user does not have to set the projection color and should only
14425consider whether to scale the resolution `by2x2` or `by4x4`. Both of these modes
14426will boost the signal strength by about 4x compared to `all`, so the user should
14427consider a corresponding reduction in exposure time.
14428
14429Sampling at a decreased resolution decreases capture time, as less data will be captured and processed.
14430)description"
14431 };
14432
14434 enum class ValueType
14435 {
14436 all,
14437 blueSubsample2x2,
14438 redSubsample2x2,
14439 blueSubsample4x4,
14440 redSubsample4x4,
14441 by2x2,
14442 by4x4
14443 };
14444 static const Pixel all;
14446 static const Pixel redSubsample2x2;
14448 static const Pixel redSubsample4x4;
14449 static const Pixel by2x2;
14450 static const Pixel by4x4;
14451
14453 static std::set<ValueType> validValues()
14454 {
14455 return { ValueType::all,
14456 ValueType::blueSubsample2x2,
14457 ValueType::redSubsample2x2,
14458 ValueType::blueSubsample4x4,
14459 ValueType::redSubsample4x4,
14460 ValueType::by2x2,
14461 ValueType::by4x4 };
14462 }
14463
14465 Pixel() = default;
14466
14468 explicit constexpr Pixel(ValueType value)
14469 : m_opt{ verifyValue(value) }
14470 {}
14471
14477
14479 bool hasValue() const;
14480
14482 void reset();
14483
14485 std::string toString() const;
14486
14488 friend std::ostream &operator<<(std::ostream &stream, const Pixel::ValueType &value)
14489 {
14490 return stream << Pixel{ value }.toString();
14491 }
14492
14494 bool operator==(const Pixel &other) const
14495 {
14496 return m_opt == other.m_opt;
14497 }
14498
14500 bool operator!=(const Pixel &other) const
14501 {
14502 return m_opt != other.m_opt;
14503 }
14504
14506 friend std::ostream &operator<<(std::ostream &stream, const Pixel &value)
14507 {
14508 return stream << value.toString();
14509 }
14510
14511 private:
14512 void setFromString(const std::string &value);
14513
14514 constexpr ValueType static verifyValue(const ValueType &value)
14515 {
14516 return value == ValueType::all || value == ValueType::blueSubsample2x2
14517 || value == ValueType::redSubsample2x2 || value == ValueType::blueSubsample4x4
14518 || value == ValueType::redSubsample4x4 || value == ValueType::by2x2
14519 || value == ValueType::by4x4
14520 ? value
14521 : throw std::invalid_argument{
14522 "Invalid value: Pixel{ "
14523 + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
14524 };
14525 }
14526
14527 std::optional<ValueType> m_opt;
14528
14529 friend struct DataModel::Detail::Befriend<Pixel>;
14530 };
14531
14532 using Descendants = std::tuple<Settings::Sampling::Color, Settings::Sampling::Pixel>;
14533
14536
14549#ifndef NO_DOC
14550 template<
14551 typename... Args,
14552 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14553 typename std::enable_if<
14554 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::
14555 value,
14556 int>::type = 0>
14557#else
14558 template<typename... Args>
14559#endif
14560 explicit Sampling(Args &&...args)
14561 {
14562 using namespace Zivid::Detail::TypeTraits;
14563
14564 static_assert(
14565 AllArgsDecayedAreUnique<Args...>::value,
14566 "Found duplicate types among the arguments passed to Sampling(...). "
14567 "Types should be listed at most once.");
14568
14569 set(std::forward<Args>(args)...);
14570 }
14571
14583#ifndef NO_DOC
14584 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
14585#else
14586 template<typename... Args>
14587#endif
14588 void set(Args &&...args)
14589 {
14590 using namespace Zivid::Detail::TypeTraits;
14591
14592 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14593 static_assert(
14594 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
14595
14596 static_assert(
14597 AllArgsDecayedAreUnique<Args...>::value,
14598 "Found duplicate types among the arguments passed to set(...). "
14599 "Types should be listed at most once.");
14600
14601 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
14602 }
14603
14616#ifndef NO_DOC
14617 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
14618#else
14619 template<typename... Args>
14620#endif
14621 Sampling copyWith(Args &&...args) const
14622 {
14623 using namespace Zivid::Detail::TypeTraits;
14624
14625 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
14626 static_assert(
14627 AllArgsAreDescendantNodes::value,
14628 "All arguments passed to copyWith(...) must be descendant nodes.");
14629
14630 static_assert(
14631 AllArgsDecayedAreUnique<Args...>::value,
14632 "Found duplicate types among the arguments passed to copyWith(...). "
14633 "Types should be listed at most once.");
14634
14635 auto copy{ *this };
14636 copy.set(std::forward<Args>(args)...);
14637 return copy;
14638 }
14639
14641 const Color &color() const
14642 {
14643 return m_color;
14644 }
14645
14648 {
14649 return m_color;
14650 }
14651
14653 Sampling &set(const Color &value)
14654 {
14655 m_color = value;
14656 return *this;
14657 }
14658
14660 const Pixel &pixel() const
14661 {
14662 return m_pixel;
14663 }
14664
14667 {
14668 return m_pixel;
14669 }
14670
14672 Sampling &set(const Pixel &value)
14673 {
14674 m_pixel = value;
14675 return *this;
14676 }
14677
14678 template<
14679 typename T,
14680 typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
14682 {
14683 return m_color;
14684 }
14685
14686 template<
14687 typename T,
14688 typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
14690 {
14691 return m_pixel;
14692 }
14693
14694 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
14696 {
14697 return m_color;
14698 }
14699
14700 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
14702 {
14703 return m_pixel;
14704 }
14705
14707 template<typename F>
14708 void forEach(const F &f) const
14709 {
14710 f(m_color);
14711 f(m_pixel);
14712 }
14713
14715 template<typename F>
14716 void forEach(const F &f)
14717 {
14718 f(m_color);
14719 f(m_pixel);
14720 }
14721
14723 bool operator==(const Sampling &other) const;
14724
14726 bool operator!=(const Sampling &other) const;
14727
14729 std::string toString() const;
14730
14732 friend std::ostream &operator<<(std::ostream &stream, const Sampling &value)
14733 {
14734 return stream << value.toString();
14735 }
14736
14737 private:
14738 void setFromString(const std::string &value);
14739
14740 void setFromString(const std::string &fullPath, const std::string &value);
14741
14742 std::string getString(const std::string &fullPath) const;
14743
14744 Color m_color;
14745 Pixel m_pixel;
14746
14747 friend struct DataModel::Detail::Befriend<Sampling>;
14748 };
14749
14750 using Descendants = std::tuple<
14819
14822
14824 explicit Settings(const std::string &fileName);
14825
14831 [[nodiscard]] static Settings fromSerialized(const std::string &value);
14832
14838 std::string serialize() const;
14839
14918#ifndef NO_DOC
14919 template<
14920 typename... Args,
14921 typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
14922 typename std::enable_if<
14923 Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
14924 int>::type = 0>
14925#else
14926 template<typename... Args>
14927#endif
14928 explicit Settings(Args &&...args)
14929 {
14930 using namespace Zivid::Detail::TypeTraits;
14931
14932 static_assert(
14933 AllArgsDecayedAreUnique<Args...>::value,
14934 "Found duplicate types among the arguments passed to Settings(...). "
14935 "Types should be listed at most once.");
14936
14937 set(std::forward<Args>(args)...);
14938 }
14939
15017#ifndef NO_DOC
15018 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
15019#else
15020 template<typename... Args>
15021#endif
15022 void set(Args &&...args)
15023 {
15024 using namespace Zivid::Detail::TypeTraits;
15025
15026 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15027 static_assert(
15028 AllArgsAreDescendantNodes::value, "All arguments passed to set(...) must be descendant nodes.");
15029
15030 static_assert(
15031 AllArgsDecayedAreUnique<Args...>::value,
15032 "Found duplicate types among the arguments passed to set(...). "
15033 "Types should be listed at most once.");
15034
15035 Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
15036 }
15037
15116#ifndef NO_DOC
15117 template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
15118#else
15119 template<typename... Args>
15120#endif
15121 Settings copyWith(Args &&...args) const
15122 {
15123 using namespace Zivid::Detail::TypeTraits;
15124
15125 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
15126 static_assert(
15127 AllArgsAreDescendantNodes::value, "All arguments passed to copyWith(...) must be descendant nodes.");
15128
15129 static_assert(
15130 AllArgsDecayedAreUnique<Args...>::value,
15131 "Found duplicate types among the arguments passed to copyWith(...). "
15132 "Types should be listed at most once.");
15133
15134 auto copy{ *this };
15135 copy.set(std::forward<Args>(args)...);
15136 return copy;
15137 }
15138
15141 {
15142 return m_acquisitions;
15143 }
15144
15147 {
15148 return m_acquisitions;
15149 }
15150
15153 {
15154 m_acquisitions = value;
15155 return *this;
15156 }
15157
15159 const Color &color() const
15160 {
15161 return m_color;
15162 }
15163
15166 {
15167 return m_color;
15168 }
15169
15171 Settings &set(const Color &value)
15172 {
15173 m_color = value;
15174 return *this;
15175 }
15176
15179 {
15180 return m_diagnostics;
15181 }
15182
15185 {
15186 return m_diagnostics;
15187 }
15188
15190 Settings &set(const Diagnostics &value)
15191 {
15192 m_diagnostics = value;
15193 return *this;
15194 }
15195
15198 {
15199 m_diagnostics.set(value);
15200 return *this;
15201 }
15202
15204 const Engine &engine() const
15205 {
15206 return m_engine;
15207 }
15208
15211 {
15212 return m_engine;
15213 }
15214
15216 Settings &set(const Engine &value)
15217 {
15218 m_engine = value;
15219 return *this;
15220 }
15221
15223 const Processing &processing() const
15224 {
15225 return m_processing;
15226 }
15227
15230 {
15231 return m_processing;
15232 }
15233
15235 Settings &set(const Processing &value)
15236 {
15237 m_processing = value;
15238 return *this;
15239 }
15240
15243 {
15244 m_processing.set(value);
15245 return *this;
15246 }
15247
15250 {
15251 m_processing.set(value);
15252 return *this;
15253 }
15254
15257 {
15258 m_processing.set(value);
15259 return *this;
15260 }
15261
15264 {
15265 m_processing.set(value);
15266 return *this;
15267 }
15268
15271 {
15272 m_processing.set(value);
15273 return *this;
15274 }
15275
15278 {
15279 m_processing.set(value);
15280 return *this;
15281 }
15282
15285 {
15286 m_processing.set(value);
15287 return *this;
15288 }
15289
15292 {
15293 m_processing.set(value);
15294 return *this;
15295 }
15296
15299 {
15300 m_processing.set(value);
15301 return *this;
15302 }
15303
15306 {
15307 m_processing.set(value);
15308 return *this;
15309 }
15310
15313 {
15314 m_processing.set(value);
15315 return *this;
15316 }
15317
15320 {
15321 m_processing.set(value);
15322 return *this;
15323 }
15324
15327 {
15328 m_processing.set(value);
15329 return *this;
15330 }
15331
15334 {
15335 m_processing.set(value);
15336 return *this;
15337 }
15338
15341 {
15342 m_processing.set(value);
15343 return *this;
15344 }
15345
15348 {
15349 m_processing.set(value);
15350 return *this;
15351 }
15352
15355 {
15356 m_processing.set(value);
15357 return *this;
15358 }
15359
15362 {
15363 m_processing.set(value);
15364 return *this;
15365 }
15366
15369 {
15370 m_processing.set(value);
15371 return *this;
15372 }
15373
15376 {
15377 m_processing.set(value);
15378 return *this;
15379 }
15380
15383 {
15384 m_processing.set(value);
15385 return *this;
15386 }
15387
15390 {
15391 m_processing.set(value);
15392 return *this;
15393 }
15394
15397 {
15398 m_processing.set(value);
15399 return *this;
15400 }
15401
15404 {
15405 m_processing.set(value);
15406 return *this;
15407 }
15408
15411 {
15412 m_processing.set(value);
15413 return *this;
15414 }
15415
15418 {
15419 m_processing.set(value);
15420 return *this;
15421 }
15422
15425 {
15426 m_processing.set(value);
15427 return *this;
15428 }
15429
15432 {
15433 m_processing.set(value);
15434 return *this;
15435 }
15436
15439 {
15440 m_processing.set(value);
15441 return *this;
15442 }
15443
15446 {
15447 m_processing.set(value);
15448 return *this;
15449 }
15450
15453 {
15454 m_processing.set(value);
15455 return *this;
15456 }
15457
15460 {
15461 m_processing.set(value);
15462 return *this;
15463 }
15464
15467 {
15468 m_processing.set(value);
15469 return *this;
15470 }
15471
15474 {
15475 m_processing.set(value);
15476 return *this;
15477 }
15478
15481 {
15482 m_processing.set(value);
15483 return *this;
15484 }
15485
15488 {
15489 m_processing.set(value);
15490 return *this;
15491 }
15492
15495 {
15496 m_processing.set(value);
15497 return *this;
15498 }
15499
15502 {
15503 m_processing.set(value);
15504 return *this;
15505 }
15506
15509 {
15510 m_processing.set(value);
15511 return *this;
15512 }
15513
15516 {
15517 m_processing.set(value);
15518 return *this;
15519 }
15520
15523 {
15524 m_processing.set(value);
15525 return *this;
15526 }
15527
15530 {
15531 m_processing.set(value);
15532 return *this;
15533 }
15534
15537 {
15538 m_processing.set(value);
15539 return *this;
15540 }
15541
15544 {
15545 m_processing.set(value);
15546 return *this;
15547 }
15548
15551 {
15552 m_processing.set(value);
15553 return *this;
15554 }
15555
15558 {
15559 m_processing.set(value);
15560 return *this;
15561 }
15562
15565 {
15566 m_processing.set(value);
15567 return *this;
15568 }
15569
15572 {
15573 m_processing.set(value);
15574 return *this;
15575 }
15576
15579 {
15580 m_processing.set(value);
15581 return *this;
15582 }
15583
15586 {
15587 return m_regionOfInterest;
15588 }
15589
15592 {
15593 return m_regionOfInterest;
15594 }
15595
15598 {
15599 m_regionOfInterest = value;
15600 return *this;
15601 }
15602
15605 {
15606 m_regionOfInterest.set(value);
15607 return *this;
15608 }
15609
15612 {
15613 m_regionOfInterest.set(value);
15614 return *this;
15615 }
15616
15619 {
15620 m_regionOfInterest.set(value);
15621 return *this;
15622 }
15623
15626 {
15627 m_regionOfInterest.set(value);
15628 return *this;
15629 }
15630
15633 {
15634 m_regionOfInterest.set(value);
15635 return *this;
15636 }
15637
15640 {
15641 m_regionOfInterest.set(value);
15642 return *this;
15643 }
15644
15647 {
15648 m_regionOfInterest.set(value);
15649 return *this;
15650 }
15651
15654 {
15655 m_regionOfInterest.set(value);
15656 return *this;
15657 }
15658
15661 {
15662 m_regionOfInterest.set(value);
15663 return *this;
15664 }
15665
15667 const Sampling &sampling() const
15668 {
15669 return m_sampling;
15670 }
15671
15674 {
15675 return m_sampling;
15676 }
15677
15679 Settings &set(const Sampling &value)
15680 {
15681 m_sampling = value;
15682 return *this;
15683 }
15684
15687 {
15688 m_sampling.set(value);
15689 return *this;
15690 }
15691
15694 {
15695 m_sampling.set(value);
15696 return *this;
15697 }
15698
15699 template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
15701 {
15702 return m_acquisitions;
15703 }
15704
15705 template<typename T, typename std::enable_if<std::is_same<T, Settings::Color>::value, int>::type = 0>
15706 const Settings::Color &get() const
15707 {
15708 return m_color;
15709 }
15710
15711 template<typename T, typename std::enable_if<std::is_same<T, Settings::Diagnostics>::value, int>::type = 0>
15713 {
15714 return m_diagnostics;
15715 }
15716
15717 template<
15718 typename T,
15719 typename std::enable_if<std::is_same<T, Settings::Diagnostics::Enabled>::value, int>::type = 0>
15721 {
15722 return m_diagnostics.get<Settings::Diagnostics::Enabled>();
15723 }
15724
15725 template<typename T, typename std::enable_if<std::is_same<T, Settings::Engine>::value, int>::type = 0>
15726 const Settings::Engine &get() const
15727 {
15728 return m_engine;
15729 }
15730
15731 template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
15733 {
15734 return m_processing;
15735 }
15736
15737 template<
15738 typename T,
15739 typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
15741 {
15742 return m_processing.get<Settings::Processing::Color>();
15743 }
15744
15745 template<
15746 typename T,
15747 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
15749 {
15750 return m_processing.get<Settings::Processing::Color::Balance>();
15751 }
15752
15753 template<
15754 typename T,
15755 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
15757 {
15758 return m_processing.get<Settings::Processing::Color::Balance::Blue>();
15759 }
15760
15761 template<
15762 typename T,
15763 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
15765 {
15766 return m_processing.get<Settings::Processing::Color::Balance::Green>();
15767 }
15768
15769 template<
15770 typename T,
15771 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
15773 {
15774 return m_processing.get<Settings::Processing::Color::Balance::Red>();
15775 }
15776
15777 template<
15778 typename T,
15779 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
15781 {
15782 return m_processing.get<Settings::Processing::Color::Experimental>();
15783 }
15784
15785 template<
15786 typename T,
15787 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::Mode>::value, int>::
15788 type = 0>
15790 {
15791 return m_processing.get<Settings::Processing::Color::Experimental::Mode>();
15792 }
15793
15794 template<
15795 typename T,
15796 typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
15798 {
15799 return m_processing.get<Settings::Processing::Color::Gamma>();
15800 }
15801
15802 template<
15803 typename T,
15804 typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
15806 {
15807 return m_processing.get<Settings::Processing::Filters>();
15808 }
15809
15810 template<
15811 typename T,
15812 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster>::value, int>::type = 0>
15814 {
15815 return m_processing.get<Settings::Processing::Filters::Cluster>();
15816 }
15817
15818 template<
15819 typename T,
15820 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Cluster::Removal>::value, int>::
15821 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::Enabled>::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::MaxNeighborDistance>::value,
15841 int>::type = 0>
15843 {
15845 }
15846
15847 template<
15848 typename T,
15849 typename std::enable_if<
15850 std::is_same<T, Settings::Processing::Filters::Cluster::Removal::MinArea>::value,
15851 int>::type = 0>
15853 {
15855 }
15856
15857 template<
15858 typename T,
15859 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
15861 {
15862 return m_processing.get<Settings::Processing::Filters::Experimental>();
15863 }
15864
15865 template<
15866 typename T,
15867 typename std::enable_if<
15868 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::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>::value,
15879 int>::type = 0>
15881 {
15883 }
15884
15885 template<
15886 typename T,
15887 typename std::enable_if<
15888 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
15889 value,
15890 int>::type = 0>
15892 {
15893 return m_processing
15895 }
15896
15897 template<
15898 typename T,
15899 typename std::enable_if<
15900 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
15901 value,
15902 int>::type = 0>
15904 {
15905 return m_processing
15907 }
15908
15909 template<
15910 typename T,
15911 typename std::enable_if<
15912 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
15913 int>::type = 0>
15915 {
15917 }
15918
15919 template<
15920 typename T,
15921 typename std::enable_if<
15922 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
15923 value,
15924 int>::type = 0>
15926 {
15927 return m_processing
15929 }
15930
15931 template<
15932 typename T,
15933 typename std::enable_if<
15934 std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
15935 value,
15936 int>::type = 0>
15938 {
15939 return m_processing
15941 }
15942
15943 template<
15944 typename T,
15945 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole>::value, int>::type = 0>
15947 {
15948 return m_processing.get<Settings::Processing::Filters::Hole>();
15949 }
15950
15951 template<
15952 typename T,
15953 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair>::value, int>::type = 0>
15955 {
15956 return m_processing.get<Settings::Processing::Filters::Hole::Repair>();
15957 }
15958
15959 template<
15960 typename T,
15961 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::Enabled>::value, int>::
15962 type = 0>
15964 {
15966 }
15967
15968 template<
15969 typename T,
15970 typename std::
15971 enable_if<std::is_same<T, Settings::Processing::Filters::Hole::Repair::HoleSize>::value, int>::type = 0>
15973 {
15975 }
15976
15977 template<
15978 typename T,
15979 typename std::enable_if<
15980 std::is_same<T, Settings::Processing::Filters::Hole::Repair::Strictness>::value,
15981 int>::type = 0>
15983 {
15985 }
15986
15987 template<
15988 typename T,
15989 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
15991 {
15992 return m_processing.get<Settings::Processing::Filters::Noise>();
15993 }
15994
15995 template<
15996 typename T,
15997 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value, int>::type =
15998 0>
16000 {
16002 }
16003
16004 template<
16005 typename T,
16006 typename std::enable_if<
16007 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
16008 int>::type = 0>
16010 {
16012 }
16013
16014 template<
16015 typename T,
16016 typename std::enable_if<
16017 std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
16018 int>::type = 0>
16020 {
16022 }
16023
16024 template<
16025 typename T,
16026 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair>::value, int>::type =
16027 0>
16029 {
16031 }
16032
16033 template<
16034 typename T,
16035 typename std::
16036 enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Repair::Enabled>::value, int>::type = 0>
16038 {
16040 }
16041
16042 template<
16043 typename T,
16044 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Suppression>::value, int>::
16045 type = 0>
16047 {
16049 }
16050
16051 template<
16052 typename T,
16053 typename std::enable_if<
16054 std::is_same<T, Settings::Processing::Filters::Noise::Suppression::Enabled>::value,
16055 int>::type = 0>
16057 {
16059 }
16060
16061 template<
16062 typename T,
16063 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
16065 {
16066 return m_processing.get<Settings::Processing::Filters::Outlier>();
16067 }
16068
16069 template<
16070 typename T,
16071 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value, int>::
16072 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::Enabled>::value,
16082 int>::type = 0>
16084 {
16086 }
16087
16088 template<
16089 typename T,
16090 typename std::enable_if<
16091 std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
16092 int>::type = 0>
16094 {
16096 }
16097
16098 template<
16099 typename T,
16100 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
16102 {
16103 return m_processing.get<Settings::Processing::Filters::Reflection>();
16104 }
16105
16106 template<
16107 typename T,
16108 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value, int>::
16109 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::Enabled>::value,
16119 int>::type = 0>
16121 {
16123 }
16124
16125 template<
16126 typename T,
16127 typename std::enable_if<
16128 std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Mode>::value,
16129 int>::type = 0>
16131 {
16133 }
16134
16135 template<
16136 typename T,
16137 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
16139 {
16140 return m_processing.get<Settings::Processing::Filters::Smoothing>();
16141 }
16142
16143 template<
16144 typename T,
16145 typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value, int>::
16146 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::Enabled>::value,
16156 int>::type = 0>
16158 {
16160 }
16161
16162 template<
16163 typename T,
16164 typename std::enable_if<
16165 std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
16166 int>::type = 0>
16168 {
16170 }
16171
16172 template<
16173 typename T,
16174 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling>::value, int>::type = 0>
16176 {
16177 return m_processing.get<Settings::Processing::Resampling>();
16178 }
16179
16180 template<
16181 typename T,
16182 typename std::enable_if<std::is_same<T, Settings::Processing::Resampling::Mode>::value, int>::type = 0>
16184 {
16185 return m_processing.get<Settings::Processing::Resampling::Mode>();
16186 }
16187
16188 template<typename T, typename std::enable_if<std::is_same<T, Settings::RegionOfInterest>::value, int>::type = 0>
16190 {
16191 return m_regionOfInterest;
16192 }
16193
16194 template<
16195 typename T,
16196 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box>::value, int>::type = 0>
16198 {
16199 return m_regionOfInterest.get<Settings::RegionOfInterest::Box>();
16200 }
16201
16202 template<
16203 typename T,
16204 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Enabled>::value, int>::type = 0>
16206 {
16207 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Enabled>();
16208 }
16209
16210 template<
16211 typename T,
16212 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::Extents>::value, int>::type = 0>
16214 {
16215 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::Extents>();
16216 }
16217
16218 template<
16219 typename T,
16220 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointA>::value, int>::type = 0>
16222 {
16223 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointA>();
16224 }
16225
16226 template<
16227 typename T,
16228 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointB>::value, int>::type = 0>
16230 {
16231 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointB>();
16232 }
16233
16234 template<
16235 typename T,
16236 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Box::PointO>::value, int>::type = 0>
16238 {
16239 return m_regionOfInterest.get<Settings::RegionOfInterest::Box::PointO>();
16240 }
16241
16242 template<
16243 typename T,
16244 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth>::value, int>::type = 0>
16246 {
16247 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth>();
16248 }
16249
16250 template<
16251 typename T,
16252 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Enabled>::value, int>::type = 0>
16254 {
16255 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Enabled>();
16256 }
16257
16258 template<
16259 typename T,
16260 typename std::enable_if<std::is_same<T, Settings::RegionOfInterest::Depth::Range>::value, int>::type = 0>
16262 {
16263 return m_regionOfInterest.get<Settings::RegionOfInterest::Depth::Range>();
16264 }
16265
16266 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling>::value, int>::type = 0>
16268 {
16269 return m_sampling;
16270 }
16271
16272 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Color>::value, int>::type = 0>
16274 {
16275 return m_sampling.get<Settings::Sampling::Color>();
16276 }
16277
16278 template<typename T, typename std::enable_if<std::is_same<T, Settings::Sampling::Pixel>::value, int>::type = 0>
16280 {
16281 return m_sampling.get<Settings::Sampling::Pixel>();
16282 }
16283
16284 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
16286 {
16287 return m_acquisitions;
16288 }
16289
16290 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
16291 const Settings::Color &get() const
16292 {
16293 return m_color;
16294 }
16295
16296 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
16298 {
16299 return m_diagnostics;
16300 }
16301
16302 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
16303 const Settings::Engine &get() const
16304 {
16305 return m_engine;
16306 }
16307
16308 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
16310 {
16311 return m_processing;
16312 }
16313
16314 template<size_t i, typename std::enable_if<i == 5, int>::type = 0>
16316 {
16317 return m_regionOfInterest;
16318 }
16319
16320 template<size_t i, typename std::enable_if<i == 6, int>::type = 0>
16322 {
16323 return m_sampling;
16324 }
16325
16327 template<typename F>
16328 void forEach(const F &f) const
16329 {
16330 f(m_acquisitions);
16331 f(m_color);
16332 f(m_diagnostics);
16333 f(m_engine);
16334 f(m_processing);
16335 f(m_regionOfInterest);
16336 f(m_sampling);
16337 }
16338
16340 template<typename F>
16341 void forEach(const F &f)
16342 {
16343 f(m_acquisitions);
16344 f(m_color);
16345 f(m_diagnostics);
16346 f(m_engine);
16347 f(m_processing);
16348 f(m_regionOfInterest);
16349 f(m_sampling);
16350 }
16351
16353 bool operator==(const Settings &other) const;
16354
16356 bool operator!=(const Settings &other) const;
16357
16359 std::string toString() const;
16360
16362 friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
16363 {
16364 return stream << value.toString();
16365 }
16366
16368 void save(const std::string &fileName) const;
16369
16371 void load(const std::string &fileName);
16372
16373 private:
16374 void setFromString(const std::string &value);
16375
16376 void setFromString(const std::string &fullPath, const std::string &value);
16377
16378 std::string getString(const std::string &fullPath) const;
16379
16380 Acquisitions m_acquisitions;
16381 Color m_color;
16382 Diagnostics m_diagnostics;
16383 Engine m_engine;
16384 Processing m_processing;
16385 RegionOfInterest m_regionOfInterest;
16386 Sampling m_sampling;
16387
16388 friend struct DataModel::Detail::Befriend<Settings>;
16389 };
16390
16391#ifndef NO_DOC
16392 template<>
16393 struct Settings::Version<27>
16394 {
16395 using Type = Settings;
16396 };
16397#endif
16398
16399} // namespace Zivid
16400
16401#ifndef NO_DOC
16403namespace Zivid::Detail
16404{
16405
16406 ZIVID_CORE_EXPORT void save(const Zivid::Settings &dataModel, std::ostream &ostream);
16407 ZIVID_CORE_EXPORT void load(Zivid::Settings &dataModel, std::istream &istream);
16408
16409 ZIVID_CORE_EXPORT std::vector<uint8_t> serializeToBinaryVector(const Zivid::Settings &source);
16410 ZIVID_CORE_EXPORT void deserializeFromBinaryVector(Zivid::Settings &dest, const std::vector<uint8_t> &data);
16411
16412} // namespace Zivid::Detail
16413#endif
16414
16415#ifdef _MSC_VER
16416# pragma warning(pop)
16417#endif
16418
16419#ifndef NO_DOC
16420# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
16421namespace std // NOLINT
16422{
16423
16424 template<>
16425 struct tuple_size<Zivid::Settings::Diagnostics> : integral_constant<size_t, 1>
16426 {};
16427
16428 template<size_t i>
16429 struct tuple_element<i, Zivid::Settings::Diagnostics>
16430 {
16431 static_assert(i < tuple_size<Zivid::Settings::Diagnostics>::value, "Index must be less than 1");
16432
16433 using type // NOLINT
16434 = decltype(declval<Zivid::Settings::Diagnostics>().get<i>());
16435 };
16436
16437 template<>
16438 struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 3>
16439 {};
16440
16441 template<size_t i>
16442 struct tuple_element<i, Zivid::Settings::Processing>
16443 {
16444 static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 3");
16445
16446 using type // NOLINT
16447 = decltype(declval<Zivid::Settings::Processing>().get<i>());
16448 };
16449
16450 template<>
16451 struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
16452 {};
16453
16454 template<size_t i>
16455 struct tuple_element<i, Zivid::Settings::Processing::Color>
16456 {
16457 static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
16458
16459 using type // NOLINT
16460 = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
16461 };
16462
16463 template<>
16464 struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
16465 {};
16466
16467 template<size_t i>
16468 struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
16469 {
16470 static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
16471
16472 using type // NOLINT
16473 = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
16474 };
16475
16476 template<>
16477 struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
16478 {};
16479
16480 template<size_t i>
16481 struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
16482 {
16483 static_assert(
16484 i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
16485 "Index must be less than 1");
16486
16487 using type // NOLINT
16488 = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
16489 };
16490
16491 template<>
16492 struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 7>
16493 {};
16494
16495 template<size_t i>
16496 struct tuple_element<i, Zivid::Settings::Processing::Filters>
16497 {
16498 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 7");
16499
16500 using type // NOLINT
16501 = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
16502 };
16503
16504 template<>
16505 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster> : integral_constant<size_t, 1>
16506 {};
16507
16508 template<size_t i>
16509 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster>
16510 {
16511 static_assert(
16512 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster>::value,
16513 "Index must be less than 1");
16514
16515 using type // NOLINT
16516 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster>().get<i>());
16517 };
16518
16519 template<>
16520 struct tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal> : integral_constant<size_t, 3>
16521 {};
16522
16523 template<size_t i>
16524 struct tuple_element<i, Zivid::Settings::Processing::Filters::Cluster::Removal>
16525 {
16526 static_assert(
16527 i < tuple_size<Zivid::Settings::Processing::Filters::Cluster::Removal>::value,
16528 "Index must be less than 3");
16529
16530 using type // NOLINT
16531 = decltype(declval<Zivid::Settings::Processing::Filters::Cluster::Removal>().get<i>());
16532 };
16533
16534 template<>
16535 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
16536 {};
16537
16538 template<size_t i>
16539 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
16540 {
16541 static_assert(
16542 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
16543 "Index must be less than 1");
16544
16545 using type // NOLINT
16546 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
16547 };
16548
16549 template<>
16550 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16551 : integral_constant<size_t, 2>
16552 {};
16553
16554 template<size_t i>
16555 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
16556 {
16557 static_assert(
16558 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
16559 "Index must be less than 2");
16560
16561 using type // NOLINT
16562 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
16563 };
16564
16565 template<>
16566 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16567 : integral_constant<size_t, 2>
16568 {};
16569
16570 template<size_t i>
16571 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
16572 {
16573 static_assert(
16574 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
16575 "Index must be less than 2");
16576
16577 using type // NOLINT
16578 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
16579 .get<i>());
16580 };
16581
16582 template<>
16583 struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16584 : integral_constant<size_t, 2>
16585 {};
16586
16587 template<size_t i>
16588 struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
16589 {
16590 static_assert(
16591 i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
16592 "Index must be less than 2");
16593
16594 using type // NOLINT
16595 = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
16596 .get<i>());
16597 };
16598
16599 template<>
16600 struct tuple_size<Zivid::Settings::Processing::Filters::Hole> : integral_constant<size_t, 1>
16601 {};
16602
16603 template<size_t i>
16604 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole>
16605 {
16606 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Hole>::value, "Index must be less than 1");
16607
16608 using type // NOLINT
16609 = decltype(declval<Zivid::Settings::Processing::Filters::Hole>().get<i>());
16610 };
16611
16612 template<>
16613 struct tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair> : integral_constant<size_t, 3>
16614 {};
16615
16616 template<size_t i>
16617 struct tuple_element<i, Zivid::Settings::Processing::Filters::Hole::Repair>
16618 {
16619 static_assert(
16620 i < tuple_size<Zivid::Settings::Processing::Filters::Hole::Repair>::value,
16621 "Index must be less than 3");
16622
16623 using type // NOLINT
16624 = decltype(declval<Zivid::Settings::Processing::Filters::Hole::Repair>().get<i>());
16625 };
16626
16627 template<>
16628 struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 3>
16629 {};
16630
16631 template<size_t i>
16632 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
16633 {
16634 static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 3");
16635
16636 using type // NOLINT
16637 = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
16638 };
16639
16640 template<>
16641 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
16642 {};
16643
16644 template<size_t i>
16645 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
16646 {
16647 static_assert(
16648 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
16649 "Index must be less than 2");
16650
16651 using type // NOLINT
16652 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
16653 };
16654
16655 template<>
16656 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair> : integral_constant<size_t, 1>
16657 {};
16658
16659 template<size_t i>
16660 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Repair>
16661 {
16662 static_assert(
16663 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Repair>::value,
16664 "Index must be less than 1");
16665
16666 using type // NOLINT
16667 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Repair>().get<i>());
16668 };
16669
16670 template<>
16671 struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression> : integral_constant<size_t, 1>
16672 {};
16673
16674 template<size_t i>
16675 struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Suppression>
16676 {
16677 static_assert(
16678 i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Suppression>::value,
16679 "Index must be less than 1");
16680
16681 using type // NOLINT
16682 = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Suppression>().get<i>());
16683 };
16684
16685 template<>
16686 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
16687 {};
16688
16689 template<size_t i>
16690 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
16691 {
16692 static_assert(
16693 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
16694 "Index must be less than 1");
16695
16696 using type // NOLINT
16697 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
16698 };
16699
16700 template<>
16701 struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
16702 {};
16703
16704 template<size_t i>
16705 struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
16706 {
16707 static_assert(
16708 i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
16709 "Index must be less than 2");
16710
16711 using type // NOLINT
16712 = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
16713 };
16714
16715 template<>
16716 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
16717 {};
16718
16719 template<size_t i>
16720 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
16721 {
16722 static_assert(
16723 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
16724 "Index must be less than 1");
16725
16726 using type // NOLINT
16727 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
16728 };
16729
16730 template<>
16731 struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 2>
16732 {};
16733
16734 template<size_t i>
16735 struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
16736 {
16737 static_assert(
16738 i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
16739 "Index must be less than 2");
16740
16741 using type // NOLINT
16742 = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
16743 };
16744
16745 template<>
16746 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
16747 {};
16748
16749 template<size_t i>
16750 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
16751 {
16752 static_assert(
16753 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
16754 "Index must be less than 1");
16755
16756 using type // NOLINT
16757 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
16758 };
16759
16760 template<>
16761 struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
16762 {};
16763
16764 template<size_t i>
16765 struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
16766 {
16767 static_assert(
16768 i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
16769 "Index must be less than 2");
16770
16771 using type // NOLINT
16772 = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
16773 };
16774
16775 template<>
16776 struct tuple_size<Zivid::Settings::Processing::Resampling> : integral_constant<size_t, 1>
16777 {};
16778
16779 template<size_t i>
16780 struct tuple_element<i, Zivid::Settings::Processing::Resampling>
16781 {
16782 static_assert(i < tuple_size<Zivid::Settings::Processing::Resampling>::value, "Index must be less than 1");
16783
16784 using type // NOLINT
16785 = decltype(declval<Zivid::Settings::Processing::Resampling>().get<i>());
16786 };
16787
16788 template<>
16789 struct tuple_size<Zivid::Settings::RegionOfInterest> : integral_constant<size_t, 2>
16790 {};
16791
16792 template<size_t i>
16793 struct tuple_element<i, Zivid::Settings::RegionOfInterest>
16794 {
16795 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest>::value, "Index must be less than 2");
16796
16797 using type // NOLINT
16798 = decltype(declval<Zivid::Settings::RegionOfInterest>().get<i>());
16799 };
16800
16801 template<>
16802 struct tuple_size<Zivid::Settings::RegionOfInterest::Box> : integral_constant<size_t, 5>
16803 {};
16804
16805 template<size_t i>
16806 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Box>
16807 {
16808 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Box>::value, "Index must be less than 5");
16809
16810 using type // NOLINT
16811 = decltype(declval<Zivid::Settings::RegionOfInterest::Box>().get<i>());
16812 };
16813
16814 template<>
16815 struct tuple_size<Zivid::Settings::RegionOfInterest::Depth> : integral_constant<size_t, 2>
16816 {};
16817
16818 template<size_t i>
16819 struct tuple_element<i, Zivid::Settings::RegionOfInterest::Depth>
16820 {
16821 static_assert(i < tuple_size<Zivid::Settings::RegionOfInterest::Depth>::value, "Index must be less than 2");
16822
16823 using type // NOLINT
16824 = decltype(declval<Zivid::Settings::RegionOfInterest::Depth>().get<i>());
16825 };
16826
16827 template<>
16828 struct tuple_size<Zivid::Settings::Sampling> : integral_constant<size_t, 2>
16829 {};
16830
16831 template<size_t i>
16832 struct tuple_element<i, Zivid::Settings::Sampling>
16833 {
16834 static_assert(i < tuple_size<Zivid::Settings::Sampling>::value, "Index must be less than 2");
16835
16836 using type // NOLINT
16837 = decltype(declval<Zivid::Settings::Sampling>().get<i>());
16838 };
16839
16840 template<>
16841 struct tuple_size<Zivid::Settings> : integral_constant<size_t, 7>
16842 {};
16843
16844 template<size_t i>
16845 struct tuple_element<i, Zivid::Settings>
16846 {
16847 static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 7");
16848
16849 using type // NOLINT
16850 = decltype(declval<Zivid::Settings>().get<i>());
16851 };
16852
16853} // namespace std
16854# endif
16855#endif
16856
16857// If we have access to the DataModel library, automatically include internal DataModel
16858// header. This header is necessary for serialization and deserialization.
16859#if defined(__has_include) && !defined(NO_DOC)
16860# if __has_include("Zivid/SettingsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
16861# include "Zivid/SettingsInternal.h"
16862# endif
16863#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. Global mode is generally better at removing ou...
Definition Settings.h:8767
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:8814
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:8805
ValueType
The type of the underlying value.
Definition Settings.h:8797
static const Mode local
local
Definition Settings.h:8802
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:8846
friend std::ostream & operator<<(std::ostream &stream, const Mode &value)
Operator to serialize the value to a stream.
Definition Settings.h:8852
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:8840
std::string toString() const
Get the value as string.
static const Mode global
global
Definition Settings.h:8801
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:8834
Discard points likely introduced by reflections (useful for shiny materials).
Definition Settings.h:8655
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:8997
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream.
Definition Settings.h:9086
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:9033
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:8935
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:8877
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:9062
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:8970
Removal & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9003
Mode & mode()
Get Mode.
Definition Settings.h:9016
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9070
const Mode & mode() const
Get Mode.
Definition Settings.h:9010
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:8991
bool operator!=(const Removal &other) const
Inequality operator.
Removal & set(const Mode &value)
Set Mode.
Definition Settings.h:9022
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9043
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:9228
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9165
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream.
Definition Settings.h:9314
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9299
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:9292
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled.
Definition Settings.h:9241
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:9269
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled, Settings::Processing::Filters::Reflection::Removal::Mode > Descendants
Definition Settings.h:9104
std::string toString() const
Get the value as string.
Reflection & set(const Removal::Mode &value)
Set Removal::Mode.
Definition Settings.h:9248
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:9279
const Removal & removal() const
Get Removal.
Definition Settings.h:9222
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:9259
Reflection & set(const Removal &value)
Set Removal.
Definition Settings.h:9234
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:9201
Enable or disable the smoothing filter.
Definition Settings.h:9373
bool ValueType
The type of the underlying value.
Definition Settings.h:9390
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:9395
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:9430
static const Enabled yes
On/enabled.
Definition Settings.h:9391
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:9424
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:9436
static const Enabled no
Off/disabled.
Definition Settings.h:9392
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:9404
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:9453
double ValueType
The type of the underlying value.
Definition Settings.h:9470
bool operator!=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9508
bool operator>(const Sigma &other) const
Comparison operator.
Definition Settings.h:9520
constexpr Sigma(double value)
Constructor.
Definition Settings.h:9482
static constexpr Range< double > validRange()
The range of valid values for Sigma.
Definition Settings.h:9473
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream.
Definition Settings.h:9538
bool operator>=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9532
bool operator==(const Sigma &other) const
Comparison operator.
Definition Settings.h:9502
bool operator<=(const Sigma &other) const
Comparison operator.
Definition Settings.h:9526
std::string toString() const
Get the value as string.
bool operator<(const Sigma &other) const
Comparison operator.
Definition Settings.h:9514
Gaussian smoothing of the point cloud.
Definition Settings.h:9353
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:9681
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:9746
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9727
Gaussian & set(const Enabled &value)
Set Enabled.
Definition Settings.h:9687
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9561
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream.
Definition Settings.h:9770
const Sigma & sigma() const
Get Sigma.
Definition Settings.h:9694
bool operator==(const Gaussian &other) const
Equality operator.
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:9675
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:9717
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:9654
Gaussian & set(const Sigma &value)
Set Sigma.
Definition Settings.h:9706
Sigma & sigma()
Get Sigma.
Definition Settings.h:9700
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9619
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9754
Smoothing filters.
Definition Settings.h:9335
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:9885
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:9849
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition Settings.h:9788
Smoothing & set(const Gaussian &value)
Set Gaussian.
Definition Settings.h:9918
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:9953
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:9983
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma.
Definition Settings.h:9932
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled.
Definition Settings.h:9925
bool operator!=(const Smoothing &other) const
Inequality operator.
const Gaussian & gaussian() const
Get Gaussian.
Definition Settings.h:9906
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:9943
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:9976
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:9963
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream.
Definition Settings.h:9998
Gaussian & gaussian()
Get Gaussian.
Definition Settings.h:9912
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:10905
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled.
Definition Settings.h:10568
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11065
Filters & set(const Cluster &value)
Set Cluster.
Definition Settings.h:10284
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:10915
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:10251
Filters & set(const Hole &value)
Set Hole.
Definition Settings.h:10399
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:10761
Filters & set(const Hole::Repair::HoleSize &value)
Set Hole::Repair::HoleSize.
Definition Settings.h:10420
Filters & set(const Noise::Repair &value)
Set Noise::Repair.
Definition Settings.h:10474
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:10809
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:10876
Filters & set(const Cluster::Removal::MaxNeighborDistance &value)
Set Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:10305
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:10837
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:10770
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:10886
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:10973
Filters & set(const Noise::Repair::Enabled &value)
Set Noise::Repair::Enabled.
Definition Settings.h:10481
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:10635
Cluster & cluster()
Get Cluster.
Definition Settings.h:10278
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:10944
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:10789
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:10934
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold.
Definition Settings.h:10535
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:10359
Filters & set(const Experimental &value)
Set Experimental.
Definition Settings.h:10331
Outlier & outlier()
Get Outlier.
Definition Settings.h:10508
Filters & set(const Reflection::Removal::Mode &value)
Set Reflection::Removal::Mode.
Definition Settings.h:10575
Filters & set(const Hole::Repair::Enabled &value)
Set Hole::Repair::Enabled.
Definition Settings.h:10413
Filters & set(const Noise::Suppression &value)
Set Noise::Suppression.
Definition Settings.h:10488
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal.
Definition Settings.h:10521
const Cluster & cluster() const
Get Cluster.
Definition Settings.h:10272
const Experimental & experimental() const
Get Experimental.
Definition Settings.h:10319
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion.
Definition Settings.h:10338
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream.
Definition Settings.h:11086
Filters & set(const Cluster::Removal::Enabled &value)
Set Cluster::Removal::Enabled.
Definition Settings.h:10298
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:10954
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:10895
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:10684
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:11003
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:10181
Filters & set(const Hole::Repair &value)
Set Hole::Repair.
Definition Settings.h:10406
const Reflection & reflection() const
Get Reflection.
Definition Settings.h:10542
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:10674
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold.
Definition Settings.h:10467
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:10993
Filters & set(const Reflection &value)
Set Reflection.
Definition Settings.h:10554
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:10723
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal.
Definition Settings.h:10366
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:11052
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:10645
Filters & set(const Outlier &value)
Set Outlier.
Definition Settings.h:10514
const Noise & noise() const
Get Noise.
Definition Settings.h:10434
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction.
Definition Settings.h:10345
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:10779
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:10709
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal.
Definition Settings.h:10561
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:10827
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled.
Definition Settings.h:10460
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:10964
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled.
Definition Settings.h:10608
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:10818
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:10866
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:10380
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian.
Definition Settings.h:10601
bool operator==(const Filters &other) const
Equality operator.
Filters & set(const Hole::Repair::Strictness &value)
Set Hole::Repair::Strictness.
Definition Settings.h:10427
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled.
Definition Settings.h:10528
Filters & set(const Cluster::Removal &value)
Set Cluster::Removal.
Definition Settings.h:10291
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:10799
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:10748
const Hole & hole() const
Get Hole.
Definition Settings.h:10387
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:10015
Filters & set(const Cluster::Removal::MinArea &value)
Set Cluster::Removal::MinArea.
Definition Settings.h:10312
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:10735
Noise & noise()
Get Noise.
Definition Settings.h:10440
Filters & set(const Smoothing &value)
Set Smoothing.
Definition Settings.h:10594
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:10352
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:10655
Filters & set(const Noise::Removal &value)
Set Noise::Removal.
Definition Settings.h:10453
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:10625
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:10925
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:10847
Smoothing & smoothing()
Get Smoothing.
Definition Settings.h:10588
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:10665
Filters & set(const Noise::Suppression::Enabled &value)
Set Noise::Suppression::Enabled.
Definition Settings.h:10495
Hole & hole()
Get Hole.
Definition Settings.h:10393
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:10983
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:10373
const Outlier & outlier() const
Get Outlier.
Definition Settings.h:10502
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:10856
Reflection & reflection()
Get Reflection.
Definition Settings.h:10548
Filters & set(const Noise &value)
Set Noise.
Definition Settings.h:10446
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma.
Definition Settings.h:10615
const Smoothing & smoothing() const
Get Smoothing.
Definition Settings.h:10582
Experimental & experimental()
Get Experimental.
Definition Settings.h:10325
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:10695
Setting for upsampling or downsampling the point cloud data by some factor. This operation is perform...
Definition Settings.h:11157
void reset()
Reset the node to unset state.
static const Mode upsample2x2
upsample2x2
Definition Settings.h:11207
static const Mode downsample4x4
downsample4x4
Definition Settings.h:11206
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:11262
static const Mode upsample4x4
upsample4x4
Definition Settings.h:11208
static const Mode downsample2x2
downsample2x2
Definition Settings.h:11205
bool operator!=(const Mode &other) const
Comparison operator.
Definition Settings.h:11256
ValueType
The type of the underlying value.
Definition Settings.h:11197
bool operator==(const Mode &other) const
Comparison operator.
Definition Settings.h:11250
bool hasValue() const
Check if the value is set.
static std::set< ValueType > validValues()
All valid values of Mode.
Definition Settings.h:11211
std::string toString() const
Get the value as string.
constexpr Mode(ValueType value)
Constructor.
Definition Settings.h:11224
friend std::ostream & operator<<(std::ostream &stream, const Mode::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:11244
static const Mode disabled
disabled
Definition Settings.h:11204
ValueType value() const
Get the value.
Settings for changing the output resolution of the point cloud.
Definition Settings.h:11114
Resampling & set(const Mode &value)
Set Mode.
Definition Settings.h:11408
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11342
const Mode & mode() const
Get Mode.
Definition Settings.h:11396
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:11431
Mode & mode()
Get Mode.
Definition Settings.h:11402
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:11453
std::tuple< Settings::Processing::Resampling::Mode > Descendants
Definition Settings.h:11288
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:11418
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:11375
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:11438
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:12203
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:12383
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:12331
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:12393
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:12573
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:12544
Resampling & resampling()
Get Resampling.
Definition Settings.h:12128
Processing & set(const Color::Experimental &value)
Set Color::Experimental.
Definition Settings.h:11816
Processing & set(const Color &value)
Set Color.
Definition Settings.h:11781
Processing & set(const Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:11877
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:12459
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:12185
Processing & set(const Color::Balance &value)
Set Color::Balance.
Definition Settings.h:11788
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian.
Definition Settings.h:12101
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:11749
Filters & filters()
Get Filters.
Definition Settings.h:11843
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:12108
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:12478
Processing & set(const Resampling &value)
Set Resampling.
Definition Settings.h:12134
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:12211
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:11926
Processing & set(const Resampling::Mode &value)
Set Resampling::Mode.
Definition Settings.h:12141
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:11470
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:12563
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:11940
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:12176
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal.
Definition Settings.h:12045
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:11933
Processing & set(const Filters::Cluster::Removal::Enabled &value)
Set Filters::Cluster::Removal::Enabled.
Definition Settings.h:11870
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream.
Definition Settings.h:12660
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:12468
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:12342
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:12534
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:12440
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:12373
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:12593
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:12430
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue.
Definition Settings.h:11795
Color & color()
Get Color.
Definition Settings.h:11775
Processing & set(const Filters::Hole::Repair::Strictness &value)
Set Filters::Hole::Repair::Strictness.
Definition Settings.h:11975
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:12583
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection.
Definition Settings.h:12066
Processing & set(const Filters::Noise &value)
Set Filters::Noise.
Definition Settings.h:11982
Processing & set(const Filters::Hole &value)
Set Filters::Hole.
Definition Settings.h:11947
Processing & set(const Filters::Cluster &value)
Set Filters::Cluster.
Definition Settings.h:11856
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:12486
const Settings::Processing::Filters & get() const
Definition Settings.h:12219
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:11919
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled.
Definition Settings.h:11996
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing.
Definition Settings.h:12094
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:12158
const Filters & filters() const
Get Filters.
Definition Settings.h:11837
Processing & set(const Filters::Cluster::Removal &value)
Set Filters::Cluster::Removal.
Definition Settings.h:11863
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:12403
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:12643
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:12266
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:12115
Processing & set(const Filters::Noise::Suppression &value)
Set Filters::Noise::Suppression.
Definition Settings.h:12024
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal.
Definition Settings.h:11989
Processing & set(const Filters::Reflection::Removal::Mode &value)
Set Filters::Reflection::Removal::Mode.
Definition Settings.h:12087
Processing & set(const Filters::Hole::Repair::Enabled &value)
Set Filters::Hole::Repair::Enabled.
Definition Settings.h:11961
const Settings::Processing::Resampling & get() const
Definition Settings.h:12601
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled.
Definition Settings.h:12052
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold.
Definition Settings.h:12003
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:12167
Processing & set(const Filters::Cluster::Removal::MinArea &value)
Set Filters::Cluster::Removal::MinArea.
Definition Settings.h:11884
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental.
Definition Settings.h:11891
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:12420
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold.
Definition Settings.h:12059
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green.
Definition Settings.h:11802
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:12194
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:12320
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier.
Definition Settings.h:12038
Processing & set(const Filters::Noise::Repair::Enabled &value)
Set Filters::Noise::Repair::Enabled.
Definition Settings.h:12017
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:12554
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:12307
Processing & set(const Color::Experimental::Mode &value)
Set Color::Experimental::Mode.
Definition Settings.h:11823
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled.
Definition Settings.h:12080
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:11912
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:12246
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:12515
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal.
Definition Settings.h:12073
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:12256
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:11905
const Settings::Processing::Color & get() const
Definition Settings.h:12150
bool operator==(const Processing &other) const
Equality operator.
const Color & color() const
Get Color.
Definition Settings.h:11769
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion.
Definition Settings.h:11898
Processing & set(const Filters::Noise::Suppression::Enabled &value)
Set Filters::Noise::Suppression::Enabled.
Definition Settings.h:12031
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:12236
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:12524
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:12505
Processing & set(const Filters &value)
Set Filters.
Definition Settings.h:11849
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:12609
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red.
Definition Settings.h:11809
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:12411
bool operator!=(const Processing &other) const
Inequality operator.
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:12275
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:12449
Processing & set(const Color::Gamma &value)
Set Color::Gamma.
Definition Settings.h:11830
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:11669
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:12355
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:12227
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:12295
Processing & set(const Filters::Noise::Repair &value)
Set Filters::Noise::Repair.
Definition Settings.h:12010
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:12285
const Resampling & resampling() const
Get Resampling.
Definition Settings.h:12122
Processing & set(const Filters::Hole::Repair::HoleSize &value)
Set Filters::Hole::Repair::HoleSize.
Definition Settings.h:11968
Processing & set(const Filters::Hole::Repair &value)
Set Filters::Hole::Repair.
Definition Settings.h:11954
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:12634
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:12495
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:12364
Enable or disable box filter.
Definition Settings.h:12753
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:12784
bool ValueType
The type of the underlying value.
Definition Settings.h:12770
bool operator==(const Enabled &other) const
Comparison operator.
Definition Settings.h:12804
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:12775
static const Enabled yes
On/enabled.
Definition Settings.h:12771
static const Enabled no
Off/disabled.
Definition Settings.h:12772
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:12816
std::string toString() const
Get the value as string.
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:12810
Two points on the normal describing the direction and distance from the plane from which the normal i...
Definition Settings.h:12833
std::string toString() const
Get the value as string.
bool operator==(const Extents &other) const
Comparison operator.
Definition Settings.h:12881
void reset()
Reset the node to unset state.
constexpr Extents(Zivid::Range< double > value)
Constructor.
Definition Settings.h:12856
constexpr Extents(double minValue, double maxValue)
Constructor.
Definition Settings.h:12876
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:12893
const Zivid::Range< double > & value() const
Get the value.
bool operator!=(const Extents &other) const
Comparison operator.
Definition Settings.h:12887
A point such that the vector from PointO to PointA describes the first edge of the parallelogram.
Definition Settings.h:12910
void reset()
Reset the node to unset state.
constexpr PointA(float x, float y, float z)
Constructor.
Definition Settings.h:12953
bool operator!=(const PointA &other) const
Comparison operator.
Definition Settings.h:12964
PointA()=default
Default constructor.
bool operator==(const PointA &other) const
Comparison operator.
Definition Settings.h:12958
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:12970
constexpr PointA(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:12933
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:12987
PointB()=default
Default constructor.
bool operator==(const PointB &other) const
Comparison operator.
Definition Settings.h:13035
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:13047
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:13030
constexpr PointB(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13010
Zivid::PointXYZ value() const
Get the value.
bool operator!=(const PointB &other) const
Comparison operator.
Definition Settings.h:13041
The point at the intersection of two adjacent edges defining a parallelogram.
Definition Settings.h:13064
constexpr PointO(float x, float y, float z)
Constructor.
Definition Settings.h:13107
void reset()
Reset the node to unset state.
bool operator!=(const PointO &other) const
Comparison operator.
Definition Settings.h:13118
PointO()=default
Default constructor.
constexpr PointO(Zivid::PointXYZ value)
Constructor.
Definition Settings.h:13087
bool operator==(const PointO &other) const
Comparison operator.
Definition Settings.h:13112
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:13124
Removes points outside the given three-dimensional box.
Definition Settings.h:12718
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:13137
Box & set(const PointA &value)
Set PointA.
Definition Settings.h:13312
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:13241
const PointO & pointO() const
Get PointO.
Definition Settings.h:13338
Box & set(const PointO &value)
Set PointO.
Definition Settings.h:13350
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13268
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13262
Box & set(const Extents &value)
Set Extents.
Definition Settings.h:13293
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:13360
PointA & pointA()
Get PointA.
Definition Settings.h:13306
PointB & pointB()
Get PointB.
Definition Settings.h:13325
Box & set(const PointB &value)
Set PointB.
Definition Settings.h:13331
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:13396
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:13378
const Extents & extents() const
Get Extents.
Definition Settings.h:13281
const PointA & pointA() const
Get PointA.
Definition Settings.h:13300
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13204
PointO & pointO()
Get PointO.
Definition Settings.h:13344
Extents & extents()
Get Extents.
Definition Settings.h:13287
const PointB & pointB() const
Get PointB.
Definition Settings.h:13319
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:13433
friend std::ostream & operator<<(std::ostream &stream, const Box &value)
Operator to send the value as string to a stream.
Definition Settings.h:13463
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:13387
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13444
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:13369
Box & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13274
Enable or disable depth filter.
Definition Settings.h:13512
static const Enabled yes
On/enabled.
Definition Settings.h:13530
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:13563
bool operator!=(const Enabled &other) const
Comparison operator.
Definition Settings.h:13569
bool ValueType
The type of the underlying value.
Definition Settings.h:13529
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream.
Definition Settings.h:13575
static std::set< bool > validValues()
All valid values of Enabled.
Definition Settings.h:13534
std::string toString() const
Get the value as string.
static const Enabled no
Off/disabled.
Definition Settings.h:13531
constexpr Enabled(bool value)
Constructor.
Definition Settings.h:13543
Specify the minimum and maximum Z value that will be included.
Definition Settings.h:13592
constexpr Range(double minValue, double maxValue)
Constructor.
Definition Settings.h:13635
constexpr Range(Zivid::Range< double > value)
Constructor.
Definition Settings.h:13615
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:13652
bool operator==(const Range &other) const
Comparison operator.
Definition Settings.h:13640
bool operator!=(const Range &other) const
Comparison operator.
Definition Settings.h:13646
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:13490
Depth & set(const Enabled &value)
Set Enabled.
Definition Settings.h:13789
std::string toString() const
Get the value as string.
const Range & range() const
Get Range.
Definition Settings.h:13796
Depth & set(const Range &value)
Set Range.
Definition Settings.h:13808
const Enabled & isEnabled() const
Get Enabled.
Definition Settings.h:13777
bool operator==(const Depth &other) const
Equality operator.
std::tuple< Settings::RegionOfInterest::Depth::Enabled, Settings::RegionOfInterest::Depth::Range > Descendants
Definition Settings.h:13665
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:13854
bool operator!=(const Depth &other) const
Inequality operator.
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:13818
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:13846
Range & range()
Get Range.
Definition Settings.h:13802
friend std::ostream & operator<<(std::ostream &stream, const Depth &value)
Operator to send the value as string to a stream.
Definition Settings.h:13870
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13722
Enabled & isEnabled()
Get Enabled.
Definition Settings.h:13783
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:13827
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:13756
Removes points outside the region of interest.
Definition Settings.h:12684
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:14175
Depth & depth()
Get Depth.
Definition Settings.h:14087
RegionOfInterest & set(const Depth::Enabled &value)
Set Depth::Enabled.
Definition Settings.h:14100
const Box & box() const
Get Box.
Definition Settings.h:14027
RegionOfInterest & set(const Box &value)
Set Box.
Definition Settings.h:14039
friend std::ostream & operator<<(std::ostream &stream, const RegionOfInterest &value)
Operator to send the value as string to a stream.
Definition Settings.h:14227
RegionOfInterest & set(const Box::PointO &value)
Set Box::PointO.
Definition Settings.h:14074
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:14158
std::string toString() const
Get the value as string.
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:14142
const Settings::RegionOfInterest::Depth & get() const
Definition Settings.h:14166
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:14134
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:13888
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:14184
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:14150
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:13967
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:14007
Box & box()
Get Box.
Definition Settings.h:14033
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:14116
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:14203
RegionOfInterest & set(const Box::PointA &value)
Set Box::PointA.
Definition Settings.h:14060
const Depth & depth() const
Get Depth.
Definition Settings.h:14081
RegionOfInterest & set(const Box::Extents &value)
Set Box::Extents.
Definition Settings.h:14053
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:14211
RegionOfInterest & set(const Box::Enabled &value)
Set Box::Enabled.
Definition Settings.h:14046
RegionOfInterest & set(const Depth::Range &value)
Set Depth::Range.
Definition Settings.h:14107
bool operator!=(const RegionOfInterest &other) const
Inequality operator.
RegionOfInterest & set(const Depth &value)
Set Depth.
Definition Settings.h:14093
RegionOfInterest & set(const Box::PointB &value)
Set Box::PointB.
Definition Settings.h:14067
bool operator==(const RegionOfInterest &other) const
Equality operator.
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:14125
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:14281
ValueType
The type of the underlying value.
Definition Settings.h:14311
std::string toString() const
Get the value as string.
static std::set< ValueType > validValues()
All valid values of Color.
Definition Settings.h:14321
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to serialize the value to a stream.
Definition Settings.h:14368
constexpr Color(ValueType value)
Constructor.
Definition Settings.h:14330
static const Color grayscale
grayscale
Definition Settings.h:14318
bool operator!=(const Color &other) const
Comparison operator.
Definition Settings.h:14362
Color()=default
Default constructor.
static const Color disabled
disabled
Definition Settings.h:14317
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:14356
friend std::ostream & operator<<(std::ostream &stream, const Color::ValueType &value)
Operator to serialize ValueType to a stream.
Definition Settings.h:14350
static const Color rgb
rgb
Definition Settings.h:14316
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:14406
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:14453
static const Pixel redSubsample4x4
redSubsample4x4
Definition Settings.h:14448
constexpr Pixel(ValueType value)
Constructor.
Definition Settings.h:14468
static const Pixel all
all
Definition Settings.h:14444
static const Pixel blueSubsample2x2
blueSubsample2x2
Definition Settings.h:14445
static const Pixel by2x2
by2x2
Definition Settings.h:14449
static const Pixel by4x4
by4x4
Definition Settings.h:14450
bool operator!=(const Pixel &other) const
Comparison operator.
Definition Settings.h:14500
ValueType
The type of the underlying value.
Definition Settings.h:14435
static const Pixel redSubsample2x2
redSubsample2x2
Definition Settings.h:14446
Pixel()=default
Default constructor.
bool operator==(const Pixel &other) const
Comparison operator.
Definition Settings.h:14494
static const Pixel blueSubsample4x4
blueSubsample4x4
Definition Settings.h:14447
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:14488
friend std::ostream & operator<<(std::ostream &stream, const Pixel &value)
Operator to serialize the value to a stream.
Definition Settings.h:14506
std::string toString() const
Get the value as string.
Sampling settings.
Definition Settings.h:14250
std::tuple< Settings::Sampling::Color, Settings::Sampling::Pixel > Descendants
Definition Settings.h:14532
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:14588
bool operator==(const Sampling &other) const
Equality operator.
Color & color()
Get Color.
Definition Settings.h:14647
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:14621
const Pixel & pixel() const
Get Pixel.
Definition Settings.h:14660
friend std::ostream & operator<<(std::ostream &stream, const Sampling &value)
Operator to send the value as string to a stream.
Definition Settings.h:14732
Pixel & pixel()
Get Pixel.
Definition Settings.h:14666
const Settings::Sampling::Color & get() const
Definition Settings.h:14681
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:14708
Sampling()
Default constructor.
const Settings::Sampling::Pixel & get() const
Definition Settings.h:14689
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:14716
const Color & color() const
Get Color.
Definition Settings.h:14641
std::string toString() const
Get the value as string.
Sampling & set(const Color &value)
Set Color.
Definition Settings.h:14653
Sampling & set(const Pixel &value)
Set Pixel.
Definition Settings.h:14672
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:16245
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition Settings.h:16083
const Settings::Color & get() const
Definition Settings.h:15706
Settings(Args &&...args)
Constructor taking variadic number of arguments.
Definition Settings.h:14928
Settings & set(const Processing::Filters::Cluster::Removal::MinArea &value)
Set Processing::Filters::Cluster::Removal::MinArea.
Definition Settings.h:15333
const Settings::Processing::Filters::Outlier & get() const
Definition Settings.h:16064
Settings & set(const RegionOfInterest::Box::PointB &value)
Set RegionOfInterest::Box::PointB.
Definition Settings.h:15632
const Settings::Processing::Filters::Hole::Repair & get() const
Definition Settings.h:15954
const Settings::Processing::Color::Balance & get() const
Definition Settings.h:15748
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled.
Definition Settings.h:15382
const Settings::Processing::Color::Balance::Red & get() const
Definition Settings.h:15772
Settings & set(const Processing::Color::Experimental::Mode &value)
Set Processing::Color::Experimental::Mode.
Definition Settings.h:15284
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing.
Definition Settings.h:15543
const Settings::RegionOfInterest & get() const
Definition Settings.h:16189
const Settings::Processing::Filters::Noise::Removal & get() const
Definition Settings.h:15999
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:15121
const Processing & processing() const
Get Processing.
Definition Settings.h:15223
const Settings::Processing::Color::Gamma & get() const
Definition Settings.h:15797
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition Settings.h:15914
Settings & set(const Processing &value)
Set Processing.
Definition Settings.h:15235
const Settings::Sampling::Pixel & get() const
Definition Settings.h:16279
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition Settings.h:15937
Settings & set(const Sampling &value)
Set Sampling.
Definition Settings.h:15679
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:15501
Settings & set(const Processing::Filters::Hole::Repair::Enabled &value)
Set Processing::Filters::Hole::Repair::Enabled.
Definition Settings.h:15410
const Settings::Processing::Filters::Cluster::Removal::MaxNeighborDistance & get() const
Definition Settings.h:15842
const Settings::Processing::Filters::Hole & get() const
Definition Settings.h:15946
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold.
Definition Settings.h:15389
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian.
Definition Settings.h:15550
Settings & set(const Sampling::Color &value)
Set Sampling::Color.
Definition Settings.h:15686
Color & color()
Get Color.
Definition Settings.h:15165
Settings & set(const Diagnostics &value)
Set Diagnostics.
Definition Settings.h:15190
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition Settings.h:15925
Settings & set(const RegionOfInterest::Depth::Enabled &value)
Set RegionOfInterest::Depth::Enabled.
Definition Settings.h:15653
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise.
Definition Settings.h:15431
const Sampling & sampling() const
Get Sampling.
Definition Settings.h:15667
void load(const std::string &fileName)
Load from the given file.
const Settings::Processing::Filters::Cluster::Removal::MinArea & get() const
Definition Settings.h:15852
const Settings::Acquisitions & get() const
Definition Settings.h:15700
const Settings::Processing::Filters::Experimental & get() const
Definition Settings.h:15860
const Settings::Processing::Filters::Noise::Suppression & get() const
Definition Settings.h:16046
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition Settings.h:16073
Settings & set(const Processing::Filters::Cluster &value)
Set Processing::Filters::Cluster.
Definition Settings.h:15305
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition Settings.h:16167
const Settings::Diagnostics & get() const
Definition Settings.h:15712
RegionOfInterest & regionOfInterest()
Get RegionOfInterest.
Definition Settings.h:15591
const Settings::Processing::Resampling & get() const
Definition Settings.h:16175
Settings & set(const Processing::Filters::Hole &value)
Set Processing::Filters::Hole.
Definition Settings.h:15396
Settings & set(const Processing::Filters::Reflection::Removal::Mode &value)
Set Processing::Filters::Reflection::Removal::Mode.
Definition Settings.h:15536
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition Settings.h:16157
const Settings::RegionOfInterest::Box & get() const
Definition Settings.h:16197
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance.
Definition Settings.h:15249
const Settings::RegionOfInterest::Box::PointO & get() const
Definition Settings.h:16237
Settings & set(const RegionOfInterest::Depth &value)
Set RegionOfInterest::Depth.
Definition Settings.h:15646
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition Settings.h:16009
const Settings::RegionOfInterest::Depth::Enabled & get() const
Definition Settings.h:16253
const Settings::Processing::Filters::Hole::Repair::Strictness & get() const
Definition Settings.h:15982
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition Settings.h:15880
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:16328
std::string serialize() const
Serialize to a string.
const Settings::Processing::Color::Balance::Green & get() const
Definition Settings.h:15764
const Settings::RegionOfInterest::Box::Extents & get() const
Definition Settings.h:16213
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled.
Definition Settings.h:15557
const Settings::Processing & get() const
Definition Settings.h:15732
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection.
Definition Settings.h:15515
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition Settings.h:16341
Settings()
Default constructor.
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition Settings.h:15870
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold.
Definition Settings.h:15508
Settings & set(const Processing::Filters::Hole::Repair::HoleSize &value)
Set Processing::Filters::Hole::Repair::HoleSize.
Definition Settings.h:15417
const Settings::RegionOfInterest::Box::Enabled & get() const
Definition Settings.h:16205
const Settings::Processing::Color::Experimental::Mode & get() const
Definition Settings.h:15789
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength.
Definition Settings.h:15368
Settings & set(const RegionOfInterest::Box::Enabled &value)
Set RegionOfInterest::Box::Enabled.
Definition Settings.h:15611
const Settings::Processing::Filters::Hole::Repair::HoleSize & get() const
Definition Settings.h:15972
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition Settings.h:15903
Settings & set(const RegionOfInterest::Box::Extents &value)
Set RegionOfInterest::Box::Extents.
Definition Settings.h:15618
const Settings::Processing::Color::Balance::Blue & get() const
Definition Settings.h:15756
Settings & set(const Processing::Resampling::Mode &value)
Set Processing::Resampling::Mode.
Definition Settings.h:15578
const Settings::Processing::Filters::Hole::Repair::Enabled & get() const
Definition Settings.h:15963
const Acquisitions & acquisitions() const
Get Acquisitions.
Definition Settings.h:15140
void set(Args &&...args)
Set multiple arguments.
Definition Settings.h:15022
const Settings::Processing::Filters::Reflection & get() const
Definition Settings.h:16101
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental.
Definition Settings.h:15340
const Settings::Processing::Filters::Smoothing & get() const
Definition Settings.h:16138
const Settings::Processing::Filters & get() const
Definition Settings.h:15805
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental.
Definition Settings.h:15277
void save(const std::string &fileName) const
Save to the given file.
Settings & set(const Engine &value)
Set Engine.
Definition Settings.h:15216
Settings & set(const RegionOfInterest::Depth::Range &value)
Set RegionOfInterest::Depth::Range.
Definition Settings.h:15660
const Settings::Processing::Color::Experimental & get() const
Definition Settings.h:15780
const Settings::Processing::Filters::Noise::Repair & get() const
Definition Settings.h:16028
Settings & set(const Processing::Resampling &value)
Set Processing::Resampling.
Definition Settings.h:15571
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal.
Definition Settings.h:15375
const Settings::RegionOfInterest::Box::PointA & get() const
Definition Settings.h:16221
Settings & set(const Processing::Color &value)
Set Processing::Color.
Definition Settings.h:15242
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier.
Definition Settings.h:15487
bool operator==(const Settings &other) const
Equality operator.
Acquisitions & acquisitions()
Get Acquisitions.
Definition Settings.h:15146
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal.
Definition Settings.h:15522
const Settings::Processing::Filters::Noise::Suppression::Enabled & get() const
Definition Settings.h:16056
const Settings::Engine & get() const
Definition Settings.h:15726
const Settings::Processing::Filters::Cluster & get() const
Definition Settings.h:15813
const Settings::Processing::Filters::Noise::Repair::Enabled & get() const
Definition Settings.h:16037
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:15270
Settings & set(const RegionOfInterest::Box::PointO &value)
Set RegionOfInterest::Box::PointO.
Definition Settings.h:15639
const Settings::Sampling::Color & get() const
Definition Settings.h:16273
Settings & set(const Processing::Filters::Cluster::Removal &value)
Set Processing::Filters::Cluster::Removal.
Definition Settings.h:15312
Settings & set(const RegionOfInterest::Box &value)
Set RegionOfInterest::Box.
Definition Settings.h:15604
Settings & set(const Processing::Filters::Noise::Suppression &value)
Set Processing::Filters::Noise::Suppression.
Definition Settings.h:15473
const Engine & engine() const
Get Engine.
Definition Settings.h:15204
Diagnostics & diagnostics()
Get Diagnostics.
Definition Settings.h:15184
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition Settings.h:16019
const Settings::Processing::Filters::Cluster::Removal::Enabled & get() const
Definition Settings.h:15832
const Color & color() const
Get Color.
Definition Settings.h:15159
Sampling & sampling()
Get Sampling.
Definition Settings.h:15673
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled.
Definition Settings.h:15529
Processing & processing()
Get Processing.
Definition Settings.h:15229
Settings & set(const RegionOfInterest::Box::PointA &value)
Set RegionOfInterest::Box::PointA.
Definition Settings.h:15625
Settings & set(const Diagnostics::Enabled &value)
Set Diagnostics::Enabled.
Definition Settings.h:15197
const Settings::Processing::Filters::Noise & get() const
Definition Settings.h:15990
const Settings::Diagnostics::Enabled & get() const
Definition Settings.h:15720
const Settings::Processing::Filters::Cluster::Removal & get() const
Definition Settings.h:15822
Settings & set(const Color &value)
Set Color.
Definition Settings.h:15171
const Settings::Processing::Filters::Reflection::Removal::Mode & get() const
Definition Settings.h:16130
std::string toString() const
Get the value as string.
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition Settings.h:15891
const Settings::RegionOfInterest::Box::PointB & get() const
Definition Settings.h:16229
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion.
Definition Settings.h:15347
Settings & set(const Sampling::Pixel &value)
Set Sampling::Pixel.
Definition Settings.h:15693
Settings & set(const Processing::Filters::Hole::Repair::Strictness &value)
Set Processing::Filters::Hole::Repair::Strictness.
Definition Settings.h:15424
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma.
Definition Settings.h:15291
Settings & set(const Processing::Filters::Cluster::Removal::Enabled &value)
Set Processing::Filters::Cluster::Removal::Enabled.
Definition Settings.h:15319
const Settings::RegionOfInterest::Depth::Range & get() const
Definition Settings.h:16261
const Settings::Sampling & get() const
Definition Settings.h:16267
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold.
Definition Settings.h:15452
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled.
Definition Settings.h:15361
Settings & set(const Acquisitions &value)
Set Acquisitions.
Definition Settings.h:15152
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma.
Definition Settings.h:15564
const Diagnostics & diagnostics() const
Get Diagnostics.
Definition Settings.h:15178
bool operator!=(const Settings &other) const
Inequality operator.
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal.
Definition Settings.h:15438
Settings & set(const Processing::Filters::Noise::Repair &value)
Set Processing::Filters::Noise::Repair.
Definition Settings.h:15459
Settings & set(const Processing::Filters::Cluster::Removal::MaxNeighborDistance &value)
Set Processing::Filters::Cluster::Removal::MaxNeighborDistance.
Definition Settings.h:15326
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal.
Definition Settings.h:15494
Settings & set(const RegionOfInterest &value)
Set RegionOfInterest.
Definition Settings.h:15597
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled.
Definition Settings.h:15445
Engine & engine()
Get Engine.
Definition Settings.h:15210
Settings & set(const Processing::Filters::Hole::Repair &value)
Set Processing::Filters::Hole::Repair.
Definition Settings.h:15403
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction.
Definition Settings.h:15354
const Settings::Processing::Color & get() const
Definition Settings.h:15740
Settings & set(const Processing::Filters::Noise::Repair::Enabled &value)
Set Processing::Filters::Noise::Repair::Enabled.
Definition Settings.h:15466
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition Settings.h:16120
Settings & set(const Processing::Filters::Noise::Suppression::Enabled &value)
Set Processing::Filters::Noise::Suppression::Enabled.
Definition Settings.h:15480
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition Settings.h:16110
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green.
Definition Settings.h:15263
Settings & set(const Processing::Filters &value)
Set Processing::Filters.
Definition Settings.h:15298
const RegionOfInterest & regionOfInterest() const
Get RegionOfInterest.
Definition Settings.h:15585
const Settings::Processing::Resampling::Mode & get() const
Definition Settings.h:16183
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition Settings.h:16093
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:14750
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue.
Definition Settings.h:15256
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition Settings.h:16147
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream.
Definition Settings.h:16362
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