Zivid C++ API  2.4.2+1a2e8cfb-1
Defining the Future of 3D Machine Vision
Settings.h
Go to the documentation of this file.
1 
2 
3 /*******************************************************************************
4 
5  * This file is part of the Zivid 3D Camera API
6 
7  *
8 
9  * Copyright 2015-2021 (C) Zivid AS
10 
11  * All rights reserved.
12 
13  *
14 
15  * Zivid Software License, v1.0
16 
17  *
18 
19  * Redistribution and use in source and binary forms, with or without
20 
21  * modification, are permitted provided that the following conditions are met:
22 
23  *
24 
25  * 1. Redistributions of source code must retain the above copyright notice,
26 
27  * this list of conditions and the following disclaimer.
28 
29  *
30 
31  * 2. Redistributions in binary form must reproduce the above copyright notice,
32 
33  * this list of conditions and the following disclaimer in the documentation
34 
35  * and/or other materials provided with the distribution.
36 
37  *
38 
39  * 3. Neither the name of Zivid AS nor the names of its contributors may be used
40 
41  * to endorse or promote products derived from this software without specific
42 
43  * prior written permission.
44 
45  *
46 
47  * 4. This software, with or without modification, must not be used with any
48 
49  * other 3D camera than from Zivid AS.
50 
51  *
52 
53  * 5. Any software provided in binary form under this license must not be
54 
55  * reverse engineered, decompiled, modified and/or disassembled.
56 
57  *
58 
59  * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
60 
61  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
62 
63  * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
64 
65  * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
66 
67  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
68 
69  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
70 
71  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
72 
73  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
74 
75  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
76 
77  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78 
79  *
80 
81  * Contact: Zivid Customer Success Team <customersuccess@zivid.com>
82 
83  * Info: http://www.zivid.com
84 
85  ******************************************************************************/
86 
87 
88 
89 #pragma once
90 
91 #include <array>
92 #include <chrono>
93 #include <cmath>
94 #include <ctime>
95 #include <iomanip>
96 #include <memory>
97 #include <set>
98 #include <sstream>
99 #include <string>
100 #include <tuple>
101 #include <utility>
102 #include <vector>
103 
106 #include "Zivid/DataModel/Traits.h"
107 #include "Zivid/Detail/CoreExport.h"
108 #include "Zivid/Detail/TypeTraits.h"
109 #include "Zivid/Range.h"
110 
111 #ifdef _MSC_VER
112 # pragma warning(push)
113 # pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
114 #endif
115 
116 namespace Zivid
117 {
120  {
121  public:
123  static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
124 
126  static constexpr const char *path{ "" };
127 
129  static constexpr const char *name{ "Settings" };
130 
132  static constexpr const char *description{
133  R"description(Settings used when capturing with a Zivid camera)description"
134  };
135 
136  static constexpr size_t version{ 8 };
137 
138 #ifndef NO_DOC
139  template<size_t>
140  struct Version;
141 
142  using LatestVersion = Zivid::Settings;
143 
144  // Short identifier. This value is not guaranteed to be universally unique
145  // Todo(ZIVID-2808): Move this to internal DataModelExt header
146  static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
147 
148 #endif
149 
152  {
153  public:
155  static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
156 
158  static constexpr const char *path{ "Acquisition" };
159 
161  static constexpr const char *name{ "Acquisition" };
162 
164  static constexpr const char *description{ R"description(Settings for a single acquisition)description" };
165 
170  {
171  public:
174 
176  static constexpr const char *path{ "Acquisition/Aperture" };
177 
179  static constexpr const char *name{ "Aperture" };
180 
182  static constexpr const char *description{
183  R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
184 the effective aperture diameter).
185 )description"
186  };
187 
189  using ValueType = double;
190 
192  static constexpr Range<double> validRange()
193  {
194  return { 1.4, 32.0 };
195  }
196 
198  Aperture() = default;
199 
201  explicit constexpr Aperture(double value)
202  : m_opt{ verifyValue(value) }
203  {}
204 
209  double value() const;
210 
212  bool hasValue() const;
213 
215  void reset();
216 
218  std::string toString() const;
219 
221  bool operator==(const Aperture &other) const
222  {
223  return m_opt == other.m_opt;
224  }
225 
227  bool operator!=(const Aperture &other) const
228  {
229  return m_opt != other.m_opt;
230  }
231 
233  bool operator<(const Aperture &other) const
234  {
235  return m_opt < other.m_opt;
236  }
237 
239  bool operator>(const Aperture &other) const
240  {
241  return m_opt > other.m_opt;
242  }
243 
245  friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
246  {
247  return stream << value.toString();
248  }
249 
250  private:
251  void setFromString(const std::string &value);
252 
253  constexpr ValueType static verifyValue(const ValueType &value)
254  {
255  return validRange().isInRange(value)
256  ? value
257  : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
258  + std::to_string(validRange().min()) + ", "
259  + std::to_string(validRange().max()) + "]" };
260  }
261 
262  Zivid::DataModel::Detail::Optional<double> m_opt;
263 
264  friend struct DataModel::Detail::Befriend<Aperture>;
265  };
266 
281  {
282  public:
285 
287  static constexpr const char *path{ "Acquisition/Brightness" };
288 
290  static constexpr const char *name{ "Brightness" };
291 
293  static constexpr const char *description{
294  R"description(Brightness controls the light output from the projector.
295 
296 Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
297 or in case of high levels of ambient lighting. Brightness above 1.0 is supported on Zivid One
298 Plus and Zivid Two.
299 
300 When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
301 can capture) will be reduced. For Zivid One Plus the duty cycle in boost mode is 50%. For Zivid
302 Two the duty cycle is reduced linearly from 100% at brightness 1.0, to 50% at brightness 1.8.
303 The duty cycle is calculated over a 10 second period. This limitation is enforced automatically
304 by the camera. Calling capture when the duty cycle limit has been reached will cause the camera
305 to first wait (sleep) for a duration of time to cool down, before capture will start.
306 )description"
307  };
308 
310  using ValueType = double;
311 
313  static constexpr Range<double> validRange()
314  {
315  return { 0, 1.8 };
316  }
317 
319  Brightness() = default;
320 
322  explicit constexpr Brightness(double value)
323  : m_opt{ verifyValue(value) }
324  {}
325 
330  double value() const;
331 
333  bool hasValue() const;
334 
336  void reset();
337 
339  std::string toString() const;
340 
342  bool operator==(const Brightness &other) const
343  {
344  return m_opt == other.m_opt;
345  }
346 
348  bool operator!=(const Brightness &other) const
349  {
350  return m_opt != other.m_opt;
351  }
352 
354  bool operator<(const Brightness &other) const
355  {
356  return m_opt < other.m_opt;
357  }
358 
360  bool operator>(const Brightness &other) const
361  {
362  return m_opt > other.m_opt;
363  }
364 
366  friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
367  {
368  return stream << value.toString();
369  }
370 
371  private:
372  void setFromString(const std::string &value);
373 
374  constexpr ValueType static verifyValue(const ValueType &value)
375  {
376  return validRange().isInRange(value)
377  ? value
378  : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
379  + " } is not in range [" + std::to_string(validRange().min())
380  + ", " + std::to_string(validRange().max()) + "]" };
381  }
382 
383  Zivid::DataModel::Detail::Optional<double> m_opt;
384 
385  friend struct DataModel::Detail::Befriend<Brightness>;
386  };
387 
390  {
391  public:
394 
396  static constexpr const char *path{ "Acquisition/ExposureTime" };
397 
399  static constexpr const char *name{ "ExposureTime" };
400 
402  static constexpr const char *description{
403  R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
404  };
405 
407  using ValueType = std::chrono::microseconds;
408 
411  {
412  return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
413  }
414 
416  ExposureTime() = default;
417 
419  explicit constexpr ExposureTime(std::chrono::microseconds value)
420  : m_opt{ verifyValue(value) }
421  {}
422 
427  std::chrono::microseconds value() const;
428 
430  bool hasValue() const;
431 
433  void reset();
434 
436  std::string toString() const;
437 
439  bool operator==(const ExposureTime &other) const
440  {
441  return m_opt == other.m_opt;
442  }
443 
445  bool operator!=(const ExposureTime &other) const
446  {
447  return m_opt != other.m_opt;
448  }
449 
451  bool operator<(const ExposureTime &other) const
452  {
453  return m_opt < other.m_opt;
454  }
455 
457  bool operator>(const ExposureTime &other) const
458  {
459  return m_opt > other.m_opt;
460  }
461 
463  friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
464  {
465  return stream << value.toString();
466  }
467 
468  private:
469  void setFromString(const std::string &value);
470 
471  constexpr ValueType static verifyValue(const ValueType &value)
472  {
473  return validRange().isInRange(value)
474  ? value
475  : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
476  + " } is not in range ["
477  + std::to_string(validRange().min().count()) + ", "
478  + std::to_string(validRange().max().count()) + "]" };
479  }
480 
481  Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
482 
483  friend struct DataModel::Detail::Befriend<ExposureTime>;
484  };
485 
488  {
489  public:
492 
494  static constexpr const char *path{ "Acquisition/Gain" };
495 
497  static constexpr const char *name{ "Gain" };
498 
500  static constexpr const char *description{ R"description(Analog gain in the camera)description" };
501 
503  using ValueType = double;
504 
506  static constexpr Range<double> validRange()
507  {
508  return { 1, 16 };
509  }
510 
512  Gain() = default;
513 
515  explicit constexpr Gain(double value)
516  : m_opt{ verifyValue(value) }
517  {}
518 
523  double value() const;
524 
526  bool hasValue() const;
527 
529  void reset();
530 
532  std::string toString() const;
533 
535  bool operator==(const Gain &other) const
536  {
537  return m_opt == other.m_opt;
538  }
539 
541  bool operator!=(const Gain &other) const
542  {
543  return m_opt != other.m_opt;
544  }
545 
547  bool operator<(const Gain &other) const
548  {
549  return m_opt < other.m_opt;
550  }
551 
553  bool operator>(const Gain &other) const
554  {
555  return m_opt > other.m_opt;
556  }
557 
559  friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
560  {
561  return stream << value.toString();
562  }
563 
564  private:
565  void setFromString(const std::string &value);
566 
567  constexpr ValueType static verifyValue(const ValueType &value)
568  {
569  return validRange().isInRange(value)
570  ? value
571  : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
572  + std::to_string(validRange().min()) + ", "
573  + std::to_string(validRange().max()) + "]" };
574  }
575 
576  Zivid::DataModel::Detail::Optional<double> m_opt;
577 
578  friend struct DataModel::Detail::Befriend<Gain>;
579  };
580 
585 
588 
603 #ifndef NO_DOC
604  template<typename... Args,
605  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
606  typename std::enable_if<
607  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
608  typename std::decay<Args>::type...>::value,
609  int>::type = 0>
610 #else
611  template<typename... Args>
612 #endif
613  explicit Acquisition(Args &&...args)
614  {
615  using namespace Zivid::Detail::TypeTraits;
616 
617  static_assert(AllArgsDecayedAreUnique<Args...>::value,
618  "Found duplicate types among the arguments passed to Acquisition(...). "
619  "Types should be listed at most once.");
620 
621  set(std::forward<Args>(args)...);
622  }
623 
637 #ifndef NO_DOC
638  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
639 #else
640  template<typename... Args>
641 #endif
642  void set(Args &&...args)
643  {
644  using namespace Zivid::Detail::TypeTraits;
645 
646  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
647  static_assert(AllArgsAreDescendantNodes::value,
648  "All arguments passed to set(...) must be descendant nodes.");
649 
650  static_assert(AllArgsDecayedAreUnique<Args...>::value,
651  "Found duplicate types among the arguments passed to set(...). "
652  "Types should be listed at most once.");
653 
654  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
655  }
656 
671 #ifndef NO_DOC
672  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
673 #else
674  template<typename... Args>
675 #endif
676  Acquisition copyWith(Args &&...args) const
677  {
678  using namespace Zivid::Detail::TypeTraits;
679 
680  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
681  static_assert(AllArgsAreDescendantNodes::value,
682  "All arguments passed to copyWith(...) must be descendant nodes.");
683 
684  static_assert(AllArgsDecayedAreUnique<Args...>::value,
685  "Found duplicate types among the arguments passed to copyWith(...). "
686  "Types should be listed at most once.");
687 
688  auto copy{ *this };
689  copy.set(std::forward<Args>(args)...);
690  return copy;
691  }
692 
694  const Aperture &aperture() const
695  {
696  return m_aperture;
697  }
698 
701  {
702  return m_aperture;
703  }
704 
706  Acquisition &set(const Aperture &value)
707  {
708  m_aperture = value;
709  return *this;
710  }
711 
713  const Brightness &brightness() const
714  {
715  return m_brightness;
716  }
717 
720  {
721  return m_brightness;
722  }
723 
725  Acquisition &set(const Brightness &value)
726  {
727  m_brightness = value;
728  return *this;
729  }
730 
732  const ExposureTime &exposureTime() const
733  {
734  return m_exposureTime;
735  }
736 
739  {
740  return m_exposureTime;
741  }
742 
744  Acquisition &set(const ExposureTime &value)
745  {
746  m_exposureTime = value;
747  return *this;
748  }
749 
751  const Gain &gain() const
752  {
753  return m_gain;
754  }
755 
758  {
759  return m_gain;
760  }
761 
763  Acquisition &set(const Gain &value)
764  {
765  m_gain = value;
766  return *this;
767  }
768 
769  template<typename T,
770  typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
772  {
773  return m_aperture;
774  }
775 
776  template<typename T,
777  typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
779  {
780  return m_brightness;
781  }
782 
783  template<
784  typename T,
785  typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
787  {
788  return m_exposureTime;
789  }
790 
791  template<typename T,
792  typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
794  {
795  return m_gain;
796  }
797 
798  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
800  {
801  return m_aperture;
802  }
803 
804  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
806  {
807  return m_brightness;
808  }
809 
810  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
812  {
813  return m_exposureTime;
814  }
815 
816  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
818  {
819  return m_gain;
820  }
821 
823  template<typename F>
824  void forEach(const F &f) const
825  {
826  f(m_aperture);
827  f(m_brightness);
828  f(m_exposureTime);
829  f(m_gain);
830  }
831 
833  template<typename F>
834  void forEach(const F &f)
835  {
836  f(m_aperture);
837  f(m_brightness);
838  f(m_exposureTime);
839  f(m_gain);
840  }
841 
843  bool operator==(const Acquisition &other) const;
844 
846  bool operator!=(const Acquisition &other) const;
847 
849  std::string toString() const;
850 
852  friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
853  {
854  return stream << value.toString();
855  }
856 
857  private:
858  void setFromString(const std::string &value);
859 
860  void setFromString(const std::string &fullPath, const std::string &value);
861 
862  std::string getString(const std::string &fullPath) const;
863 
864  Aperture m_aperture;
865  Brightness m_brightness;
866  ExposureTime m_exposureTime;
867  Gain m_gain;
868 
869  friend struct DataModel::Detail::Befriend<Acquisition>;
870  };
871 
874  {
875  public:
878 
880  static constexpr const char *path{ "Acquisitions" };
881 
883  static constexpr const char *name{ "Acquisitions" };
884 
886  static constexpr const char *description{ R"description(List of Acquisition objects)description" };
887 
889  using ValueType = std::vector<Settings::Acquisition>;
890 
893  {
894  return { 0, std::numeric_limits<ValueType::size_type>::max() };
895  }
896 
898  Acquisitions() = default;
899 
901  explicit Acquisitions(std::vector<Settings::Acquisition> value)
902  : m_value{ std::move(value) }
903  {}
904 
906  explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
907  : Acquisitions{ ValueType{ value } }
908  {}
909 
911  const std::vector<Settings::Acquisition> &value() const;
912 
914  std::string toString() const;
915 
917  std::size_t size() const noexcept;
918 
920  bool isEmpty() const noexcept;
921 
927  template<typename... Args>
928  void emplaceBack(Args &&...args)
929  {
930  m_value.emplace_back(std::forward<Args>(args)...);
931  }
932 
938  Settings::Acquisition &at(std::size_t pos);
939 
945  const Settings::Acquisition &at(std::size_t pos) const;
946 
953 
959  const Settings::Acquisition &operator[](std::size_t pos) const;
960 
962  template<typename F>
963  void forEach(const F &f)
964  {
965  for(auto &child : m_value)
966  {
967  f(child);
968  }
969  }
970 
972  template<typename F>
973  void forEach(const F &f) const
974  {
975  for(const auto &child : m_value)
976  {
977  f(child);
978  }
979  }
980 
982  bool operator==(const Acquisitions &other) const
983  {
984  return m_value == other.m_value;
985  }
986 
988  bool operator!=(const Acquisitions &other) const
989  {
990  return m_value != other.m_value;
991  }
992 
994  friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
995  {
996  return stream << value.toString();
997  }
998 
999  private:
1000  void setFromString(const std::string &value);
1001 
1002  std::vector<Settings::Acquisition> m_value{};
1003 
1004  friend struct DataModel::Detail::Befriend<Acquisitions>;
1005  };
1006 
1009  {
1010  public:
1013 
1015  static constexpr const char *path{ "Experimental" };
1016 
1018  static constexpr const char *name{ "Experimental" };
1019 
1021  static constexpr const char *description{
1022  R"description(Experimental features. These settings may be changed, renamed, moved or deleted in the future.)description"
1023  };
1024 
1035  {
1036  public:
1039 
1041  static constexpr const char *path{ "Experimental/Engine" };
1042 
1044  static constexpr const char *name{ "Engine" };
1045 
1047  static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1048 
1049 The Phase Engine is the current default Zivid Vision Engine.
1050 
1051 The Stripe Engine uses anti-reflection technology to suppress interreflection artifacts
1052 and improve data quality on shiny objects like cylinders and chrome-plated parts.
1053 Additional acquisition and processing time are required for the Stripe Engine.
1054 The Stripe Engine is currently experimental, and may be changed and improved in the future.
1055 )description" };
1056 
1058  enum class ValueType
1059  {
1060  phase,
1061  stripe
1062  };
1063  static const Engine phase;
1064  static const Engine stripe;
1065 
1067  static std::set<ValueType> validValues()
1068  {
1069  return { ValueType::phase, ValueType::stripe };
1070  }
1071 
1073  Engine() = default;
1074 
1076  explicit constexpr Engine(ValueType value)
1077  : m_opt{ verifyValue(value) }
1078  {}
1079 
1084  ValueType value() const;
1085 
1087  bool hasValue() const;
1088 
1090  void reset();
1091 
1093  std::string toString() const;
1094 
1096  friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1097  {
1098  return stream << Engine{ value }.toString();
1099  }
1100 
1102  bool operator==(const Engine &other) const
1103  {
1104  return m_opt == other.m_opt;
1105  }
1106 
1108  bool operator!=(const Engine &other) const
1109  {
1110  return m_opt != other.m_opt;
1111  }
1112 
1114  friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1115  {
1116  return stream << value.toString();
1117  }
1118 
1119  private:
1120  void setFromString(const std::string &value);
1121 
1122  constexpr ValueType static verifyValue(const ValueType &value)
1123  {
1124  return value == ValueType::phase || value == ValueType::stripe
1125  ? value
1126  : throw std::invalid_argument{
1127  "Invalid value: Engine{ "
1128  + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1129  };
1130  }
1131 
1132  Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1133 
1134  friend struct DataModel::Detail::Befriend<Engine>;
1135  };
1136 
1137  using Descendants = std::tuple<Settings::Experimental::Engine>;
1138 
1141 
1153 #ifndef NO_DOC
1154  template<typename... Args,
1155  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1156  typename std::enable_if<
1157  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
1158  typename std::decay<Args>::type...>::value,
1159  int>::type = 0>
1160 #else
1161  template<typename... Args>
1162 #endif
1163  explicit Experimental(Args &&...args)
1164  {
1165  using namespace Zivid::Detail::TypeTraits;
1166 
1167  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1168  "Found duplicate types among the arguments passed to Experimental(...). "
1169  "Types should be listed at most once.");
1170 
1171  set(std::forward<Args>(args)...);
1172  }
1173 
1184 #ifndef NO_DOC
1185  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1186 #else
1187  template<typename... Args>
1188 #endif
1189  void set(Args &&...args)
1190  {
1191  using namespace Zivid::Detail::TypeTraits;
1192 
1193  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1194  static_assert(AllArgsAreDescendantNodes::value,
1195  "All arguments passed to set(...) must be descendant nodes.");
1196 
1197  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1198  "Found duplicate types among the arguments passed to set(...). "
1199  "Types should be listed at most once.");
1200 
1201  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1202  }
1203 
1215 #ifndef NO_DOC
1216  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1217 #else
1218  template<typename... Args>
1219 #endif
1220  Experimental copyWith(Args &&...args) const
1221  {
1222  using namespace Zivid::Detail::TypeTraits;
1223 
1224  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1225  static_assert(AllArgsAreDescendantNodes::value,
1226  "All arguments passed to copyWith(...) must be descendant nodes.");
1227 
1228  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1229  "Found duplicate types among the arguments passed to copyWith(...). "
1230  "Types should be listed at most once.");
1231 
1232  auto copy{ *this };
1233  copy.set(std::forward<Args>(args)...);
1234  return copy;
1235  }
1236 
1238  const Engine &engine() const
1239  {
1240  return m_engine;
1241  }
1242 
1245  {
1246  return m_engine;
1247  }
1248 
1250  Experimental &set(const Engine &value)
1251  {
1252  m_engine = value;
1253  return *this;
1254  }
1255 
1256  template<typename T,
1257  typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
1259  {
1260  return m_engine;
1261  }
1262 
1263  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1265  {
1266  return m_engine;
1267  }
1268 
1270  template<typename F>
1271  void forEach(const F &f) const
1272  {
1273  f(m_engine);
1274  }
1275 
1277  template<typename F>
1278  void forEach(const F &f)
1279  {
1280  f(m_engine);
1281  }
1282 
1284  bool operator==(const Experimental &other) const;
1285 
1287  bool operator!=(const Experimental &other) const;
1288 
1290  std::string toString() const;
1291 
1293  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
1294  {
1295  return stream << value.toString();
1296  }
1297 
1298  private:
1299  void setFromString(const std::string &value);
1300 
1301  void setFromString(const std::string &fullPath, const std::string &value);
1302 
1303  std::string getString(const std::string &fullPath) const;
1304 
1305  Engine m_engine;
1306 
1307  friend struct DataModel::Detail::Befriend<Experimental>;
1308  };
1309 
1312  {
1313  public:
1316 
1318  static constexpr const char *path{ "Processing" };
1319 
1321  static constexpr const char *name{ "Processing" };
1322 
1324  static constexpr const char *description{
1325  R"description(Settings related to processing of a capture, including filters and color balance)description"
1326  };
1327 
1330  {
1331  public:
1334 
1336  static constexpr const char *path{ "Processing/Color" };
1337 
1339  static constexpr const char *name{ "Color" };
1340 
1342  static constexpr const char *description{ R"description(Color settings)description" };
1343 
1346  {
1347  public:
1350 
1352  static constexpr const char *path{ "Processing/Color/Balance" };
1353 
1355  static constexpr const char *name{ "Balance" };
1356 
1358  static constexpr const char *description{ R"description(Color balance settings)description" };
1359 
1362  {
1363  public:
1366 
1368  static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1369 
1371  static constexpr const char *name{ "Blue" };
1372 
1374  static constexpr const char *description{
1375  R"description(Digital gain applied to blue channel)description"
1376  };
1377 
1379  using ValueType = double;
1380 
1382  static constexpr Range<double> validRange()
1383  {
1384  return { 1.0, 8.0 };
1385  }
1386 
1388  Blue() = default;
1389 
1391  explicit constexpr Blue(double value)
1392  : m_opt{ verifyValue(value) }
1393  {}
1394 
1399  double value() const;
1400 
1402  bool hasValue() const;
1403 
1405  void reset();
1406 
1408  std::string toString() const;
1409 
1411  bool operator==(const Blue &other) const
1412  {
1413  return m_opt == other.m_opt;
1414  }
1415 
1417  bool operator!=(const Blue &other) const
1418  {
1419  return m_opt != other.m_opt;
1420  }
1421 
1423  bool operator<(const Blue &other) const
1424  {
1425  return m_opt < other.m_opt;
1426  }
1427 
1429  bool operator>(const Blue &other) const
1430  {
1431  return m_opt > other.m_opt;
1432  }
1433 
1435  friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1436  {
1437  return stream << value.toString();
1438  }
1439 
1440  private:
1441  void setFromString(const std::string &value);
1442 
1443  constexpr ValueType static verifyValue(const ValueType &value)
1444  {
1445  return validRange().isInRange(value)
1446  ? value
1447  : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1448  + " } is not in range ["
1449  + std::to_string(validRange().min()) + ", "
1450  + std::to_string(validRange().max()) + "]" };
1451  }
1452 
1453  Zivid::DataModel::Detail::Optional<double> m_opt;
1454 
1455  friend struct DataModel::Detail::Befriend<Blue>;
1456  };
1457 
1460  {
1461  public:
1464 
1466  static constexpr const char *path{ "Processing/Color/Balance/Green" };
1467 
1469  static constexpr const char *name{ "Green" };
1470 
1472  static constexpr const char *description{
1473  R"description(Digital gain applied to green channel)description"
1474  };
1475 
1477  using ValueType = double;
1478 
1480  static constexpr Range<double> validRange()
1481  {
1482  return { 1.0, 8.0 };
1483  }
1484 
1486  Green() = default;
1487 
1489  explicit constexpr Green(double value)
1490  : m_opt{ verifyValue(value) }
1491  {}
1492 
1497  double value() const;
1498 
1500  bool hasValue() const;
1501 
1503  void reset();
1504 
1506  std::string toString() const;
1507 
1509  bool operator==(const Green &other) const
1510  {
1511  return m_opt == other.m_opt;
1512  }
1513 
1515  bool operator!=(const Green &other) const
1516  {
1517  return m_opt != other.m_opt;
1518  }
1519 
1521  bool operator<(const Green &other) const
1522  {
1523  return m_opt < other.m_opt;
1524  }
1525 
1527  bool operator>(const Green &other) const
1528  {
1529  return m_opt > other.m_opt;
1530  }
1531 
1533  friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1534  {
1535  return stream << value.toString();
1536  }
1537 
1538  private:
1539  void setFromString(const std::string &value);
1540 
1541  constexpr ValueType static verifyValue(const ValueType &value)
1542  {
1543  return validRange().isInRange(value)
1544  ? value
1545  : throw std::out_of_range{ "Green{ " + std::to_string(value)
1546  + " } is not in range ["
1547  + std::to_string(validRange().min()) + ", "
1548  + std::to_string(validRange().max()) + "]" };
1549  }
1550 
1551  Zivid::DataModel::Detail::Optional<double> m_opt;
1552 
1553  friend struct DataModel::Detail::Befriend<Green>;
1554  };
1555 
1558  {
1559  public:
1562 
1564  static constexpr const char *path{ "Processing/Color/Balance/Red" };
1565 
1567  static constexpr const char *name{ "Red" };
1568 
1570  static constexpr const char *description{
1571  R"description(Digital gain applied to red channel)description"
1572  };
1573 
1575  using ValueType = double;
1576 
1578  static constexpr Range<double> validRange()
1579  {
1580  return { 1.0, 8.0 };
1581  }
1582 
1584  Red() = default;
1585 
1587  explicit constexpr Red(double value)
1588  : m_opt{ verifyValue(value) }
1589  {}
1590 
1595  double value() const;
1596 
1598  bool hasValue() const;
1599 
1601  void reset();
1602 
1604  std::string toString() const;
1605 
1607  bool operator==(const Red &other) const
1608  {
1609  return m_opt == other.m_opt;
1610  }
1611 
1613  bool operator!=(const Red &other) const
1614  {
1615  return m_opt != other.m_opt;
1616  }
1617 
1619  bool operator<(const Red &other) const
1620  {
1621  return m_opt < other.m_opt;
1622  }
1623 
1625  bool operator>(const Red &other) const
1626  {
1627  return m_opt > other.m_opt;
1628  }
1629 
1631  friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1632  {
1633  return stream << value.toString();
1634  }
1635 
1636  private:
1637  void setFromString(const std::string &value);
1638 
1639  constexpr ValueType static verifyValue(const ValueType &value)
1640  {
1641  return validRange().isInRange(value)
1642  ? value
1643  : throw std::out_of_range{ "Red{ " + std::to_string(value)
1644  + " } is not in range ["
1645  + std::to_string(validRange().min()) + ", "
1646  + std::to_string(validRange().max()) + "]" };
1647  }
1648 
1649  Zivid::DataModel::Detail::Optional<double> m_opt;
1650 
1651  friend struct DataModel::Detail::Befriend<Red>;
1652  };
1653 
1657 
1660 
1674 #ifndef NO_DOC
1675  template<typename... Args,
1676  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1677  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
1678  Descendants,
1679  typename std::decay<Args>::type...>::value,
1680  int>::type = 0>
1681 #else
1682  template<typename... Args>
1683 #endif
1684  explicit Balance(Args &&...args)
1685  {
1686  using namespace Zivid::Detail::TypeTraits;
1687 
1688  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1689  "Found duplicate types among the arguments passed to Balance(...). "
1690  "Types should be listed at most once.");
1691 
1692  set(std::forward<Args>(args)...);
1693  }
1694 
1707 #ifndef NO_DOC
1708  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1709 #else
1710  template<typename... Args>
1711 #endif
1712  void set(Args &&...args)
1713  {
1714  using namespace Zivid::Detail::TypeTraits;
1715 
1716  using AllArgsAreDescendantNodes =
1717  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1718  static_assert(AllArgsAreDescendantNodes::value,
1719  "All arguments passed to set(...) must be descendant nodes.");
1720 
1721  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1722  "Found duplicate types among the arguments passed to set(...). "
1723  "Types should be listed at most once.");
1724 
1725  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1726  }
1727 
1741 #ifndef NO_DOC
1742  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1743 #else
1744  template<typename... Args>
1745 #endif
1746  Balance copyWith(Args &&...args) const
1747  {
1748  using namespace Zivid::Detail::TypeTraits;
1749 
1750  using AllArgsAreDescendantNodes =
1751  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1752  static_assert(AllArgsAreDescendantNodes::value,
1753  "All arguments passed to copyWith(...) must be descendant nodes.");
1754 
1755  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1756  "Found duplicate types among the arguments passed to copyWith(...). "
1757  "Types should be listed at most once.");
1758 
1759  auto copy{ *this };
1760  copy.set(std::forward<Args>(args)...);
1761  return copy;
1762  }
1763 
1765  const Blue &blue() const
1766  {
1767  return m_blue;
1768  }
1769 
1772  {
1773  return m_blue;
1774  }
1775 
1777  Balance &set(const Blue &value)
1778  {
1779  m_blue = value;
1780  return *this;
1781  }
1782 
1784  const Green &green() const
1785  {
1786  return m_green;
1787  }
1788 
1791  {
1792  return m_green;
1793  }
1794 
1796  Balance &set(const Green &value)
1797  {
1798  m_green = value;
1799  return *this;
1800  }
1801 
1803  const Red &red() const
1804  {
1805  return m_red;
1806  }
1807 
1810  {
1811  return m_red;
1812  }
1813 
1815  Balance &set(const Red &value)
1816  {
1817  m_red = value;
1818  return *this;
1819  }
1820 
1821  template<typename T,
1822  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
1823  int>::type = 0>
1825  {
1826  return m_blue;
1827  }
1828 
1829  template<
1830  typename T,
1831  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
1832  int>::type = 0>
1834  {
1835  return m_green;
1836  }
1837 
1838  template<typename T,
1839  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
1840  int>::type = 0>
1842  {
1843  return m_red;
1844  }
1845 
1846  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1848  {
1849  return m_blue;
1850  }
1851 
1852  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1854  {
1855  return m_green;
1856  }
1857 
1858  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1860  {
1861  return m_red;
1862  }
1863 
1865  template<typename F>
1866  void forEach(const F &f) const
1867  {
1868  f(m_blue);
1869  f(m_green);
1870  f(m_red);
1871  }
1872 
1874  template<typename F>
1875  void forEach(const F &f)
1876  {
1877  f(m_blue);
1878  f(m_green);
1879  f(m_red);
1880  }
1881 
1883  bool operator==(const Balance &other) const;
1884 
1886  bool operator!=(const Balance &other) const;
1887 
1889  std::string toString() const;
1890 
1892  friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
1893  {
1894  return stream << value.toString();
1895  }
1896 
1897  private:
1898  void setFromString(const std::string &value);
1899 
1900  void setFromString(const std::string &fullPath, const std::string &value);
1901 
1902  std::string getString(const std::string &fullPath) const;
1903 
1904  Blue m_blue;
1905  Green m_green;
1906  Red m_red;
1907 
1908  friend struct DataModel::Detail::Befriend<Balance>;
1909  };
1910 
1913  {
1914  public:
1917 
1919  static constexpr const char *path{ "Processing/Color/Experimental" };
1920 
1922  static constexpr const char *name{ "Experimental" };
1923 
1925  static constexpr const char *description{
1926  R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
1927  };
1928 
1931  {
1932  public:
1935 
1937  static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping" };
1938 
1940  static constexpr const char *name{ "ToneMapping" };
1941 
1943  static constexpr const char *description{ R"description(Tonemapping settings.)description" };
1944 
1955  {
1956  public:
1959 
1961  static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping/Enabled" };
1962 
1964  static constexpr const char *name{ "Enabled" };
1965 
1967  static constexpr const char *description{
1968  R"description(This setting controls when tone mapping of colors is performed. Tone mapping will normalize
1969 the captured color image to the full available output range by applying a gain factor to the
1970 colors. For single-captures this can be used do brighten dark images. For HDR captures this
1971 is required to map high-dynamic-range colors to the more limited dynamic range output.
1972 
1973 This setting has two possible values. `Always` will perform tone-mapping for all captures.
1974 `HdrOnly` will perform tone mapping for HDR captures but not for single-captures. It is not
1975 possible to disable tone mapping for HDR captures.
1976 )description"
1977  };
1978 
1980  enum class ValueType
1981  {
1982  always,
1983  hdrOnly
1984  };
1985  static const Enabled always;
1986  static const Enabled hdrOnly;
1987 
1989  static std::set<ValueType> validValues()
1990  {
1991  return { ValueType::always, ValueType::hdrOnly };
1992  }
1993 
1995  Enabled() = default;
1996 
1998  explicit constexpr Enabled(ValueType value)
1999  : m_opt{ verifyValue(value) }
2000  {}
2001 
2006  ValueType value() const;
2007 
2009  bool hasValue() const;
2010 
2012  void reset();
2013 
2015  std::string toString() const;
2016 
2018  friend std::ostream &operator<<(std::ostream &stream, const Enabled::ValueType &value)
2019  {
2020  return stream << Enabled{ value }.toString();
2021  }
2022 
2024  bool operator==(const Enabled &other) const
2025  {
2026  return m_opt == other.m_opt;
2027  }
2028 
2030  bool operator!=(const Enabled &other) const
2031  {
2032  return m_opt != other.m_opt;
2033  }
2034 
2036  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
2037  {
2038  return stream << value.toString();
2039  }
2040 
2041  private:
2042  void setFromString(const std::string &value);
2043 
2044  constexpr ValueType static verifyValue(const ValueType &value)
2045  {
2046  return value == ValueType::always || value == ValueType::hdrOnly
2047  ? value
2048  : throw std::invalid_argument{
2049  "Invalid value: Enabled{ "
2050  + std::to_string(
2051  static_cast<std::underlying_type<ValueType>::type>(value))
2052  + " }"
2053  };
2054  }
2055 
2056  Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2057 
2058  friend struct DataModel::Detail::Befriend<Enabled>;
2059  };
2060 
2061  using Descendants = std::tuple<Settings::Processing::Color::Experimental::ToneMapping::Enabled>;
2062 
2065 
2077 #ifndef NO_DOC
2078  template<typename... Args,
2079  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2080  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
2081  Descendants,
2082  typename std::decay<Args>::type...>::value,
2083  int>::type = 0>
2084 #else
2085  template<typename... Args>
2086 #endif
2087  explicit ToneMapping(Args &&...args)
2088  {
2089  using namespace Zivid::Detail::TypeTraits;
2090 
2091  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2092  "Found duplicate types among the arguments passed to ToneMapping(...). "
2093  "Types should be listed at most once.");
2094 
2095  set(std::forward<Args>(args)...);
2096  }
2097 
2108 #ifndef NO_DOC
2109  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2110 #else
2111  template<typename... Args>
2112 #endif
2113  void set(Args &&...args)
2114  {
2115  using namespace Zivid::Detail::TypeTraits;
2116 
2117  using AllArgsAreDescendantNodes =
2118  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2119  static_assert(AllArgsAreDescendantNodes::value,
2120  "All arguments passed to set(...) must be descendant nodes.");
2121 
2122  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2123  "Found duplicate types among the arguments passed to set(...). "
2124  "Types should be listed at most once.");
2125 
2126  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2127  }
2128 
2140 #ifndef NO_DOC
2141  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2142 #else
2143  template<typename... Args>
2144 #endif
2145  ToneMapping copyWith(Args &&...args) const
2146  {
2147  using namespace Zivid::Detail::TypeTraits;
2148 
2149  using AllArgsAreDescendantNodes =
2150  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2151  static_assert(AllArgsAreDescendantNodes::value,
2152  "All arguments passed to copyWith(...) must be descendant nodes.");
2153 
2154  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2155  "Found duplicate types among the arguments passed to copyWith(...). "
2156  "Types should be listed at most once.");
2157 
2158  auto copy{ *this };
2159  copy.set(std::forward<Args>(args)...);
2160  return copy;
2161  }
2162 
2164  const Enabled &isEnabled() const
2165  {
2166  return m_enabled;
2167  }
2168 
2171  {
2172  return m_enabled;
2173  }
2174 
2176  ToneMapping &set(const Enabled &value)
2177  {
2178  m_enabled = value;
2179  return *this;
2180  }
2181 
2182  template<
2183  typename T,
2184  typename std::enable_if<
2185  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2186  int>::type = 0>
2188  {
2189  return m_enabled;
2190  }
2191 
2192  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2194  {
2195  return m_enabled;
2196  }
2197 
2199  template<typename F>
2200  void forEach(const F &f) const
2201  {
2202  f(m_enabled);
2203  }
2204 
2206  template<typename F>
2207  void forEach(const F &f)
2208  {
2209  f(m_enabled);
2210  }
2211 
2213  bool operator==(const ToneMapping &other) const;
2214 
2216  bool operator!=(const ToneMapping &other) const;
2217 
2219  std::string toString() const;
2220 
2222  friend std::ostream &operator<<(std::ostream &stream, const ToneMapping &value)
2223  {
2224  return stream << value.toString();
2225  }
2226 
2227  private:
2228  void setFromString(const std::string &value);
2229 
2230  void setFromString(const std::string &fullPath, const std::string &value);
2231 
2232  std::string getString(const std::string &fullPath) const;
2233 
2234  Enabled m_enabled;
2235 
2236  friend struct DataModel::Detail::Befriend<ToneMapping>;
2237  };
2238 
2241 
2244 
2257 #ifndef NO_DOC
2258  template<typename... Args,
2259  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2260  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
2261  Descendants,
2262  typename std::decay<Args>::type...>::value,
2263  int>::type = 0>
2264 #else
2265  template<typename... Args>
2266 #endif
2267  explicit Experimental(Args &&...args)
2268  {
2269  using namespace Zivid::Detail::TypeTraits;
2270 
2271  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2272  "Found duplicate types among the arguments passed to Experimental(...). "
2273  "Types should be listed at most once.");
2274 
2275  set(std::forward<Args>(args)...);
2276  }
2277 
2289 #ifndef NO_DOC
2290  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2291 #else
2292  template<typename... Args>
2293 #endif
2294  void set(Args &&...args)
2295  {
2296  using namespace Zivid::Detail::TypeTraits;
2297 
2298  using AllArgsAreDescendantNodes =
2299  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2300  static_assert(AllArgsAreDescendantNodes::value,
2301  "All arguments passed to set(...) must be descendant nodes.");
2302 
2303  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2304  "Found duplicate types among the arguments passed to set(...). "
2305  "Types should be listed at most once.");
2306 
2307  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2308  }
2309 
2322 #ifndef NO_DOC
2323  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2324 #else
2325  template<typename... Args>
2326 #endif
2327  Experimental copyWith(Args &&...args) const
2328  {
2329  using namespace Zivid::Detail::TypeTraits;
2330 
2331  using AllArgsAreDescendantNodes =
2332  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2333  static_assert(AllArgsAreDescendantNodes::value,
2334  "All arguments passed to copyWith(...) must be descendant nodes.");
2335 
2336  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2337  "Found duplicate types among the arguments passed to copyWith(...). "
2338  "Types should be listed at most once.");
2339 
2340  auto copy{ *this };
2341  copy.set(std::forward<Args>(args)...);
2342  return copy;
2343  }
2344 
2346  const ToneMapping &toneMapping() const
2347  {
2348  return m_toneMapping;
2349  }
2350 
2353  {
2354  return m_toneMapping;
2355  }
2356 
2359  {
2360  m_toneMapping = value;
2361  return *this;
2362  }
2363 
2366  {
2367  m_toneMapping.set(value);
2368  return *this;
2369  }
2370 
2371  template<typename T,
2372  typename std::enable_if<
2373  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
2374  int>::type = 0>
2376  {
2377  return m_toneMapping;
2378  }
2379 
2380  template<
2381  typename T,
2382  typename std::enable_if<
2383  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2384  int>::type = 0>
2386  {
2388  }
2389 
2390  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2392  {
2393  return m_toneMapping;
2394  }
2395 
2397  template<typename F>
2398  void forEach(const F &f) const
2399  {
2400  f(m_toneMapping);
2401  }
2402 
2404  template<typename F>
2405  void forEach(const F &f)
2406  {
2407  f(m_toneMapping);
2408  }
2409 
2411  bool operator==(const Experimental &other) const;
2412 
2414  bool operator!=(const Experimental &other) const;
2415 
2417  std::string toString() const;
2418 
2420  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2421  {
2422  return stream << value.toString();
2423  }
2424 
2425  private:
2426  void setFromString(const std::string &value);
2427 
2428  void setFromString(const std::string &fullPath, const std::string &value);
2429 
2430  std::string getString(const std::string &fullPath) const;
2431 
2432  ToneMapping m_toneMapping;
2433 
2434  friend struct DataModel::Detail::Befriend<Experimental>;
2435  };
2436 
2441  {
2442  public:
2445 
2447  static constexpr const char *path{ "Processing/Color/Gamma" };
2448 
2450  static constexpr const char *name{ "Gamma" };
2451 
2453  static constexpr const char *description{
2454  R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2455 greater than 1 makes the colors darker.
2456 )description"
2457  };
2458 
2460  using ValueType = double;
2461 
2463  static constexpr Range<double> validRange()
2464  {
2465  return { 0.25, 1.5 };
2466  }
2467 
2469  Gamma() = default;
2470 
2472  explicit constexpr Gamma(double value)
2473  : m_opt{ verifyValue(value) }
2474  {}
2475 
2480  double value() const;
2481 
2483  bool hasValue() const;
2484 
2486  void reset();
2487 
2489  std::string toString() const;
2490 
2492  bool operator==(const Gamma &other) const
2493  {
2494  return m_opt == other.m_opt;
2495  }
2496 
2498  bool operator!=(const Gamma &other) const
2499  {
2500  return m_opt != other.m_opt;
2501  }
2502 
2504  bool operator<(const Gamma &other) const
2505  {
2506  return m_opt < other.m_opt;
2507  }
2508 
2510  bool operator>(const Gamma &other) const
2511  {
2512  return m_opt > other.m_opt;
2513  }
2514 
2516  friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2517  {
2518  return stream << value.toString();
2519  }
2520 
2521  private:
2522  void setFromString(const std::string &value);
2523 
2524  constexpr ValueType static verifyValue(const ValueType &value)
2525  {
2526  return validRange().isInRange(value)
2527  ? value
2528  : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2529  + std::to_string(validRange().min()) + ", "
2530  + std::to_string(validRange().max()) + "]" };
2531  }
2532 
2533  Zivid::DataModel::Detail::Optional<double> m_opt;
2534 
2535  friend struct DataModel::Detail::Befriend<Gamma>;
2536  };
2537 
2546 
2549 
2568 #ifndef NO_DOC
2569  template<typename... Args,
2570  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2571  typename std::enable_if<
2572  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
2573  typename std::decay<Args>::type...>::value,
2574  int>::type = 0>
2575 #else
2576  template<typename... Args>
2577 #endif
2578  explicit Color(Args &&...args)
2579  {
2580  using namespace Zivid::Detail::TypeTraits;
2581 
2582  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2583  "Found duplicate types among the arguments passed to Color(...). "
2584  "Types should be listed at most once.");
2585 
2586  set(std::forward<Args>(args)...);
2587  }
2588 
2606 #ifndef NO_DOC
2607  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2608 #else
2609  template<typename... Args>
2610 #endif
2611  void set(Args &&...args)
2612  {
2613  using namespace Zivid::Detail::TypeTraits;
2614 
2615  using AllArgsAreDescendantNodes =
2616  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2617  static_assert(AllArgsAreDescendantNodes::value,
2618  "All arguments passed to set(...) must be descendant nodes.");
2619 
2620  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2621  "Found duplicate types among the arguments passed to set(...). "
2622  "Types should be listed at most once.");
2623 
2624  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2625  }
2626 
2645 #ifndef NO_DOC
2646  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2647 #else
2648  template<typename... Args>
2649 #endif
2650  Color copyWith(Args &&...args) const
2651  {
2652  using namespace Zivid::Detail::TypeTraits;
2653 
2654  using AllArgsAreDescendantNodes =
2655  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2656  static_assert(AllArgsAreDescendantNodes::value,
2657  "All arguments passed to copyWith(...) must be descendant nodes.");
2658 
2659  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2660  "Found duplicate types among the arguments passed to copyWith(...). "
2661  "Types should be listed at most once.");
2662 
2663  auto copy{ *this };
2664  copy.set(std::forward<Args>(args)...);
2665  return copy;
2666  }
2667 
2669  const Balance &balance() const
2670  {
2671  return m_balance;
2672  }
2673 
2676  {
2677  return m_balance;
2678  }
2679 
2681  Color &set(const Balance &value)
2682  {
2683  m_balance = value;
2684  return *this;
2685  }
2686 
2688  Color &set(const Balance::Blue &value)
2689  {
2690  m_balance.set(value);
2691  return *this;
2692  }
2693 
2695  Color &set(const Balance::Green &value)
2696  {
2697  m_balance.set(value);
2698  return *this;
2699  }
2700 
2702  Color &set(const Balance::Red &value)
2703  {
2704  m_balance.set(value);
2705  return *this;
2706  }
2707 
2710  {
2711  return m_experimental;
2712  }
2713 
2716  {
2717  return m_experimental;
2718  }
2719 
2721  Color &set(const Experimental &value)
2722  {
2723  m_experimental = value;
2724  return *this;
2725  }
2726 
2729  {
2730  m_experimental.set(value);
2731  return *this;
2732  }
2733 
2736  {
2737  m_experimental.set(value);
2738  return *this;
2739  }
2740 
2742  const Gamma &gamma() const
2743  {
2744  return m_gamma;
2745  }
2746 
2749  {
2750  return m_gamma;
2751  }
2752 
2754  Color &set(const Gamma &value)
2755  {
2756  m_gamma = value;
2757  return *this;
2758  }
2759 
2760  template<typename T,
2761  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value,
2762  int>::type = 0>
2764  {
2765  return m_balance;
2766  }
2767 
2768  template<typename T,
2769  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2770  int>::type = 0>
2772  {
2773  return m_balance.get<Settings::Processing::Color::Balance::Blue>();
2774  }
2775 
2776  template<typename T,
2777  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2778  int>::type = 0>
2780  {
2781  return m_balance.get<Settings::Processing::Color::Balance::Green>();
2782  }
2783 
2784  template<typename T,
2785  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
2786  int>::type = 0>
2788  {
2789  return m_balance.get<Settings::Processing::Color::Balance::Red>();
2790  }
2791 
2792  template<typename T,
2793  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value,
2794  int>::type = 0>
2796  {
2797  return m_experimental;
2798  }
2799 
2800  template<typename T,
2801  typename std::enable_if<
2802  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
2803  int>::type = 0>
2805  {
2807  }
2808 
2809  template<typename T,
2810  typename std::enable_if<
2811  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2812  int>::type = 0>
2814  {
2816  }
2817 
2818  template<
2819  typename T,
2820  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
2822  {
2823  return m_gamma;
2824  }
2825 
2826  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2828  {
2829  return m_balance;
2830  }
2831 
2832  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2834  {
2835  return m_experimental;
2836  }
2837 
2838  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2840  {
2841  return m_gamma;
2842  }
2843 
2845  template<typename F>
2846  void forEach(const F &f) const
2847  {
2848  f(m_balance);
2849  f(m_experimental);
2850  f(m_gamma);
2851  }
2852 
2854  template<typename F>
2855  void forEach(const F &f)
2856  {
2857  f(m_balance);
2858  f(m_experimental);
2859  f(m_gamma);
2860  }
2861 
2863  bool operator==(const Color &other) const;
2864 
2866  bool operator!=(const Color &other) const;
2867 
2869  std::string toString() const;
2870 
2872  friend std::ostream &operator<<(std::ostream &stream, const Color &value)
2873  {
2874  return stream << value.toString();
2875  }
2876 
2877  private:
2878  void setFromString(const std::string &value);
2879 
2880  void setFromString(const std::string &fullPath, const std::string &value);
2881 
2882  std::string getString(const std::string &fullPath) const;
2883 
2884  Balance m_balance;
2885  Experimental m_experimental;
2886  Gamma m_gamma;
2887 
2888  friend struct DataModel::Detail::Befriend<Color>;
2889  };
2890 
2893  {
2894  public:
2897 
2899  static constexpr const char *path{ "Processing/Filters" };
2900 
2902  static constexpr const char *name{ "Filters" };
2903 
2905  static constexpr const char *description{ R"description(Filters)description" };
2906 
2909  {
2910  public:
2913 
2915  static constexpr const char *path{ "Processing/Filters/Experimental" };
2916 
2918  static constexpr const char *name{ "Experimental" };
2919 
2921  static constexpr const char *description{
2922  R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
2923  };
2924 
2931  {
2932  public:
2935 
2937  static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
2938 
2940  static constexpr const char *name{ "ContrastDistortion" };
2941 
2943  static constexpr const char *description{
2944  R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
2945 or high contrast. These artifacts are caused by blurring in the lens. The filter
2946 works best when aperture values are chosen such that the camera has quite good focus.
2947 The filter also supports removing the points that experience a large correction.
2948 )description"
2949  };
2950 
2953  {
2954  public:
2957 
2959  static constexpr const char *path{
2960  "Processing/Filters/Experimental/ContrastDistortion/Correction"
2961  };
2962 
2964  static constexpr const char *name{ "Correction" };
2965 
2967  static constexpr const char *description{ R"description(Correction)description" };
2968 
2971  {
2972  public:
2975 
2977  static constexpr const char *path{
2978  "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
2979  };
2980 
2982  static constexpr const char *name{ "Enabled" };
2983 
2985  static constexpr const char *description{ R"description(Enabled)description" };
2986 
2988  using ValueType = bool;
2989  static const Enabled yes;
2990  static const Enabled no;
2991 
2993  static std::set<bool> validValues()
2994  {
2995  return { false, true };
2996  }
2997 
2999  Enabled() = default;
3000 
3002  explicit constexpr Enabled(bool value)
3003  : m_opt{ value }
3004  {}
3005 
3010  bool value() const;
3011 
3013  bool hasValue() const;
3014 
3016  void reset();
3017 
3019  std::string toString() const;
3020 
3022  bool operator==(const Enabled &other) const
3023  {
3024  return m_opt == other.m_opt;
3025  }
3026 
3028  bool operator!=(const Enabled &other) const
3029  {
3030  return m_opt != other.m_opt;
3031  }
3032 
3034  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3035  {
3036  return stream << value.toString();
3037  }
3038 
3039  private:
3040  void setFromString(const std::string &value);
3041 
3042  Zivid::DataModel::Detail::Optional<bool> m_opt;
3043 
3044  friend struct DataModel::Detail::Befriend<Enabled>;
3045  };
3046 
3049  {
3050  public:
3053 
3055  static constexpr const char *path{
3056  "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
3057  };
3058 
3060  static constexpr const char *name{ "Strength" };
3061 
3063  static constexpr const char *description{
3064  R"description(Higher values gives more correction.)description"
3065  };
3066 
3068  using ValueType = double;
3069 
3071  static constexpr Range<double> validRange()
3072  {
3073  return { 0.0, 1.0 };
3074  }
3075 
3077  Strength() = default;
3078 
3080  explicit constexpr Strength(double value)
3081  : m_opt{ verifyValue(value) }
3082  {}
3083 
3088  double value() const;
3089 
3091  bool hasValue() const;
3092 
3094  void reset();
3095 
3097  std::string toString() const;
3098 
3100  bool operator==(const Strength &other) const
3101  {
3102  return m_opt == other.m_opt;
3103  }
3104 
3106  bool operator!=(const Strength &other) const
3107  {
3108  return m_opt != other.m_opt;
3109  }
3110 
3112  bool operator<(const Strength &other) const
3113  {
3114  return m_opt < other.m_opt;
3115  }
3116 
3118  bool operator>(const Strength &other) const
3119  {
3120  return m_opt > other.m_opt;
3121  }
3122 
3124  friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
3125  {
3126  return stream << value.toString();
3127  }
3128 
3129  private:
3130  void setFromString(const std::string &value);
3131 
3132  constexpr ValueType static verifyValue(const ValueType &value)
3133  {
3134  return validRange().isInRange(value)
3135  ? value
3136  : throw std::out_of_range{ "Strength{ " + std::to_string(value)
3137  + " } is not in range ["
3138  + std::to_string(validRange().min()) + ", "
3139  + std::to_string(validRange().max()) + "]" };
3140  }
3141 
3142  Zivid::DataModel::Detail::Optional<double> m_opt;
3143 
3144  friend struct DataModel::Detail::Befriend<Strength>;
3145  };
3146 
3147  using Descendants = std::tuple<
3150 
3153 
3166 #ifndef NO_DOC
3167  template<typename... Args,
3168  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3169  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3170  Descendants,
3171  typename std::decay<Args>::type...>::value,
3172  int>::type = 0>
3173 #else
3174  template<typename... Args>
3175 #endif
3176  explicit Correction(Args &&...args)
3177  {
3178  using namespace Zivid::Detail::TypeTraits;
3179 
3180  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3181  "Found duplicate types among the arguments passed to Correction(...). "
3182  "Types should be listed at most once.");
3183 
3184  set(std::forward<Args>(args)...);
3185  }
3186 
3198 #ifndef NO_DOC
3199  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3200 #else
3201  template<typename... Args>
3202 #endif
3203  void set(Args &&...args)
3204  {
3205  using namespace Zivid::Detail::TypeTraits;
3206 
3207  using AllArgsAreDescendantNodes =
3208  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3209  static_assert(AllArgsAreDescendantNodes::value,
3210  "All arguments passed to set(...) must be descendant nodes.");
3211 
3212  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3213  "Found duplicate types among the arguments passed to set(...). "
3214  "Types should be listed at most once.");
3215 
3216  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3217  }
3218 
3231 #ifndef NO_DOC
3232  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3233 #else
3234  template<typename... Args>
3235 #endif
3236  Correction copyWith(Args &&...args) const
3237  {
3238  using namespace Zivid::Detail::TypeTraits;
3239 
3240  using AllArgsAreDescendantNodes =
3241  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3242  static_assert(AllArgsAreDescendantNodes::value,
3243  "All arguments passed to copyWith(...) must be descendant nodes.");
3244 
3245  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3246  "Found duplicate types among the arguments passed to copyWith(...). "
3247  "Types should be listed at most once.");
3248 
3249  auto copy{ *this };
3250  copy.set(std::forward<Args>(args)...);
3251  return copy;
3252  }
3253 
3255  const Enabled &isEnabled() const
3256  {
3257  return m_enabled;
3258  }
3259 
3262  {
3263  return m_enabled;
3264  }
3265 
3267  Correction &set(const Enabled &value)
3268  {
3269  m_enabled = value;
3270  return *this;
3271  }
3272 
3274  const Strength &strength() const
3275  {
3276  return m_strength;
3277  }
3278 
3281  {
3282  return m_strength;
3283  }
3284 
3286  Correction &set(const Strength &value)
3287  {
3288  m_strength = value;
3289  return *this;
3290  }
3291 
3292  template<typename T,
3293  typename std::enable_if<
3294  std::is_same<T,
3295  Settings::Processing::Filters::Experimental::ContrastDistortion::
3296  Correction::Enabled>::value,
3297  int>::type = 0>
3299  get() const
3300  {
3301  return m_enabled;
3302  }
3303 
3304  template<typename T,
3305  typename std::enable_if<
3306  std::is_same<T,
3307  Settings::Processing::Filters::Experimental::ContrastDistortion::
3308  Correction::Strength>::value,
3309  int>::type = 0>
3311  &
3312  get() const
3313  {
3314  return m_strength;
3315  }
3316 
3317  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3319  get() const
3320  {
3321  return m_enabled;
3322  }
3323 
3324  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3326  &
3327  get() const
3328  {
3329  return m_strength;
3330  }
3331 
3333  template<typename F>
3334  void forEach(const F &f) const
3335  {
3336  f(m_enabled);
3337  f(m_strength);
3338  }
3339 
3341  template<typename F>
3342  void forEach(const F &f)
3343  {
3344  f(m_enabled);
3345  f(m_strength);
3346  }
3347 
3349  bool operator==(const Correction &other) const;
3350 
3352  bool operator!=(const Correction &other) const;
3353 
3355  std::string toString() const;
3356 
3358  friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
3359  {
3360  return stream << value.toString();
3361  }
3362 
3363  private:
3364  void setFromString(const std::string &value);
3365 
3366  void setFromString(const std::string &fullPath, const std::string &value);
3367 
3368  std::string getString(const std::string &fullPath) const;
3369 
3370  Enabled m_enabled;
3371  Strength m_strength;
3372 
3373  friend struct DataModel::Detail::Befriend<Correction>;
3374  };
3375 
3378  {
3379  public:
3382 
3384  static constexpr const char *path{
3385  "Processing/Filters/Experimental/ContrastDistortion/Removal"
3386  };
3387 
3389  static constexpr const char *name{ "Removal" };
3390 
3392  static constexpr const char *description{ R"description(Removal)description" };
3393 
3396  {
3397  public:
3400 
3402  static constexpr const char *path{
3403  "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
3404  };
3405 
3407  static constexpr const char *name{ "Enabled" };
3408 
3410  static constexpr const char *description{ R"description(Enabled)description" };
3411 
3413  using ValueType = bool;
3414  static const Enabled yes;
3415  static const Enabled no;
3416 
3418  static std::set<bool> validValues()
3419  {
3420  return { false, true };
3421  }
3422 
3424  Enabled() = default;
3425 
3427  explicit constexpr Enabled(bool value)
3428  : m_opt{ value }
3429  {}
3430 
3435  bool value() const;
3436 
3438  bool hasValue() const;
3439 
3441  void reset();
3442 
3444  std::string toString() const;
3445 
3447  bool operator==(const Enabled &other) const
3448  {
3449  return m_opt == other.m_opt;
3450  }
3451 
3453  bool operator!=(const Enabled &other) const
3454  {
3455  return m_opt != other.m_opt;
3456  }
3457 
3459  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3460  {
3461  return stream << value.toString();
3462  }
3463 
3464  private:
3465  void setFromString(const std::string &value);
3466 
3467  Zivid::DataModel::Detail::Optional<bool> m_opt;
3468 
3469  friend struct DataModel::Detail::Befriend<Enabled>;
3470  };
3471 
3474  {
3475  public:
3478 
3480  static constexpr const char *path{
3481  "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
3482  };
3483 
3485  static constexpr const char *name{ "Threshold" };
3486 
3488  static constexpr const char *description{
3489  R"description(Higher values remove more points.)description"
3490  };
3491 
3493  using ValueType = double;
3494 
3496  static constexpr Range<double> validRange()
3497  {
3498  return { 0.0, 1.0 };
3499  }
3500 
3502  Threshold() = default;
3503 
3505  explicit constexpr Threshold(double value)
3506  : m_opt{ verifyValue(value) }
3507  {}
3508 
3513  double value() const;
3514 
3516  bool hasValue() const;
3517 
3519  void reset();
3520 
3522  std::string toString() const;
3523 
3525  bool operator==(const Threshold &other) const
3526  {
3527  return m_opt == other.m_opt;
3528  }
3529 
3531  bool operator!=(const Threshold &other) const
3532  {
3533  return m_opt != other.m_opt;
3534  }
3535 
3537  bool operator<(const Threshold &other) const
3538  {
3539  return m_opt < other.m_opt;
3540  }
3541 
3543  bool operator>(const Threshold &other) const
3544  {
3545  return m_opt > other.m_opt;
3546  }
3547 
3549  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
3550  {
3551  return stream << value.toString();
3552  }
3553 
3554  private:
3555  void setFromString(const std::string &value);
3556 
3557  constexpr ValueType static verifyValue(const ValueType &value)
3558  {
3559  return validRange().isInRange(value)
3560  ? value
3561  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
3562  + " } is not in range ["
3563  + std::to_string(validRange().min()) + ", "
3564  + std::to_string(validRange().max()) + "]" };
3565  }
3566 
3567  Zivid::DataModel::Detail::Optional<double> m_opt;
3568 
3569  friend struct DataModel::Detail::Befriend<Threshold>;
3570  };
3571 
3572  using Descendants = std::tuple<
3575 
3578 
3591 #ifndef NO_DOC
3592  template<typename... Args,
3593  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3594  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3595  Descendants,
3596  typename std::decay<Args>::type...>::value,
3597  int>::type = 0>
3598 #else
3599  template<typename... Args>
3600 #endif
3601  explicit Removal(Args &&...args)
3602  {
3603  using namespace Zivid::Detail::TypeTraits;
3604 
3605  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3606  "Found duplicate types among the arguments passed to Removal(...). "
3607  "Types should be listed at most once.");
3608 
3609  set(std::forward<Args>(args)...);
3610  }
3611 
3623 #ifndef NO_DOC
3624  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3625 #else
3626  template<typename... Args>
3627 #endif
3628  void set(Args &&...args)
3629  {
3630  using namespace Zivid::Detail::TypeTraits;
3631 
3632  using AllArgsAreDescendantNodes =
3633  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3634  static_assert(AllArgsAreDescendantNodes::value,
3635  "All arguments passed to set(...) must be descendant nodes.");
3636 
3637  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3638  "Found duplicate types among the arguments passed to set(...). "
3639  "Types should be listed at most once.");
3640 
3641  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3642  }
3643 
3656 #ifndef NO_DOC
3657  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3658 #else
3659  template<typename... Args>
3660 #endif
3661  Removal copyWith(Args &&...args) const
3662  {
3663  using namespace Zivid::Detail::TypeTraits;
3664 
3665  using AllArgsAreDescendantNodes =
3666  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3667  static_assert(AllArgsAreDescendantNodes::value,
3668  "All arguments passed to copyWith(...) must be descendant nodes.");
3669 
3670  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3671  "Found duplicate types among the arguments passed to copyWith(...). "
3672  "Types should be listed at most once.");
3673 
3674  auto copy{ *this };
3675  copy.set(std::forward<Args>(args)...);
3676  return copy;
3677  }
3678 
3680  const Enabled &isEnabled() const
3681  {
3682  return m_enabled;
3683  }
3684 
3687  {
3688  return m_enabled;
3689  }
3690 
3692  Removal &set(const Enabled &value)
3693  {
3694  m_enabled = value;
3695  return *this;
3696  }
3697 
3699  const Threshold &threshold() const
3700  {
3701  return m_threshold;
3702  }
3703 
3706  {
3707  return m_threshold;
3708  }
3709 
3711  Removal &set(const Threshold &value)
3712  {
3713  m_threshold = value;
3714  return *this;
3715  }
3716 
3717  template<
3718  typename T,
3719  typename std::enable_if<std::is_same<T,
3720  Settings::Processing::Filters::Experimental::
3721  ContrastDistortion::Removal::Enabled>::value,
3722  int>::type = 0>
3724  get() const
3725  {
3726  return m_enabled;
3727  }
3728 
3729  template<
3730  typename T,
3731  typename std::enable_if<std::is_same<T,
3732  Settings::Processing::Filters::Experimental::
3733  ContrastDistortion::Removal::Threshold>::value,
3734  int>::type = 0>
3736  get() const
3737  {
3738  return m_threshold;
3739  }
3740 
3741  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3743  get() const
3744  {
3745  return m_enabled;
3746  }
3747 
3748  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3750  get() const
3751  {
3752  return m_threshold;
3753  }
3754 
3756  template<typename F>
3757  void forEach(const F &f) const
3758  {
3759  f(m_enabled);
3760  f(m_threshold);
3761  }
3762 
3764  template<typename F>
3765  void forEach(const F &f)
3766  {
3767  f(m_enabled);
3768  f(m_threshold);
3769  }
3770 
3772  bool operator==(const Removal &other) const;
3773 
3775  bool operator!=(const Removal &other) const;
3776 
3778  std::string toString() const;
3779 
3781  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3782  {
3783  return stream << value.toString();
3784  }
3785 
3786  private:
3787  void setFromString(const std::string &value);
3788 
3789  void setFromString(const std::string &fullPath, const std::string &value);
3790 
3791  std::string getString(const std::string &fullPath) const;
3792 
3793  Enabled m_enabled;
3794  Threshold m_threshold;
3795 
3796  friend struct DataModel::Detail::Befriend<Removal>;
3797  };
3798 
3799  using Descendants = std::tuple<
3806 
3809 
3826 #ifndef NO_DOC
3827  template<typename... Args,
3828  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3829  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3830  Descendants,
3831  typename std::decay<Args>::type...>::value,
3832  int>::type = 0>
3833 #else
3834  template<typename... Args>
3835 #endif
3836  explicit ContrastDistortion(Args &&...args)
3837  {
3838  using namespace Zivid::Detail::TypeTraits;
3839 
3840  static_assert(
3841  AllArgsDecayedAreUnique<Args...>::value,
3842  "Found duplicate types among the arguments passed to ContrastDistortion(...). "
3843  "Types should be listed at most once.");
3844 
3845  set(std::forward<Args>(args)...);
3846  }
3847 
3863 #ifndef NO_DOC
3864  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3865 #else
3866  template<typename... Args>
3867 #endif
3868  void set(Args &&...args)
3869  {
3870  using namespace Zivid::Detail::TypeTraits;
3871 
3872  using AllArgsAreDescendantNodes =
3873  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3874  static_assert(AllArgsAreDescendantNodes::value,
3875  "All arguments passed to set(...) must be descendant nodes.");
3876 
3877  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3878  "Found duplicate types among the arguments passed to set(...). "
3879  "Types should be listed at most once.");
3880 
3881  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3882  }
3883 
3900 #ifndef NO_DOC
3901  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3902 #else
3903  template<typename... Args>
3904 #endif
3905  ContrastDistortion copyWith(Args &&...args) const
3906  {
3907  using namespace Zivid::Detail::TypeTraits;
3908 
3909  using AllArgsAreDescendantNodes =
3910  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3911  static_assert(AllArgsAreDescendantNodes::value,
3912  "All arguments passed to copyWith(...) must be descendant nodes.");
3913 
3914  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3915  "Found duplicate types among the arguments passed to copyWith(...). "
3916  "Types should be listed at most once.");
3917 
3918  auto copy{ *this };
3919  copy.set(std::forward<Args>(args)...);
3920  return copy;
3921  }
3922 
3924  const Correction &correction() const
3925  {
3926  return m_correction;
3927  }
3928 
3931  {
3932  return m_correction;
3933  }
3934 
3937  {
3938  m_correction = value;
3939  return *this;
3940  }
3941 
3944  {
3945  m_correction.set(value);
3946  return *this;
3947  }
3948 
3951  {
3952  m_correction.set(value);
3953  return *this;
3954  }
3955 
3957  const Removal &removal() const
3958  {
3959  return m_removal;
3960  }
3961 
3964  {
3965  return m_removal;
3966  }
3967 
3970  {
3971  m_removal = value;
3972  return *this;
3973  }
3974 
3977  {
3978  m_removal.set(value);
3979  return *this;
3980  }
3981 
3984  {
3985  m_removal.set(value);
3986  return *this;
3987  }
3988 
3989  template<typename T,
3990  typename std::enable_if<std::is_same<T,
3991  Settings::Processing::Filters::Experimental::
3992  ContrastDistortion::Correction>::value,
3993  int>::type = 0>
3995  {
3996  return m_correction;
3997  }
3998 
3999  template<
4000  typename T,
4001  typename std::enable_if<std::is_same<T,
4002  Settings::Processing::Filters::Experimental::
4003  ContrastDistortion::Correction::Enabled>::value,
4004  int>::type = 0>
4006  get() const
4007  {
4008  return m_correction.get<
4010  }
4011 
4012  template<
4013  typename T,
4014  typename std::enable_if<std::is_same<T,
4015  Settings::Processing::Filters::Experimental::
4016  ContrastDistortion::Correction::Strength>::value,
4017  int>::type = 0>
4019  get() const
4020  {
4021  return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
4022  Correction::Strength>();
4023  }
4024 
4025  template<typename T,
4026  typename std::enable_if<std::is_same<T,
4027  Settings::Processing::Filters::Experimental::
4028  ContrastDistortion::Removal>::value,
4029  int>::type = 0>
4031  {
4032  return m_removal;
4033  }
4034 
4035  template<typename T,
4036  typename std::enable_if<std::is_same<T,
4037  Settings::Processing::Filters::Experimental::
4038  ContrastDistortion::Removal::Enabled>::value,
4039  int>::type = 0>
4041  const
4042  {
4043  return m_removal.get<
4045  }
4046 
4047  template<
4048  typename T,
4049  typename std::enable_if<std::is_same<T,
4050  Settings::Processing::Filters::Experimental::
4051  ContrastDistortion::Removal::Threshold>::value,
4052  int>::type = 0>
4054  const
4055  {
4056  return m_removal.get<
4058  }
4059 
4060  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4062  {
4063  return m_correction;
4064  }
4065 
4066  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4068  {
4069  return m_removal;
4070  }
4071 
4073  template<typename F>
4074  void forEach(const F &f) const
4075  {
4076  f(m_correction);
4077  f(m_removal);
4078  }
4079 
4081  template<typename F>
4082  void forEach(const F &f)
4083  {
4084  f(m_correction);
4085  f(m_removal);
4086  }
4087 
4089  bool operator==(const ContrastDistortion &other) const;
4090 
4092  bool operator!=(const ContrastDistortion &other) const;
4093 
4095  std::string toString() const;
4096 
4098  friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
4099  {
4100  return stream << value.toString();
4101  }
4102 
4103  private:
4104  void setFromString(const std::string &value);
4105 
4106  void setFromString(const std::string &fullPath, const std::string &value);
4107 
4108  std::string getString(const std::string &fullPath) const;
4109 
4110  Correction m_correction;
4111  Removal m_removal;
4112 
4113  friend struct DataModel::Detail::Befriend<ContrastDistortion>;
4114  };
4115 
4116  using Descendants = std::tuple<
4124 
4127 
4145 #ifndef NO_DOC
4146  template<typename... Args,
4147  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4148  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4149  Descendants,
4150  typename std::decay<Args>::type...>::value,
4151  int>::type = 0>
4152 #else
4153  template<typename... Args>
4154 #endif
4155  explicit Experimental(Args &&...args)
4156  {
4157  using namespace Zivid::Detail::TypeTraits;
4158 
4159  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4160  "Found duplicate types among the arguments passed to Experimental(...). "
4161  "Types should be listed at most once.");
4162 
4163  set(std::forward<Args>(args)...);
4164  }
4165 
4182 #ifndef NO_DOC
4183  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4184 #else
4185  template<typename... Args>
4186 #endif
4187  void set(Args &&...args)
4188  {
4189  using namespace Zivid::Detail::TypeTraits;
4190 
4191  using AllArgsAreDescendantNodes =
4192  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4193  static_assert(AllArgsAreDescendantNodes::value,
4194  "All arguments passed to set(...) must be descendant nodes.");
4195 
4196  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4197  "Found duplicate types among the arguments passed to set(...). "
4198  "Types should be listed at most once.");
4199 
4200  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4201  }
4202 
4220 #ifndef NO_DOC
4221  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4222 #else
4223  template<typename... Args>
4224 #endif
4225  Experimental copyWith(Args &&...args) const
4226  {
4227  using namespace Zivid::Detail::TypeTraits;
4228 
4229  using AllArgsAreDescendantNodes =
4230  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4231  static_assert(AllArgsAreDescendantNodes::value,
4232  "All arguments passed to copyWith(...) must be descendant nodes.");
4233 
4234  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4235  "Found duplicate types among the arguments passed to copyWith(...). "
4236  "Types should be listed at most once.");
4237 
4238  auto copy{ *this };
4239  copy.set(std::forward<Args>(args)...);
4240  return copy;
4241  }
4242 
4245  {
4246  return m_contrastDistortion;
4247  }
4248 
4251  {
4252  return m_contrastDistortion;
4253  }
4254 
4257  {
4258  m_contrastDistortion = value;
4259  return *this;
4260  }
4261 
4264  {
4265  m_contrastDistortion.set(value);
4266  return *this;
4267  }
4268 
4271  {
4272  m_contrastDistortion.set(value);
4273  return *this;
4274  }
4275 
4278  {
4279  m_contrastDistortion.set(value);
4280  return *this;
4281  }
4282 
4285  {
4286  m_contrastDistortion.set(value);
4287  return *this;
4288  }
4289 
4292  {
4293  m_contrastDistortion.set(value);
4294  return *this;
4295  }
4296 
4299  {
4300  m_contrastDistortion.set(value);
4301  return *this;
4302  }
4303 
4304  template<
4305  typename T,
4306  typename std::enable_if<
4307  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
4308  int>::type = 0>
4310  {
4311  return m_contrastDistortion;
4312  }
4313 
4314  template<typename T,
4315  typename std::enable_if<std::is_same<T,
4316  Settings::Processing::Filters::Experimental::
4317  ContrastDistortion::Correction>::value,
4318  int>::type = 0>
4320  {
4321  return m_contrastDistortion
4323  }
4324 
4325  template<typename T,
4326  typename std::enable_if<std::is_same<T,
4327  Settings::Processing::Filters::Experimental::
4328  ContrastDistortion::Correction::Enabled>::value,
4329  int>::type = 0>
4331  const
4332  {
4333  return m_contrastDistortion.get<
4335  }
4336 
4337  template<typename T,
4338  typename std::enable_if<std::is_same<T,
4339  Settings::Processing::Filters::Experimental::
4340  ContrastDistortion::Correction::Strength>::value,
4341  int>::type = 0>
4343  const
4344  {
4345  return m_contrastDistortion.get<
4347  }
4348 
4349  template<
4350  typename T,
4351  typename std::enable_if<
4352  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
4353  value,
4354  int>::type = 0>
4356  {
4357  return m_contrastDistortion
4359  }
4360 
4361  template<typename T,
4362  typename std::enable_if<std::is_same<T,
4363  Settings::Processing::Filters::Experimental::
4364  ContrastDistortion::Removal::Enabled>::value,
4365  int>::type = 0>
4367  {
4368  return m_contrastDistortion
4370  }
4371 
4372  template<typename T,
4373  typename std::enable_if<std::is_same<T,
4374  Settings::Processing::Filters::Experimental::
4375  ContrastDistortion::Removal::Threshold>::value,
4376  int>::type = 0>
4378  const
4379  {
4380  return m_contrastDistortion
4382  }
4383 
4384  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4386  {
4387  return m_contrastDistortion;
4388  }
4389 
4391  template<typename F>
4392  void forEach(const F &f) const
4393  {
4394  f(m_contrastDistortion);
4395  }
4396 
4398  template<typename F>
4399  void forEach(const F &f)
4400  {
4401  f(m_contrastDistortion);
4402  }
4403 
4405  bool operator==(const Experimental &other) const;
4406 
4408  bool operator!=(const Experimental &other) const;
4409 
4411  std::string toString() const;
4412 
4414  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
4415  {
4416  return stream << value.toString();
4417  }
4418 
4419  private:
4420  void setFromString(const std::string &value);
4421 
4422  void setFromString(const std::string &fullPath, const std::string &value);
4423 
4424  std::string getString(const std::string &fullPath) const;
4425 
4426  ContrastDistortion m_contrastDistortion;
4427 
4428  friend struct DataModel::Detail::Befriend<Experimental>;
4429  };
4430 
4433  {
4434  public:
4437 
4439  static constexpr const char *path{ "Processing/Filters/Noise" };
4440 
4442  static constexpr const char *name{ "Noise" };
4443 
4445  static constexpr const char *description{
4446  R"description(Contains a filter that removes points with low signal-to-noise ratio (SNR))description"
4447  };
4448 
4451  {
4452  public:
4455 
4457  static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
4458 
4460  static constexpr const char *name{ "Removal" };
4461 
4463  static constexpr const char *description{
4464  R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold)description"
4465  };
4466 
4469  {
4470  public:
4473 
4475  static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
4476 
4478  static constexpr const char *name{ "Enabled" };
4479 
4481  static constexpr const char *description{
4482  R"description(Enable or disable the SNR filter)description"
4483  };
4484 
4486  using ValueType = bool;
4487  static const Enabled yes;
4488  static const Enabled no;
4489 
4491  static std::set<bool> validValues()
4492  {
4493  return { false, true };
4494  }
4495 
4497  Enabled() = default;
4498 
4500  explicit constexpr Enabled(bool value)
4501  : m_opt{ value }
4502  {}
4503 
4508  bool value() const;
4509 
4511  bool hasValue() const;
4512 
4514  void reset();
4515 
4517  std::string toString() const;
4518 
4520  bool operator==(const Enabled &other) const
4521  {
4522  return m_opt == other.m_opt;
4523  }
4524 
4526  bool operator!=(const Enabled &other) const
4527  {
4528  return m_opt != other.m_opt;
4529  }
4530 
4532  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4533  {
4534  return stream << value.toString();
4535  }
4536 
4537  private:
4538  void setFromString(const std::string &value);
4539 
4540  Zivid::DataModel::Detail::Optional<bool> m_opt;
4541 
4542  friend struct DataModel::Detail::Befriend<Enabled>;
4543  };
4544 
4547  {
4548  public:
4551 
4553  static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
4554 
4556  static constexpr const char *name{ "Threshold" };
4557 
4559  static constexpr const char *description{
4560  R"description(Discard points with signal-to-noise ratio (SNR) below the given value)description"
4561  };
4562 
4564  using ValueType = double;
4565 
4567  static constexpr Range<double> validRange()
4568  {
4569  return { 0.0, 100.0 };
4570  }
4571 
4573  Threshold() = default;
4574 
4576  explicit constexpr Threshold(double value)
4577  : m_opt{ verifyValue(value) }
4578  {}
4579 
4584  double value() const;
4585 
4587  bool hasValue() const;
4588 
4590  void reset();
4591 
4593  std::string toString() const;
4594 
4596  bool operator==(const Threshold &other) const
4597  {
4598  return m_opt == other.m_opt;
4599  }
4600 
4602  bool operator!=(const Threshold &other) const
4603  {
4604  return m_opt != other.m_opt;
4605  }
4606 
4608  bool operator<(const Threshold &other) const
4609  {
4610  return m_opt < other.m_opt;
4611  }
4612 
4614  bool operator>(const Threshold &other) const
4615  {
4616  return m_opt > other.m_opt;
4617  }
4618 
4620  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4621  {
4622  return stream << value.toString();
4623  }
4624 
4625  private:
4626  void setFromString(const std::string &value);
4627 
4628  constexpr ValueType static verifyValue(const ValueType &value)
4629  {
4630  return validRange().isInRange(value)
4631  ? value
4632  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4633  + " } is not in range ["
4634  + std::to_string(validRange().min()) + ", "
4635  + std::to_string(validRange().max()) + "]" };
4636  }
4637 
4638  Zivid::DataModel::Detail::Optional<double> m_opt;
4639 
4640  friend struct DataModel::Detail::Befriend<Threshold>;
4641  };
4642 
4645 
4648 
4661 #ifndef NO_DOC
4662  template<typename... Args,
4663  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4664  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4665  Descendants,
4666  typename std::decay<Args>::type...>::value,
4667  int>::type = 0>
4668 #else
4669  template<typename... Args>
4670 #endif
4671  explicit Removal(Args &&...args)
4672  {
4673  using namespace Zivid::Detail::TypeTraits;
4674 
4675  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4676  "Found duplicate types among the arguments passed to Removal(...). "
4677  "Types should be listed at most once.");
4678 
4679  set(std::forward<Args>(args)...);
4680  }
4681 
4693 #ifndef NO_DOC
4694  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4695 #else
4696  template<typename... Args>
4697 #endif
4698  void set(Args &&...args)
4699  {
4700  using namespace Zivid::Detail::TypeTraits;
4701 
4702  using AllArgsAreDescendantNodes =
4703  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4704  static_assert(AllArgsAreDescendantNodes::value,
4705  "All arguments passed to set(...) must be descendant nodes.");
4706 
4707  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4708  "Found duplicate types among the arguments passed to set(...). "
4709  "Types should be listed at most once.");
4710 
4711  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4712  }
4713 
4726 #ifndef NO_DOC
4727  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4728 #else
4729  template<typename... Args>
4730 #endif
4731  Removal copyWith(Args &&...args) const
4732  {
4733  using namespace Zivid::Detail::TypeTraits;
4734 
4735  using AllArgsAreDescendantNodes =
4736  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4737  static_assert(AllArgsAreDescendantNodes::value,
4738  "All arguments passed to copyWith(...) must be descendant nodes.");
4739 
4740  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4741  "Found duplicate types among the arguments passed to copyWith(...). "
4742  "Types should be listed at most once.");
4743 
4744  auto copy{ *this };
4745  copy.set(std::forward<Args>(args)...);
4746  return copy;
4747  }
4748 
4750  const Enabled &isEnabled() const
4751  {
4752  return m_enabled;
4753  }
4754 
4757  {
4758  return m_enabled;
4759  }
4760 
4762  Removal &set(const Enabled &value)
4763  {
4764  m_enabled = value;
4765  return *this;
4766  }
4767 
4769  const Threshold &threshold() const
4770  {
4771  return m_threshold;
4772  }
4773 
4776  {
4777  return m_threshold;
4778  }
4779 
4781  Removal &set(const Threshold &value)
4782  {
4783  m_threshold = value;
4784  return *this;
4785  }
4786 
4787  template<typename T,
4788  typename std::enable_if<
4789  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
4790  int>::type = 0>
4792  {
4793  return m_enabled;
4794  }
4795 
4796  template<typename T,
4797  typename std::enable_if<
4798  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
4799  int>::type = 0>
4801  {
4802  return m_threshold;
4803  }
4804 
4805  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4807  {
4808  return m_enabled;
4809  }
4810 
4811  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4813  {
4814  return m_threshold;
4815  }
4816 
4818  template<typename F>
4819  void forEach(const F &f) const
4820  {
4821  f(m_enabled);
4822  f(m_threshold);
4823  }
4824 
4826  template<typename F>
4827  void forEach(const F &f)
4828  {
4829  f(m_enabled);
4830  f(m_threshold);
4831  }
4832 
4834  bool operator==(const Removal &other) const;
4835 
4837  bool operator!=(const Removal &other) const;
4838 
4840  std::string toString() const;
4841 
4843  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4844  {
4845  return stream << value.toString();
4846  }
4847 
4848  private:
4849  void setFromString(const std::string &value);
4850 
4851  void setFromString(const std::string &fullPath, const std::string &value);
4852 
4853  std::string getString(const std::string &fullPath) const;
4854 
4855  Enabled m_enabled;
4856  Threshold m_threshold;
4857 
4858  friend struct DataModel::Detail::Befriend<Removal>;
4859  };
4860 
4864 
4867 
4881 #ifndef NO_DOC
4882  template<typename... Args,
4883  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4884  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4885  Descendants,
4886  typename std::decay<Args>::type...>::value,
4887  int>::type = 0>
4888 #else
4889  template<typename... Args>
4890 #endif
4891  explicit Noise(Args &&...args)
4892  {
4893  using namespace Zivid::Detail::TypeTraits;
4894 
4895  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4896  "Found duplicate types among the arguments passed to Noise(...). "
4897  "Types should be listed at most once.");
4898 
4899  set(std::forward<Args>(args)...);
4900  }
4901 
4914 #ifndef NO_DOC
4915  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4916 #else
4917  template<typename... Args>
4918 #endif
4919  void set(Args &&...args)
4920  {
4921  using namespace Zivid::Detail::TypeTraits;
4922 
4923  using AllArgsAreDescendantNodes =
4924  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4925  static_assert(AllArgsAreDescendantNodes::value,
4926  "All arguments passed to set(...) must be descendant nodes.");
4927 
4928  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4929  "Found duplicate types among the arguments passed to set(...). "
4930  "Types should be listed at most once.");
4931 
4932  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4933  }
4934 
4948 #ifndef NO_DOC
4949  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4950 #else
4951  template<typename... Args>
4952 #endif
4953  Noise copyWith(Args &&...args) const
4954  {
4955  using namespace Zivid::Detail::TypeTraits;
4956 
4957  using AllArgsAreDescendantNodes =
4958  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4959  static_assert(AllArgsAreDescendantNodes::value,
4960  "All arguments passed to copyWith(...) must be descendant nodes.");
4961 
4962  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4963  "Found duplicate types among the arguments passed to copyWith(...). "
4964  "Types should be listed at most once.");
4965 
4966  auto copy{ *this };
4967  copy.set(std::forward<Args>(args)...);
4968  return copy;
4969  }
4970 
4972  const Removal &removal() const
4973  {
4974  return m_removal;
4975  }
4976 
4979  {
4980  return m_removal;
4981  }
4982 
4984  Noise &set(const Removal &value)
4985  {
4986  m_removal = value;
4987  return *this;
4988  }
4989 
4991  Noise &set(const Removal::Enabled &value)
4992  {
4993  m_removal.set(value);
4994  return *this;
4995  }
4996 
4999  {
5000  m_removal.set(value);
5001  return *this;
5002  }
5003 
5004  template<
5005  typename T,
5006  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
5007  int>::type = 0>
5009  {
5010  return m_removal;
5011  }
5012 
5013  template<typename T,
5014  typename std::enable_if<
5015  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
5016  int>::type = 0>
5018  {
5020  }
5021 
5022  template<typename T,
5023  typename std::enable_if<
5024  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
5025  int>::type = 0>
5027  {
5029  }
5030 
5031  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5033  {
5034  return m_removal;
5035  }
5036 
5038  template<typename F>
5039  void forEach(const F &f) const
5040  {
5041  f(m_removal);
5042  }
5043 
5045  template<typename F>
5046  void forEach(const F &f)
5047  {
5048  f(m_removal);
5049  }
5050 
5052  bool operator==(const Noise &other) const;
5053 
5055  bool operator!=(const Noise &other) const;
5056 
5058  std::string toString() const;
5059 
5061  friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
5062  {
5063  return stream << value.toString();
5064  }
5065 
5066  private:
5067  void setFromString(const std::string &value);
5068 
5069  void setFromString(const std::string &fullPath, const std::string &value);
5070 
5071  std::string getString(const std::string &fullPath) const;
5072 
5073  Removal m_removal;
5074 
5075  friend struct DataModel::Detail::Befriend<Noise>;
5076  };
5077 
5080  {
5081  public:
5084 
5086  static constexpr const char *path{ "Processing/Filters/Outlier" };
5087 
5089  static constexpr const char *name{ "Outlier" };
5090 
5092  static constexpr const char *description{
5093  R"description(Contains a filter that removes points with large Euclidean distance to neighboring points)description"
5094  };
5095 
5098  {
5099  public:
5102 
5104  static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
5105 
5107  static constexpr const char *name{ "Removal" };
5108 
5110  static constexpr const char *description{
5111  R"description(Discard point if Euclidean distance to neighboring points is above a threshold)description"
5112  };
5113 
5116  {
5117  public:
5120 
5122  static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
5123 
5125  static constexpr const char *name{ "Enabled" };
5126 
5128  static constexpr const char *description{
5129  R"description(Enable or disable the outlier filter)description"
5130  };
5131 
5133  using ValueType = bool;
5134  static const Enabled yes;
5135  static const Enabled no;
5136 
5138  static std::set<bool> validValues()
5139  {
5140  return { false, true };
5141  }
5142 
5144  Enabled() = default;
5145 
5147  explicit constexpr Enabled(bool value)
5148  : m_opt{ value }
5149  {}
5150 
5155  bool value() const;
5156 
5158  bool hasValue() const;
5159 
5161  void reset();
5162 
5164  std::string toString() const;
5165 
5167  bool operator==(const Enabled &other) const
5168  {
5169  return m_opt == other.m_opt;
5170  }
5171 
5173  bool operator!=(const Enabled &other) const
5174  {
5175  return m_opt != other.m_opt;
5176  }
5177 
5179  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5180  {
5181  return stream << value.toString();
5182  }
5183 
5184  private:
5185  void setFromString(const std::string &value);
5186 
5187  Zivid::DataModel::Detail::Optional<bool> m_opt;
5188 
5189  friend struct DataModel::Detail::Befriend<Enabled>;
5190  };
5191 
5194  {
5195  public:
5198 
5200  static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
5201 
5203  static constexpr const char *name{ "Threshold" };
5204 
5206  static constexpr const char *description{
5207  R"description(Discard point if Euclidean distance to neighboring points is above the given value)description"
5208  };
5209 
5211  using ValueType = double;
5212 
5214  static constexpr Range<double> validRange()
5215  {
5216  return { 0.0, 100.0 };
5217  }
5218 
5220  Threshold() = default;
5221 
5223  explicit constexpr Threshold(double value)
5224  : m_opt{ verifyValue(value) }
5225  {}
5226 
5231  double value() const;
5232 
5234  bool hasValue() const;
5235 
5237  void reset();
5238 
5240  std::string toString() const;
5241 
5243  bool operator==(const Threshold &other) const
5244  {
5245  return m_opt == other.m_opt;
5246  }
5247 
5249  bool operator!=(const Threshold &other) const
5250  {
5251  return m_opt != other.m_opt;
5252  }
5253 
5255  bool operator<(const Threshold &other) const
5256  {
5257  return m_opt < other.m_opt;
5258  }
5259 
5261  bool operator>(const Threshold &other) const
5262  {
5263  return m_opt > other.m_opt;
5264  }
5265 
5267  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
5268  {
5269  return stream << value.toString();
5270  }
5271 
5272  private:
5273  void setFromString(const std::string &value);
5274 
5275  constexpr ValueType static verifyValue(const ValueType &value)
5276  {
5277  return validRange().isInRange(value)
5278  ? value
5279  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
5280  + " } is not in range ["
5281  + std::to_string(validRange().min()) + ", "
5282  + std::to_string(validRange().max()) + "]" };
5283  }
5284 
5285  Zivid::DataModel::Detail::Optional<double> m_opt;
5286 
5287  friend struct DataModel::Detail::Befriend<Threshold>;
5288  };
5289 
5292 
5295 
5308 #ifndef NO_DOC
5309  template<typename... Args,
5310  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5311  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5312  Descendants,
5313  typename std::decay<Args>::type...>::value,
5314  int>::type = 0>
5315 #else
5316  template<typename... Args>
5317 #endif
5318  explicit Removal(Args &&...args)
5319  {
5320  using namespace Zivid::Detail::TypeTraits;
5321 
5322  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5323  "Found duplicate types among the arguments passed to Removal(...). "
5324  "Types should be listed at most once.");
5325 
5326  set(std::forward<Args>(args)...);
5327  }
5328 
5340 #ifndef NO_DOC
5341  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5342 #else
5343  template<typename... Args>
5344 #endif
5345  void set(Args &&...args)
5346  {
5347  using namespace Zivid::Detail::TypeTraits;
5348 
5349  using AllArgsAreDescendantNodes =
5350  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5351  static_assert(AllArgsAreDescendantNodes::value,
5352  "All arguments passed to set(...) must be descendant nodes.");
5353 
5354  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5355  "Found duplicate types among the arguments passed to set(...). "
5356  "Types should be listed at most once.");
5357 
5358  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5359  }
5360 
5373 #ifndef NO_DOC
5374  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5375 #else
5376  template<typename... Args>
5377 #endif
5378  Removal copyWith(Args &&...args) const
5379  {
5380  using namespace Zivid::Detail::TypeTraits;
5381 
5382  using AllArgsAreDescendantNodes =
5383  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5384  static_assert(AllArgsAreDescendantNodes::value,
5385  "All arguments passed to copyWith(...) must be descendant nodes.");
5386 
5387  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5388  "Found duplicate types among the arguments passed to copyWith(...). "
5389  "Types should be listed at most once.");
5390 
5391  auto copy{ *this };
5392  copy.set(std::forward<Args>(args)...);
5393  return copy;
5394  }
5395 
5397  const Enabled &isEnabled() const
5398  {
5399  return m_enabled;
5400  }
5401 
5404  {
5405  return m_enabled;
5406  }
5407 
5409  Removal &set(const Enabled &value)
5410  {
5411  m_enabled = value;
5412  return *this;
5413  }
5414 
5416  const Threshold &threshold() const
5417  {
5418  return m_threshold;
5419  }
5420 
5423  {
5424  return m_threshold;
5425  }
5426 
5428  Removal &set(const Threshold &value)
5429  {
5430  m_threshold = value;
5431  return *this;
5432  }
5433 
5434  template<typename T,
5435  typename std::enable_if<
5436  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5437  int>::type = 0>
5439  {
5440  return m_enabled;
5441  }
5442 
5443  template<typename T,
5444  typename std::enable_if<
5445  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5446  int>::type = 0>
5448  {
5449  return m_threshold;
5450  }
5451 
5452  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5454  {
5455  return m_enabled;
5456  }
5457 
5458  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5460  {
5461  return m_threshold;
5462  }
5463 
5465  template<typename F>
5466  void forEach(const F &f) const
5467  {
5468  f(m_enabled);
5469  f(m_threshold);
5470  }
5471 
5473  template<typename F>
5474  void forEach(const F &f)
5475  {
5476  f(m_enabled);
5477  f(m_threshold);
5478  }
5479 
5481  bool operator==(const Removal &other) const;
5482 
5484  bool operator!=(const Removal &other) const;
5485 
5487  std::string toString() const;
5488 
5490  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5491  {
5492  return stream << value.toString();
5493  }
5494 
5495  private:
5496  void setFromString(const std::string &value);
5497 
5498  void setFromString(const std::string &fullPath, const std::string &value);
5499 
5500  std::string getString(const std::string &fullPath) const;
5501 
5502  Enabled m_enabled;
5503  Threshold m_threshold;
5504 
5505  friend struct DataModel::Detail::Befriend<Removal>;
5506  };
5507 
5511 
5514 
5528 #ifndef NO_DOC
5529  template<typename... Args,
5530  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5531  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5532  Descendants,
5533  typename std::decay<Args>::type...>::value,
5534  int>::type = 0>
5535 #else
5536  template<typename... Args>
5537 #endif
5538  explicit Outlier(Args &&...args)
5539  {
5540  using namespace Zivid::Detail::TypeTraits;
5541 
5542  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5543  "Found duplicate types among the arguments passed to Outlier(...). "
5544  "Types should be listed at most once.");
5545 
5546  set(std::forward<Args>(args)...);
5547  }
5548 
5561 #ifndef NO_DOC
5562  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5563 #else
5564  template<typename... Args>
5565 #endif
5566  void set(Args &&...args)
5567  {
5568  using namespace Zivid::Detail::TypeTraits;
5569 
5570  using AllArgsAreDescendantNodes =
5571  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5572  static_assert(AllArgsAreDescendantNodes::value,
5573  "All arguments passed to set(...) must be descendant nodes.");
5574 
5575  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5576  "Found duplicate types among the arguments passed to set(...). "
5577  "Types should be listed at most once.");
5578 
5579  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5580  }
5581 
5595 #ifndef NO_DOC
5596  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5597 #else
5598  template<typename... Args>
5599 #endif
5600  Outlier copyWith(Args &&...args) const
5601  {
5602  using namespace Zivid::Detail::TypeTraits;
5603 
5604  using AllArgsAreDescendantNodes =
5605  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5606  static_assert(AllArgsAreDescendantNodes::value,
5607  "All arguments passed to copyWith(...) must be descendant nodes.");
5608 
5609  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5610  "Found duplicate types among the arguments passed to copyWith(...). "
5611  "Types should be listed at most once.");
5612 
5613  auto copy{ *this };
5614  copy.set(std::forward<Args>(args)...);
5615  return copy;
5616  }
5617 
5619  const Removal &removal() const
5620  {
5621  return m_removal;
5622  }
5623 
5626  {
5627  return m_removal;
5628  }
5629 
5631  Outlier &set(const Removal &value)
5632  {
5633  m_removal = value;
5634  return *this;
5635  }
5636 
5639  {
5640  m_removal.set(value);
5641  return *this;
5642  }
5643 
5646  {
5647  m_removal.set(value);
5648  return *this;
5649  }
5650 
5651  template<
5652  typename T,
5653  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
5654  int>::type = 0>
5656  {
5657  return m_removal;
5658  }
5659 
5660  template<typename T,
5661  typename std::enable_if<
5662  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5663  int>::type = 0>
5665  {
5667  }
5668 
5669  template<typename T,
5670  typename std::enable_if<
5671  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5672  int>::type = 0>
5674  {
5676  }
5677 
5678  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5680  {
5681  return m_removal;
5682  }
5683 
5685  template<typename F>
5686  void forEach(const F &f) const
5687  {
5688  f(m_removal);
5689  }
5690 
5692  template<typename F>
5693  void forEach(const F &f)
5694  {
5695  f(m_removal);
5696  }
5697 
5699  bool operator==(const Outlier &other) const;
5700 
5702  bool operator!=(const Outlier &other) const;
5703 
5705  std::string toString() const;
5706 
5708  friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
5709  {
5710  return stream << value.toString();
5711  }
5712 
5713  private:
5714  void setFromString(const std::string &value);
5715 
5716  void setFromString(const std::string &fullPath, const std::string &value);
5717 
5718  std::string getString(const std::string &fullPath) const;
5719 
5720  Removal m_removal;
5721 
5722  friend struct DataModel::Detail::Befriend<Outlier>;
5723  };
5724 
5727  {
5728  public:
5731 
5733  static constexpr const char *path{ "Processing/Filters/Reflection" };
5734 
5736  static constexpr const char *name{ "Reflection" };
5737 
5739  static constexpr const char *description{
5740  R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials))description"
5741  };
5742 
5745  {
5746  public:
5749 
5751  static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
5752 
5754  static constexpr const char *name{ "Removal" };
5755 
5757  static constexpr const char *description{
5758  R"description(Discard points likely introduced by reflections (useful for shiny materials))description"
5759  };
5760 
5763  {
5764  public:
5767 
5769  static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
5770 
5772  static constexpr const char *name{ "Enabled" };
5773 
5775  static constexpr const char *description{
5776  R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate)description"
5777  };
5778 
5780  using ValueType = bool;
5781  static const Enabled yes;
5782  static const Enabled no;
5783 
5785  static std::set<bool> validValues()
5786  {
5787  return { false, true };
5788  }
5789 
5791  Enabled() = default;
5792 
5794  explicit constexpr Enabled(bool value)
5795  : m_opt{ value }
5796  {}
5797 
5802  bool value() const;
5803 
5805  bool hasValue() const;
5806 
5808  void reset();
5809 
5811  std::string toString() const;
5812 
5814  bool operator==(const Enabled &other) const
5815  {
5816  return m_opt == other.m_opt;
5817  }
5818 
5820  bool operator!=(const Enabled &other) const
5821  {
5822  return m_opt != other.m_opt;
5823  }
5824 
5826  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5827  {
5828  return stream << value.toString();
5829  }
5830 
5831  private:
5832  void setFromString(const std::string &value);
5833 
5834  Zivid::DataModel::Detail::Optional<bool> m_opt;
5835 
5836  friend struct DataModel::Detail::Befriend<Enabled>;
5837  };
5838 
5839  using Descendants = std::tuple<Settings::Processing::Filters::Reflection::Removal::Enabled>;
5840 
5843 
5855 #ifndef NO_DOC
5856  template<typename... Args,
5857  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5858  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5859  Descendants,
5860  typename std::decay<Args>::type...>::value,
5861  int>::type = 0>
5862 #else
5863  template<typename... Args>
5864 #endif
5865  explicit Removal(Args &&...args)
5866  {
5867  using namespace Zivid::Detail::TypeTraits;
5868 
5869  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5870  "Found duplicate types among the arguments passed to Removal(...). "
5871  "Types should be listed at most once.");
5872 
5873  set(std::forward<Args>(args)...);
5874  }
5875 
5886 #ifndef NO_DOC
5887  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5888 #else
5889  template<typename... Args>
5890 #endif
5891  void set(Args &&...args)
5892  {
5893  using namespace Zivid::Detail::TypeTraits;
5894 
5895  using AllArgsAreDescendantNodes =
5896  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5897  static_assert(AllArgsAreDescendantNodes::value,
5898  "All arguments passed to set(...) must be descendant nodes.");
5899 
5900  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5901  "Found duplicate types among the arguments passed to set(...). "
5902  "Types should be listed at most once.");
5903 
5904  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5905  }
5906 
5918 #ifndef NO_DOC
5919  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5920 #else
5921  template<typename... Args>
5922 #endif
5923  Removal copyWith(Args &&...args) const
5924  {
5925  using namespace Zivid::Detail::TypeTraits;
5926 
5927  using AllArgsAreDescendantNodes =
5928  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5929  static_assert(AllArgsAreDescendantNodes::value,
5930  "All arguments passed to copyWith(...) must be descendant nodes.");
5931 
5932  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5933  "Found duplicate types among the arguments passed to copyWith(...). "
5934  "Types should be listed at most once.");
5935 
5936  auto copy{ *this };
5937  copy.set(std::forward<Args>(args)...);
5938  return copy;
5939  }
5940 
5942  const Enabled &isEnabled() const
5943  {
5944  return m_enabled;
5945  }
5946 
5949  {
5950  return m_enabled;
5951  }
5952 
5954  Removal &set(const Enabled &value)
5955  {
5956  m_enabled = value;
5957  return *this;
5958  }
5959 
5960  template<
5961  typename T,
5962  typename std::enable_if<
5963  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
5964  int>::type = 0>
5966  {
5967  return m_enabled;
5968  }
5969 
5970  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5972  {
5973  return m_enabled;
5974  }
5975 
5977  template<typename F>
5978  void forEach(const F &f) const
5979  {
5980  f(m_enabled);
5981  }
5982 
5984  template<typename F>
5985  void forEach(const F &f)
5986  {
5987  f(m_enabled);
5988  }
5989 
5991  bool operator==(const Removal &other) const;
5992 
5994  bool operator!=(const Removal &other) const;
5995 
5997  std::string toString() const;
5998 
6000  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
6001  {
6002  return stream << value.toString();
6003  }
6004 
6005  private:
6006  void setFromString(const std::string &value);
6007 
6008  void setFromString(const std::string &fullPath, const std::string &value);
6009 
6010  std::string getString(const std::string &fullPath) const;
6011 
6012  Enabled m_enabled;
6013 
6014  friend struct DataModel::Detail::Befriend<Removal>;
6015  };
6016 
6019 
6022 
6035 #ifndef NO_DOC
6036  template<typename... Args,
6037  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6038  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
6039  Descendants,
6040  typename std::decay<Args>::type...>::value,
6041  int>::type = 0>
6042 #else
6043  template<typename... Args>
6044 #endif
6045  explicit Reflection(Args &&...args)
6046  {
6047  using namespace Zivid::Detail::TypeTraits;
6048 
6049  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6050  "Found duplicate types among the arguments passed to Reflection(...). "
6051  "Types should be listed at most once.");
6052 
6053  set(std::forward<Args>(args)...);
6054  }
6055 
6067 #ifndef NO_DOC
6068  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6069 #else
6070  template<typename... Args>
6071 #endif
6072  void set(Args &&...args)
6073  {
6074  using namespace Zivid::Detail::TypeTraits;
6075 
6076  using AllArgsAreDescendantNodes =
6077  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6078  static_assert(AllArgsAreDescendantNodes::value,
6079  "All arguments passed to set(...) must be descendant nodes.");
6080 
6081  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6082  "Found duplicate types among the arguments passed to set(...). "
6083  "Types should be listed at most once.");
6084 
6085  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6086  }
6087 
6100 #ifndef NO_DOC
6101  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6102 #else
6103  template<typename... Args>
6104 #endif
6105  Reflection copyWith(Args &&...args) const
6106  {
6107  using namespace Zivid::Detail::TypeTraits;
6108 
6109  using AllArgsAreDescendantNodes =
6110  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6111  static_assert(AllArgsAreDescendantNodes::value,
6112  "All arguments passed to copyWith(...) must be descendant nodes.");
6113 
6114  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6115  "Found duplicate types among the arguments passed to copyWith(...). "
6116  "Types should be listed at most once.");
6117 
6118  auto copy{ *this };
6119  copy.set(std::forward<Args>(args)...);
6120  return copy;
6121  }
6122 
6124  const Removal &removal() const
6125  {
6126  return m_removal;
6127  }
6128 
6131  {
6132  return m_removal;
6133  }
6134 
6136  Reflection &set(const Removal &value)
6137  {
6138  m_removal = value;
6139  return *this;
6140  }
6141 
6144  {
6145  m_removal.set(value);
6146  return *this;
6147  }
6148 
6149  template<typename T,
6150  typename std::enable_if<
6151  std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
6152  int>::type = 0>
6154  {
6155  return m_removal;
6156  }
6157 
6158  template<typename T,
6159  typename std::enable_if<
6160  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6161  int>::type = 0>
6163  {
6165  }
6166 
6167  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6169  {
6170  return m_removal;
6171  }
6172 
6174  template<typename F>
6175  void forEach(const F &f) const
6176  {
6177  f(m_removal);
6178  }
6179 
6181  template<typename F>
6182  void forEach(const F &f)
6183  {
6184  f(m_removal);
6185  }
6186 
6188  bool operator==(const Reflection &other) const;
6189 
6191  bool operator!=(const Reflection &other) const;
6192 
6194  std::string toString() const;
6195 
6197  friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
6198  {
6199  return stream << value.toString();
6200  }
6201 
6202  private:
6203  void setFromString(const std::string &value);
6204 
6205  void setFromString(const std::string &fullPath, const std::string &value);
6206 
6207  std::string getString(const std::string &fullPath) const;
6208 
6209  Removal m_removal;
6210 
6211  friend struct DataModel::Detail::Befriend<Reflection>;
6212  };
6213 
6216  {
6217  public:
6220 
6222  static constexpr const char *path{ "Processing/Filters/Smoothing" };
6223 
6225  static constexpr const char *name{ "Smoothing" };
6226 
6228  static constexpr const char *description{ R"description(Smoothing filters)description" };
6229 
6232  {
6233  public:
6236 
6238  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
6239 
6241  static constexpr const char *name{ "Gaussian" };
6242 
6244  static constexpr const char *description{
6245  R"description(Gaussian smoothing of the point cloud)description"
6246  };
6247 
6250  {
6251  public:
6254 
6256  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
6257 
6259  static constexpr const char *name{ "Enabled" };
6260 
6262  static constexpr const char *description{
6263  R"description(Enable or disable the smoothing filter)description"
6264  };
6265 
6267  using ValueType = bool;
6268  static const Enabled yes;
6269  static const Enabled no;
6270 
6272  static std::set<bool> validValues()
6273  {
6274  return { false, true };
6275  }
6276 
6278  Enabled() = default;
6279 
6281  explicit constexpr Enabled(bool value)
6282  : m_opt{ value }
6283  {}
6284 
6289  bool value() const;
6290 
6292  bool hasValue() const;
6293 
6295  void reset();
6296 
6298  std::string toString() const;
6299 
6301  bool operator==(const Enabled &other) const
6302  {
6303  return m_opt == other.m_opt;
6304  }
6305 
6307  bool operator!=(const Enabled &other) const
6308  {
6309  return m_opt != other.m_opt;
6310  }
6311 
6313  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6314  {
6315  return stream << value.toString();
6316  }
6317 
6318  private:
6319  void setFromString(const std::string &value);
6320 
6321  Zivid::DataModel::Detail::Optional<bool> m_opt;
6322 
6323  friend struct DataModel::Detail::Befriend<Enabled>;
6324  };
6325 
6328  {
6329  public:
6332 
6334  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
6335 
6337  static constexpr const char *name{ "Sigma" };
6338 
6340  static constexpr const char *description{
6341  R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients))description"
6342  };
6343 
6345  using ValueType = double;
6346 
6348  static constexpr Range<double> validRange()
6349  {
6350  return { 0.5, 5 };
6351  }
6352 
6354  Sigma() = default;
6355 
6357  explicit constexpr Sigma(double value)
6358  : m_opt{ verifyValue(value) }
6359  {}
6360 
6365  double value() const;
6366 
6368  bool hasValue() const;
6369 
6371  void reset();
6372 
6374  std::string toString() const;
6375 
6377  bool operator==(const Sigma &other) const
6378  {
6379  return m_opt == other.m_opt;
6380  }
6381 
6383  bool operator!=(const Sigma &other) const
6384  {
6385  return m_opt != other.m_opt;
6386  }
6387 
6389  bool operator<(const Sigma &other) const
6390  {
6391  return m_opt < other.m_opt;
6392  }
6393 
6395  bool operator>(const Sigma &other) const
6396  {
6397  return m_opt > other.m_opt;
6398  }
6399 
6401  friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
6402  {
6403  return stream << value.toString();
6404  }
6405 
6406  private:
6407  void setFromString(const std::string &value);
6408 
6409  constexpr ValueType static verifyValue(const ValueType &value)
6410  {
6411  return validRange().isInRange(value)
6412  ? value
6413  : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
6414  + " } is not in range ["
6415  + std::to_string(validRange().min()) + ", "
6416  + std::to_string(validRange().max()) + "]" };
6417  }
6418 
6419  Zivid::DataModel::Detail::Optional<double> m_opt;
6420 
6421  friend struct DataModel::Detail::Befriend<Sigma>;
6422  };
6423 
6426 
6429 
6442 #ifndef NO_DOC
6443  template<typename... Args,
6444  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6445  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
6446  Descendants,
6447  typename std::decay<Args>::type...>::value,
6448  int>::type = 0>
6449 #else
6450  template<typename... Args>
6451 #endif
6452  explicit Gaussian(Args &&...args)
6453  {
6454  using namespace Zivid::Detail::TypeTraits;
6455 
6456  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6457  "Found duplicate types among the arguments passed to Gaussian(...). "
6458  "Types should be listed at most once.");
6459 
6460  set(std::forward<Args>(args)...);
6461  }
6462 
6474 #ifndef NO_DOC
6475  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6476 #else
6477  template<typename... Args>
6478 #endif
6479  void set(Args &&...args)
6480  {
6481  using namespace Zivid::Detail::TypeTraits;
6482 
6483  using AllArgsAreDescendantNodes =
6484  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6485  static_assert(AllArgsAreDescendantNodes::value,
6486  "All arguments passed to set(...) must be descendant nodes.");
6487 
6488  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6489  "Found duplicate types among the arguments passed to set(...). "
6490  "Types should be listed at most once.");
6491 
6492  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6493  }
6494 
6507 #ifndef NO_DOC
6508  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6509 #else
6510  template<typename... Args>
6511 #endif
6512  Gaussian copyWith(Args &&...args) const
6513  {
6514  using namespace Zivid::Detail::TypeTraits;
6515 
6516  using AllArgsAreDescendantNodes =
6517  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6518  static_assert(AllArgsAreDescendantNodes::value,
6519  "All arguments passed to copyWith(...) must be descendant nodes.");
6520 
6521  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6522  "Found duplicate types among the arguments passed to copyWith(...). "
6523  "Types should be listed at most once.");
6524 
6525  auto copy{ *this };
6526  copy.set(std::forward<Args>(args)...);
6527  return copy;
6528  }
6529 
6531  const Enabled &isEnabled() const
6532  {
6533  return m_enabled;
6534  }
6535 
6538  {
6539  return m_enabled;
6540  }
6541 
6543  Gaussian &set(const Enabled &value)
6544  {
6545  m_enabled = value;
6546  return *this;
6547  }
6548 
6550  const Sigma &sigma() const
6551  {
6552  return m_sigma;
6553  }
6554 
6557  {
6558  return m_sigma;
6559  }
6560 
6562  Gaussian &set(const Sigma &value)
6563  {
6564  m_sigma = value;
6565  return *this;
6566  }
6567 
6568  template<
6569  typename T,
6570  typename std::enable_if<
6571  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
6572  int>::type = 0>
6574  {
6575  return m_enabled;
6576  }
6577 
6578  template<typename T,
6579  typename std::enable_if<
6580  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
6581  int>::type = 0>
6583  {
6584  return m_sigma;
6585  }
6586 
6587  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6589  {
6590  return m_enabled;
6591  }
6592 
6593  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6595  {
6596  return m_sigma;
6597  }
6598 
6600  template<typename F>
6601  void forEach(const F &f) const
6602  {
6603  f(m_enabled);
6604  f(m_sigma);
6605  }
6606 
6608  template<typename F>
6609  void forEach(const F &f)
6610  {
6611  f(m_enabled);
6612  f(m_sigma);
6613  }
6614 
6616  bool operator==(const Gaussian &other) const;
6617 
6619  bool operator!=(const Gaussian &other) const;
6620 
6622  std::string toString() const;
6623 
6625  friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
6626  {
6627  return stream << value.toString();
6628  }
6629 
6630  private:
6631  void setFromString(const std::string &value);
6632 
6633  void setFromString(const std::string &fullPath, const std::string &value);
6634 
6635  std::string getString(const std::string &fullPath) const;
6636 
6637  Enabled m_enabled;
6638  Sigma m_sigma;
6639 
6640  friend struct DataModel::Detail::Befriend<Gaussian>;
6641  };
6642 
6646 
6649 
6663 #ifndef NO_DOC
6664  template<typename... Args,
6665  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6666  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
6667  Descendants,
6668  typename std::decay<Args>::type...>::value,
6669  int>::type = 0>
6670 #else
6671  template<typename... Args>
6672 #endif
6673  explicit Smoothing(Args &&...args)
6674  {
6675  using namespace Zivid::Detail::TypeTraits;
6676 
6677  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6678  "Found duplicate types among the arguments passed to Smoothing(...). "
6679  "Types should be listed at most once.");
6680 
6681  set(std::forward<Args>(args)...);
6682  }
6683 
6696 #ifndef NO_DOC
6697  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6698 #else
6699  template<typename... Args>
6700 #endif
6701  void set(Args &&...args)
6702  {
6703  using namespace Zivid::Detail::TypeTraits;
6704 
6705  using AllArgsAreDescendantNodes =
6706  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6707  static_assert(AllArgsAreDescendantNodes::value,
6708  "All arguments passed to set(...) must be descendant nodes.");
6709 
6710  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6711  "Found duplicate types among the arguments passed to set(...). "
6712  "Types should be listed at most once.");
6713 
6714  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6715  }
6716 
6730 #ifndef NO_DOC
6731  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6732 #else
6733  template<typename... Args>
6734 #endif
6735  Smoothing copyWith(Args &&...args) const
6736  {
6737  using namespace Zivid::Detail::TypeTraits;
6738 
6739  using AllArgsAreDescendantNodes =
6740  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6741  static_assert(AllArgsAreDescendantNodes::value,
6742  "All arguments passed to copyWith(...) must be descendant nodes.");
6743 
6744  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6745  "Found duplicate types among the arguments passed to copyWith(...). "
6746  "Types should be listed at most once.");
6747 
6748  auto copy{ *this };
6749  copy.set(std::forward<Args>(args)...);
6750  return copy;
6751  }
6752 
6754  const Gaussian &gaussian() const
6755  {
6756  return m_gaussian;
6757  }
6758 
6761  {
6762  return m_gaussian;
6763  }
6764 
6766  Smoothing &set(const Gaussian &value)
6767  {
6768  m_gaussian = value;
6769  return *this;
6770  }
6771 
6774  {
6775  m_gaussian.set(value);
6776  return *this;
6777  }
6778 
6781  {
6782  m_gaussian.set(value);
6783  return *this;
6784  }
6785 
6786  template<typename T,
6787  typename std::enable_if<
6788  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
6789  int>::type = 0>
6791  {
6792  return m_gaussian;
6793  }
6794 
6795  template<typename T,
6796  typename std::enable_if<
6797  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
6798  int>::type = 0>
6800  {
6802  }
6803 
6804  template<typename T,
6805  typename std::enable_if<
6806  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
6807  int>::type = 0>
6809  {
6811  }
6812 
6813  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6815  {
6816  return m_gaussian;
6817  }
6818 
6820  template<typename F>
6821  void forEach(const F &f) const
6822  {
6823  f(m_gaussian);
6824  }
6825 
6827  template<typename F>
6828  void forEach(const F &f)
6829  {
6830  f(m_gaussian);
6831  }
6832 
6834  bool operator==(const Smoothing &other) const;
6835 
6837  bool operator!=(const Smoothing &other) const;
6838 
6840  std::string toString() const;
6841 
6843  friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
6844  {
6845  return stream << value.toString();
6846  }
6847 
6848  private:
6849  void setFromString(const std::string &value);
6850 
6851  void setFromString(const std::string &fullPath, const std::string &value);
6852 
6853  std::string getString(const std::string &fullPath) const;
6854 
6855  Gaussian m_gaussian;
6856 
6857  friend struct DataModel::Detail::Befriend<Smoothing>;
6858  };
6859 
6860  using Descendants =
6884 
6887 
6921 #ifndef NO_DOC
6922  template<typename... Args,
6923  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6924  typename std::enable_if<
6925  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
6926  typename std::decay<Args>::type...>::value,
6927  int>::type = 0>
6928 #else
6929  template<typename... Args>
6930 #endif
6931  explicit Filters(Args &&...args)
6932  {
6933  using namespace Zivid::Detail::TypeTraits;
6934 
6935  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6936  "Found duplicate types among the arguments passed to Filters(...). "
6937  "Types should be listed at most once.");
6938 
6939  set(std::forward<Args>(args)...);
6940  }
6941 
6974 #ifndef NO_DOC
6975  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6976 #else
6977  template<typename... Args>
6978 #endif
6979  void set(Args &&...args)
6980  {
6981  using namespace Zivid::Detail::TypeTraits;
6982 
6983  using AllArgsAreDescendantNodes =
6984  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6985  static_assert(AllArgsAreDescendantNodes::value,
6986  "All arguments passed to set(...) must be descendant nodes.");
6987 
6988  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6989  "Found duplicate types among the arguments passed to set(...). "
6990  "Types should be listed at most once.");
6991 
6992  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6993  }
6994 
7028 #ifndef NO_DOC
7029  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7030 #else
7031  template<typename... Args>
7032 #endif
7033  Filters copyWith(Args &&...args) const
7034  {
7035  using namespace Zivid::Detail::TypeTraits;
7036 
7037  using AllArgsAreDescendantNodes =
7038  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7039  static_assert(AllArgsAreDescendantNodes::value,
7040  "All arguments passed to copyWith(...) must be descendant nodes.");
7041 
7042  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7043  "Found duplicate types among the arguments passed to copyWith(...). "
7044  "Types should be listed at most once.");
7045 
7046  auto copy{ *this };
7047  copy.set(std::forward<Args>(args)...);
7048  return copy;
7049  }
7050 
7053  {
7054  return m_experimental;
7055  }
7056 
7059  {
7060  return m_experimental;
7061  }
7062 
7064  Filters &set(const Experimental &value)
7065  {
7066  m_experimental = value;
7067  return *this;
7068  }
7069 
7072  {
7073  m_experimental.set(value);
7074  return *this;
7075  }
7076 
7079  {
7080  m_experimental.set(value);
7081  return *this;
7082  }
7083 
7086  {
7087  m_experimental.set(value);
7088  return *this;
7089  }
7090 
7093  {
7094  m_experimental.set(value);
7095  return *this;
7096  }
7097 
7100  {
7101  m_experimental.set(value);
7102  return *this;
7103  }
7104 
7107  {
7108  m_experimental.set(value);
7109  return *this;
7110  }
7111 
7114  {
7115  m_experimental.set(value);
7116  return *this;
7117  }
7118 
7120  const Noise &noise() const
7121  {
7122  return m_noise;
7123  }
7124 
7127  {
7128  return m_noise;
7129  }
7130 
7132  Filters &set(const Noise &value)
7133  {
7134  m_noise = value;
7135  return *this;
7136  }
7137 
7139  Filters &set(const Noise::Removal &value)
7140  {
7141  m_noise.set(value);
7142  return *this;
7143  }
7144 
7147  {
7148  m_noise.set(value);
7149  return *this;
7150  }
7151 
7154  {
7155  m_noise.set(value);
7156  return *this;
7157  }
7158 
7160  const Outlier &outlier() const
7161  {
7162  return m_outlier;
7163  }
7164 
7167  {
7168  return m_outlier;
7169  }
7170 
7172  Filters &set(const Outlier &value)
7173  {
7174  m_outlier = value;
7175  return *this;
7176  }
7177 
7180  {
7181  m_outlier.set(value);
7182  return *this;
7183  }
7184 
7187  {
7188  m_outlier.set(value);
7189  return *this;
7190  }
7191 
7194  {
7195  m_outlier.set(value);
7196  return *this;
7197  }
7198 
7200  const Reflection &reflection() const
7201  {
7202  return m_reflection;
7203  }
7204 
7207  {
7208  return m_reflection;
7209  }
7210 
7212  Filters &set(const Reflection &value)
7213  {
7214  m_reflection = value;
7215  return *this;
7216  }
7217 
7220  {
7221  m_reflection.set(value);
7222  return *this;
7223  }
7224 
7227  {
7228  m_reflection.set(value);
7229  return *this;
7230  }
7231 
7233  const Smoothing &smoothing() const
7234  {
7235  return m_smoothing;
7236  }
7237 
7240  {
7241  return m_smoothing;
7242  }
7243 
7245  Filters &set(const Smoothing &value)
7246  {
7247  m_smoothing = value;
7248  return *this;
7249  }
7250 
7253  {
7254  m_smoothing.set(value);
7255  return *this;
7256  }
7257 
7260  {
7261  m_smoothing.set(value);
7262  return *this;
7263  }
7264 
7267  {
7268  m_smoothing.set(value);
7269  return *this;
7270  }
7271 
7272  template<typename T,
7273  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value,
7274  int>::type = 0>
7276  {
7277  return m_experimental;
7278  }
7279 
7280  template<typename T,
7281  typename std::enable_if<
7282  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
7283  int>::type = 0>
7285  {
7287  }
7288 
7289  template<
7290  typename T,
7291  typename std::enable_if<
7292  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
7293  value,
7294  int>::type = 0>
7296  {
7297  return m_experimental
7299  }
7300 
7301  template<typename T,
7302  typename std::enable_if<std::is_same<T,
7303  Settings::Processing::Filters::Experimental::
7304  ContrastDistortion::Correction::Enabled>::value,
7305  int>::type = 0>
7307  {
7308  return m_experimental
7310  }
7311 
7312  template<typename T,
7313  typename std::enable_if<std::is_same<T,
7314  Settings::Processing::Filters::Experimental::
7315  ContrastDistortion::Correction::Strength>::value,
7316  int>::type = 0>
7318  {
7319  return m_experimental
7321  }
7322 
7323  template<typename T,
7324  typename std::enable_if<
7325  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
7326  value,
7327  int>::type = 0>
7329  {
7330  return m_experimental
7332  }
7333 
7334  template<typename T,
7335  typename std::enable_if<std::is_same<T,
7336  Settings::Processing::Filters::Experimental::
7337  ContrastDistortion::Removal::Enabled>::value,
7338  int>::type = 0>
7340  {
7341  return m_experimental
7343  }
7344 
7345  template<typename T,
7346  typename std::enable_if<std::is_same<T,
7347  Settings::Processing::Filters::Experimental::
7348  ContrastDistortion::Removal::Threshold>::value,
7349  int>::type = 0>
7351  {
7352  return m_experimental
7354  }
7355 
7356  template<typename T,
7357  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value,
7358  int>::type = 0>
7360  {
7361  return m_noise;
7362  }
7363 
7364  template<typename T,
7365  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7366  int>::type = 0>
7368  {
7370  }
7371 
7372  template<typename T,
7373  typename std::enable_if<
7374  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7375  int>::type = 0>
7377  {
7379  }
7380 
7381  template<typename T,
7382  typename std::enable_if<
7383  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7384  int>::type = 0>
7386  {
7388  }
7389 
7390  template<typename T,
7391  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value,
7392  int>::type = 0>
7394  {
7395  return m_outlier;
7396  }
7397 
7398  template<
7399  typename T,
7400  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
7401  int>::type = 0>
7403  {
7405  }
7406 
7407  template<typename T,
7408  typename std::enable_if<
7409  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
7410  int>::type = 0>
7412  {
7414  }
7415 
7416  template<typename T,
7417  typename std::enable_if<
7418  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
7419  int>::type = 0>
7421  {
7423  }
7424 
7425  template<typename T,
7426  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value,
7427  int>::type = 0>
7429  {
7430  return m_reflection;
7431  }
7432 
7433  template<
7434  typename T,
7435  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
7436  int>::type = 0>
7438  {
7440  }
7441 
7442  template<typename T,
7443  typename std::enable_if<
7444  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
7445  int>::type = 0>
7447  {
7449  }
7450 
7451  template<typename T,
7452  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value,
7453  int>::type = 0>
7455  {
7456  return m_smoothing;
7457  }
7458 
7459  template<
7460  typename T,
7461  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
7462  int>::type = 0>
7464  {
7466  }
7467 
7468  template<typename T,
7469  typename std::enable_if<
7470  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7471  int>::type = 0>
7473  {
7475  }
7476 
7477  template<typename T,
7478  typename std::enable_if<
7479  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7480  int>::type = 0>
7482  {
7484  }
7485 
7486  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7488  {
7489  return m_experimental;
7490  }
7491 
7492  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7494  {
7495  return m_noise;
7496  }
7497 
7498  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7500  {
7501  return m_outlier;
7502  }
7503 
7504  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
7506  {
7507  return m_reflection;
7508  }
7509 
7510  template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
7512  {
7513  return m_smoothing;
7514  }
7515 
7517  template<typename F>
7518  void forEach(const F &f) const
7519  {
7520  f(m_experimental);
7521  f(m_noise);
7522  f(m_outlier);
7523  f(m_reflection);
7524  f(m_smoothing);
7525  }
7526 
7528  template<typename F>
7529  void forEach(const F &f)
7530  {
7531  f(m_experimental);
7532  f(m_noise);
7533  f(m_outlier);
7534  f(m_reflection);
7535  f(m_smoothing);
7536  }
7537 
7539  bool operator==(const Filters &other) const;
7540 
7542  bool operator!=(const Filters &other) const;
7543 
7545  std::string toString() const;
7546 
7548  friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
7549  {
7550  return stream << value.toString();
7551  }
7552 
7553  private:
7554  void setFromString(const std::string &value);
7555 
7556  void setFromString(const std::string &fullPath, const std::string &value);
7557 
7558  std::string getString(const std::string &fullPath) const;
7559 
7560  Experimental m_experimental;
7561  Noise m_noise;
7562  Outlier m_outlier;
7563  Reflection m_reflection;
7564  Smoothing m_smoothing;
7565 
7566  friend struct DataModel::Detail::Befriend<Filters>;
7567  };
7568 
7569  using Descendants =
7570  std::tuple<Settings::Processing::Color,
7603 
7606 
7650 #ifndef NO_DOC
7651  template<typename... Args,
7652  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7653  typename std::enable_if<
7654  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
7655  typename std::decay<Args>::type...>::value,
7656  int>::type = 0>
7657 #else
7658  template<typename... Args>
7659 #endif
7660  explicit Processing(Args &&...args)
7661  {
7662  using namespace Zivid::Detail::TypeTraits;
7663 
7664  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7665  "Found duplicate types among the arguments passed to Processing(...). "
7666  "Types should be listed at most once.");
7667 
7668  set(std::forward<Args>(args)...);
7669  }
7670 
7713 #ifndef NO_DOC
7714  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7715 #else
7716  template<typename... Args>
7717 #endif
7718  void set(Args &&...args)
7719  {
7720  using namespace Zivid::Detail::TypeTraits;
7721 
7722  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7723  static_assert(AllArgsAreDescendantNodes::value,
7724  "All arguments passed to set(...) must be descendant nodes.");
7725 
7726  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7727  "Found duplicate types among the arguments passed to set(...). "
7728  "Types should be listed at most once.");
7729 
7730  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7731  }
7732 
7776 #ifndef NO_DOC
7777  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7778 #else
7779  template<typename... Args>
7780 #endif
7781  Processing copyWith(Args &&...args) const
7782  {
7783  using namespace Zivid::Detail::TypeTraits;
7784 
7785  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7786  static_assert(AllArgsAreDescendantNodes::value,
7787  "All arguments passed to copyWith(...) must be descendant nodes.");
7788 
7789  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7790  "Found duplicate types among the arguments passed to copyWith(...). "
7791  "Types should be listed at most once.");
7792 
7793  auto copy{ *this };
7794  copy.set(std::forward<Args>(args)...);
7795  return copy;
7796  }
7797 
7799  const Color &color() const
7800  {
7801  return m_color;
7802  }
7803 
7806  {
7807  return m_color;
7808  }
7809 
7811  Processing &set(const Color &value)
7812  {
7813  m_color = value;
7814  return *this;
7815  }
7816 
7819  {
7820  m_color.set(value);
7821  return *this;
7822  }
7823 
7826  {
7827  m_color.set(value);
7828  return *this;
7829  }
7830 
7833  {
7834  m_color.set(value);
7835  return *this;
7836  }
7837 
7840  {
7841  m_color.set(value);
7842  return *this;
7843  }
7844 
7847  {
7848  m_color.set(value);
7849  return *this;
7850  }
7851 
7854  {
7855  m_color.set(value);
7856  return *this;
7857  }
7858 
7861  {
7862  m_color.set(value);
7863  return *this;
7864  }
7865 
7867  Processing &set(const Color::Gamma &value)
7868  {
7869  m_color.set(value);
7870  return *this;
7871  }
7872 
7874  const Filters &filters() const
7875  {
7876  return m_filters;
7877  }
7878 
7881  {
7882  return m_filters;
7883  }
7884 
7886  Processing &set(const Filters &value)
7887  {
7888  m_filters = value;
7889  return *this;
7890  }
7891 
7894  {
7895  m_filters.set(value);
7896  return *this;
7897  }
7898 
7901  {
7902  m_filters.set(value);
7903  return *this;
7904  }
7905 
7908  {
7909  m_filters.set(value);
7910  return *this;
7911  }
7912 
7915  {
7916  m_filters.set(value);
7917  return *this;
7918  }
7919 
7922  {
7923  m_filters.set(value);
7924  return *this;
7925  }
7926 
7929  {
7930  m_filters.set(value);
7931  return *this;
7932  }
7933 
7936  {
7937  m_filters.set(value);
7938  return *this;
7939  }
7940 
7943  {
7944  m_filters.set(value);
7945  return *this;
7946  }
7947 
7950  {
7951  m_filters.set(value);
7952  return *this;
7953  }
7954 
7957  {
7958  m_filters.set(value);
7959  return *this;
7960  }
7961 
7964  {
7965  m_filters.set(value);
7966  return *this;
7967  }
7968 
7971  {
7972  m_filters.set(value);
7973  return *this;
7974  }
7975 
7978  {
7979  m_filters.set(value);
7980  return *this;
7981  }
7982 
7985  {
7986  m_filters.set(value);
7987  return *this;
7988  }
7989 
7992  {
7993  m_filters.set(value);
7994  return *this;
7995  }
7996 
7999  {
8000  m_filters.set(value);
8001  return *this;
8002  }
8003 
8006  {
8007  m_filters.set(value);
8008  return *this;
8009  }
8010 
8013  {
8014  m_filters.set(value);
8015  return *this;
8016  }
8017 
8020  {
8021  m_filters.set(value);
8022  return *this;
8023  }
8024 
8027  {
8028  m_filters.set(value);
8029  return *this;
8030  }
8031 
8034  {
8035  m_filters.set(value);
8036  return *this;
8037  }
8038 
8041  {
8042  m_filters.set(value);
8043  return *this;
8044  }
8045 
8048  {
8049  m_filters.set(value);
8050  return *this;
8051  }
8052 
8053  template<typename T,
8054  typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8056  {
8057  return m_color;
8058  }
8059 
8060  template<
8061  typename T,
8062  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8064  {
8065  return m_color.get<Settings::Processing::Color::Balance>();
8066  }
8067 
8068  template<typename T,
8069  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
8070  int>::type = 0>
8072  {
8073  return m_color.get<Settings::Processing::Color::Balance::Blue>();
8074  }
8075 
8076  template<typename T,
8077  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
8078  int>::type = 0>
8080  {
8081  return m_color.get<Settings::Processing::Color::Balance::Green>();
8082  }
8083 
8084  template<typename T,
8085  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
8086  int>::type = 0>
8088  {
8089  return m_color.get<Settings::Processing::Color::Balance::Red>();
8090  }
8091 
8092  template<typename T,
8093  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value,
8094  int>::type = 0>
8096  {
8098  }
8099 
8100  template<
8101  typename T,
8102  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
8103  int>::type = 0>
8105  {
8107  }
8108 
8109  template<typename T,
8110  typename std::enable_if<
8111  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
8112  int>::type = 0>
8114  {
8116  }
8117 
8118  template<typename T,
8119  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
8121  {
8122  return m_color.get<Settings::Processing::Color::Gamma>();
8123  }
8124 
8125  template<typename T,
8126  typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
8128  {
8129  return m_filters;
8130  }
8131 
8132  template<typename T,
8133  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value,
8134  int>::type = 0>
8136  {
8138  }
8139 
8140  template<typename T,
8141  typename std::enable_if<
8142  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
8143  int>::type = 0>
8145  {
8147  }
8148 
8149  template<
8150  typename T,
8151  typename std::enable_if<
8152  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
8153  int>::type = 0>
8155  {
8157  }
8158 
8159  template<typename T,
8160  typename std::enable_if<std::is_same<T,
8161  Settings::Processing::Filters::Experimental::
8162  ContrastDistortion::Correction::Enabled>::value,
8163  int>::type = 0>
8165  {
8166  return m_filters
8168  }
8169 
8170  template<typename T,
8171  typename std::enable_if<std::is_same<T,
8172  Settings::Processing::Filters::Experimental::
8173  ContrastDistortion::Correction::Strength>::value,
8174  int>::type = 0>
8176  {
8177  return m_filters
8179  }
8180 
8181  template<
8182  typename T,
8183  typename std::enable_if<
8184  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
8185  int>::type = 0>
8187  {
8189  }
8190 
8191  template<
8192  typename T,
8193  typename std::enable_if<
8194  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
8195  value,
8196  int>::type = 0>
8198  {
8199  return m_filters
8201  }
8202 
8203  template<typename T,
8204  typename std::enable_if<std::is_same<T,
8205  Settings::Processing::Filters::Experimental::
8206  ContrastDistortion::Removal::Threshold>::value,
8207  int>::type = 0>
8209  {
8210  return m_filters
8212  }
8213 
8214  template<
8215  typename T,
8216  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
8218  {
8219  return m_filters.get<Settings::Processing::Filters::Noise>();
8220  }
8221 
8222  template<typename T,
8223  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
8224  int>::type = 0>
8226  {
8228  }
8229 
8230  template<
8231  typename T,
8232  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
8233  int>::type = 0>
8235  {
8237  }
8238 
8239  template<typename T,
8240  typename std::enable_if<
8241  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
8242  int>::type = 0>
8244  {
8246  }
8247 
8248  template<
8249  typename T,
8250  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
8252  {
8253  return m_filters.get<Settings::Processing::Filters::Outlier>();
8254  }
8255 
8256  template<typename T,
8257  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8258  int>::type = 0>
8260  {
8262  }
8263 
8264  template<typename T,
8265  typename std::enable_if<
8266  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8267  int>::type = 0>
8269  {
8271  }
8272 
8273  template<typename T,
8274  typename std::enable_if<
8275  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8276  int>::type = 0>
8278  {
8280  }
8281 
8282  template<typename T,
8283  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value,
8284  int>::type = 0>
8286  {
8287  return m_filters.get<Settings::Processing::Filters::Reflection>();
8288  }
8289 
8290  template<typename T,
8291  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
8292  int>::type = 0>
8294  {
8296  }
8297 
8298  template<typename T,
8299  typename std::enable_if<
8300  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8301  int>::type = 0>
8303  {
8305  }
8306 
8307  template<typename T,
8308  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value,
8309  int>::type = 0>
8311  {
8312  return m_filters.get<Settings::Processing::Filters::Smoothing>();
8313  }
8314 
8315  template<typename T,
8316  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
8317  int>::type = 0>
8319  {
8321  }
8322 
8323  template<typename T,
8324  typename std::enable_if<
8325  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
8326  int>::type = 0>
8328  {
8330  }
8331 
8332  template<typename T,
8333  typename std::enable_if<
8334  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
8335  int>::type = 0>
8337  {
8339  }
8340 
8341  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8343  {
8344  return m_color;
8345  }
8346 
8347  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8349  {
8350  return m_filters;
8351  }
8352 
8354  template<typename F>
8355  void forEach(const F &f) const
8356  {
8357  f(m_color);
8358  f(m_filters);
8359  }
8360 
8362  template<typename F>
8363  void forEach(const F &f)
8364  {
8365  f(m_color);
8366  f(m_filters);
8367  }
8368 
8370  bool operator==(const Processing &other) const;
8371 
8373  bool operator!=(const Processing &other) const;
8374 
8376  std::string toString() const;
8377 
8379  friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
8380  {
8381  return stream << value.toString();
8382  }
8383 
8384  private:
8385  void setFromString(const std::string &value);
8386 
8387  void setFromString(const std::string &fullPath, const std::string &value);
8388 
8389  std::string getString(const std::string &fullPath) const;
8390 
8391  Color m_color;
8392  Filters m_filters;
8393 
8394  friend struct DataModel::Detail::Befriend<Processing>;
8395  };
8396 
8397  using Descendants =
8398  std::tuple<Settings::Acquisitions,
8435 
8438 
8440  explicit Settings(const std::string &fileName);
8441 
8489 #ifndef NO_DOC
8490  template<
8491  typename... Args,
8492  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8493  typename std::enable_if<
8494  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8495  int>::type = 0>
8496 #else
8497  template<typename... Args>
8498 #endif
8499  explicit Settings(Args &&...args)
8500  {
8501  using namespace Zivid::Detail::TypeTraits;
8502 
8503  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8504  "Found duplicate types among the arguments passed to Settings(...). "
8505  "Types should be listed at most once.");
8506 
8507  set(std::forward<Args>(args)...);
8508  }
8509 
8556 #ifndef NO_DOC
8557  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8558 #else
8559  template<typename... Args>
8560 #endif
8561  void set(Args &&...args)
8562  {
8563  using namespace Zivid::Detail::TypeTraits;
8564 
8565  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8566  static_assert(AllArgsAreDescendantNodes::value,
8567  "All arguments passed to set(...) must be descendant nodes.");
8568 
8569  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8570  "Found duplicate types among the arguments passed to set(...). "
8571  "Types should be listed at most once.");
8572 
8573  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8574  }
8575 
8623 #ifndef NO_DOC
8624  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8625 #else
8626  template<typename... Args>
8627 #endif
8628  Settings copyWith(Args &&...args) const
8629  {
8630  using namespace Zivid::Detail::TypeTraits;
8631 
8632  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8633  static_assert(AllArgsAreDescendantNodes::value,
8634  "All arguments passed to copyWith(...) must be descendant nodes.");
8635 
8636  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8637  "Found duplicate types among the arguments passed to copyWith(...). "
8638  "Types should be listed at most once.");
8639 
8640  auto copy{ *this };
8641  copy.set(std::forward<Args>(args)...);
8642  return copy;
8643  }
8644 
8647  {
8648  return m_acquisitions;
8649  }
8650 
8653  {
8654  return m_acquisitions;
8655  }
8656 
8658  Settings &set(const Acquisitions &value)
8659  {
8660  m_acquisitions = value;
8661  return *this;
8662  }
8663 
8666  {
8667  return m_experimental;
8668  }
8669 
8672  {
8673  return m_experimental;
8674  }
8675 
8677  Settings &set(const Experimental &value)
8678  {
8679  m_experimental = value;
8680  return *this;
8681  }
8682 
8685  {
8686  m_experimental.set(value);
8687  return *this;
8688  }
8689 
8691  const Processing &processing() const
8692  {
8693  return m_processing;
8694  }
8695 
8698  {
8699  return m_processing;
8700  }
8701 
8703  Settings &set(const Processing &value)
8704  {
8705  m_processing = value;
8706  return *this;
8707  }
8708 
8711  {
8712  m_processing.set(value);
8713  return *this;
8714  }
8715 
8718  {
8719  m_processing.set(value);
8720  return *this;
8721  }
8722 
8725  {
8726  m_processing.set(value);
8727  return *this;
8728  }
8729 
8732  {
8733  m_processing.set(value);
8734  return *this;
8735  }
8736 
8739  {
8740  m_processing.set(value);
8741  return *this;
8742  }
8743 
8746  {
8747  m_processing.set(value);
8748  return *this;
8749  }
8750 
8753  {
8754  m_processing.set(value);
8755  return *this;
8756  }
8757 
8760  {
8761  m_processing.set(value);
8762  return *this;
8763  }
8764 
8767  {
8768  m_processing.set(value);
8769  return *this;
8770  }
8771 
8774  {
8775  m_processing.set(value);
8776  return *this;
8777  }
8778 
8781  {
8782  m_processing.set(value);
8783  return *this;
8784  }
8785 
8788  {
8789  m_processing.set(value);
8790  return *this;
8791  }
8792 
8795  {
8796  m_processing.set(value);
8797  return *this;
8798  }
8799 
8802  {
8803  m_processing.set(value);
8804  return *this;
8805  }
8806 
8809  {
8810  m_processing.set(value);
8811  return *this;
8812  }
8813 
8816  {
8817  m_processing.set(value);
8818  return *this;
8819  }
8820 
8823  {
8824  m_processing.set(value);
8825  return *this;
8826  }
8827 
8830  {
8831  m_processing.set(value);
8832  return *this;
8833  }
8834 
8837  {
8838  m_processing.set(value);
8839  return *this;
8840  }
8841 
8844  {
8845  m_processing.set(value);
8846  return *this;
8847  }
8848 
8851  {
8852  m_processing.set(value);
8853  return *this;
8854  }
8855 
8858  {
8859  m_processing.set(value);
8860  return *this;
8861  }
8862 
8865  {
8866  m_processing.set(value);
8867  return *this;
8868  }
8869 
8872  {
8873  m_processing.set(value);
8874  return *this;
8875  }
8876 
8879  {
8880  m_processing.set(value);
8881  return *this;
8882  }
8883 
8886  {
8887  m_processing.set(value);
8888  return *this;
8889  }
8890 
8893  {
8894  m_processing.set(value);
8895  return *this;
8896  }
8897 
8900  {
8901  m_processing.set(value);
8902  return *this;
8903  }
8904 
8907  {
8908  m_processing.set(value);
8909  return *this;
8910  }
8911 
8914  {
8915  m_processing.set(value);
8916  return *this;
8917  }
8918 
8921  {
8922  m_processing.set(value);
8923  return *this;
8924  }
8925 
8928  {
8929  m_processing.set(value);
8930  return *this;
8931  }
8932 
8935  {
8936  m_processing.set(value);
8937  return *this;
8938  }
8939 
8940  template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
8942  {
8943  return m_acquisitions;
8944  }
8945 
8946  template<typename T, typename std::enable_if<std::is_same<T, Settings::Experimental>::value, int>::type = 0>
8948  {
8949  return m_experimental;
8950  }
8951 
8952  template<typename T,
8953  typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
8955  {
8956  return m_experimental.get<Settings::Experimental::Engine>();
8957  }
8958 
8959  template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
8960  const Settings::Processing &get() const
8961  {
8962  return m_processing;
8963  }
8964 
8965  template<typename T,
8966  typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8968  {
8969  return m_processing.get<Settings::Processing::Color>();
8970  }
8971 
8972  template<typename T,
8973  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8975  {
8976  return m_processing.get<Settings::Processing::Color::Balance>();
8977  }
8978 
8979  template<
8980  typename T,
8981  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
8983  {
8984  return m_processing.get<Settings::Processing::Color::Balance::Blue>();
8985  }
8986 
8987  template<
8988  typename T,
8989  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
8991  {
8992  return m_processing.get<Settings::Processing::Color::Balance::Green>();
8993  }
8994 
8995  template<
8996  typename T,
8997  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
8999  {
9000  return m_processing.get<Settings::Processing::Color::Balance::Red>();
9001  }
9002 
9003  template<
9004  typename T,
9005  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
9007  {
9008  return m_processing.get<Settings::Processing::Color::Experimental>();
9009  }
9010 
9011  template<typename T,
9012  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
9013  int>::type = 0>
9015  {
9017  }
9018 
9019  template<typename T,
9020  typename std::enable_if<
9021  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
9022  int>::type = 0>
9024  {
9026  }
9027 
9028  template<typename T,
9029  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
9031  {
9032  return m_processing.get<Settings::Processing::Color::Gamma>();
9033  }
9034 
9035  template<typename T,
9036  typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
9038  {
9039  return m_processing.get<Settings::Processing::Filters>();
9040  }
9041 
9042  template<
9043  typename T,
9044  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
9046  {
9047  return m_processing.get<Settings::Processing::Filters::Experimental>();
9048  }
9049 
9050  template<typename T,
9051  typename std::enable_if<
9052  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9053  int>::type = 0>
9055  {
9057  }
9058 
9059  template<
9060  typename T,
9061  typename std::enable_if<
9062  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9063  int>::type = 0>
9065  {
9067  }
9068 
9069  template<
9070  typename T,
9071  typename std::enable_if<
9072  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
9073  value,
9074  int>::type = 0>
9076  {
9077  return m_processing
9079  }
9080 
9081  template<
9082  typename T,
9083  typename std::enable_if<
9084  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
9085  value,
9086  int>::type = 0>
9088  {
9089  return m_processing
9091  }
9092 
9093  template<typename T,
9094  typename std::enable_if<
9095  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9096  int>::type = 0>
9098  {
9100  }
9101 
9102  template<
9103  typename T,
9104  typename std::enable_if<
9105  std::is_same<T,
9107  int>::type = 0>
9109  {
9110  return m_processing
9112  }
9113 
9114  template<
9115  typename T,
9116  typename std::enable_if<
9117  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
9118  value,
9119  int>::type = 0>
9121  {
9122  return m_processing
9124  }
9125 
9126  template<typename T,
9127  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
9129  {
9130  return m_processing.get<Settings::Processing::Filters::Noise>();
9131  }
9132 
9133  template<typename T,
9134  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
9135  int>::type = 0>
9137  {
9138  return m_processing.get<Settings::Processing::Filters::Noise::Removal>();
9139  }
9140 
9141  template<typename T,
9142  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
9143  int>::type = 0>
9145  {
9146  return m_processing.get<Settings::Processing::Filters::Noise::Removal::Enabled>();
9147  }
9148 
9149  template<
9150  typename T,
9151  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
9152  int>::type = 0>
9154  {
9156  }
9157 
9158  template<typename T,
9159  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
9161  {
9162  return m_processing.get<Settings::Processing::Filters::Outlier>();
9163  }
9164 
9165  template<typename T,
9166  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
9167  int>::type = 0>
9169  {
9171  }
9172 
9173  template<
9174  typename T,
9175  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
9176  int>::type = 0>
9178  {
9180  }
9181 
9182  template<
9183  typename T,
9184  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
9185  int>::type = 0>
9187  {
9189  }
9190 
9191  template<
9192  typename T,
9193  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
9195  {
9196  return m_processing.get<Settings::Processing::Filters::Reflection>();
9197  }
9198 
9199  template<typename T,
9200  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9201  int>::type = 0>
9203  {
9205  }
9206 
9207  template<
9208  typename T,
9209  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9210  int>::type = 0>
9212  {
9214  }
9215 
9216  template<
9217  typename T,
9218  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
9220  {
9221  return m_processing.get<Settings::Processing::Filters::Smoothing>();
9222  }
9223 
9224  template<typename T,
9225  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9226  int>::type = 0>
9228  {
9230  }
9231 
9232  template<
9233  typename T,
9234  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9235  int>::type = 0>
9237  {
9239  }
9240 
9241  template<
9242  typename T,
9243  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9244  int>::type = 0>
9246  {
9248  }
9249 
9250  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9252  {
9253  return m_acquisitions;
9254  }
9255 
9256  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9258  {
9259  return m_experimental;
9260  }
9261 
9262  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
9263  const Settings::Processing &get() const
9264  {
9265  return m_processing;
9266  }
9267 
9269  template<typename F>
9270  void forEach(const F &f) const
9271  {
9272  f(m_acquisitions);
9273  f(m_experimental);
9274  f(m_processing);
9275  }
9276 
9278  template<typename F>
9279  void forEach(const F &f)
9280  {
9281  f(m_acquisitions);
9282  f(m_experimental);
9283  f(m_processing);
9284  }
9285 
9287  bool operator==(const Settings &other) const;
9288 
9290  bool operator!=(const Settings &other) const;
9291 
9293  std::string toString() const;
9294 
9296  friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
9297  {
9298  return stream << value.toString();
9299  }
9300 
9302  void save(const std::string &fileName) const;
9303 
9305  void load(const std::string &fileName);
9306 
9307  private:
9308  void setFromString(const std::string &value);
9309 
9310  void setFromString(const std::string &fullPath, const std::string &value);
9311 
9312  std::string getString(const std::string &fullPath) const;
9313 
9314  Acquisitions m_acquisitions;
9315  Experimental m_experimental;
9316  Processing m_processing;
9317 
9318  friend struct DataModel::Detail::Befriend<Settings>;
9319  };
9320 
9321 #ifndef NO_DOC
9322  template<>
9323  struct Settings::Version<8>
9324  {
9325  using Type = Settings;
9326  };
9327 #endif
9328 
9329 } // namespace Zivid
9330 
9331 #ifdef _MSC_VER
9332 # pragma warning(pop)
9333 #endif
9334 
9335 #ifndef NO_DOC
9336 # if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
9337 namespace std // NOLINT
9338 {
9339  template<>
9340  struct tuple_size<Zivid::Settings::Experimental> : integral_constant<size_t, 1>
9341  {};
9342 
9343  template<size_t i>
9344  struct tuple_element<i, Zivid::Settings::Experimental>
9345  {
9346  static_assert(i < tuple_size<Zivid::Settings::Experimental>::value, "Index must be less than 1");
9347 
9348  using type // NOLINT
9349  = decltype(declval<Zivid::Settings::Experimental>().get<i>());
9350  };
9351 
9352  template<>
9353  struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 2>
9354  {};
9355 
9356  template<size_t i>
9357  struct tuple_element<i, Zivid::Settings::Processing>
9358  {
9359  static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 2");
9360 
9361  using type // NOLINT
9362  = decltype(declval<Zivid::Settings::Processing>().get<i>());
9363  };
9364 
9365  template<>
9366  struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
9367  {};
9368 
9369  template<size_t i>
9370  struct tuple_element<i, Zivid::Settings::Processing::Color>
9371  {
9372  static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
9373 
9374  using type // NOLINT
9375  = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
9376  };
9377 
9378  template<>
9379  struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
9380  {};
9381 
9382  template<size_t i>
9383  struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
9384  {
9385  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
9386 
9387  using type // NOLINT
9388  = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
9389  };
9390 
9391  template<>
9392  struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
9393  {};
9394 
9395  template<size_t i>
9396  struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
9397  {
9398  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
9399  "Index must be less than 1");
9400 
9401  using type // NOLINT
9402  = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
9403  };
9404 
9405  template<>
9406  struct tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping> : integral_constant<size_t, 1>
9407  {};
9408 
9409  template<size_t i>
9410  struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental::ToneMapping>
9411  {
9412  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping>::value,
9413  "Index must be less than 1");
9414 
9415  using type // NOLINT
9416  = decltype(declval<Zivid::Settings::Processing::Color::Experimental::ToneMapping>().get<i>());
9417  };
9418 
9419  template<>
9420  struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 5>
9421  {};
9422 
9423  template<size_t i>
9424  struct tuple_element<i, Zivid::Settings::Processing::Filters>
9425  {
9426  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 5");
9427 
9428  using type // NOLINT
9429  = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
9430  };
9431 
9432  template<>
9433  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
9434  {};
9435 
9436  template<size_t i>
9437  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
9438  {
9439  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
9440  "Index must be less than 1");
9441 
9442  using type // NOLINT
9443  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
9444  };
9445 
9446  template<>
9447  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
9448  : integral_constant<size_t, 2>
9449  {};
9450 
9451  template<size_t i>
9452  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
9453  {
9454  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9455  "Index must be less than 2");
9456 
9457  using type // NOLINT
9458  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
9459  };
9460 
9461  template<>
9462  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
9463  : integral_constant<size_t, 2>
9464  {};
9465 
9466  template<size_t i>
9467  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
9468  {
9469  static_assert(
9470  i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9471  "Index must be less than 2");
9472 
9473  using type // NOLINT
9474  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>()
9475  .get<i>());
9476  };
9477 
9478  template<>
9479  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
9480  : integral_constant<size_t, 2>
9481  {};
9482 
9483  template<size_t i>
9484  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
9485  {
9486  static_assert(
9487  i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9488  "Index must be less than 2");
9489 
9490  using type // NOLINT
9491  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>()
9492  .get<i>());
9493  };
9494 
9495  template<>
9496  struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 1>
9497  {};
9498 
9499  template<size_t i>
9500  struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
9501  {
9502  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 1");
9503 
9504  using type // NOLINT
9505  = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
9506  };
9507 
9508  template<>
9509  struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
9510  {};
9511 
9512  template<size_t i>
9513  struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
9514  {
9515  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
9516  "Index must be less than 2");
9517 
9518  using type // NOLINT
9519  = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
9520  };
9521 
9522  template<>
9523  struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
9524  {};
9525 
9526  template<size_t i>
9527  struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
9528  {
9529  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
9530  "Index must be less than 1");
9531 
9532  using type // NOLINT
9533  = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
9534  };
9535 
9536  template<>
9537  struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
9538  {};
9539 
9540  template<size_t i>
9541  struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
9542  {
9543  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
9544  "Index must be less than 2");
9545 
9546  using type // NOLINT
9547  = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
9548  };
9549 
9550  template<>
9551  struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
9552  {};
9553 
9554  template<size_t i>
9555  struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
9556  {
9557  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
9558  "Index must be less than 1");
9559 
9560  using type // NOLINT
9561  = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
9562  };
9563 
9564  template<>
9565  struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 1>
9566  {};
9567 
9568  template<size_t i>
9569  struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
9570  {
9571  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
9572  "Index must be less than 1");
9573 
9574  using type // NOLINT
9575  = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
9576  };
9577 
9578  template<>
9579  struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
9580  {};
9581 
9582  template<size_t i>
9583  struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
9584  {
9585  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
9586  "Index must be less than 1");
9587 
9588  using type // NOLINT
9589  = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
9590  };
9591 
9592  template<>
9593  struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
9594  {};
9595 
9596  template<size_t i>
9597  struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
9598  {
9599  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
9600  "Index must be less than 2");
9601 
9602  using type // NOLINT
9603  = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
9604  };
9605 
9606  template<>
9607  struct tuple_size<Zivid::Settings> : integral_constant<size_t, 3>
9608  {};
9609 
9610  template<size_t i>
9611  struct tuple_element<i, Zivid::Settings>
9612  {
9613  static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 3");
9614 
9615  using type // NOLINT
9616  = decltype(declval<Zivid::Settings>().get<i>());
9617  };
9618 
9619 } // namespace std
9620 # endif
9621 #endif
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:101
Class describing a range of values for a given type T
Definition: Range.h:102
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition: Settings.h:170
bool operator<(const Aperture &other) const
Comparison operator
Definition: Settings.h:233
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:239
bool operator==(const Aperture &other) const
Comparison operator
Definition: Settings.h:221
static constexpr Range< double > validRange()
The range of valid values for Aperture
Definition: Settings.h:192
bool operator!=(const Aperture &other) const
Comparison operator
Definition: Settings.h:227
Aperture()=default
Default constructor
constexpr Aperture(double value)
Constructor
Definition: Settings.h:201
double ValueType
The type of the underlying value
Definition: Settings.h:189
void reset()
Reset the node to unset state
friend std::ostream & operator<<(std::ostream &stream, const Aperture &value)
Operator to serialize the value to a stream
Definition: Settings.h:245
bool hasValue() const
Check if the value is set
Brightness controls the light output from the projector.
Definition: Settings.h:281
bool operator!=(const Brightness &other) const
Comparison operator
Definition: Settings.h:348
bool operator<(const Brightness &other) const
Comparison operator
Definition: Settings.h:354
bool operator>(const Brightness &other) const
Comparison operator
Definition: Settings.h:360
friend std::ostream & operator<<(std::ostream &stream, const Brightness &value)
Operator to serialize the value to a stream
Definition: Settings.h:366
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Brightness
Definition: Settings.h:313
std::string toString() const
Get the value as string
double value() const
Get the value
constexpr Brightness(double value)
Constructor
Definition: Settings.h:322
bool hasValue() const
Check if the value is set
Brightness()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:310
bool operator==(const Brightness &other) const
Comparison operator
Definition: Settings.h:342
Exposure time for each single image in the measurement. Affects frame rate.
Definition: Settings.h:390
bool operator<(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:451
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ExposureTime
Definition: Settings.h:410
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:457
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream
Definition: Settings.h:463
std::chrono::microseconds ValueType
The type of the underlying value
Definition: Settings.h:407
bool operator==(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:439
bool operator!=(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:445
std::chrono::microseconds value() const
Get the value
constexpr ExposureTime(std::chrono::microseconds value)
Constructor
Definition: Settings.h:419
Analog gain in the camera
Definition: Settings.h:488
static constexpr Range< double > validRange()
The range of valid values for Gain
Definition: Settings.h:506
bool operator==(const Gain &other) const
Comparison operator
Definition: Settings.h:535
constexpr Gain(double value)
Constructor
Definition: Settings.h:515
void reset()
Reset the node to unset state
friend std::ostream & operator<<(std::ostream &stream, const Gain &value)
Operator to serialize the value to a stream
Definition: Settings.h:559
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:503
std::string toString() const
Get the value as string
bool operator!=(const Gain &other) const
Comparison operator
Definition: Settings.h:541
bool operator>(const Gain &other) const
Comparison operator
Definition: Settings.h:553
bool operator<(const Gain &other) const
Comparison operator
Definition: Settings.h:547
Settings for a single acquisition
Definition: Settings.h:152
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:824
const Settings::Acquisition::Aperture & get() const
Definition: Settings.h:771
ExposureTime & exposureTime()
Get ExposureTime
Definition: Settings.h:738
const Aperture & aperture() const
Get Aperture
Definition: Settings.h:694
bool operator==(const Acquisition &other) const
Equality operator
Brightness & brightness()
Get Brightness
Definition: Settings.h:719
Acquisition & set(const Brightness &value)
Set Brightness
Definition: Settings.h:725
bool operator!=(const Acquisition &other) const
Inequality operator
const ExposureTime & exposureTime() const
Get ExposureTime
Definition: Settings.h:732
Acquisition & set(const Gain &value)
Set Gain
Definition: Settings.h:763
Acquisition & set(const ExposureTime &value)
Set ExposureTime
Definition: Settings.h:744
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:642
const Settings::Acquisition::Gain & get() const
Definition: Settings.h:793
Acquisition & set(const Aperture &value)
Set Aperture
Definition: Settings.h:706
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:676
const Gain & gain() const
Get Gain
Definition: Settings.h:751
const Brightness & brightness() const
Get Brightness
Definition: Settings.h:713
const Settings::Acquisition::ExposureTime & get() const
Definition: Settings.h:786
Acquisition(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:613
const Settings::Acquisition::Brightness & get() const
Definition: Settings.h:778
Acquisition()
Default constructor
Gain & gain()
Get Gain
Definition: Settings.h:757
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream
Definition: Settings.h:852
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition: Settings.h:584
std::string toString() const
Get the value as string
Aperture & aperture()
Get Aperture
Definition: Settings.h:700
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:834
List of Acquisition objects
Definition: Settings.h:874
bool operator!=(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:988
Settings::Acquisition & at(std::size_t pos)
Returns a reference to the element at position pos in the list
const Settings::Acquisition & operator[](std::size_t pos) const
Returns a const reference to the element at position pos in the list
std::string toString() const
Get the value as string
static constexpr Range< ValueType::size_type > validSize()
The valid sizes for Acquisitions
Definition: Settings.h:892
void forEach(const F &f) const
Run the given function on each element in the list
Definition: Settings.h:973
const std::vector< Settings::Acquisition > & value() const
Get the value
bool operator==(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:982
Acquisitions()=default
Default constructor
Acquisitions(std::initializer_list< Settings::Acquisition > value)
Constructor
Definition: Settings.h:906
void forEach(const F &f)
Run the given function on each element in the list
Definition: Settings.h:963
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor
Definition: Settings.h:901
Settings::Acquisition & operator[](std::size_t pos)
Returns a reference to the element at position pos in the list
std::vector< Settings::Acquisition > ValueType
The type of the underlying value
Definition: Settings.h:889
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream
Definition: Settings.h:994
std::size_t size() const noexcept
Get the size of the list
const Settings::Acquisition & at(std::size_t pos) const
Returns a const reference to the element at position pos in the list
Set the Zivid Vision Engine to use.
Definition: Settings.h:1035
ValueType value() const
Get the value
static std::set< ValueType > validValues()
All valid values of Engine
Definition: Settings.h:1067
static const Engine phase
phase
Definition: Settings.h:1063
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:1096
bool hasValue() const
Check if the value is set
ValueType
The type of the underlying value
Definition: Settings.h:1059
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream
Definition: Settings.h:1114
std::string toString() const
Get the value as string
bool operator==(const Engine &other) const
Comparison operator
Definition: Settings.h:1102
Engine()=default
Default constructor
bool operator!=(const Engine &other) const
Comparison operator
Definition: Settings.h:1108
constexpr Engine(ValueType value)
Constructor
Definition: Settings.h:1076
static const Engine stripe
stripe
Definition: Settings.h:1064
void reset()
Reset the node to unset state
Experimental features. These settings may be changed, renamed, moved or deleted in the future.
Definition: Settings.h:1009
const Settings::Experimental::Engine & get() const
Definition: Settings.h:1258
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1189
Experimental & set(const Engine &value)
Set Engine
Definition: Settings.h:1250
const Engine & engine() const
Get Engine
Definition: Settings.h:1238
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:1220
std::string toString() const
Get the value as string
bool operator!=(const Experimental &other) const
Inequality operator
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:1293
std::tuple< Settings::Experimental::Engine > Descendants
Definition: Settings.h:1137
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:1271
bool operator==(const Experimental &other) const
Equality operator
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1163
Experimental()
Default constructor
Engine & engine()
Get Engine
Definition: Settings.h:1244
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1278
Digital gain applied to blue channel
Definition: Settings.h:1362
void reset()
Reset the node to unset state
bool operator==(const Blue &other) const
Comparison operator
Definition: Settings.h:1411
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream
Definition: Settings.h:1435
std::string toString() const
Get the value as string
static constexpr Range< double > validRange()
The range of valid values for Blue
Definition: Settings.h:1382
bool operator<(const Blue &other) const
Comparison operator
Definition: Settings.h:1423
constexpr Blue(double value)
Constructor
Definition: Settings.h:1391
bool operator!=(const Blue &other) const
Comparison operator
Definition: Settings.h:1417
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1379
bool operator>(const Blue &other) const
Comparison operator
Definition: Settings.h:1429
Digital gain applied to green channel
Definition: Settings.h:1460
friend std::ostream & operator<<(std::ostream &stream, const Green &value)
Operator to serialize the value to a stream
Definition: Settings.h:1533
void reset()
Reset the node to unset state
bool operator>(const Green &other) const
Comparison operator
Definition: Settings.h:1527
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1477
constexpr Green(double value)
Constructor
Definition: Settings.h:1489
static constexpr Range< double > validRange()
The range of valid values for Green
Definition: Settings.h:1480
bool operator==(const Green &other) const
Comparison operator
Definition: Settings.h:1509
bool operator!=(const Green &other) const
Comparison operator
Definition: Settings.h:1515
std::string toString() const
Get the value as string
bool operator<(const Green &other) const
Comparison operator
Definition: Settings.h:1521
Digital gain applied to red channel
Definition: Settings.h:1558
bool operator!=(const Red &other) const
Comparison operator
Definition: Settings.h:1613
static constexpr Range< double > validRange()
The range of valid values for Red
Definition: Settings.h:1578
constexpr Red(double value)
Constructor
Definition: Settings.h:1587
double ValueType
The type of the underlying value
Definition: Settings.h:1575
bool operator==(const Red &other) const
Comparison operator
Definition: Settings.h:1607
bool operator<(const Red &other) const
Comparison operator
Definition: Settings.h:1619
void reset()
Reset the node to unset state
friend std::ostream & operator<<(std::ostream &stream, const Red &value)
Operator to serialize the value to a stream
Definition: Settings.h:1631
bool operator>(const Red &other) const
Comparison operator
Definition: Settings.h:1625
bool hasValue() const
Check if the value is set
std::string toString() const
Get the value as string
Color balance settings
Definition: Settings.h:1346
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1712
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:1866
bool operator!=(const Balance &other) const
Inequality operator
Blue & blue()
Get Blue
Definition: Settings.h:1771
std::string toString() const
Get the value as string
const Red & red() const
Get Red
Definition: Settings.h:1803
Balance(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1684
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:1824
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:1746
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition: Settings.h:1656
Balance & set(const Green &value)
Set Green
Definition: Settings.h:1796
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1875
Red & red()
Get Red
Definition: Settings.h:1809
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream
Definition: Settings.h:1892
const Blue & blue() const
Get Blue
Definition: Settings.h:1765
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:1841
Balance & set(const Blue &value)
Set Blue
Definition: Settings.h:1777
Balance & set(const Red &value)
Set Red
Definition: Settings.h:1815
const Green & green() const
Get Green
Definition: Settings.h:1784
Green & green()
Get Green
Definition: Settings.h:1790
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:1833
This setting controls when tone mapping of colors is performed. Tone mapping will normalize the captu...
Definition: Settings.h:1955
ValueType
The type of the underlying value
Definition: Settings.h:1981
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:2024
friend std::ostream & operator<<(std::ostream &stream, const Enabled::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:2018
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:2030
static const Enabled always
always
Definition: Settings.h:1985
static const Enabled hdrOnly
hdrOnly
Definition: Settings.h:1986
static std::set< ValueType > validValues()
All valid values of Enabled
Definition: Settings.h:1989
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:2036
constexpr Enabled(ValueType value)
Constructor
Definition: Settings.h:1998
Tonemapping settings.
Definition: Settings.h:1931
ToneMapping(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2087
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:2207
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2187
bool operator==(const ToneMapping &other) const
Equality operator
std::tuple< Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2061
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:2200
ToneMapping & set(const Enabled &value)
Set Enabled
Definition: Settings.h:2176
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:2170
bool operator!=(const ToneMapping &other) const
Inequality operator
ToneMapping copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition: Settings.h:2145
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:2164
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2113
friend std::ostream & operator<<(std::ostream &stream, const ToneMapping &value)
Operator to send the value as string to a stream
Definition: Settings.h:2222
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition: Settings.h:1913
Experimental & set(const ToneMapping &value)
Set ToneMapping
Definition: Settings.h:2358
ToneMapping & toneMapping()
Get ToneMapping
Definition: Settings.h:2352
const ToneMapping & toneMapping() const
Get ToneMapping
Definition: Settings.h:2346
bool operator!=(const Experimental &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:2405
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2267
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2385
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2294
std::tuple< Settings::Processing::Color::Experimental::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2240
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:2420
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:2398
bool operator==(const Experimental &other) const
Equality operator
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:2375
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:2327
Experimental & set(const ToneMapping::Enabled &value)
Set ToneMapping::Enabled
Definition: Settings.h:2365
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition: Settings.h:2441
static constexpr Range< double > validRange()
The range of valid values for Gamma
Definition: Settings.h:2463
double value() const
Get the value
bool operator>(const Gamma &other) const
Comparison operator
Definition: Settings.h:2510
void reset()
Reset the node to unset state
Gamma()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:2460
bool hasValue() const
Check if the value is set
friend std::ostream & operator<<(std::ostream &stream, const Gamma &value)
Operator to serialize the value to a stream
Definition: Settings.h:2516
constexpr Gamma(double value)
Constructor
Definition: Settings.h:2472
bool operator!=(const Gamma &other) const
Comparison operator
Definition: Settings.h:2498
bool operator<(const Gamma &other) const
Comparison operator
Definition: Settings.h:2504
std::string toString() const
Get the value as string
bool operator==(const Gamma &other) const
Comparison operator
Definition: Settings.h:2492
Color settings
Definition: Settings.h:1330
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:2771
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:2804
Color & set(const Gamma &value)
Set Gamma
Definition: Settings.h:2754
Gamma & gamma()
Get Gamma
Definition: Settings.h:2748
bool operator==(const Color &other) const
Equality operator
Color & set(const Experimental::ToneMapping &value)
Set Experimental::ToneMapping
Definition: Settings.h:2728
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2611
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:2779
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:2709
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:2787
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::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, Settings::Processing::Color::Gamma > Descendants
Definition: Settings.h:2545
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:2821
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2813
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:2795
Color & set(const Balance &value)
Set Balance
Definition: Settings.h:2681
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2855
Balance & balance()
Get Balance
Definition: Settings.h:2675
std::string toString() const
Get the value as string
const Balance & balance() const
Get Balance
Definition: Settings.h:2669
bool operator!=(const Color &other) const
Inequality operator
Color & set(const Balance::Green &value)
Set Balance::Green
Definition: Settings.h:2695
Color & set(const Experimental::ToneMapping::Enabled &value)
Set Experimental::ToneMapping::Enabled
Definition: Settings.h:2735
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:2763
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream
Definition: Settings.h:2872
Color & set(const Experimental &value)
Set Experimental
Definition: Settings.h:2721
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:2650
const Gamma & gamma() const
Get Gamma
Definition: Settings.h:2742
Experimental & experimental()
Get Experimental
Definition: Settings.h:2715
Color(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2578
Color & set(const Balance::Red &value)
Set Balance::Red
Definition: Settings.h:2702
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:2846
Color & set(const Balance::Blue &value)
Set Balance::Blue
Definition: Settings.h:2688
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:2993
bool ValueType
The type of the underlying value
Definition: Settings.h:2988
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3002
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3022
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3034
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3028
Higher values gives more correction.
Definition: Settings.h:3049
double ValueType
The type of the underlying value
Definition: Settings.h:3068
bool operator>(const Strength &other) const
Comparison operator
Definition: Settings.h:3118
bool operator!=(const Strength &other) const
Comparison operator
Definition: Settings.h:3106
constexpr Strength(double value)
Constructor
Definition: Settings.h:3080
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream
Definition: Settings.h:3124
bool operator<(const Strength &other) const
Comparison operator
Definition: Settings.h:3112
static constexpr Range< double > validRange()
The range of valid values for Strength
Definition: Settings.h:3071
bool operator==(const Strength &other) const
Comparison operator
Definition: Settings.h:3100
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:3334
friend std::ostream & operator<<(std::ostream &stream, const Correction &value)
Operator to send the value as string to a stream
Definition: Settings.h:3358
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition: Settings.h:3149
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:3236
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:3299
Correction & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3267
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:3312
bool operator!=(const Correction &other) const
Inequality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3255
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3203
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3342
Correction & set(const Strength &value)
Set Strength
Definition: Settings.h:3286
const Strength & strength() const
Get Strength
Definition: Settings.h:3274
Correction(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3176
static const Enabled yes
On/enabled.
Definition: Settings.h:3414
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3427
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3453
bool ValueType
The type of the underlying value
Definition: Settings.h:3413
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3459
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3447
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3418
static const Enabled no
Off/disabled.
Definition: Settings.h:3415
Higher values remove more points.
Definition: Settings.h:3474
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:3496
constexpr Threshold(double value)
Constructor
Definition: Settings.h:3505
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:3531
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:3549
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:3537
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:3525
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:3543
double ValueType
The type of the underlying value
Definition: Settings.h:3493
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:3757
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3628
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:3781
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3680
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3601
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:3736
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:3661
Threshold & threshold()
Get Threshold
Definition: Settings.h:3705
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:3574
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:3699
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:3724
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3692
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3765
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:3711
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition: Settings.h:2931
Removal & removal()
Get Removal
Definition: Settings.h:3963
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:3994
Correction & correction()
Get Correction
Definition: Settings.h:3930
const Correction & correction() const
Get Correction
Definition: Settings.h:3924
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled
Definition: Settings.h:3943
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:4074
const Removal & removal() const
Get Removal
Definition: Settings.h:3957
friend std::ostream & operator<<(std::ostream &stream, const ContrastDistortion &value)
Operator to send the value as string to a stream
Definition: Settings.h:4098
bool operator!=(const ContrastDistortion &other) const
Inequality operator
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:3905
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:3805
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3868
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4082
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:3983
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4019
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4006
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength
Definition: Settings.h:3950
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4053
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:3976
ContrastDistortion & set(const Correction &value)
Set Correction
Definition: Settings.h:3936
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4030
bool operator==(const ContrastDistortion &other) const
Equality operator
ContrastDistortion(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3836
ContrastDistortion & set(const Removal &value)
Set Removal
Definition: Settings.h:3969
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4040
Experimental filters. These may be renamed, moved or deleted in the future.
Definition: Settings.h:2909
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength
Definition: Settings.h:4277
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4399
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal
Definition: Settings.h:4284
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:4225
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4155
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4187
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion
Definition: Settings.h:4256
ContrastDistortion & contrastDistortion()
Get ContrastDistortion
Definition: Settings.h:4250
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4377
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:4414
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:4392
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4342
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled
Definition: Settings.h:4270
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled
Definition: Settings.h:4291
bool operator!=(const Experimental &other) const
Inequality operator
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion
Definition: Settings.h:4244
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4330
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:4309
std::string toString() const
Get the value as string
bool operator==(const Experimental &other) const
Equality operator
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:4123
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold
Definition: Settings.h:4298
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4319
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction
Definition: Settings.h:4263
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4355
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4366
Enable or disable the SNR filter
Definition: Settings.h:4469
static const Enabled yes
On/enabled.
Definition: Settings.h:4487
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:4526
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:4520
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:4500
static const Enabled no
Off/disabled.
Definition: Settings.h:4488
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:4491
bool ValueType
The type of the underlying value
Definition: Settings.h:4486
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:4532
std::string toString() const
Get the value as string
Discard points with signal-to-noise ratio (SNR) below the given value
Definition: Settings.h:4547
constexpr Threshold(double value)
Constructor
Definition: Settings.h:4576
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:4596
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:4620
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:4567
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:4614
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:4608
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:4564
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:4602
Discard points with signal-to-noise ratio (SNR) values below a threshold
Definition: Settings.h:4451
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4671
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:4762
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:4644
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:4750
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:4756
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:4769
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:4791
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:4843
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4827
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4698
bool operator!=(const Removal &other) const
Inequality operator
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4819
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:4800
Threshold & threshold()
Get Threshold
Definition: Settings.h:4775
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:4731
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:4781
std::string toString() const
Get the value as string
Contains a filter that removes points with low signal-to-noise ratio (SNR)
Definition: Settings.h:4433
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:5039
std::string toString() const
Get the value as string
Noise(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4891
Removal & removal()
Get Removal
Definition: Settings.h:4978
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:4953
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5046
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:4998
Noise & set(const Removal &value)
Set Removal
Definition: Settings.h:4984
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:5017
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:5008
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:5026
std::tuple< Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:4863
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:4991
const Removal & removal() const
Get Removal
Definition: Settings.h:4972
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4919
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:5061
bool operator==(const Noise &other) const
Equality operator
Enable or disable the outlier filter
Definition: Settings.h:5116
bool ValueType
The type of the underlying value
Definition: Settings.h:5133
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5173
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5147
static const Enabled no
Off/disabled.
Definition: Settings.h:5135
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5138
std::string toString() const
Get the value as string
static const Enabled yes
On/enabled.
Definition: Settings.h:5134
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5179
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5167
Discard point if Euclidean distance to neighboring points is above the given value
Definition: Settings.h:5194
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:5267
constexpr Threshold(double value)
Constructor
Definition: Settings.h:5223
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:5255
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:5243
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:5249
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:5214
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:5261
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:5211
Discard point if Euclidean distance to neighboring points is above a threshold
Definition: Settings.h:5098
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5409
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5447
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:5378
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5397
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:5428
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5490
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:5416
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5291
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5318
std::string toString() const
Get the value as string
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5403
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:5466
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5345
Threshold & threshold()
Get Threshold
Definition: Settings.h:5422
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5438
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5474
Contains a filter that removes points with large Euclidean distance to neighboring points
Definition: Settings.h:5080
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:5638
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5673
Outlier(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5538
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5693
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:5655
Outlier & set(const Removal &value)
Set Removal
Definition: Settings.h:5631
std::string toString() const
Get the value as string
const Removal & removal() const
Get Removal
Definition: Settings.h:5619
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5510
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:5686
bool operator!=(const Outlier &other) const
Inequality operator
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:5645
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5664
Removal & removal()
Get Removal
Definition: Settings.h:5625
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream
Definition: Settings.h:5708
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:5600
bool operator==(const Outlier &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5566
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition: Settings.h:5763
bool ValueType
The type of the underlying value
Definition: Settings.h:5780
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5785
static const Enabled yes
On/enabled.
Definition: Settings.h:5781
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5820
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5794
std::string toString() const
Get the value as string
static const Enabled no
Off/disabled.
Definition: Settings.h:5782
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5826
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5814
Discard points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:5745
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:5839
std::string toString() const
Get the value as string
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5891
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:5965
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5948
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:5978
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:6000
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:5923
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5865
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5954
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5942
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5985
bool operator!=(const Removal &other) const
Inequality operator
Contains a filter that removes points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:5727
const Removal & removal() const
Get Removal
Definition: Settings.h:6124
bool operator!=(const Reflection &other) const
Inequality operator
bool operator==(const Reflection &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6072
Removal & removal()
Get Removal
Definition: Settings.h:6130
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:6153
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6182
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:6175
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:6143
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:6018
Reflection & set(const Removal &value)
Set Removal
Definition: Settings.h:6136
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:6162
Reflection(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6045
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream
Definition: Settings.h:6197
std::string toString() const
Get the value as string
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:6105
Enable or disable the smoothing filter
Definition: Settings.h:6250
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6272
bool ValueType
The type of the underlying value
Definition: Settings.h:6267
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6307
static const Enabled yes
On/enabled.
Definition: Settings.h:6268
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6301
static const Enabled no
Off/disabled.
Definition: Settings.h:6269
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:6313
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6281
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:6328
double ValueType
The type of the underlying value
Definition: Settings.h:6345
bool operator!=(const Sigma &other) const
Comparison operator
Definition: Settings.h:6383
bool operator>(const Sigma &other) const
Comparison operator
Definition: Settings.h:6395
constexpr Sigma(double value)
Constructor
Definition: Settings.h:6357
static constexpr Range< double > validRange()
The range of valid values for Sigma
Definition: Settings.h:6348
bool operator==(const Sigma &other) const
Comparison operator
Definition: Settings.h:6377
std::string toString() const
Get the value as string
bool operator<(const Sigma &other) const
Comparison operator
Definition: Settings.h:6389
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream
Definition: Settings.h:6401
Gaussian smoothing of the point cloud
Definition: Settings.h:6232
Sigma & sigma()
Get Sigma
Definition: Settings.h:6556
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream
Definition: Settings.h:6625
const Sigma & sigma() const
Get Sigma
Definition: Settings.h:6550
Gaussian & set(const Enabled &value)
Set Enabled
Definition: Settings.h:6543
Gaussian(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6452
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:6582
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:6601
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:6537
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6425
bool operator==(const Gaussian &other) const
Equality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:6531
bool operator!=(const Gaussian &other) const
Inequality operator
std::string toString() const
Get the value as string
Gaussian & set(const Sigma &value)
Set Sigma
Definition: Settings.h:6562
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:6512
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:6573
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6479
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6609
Smoothing filters
Definition: Settings.h:6216
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:6735
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6701
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled
Definition: Settings.h:6773
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6828
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream
Definition: Settings.h:6843
bool operator!=(const Smoothing &other) const
Inequality operator
const Gaussian & gaussian() const
Get Gaussian
Definition: Settings.h:6754
Smoothing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6673
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma
Definition: Settings.h:6780
std::string toString() const
Get the value as string
bool operator==(const Smoothing &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:6821
Gaussian & gaussian()
Get Gaussian
Definition: Settings.h:6760
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:6790
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:6808
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:6799
Smoothing & set(const Gaussian &value)
Set Gaussian
Definition: Settings.h:6766
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6645
Filters
Definition: Settings.h:2893
bool operator!=(const Filters &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:7529
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:7411
Noise & noise()
Get Noise
Definition: Settings.h:7126
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:7033
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:7437
std::string toString() const
Get the value as string
const Reflection & reflection() const
Get Reflection
Definition: Settings.h:7200
const Noise & noise() const
Get Noise
Definition: Settings.h:7120
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:7420
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:7393
Reflection & reflection()
Get Reflection
Definition: Settings.h:7206
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:7339
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:7284
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:7463
std::tuple< 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::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, 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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6883
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:7376
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled
Definition: Settings.h:7226
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold
Definition: Settings.h:7153
Filters & set(const Smoothing &value)
Set Smoothing
Definition: Settings.h:7245
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:7454
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:7367
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction
Definition: Settings.h:7078
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled
Definition: Settings.h:7259
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6979
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:7328
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7481
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:7359
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian
Definition: Settings.h:7252
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7472
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:7402
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold
Definition: Settings.h:7193
Filters & set(const Noise::Removal &value)
Set Noise::Removal
Definition: Settings.h:7139
Filters & set(const Reflection &value)
Set Reflection
Definition: Settings.h:7212
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:7518
Filters & set(const Noise &value)
Set Noise
Definition: Settings.h:7132
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7085
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7113
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:7350
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:7428
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:7306
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:7275
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream
Definition: Settings.h:7548
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal
Definition: Settings.h:7099
Filters & set(const Outlier &value)
Set Outlier
Definition: Settings.h:7172
bool operator==(const Filters &other) const
Equality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:7295
Filters(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6931
const Smoothing & smoothing() const
Get Smoothing
Definition: Settings.h:7233
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled
Definition: Settings.h:7146
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion
Definition: Settings.h:7071
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal
Definition: Settings.h:7179
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:7446
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:7385
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:7052
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled
Definition: Settings.h:7186
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma
Definition: Settings.h:7266
const Outlier & outlier() const
Get Outlier
Definition: Settings.h:7160
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal
Definition: Settings.h:7219
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7092
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:7317
Outlier & outlier()
Get Outlier
Definition: Settings.h:7166
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7106
Experimental & experimental()
Get Experimental
Definition: Settings.h:7058
Smoothing & smoothing()
Get Smoothing
Definition: Settings.h:7239
Filters & set(const Experimental &value)
Set Experimental
Definition: Settings.h:7064
Settings related to processing of a capture, including filters and color balance
Definition: Settings.h:1312
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:8197
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::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, Settings::Processing::Color::Gamma, Settings::Processing::Filters, 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::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, 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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:7602
Color & color()
Get Color
Definition: Settings.h:7805
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:8310
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:7781
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled
Definition: Settings.h:8019
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold
Definition: Settings.h:7998
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:8113
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal
Definition: Settings.h:8012
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7942
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:8302
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled
Definition: Settings.h:7991
Processing & set(const Color::Experimental &value)
Set Color::Experimental
Definition: Settings.h:7846
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:8259
Processing()
Default constructor
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:8104
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing
Definition: Settings.h:8026
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:8135
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8079
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:8095
std::string toString() const
Get the value as string
Filters & filters()
Get Filters
Definition: Settings.h:7880
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8087
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:8318
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7914
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:8285
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection
Definition: Settings.h:8005
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold
Definition: Settings.h:7970
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian
Definition: Settings.h:8033
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8363
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:8186
const Filters & filters() const
Get Filters
Definition: Settings.h:7874
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:8251
Processing & set(const Filters::Noise &value)
Set Filters::Noise
Definition: Settings.h:7949
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:7907
Processing & set(const Color &value)
Set Color
Definition: Settings.h:7811
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:8327
const Settings::Processing::Filters & get() const
Definition: Settings.h:8127
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:8047
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:8277
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream
Definition: Settings.h:8379
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:8144
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:7928
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:8268
Processing & set(const Color::Balance &value)
Set Color::Balance
Definition: Settings.h:7818
const Color & color() const
Get Color
Definition: Settings.h:7799
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:8164
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental
Definition: Settings.h:7893
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:8154
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled
Definition: Settings.h:7963
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7935
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion
Definition: Settings.h:7900
Processing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7660
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:8243
Processing & set(const Color::Experimental::ToneMapping::Enabled &value)
Set Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:7860
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8063
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red
Definition: Settings.h:7839
bool operator==(const Processing &other) const
Equality operator
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal
Definition: Settings.h:7984
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green
Definition: Settings.h:7832
bool operator!=(const Processing &other) const
Inequality operator
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:8217
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:8120
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7718
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8071
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:8175
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:8293
Processing & set(const Filters &value)
Set Filters
Definition: Settings.h:7886
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:8234
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue
Definition: Settings.h:7825
Processing & set(const Color::Gamma &value)
Set Color::Gamma
Definition: Settings.h:7867
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:8040
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7921
const Settings::Processing::Color & get() const
Definition: Settings.h:8055
Processing & set(const Color::Experimental::ToneMapping &value)
Set Color::Experimental::ToneMapping
Definition: Settings.h:7853
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:8225
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:8208
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:8355
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:8336
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier
Definition: Settings.h:7977
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal
Definition: Settings.h:7956
Settings used when capturing with a Zivid camera
Definition: Settings.h:120
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental
Definition: Settings.h:8780
Settings(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:8499
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled
Definition: Settings.h:8850
Experimental & experimental()
Get Experimental
Definition: Settings.h:8671
Settings & set(const Processing::Color::Balance::Red &value)
Set Processing::Color::Balance::Red
Definition: Settings.h:8738
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:8815
const Settings::Acquisitions & get() const
Definition: Settings.h:8941
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:9087
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:8628
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8974
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled
Definition: Settings.h:8878
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled
Definition: Settings.h:8906
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:8927
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8982
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold
Definition: Settings.h:8857
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:9153
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green
Definition: Settings.h:8731
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:9054
Settings & set(const Processing::Color &value)
Set Processing::Color
Definition: Settings.h:8710
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:9108
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:9202
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:9023
const Settings::Processing::Filters & get() const
Definition: Settings.h:9037
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma
Definition: Settings.h:8766
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:9128
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:8808
const Settings::Experimental & get() const
Definition: Settings.h:8947
void load(const std::string &fileName)
Load from the given file
Settings & set(const Processing::Color::Experimental &value)
Set Processing::Color::Experimental
Definition: Settings.h:8745
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection
Definition: Settings.h:8892
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue
Definition: Settings.h:8724
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:8829
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:9144
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:9014
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:9270
const Acquisitions & acquisitions() const
Get Acquisitions
Definition: Settings.h:8646
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:8822
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian
Definition: Settings.h:8920
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:9219
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream
Definition: Settings.h:9296
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:9279
const Settings::Processing & get() const
Definition: Settings.h:8960
Settings()
Default constructor
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal
Definition: Settings.h:8899
Settings & set(const Processing::Color::Experimental::ToneMapping &value)
Set Processing::Color::Experimental::ToneMapping
Definition: Settings.h:8752
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:8561
const Settings::Processing::Color & get() const
Definition: Settings.h:8967
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing
Definition: Settings.h:8913
void save(const std::string &fileName) const
Save to the given file
Settings & set(const Processing::Filters::Smoothing::Gaussian::Sigma &value)
Set Processing::Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:8934
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:9136
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:9160
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance
Definition: Settings.h:8717
Settings & set(const Acquisitions &value)
Set Acquisitions
Definition: Settings.h:8658
Processing & processing()
Get Processing
Definition: Settings.h:8697
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion
Definition: Settings.h:8787
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal
Definition: Settings.h:8843
const Processing & processing() const
Get Processing
Definition: Settings.h:8691
bool operator==(const Settings &other) const
Equality operator
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:9045
const Settings::Experimental::Engine & get() const
Definition: Settings.h:8954
Settings(const std::string &fileName)
Construct Settings by loading from file
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:9064
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:8801
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier
Definition: Settings.h:8864
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:9236
Acquisitions & acquisitions()
Get Acquisitions
Definition: Settings.h:8652
std::tuple< Settings::Acquisitions, Settings::Experimental, Settings::Experimental::Engine, Settings::Processing, Settings::Processing::Color, Settings::Processing::Color::Balance, Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red, Settings::Processing::Color::Experimental, Settings::Processing::Color::Experimental::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled, Settings::Processing::Color::Gamma, Settings::Processing::Filters, 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::Noise, Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold, 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::Smoothing, Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:8434
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:9227
std::string toString() const
Get the value as string
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:9006
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:8665
Settings & set(const Experimental::Engine &value)
Set Experimental::Engine
Definition: Settings.h:8684
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:9211
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:9194
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8998
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise
Definition: Settings.h:8836
Settings & set(const Processing::Color::Experimental::ToneMapping::Enabled &value)
Set Processing::Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:8759
bool operator!=(const Settings &other) const
Inequality operator
Settings & set(const Processing &value)
Set Processing
Definition: Settings.h:8703
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:9097
Settings & set(const Processing::Filters &value)
Set Processing::Filters
Definition: Settings.h:8773
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:9030
Settings & set(const Experimental &value)
Set Experimental
Definition: Settings.h:8677
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold
Definition: Settings.h:8885
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:9245
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:9186
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal
Definition: Settings.h:8871
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:9075
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:9120
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:9177
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:9168
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8990
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:8794
NodeType
Definition: NodeType.h:100
Ret validRange(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:200
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99