Zivid C++ API  2.3.1+1a22cbf1-1
Defining the Future of 3D Machine Vision
Settings.h
Go to the documentation of this file.
1 
2 /*******************************************************************************
3  * This file is part of the Zivid 3D Camera API
4  *
5  * Copyright 2015-2022 (C) Zivid AS
6  * All rights reserved.
7  *
8  * Zivid Software License, v1.0
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  *
20  * 3. Neither the name of Zivid AS nor the names of its contributors may be used
21  * to endorse or promote products derived from this software without specific
22  * prior written permission.
23  *
24  * 4. This software, with or without modification, must not be used with any
25  * other 3D camera than from Zivid AS.
26  *
27  * 5. Any software provided in binary form under this license must not be
28  * reverse engineered, decompiled, modified and/or disassembled.
29  *
30  * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
31  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
32  * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
33  * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
34  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
37  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * Contact: Zivid Customer Success Team <customersuccess@zivid.com>
42  * Info: http://www.zivid.com
43  ******************************************************************************/
44 
45 #pragma once
46 
47 #include <array>
48 #include <chrono>
49 #include <cmath>
50 #include <ctime>
51 #include <iomanip>
52 #include <memory>
53 #include <set>
54 #include <sstream>
55 #include <string>
56 #include <tuple>
57 #include <utility>
58 #include <vector>
59 
62 #include "Zivid/DataModel/Traits.h"
65 #include "Zivid/Range.h"
66 
67 #ifdef _MSC_VER
68 # pragma warning(push)
69 # pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
70 #endif
71 
72 namespace Zivid
73 {
76  {
77  public:
79  static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
80 
82  static constexpr const char *path{ "" };
83 
85  static constexpr const char *name{ "Settings" };
86 
88  static constexpr const char *description{
89  R"description(Settings used when capturing with a Zivid camera)description"
90  };
91 
92  static constexpr size_t version{ 8 };
93 
94 #ifndef NO_DOC
95  template<size_t>
96  struct Version;
97 
98  using LatestVersion = Zivid::Settings;
99 
100  // Short identifier. This value is not guaranteed to be universally unique
101  // Todo(ZIVID-2808): Move this to internal DataModelExt header
102  static constexpr std::array<uint8_t, 3> binaryId{ 's', 'e', 't' };
103 
104 #endif
105 
108  {
109  public:
111  static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
112 
114  static constexpr const char *path{ "Acquisition" };
115 
117  static constexpr const char *name{ "Acquisition" };
118 
120  static constexpr const char *description{ R"description(Settings for a single acquisition)description" };
121 
126  {
127  public:
130 
132  static constexpr const char *path{ "Acquisition/Aperture" };
133 
135  static constexpr const char *name{ "Aperture" };
136 
138  static constexpr const char *description{
139  R"description(Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to
140 the effective aperture diameter).
141 )description"
142  };
143 
145  using ValueType = double;
146 
148  static constexpr Range<double> validRange()
149  {
150  return { 1.4, 32.0 };
151  }
152 
154  Aperture() = default;
155 
157  explicit constexpr Aperture(double value)
158  : m_opt{ verifyValue(value) }
159  {}
160 
165  double value() const;
166 
168  bool hasValue() const;
169 
171  void reset();
172 
174  std::string toString() const;
175 
177  bool operator==(const Aperture &other) const
178  {
179  return m_opt == other.m_opt;
180  }
181 
183  bool operator!=(const Aperture &other) const
184  {
185  return m_opt != other.m_opt;
186  }
187 
189  bool operator<(const Aperture &other) const
190  {
191  return m_opt < other.m_opt;
192  }
193 
195  bool operator>(const Aperture &other) const
196  {
197  return m_opt > other.m_opt;
198  }
199 
201  friend std::ostream &operator<<(std::ostream &stream, const Aperture &value)
202  {
203  return stream << value.toString();
204  }
205 
206  private:
207  void setFromString(const std::string &value);
208 
209  constexpr ValueType verifyValue(const ValueType &value) const
210  {
211  return validRange().isInRange(value)
212  ? value
213  : throw std::out_of_range{ "Aperture{ " + std::to_string(value) + " } is not in range ["
214  + std::to_string(validRange().min()) + ", "
215  + std::to_string(validRange().max()) + "]" };
216  }
217 
218  Zivid::DataModel::Detail::Optional<double> m_opt;
219 
220  friend struct DataModel::Detail::Befriend<Aperture>;
221  };
222 
237  {
238  public:
241 
243  static constexpr const char *path{ "Acquisition/Brightness" };
244 
246  static constexpr const char *name{ "Brightness" };
247 
249  static constexpr const char *description{
250  R"description(Brightness controls the light output from the projector.
251 
252 Brightness above 1.0 may be needed when the distance between the camera and the scene is large,
253 or in case of high levels of ambient lighting. Brightness above 1.0 is supported on Zivid One
254 Plus and Zivid Two.
255 
256 When brightness is above 1.0 the duty cycle of the camera (the percentage of time the camera
257 can capture) will be reduced. For Zivid One Plus the duty cycle in boost mode is 50%. For Zivid
258 Two the duty cycle is reduced linearly from 100% at brightness 1.0, to 50% at brightness 1.8.
259 The duty cycle is calculated over a 10 second period. This limitation is enforced automatically
260 by the camera. Calling capture when the duty cycle limit has been reached will cause the camera
261 to first wait (sleep) for a duration of time to cool down, before capture will start.
262 )description"
263  };
264 
266  using ValueType = double;
267 
269  static constexpr Range<double> validRange()
270  {
271  return { 0, 1.8 };
272  }
273 
275  Brightness() = default;
276 
278  explicit constexpr Brightness(double value)
279  : m_opt{ verifyValue(value) }
280  {}
281 
286  double value() const;
287 
289  bool hasValue() const;
290 
292  void reset();
293 
295  std::string toString() const;
296 
298  bool operator==(const Brightness &other) const
299  {
300  return m_opt == other.m_opt;
301  }
302 
304  bool operator!=(const Brightness &other) const
305  {
306  return m_opt != other.m_opt;
307  }
308 
310  bool operator<(const Brightness &other) const
311  {
312  return m_opt < other.m_opt;
313  }
314 
316  bool operator>(const Brightness &other) const
317  {
318  return m_opt > other.m_opt;
319  }
320 
322  friend std::ostream &operator<<(std::ostream &stream, const Brightness &value)
323  {
324  return stream << value.toString();
325  }
326 
327  private:
328  void setFromString(const std::string &value);
329 
330  constexpr ValueType verifyValue(const ValueType &value) const
331  {
332  return validRange().isInRange(value)
333  ? value
334  : throw std::out_of_range{ "Brightness{ " + std::to_string(value)
335  + " } is not in range [" + std::to_string(validRange().min())
336  + ", " + std::to_string(validRange().max()) + "]" };
337  }
338 
339  Zivid::DataModel::Detail::Optional<double> m_opt;
340 
341  friend struct DataModel::Detail::Befriend<Brightness>;
342  };
343 
346  {
347  public:
350 
352  static constexpr const char *path{ "Acquisition/ExposureTime" };
353 
355  static constexpr const char *name{ "ExposureTime" };
356 
358  static constexpr const char *description{
359  R"description(Exposure time for each single image in the measurement. Affects frame rate.)description"
360  };
361 
363  using ValueType = std::chrono::microseconds;
364 
367  {
368  return { std::chrono::microseconds{ 1677 }, std::chrono::microseconds{ 100000 } };
369  }
370 
372  ExposureTime() = default;
373 
375  explicit constexpr ExposureTime(std::chrono::microseconds value)
376  : m_opt{ verifyValue(value) }
377  {}
378 
383  std::chrono::microseconds value() const;
384 
386  bool hasValue() const;
387 
389  void reset();
390 
392  std::string toString() const;
393 
395  bool operator==(const ExposureTime &other) const
396  {
397  return m_opt == other.m_opt;
398  }
399 
401  bool operator!=(const ExposureTime &other) const
402  {
403  return m_opt != other.m_opt;
404  }
405 
407  bool operator<(const ExposureTime &other) const
408  {
409  return m_opt < other.m_opt;
410  }
411 
413  bool operator>(const ExposureTime &other) const
414  {
415  return m_opt > other.m_opt;
416  }
417 
419  friend std::ostream &operator<<(std::ostream &stream, const ExposureTime &value)
420  {
421  return stream << value.toString();
422  }
423 
424  private:
425  void setFromString(const std::string &value);
426 
427  constexpr ValueType verifyValue(const ValueType &value) const
428  {
429  return validRange().isInRange(value)
430  ? value
431  : throw std::out_of_range{ "ExposureTime{ " + std::to_string(value.count())
432  + " } is not in range ["
433  + std::to_string(validRange().min().count()) + ", "
434  + std::to_string(validRange().max().count()) + "]" };
435  }
436 
437  Zivid::DataModel::Detail::Optional<std::chrono::microseconds> m_opt;
438 
439  friend struct DataModel::Detail::Befriend<ExposureTime>;
440  };
441 
444  {
445  public:
448 
450  static constexpr const char *path{ "Acquisition/Gain" };
451 
453  static constexpr const char *name{ "Gain" };
454 
456  static constexpr const char *description{ R"description(Analog gain in the camera)description" };
457 
459  using ValueType = double;
460 
462  static constexpr Range<double> validRange()
463  {
464  return { 1, 16 };
465  }
466 
468  Gain() = default;
469 
471  explicit constexpr Gain(double value)
472  : m_opt{ verifyValue(value) }
473  {}
474 
479  double value() const;
480 
482  bool hasValue() const;
483 
485  void reset();
486 
488  std::string toString() const;
489 
491  bool operator==(const Gain &other) const
492  {
493  return m_opt == other.m_opt;
494  }
495 
497  bool operator!=(const Gain &other) const
498  {
499  return m_opt != other.m_opt;
500  }
501 
503  bool operator<(const Gain &other) const
504  {
505  return m_opt < other.m_opt;
506  }
507 
509  bool operator>(const Gain &other) const
510  {
511  return m_opt > other.m_opt;
512  }
513 
515  friend std::ostream &operator<<(std::ostream &stream, const Gain &value)
516  {
517  return stream << value.toString();
518  }
519 
520  private:
521  void setFromString(const std::string &value);
522 
523  constexpr ValueType verifyValue(const ValueType &value) const
524  {
525  return validRange().isInRange(value)
526  ? value
527  : throw std::out_of_range{ "Gain{ " + std::to_string(value) + " } is not in range ["
528  + std::to_string(validRange().min()) + ", "
529  + std::to_string(validRange().max()) + "]" };
530  }
531 
532  Zivid::DataModel::Detail::Optional<double> m_opt;
533 
534  friend struct DataModel::Detail::Befriend<Gain>;
535  };
536 
541 
544 
559 #ifndef NO_DOC
560  template<typename... Args,
561  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
562  typename std::enable_if<
563  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
564  typename std::decay<Args>::type...>::value,
565  int>::type = 0>
566 #else
567  template<typename... Args>
568 #endif
569  explicit Acquisition(Args &&...args)
570  {
571  using namespace Zivid::Detail::TypeTraits;
572 
573  static_assert(AllArgsDecayedAreUnique<Args...>::value,
574  "Found duplicate types among the arguments passed to Acquisition(...). "
575  "Types should be listed at most once.");
576 
577  set(std::forward<Args>(args)...);
578  }
579 
593 #ifndef NO_DOC
594  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
595 #else
596  template<typename... Args>
597 #endif
598  void set(Args &&...args)
599  {
600  using namespace Zivid::Detail::TypeTraits;
601 
602  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
603  static_assert(AllArgsAreDescendantNodes::value,
604  "All arguments passed to set(...) must be descendant nodes.");
605 
606  static_assert(AllArgsDecayedAreUnique<Args...>::value,
607  "Found duplicate types among the arguments passed to set(...). "
608  "Types should be listed at most once.");
609 
610  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
611  }
612 
627 #ifndef NO_DOC
628  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
629 #else
630  template<typename... Args>
631 #endif
632  Acquisition copyWith(Args &&...args) const
633  {
634  using namespace Zivid::Detail::TypeTraits;
635 
636  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
637  static_assert(AllArgsAreDescendantNodes::value,
638  "All arguments passed to copyWith(...) must be descendant nodes.");
639 
640  static_assert(AllArgsDecayedAreUnique<Args...>::value,
641  "Found duplicate types among the arguments passed to copyWith(...). "
642  "Types should be listed at most once.");
643 
644  auto copy{ *this };
645  copy.set(std::forward<Args>(args)...);
646  return copy;
647  }
648 
650  const Aperture &aperture() const
651  {
652  return m_aperture;
653  }
654 
657  {
658  return m_aperture;
659  }
660 
662  Acquisition &set(const Aperture &value)
663  {
664  m_aperture = value;
665  return *this;
666  }
667 
669  const Brightness &brightness() const
670  {
671  return m_brightness;
672  }
673 
676  {
677  return m_brightness;
678  }
679 
681  Acquisition &set(const Brightness &value)
682  {
683  m_brightness = value;
684  return *this;
685  }
686 
688  const ExposureTime &exposureTime() const
689  {
690  return m_exposureTime;
691  }
692 
695  {
696  return m_exposureTime;
697  }
698 
700  Acquisition &set(const ExposureTime &value)
701  {
702  m_exposureTime = value;
703  return *this;
704  }
705 
707  const Gain &gain() const
708  {
709  return m_gain;
710  }
711 
714  {
715  return m_gain;
716  }
717 
719  Acquisition &set(const Gain &value)
720  {
721  m_gain = value;
722  return *this;
723  }
724 
725  template<typename T,
726  typename std::enable_if<std::is_same<T, Settings::Acquisition::Aperture>::value, int>::type = 0>
728  {
729  return m_aperture;
730  }
731 
732  template<typename T,
733  typename std::enable_if<std::is_same<T, Settings::Acquisition::Brightness>::value, int>::type = 0>
735  {
736  return m_brightness;
737  }
738 
739  template<
740  typename T,
741  typename std::enable_if<std::is_same<T, Settings::Acquisition::ExposureTime>::value, int>::type = 0>
743  {
744  return m_exposureTime;
745  }
746 
747  template<typename T,
748  typename std::enable_if<std::is_same<T, Settings::Acquisition::Gain>::value, int>::type = 0>
750  {
751  return m_gain;
752  }
753 
754  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
756  {
757  return m_aperture;
758  }
759 
760  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
762  {
763  return m_brightness;
764  }
765 
766  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
768  {
769  return m_exposureTime;
770  }
771 
772  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
774  {
775  return m_gain;
776  }
777 
779  template<typename F>
780  void forEach(const F &f) const
781  {
782  f(m_aperture);
783  f(m_brightness);
784  f(m_exposureTime);
785  f(m_gain);
786  }
787 
789  template<typename F>
790  void forEach(const F &f)
791  {
792  f(m_aperture);
793  f(m_brightness);
794  f(m_exposureTime);
795  f(m_gain);
796  }
797 
799  bool operator==(const Acquisition &other) const;
800 
802  bool operator!=(const Acquisition &other) const;
803 
805  std::string toString() const;
806 
808  friend std::ostream &operator<<(std::ostream &stream, const Acquisition &value)
809  {
810  return stream << value.toString();
811  }
812 
813  private:
814  void setFromString(const std::string &value);
815 
816  void setFromString(const std::string &fullPath, const std::string &value);
817 
818  std::string getString(const std::string &fullPath) const;
819 
820  Aperture m_aperture;
821  Brightness m_brightness;
822  ExposureTime m_exposureTime;
823  Gain m_gain;
824 
825  friend struct DataModel::Detail::Befriend<Acquisition>;
826  };
827 
830  {
831  public:
834 
836  static constexpr const char *path{ "Acquisitions" };
837 
839  static constexpr const char *name{ "Acquisitions" };
840 
842  static constexpr const char *description{ R"description(List of Acquisition objects)description" };
843 
845  using ValueType = std::vector<Settings::Acquisition>;
846 
849  {
850  return { 0, std::numeric_limits<ValueType::size_type>::max() };
851  }
852 
854  Acquisitions() = default;
855 
857  explicit Acquisitions(std::vector<Settings::Acquisition> value)
858  : m_value{ std::move(value) }
859  {}
860 
862  explicit Acquisitions(std::initializer_list<Settings::Acquisition> value)
863  : Acquisitions{ ValueType{ value } }
864  {}
865 
867  const std::vector<Settings::Acquisition> &value() const;
868 
870  std::string toString() const;
871 
873  std::size_t size() const noexcept;
874 
876  bool isEmpty() const noexcept;
877 
883  template<typename... Args>
884  void emplaceBack(Args &&...args)
885  {
886  m_value.emplace_back(std::forward<Args>(args)...);
887  }
888 
894  Settings::Acquisition &at(std::size_t pos);
895 
901  const Settings::Acquisition &at(std::size_t pos) const;
902 
909 
915  const Settings::Acquisition &operator[](std::size_t pos) const;
916 
918  template<typename F>
919  void forEach(const F &f)
920  {
921  for(auto &child : m_value)
922  {
923  f(child);
924  }
925  }
926 
928  template<typename F>
929  void forEach(const F &f) const
930  {
931  for(const auto &child : m_value)
932  {
933  f(child);
934  }
935  }
936 
938  bool operator==(const Acquisitions &other) const
939  {
940  return m_value == other.m_value;
941  }
942 
944  bool operator!=(const Acquisitions &other) const
945  {
946  return m_value != other.m_value;
947  }
948 
950  friend std::ostream &operator<<(std::ostream &stream, const Acquisitions &value)
951  {
952  return stream << value.toString();
953  }
954 
955  private:
956  void setFromString(const std::string &value);
957 
958  std::vector<Settings::Acquisition> m_value{};
959 
960  friend struct DataModel::Detail::Befriend<Acquisitions>;
961  };
962 
965  {
966  public:
968  static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group;
969 
971  static constexpr const char *path{ "Experimental" };
972 
974  static constexpr const char *name{ "Experimental" };
975 
977  static constexpr const char *description{
978  R"description(Experimental features. These settings may be changed, renamed, moved or deleted in the future.)description"
979  };
980 
991  {
992  public:
995 
997  static constexpr const char *path{ "Experimental/Engine" };
998 
1000  static constexpr const char *name{ "Engine" };
1001 
1003  static constexpr const char *description{ R"description(Set the Zivid Vision Engine to use.
1004 
1005 The Phase Engine is the current default Zivid Vision Engine.
1006 
1007 The Stripe Engine uses anti-reflection technology to suppress interreflection artifacts
1008 and improve data quality on shiny objects like cylinders and chrome-plated parts.
1009 Additional acquisition and processing time are required for the Stripe Engine.
1010 The Stripe Engine is currently experimental, and may be changed and improved in the future.
1011 )description" };
1012 
1014  enum class ValueType
1015  {
1016  phase,
1017  stripe
1018  };
1019  static const Engine phase;
1020  static const Engine stripe;
1021 
1023  static std::set<ValueType> validValues()
1024  {
1025  return { ValueType::phase, ValueType::stripe };
1026  }
1027 
1029  Engine() = default;
1030 
1032  explicit constexpr Engine(ValueType value)
1033  : m_opt{ verifyValue(value) }
1034  {}
1035 
1040  ValueType value() const;
1041 
1043  bool hasValue() const;
1044 
1046  void reset();
1047 
1049  std::string toString() const;
1050 
1052  friend std::ostream &operator<<(std::ostream &stream, const Engine::ValueType &value)
1053  {
1054  return stream << Engine{ value }.toString();
1055  }
1056 
1058  bool operator==(const Engine &other) const
1059  {
1060  return m_opt == other.m_opt;
1061  }
1062 
1064  bool operator!=(const Engine &other) const
1065  {
1066  return m_opt != other.m_opt;
1067  }
1068 
1070  friend std::ostream &operator<<(std::ostream &stream, const Engine &value)
1071  {
1072  return stream << value.toString();
1073  }
1074 
1075  private:
1076  void setFromString(const std::string &value);
1077 
1078  constexpr ValueType verifyValue(const ValueType &value) const
1079  {
1080  return value == ValueType::phase || value == ValueType::stripe
1081  ? value
1082  : throw std::invalid_argument{
1083  "Invalid value: Engine{ "
1084  + std::to_string(static_cast<std::underlying_type<ValueType>::type>(value)) + " }"
1085  };
1086  }
1087 
1088  Zivid::DataModel::Detail::Optional<ValueType> m_opt;
1089 
1090  friend struct DataModel::Detail::Befriend<Engine>;
1091  };
1092 
1093  using Descendants = std::tuple<Settings::Experimental::Engine>;
1094 
1097 
1109 #ifndef NO_DOC
1110  template<typename... Args,
1111  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1112  typename std::enable_if<
1113  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
1114  typename std::decay<Args>::type...>::value,
1115  int>::type = 0>
1116 #else
1117  template<typename... Args>
1118 #endif
1119  explicit Experimental(Args &&...args)
1120  {
1121  using namespace Zivid::Detail::TypeTraits;
1122 
1123  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1124  "Found duplicate types among the arguments passed to Experimental(...). "
1125  "Types should be listed at most once.");
1126 
1127  set(std::forward<Args>(args)...);
1128  }
1129 
1140 #ifndef NO_DOC
1141  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1142 #else
1143  template<typename... Args>
1144 #endif
1145  void set(Args &&...args)
1146  {
1147  using namespace Zivid::Detail::TypeTraits;
1148 
1149  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1150  static_assert(AllArgsAreDescendantNodes::value,
1151  "All arguments passed to set(...) must be descendant nodes.");
1152 
1153  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1154  "Found duplicate types among the arguments passed to set(...). "
1155  "Types should be listed at most once.");
1156 
1157  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1158  }
1159 
1171 #ifndef NO_DOC
1172  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1173 #else
1174  template<typename... Args>
1175 #endif
1176  Experimental copyWith(Args &&...args) const
1177  {
1178  using namespace Zivid::Detail::TypeTraits;
1179 
1180  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1181  static_assert(AllArgsAreDescendantNodes::value,
1182  "All arguments passed to copyWith(...) must be descendant nodes.");
1183 
1184  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1185  "Found duplicate types among the arguments passed to copyWith(...). "
1186  "Types should be listed at most once.");
1187 
1188  auto copy{ *this };
1189  copy.set(std::forward<Args>(args)...);
1190  return copy;
1191  }
1192 
1194  const Engine &engine() const
1195  {
1196  return m_engine;
1197  }
1198 
1201  {
1202  return m_engine;
1203  }
1204 
1206  Experimental &set(const Engine &value)
1207  {
1208  m_engine = value;
1209  return *this;
1210  }
1211 
1212  template<typename T,
1213  typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
1215  {
1216  return m_engine;
1217  }
1218 
1219  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1221  {
1222  return m_engine;
1223  }
1224 
1226  template<typename F>
1227  void forEach(const F &f) const
1228  {
1229  f(m_engine);
1230  }
1231 
1233  template<typename F>
1234  void forEach(const F &f)
1235  {
1236  f(m_engine);
1237  }
1238 
1240  bool operator==(const Experimental &other) const;
1241 
1243  bool operator!=(const Experimental &other) const;
1244 
1246  std::string toString() const;
1247 
1249  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
1250  {
1251  return stream << value.toString();
1252  }
1253 
1254  private:
1255  void setFromString(const std::string &value);
1256 
1257  void setFromString(const std::string &fullPath, const std::string &value);
1258 
1259  std::string getString(const std::string &fullPath) const;
1260 
1261  Engine m_engine;
1262 
1263  friend struct DataModel::Detail::Befriend<Experimental>;
1264  };
1265 
1268  {
1269  public:
1272 
1274  static constexpr const char *path{ "Processing" };
1275 
1277  static constexpr const char *name{ "Processing" };
1278 
1280  static constexpr const char *description{
1281  R"description(Settings related to processing of a capture, including filters and color balance)description"
1282  };
1283 
1286  {
1287  public:
1290 
1292  static constexpr const char *path{ "Processing/Color" };
1293 
1295  static constexpr const char *name{ "Color" };
1296 
1298  static constexpr const char *description{ R"description(Color settings)description" };
1299 
1302  {
1303  public:
1306 
1308  static constexpr const char *path{ "Processing/Color/Balance" };
1309 
1311  static constexpr const char *name{ "Balance" };
1312 
1314  static constexpr const char *description{ R"description(Color balance settings)description" };
1315 
1318  {
1319  public:
1322 
1324  static constexpr const char *path{ "Processing/Color/Balance/Blue" };
1325 
1327  static constexpr const char *name{ "Blue" };
1328 
1330  static constexpr const char *description{
1331  R"description(Digital gain applied to blue channel)description"
1332  };
1333 
1335  using ValueType = double;
1336 
1338  static constexpr Range<double> validRange()
1339  {
1340  return { 1.0, 8.0 };
1341  }
1342 
1344  Blue() = default;
1345 
1347  explicit constexpr Blue(double value)
1348  : m_opt{ verifyValue(value) }
1349  {}
1350 
1355  double value() const;
1356 
1358  bool hasValue() const;
1359 
1361  void reset();
1362 
1364  std::string toString() const;
1365 
1367  bool operator==(const Blue &other) const
1368  {
1369  return m_opt == other.m_opt;
1370  }
1371 
1373  bool operator!=(const Blue &other) const
1374  {
1375  return m_opt != other.m_opt;
1376  }
1377 
1379  bool operator<(const Blue &other) const
1380  {
1381  return m_opt < other.m_opt;
1382  }
1383 
1385  bool operator>(const Blue &other) const
1386  {
1387  return m_opt > other.m_opt;
1388  }
1389 
1391  friend std::ostream &operator<<(std::ostream &stream, const Blue &value)
1392  {
1393  return stream << value.toString();
1394  }
1395 
1396  private:
1397  void setFromString(const std::string &value);
1398 
1399  constexpr ValueType verifyValue(const ValueType &value) const
1400  {
1401  return validRange().isInRange(value)
1402  ? value
1403  : throw std::out_of_range{ "Blue{ " + std::to_string(value)
1404  + " } is not in range ["
1405  + std::to_string(validRange().min()) + ", "
1406  + std::to_string(validRange().max()) + "]" };
1407  }
1408 
1409  Zivid::DataModel::Detail::Optional<double> m_opt;
1410 
1411  friend struct DataModel::Detail::Befriend<Blue>;
1412  };
1413 
1416  {
1417  public:
1420 
1422  static constexpr const char *path{ "Processing/Color/Balance/Green" };
1423 
1425  static constexpr const char *name{ "Green" };
1426 
1428  static constexpr const char *description{
1429  R"description(Digital gain applied to green channel)description"
1430  };
1431 
1433  using ValueType = double;
1434 
1436  static constexpr Range<double> validRange()
1437  {
1438  return { 1.0, 8.0 };
1439  }
1440 
1442  Green() = default;
1443 
1445  explicit constexpr Green(double value)
1446  : m_opt{ verifyValue(value) }
1447  {}
1448 
1453  double value() const;
1454 
1456  bool hasValue() const;
1457 
1459  void reset();
1460 
1462  std::string toString() const;
1463 
1465  bool operator==(const Green &other) const
1466  {
1467  return m_opt == other.m_opt;
1468  }
1469 
1471  bool operator!=(const Green &other) const
1472  {
1473  return m_opt != other.m_opt;
1474  }
1475 
1477  bool operator<(const Green &other) const
1478  {
1479  return m_opt < other.m_opt;
1480  }
1481 
1483  bool operator>(const Green &other) const
1484  {
1485  return m_opt > other.m_opt;
1486  }
1487 
1489  friend std::ostream &operator<<(std::ostream &stream, const Green &value)
1490  {
1491  return stream << value.toString();
1492  }
1493 
1494  private:
1495  void setFromString(const std::string &value);
1496 
1497  constexpr ValueType verifyValue(const ValueType &value) const
1498  {
1499  return validRange().isInRange(value)
1500  ? value
1501  : throw std::out_of_range{ "Green{ " + std::to_string(value)
1502  + " } is not in range ["
1503  + std::to_string(validRange().min()) + ", "
1504  + std::to_string(validRange().max()) + "]" };
1505  }
1506 
1507  Zivid::DataModel::Detail::Optional<double> m_opt;
1508 
1509  friend struct DataModel::Detail::Befriend<Green>;
1510  };
1511 
1514  {
1515  public:
1518 
1520  static constexpr const char *path{ "Processing/Color/Balance/Red" };
1521 
1523  static constexpr const char *name{ "Red" };
1524 
1526  static constexpr const char *description{
1527  R"description(Digital gain applied to red channel)description"
1528  };
1529 
1531  using ValueType = double;
1532 
1534  static constexpr Range<double> validRange()
1535  {
1536  return { 1.0, 8.0 };
1537  }
1538 
1540  Red() = default;
1541 
1543  explicit constexpr Red(double value)
1544  : m_opt{ verifyValue(value) }
1545  {}
1546 
1551  double value() const;
1552 
1554  bool hasValue() const;
1555 
1557  void reset();
1558 
1560  std::string toString() const;
1561 
1563  bool operator==(const Red &other) const
1564  {
1565  return m_opt == other.m_opt;
1566  }
1567 
1569  bool operator!=(const Red &other) const
1570  {
1571  return m_opt != other.m_opt;
1572  }
1573 
1575  bool operator<(const Red &other) const
1576  {
1577  return m_opt < other.m_opt;
1578  }
1579 
1581  bool operator>(const Red &other) const
1582  {
1583  return m_opt > other.m_opt;
1584  }
1585 
1587  friend std::ostream &operator<<(std::ostream &stream, const Red &value)
1588  {
1589  return stream << value.toString();
1590  }
1591 
1592  private:
1593  void setFromString(const std::string &value);
1594 
1595  constexpr ValueType verifyValue(const ValueType &value) const
1596  {
1597  return validRange().isInRange(value)
1598  ? value
1599  : throw std::out_of_range{ "Red{ " + std::to_string(value)
1600  + " } is not in range ["
1601  + std::to_string(validRange().min()) + ", "
1602  + std::to_string(validRange().max()) + "]" };
1603  }
1604 
1605  Zivid::DataModel::Detail::Optional<double> m_opt;
1606 
1607  friend struct DataModel::Detail::Befriend<Red>;
1608  };
1609 
1613 
1616 
1630 #ifndef NO_DOC
1631  template<typename... Args,
1632  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
1633  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
1634  Descendants,
1635  typename std::decay<Args>::type...>::value,
1636  int>::type = 0>
1637 #else
1638  template<typename... Args>
1639 #endif
1640  explicit Balance(Args &&...args)
1641  {
1642  using namespace Zivid::Detail::TypeTraits;
1643 
1644  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1645  "Found duplicate types among the arguments passed to Balance(...). "
1646  "Types should be listed at most once.");
1647 
1648  set(std::forward<Args>(args)...);
1649  }
1650 
1663 #ifndef NO_DOC
1664  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
1665 #else
1666  template<typename... Args>
1667 #endif
1668  void set(Args &&...args)
1669  {
1670  using namespace Zivid::Detail::TypeTraits;
1671 
1672  using AllArgsAreDescendantNodes =
1673  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1674  static_assert(AllArgsAreDescendantNodes::value,
1675  "All arguments passed to set(...) must be descendant nodes.");
1676 
1677  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1678  "Found duplicate types among the arguments passed to set(...). "
1679  "Types should be listed at most once.");
1680 
1681  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
1682  }
1683 
1697 #ifndef NO_DOC
1698  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
1699 #else
1700  template<typename... Args>
1701 #endif
1702  Balance copyWith(Args &&...args) const
1703  {
1704  using namespace Zivid::Detail::TypeTraits;
1705 
1706  using AllArgsAreDescendantNodes =
1707  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1708  static_assert(AllArgsAreDescendantNodes::value,
1709  "All arguments passed to copyWith(...) must be descendant nodes.");
1710 
1711  static_assert(AllArgsDecayedAreUnique<Args...>::value,
1712  "Found duplicate types among the arguments passed to copyWith(...). "
1713  "Types should be listed at most once.");
1714 
1715  auto copy{ *this };
1716  copy.set(std::forward<Args>(args)...);
1717  return copy;
1718  }
1719 
1721  const Blue &blue() const
1722  {
1723  return m_blue;
1724  }
1725 
1728  {
1729  return m_blue;
1730  }
1731 
1733  Balance &set(const Blue &value)
1734  {
1735  m_blue = value;
1736  return *this;
1737  }
1738 
1740  const Green &green() const
1741  {
1742  return m_green;
1743  }
1744 
1747  {
1748  return m_green;
1749  }
1750 
1752  Balance &set(const Green &value)
1753  {
1754  m_green = value;
1755  return *this;
1756  }
1757 
1759  const Red &red() const
1760  {
1761  return m_red;
1762  }
1763 
1766  {
1767  return m_red;
1768  }
1769 
1771  Balance &set(const Red &value)
1772  {
1773  m_red = value;
1774  return *this;
1775  }
1776 
1777  template<typename T,
1778  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
1779  int>::type = 0>
1781  {
1782  return m_blue;
1783  }
1784 
1785  template<
1786  typename T,
1787  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
1788  int>::type = 0>
1790  {
1791  return m_green;
1792  }
1793 
1794  template<typename T,
1795  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
1796  int>::type = 0>
1798  {
1799  return m_red;
1800  }
1801 
1802  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1804  {
1805  return m_blue;
1806  }
1807 
1808  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1810  {
1811  return m_green;
1812  }
1813 
1814  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1816  {
1817  return m_red;
1818  }
1819 
1821  template<typename F>
1822  void forEach(const F &f) const
1823  {
1824  f(m_blue);
1825  f(m_green);
1826  f(m_red);
1827  }
1828 
1830  template<typename F>
1831  void forEach(const F &f)
1832  {
1833  f(m_blue);
1834  f(m_green);
1835  f(m_red);
1836  }
1837 
1839  bool operator==(const Balance &other) const;
1840 
1842  bool operator!=(const Balance &other) const;
1843 
1845  std::string toString() const;
1846 
1848  friend std::ostream &operator<<(std::ostream &stream, const Balance &value)
1849  {
1850  return stream << value.toString();
1851  }
1852 
1853  private:
1854  void setFromString(const std::string &value);
1855 
1856  void setFromString(const std::string &fullPath, const std::string &value);
1857 
1858  std::string getString(const std::string &fullPath) const;
1859 
1860  Blue m_blue;
1861  Green m_green;
1862  Red m_red;
1863 
1864  friend struct DataModel::Detail::Befriend<Balance>;
1865  };
1866 
1869  {
1870  public:
1873 
1875  static constexpr const char *path{ "Processing/Color/Experimental" };
1876 
1878  static constexpr const char *name{ "Experimental" };
1879 
1881  static constexpr const char *description{
1882  R"description(Experimental color settings. These may be renamed, moved or deleted in the future.)description"
1883  };
1884 
1887  {
1888  public:
1891 
1893  static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping" };
1894 
1896  static constexpr const char *name{ "ToneMapping" };
1897 
1899  static constexpr const char *description{ R"description(Tonemapping settings.)description" };
1900 
1911  {
1912  public:
1915 
1917  static constexpr const char *path{ "Processing/Color/Experimental/ToneMapping/Enabled" };
1918 
1920  static constexpr const char *name{ "Enabled" };
1921 
1923  static constexpr const char *description{
1924  R"description(This setting controls when tone mapping of colors is performed. Tone mapping will normalize
1925 the captured color image to the full available output range by applying a gain factor to the
1926 colors. For single-captures this can be used do brighten dark images. For HDR captures this
1927 is required to map high-dynamic-range colors to the more limited dynamic range output.
1928 
1929 This setting has two possible values. `Always` will perform tone-mapping for all captures.
1930 `HdrOnly` will perform tone mapping for HDR captures but not for single-captures. It is not
1931 possible to disable tone mapping for HDR captures.
1932 )description"
1933  };
1934 
1936  enum class ValueType
1937  {
1938  always,
1939  hdrOnly
1940  };
1941  static const Enabled always;
1942  static const Enabled hdrOnly;
1943 
1945  static std::set<ValueType> validValues()
1946  {
1947  return { ValueType::always, ValueType::hdrOnly };
1948  }
1949 
1951  Enabled() = default;
1952 
1954  explicit constexpr Enabled(ValueType value)
1955  : m_opt{ verifyValue(value) }
1956  {}
1957 
1962  ValueType value() const;
1963 
1965  bool hasValue() const;
1966 
1968  void reset();
1969 
1971  std::string toString() const;
1972 
1974  friend std::ostream &operator<<(std::ostream &stream, const Enabled::ValueType &value)
1975  {
1976  return stream << Enabled{ value }.toString();
1977  }
1978 
1980  bool operator==(const Enabled &other) const
1981  {
1982  return m_opt == other.m_opt;
1983  }
1984 
1986  bool operator!=(const Enabled &other) const
1987  {
1988  return m_opt != other.m_opt;
1989  }
1990 
1992  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
1993  {
1994  return stream << value.toString();
1995  }
1996 
1997  private:
1998  void setFromString(const std::string &value);
1999 
2000  constexpr ValueType verifyValue(const ValueType &value) const
2001  {
2002  return value == ValueType::always || value == ValueType::hdrOnly
2003  ? value
2004  : throw std::invalid_argument{
2005  "Invalid value: Enabled{ "
2006  + std::to_string(
2007  static_cast<std::underlying_type<ValueType>::type>(value))
2008  + " }"
2009  };
2010  }
2011 
2012  Zivid::DataModel::Detail::Optional<ValueType> m_opt;
2013 
2014  friend struct DataModel::Detail::Befriend<Enabled>;
2015  };
2016 
2017  using Descendants = std::tuple<Settings::Processing::Color::Experimental::ToneMapping::Enabled>;
2018 
2021 
2033 #ifndef NO_DOC
2034  template<typename... Args,
2035  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2036  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
2037  Descendants,
2038  typename std::decay<Args>::type...>::value,
2039  int>::type = 0>
2040 #else
2041  template<typename... Args>
2042 #endif
2043  explicit ToneMapping(Args &&...args)
2044  {
2045  using namespace Zivid::Detail::TypeTraits;
2046 
2047  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2048  "Found duplicate types among the arguments passed to ToneMapping(...). "
2049  "Types should be listed at most once.");
2050 
2051  set(std::forward<Args>(args)...);
2052  }
2053 
2064 #ifndef NO_DOC
2065  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2066 #else
2067  template<typename... Args>
2068 #endif
2069  void set(Args &&...args)
2070  {
2071  using namespace Zivid::Detail::TypeTraits;
2072 
2073  using AllArgsAreDescendantNodes =
2074  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2075  static_assert(AllArgsAreDescendantNodes::value,
2076  "All arguments passed to set(...) must be descendant nodes.");
2077 
2078  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2079  "Found duplicate types among the arguments passed to set(...). "
2080  "Types should be listed at most once.");
2081 
2082  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2083  }
2084 
2096 #ifndef NO_DOC
2097  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2098 #else
2099  template<typename... Args>
2100 #endif
2101  ToneMapping copyWith(Args &&...args) const
2102  {
2103  using namespace Zivid::Detail::TypeTraits;
2104 
2105  using AllArgsAreDescendantNodes =
2106  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2107  static_assert(AllArgsAreDescendantNodes::value,
2108  "All arguments passed to copyWith(...) must be descendant nodes.");
2109 
2110  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2111  "Found duplicate types among the arguments passed to copyWith(...). "
2112  "Types should be listed at most once.");
2113 
2114  auto copy{ *this };
2115  copy.set(std::forward<Args>(args)...);
2116  return copy;
2117  }
2118 
2120  const Enabled &isEnabled() const
2121  {
2122  return m_enabled;
2123  }
2124 
2127  {
2128  return m_enabled;
2129  }
2130 
2132  ToneMapping &set(const Enabled &value)
2133  {
2134  m_enabled = value;
2135  return *this;
2136  }
2137 
2138  template<
2139  typename T,
2140  typename std::enable_if<
2141  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2142  int>::type = 0>
2144  {
2145  return m_enabled;
2146  }
2147 
2148  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2150  {
2151  return m_enabled;
2152  }
2153 
2155  template<typename F>
2156  void forEach(const F &f) const
2157  {
2158  f(m_enabled);
2159  }
2160 
2162  template<typename F>
2163  void forEach(const F &f)
2164  {
2165  f(m_enabled);
2166  }
2167 
2169  bool operator==(const ToneMapping &other) const;
2170 
2172  bool operator!=(const ToneMapping &other) const;
2173 
2175  std::string toString() const;
2176 
2178  friend std::ostream &operator<<(std::ostream &stream, const ToneMapping &value)
2179  {
2180  return stream << value.toString();
2181  }
2182 
2183  private:
2184  void setFromString(const std::string &value);
2185 
2186  void setFromString(const std::string &fullPath, const std::string &value);
2187 
2188  std::string getString(const std::string &fullPath) const;
2189 
2190  Enabled m_enabled;
2191 
2192  friend struct DataModel::Detail::Befriend<ToneMapping>;
2193  };
2194 
2197 
2200 
2213 #ifndef NO_DOC
2214  template<typename... Args,
2215  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2216  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
2217  Descendants,
2218  typename std::decay<Args>::type...>::value,
2219  int>::type = 0>
2220 #else
2221  template<typename... Args>
2222 #endif
2223  explicit Experimental(Args &&...args)
2224  {
2225  using namespace Zivid::Detail::TypeTraits;
2226 
2227  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2228  "Found duplicate types among the arguments passed to Experimental(...). "
2229  "Types should be listed at most once.");
2230 
2231  set(std::forward<Args>(args)...);
2232  }
2233 
2245 #ifndef NO_DOC
2246  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2247 #else
2248  template<typename... Args>
2249 #endif
2250  void set(Args &&...args)
2251  {
2252  using namespace Zivid::Detail::TypeTraits;
2253 
2254  using AllArgsAreDescendantNodes =
2255  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2256  static_assert(AllArgsAreDescendantNodes::value,
2257  "All arguments passed to set(...) must be descendant nodes.");
2258 
2259  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2260  "Found duplicate types among the arguments passed to set(...). "
2261  "Types should be listed at most once.");
2262 
2263  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2264  }
2265 
2278 #ifndef NO_DOC
2279  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2280 #else
2281  template<typename... Args>
2282 #endif
2283  Experimental copyWith(Args &&...args) const
2284  {
2285  using namespace Zivid::Detail::TypeTraits;
2286 
2287  using AllArgsAreDescendantNodes =
2288  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2289  static_assert(AllArgsAreDescendantNodes::value,
2290  "All arguments passed to copyWith(...) must be descendant nodes.");
2291 
2292  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2293  "Found duplicate types among the arguments passed to copyWith(...). "
2294  "Types should be listed at most once.");
2295 
2296  auto copy{ *this };
2297  copy.set(std::forward<Args>(args)...);
2298  return copy;
2299  }
2300 
2302  const ToneMapping &toneMapping() const
2303  {
2304  return m_toneMapping;
2305  }
2306 
2309  {
2310  return m_toneMapping;
2311  }
2312 
2315  {
2316  m_toneMapping = value;
2317  return *this;
2318  }
2319 
2322  {
2323  m_toneMapping.set(value);
2324  return *this;
2325  }
2326 
2327  template<typename T,
2328  typename std::enable_if<
2329  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
2330  int>::type = 0>
2332  {
2333  return m_toneMapping;
2334  }
2335 
2336  template<
2337  typename T,
2338  typename std::enable_if<
2339  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2340  int>::type = 0>
2342  {
2344  }
2345 
2346  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2348  {
2349  return m_toneMapping;
2350  }
2351 
2353  template<typename F>
2354  void forEach(const F &f) const
2355  {
2356  f(m_toneMapping);
2357  }
2358 
2360  template<typename F>
2361  void forEach(const F &f)
2362  {
2363  f(m_toneMapping);
2364  }
2365 
2367  bool operator==(const Experimental &other) const;
2368 
2370  bool operator!=(const Experimental &other) const;
2371 
2373  std::string toString() const;
2374 
2376  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
2377  {
2378  return stream << value.toString();
2379  }
2380 
2381  private:
2382  void setFromString(const std::string &value);
2383 
2384  void setFromString(const std::string &fullPath, const std::string &value);
2385 
2386  std::string getString(const std::string &fullPath) const;
2387 
2388  ToneMapping m_toneMapping;
2389 
2390  friend struct DataModel::Detail::Befriend<Experimental>;
2391  };
2392 
2397  {
2398  public:
2401 
2403  static constexpr const char *path{ "Processing/Color/Gamma" };
2404 
2406  static constexpr const char *name{ "Gamma" };
2407 
2409  static constexpr const char *description{
2410  R"description(Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma
2411 greater than 1 makes the colors darker.
2412 )description"
2413  };
2414 
2416  using ValueType = double;
2417 
2419  static constexpr Range<double> validRange()
2420  {
2421  return { 0.25, 1.5 };
2422  }
2423 
2425  Gamma() = default;
2426 
2428  explicit constexpr Gamma(double value)
2429  : m_opt{ verifyValue(value) }
2430  {}
2431 
2436  double value() const;
2437 
2439  bool hasValue() const;
2440 
2442  void reset();
2443 
2445  std::string toString() const;
2446 
2448  bool operator==(const Gamma &other) const
2449  {
2450  return m_opt == other.m_opt;
2451  }
2452 
2454  bool operator!=(const Gamma &other) const
2455  {
2456  return m_opt != other.m_opt;
2457  }
2458 
2460  bool operator<(const Gamma &other) const
2461  {
2462  return m_opt < other.m_opt;
2463  }
2464 
2466  bool operator>(const Gamma &other) const
2467  {
2468  return m_opt > other.m_opt;
2469  }
2470 
2472  friend std::ostream &operator<<(std::ostream &stream, const Gamma &value)
2473  {
2474  return stream << value.toString();
2475  }
2476 
2477  private:
2478  void setFromString(const std::string &value);
2479 
2480  constexpr ValueType verifyValue(const ValueType &value) const
2481  {
2482  return validRange().isInRange(value)
2483  ? value
2484  : throw std::out_of_range{ "Gamma{ " + std::to_string(value) + " } is not in range ["
2485  + std::to_string(validRange().min()) + ", "
2486  + std::to_string(validRange().max()) + "]" };
2487  }
2488 
2489  Zivid::DataModel::Detail::Optional<double> m_opt;
2490 
2491  friend struct DataModel::Detail::Befriend<Gamma>;
2492  };
2493 
2502 
2505 
2524 #ifndef NO_DOC
2525  template<typename... Args,
2526  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
2527  typename std::enable_if<
2528  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
2529  typename std::decay<Args>::type...>::value,
2530  int>::type = 0>
2531 #else
2532  template<typename... Args>
2533 #endif
2534  explicit Color(Args &&...args)
2535  {
2536  using namespace Zivid::Detail::TypeTraits;
2537 
2538  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2539  "Found duplicate types among the arguments passed to Color(...). "
2540  "Types should be listed at most once.");
2541 
2542  set(std::forward<Args>(args)...);
2543  }
2544 
2562 #ifndef NO_DOC
2563  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
2564 #else
2565  template<typename... Args>
2566 #endif
2567  void set(Args &&...args)
2568  {
2569  using namespace Zivid::Detail::TypeTraits;
2570 
2571  using AllArgsAreDescendantNodes =
2572  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2573  static_assert(AllArgsAreDescendantNodes::value,
2574  "All arguments passed to set(...) must be descendant nodes.");
2575 
2576  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2577  "Found duplicate types among the arguments passed to set(...). "
2578  "Types should be listed at most once.");
2579 
2580  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
2581  }
2582 
2601 #ifndef NO_DOC
2602  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
2603 #else
2604  template<typename... Args>
2605 #endif
2606  Color copyWith(Args &&...args) const
2607  {
2608  using namespace Zivid::Detail::TypeTraits;
2609 
2610  using AllArgsAreDescendantNodes =
2611  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
2612  static_assert(AllArgsAreDescendantNodes::value,
2613  "All arguments passed to copyWith(...) must be descendant nodes.");
2614 
2615  static_assert(AllArgsDecayedAreUnique<Args...>::value,
2616  "Found duplicate types among the arguments passed to copyWith(...). "
2617  "Types should be listed at most once.");
2618 
2619  auto copy{ *this };
2620  copy.set(std::forward<Args>(args)...);
2621  return copy;
2622  }
2623 
2625  const Balance &balance() const
2626  {
2627  return m_balance;
2628  }
2629 
2632  {
2633  return m_balance;
2634  }
2635 
2637  Color &set(const Balance &value)
2638  {
2639  m_balance = value;
2640  return *this;
2641  }
2642 
2644  Color &set(const Balance::Blue &value)
2645  {
2646  m_balance.set(value);
2647  return *this;
2648  }
2649 
2651  Color &set(const Balance::Green &value)
2652  {
2653  m_balance.set(value);
2654  return *this;
2655  }
2656 
2658  Color &set(const Balance::Red &value)
2659  {
2660  m_balance.set(value);
2661  return *this;
2662  }
2663 
2666  {
2667  return m_experimental;
2668  }
2669 
2672  {
2673  return m_experimental;
2674  }
2675 
2677  Color &set(const Experimental &value)
2678  {
2679  m_experimental = value;
2680  return *this;
2681  }
2682 
2685  {
2686  m_experimental.set(value);
2687  return *this;
2688  }
2689 
2692  {
2693  m_experimental.set(value);
2694  return *this;
2695  }
2696 
2698  const Gamma &gamma() const
2699  {
2700  return m_gamma;
2701  }
2702 
2705  {
2706  return m_gamma;
2707  }
2708 
2710  Color &set(const Gamma &value)
2711  {
2712  m_gamma = value;
2713  return *this;
2714  }
2715 
2716  template<typename T,
2717  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value,
2718  int>::type = 0>
2720  {
2721  return m_balance;
2722  }
2723 
2724  template<typename T,
2725  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
2726  int>::type = 0>
2728  {
2729  return m_balance.get<Settings::Processing::Color::Balance::Blue>();
2730  }
2731 
2732  template<typename T,
2733  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
2734  int>::type = 0>
2736  {
2737  return m_balance.get<Settings::Processing::Color::Balance::Green>();
2738  }
2739 
2740  template<typename T,
2741  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
2742  int>::type = 0>
2744  {
2745  return m_balance.get<Settings::Processing::Color::Balance::Red>();
2746  }
2747 
2748  template<typename T,
2749  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value,
2750  int>::type = 0>
2752  {
2753  return m_experimental;
2754  }
2755 
2756  template<typename T,
2757  typename std::enable_if<
2758  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
2759  int>::type = 0>
2761  {
2763  }
2764 
2765  template<typename T,
2766  typename std::enable_if<
2767  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
2768  int>::type = 0>
2770  {
2772  }
2773 
2774  template<
2775  typename T,
2776  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
2778  {
2779  return m_gamma;
2780  }
2781 
2782  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2784  {
2785  return m_balance;
2786  }
2787 
2788  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2790  {
2791  return m_experimental;
2792  }
2793 
2794  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2796  {
2797  return m_gamma;
2798  }
2799 
2801  template<typename F>
2802  void forEach(const F &f) const
2803  {
2804  f(m_balance);
2805  f(m_experimental);
2806  f(m_gamma);
2807  }
2808 
2810  template<typename F>
2811  void forEach(const F &f)
2812  {
2813  f(m_balance);
2814  f(m_experimental);
2815  f(m_gamma);
2816  }
2817 
2819  bool operator==(const Color &other) const;
2820 
2822  bool operator!=(const Color &other) const;
2823 
2825  std::string toString() const;
2826 
2828  friend std::ostream &operator<<(std::ostream &stream, const Color &value)
2829  {
2830  return stream << value.toString();
2831  }
2832 
2833  private:
2834  void setFromString(const std::string &value);
2835 
2836  void setFromString(const std::string &fullPath, const std::string &value);
2837 
2838  std::string getString(const std::string &fullPath) const;
2839 
2840  Balance m_balance;
2841  Experimental m_experimental;
2842  Gamma m_gamma;
2843 
2844  friend struct DataModel::Detail::Befriend<Color>;
2845  };
2846 
2849  {
2850  public:
2853 
2855  static constexpr const char *path{ "Processing/Filters" };
2856 
2858  static constexpr const char *name{ "Filters" };
2859 
2861  static constexpr const char *description{ R"description(Filters)description" };
2862 
2865  {
2866  public:
2869 
2871  static constexpr const char *path{ "Processing/Filters/Experimental" };
2872 
2874  static constexpr const char *name{ "Experimental" };
2875 
2877  static constexpr const char *description{
2878  R"description(Experimental filters. These may be renamed, moved or deleted in the future.)description"
2879  };
2880 
2887  {
2888  public:
2891 
2893  static constexpr const char *path{ "Processing/Filters/Experimental/ContrastDistortion" };
2894 
2896  static constexpr const char *name{ "ContrastDistortion" };
2897 
2899  static constexpr const char *description{
2900  R"description(Corrects artifacts that appear when imaging scenes with large texture gradients
2901 or high contrast. These artifacts are caused by blurring in the lens. The filter
2902 works best when aperture values are chosen such that the camera has quite good focus.
2903 The filter also supports removing the points that experience a large correction.
2904 )description"
2905  };
2906 
2909  {
2910  public:
2913 
2915  static constexpr const char *path{
2916  "Processing/Filters/Experimental/ContrastDistortion/Correction"
2917  };
2918 
2920  static constexpr const char *name{ "Correction" };
2921 
2923  static constexpr const char *description{ R"description(Correction)description" };
2924 
2927  {
2928  public:
2931 
2933  static constexpr const char *path{
2934  "Processing/Filters/Experimental/ContrastDistortion/Correction/Enabled"
2935  };
2936 
2938  static constexpr const char *name{ "Enabled" };
2939 
2941  static constexpr const char *description{ R"description(Enabled)description" };
2942 
2944  using ValueType = bool;
2945  static const Enabled yes;
2946  static const Enabled no;
2947 
2949  static std::set<bool> validValues()
2950  {
2951  return { false, true };
2952  }
2953 
2955  Enabled() = default;
2956 
2958  explicit constexpr Enabled(bool value)
2959  : m_opt{ value }
2960  {}
2961 
2966  bool value() const;
2967 
2969  bool hasValue() const;
2970 
2972  void reset();
2973 
2975  std::string toString() const;
2976 
2978  bool operator==(const Enabled &other) const
2979  {
2980  return m_opt == other.m_opt;
2981  }
2982 
2984  bool operator!=(const Enabled &other) const
2985  {
2986  return m_opt != other.m_opt;
2987  }
2988 
2990  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
2991  {
2992  return stream << value.toString();
2993  }
2994 
2995  private:
2996  void setFromString(const std::string &value);
2997 
2998  Zivid::DataModel::Detail::Optional<bool> m_opt;
2999 
3000  friend struct DataModel::Detail::Befriend<Enabled>;
3001  };
3002 
3005  {
3006  public:
3009 
3011  static constexpr const char *path{
3012  "Processing/Filters/Experimental/ContrastDistortion/Correction/Strength"
3013  };
3014 
3016  static constexpr const char *name{ "Strength" };
3017 
3019  static constexpr const char *description{
3020  R"description(Higher values gives more correction.)description"
3021  };
3022 
3024  using ValueType = double;
3025 
3027  static constexpr Range<double> validRange()
3028  {
3029  return { 0.0, 1.0 };
3030  }
3031 
3033  Strength() = default;
3034 
3036  explicit constexpr Strength(double value)
3037  : m_opt{ verifyValue(value) }
3038  {}
3039 
3044  double value() const;
3045 
3047  bool hasValue() const;
3048 
3050  void reset();
3051 
3053  std::string toString() const;
3054 
3056  bool operator==(const Strength &other) const
3057  {
3058  return m_opt == other.m_opt;
3059  }
3060 
3062  bool operator!=(const Strength &other) const
3063  {
3064  return m_opt != other.m_opt;
3065  }
3066 
3068  bool operator<(const Strength &other) const
3069  {
3070  return m_opt < other.m_opt;
3071  }
3072 
3074  bool operator>(const Strength &other) const
3075  {
3076  return m_opt > other.m_opt;
3077  }
3078 
3080  friend std::ostream &operator<<(std::ostream &stream, const Strength &value)
3081  {
3082  return stream << value.toString();
3083  }
3084 
3085  private:
3086  void setFromString(const std::string &value);
3087 
3088  constexpr ValueType verifyValue(const ValueType &value) const
3089  {
3090  return validRange().isInRange(value)
3091  ? value
3092  : throw std::out_of_range{ "Strength{ " + std::to_string(value)
3093  + " } is not in range ["
3094  + std::to_string(validRange().min()) + ", "
3095  + std::to_string(validRange().max()) + "]" };
3096  }
3097 
3098  Zivid::DataModel::Detail::Optional<double> m_opt;
3099 
3100  friend struct DataModel::Detail::Befriend<Strength>;
3101  };
3102 
3103  using Descendants = std::tuple<
3106 
3109 
3122 #ifndef NO_DOC
3123  template<typename... Args,
3124  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3125  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3126  Descendants,
3127  typename std::decay<Args>::type...>::value,
3128  int>::type = 0>
3129 #else
3130  template<typename... Args>
3131 #endif
3132  explicit Correction(Args &&...args)
3133  {
3134  using namespace Zivid::Detail::TypeTraits;
3135 
3136  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3137  "Found duplicate types among the arguments passed to Correction(...). "
3138  "Types should be listed at most once.");
3139 
3140  set(std::forward<Args>(args)...);
3141  }
3142 
3154 #ifndef NO_DOC
3155  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3156 #else
3157  template<typename... Args>
3158 #endif
3159  void set(Args &&...args)
3160  {
3161  using namespace Zivid::Detail::TypeTraits;
3162 
3163  using AllArgsAreDescendantNodes =
3164  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3165  static_assert(AllArgsAreDescendantNodes::value,
3166  "All arguments passed to set(...) must be descendant nodes.");
3167 
3168  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3169  "Found duplicate types among the arguments passed to set(...). "
3170  "Types should be listed at most once.");
3171 
3172  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3173  }
3174 
3187 #ifndef NO_DOC
3188  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3189 #else
3190  template<typename... Args>
3191 #endif
3192  Correction copyWith(Args &&...args) const
3193  {
3194  using namespace Zivid::Detail::TypeTraits;
3195 
3196  using AllArgsAreDescendantNodes =
3197  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3198  static_assert(AllArgsAreDescendantNodes::value,
3199  "All arguments passed to copyWith(...) must be descendant nodes.");
3200 
3201  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3202  "Found duplicate types among the arguments passed to copyWith(...). "
3203  "Types should be listed at most once.");
3204 
3205  auto copy{ *this };
3206  copy.set(std::forward<Args>(args)...);
3207  return copy;
3208  }
3209 
3211  const Enabled &isEnabled() const
3212  {
3213  return m_enabled;
3214  }
3215 
3218  {
3219  return m_enabled;
3220  }
3221 
3223  Correction &set(const Enabled &value)
3224  {
3225  m_enabled = value;
3226  return *this;
3227  }
3228 
3230  const Strength &strength() const
3231  {
3232  return m_strength;
3233  }
3234 
3237  {
3238  return m_strength;
3239  }
3240 
3242  Correction &set(const Strength &value)
3243  {
3244  m_strength = value;
3245  return *this;
3246  }
3247 
3248  template<typename T,
3249  typename std::enable_if<
3250  std::is_same<T,
3251  Settings::Processing::Filters::Experimental::ContrastDistortion::
3252  Correction::Enabled>::value,
3253  int>::type = 0>
3255  get() const
3256  {
3257  return m_enabled;
3258  }
3259 
3260  template<typename T,
3261  typename std::enable_if<
3262  std::is_same<T,
3263  Settings::Processing::Filters::Experimental::ContrastDistortion::
3264  Correction::Strength>::value,
3265  int>::type = 0>
3267  &
3268  get() const
3269  {
3270  return m_strength;
3271  }
3272 
3273  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3275  get() const
3276  {
3277  return m_enabled;
3278  }
3279 
3280  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3282  &
3283  get() const
3284  {
3285  return m_strength;
3286  }
3287 
3289  template<typename F>
3290  void forEach(const F &f) const
3291  {
3292  f(m_enabled);
3293  f(m_strength);
3294  }
3295 
3297  template<typename F>
3298  void forEach(const F &f)
3299  {
3300  f(m_enabled);
3301  f(m_strength);
3302  }
3303 
3305  bool operator==(const Correction &other) const;
3306 
3308  bool operator!=(const Correction &other) const;
3309 
3311  std::string toString() const;
3312 
3314  friend std::ostream &operator<<(std::ostream &stream, const Correction &value)
3315  {
3316  return stream << value.toString();
3317  }
3318 
3319  private:
3320  void setFromString(const std::string &value);
3321 
3322  void setFromString(const std::string &fullPath, const std::string &value);
3323 
3324  std::string getString(const std::string &fullPath) const;
3325 
3326  Enabled m_enabled;
3327  Strength m_strength;
3328 
3329  friend struct DataModel::Detail::Befriend<Correction>;
3330  };
3331 
3334  {
3335  public:
3338 
3340  static constexpr const char *path{
3341  "Processing/Filters/Experimental/ContrastDistortion/Removal"
3342  };
3343 
3345  static constexpr const char *name{ "Removal" };
3346 
3348  static constexpr const char *description{ R"description(Removal)description" };
3349 
3352  {
3353  public:
3356 
3358  static constexpr const char *path{
3359  "Processing/Filters/Experimental/ContrastDistortion/Removal/Enabled"
3360  };
3361 
3363  static constexpr const char *name{ "Enabled" };
3364 
3366  static constexpr const char *description{ R"description(Enabled)description" };
3367 
3369  using ValueType = bool;
3370  static const Enabled yes;
3371  static const Enabled no;
3372 
3374  static std::set<bool> validValues()
3375  {
3376  return { false, true };
3377  }
3378 
3380  Enabled() = default;
3381 
3383  explicit constexpr Enabled(bool value)
3384  : m_opt{ value }
3385  {}
3386 
3391  bool value() const;
3392 
3394  bool hasValue() const;
3395 
3397  void reset();
3398 
3400  std::string toString() const;
3401 
3403  bool operator==(const Enabled &other) const
3404  {
3405  return m_opt == other.m_opt;
3406  }
3407 
3409  bool operator!=(const Enabled &other) const
3410  {
3411  return m_opt != other.m_opt;
3412  }
3413 
3415  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
3416  {
3417  return stream << value.toString();
3418  }
3419 
3420  private:
3421  void setFromString(const std::string &value);
3422 
3423  Zivid::DataModel::Detail::Optional<bool> m_opt;
3424 
3425  friend struct DataModel::Detail::Befriend<Enabled>;
3426  };
3427 
3430  {
3431  public:
3434 
3436  static constexpr const char *path{
3437  "Processing/Filters/Experimental/ContrastDistortion/Removal/Threshold"
3438  };
3439 
3441  static constexpr const char *name{ "Threshold" };
3442 
3444  static constexpr const char *description{
3445  R"description(Higher values remove more points.)description"
3446  };
3447 
3449  using ValueType = double;
3450 
3452  static constexpr Range<double> validRange()
3453  {
3454  return { 0.0, 1.0 };
3455  }
3456 
3458  Threshold() = default;
3459 
3461  explicit constexpr Threshold(double value)
3462  : m_opt{ verifyValue(value) }
3463  {}
3464 
3469  double value() const;
3470 
3472  bool hasValue() const;
3473 
3475  void reset();
3476 
3478  std::string toString() const;
3479 
3481  bool operator==(const Threshold &other) const
3482  {
3483  return m_opt == other.m_opt;
3484  }
3485 
3487  bool operator!=(const Threshold &other) const
3488  {
3489  return m_opt != other.m_opt;
3490  }
3491 
3493  bool operator<(const Threshold &other) const
3494  {
3495  return m_opt < other.m_opt;
3496  }
3497 
3499  bool operator>(const Threshold &other) const
3500  {
3501  return m_opt > other.m_opt;
3502  }
3503 
3505  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
3506  {
3507  return stream << value.toString();
3508  }
3509 
3510  private:
3511  void setFromString(const std::string &value);
3512 
3513  constexpr ValueType verifyValue(const ValueType &value) const
3514  {
3515  return validRange().isInRange(value)
3516  ? value
3517  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
3518  + " } is not in range ["
3519  + std::to_string(validRange().min()) + ", "
3520  + std::to_string(validRange().max()) + "]" };
3521  }
3522 
3523  Zivid::DataModel::Detail::Optional<double> m_opt;
3524 
3525  friend struct DataModel::Detail::Befriend<Threshold>;
3526  };
3527 
3528  using Descendants = std::tuple<
3531 
3534 
3547 #ifndef NO_DOC
3548  template<typename... Args,
3549  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3550  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3551  Descendants,
3552  typename std::decay<Args>::type...>::value,
3553  int>::type = 0>
3554 #else
3555  template<typename... Args>
3556 #endif
3557  explicit Removal(Args &&...args)
3558  {
3559  using namespace Zivid::Detail::TypeTraits;
3560 
3561  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3562  "Found duplicate types among the arguments passed to Removal(...). "
3563  "Types should be listed at most once.");
3564 
3565  set(std::forward<Args>(args)...);
3566  }
3567 
3579 #ifndef NO_DOC
3580  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3581 #else
3582  template<typename... Args>
3583 #endif
3584  void set(Args &&...args)
3585  {
3586  using namespace Zivid::Detail::TypeTraits;
3587 
3588  using AllArgsAreDescendantNodes =
3589  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3590  static_assert(AllArgsAreDescendantNodes::value,
3591  "All arguments passed to set(...) must be descendant nodes.");
3592 
3593  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3594  "Found duplicate types among the arguments passed to set(...). "
3595  "Types should be listed at most once.");
3596 
3597  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3598  }
3599 
3612 #ifndef NO_DOC
3613  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3614 #else
3615  template<typename... Args>
3616 #endif
3617  Removal copyWith(Args &&...args) const
3618  {
3619  using namespace Zivid::Detail::TypeTraits;
3620 
3621  using AllArgsAreDescendantNodes =
3622  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3623  static_assert(AllArgsAreDescendantNodes::value,
3624  "All arguments passed to copyWith(...) must be descendant nodes.");
3625 
3626  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3627  "Found duplicate types among the arguments passed to copyWith(...). "
3628  "Types should be listed at most once.");
3629 
3630  auto copy{ *this };
3631  copy.set(std::forward<Args>(args)...);
3632  return copy;
3633  }
3634 
3636  const Enabled &isEnabled() const
3637  {
3638  return m_enabled;
3639  }
3640 
3643  {
3644  return m_enabled;
3645  }
3646 
3648  Removal &set(const Enabled &value)
3649  {
3650  m_enabled = value;
3651  return *this;
3652  }
3653 
3655  const Threshold &threshold() const
3656  {
3657  return m_threshold;
3658  }
3659 
3662  {
3663  return m_threshold;
3664  }
3665 
3667  Removal &set(const Threshold &value)
3668  {
3669  m_threshold = value;
3670  return *this;
3671  }
3672 
3673  template<
3674  typename T,
3675  typename std::enable_if<std::is_same<T,
3676  Settings::Processing::Filters::Experimental::
3677  ContrastDistortion::Removal::Enabled>::value,
3678  int>::type = 0>
3680  get() const
3681  {
3682  return m_enabled;
3683  }
3684 
3685  template<
3686  typename T,
3687  typename std::enable_if<std::is_same<T,
3688  Settings::Processing::Filters::Experimental::
3689  ContrastDistortion::Removal::Threshold>::value,
3690  int>::type = 0>
3692  get() const
3693  {
3694  return m_threshold;
3695  }
3696 
3697  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3699  get() const
3700  {
3701  return m_enabled;
3702  }
3703 
3704  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3706  get() const
3707  {
3708  return m_threshold;
3709  }
3710 
3712  template<typename F>
3713  void forEach(const F &f) const
3714  {
3715  f(m_enabled);
3716  f(m_threshold);
3717  }
3718 
3720  template<typename F>
3721  void forEach(const F &f)
3722  {
3723  f(m_enabled);
3724  f(m_threshold);
3725  }
3726 
3728  bool operator==(const Removal &other) const;
3729 
3731  bool operator!=(const Removal &other) const;
3732 
3734  std::string toString() const;
3735 
3737  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
3738  {
3739  return stream << value.toString();
3740  }
3741 
3742  private:
3743  void setFromString(const std::string &value);
3744 
3745  void setFromString(const std::string &fullPath, const std::string &value);
3746 
3747  std::string getString(const std::string &fullPath) const;
3748 
3749  Enabled m_enabled;
3750  Threshold m_threshold;
3751 
3752  friend struct DataModel::Detail::Befriend<Removal>;
3753  };
3754 
3755  using Descendants = std::tuple<
3762 
3765 
3782 #ifndef NO_DOC
3783  template<typename... Args,
3784  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
3785  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
3786  Descendants,
3787  typename std::decay<Args>::type...>::value,
3788  int>::type = 0>
3789 #else
3790  template<typename... Args>
3791 #endif
3792  explicit ContrastDistortion(Args &&...args)
3793  {
3794  using namespace Zivid::Detail::TypeTraits;
3795 
3796  static_assert(
3797  AllArgsDecayedAreUnique<Args...>::value,
3798  "Found duplicate types among the arguments passed to ContrastDistortion(...). "
3799  "Types should be listed at most once.");
3800 
3801  set(std::forward<Args>(args)...);
3802  }
3803 
3819 #ifndef NO_DOC
3820  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
3821 #else
3822  template<typename... Args>
3823 #endif
3824  void set(Args &&...args)
3825  {
3826  using namespace Zivid::Detail::TypeTraits;
3827 
3828  using AllArgsAreDescendantNodes =
3829  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3830  static_assert(AllArgsAreDescendantNodes::value,
3831  "All arguments passed to set(...) must be descendant nodes.");
3832 
3833  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3834  "Found duplicate types among the arguments passed to set(...). "
3835  "Types should be listed at most once.");
3836 
3837  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
3838  }
3839 
3856 #ifndef NO_DOC
3857  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
3858 #else
3859  template<typename... Args>
3860 #endif
3861  ContrastDistortion copyWith(Args &&...args) const
3862  {
3863  using namespace Zivid::Detail::TypeTraits;
3864 
3865  using AllArgsAreDescendantNodes =
3866  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
3867  static_assert(AllArgsAreDescendantNodes::value,
3868  "All arguments passed to copyWith(...) must be descendant nodes.");
3869 
3870  static_assert(AllArgsDecayedAreUnique<Args...>::value,
3871  "Found duplicate types among the arguments passed to copyWith(...). "
3872  "Types should be listed at most once.");
3873 
3874  auto copy{ *this };
3875  copy.set(std::forward<Args>(args)...);
3876  return copy;
3877  }
3878 
3880  const Correction &correction() const
3881  {
3882  return m_correction;
3883  }
3884 
3887  {
3888  return m_correction;
3889  }
3890 
3893  {
3894  m_correction = value;
3895  return *this;
3896  }
3897 
3900  {
3901  m_correction.set(value);
3902  return *this;
3903  }
3904 
3907  {
3908  m_correction.set(value);
3909  return *this;
3910  }
3911 
3913  const Removal &removal() const
3914  {
3915  return m_removal;
3916  }
3917 
3920  {
3921  return m_removal;
3922  }
3923 
3926  {
3927  m_removal = value;
3928  return *this;
3929  }
3930 
3933  {
3934  m_removal.set(value);
3935  return *this;
3936  }
3937 
3940  {
3941  m_removal.set(value);
3942  return *this;
3943  }
3944 
3945  template<typename T,
3946  typename std::enable_if<std::is_same<T,
3947  Settings::Processing::Filters::Experimental::
3948  ContrastDistortion::Correction>::value,
3949  int>::type = 0>
3951  {
3952  return m_correction;
3953  }
3954 
3955  template<
3956  typename T,
3957  typename std::enable_if<std::is_same<T,
3958  Settings::Processing::Filters::Experimental::
3959  ContrastDistortion::Correction::Enabled>::value,
3960  int>::type = 0>
3962  get() const
3963  {
3964  return m_correction.get<
3966  }
3967 
3968  template<
3969  typename T,
3970  typename std::enable_if<std::is_same<T,
3971  Settings::Processing::Filters::Experimental::
3972  ContrastDistortion::Correction::Strength>::value,
3973  int>::type = 0>
3975  get() const
3976  {
3977  return m_correction.get<Settings::Processing::Filters::Experimental::ContrastDistortion::
3978  Correction::Strength>();
3979  }
3980 
3981  template<typename T,
3982  typename std::enable_if<std::is_same<T,
3983  Settings::Processing::Filters::Experimental::
3984  ContrastDistortion::Removal>::value,
3985  int>::type = 0>
3987  {
3988  return m_removal;
3989  }
3990 
3991  template<typename T,
3992  typename std::enable_if<std::is_same<T,
3993  Settings::Processing::Filters::Experimental::
3994  ContrastDistortion::Removal::Enabled>::value,
3995  int>::type = 0>
3997  const
3998  {
3999  return m_removal.get<
4001  }
4002 
4003  template<
4004  typename T,
4005  typename std::enable_if<std::is_same<T,
4006  Settings::Processing::Filters::Experimental::
4007  ContrastDistortion::Removal::Threshold>::value,
4008  int>::type = 0>
4010  const
4011  {
4012  return m_removal.get<
4014  }
4015 
4016  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4018  {
4019  return m_correction;
4020  }
4021 
4022  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4024  {
4025  return m_removal;
4026  }
4027 
4029  template<typename F>
4030  void forEach(const F &f) const
4031  {
4032  f(m_correction);
4033  f(m_removal);
4034  }
4035 
4037  template<typename F>
4038  void forEach(const F &f)
4039  {
4040  f(m_correction);
4041  f(m_removal);
4042  }
4043 
4045  bool operator==(const ContrastDistortion &other) const;
4046 
4048  bool operator!=(const ContrastDistortion &other) const;
4049 
4051  std::string toString() const;
4052 
4054  friend std::ostream &operator<<(std::ostream &stream, const ContrastDistortion &value)
4055  {
4056  return stream << value.toString();
4057  }
4058 
4059  private:
4060  void setFromString(const std::string &value);
4061 
4062  void setFromString(const std::string &fullPath, const std::string &value);
4063 
4064  std::string getString(const std::string &fullPath) const;
4065 
4066  Correction m_correction;
4067  Removal m_removal;
4068 
4069  friend struct DataModel::Detail::Befriend<ContrastDistortion>;
4070  };
4071 
4072  using Descendants = std::tuple<
4080 
4083 
4101 #ifndef NO_DOC
4102  template<typename... Args,
4103  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4104  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4105  Descendants,
4106  typename std::decay<Args>::type...>::value,
4107  int>::type = 0>
4108 #else
4109  template<typename... Args>
4110 #endif
4111  explicit Experimental(Args &&...args)
4112  {
4113  using namespace Zivid::Detail::TypeTraits;
4114 
4115  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4116  "Found duplicate types among the arguments passed to Experimental(...). "
4117  "Types should be listed at most once.");
4118 
4119  set(std::forward<Args>(args)...);
4120  }
4121 
4138 #ifndef NO_DOC
4139  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4140 #else
4141  template<typename... Args>
4142 #endif
4143  void set(Args &&...args)
4144  {
4145  using namespace Zivid::Detail::TypeTraits;
4146 
4147  using AllArgsAreDescendantNodes =
4148  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4149  static_assert(AllArgsAreDescendantNodes::value,
4150  "All arguments passed to set(...) must be descendant nodes.");
4151 
4152  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4153  "Found duplicate types among the arguments passed to set(...). "
4154  "Types should be listed at most once.");
4155 
4156  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4157  }
4158 
4176 #ifndef NO_DOC
4177  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4178 #else
4179  template<typename... Args>
4180 #endif
4181  Experimental copyWith(Args &&...args) const
4182  {
4183  using namespace Zivid::Detail::TypeTraits;
4184 
4185  using AllArgsAreDescendantNodes =
4186  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4187  static_assert(AllArgsAreDescendantNodes::value,
4188  "All arguments passed to copyWith(...) must be descendant nodes.");
4189 
4190  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4191  "Found duplicate types among the arguments passed to copyWith(...). "
4192  "Types should be listed at most once.");
4193 
4194  auto copy{ *this };
4195  copy.set(std::forward<Args>(args)...);
4196  return copy;
4197  }
4198 
4201  {
4202  return m_contrastDistortion;
4203  }
4204 
4207  {
4208  return m_contrastDistortion;
4209  }
4210 
4213  {
4214  m_contrastDistortion = value;
4215  return *this;
4216  }
4217 
4220  {
4221  m_contrastDistortion.set(value);
4222  return *this;
4223  }
4224 
4227  {
4228  m_contrastDistortion.set(value);
4229  return *this;
4230  }
4231 
4234  {
4235  m_contrastDistortion.set(value);
4236  return *this;
4237  }
4238 
4241  {
4242  m_contrastDistortion.set(value);
4243  return *this;
4244  }
4245 
4248  {
4249  m_contrastDistortion.set(value);
4250  return *this;
4251  }
4252 
4255  {
4256  m_contrastDistortion.set(value);
4257  return *this;
4258  }
4259 
4260  template<
4261  typename T,
4262  typename std::enable_if<
4263  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
4264  int>::type = 0>
4266  {
4267  return m_contrastDistortion;
4268  }
4269 
4270  template<typename T,
4271  typename std::enable_if<std::is_same<T,
4272  Settings::Processing::Filters::Experimental::
4273  ContrastDistortion::Correction>::value,
4274  int>::type = 0>
4276  {
4277  return m_contrastDistortion
4279  }
4280 
4281  template<typename T,
4282  typename std::enable_if<std::is_same<T,
4283  Settings::Processing::Filters::Experimental::
4284  ContrastDistortion::Correction::Enabled>::value,
4285  int>::type = 0>
4287  const
4288  {
4289  return m_contrastDistortion.get<
4291  }
4292 
4293  template<typename T,
4294  typename std::enable_if<std::is_same<T,
4295  Settings::Processing::Filters::Experimental::
4296  ContrastDistortion::Correction::Strength>::value,
4297  int>::type = 0>
4299  const
4300  {
4301  return m_contrastDistortion.get<
4303  }
4304 
4305  template<
4306  typename T,
4307  typename std::enable_if<
4308  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
4309  value,
4310  int>::type = 0>
4312  {
4313  return m_contrastDistortion
4315  }
4316 
4317  template<typename T,
4318  typename std::enable_if<std::is_same<T,
4319  Settings::Processing::Filters::Experimental::
4320  ContrastDistortion::Removal::Enabled>::value,
4321  int>::type = 0>
4323  {
4324  return m_contrastDistortion
4326  }
4327 
4328  template<typename T,
4329  typename std::enable_if<std::is_same<T,
4330  Settings::Processing::Filters::Experimental::
4331  ContrastDistortion::Removal::Threshold>::value,
4332  int>::type = 0>
4334  const
4335  {
4336  return m_contrastDistortion
4338  }
4339 
4340  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4342  {
4343  return m_contrastDistortion;
4344  }
4345 
4347  template<typename F>
4348  void forEach(const F &f) const
4349  {
4350  f(m_contrastDistortion);
4351  }
4352 
4354  template<typename F>
4355  void forEach(const F &f)
4356  {
4357  f(m_contrastDistortion);
4358  }
4359 
4361  bool operator==(const Experimental &other) const;
4362 
4364  bool operator!=(const Experimental &other) const;
4365 
4367  std::string toString() const;
4368 
4370  friend std::ostream &operator<<(std::ostream &stream, const Experimental &value)
4371  {
4372  return stream << value.toString();
4373  }
4374 
4375  private:
4376  void setFromString(const std::string &value);
4377 
4378  void setFromString(const std::string &fullPath, const std::string &value);
4379 
4380  std::string getString(const std::string &fullPath) const;
4381 
4382  ContrastDistortion m_contrastDistortion;
4383 
4384  friend struct DataModel::Detail::Befriend<Experimental>;
4385  };
4386 
4389  {
4390  public:
4393 
4395  static constexpr const char *path{ "Processing/Filters/Noise" };
4396 
4398  static constexpr const char *name{ "Noise" };
4399 
4401  static constexpr const char *description{
4402  R"description(Contains a filter that removes points with low signal-to-noise ratio (SNR))description"
4403  };
4404 
4407  {
4408  public:
4411 
4413  static constexpr const char *path{ "Processing/Filters/Noise/Removal" };
4414 
4416  static constexpr const char *name{ "Removal" };
4417 
4419  static constexpr const char *description{
4420  R"description(Discard points with signal-to-noise ratio (SNR) values below a threshold)description"
4421  };
4422 
4425  {
4426  public:
4429 
4431  static constexpr const char *path{ "Processing/Filters/Noise/Removal/Enabled" };
4432 
4434  static constexpr const char *name{ "Enabled" };
4435 
4437  static constexpr const char *description{
4438  R"description(Enable or disable the SNR filter)description"
4439  };
4440 
4442  using ValueType = bool;
4443  static const Enabled yes;
4444  static const Enabled no;
4445 
4447  static std::set<bool> validValues()
4448  {
4449  return { false, true };
4450  }
4451 
4453  Enabled() = default;
4454 
4456  explicit constexpr Enabled(bool value)
4457  : m_opt{ value }
4458  {}
4459 
4464  bool value() const;
4465 
4467  bool hasValue() const;
4468 
4470  void reset();
4471 
4473  std::string toString() const;
4474 
4476  bool operator==(const Enabled &other) const
4477  {
4478  return m_opt == other.m_opt;
4479  }
4480 
4482  bool operator!=(const Enabled &other) const
4483  {
4484  return m_opt != other.m_opt;
4485  }
4486 
4488  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
4489  {
4490  return stream << value.toString();
4491  }
4492 
4493  private:
4494  void setFromString(const std::string &value);
4495 
4496  Zivid::DataModel::Detail::Optional<bool> m_opt;
4497 
4498  friend struct DataModel::Detail::Befriend<Enabled>;
4499  };
4500 
4503  {
4504  public:
4507 
4509  static constexpr const char *path{ "Processing/Filters/Noise/Removal/Threshold" };
4510 
4512  static constexpr const char *name{ "Threshold" };
4513 
4515  static constexpr const char *description{
4516  R"description(Discard points with signal-to-noise ratio (SNR) below the given value)description"
4517  };
4518 
4520  using ValueType = double;
4521 
4523  static constexpr Range<double> validRange()
4524  {
4525  return { 0.0, 100.0 };
4526  }
4527 
4529  Threshold() = default;
4530 
4532  explicit constexpr Threshold(double value)
4533  : m_opt{ verifyValue(value) }
4534  {}
4535 
4540  double value() const;
4541 
4543  bool hasValue() const;
4544 
4546  void reset();
4547 
4549  std::string toString() const;
4550 
4552  bool operator==(const Threshold &other) const
4553  {
4554  return m_opt == other.m_opt;
4555  }
4556 
4558  bool operator!=(const Threshold &other) const
4559  {
4560  return m_opt != other.m_opt;
4561  }
4562 
4564  bool operator<(const Threshold &other) const
4565  {
4566  return m_opt < other.m_opt;
4567  }
4568 
4570  bool operator>(const Threshold &other) const
4571  {
4572  return m_opt > other.m_opt;
4573  }
4574 
4576  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
4577  {
4578  return stream << value.toString();
4579  }
4580 
4581  private:
4582  void setFromString(const std::string &value);
4583 
4584  constexpr ValueType verifyValue(const ValueType &value) const
4585  {
4586  return validRange().isInRange(value)
4587  ? value
4588  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
4589  + " } is not in range ["
4590  + std::to_string(validRange().min()) + ", "
4591  + std::to_string(validRange().max()) + "]" };
4592  }
4593 
4594  Zivid::DataModel::Detail::Optional<double> m_opt;
4595 
4596  friend struct DataModel::Detail::Befriend<Threshold>;
4597  };
4598 
4601 
4604 
4617 #ifndef NO_DOC
4618  template<typename... Args,
4619  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4620  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4621  Descendants,
4622  typename std::decay<Args>::type...>::value,
4623  int>::type = 0>
4624 #else
4625  template<typename... Args>
4626 #endif
4627  explicit Removal(Args &&...args)
4628  {
4629  using namespace Zivid::Detail::TypeTraits;
4630 
4631  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4632  "Found duplicate types among the arguments passed to Removal(...). "
4633  "Types should be listed at most once.");
4634 
4635  set(std::forward<Args>(args)...);
4636  }
4637 
4649 #ifndef NO_DOC
4650  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4651 #else
4652  template<typename... Args>
4653 #endif
4654  void set(Args &&...args)
4655  {
4656  using namespace Zivid::Detail::TypeTraits;
4657 
4658  using AllArgsAreDescendantNodes =
4659  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4660  static_assert(AllArgsAreDescendantNodes::value,
4661  "All arguments passed to set(...) must be descendant nodes.");
4662 
4663  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4664  "Found duplicate types among the arguments passed to set(...). "
4665  "Types should be listed at most once.");
4666 
4667  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4668  }
4669 
4682 #ifndef NO_DOC
4683  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4684 #else
4685  template<typename... Args>
4686 #endif
4687  Removal copyWith(Args &&...args) const
4688  {
4689  using namespace Zivid::Detail::TypeTraits;
4690 
4691  using AllArgsAreDescendantNodes =
4692  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4693  static_assert(AllArgsAreDescendantNodes::value,
4694  "All arguments passed to copyWith(...) must be descendant nodes.");
4695 
4696  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4697  "Found duplicate types among the arguments passed to copyWith(...). "
4698  "Types should be listed at most once.");
4699 
4700  auto copy{ *this };
4701  copy.set(std::forward<Args>(args)...);
4702  return copy;
4703  }
4704 
4706  const Enabled &isEnabled() const
4707  {
4708  return m_enabled;
4709  }
4710 
4713  {
4714  return m_enabled;
4715  }
4716 
4718  Removal &set(const Enabled &value)
4719  {
4720  m_enabled = value;
4721  return *this;
4722  }
4723 
4725  const Threshold &threshold() const
4726  {
4727  return m_threshold;
4728  }
4729 
4732  {
4733  return m_threshold;
4734  }
4735 
4737  Removal &set(const Threshold &value)
4738  {
4739  m_threshold = value;
4740  return *this;
4741  }
4742 
4743  template<typename T,
4744  typename std::enable_if<
4745  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
4746  int>::type = 0>
4748  {
4749  return m_enabled;
4750  }
4751 
4752  template<typename T,
4753  typename std::enable_if<
4754  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
4755  int>::type = 0>
4757  {
4758  return m_threshold;
4759  }
4760 
4761  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4763  {
4764  return m_enabled;
4765  }
4766 
4767  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
4769  {
4770  return m_threshold;
4771  }
4772 
4774  template<typename F>
4775  void forEach(const F &f) const
4776  {
4777  f(m_enabled);
4778  f(m_threshold);
4779  }
4780 
4782  template<typename F>
4783  void forEach(const F &f)
4784  {
4785  f(m_enabled);
4786  f(m_threshold);
4787  }
4788 
4790  bool operator==(const Removal &other) const;
4791 
4793  bool operator!=(const Removal &other) const;
4794 
4796  std::string toString() const;
4797 
4799  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
4800  {
4801  return stream << value.toString();
4802  }
4803 
4804  private:
4805  void setFromString(const std::string &value);
4806 
4807  void setFromString(const std::string &fullPath, const std::string &value);
4808 
4809  std::string getString(const std::string &fullPath) const;
4810 
4811  Enabled m_enabled;
4812  Threshold m_threshold;
4813 
4814  friend struct DataModel::Detail::Befriend<Removal>;
4815  };
4816 
4820 
4823 
4837 #ifndef NO_DOC
4838  template<typename... Args,
4839  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
4840  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
4841  Descendants,
4842  typename std::decay<Args>::type...>::value,
4843  int>::type = 0>
4844 #else
4845  template<typename... Args>
4846 #endif
4847  explicit Noise(Args &&...args)
4848  {
4849  using namespace Zivid::Detail::TypeTraits;
4850 
4851  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4852  "Found duplicate types among the arguments passed to Noise(...). "
4853  "Types should be listed at most once.");
4854 
4855  set(std::forward<Args>(args)...);
4856  }
4857 
4870 #ifndef NO_DOC
4871  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
4872 #else
4873  template<typename... Args>
4874 #endif
4875  void set(Args &&...args)
4876  {
4877  using namespace Zivid::Detail::TypeTraits;
4878 
4879  using AllArgsAreDescendantNodes =
4880  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4881  static_assert(AllArgsAreDescendantNodes::value,
4882  "All arguments passed to set(...) must be descendant nodes.");
4883 
4884  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4885  "Found duplicate types among the arguments passed to set(...). "
4886  "Types should be listed at most once.");
4887 
4888  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
4889  }
4890 
4904 #ifndef NO_DOC
4905  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
4906 #else
4907  template<typename... Args>
4908 #endif
4909  Noise copyWith(Args &&...args) const
4910  {
4911  using namespace Zivid::Detail::TypeTraits;
4912 
4913  using AllArgsAreDescendantNodes =
4914  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
4915  static_assert(AllArgsAreDescendantNodes::value,
4916  "All arguments passed to copyWith(...) must be descendant nodes.");
4917 
4918  static_assert(AllArgsDecayedAreUnique<Args...>::value,
4919  "Found duplicate types among the arguments passed to copyWith(...). "
4920  "Types should be listed at most once.");
4921 
4922  auto copy{ *this };
4923  copy.set(std::forward<Args>(args)...);
4924  return copy;
4925  }
4926 
4928  const Removal &removal() const
4929  {
4930  return m_removal;
4931  }
4932 
4935  {
4936  return m_removal;
4937  }
4938 
4940  Noise &set(const Removal &value)
4941  {
4942  m_removal = value;
4943  return *this;
4944  }
4945 
4947  Noise &set(const Removal::Enabled &value)
4948  {
4949  m_removal.set(value);
4950  return *this;
4951  }
4952 
4955  {
4956  m_removal.set(value);
4957  return *this;
4958  }
4959 
4960  template<
4961  typename T,
4962  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
4963  int>::type = 0>
4965  {
4966  return m_removal;
4967  }
4968 
4969  template<typename T,
4970  typename std::enable_if<
4971  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
4972  int>::type = 0>
4974  {
4976  }
4977 
4978  template<typename T,
4979  typename std::enable_if<
4980  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
4981  int>::type = 0>
4983  {
4985  }
4986 
4987  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
4989  {
4990  return m_removal;
4991  }
4992 
4994  template<typename F>
4995  void forEach(const F &f) const
4996  {
4997  f(m_removal);
4998  }
4999 
5001  template<typename F>
5002  void forEach(const F &f)
5003  {
5004  f(m_removal);
5005  }
5006 
5008  bool operator==(const Noise &other) const;
5009 
5011  bool operator!=(const Noise &other) const;
5012 
5014  std::string toString() const;
5015 
5017  friend std::ostream &operator<<(std::ostream &stream, const Noise &value)
5018  {
5019  return stream << value.toString();
5020  }
5021 
5022  private:
5023  void setFromString(const std::string &value);
5024 
5025  void setFromString(const std::string &fullPath, const std::string &value);
5026 
5027  std::string getString(const std::string &fullPath) const;
5028 
5029  Removal m_removal;
5030 
5031  friend struct DataModel::Detail::Befriend<Noise>;
5032  };
5033 
5036  {
5037  public:
5040 
5042  static constexpr const char *path{ "Processing/Filters/Outlier" };
5043 
5045  static constexpr const char *name{ "Outlier" };
5046 
5048  static constexpr const char *description{
5049  R"description(Contains a filter that removes points with large Euclidean distance to neighboring points)description"
5050  };
5051 
5054  {
5055  public:
5058 
5060  static constexpr const char *path{ "Processing/Filters/Outlier/Removal" };
5061 
5063  static constexpr const char *name{ "Removal" };
5064 
5066  static constexpr const char *description{
5067  R"description(Discard point if Euclidean distance to neighboring points is above a threshold)description"
5068  };
5069 
5072  {
5073  public:
5076 
5078  static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Enabled" };
5079 
5081  static constexpr const char *name{ "Enabled" };
5082 
5084  static constexpr const char *description{
5085  R"description(Enable or disable the outlier filter)description"
5086  };
5087 
5089  using ValueType = bool;
5090  static const Enabled yes;
5091  static const Enabled no;
5092 
5094  static std::set<bool> validValues()
5095  {
5096  return { false, true };
5097  }
5098 
5100  Enabled() = default;
5101 
5103  explicit constexpr Enabled(bool value)
5104  : m_opt{ value }
5105  {}
5106 
5111  bool value() const;
5112 
5114  bool hasValue() const;
5115 
5117  void reset();
5118 
5120  std::string toString() const;
5121 
5123  bool operator==(const Enabled &other) const
5124  {
5125  return m_opt == other.m_opt;
5126  }
5127 
5129  bool operator!=(const Enabled &other) const
5130  {
5131  return m_opt != other.m_opt;
5132  }
5133 
5135  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5136  {
5137  return stream << value.toString();
5138  }
5139 
5140  private:
5141  void setFromString(const std::string &value);
5142 
5143  Zivid::DataModel::Detail::Optional<bool> m_opt;
5144 
5145  friend struct DataModel::Detail::Befriend<Enabled>;
5146  };
5147 
5150  {
5151  public:
5154 
5156  static constexpr const char *path{ "Processing/Filters/Outlier/Removal/Threshold" };
5157 
5159  static constexpr const char *name{ "Threshold" };
5160 
5162  static constexpr const char *description{
5163  R"description(Discard point if Euclidean distance to neighboring points is above the given value)description"
5164  };
5165 
5167  using ValueType = double;
5168 
5170  static constexpr Range<double> validRange()
5171  {
5172  return { 0.0, 100.0 };
5173  }
5174 
5176  Threshold() = default;
5177 
5179  explicit constexpr Threshold(double value)
5180  : m_opt{ verifyValue(value) }
5181  {}
5182 
5187  double value() const;
5188 
5190  bool hasValue() const;
5191 
5193  void reset();
5194 
5196  std::string toString() const;
5197 
5199  bool operator==(const Threshold &other) const
5200  {
5201  return m_opt == other.m_opt;
5202  }
5203 
5205  bool operator!=(const Threshold &other) const
5206  {
5207  return m_opt != other.m_opt;
5208  }
5209 
5211  bool operator<(const Threshold &other) const
5212  {
5213  return m_opt < other.m_opt;
5214  }
5215 
5217  bool operator>(const Threshold &other) const
5218  {
5219  return m_opt > other.m_opt;
5220  }
5221 
5223  friend std::ostream &operator<<(std::ostream &stream, const Threshold &value)
5224  {
5225  return stream << value.toString();
5226  }
5227 
5228  private:
5229  void setFromString(const std::string &value);
5230 
5231  constexpr ValueType verifyValue(const ValueType &value) const
5232  {
5233  return validRange().isInRange(value)
5234  ? value
5235  : throw std::out_of_range{ "Threshold{ " + std::to_string(value)
5236  + " } is not in range ["
5237  + std::to_string(validRange().min()) + ", "
5238  + std::to_string(validRange().max()) + "]" };
5239  }
5240 
5241  Zivid::DataModel::Detail::Optional<double> m_opt;
5242 
5243  friend struct DataModel::Detail::Befriend<Threshold>;
5244  };
5245 
5248 
5251 
5264 #ifndef NO_DOC
5265  template<typename... Args,
5266  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5267  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5268  Descendants,
5269  typename std::decay<Args>::type...>::value,
5270  int>::type = 0>
5271 #else
5272  template<typename... Args>
5273 #endif
5274  explicit Removal(Args &&...args)
5275  {
5276  using namespace Zivid::Detail::TypeTraits;
5277 
5278  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5279  "Found duplicate types among the arguments passed to Removal(...). "
5280  "Types should be listed at most once.");
5281 
5282  set(std::forward<Args>(args)...);
5283  }
5284 
5296 #ifndef NO_DOC
5297  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5298 #else
5299  template<typename... Args>
5300 #endif
5301  void set(Args &&...args)
5302  {
5303  using namespace Zivid::Detail::TypeTraits;
5304 
5305  using AllArgsAreDescendantNodes =
5306  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5307  static_assert(AllArgsAreDescendantNodes::value,
5308  "All arguments passed to set(...) must be descendant nodes.");
5309 
5310  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5311  "Found duplicate types among the arguments passed to set(...). "
5312  "Types should be listed at most once.");
5313 
5314  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5315  }
5316 
5329 #ifndef NO_DOC
5330  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5331 #else
5332  template<typename... Args>
5333 #endif
5334  Removal copyWith(Args &&...args) const
5335  {
5336  using namespace Zivid::Detail::TypeTraits;
5337 
5338  using AllArgsAreDescendantNodes =
5339  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5340  static_assert(AllArgsAreDescendantNodes::value,
5341  "All arguments passed to copyWith(...) must be descendant nodes.");
5342 
5343  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5344  "Found duplicate types among the arguments passed to copyWith(...). "
5345  "Types should be listed at most once.");
5346 
5347  auto copy{ *this };
5348  copy.set(std::forward<Args>(args)...);
5349  return copy;
5350  }
5351 
5353  const Enabled &isEnabled() const
5354  {
5355  return m_enabled;
5356  }
5357 
5360  {
5361  return m_enabled;
5362  }
5363 
5365  Removal &set(const Enabled &value)
5366  {
5367  m_enabled = value;
5368  return *this;
5369  }
5370 
5372  const Threshold &threshold() const
5373  {
5374  return m_threshold;
5375  }
5376 
5379  {
5380  return m_threshold;
5381  }
5382 
5384  Removal &set(const Threshold &value)
5385  {
5386  m_threshold = value;
5387  return *this;
5388  }
5389 
5390  template<typename T,
5391  typename std::enable_if<
5392  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5393  int>::type = 0>
5395  {
5396  return m_enabled;
5397  }
5398 
5399  template<typename T,
5400  typename std::enable_if<
5401  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5402  int>::type = 0>
5404  {
5405  return m_threshold;
5406  }
5407 
5408  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5410  {
5411  return m_enabled;
5412  }
5413 
5414  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
5416  {
5417  return m_threshold;
5418  }
5419 
5421  template<typename F>
5422  void forEach(const F &f) const
5423  {
5424  f(m_enabled);
5425  f(m_threshold);
5426  }
5427 
5429  template<typename F>
5430  void forEach(const F &f)
5431  {
5432  f(m_enabled);
5433  f(m_threshold);
5434  }
5435 
5437  bool operator==(const Removal &other) const;
5438 
5440  bool operator!=(const Removal &other) const;
5441 
5443  std::string toString() const;
5444 
5446  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5447  {
5448  return stream << value.toString();
5449  }
5450 
5451  private:
5452  void setFromString(const std::string &value);
5453 
5454  void setFromString(const std::string &fullPath, const std::string &value);
5455 
5456  std::string getString(const std::string &fullPath) const;
5457 
5458  Enabled m_enabled;
5459  Threshold m_threshold;
5460 
5461  friend struct DataModel::Detail::Befriend<Removal>;
5462  };
5463 
5467 
5470 
5484 #ifndef NO_DOC
5485  template<typename... Args,
5486  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5487  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5488  Descendants,
5489  typename std::decay<Args>::type...>::value,
5490  int>::type = 0>
5491 #else
5492  template<typename... Args>
5493 #endif
5494  explicit Outlier(Args &&...args)
5495  {
5496  using namespace Zivid::Detail::TypeTraits;
5497 
5498  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5499  "Found duplicate types among the arguments passed to Outlier(...). "
5500  "Types should be listed at most once.");
5501 
5502  set(std::forward<Args>(args)...);
5503  }
5504 
5517 #ifndef NO_DOC
5518  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5519 #else
5520  template<typename... Args>
5521 #endif
5522  void set(Args &&...args)
5523  {
5524  using namespace Zivid::Detail::TypeTraits;
5525 
5526  using AllArgsAreDescendantNodes =
5527  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5528  static_assert(AllArgsAreDescendantNodes::value,
5529  "All arguments passed to set(...) must be descendant nodes.");
5530 
5531  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5532  "Found duplicate types among the arguments passed to set(...). "
5533  "Types should be listed at most once.");
5534 
5535  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5536  }
5537 
5551 #ifndef NO_DOC
5552  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5553 #else
5554  template<typename... Args>
5555 #endif
5556  Outlier copyWith(Args &&...args) const
5557  {
5558  using namespace Zivid::Detail::TypeTraits;
5559 
5560  using AllArgsAreDescendantNodes =
5561  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5562  static_assert(AllArgsAreDescendantNodes::value,
5563  "All arguments passed to copyWith(...) must be descendant nodes.");
5564 
5565  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5566  "Found duplicate types among the arguments passed to copyWith(...). "
5567  "Types should be listed at most once.");
5568 
5569  auto copy{ *this };
5570  copy.set(std::forward<Args>(args)...);
5571  return copy;
5572  }
5573 
5575  const Removal &removal() const
5576  {
5577  return m_removal;
5578  }
5579 
5582  {
5583  return m_removal;
5584  }
5585 
5587  Outlier &set(const Removal &value)
5588  {
5589  m_removal = value;
5590  return *this;
5591  }
5592 
5595  {
5596  m_removal.set(value);
5597  return *this;
5598  }
5599 
5602  {
5603  m_removal.set(value);
5604  return *this;
5605  }
5606 
5607  template<
5608  typename T,
5609  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
5610  int>::type = 0>
5612  {
5613  return m_removal;
5614  }
5615 
5616  template<typename T,
5617  typename std::enable_if<
5618  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
5619  int>::type = 0>
5621  {
5623  }
5624 
5625  template<typename T,
5626  typename std::enable_if<
5627  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
5628  int>::type = 0>
5630  {
5632  }
5633 
5634  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5636  {
5637  return m_removal;
5638  }
5639 
5641  template<typename F>
5642  void forEach(const F &f) const
5643  {
5644  f(m_removal);
5645  }
5646 
5648  template<typename F>
5649  void forEach(const F &f)
5650  {
5651  f(m_removal);
5652  }
5653 
5655  bool operator==(const Outlier &other) const;
5656 
5658  bool operator!=(const Outlier &other) const;
5659 
5661  std::string toString() const;
5662 
5664  friend std::ostream &operator<<(std::ostream &stream, const Outlier &value)
5665  {
5666  return stream << value.toString();
5667  }
5668 
5669  private:
5670  void setFromString(const std::string &value);
5671 
5672  void setFromString(const std::string &fullPath, const std::string &value);
5673 
5674  std::string getString(const std::string &fullPath) const;
5675 
5676  Removal m_removal;
5677 
5678  friend struct DataModel::Detail::Befriend<Outlier>;
5679  };
5680 
5683  {
5684  public:
5687 
5689  static constexpr const char *path{ "Processing/Filters/Reflection" };
5690 
5692  static constexpr const char *name{ "Reflection" };
5693 
5695  static constexpr const char *description{
5696  R"description(Contains a filter that removes points likely introduced by reflections (useful for shiny materials))description"
5697  };
5698 
5701  {
5702  public:
5705 
5707  static constexpr const char *path{ "Processing/Filters/Reflection/Removal" };
5708 
5710  static constexpr const char *name{ "Removal" };
5711 
5713  static constexpr const char *description{
5714  R"description(Discard points likely introduced by reflections (useful for shiny materials))description"
5715  };
5716 
5719  {
5720  public:
5723 
5725  static constexpr const char *path{ "Processing/Filters/Reflection/Removal/Enabled" };
5726 
5728  static constexpr const char *name{ "Enabled" };
5729 
5731  static constexpr const char *description{
5732  R"description(Enable or disable the reflection filter. Note that this filter is computationally intensive and may affect the frame rate)description"
5733  };
5734 
5736  using ValueType = bool;
5737  static const Enabled yes;
5738  static const Enabled no;
5739 
5741  static std::set<bool> validValues()
5742  {
5743  return { false, true };
5744  }
5745 
5747  Enabled() = default;
5748 
5750  explicit constexpr Enabled(bool value)
5751  : m_opt{ value }
5752  {}
5753 
5758  bool value() const;
5759 
5761  bool hasValue() const;
5762 
5764  void reset();
5765 
5767  std::string toString() const;
5768 
5770  bool operator==(const Enabled &other) const
5771  {
5772  return m_opt == other.m_opt;
5773  }
5774 
5776  bool operator!=(const Enabled &other) const
5777  {
5778  return m_opt != other.m_opt;
5779  }
5780 
5782  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
5783  {
5784  return stream << value.toString();
5785  }
5786 
5787  private:
5788  void setFromString(const std::string &value);
5789 
5790  Zivid::DataModel::Detail::Optional<bool> m_opt;
5791 
5792  friend struct DataModel::Detail::Befriend<Enabled>;
5793  };
5794 
5795  using Descendants = std::tuple<Settings::Processing::Filters::Reflection::Removal::Enabled>;
5796 
5799 
5811 #ifndef NO_DOC
5812  template<typename... Args,
5813  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5814  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5815  Descendants,
5816  typename std::decay<Args>::type...>::value,
5817  int>::type = 0>
5818 #else
5819  template<typename... Args>
5820 #endif
5821  explicit Removal(Args &&...args)
5822  {
5823  using namespace Zivid::Detail::TypeTraits;
5824 
5825  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5826  "Found duplicate types among the arguments passed to Removal(...). "
5827  "Types should be listed at most once.");
5828 
5829  set(std::forward<Args>(args)...);
5830  }
5831 
5842 #ifndef NO_DOC
5843  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
5844 #else
5845  template<typename... Args>
5846 #endif
5847  void set(Args &&...args)
5848  {
5849  using namespace Zivid::Detail::TypeTraits;
5850 
5851  using AllArgsAreDescendantNodes =
5852  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5853  static_assert(AllArgsAreDescendantNodes::value,
5854  "All arguments passed to set(...) must be descendant nodes.");
5855 
5856  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5857  "Found duplicate types among the arguments passed to set(...). "
5858  "Types should be listed at most once.");
5859 
5860  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
5861  }
5862 
5874 #ifndef NO_DOC
5875  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
5876 #else
5877  template<typename... Args>
5878 #endif
5879  Removal copyWith(Args &&...args) const
5880  {
5881  using namespace Zivid::Detail::TypeTraits;
5882 
5883  using AllArgsAreDescendantNodes =
5884  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
5885  static_assert(AllArgsAreDescendantNodes::value,
5886  "All arguments passed to copyWith(...) must be descendant nodes.");
5887 
5888  static_assert(AllArgsDecayedAreUnique<Args...>::value,
5889  "Found duplicate types among the arguments passed to copyWith(...). "
5890  "Types should be listed at most once.");
5891 
5892  auto copy{ *this };
5893  copy.set(std::forward<Args>(args)...);
5894  return copy;
5895  }
5896 
5898  const Enabled &isEnabled() const
5899  {
5900  return m_enabled;
5901  }
5902 
5905  {
5906  return m_enabled;
5907  }
5908 
5910  Removal &set(const Enabled &value)
5911  {
5912  m_enabled = value;
5913  return *this;
5914  }
5915 
5916  template<
5917  typename T,
5918  typename std::enable_if<
5919  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
5920  int>::type = 0>
5922  {
5923  return m_enabled;
5924  }
5925 
5926  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
5928  {
5929  return m_enabled;
5930  }
5931 
5933  template<typename F>
5934  void forEach(const F &f) const
5935  {
5936  f(m_enabled);
5937  }
5938 
5940  template<typename F>
5941  void forEach(const F &f)
5942  {
5943  f(m_enabled);
5944  }
5945 
5947  bool operator==(const Removal &other) const;
5948 
5950  bool operator!=(const Removal &other) const;
5951 
5953  std::string toString() const;
5954 
5956  friend std::ostream &operator<<(std::ostream &stream, const Removal &value)
5957  {
5958  return stream << value.toString();
5959  }
5960 
5961  private:
5962  void setFromString(const std::string &value);
5963 
5964  void setFromString(const std::string &fullPath, const std::string &value);
5965 
5966  std::string getString(const std::string &fullPath) const;
5967 
5968  Enabled m_enabled;
5969 
5970  friend struct DataModel::Detail::Befriend<Removal>;
5971  };
5972 
5975 
5978 
5991 #ifndef NO_DOC
5992  template<typename... Args,
5993  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
5994  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
5995  Descendants,
5996  typename std::decay<Args>::type...>::value,
5997  int>::type = 0>
5998 #else
5999  template<typename... Args>
6000 #endif
6001  explicit Reflection(Args &&...args)
6002  {
6003  using namespace Zivid::Detail::TypeTraits;
6004 
6005  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6006  "Found duplicate types among the arguments passed to Reflection(...). "
6007  "Types should be listed at most once.");
6008 
6009  set(std::forward<Args>(args)...);
6010  }
6011 
6023 #ifndef NO_DOC
6024  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6025 #else
6026  template<typename... Args>
6027 #endif
6028  void set(Args &&...args)
6029  {
6030  using namespace Zivid::Detail::TypeTraits;
6031 
6032  using AllArgsAreDescendantNodes =
6033  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6034  static_assert(AllArgsAreDescendantNodes::value,
6035  "All arguments passed to set(...) must be descendant nodes.");
6036 
6037  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6038  "Found duplicate types among the arguments passed to set(...). "
6039  "Types should be listed at most once.");
6040 
6041  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6042  }
6043 
6056 #ifndef NO_DOC
6057  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6058 #else
6059  template<typename... Args>
6060 #endif
6061  Reflection copyWith(Args &&...args) const
6062  {
6063  using namespace Zivid::Detail::TypeTraits;
6064 
6065  using AllArgsAreDescendantNodes =
6066  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6067  static_assert(AllArgsAreDescendantNodes::value,
6068  "All arguments passed to copyWith(...) must be descendant nodes.");
6069 
6070  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6071  "Found duplicate types among the arguments passed to copyWith(...). "
6072  "Types should be listed at most once.");
6073 
6074  auto copy{ *this };
6075  copy.set(std::forward<Args>(args)...);
6076  return copy;
6077  }
6078 
6080  const Removal &removal() const
6081  {
6082  return m_removal;
6083  }
6084 
6087  {
6088  return m_removal;
6089  }
6090 
6092  Reflection &set(const Removal &value)
6093  {
6094  m_removal = value;
6095  return *this;
6096  }
6097 
6100  {
6101  m_removal.set(value);
6102  return *this;
6103  }
6104 
6105  template<typename T,
6106  typename std::enable_if<
6107  std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
6108  int>::type = 0>
6110  {
6111  return m_removal;
6112  }
6113 
6114  template<typename T,
6115  typename std::enable_if<
6116  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
6117  int>::type = 0>
6119  {
6121  }
6122 
6123  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6125  {
6126  return m_removal;
6127  }
6128 
6130  template<typename F>
6131  void forEach(const F &f) const
6132  {
6133  f(m_removal);
6134  }
6135 
6137  template<typename F>
6138  void forEach(const F &f)
6139  {
6140  f(m_removal);
6141  }
6142 
6144  bool operator==(const Reflection &other) const;
6145 
6147  bool operator!=(const Reflection &other) const;
6148 
6150  std::string toString() const;
6151 
6153  friend std::ostream &operator<<(std::ostream &stream, const Reflection &value)
6154  {
6155  return stream << value.toString();
6156  }
6157 
6158  private:
6159  void setFromString(const std::string &value);
6160 
6161  void setFromString(const std::string &fullPath, const std::string &value);
6162 
6163  std::string getString(const std::string &fullPath) const;
6164 
6165  Removal m_removal;
6166 
6167  friend struct DataModel::Detail::Befriend<Reflection>;
6168  };
6169 
6172  {
6173  public:
6176 
6178  static constexpr const char *path{ "Processing/Filters/Smoothing" };
6179 
6181  static constexpr const char *name{ "Smoothing" };
6182 
6184  static constexpr const char *description{ R"description(Smoothing filters)description" };
6185 
6188  {
6189  public:
6192 
6194  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian" };
6195 
6197  static constexpr const char *name{ "Gaussian" };
6198 
6200  static constexpr const char *description{
6201  R"description(Gaussian smoothing of the point cloud)description"
6202  };
6203 
6206  {
6207  public:
6210 
6212  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Enabled" };
6213 
6215  static constexpr const char *name{ "Enabled" };
6216 
6218  static constexpr const char *description{
6219  R"description(Enable or disable the smoothing filter)description"
6220  };
6221 
6223  using ValueType = bool;
6224  static const Enabled yes;
6225  static const Enabled no;
6226 
6228  static std::set<bool> validValues()
6229  {
6230  return { false, true };
6231  }
6232 
6234  Enabled() = default;
6235 
6237  explicit constexpr Enabled(bool value)
6238  : m_opt{ value }
6239  {}
6240 
6245  bool value() const;
6246 
6248  bool hasValue() const;
6249 
6251  void reset();
6252 
6254  std::string toString() const;
6255 
6257  bool operator==(const Enabled &other) const
6258  {
6259  return m_opt == other.m_opt;
6260  }
6261 
6263  bool operator!=(const Enabled &other) const
6264  {
6265  return m_opt != other.m_opt;
6266  }
6267 
6269  friend std::ostream &operator<<(std::ostream &stream, const Enabled &value)
6270  {
6271  return stream << value.toString();
6272  }
6273 
6274  private:
6275  void setFromString(const std::string &value);
6276 
6277  Zivid::DataModel::Detail::Optional<bool> m_opt;
6278 
6279  friend struct DataModel::Detail::Befriend<Enabled>;
6280  };
6281 
6284  {
6285  public:
6288 
6290  static constexpr const char *path{ "Processing/Filters/Smoothing/Gaussian/Sigma" };
6291 
6293  static constexpr const char *name{ "Sigma" };
6294 
6296  static constexpr const char *description{
6297  R"description(Higher values result in smoother point clouds (Standard deviation of the filter coefficients))description"
6298  };
6299 
6301  using ValueType = double;
6302 
6304  static constexpr Range<double> validRange()
6305  {
6306  return { 0.5, 5 };
6307  }
6308 
6310  Sigma() = default;
6311 
6313  explicit constexpr Sigma(double value)
6314  : m_opt{ verifyValue(value) }
6315  {}
6316 
6321  double value() const;
6322 
6324  bool hasValue() const;
6325 
6327  void reset();
6328 
6330  std::string toString() const;
6331 
6333  bool operator==(const Sigma &other) const
6334  {
6335  return m_opt == other.m_opt;
6336  }
6337 
6339  bool operator!=(const Sigma &other) const
6340  {
6341  return m_opt != other.m_opt;
6342  }
6343 
6345  bool operator<(const Sigma &other) const
6346  {
6347  return m_opt < other.m_opt;
6348  }
6349 
6351  bool operator>(const Sigma &other) const
6352  {
6353  return m_opt > other.m_opt;
6354  }
6355 
6357  friend std::ostream &operator<<(std::ostream &stream, const Sigma &value)
6358  {
6359  return stream << value.toString();
6360  }
6361 
6362  private:
6363  void setFromString(const std::string &value);
6364 
6365  constexpr ValueType verifyValue(const ValueType &value) const
6366  {
6367  return validRange().isInRange(value)
6368  ? value
6369  : throw std::out_of_range{ "Sigma{ " + std::to_string(value)
6370  + " } is not in range ["
6371  + std::to_string(validRange().min()) + ", "
6372  + std::to_string(validRange().max()) + "]" };
6373  }
6374 
6375  Zivid::DataModel::Detail::Optional<double> m_opt;
6376 
6377  friend struct DataModel::Detail::Befriend<Sigma>;
6378  };
6379 
6382 
6385 
6398 #ifndef NO_DOC
6399  template<typename... Args,
6400  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6401  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
6402  Descendants,
6403  typename std::decay<Args>::type...>::value,
6404  int>::type = 0>
6405 #else
6406  template<typename... Args>
6407 #endif
6408  explicit Gaussian(Args &&...args)
6409  {
6410  using namespace Zivid::Detail::TypeTraits;
6411 
6412  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6413  "Found duplicate types among the arguments passed to Gaussian(...). "
6414  "Types should be listed at most once.");
6415 
6416  set(std::forward<Args>(args)...);
6417  }
6418 
6430 #ifndef NO_DOC
6431  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6432 #else
6433  template<typename... Args>
6434 #endif
6435  void set(Args &&...args)
6436  {
6437  using namespace Zivid::Detail::TypeTraits;
6438 
6439  using AllArgsAreDescendantNodes =
6440  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6441  static_assert(AllArgsAreDescendantNodes::value,
6442  "All arguments passed to set(...) must be descendant nodes.");
6443 
6444  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6445  "Found duplicate types among the arguments passed to set(...). "
6446  "Types should be listed at most once.");
6447 
6448  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6449  }
6450 
6463 #ifndef NO_DOC
6464  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6465 #else
6466  template<typename... Args>
6467 #endif
6468  Gaussian copyWith(Args &&...args) const
6469  {
6470  using namespace Zivid::Detail::TypeTraits;
6471 
6472  using AllArgsAreDescendantNodes =
6473  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6474  static_assert(AllArgsAreDescendantNodes::value,
6475  "All arguments passed to copyWith(...) must be descendant nodes.");
6476 
6477  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6478  "Found duplicate types among the arguments passed to copyWith(...). "
6479  "Types should be listed at most once.");
6480 
6481  auto copy{ *this };
6482  copy.set(std::forward<Args>(args)...);
6483  return copy;
6484  }
6485 
6487  const Enabled &isEnabled() const
6488  {
6489  return m_enabled;
6490  }
6491 
6494  {
6495  return m_enabled;
6496  }
6497 
6499  Gaussian &set(const Enabled &value)
6500  {
6501  m_enabled = value;
6502  return *this;
6503  }
6504 
6506  const Sigma &sigma() const
6507  {
6508  return m_sigma;
6509  }
6510 
6513  {
6514  return m_sigma;
6515  }
6516 
6518  Gaussian &set(const Sigma &value)
6519  {
6520  m_sigma = value;
6521  return *this;
6522  }
6523 
6524  template<
6525  typename T,
6526  typename std::enable_if<
6527  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
6528  int>::type = 0>
6530  {
6531  return m_enabled;
6532  }
6533 
6534  template<typename T,
6535  typename std::enable_if<
6536  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
6537  int>::type = 0>
6539  {
6540  return m_sigma;
6541  }
6542 
6543  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6545  {
6546  return m_enabled;
6547  }
6548 
6549  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
6551  {
6552  return m_sigma;
6553  }
6554 
6556  template<typename F>
6557  void forEach(const F &f) const
6558  {
6559  f(m_enabled);
6560  f(m_sigma);
6561  }
6562 
6564  template<typename F>
6565  void forEach(const F &f)
6566  {
6567  f(m_enabled);
6568  f(m_sigma);
6569  }
6570 
6572  bool operator==(const Gaussian &other) const;
6573 
6575  bool operator!=(const Gaussian &other) const;
6576 
6578  std::string toString() const;
6579 
6581  friend std::ostream &operator<<(std::ostream &stream, const Gaussian &value)
6582  {
6583  return stream << value.toString();
6584  }
6585 
6586  private:
6587  void setFromString(const std::string &value);
6588 
6589  void setFromString(const std::string &fullPath, const std::string &value);
6590 
6591  std::string getString(const std::string &fullPath) const;
6592 
6593  Enabled m_enabled;
6594  Sigma m_sigma;
6595 
6596  friend struct DataModel::Detail::Befriend<Gaussian>;
6597  };
6598 
6602 
6605 
6619 #ifndef NO_DOC
6620  template<typename... Args,
6621  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6622  typename std::enable_if<Zivid::Detail::TypeTraits::AllArgsAreInTuple<
6623  Descendants,
6624  typename std::decay<Args>::type...>::value,
6625  int>::type = 0>
6626 #else
6627  template<typename... Args>
6628 #endif
6629  explicit Smoothing(Args &&...args)
6630  {
6631  using namespace Zivid::Detail::TypeTraits;
6632 
6633  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6634  "Found duplicate types among the arguments passed to Smoothing(...). "
6635  "Types should be listed at most once.");
6636 
6637  set(std::forward<Args>(args)...);
6638  }
6639 
6652 #ifndef NO_DOC
6653  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6654 #else
6655  template<typename... Args>
6656 #endif
6657  void set(Args &&...args)
6658  {
6659  using namespace Zivid::Detail::TypeTraits;
6660 
6661  using AllArgsAreDescendantNodes =
6662  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6663  static_assert(AllArgsAreDescendantNodes::value,
6664  "All arguments passed to set(...) must be descendant nodes.");
6665 
6666  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6667  "Found duplicate types among the arguments passed to set(...). "
6668  "Types should be listed at most once.");
6669 
6670  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6671  }
6672 
6686 #ifndef NO_DOC
6687  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6688 #else
6689  template<typename... Args>
6690 #endif
6691  Smoothing copyWith(Args &&...args) const
6692  {
6693  using namespace Zivid::Detail::TypeTraits;
6694 
6695  using AllArgsAreDescendantNodes =
6696  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6697  static_assert(AllArgsAreDescendantNodes::value,
6698  "All arguments passed to copyWith(...) must be descendant nodes.");
6699 
6700  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6701  "Found duplicate types among the arguments passed to copyWith(...). "
6702  "Types should be listed at most once.");
6703 
6704  auto copy{ *this };
6705  copy.set(std::forward<Args>(args)...);
6706  return copy;
6707  }
6708 
6710  const Gaussian &gaussian() const
6711  {
6712  return m_gaussian;
6713  }
6714 
6717  {
6718  return m_gaussian;
6719  }
6720 
6722  Smoothing &set(const Gaussian &value)
6723  {
6724  m_gaussian = value;
6725  return *this;
6726  }
6727 
6730  {
6731  m_gaussian.set(value);
6732  return *this;
6733  }
6734 
6737  {
6738  m_gaussian.set(value);
6739  return *this;
6740  }
6741 
6742  template<typename T,
6743  typename std::enable_if<
6744  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
6745  int>::type = 0>
6747  {
6748  return m_gaussian;
6749  }
6750 
6751  template<typename T,
6752  typename std::enable_if<
6753  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
6754  int>::type = 0>
6756  {
6758  }
6759 
6760  template<typename T,
6761  typename std::enable_if<
6762  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
6763  int>::type = 0>
6765  {
6767  }
6768 
6769  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
6771  {
6772  return m_gaussian;
6773  }
6774 
6776  template<typename F>
6777  void forEach(const F &f) const
6778  {
6779  f(m_gaussian);
6780  }
6781 
6783  template<typename F>
6784  void forEach(const F &f)
6785  {
6786  f(m_gaussian);
6787  }
6788 
6790  bool operator==(const Smoothing &other) const;
6791 
6793  bool operator!=(const Smoothing &other) const;
6794 
6796  std::string toString() const;
6797 
6799  friend std::ostream &operator<<(std::ostream &stream, const Smoothing &value)
6800  {
6801  return stream << value.toString();
6802  }
6803 
6804  private:
6805  void setFromString(const std::string &value);
6806 
6807  void setFromString(const std::string &fullPath, const std::string &value);
6808 
6809  std::string getString(const std::string &fullPath) const;
6810 
6811  Gaussian m_gaussian;
6812 
6813  friend struct DataModel::Detail::Befriend<Smoothing>;
6814  };
6815 
6816  using Descendants =
6840 
6843 
6877 #ifndef NO_DOC
6878  template<typename... Args,
6879  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
6880  typename std::enable_if<
6881  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
6882  typename std::decay<Args>::type...>::value,
6883  int>::type = 0>
6884 #else
6885  template<typename... Args>
6886 #endif
6887  explicit Filters(Args &&...args)
6888  {
6889  using namespace Zivid::Detail::TypeTraits;
6890 
6891  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6892  "Found duplicate types among the arguments passed to Filters(...). "
6893  "Types should be listed at most once.");
6894 
6895  set(std::forward<Args>(args)...);
6896  }
6897 
6930 #ifndef NO_DOC
6931  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
6932 #else
6933  template<typename... Args>
6934 #endif
6935  void set(Args &&...args)
6936  {
6937  using namespace Zivid::Detail::TypeTraits;
6938 
6939  using AllArgsAreDescendantNodes =
6940  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6941  static_assert(AllArgsAreDescendantNodes::value,
6942  "All arguments passed to set(...) must be descendant nodes.");
6943 
6944  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6945  "Found duplicate types among the arguments passed to set(...). "
6946  "Types should be listed at most once.");
6947 
6948  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
6949  }
6950 
6984 #ifndef NO_DOC
6985  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
6986 #else
6987  template<typename... Args>
6988 #endif
6989  Filters copyWith(Args &&...args) const
6990  {
6991  using namespace Zivid::Detail::TypeTraits;
6992 
6993  using AllArgsAreDescendantNodes =
6994  AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
6995  static_assert(AllArgsAreDescendantNodes::value,
6996  "All arguments passed to copyWith(...) must be descendant nodes.");
6997 
6998  static_assert(AllArgsDecayedAreUnique<Args...>::value,
6999  "Found duplicate types among the arguments passed to copyWith(...). "
7000  "Types should be listed at most once.");
7001 
7002  auto copy{ *this };
7003  copy.set(std::forward<Args>(args)...);
7004  return copy;
7005  }
7006 
7009  {
7010  return m_experimental;
7011  }
7012 
7015  {
7016  return m_experimental;
7017  }
7018 
7020  Filters &set(const Experimental &value)
7021  {
7022  m_experimental = value;
7023  return *this;
7024  }
7025 
7028  {
7029  m_experimental.set(value);
7030  return *this;
7031  }
7032 
7035  {
7036  m_experimental.set(value);
7037  return *this;
7038  }
7039 
7042  {
7043  m_experimental.set(value);
7044  return *this;
7045  }
7046 
7049  {
7050  m_experimental.set(value);
7051  return *this;
7052  }
7053 
7056  {
7057  m_experimental.set(value);
7058  return *this;
7059  }
7060 
7063  {
7064  m_experimental.set(value);
7065  return *this;
7066  }
7067 
7070  {
7071  m_experimental.set(value);
7072  return *this;
7073  }
7074 
7076  const Noise &noise() const
7077  {
7078  return m_noise;
7079  }
7080 
7083  {
7084  return m_noise;
7085  }
7086 
7088  Filters &set(const Noise &value)
7089  {
7090  m_noise = value;
7091  return *this;
7092  }
7093 
7095  Filters &set(const Noise::Removal &value)
7096  {
7097  m_noise.set(value);
7098  return *this;
7099  }
7100 
7103  {
7104  m_noise.set(value);
7105  return *this;
7106  }
7107 
7110  {
7111  m_noise.set(value);
7112  return *this;
7113  }
7114 
7116  const Outlier &outlier() const
7117  {
7118  return m_outlier;
7119  }
7120 
7123  {
7124  return m_outlier;
7125  }
7126 
7128  Filters &set(const Outlier &value)
7129  {
7130  m_outlier = value;
7131  return *this;
7132  }
7133 
7136  {
7137  m_outlier.set(value);
7138  return *this;
7139  }
7140 
7143  {
7144  m_outlier.set(value);
7145  return *this;
7146  }
7147 
7150  {
7151  m_outlier.set(value);
7152  return *this;
7153  }
7154 
7156  const Reflection &reflection() const
7157  {
7158  return m_reflection;
7159  }
7160 
7163  {
7164  return m_reflection;
7165  }
7166 
7168  Filters &set(const Reflection &value)
7169  {
7170  m_reflection = value;
7171  return *this;
7172  }
7173 
7176  {
7177  m_reflection.set(value);
7178  return *this;
7179  }
7180 
7183  {
7184  m_reflection.set(value);
7185  return *this;
7186  }
7187 
7189  const Smoothing &smoothing() const
7190  {
7191  return m_smoothing;
7192  }
7193 
7196  {
7197  return m_smoothing;
7198  }
7199 
7201  Filters &set(const Smoothing &value)
7202  {
7203  m_smoothing = value;
7204  return *this;
7205  }
7206 
7209  {
7210  m_smoothing.set(value);
7211  return *this;
7212  }
7213 
7216  {
7217  m_smoothing.set(value);
7218  return *this;
7219  }
7220 
7223  {
7224  m_smoothing.set(value);
7225  return *this;
7226  }
7227 
7228  template<typename T,
7229  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value,
7230  int>::type = 0>
7232  {
7233  return m_experimental;
7234  }
7235 
7236  template<typename T,
7237  typename std::enable_if<
7238  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
7239  int>::type = 0>
7241  {
7243  }
7244 
7245  template<
7246  typename T,
7247  typename std::enable_if<
7248  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::
7249  value,
7250  int>::type = 0>
7252  {
7253  return m_experimental
7255  }
7256 
7257  template<typename T,
7258  typename std::enable_if<std::is_same<T,
7259  Settings::Processing::Filters::Experimental::
7260  ContrastDistortion::Correction::Enabled>::value,
7261  int>::type = 0>
7263  {
7264  return m_experimental
7266  }
7267 
7268  template<typename T,
7269  typename std::enable_if<std::is_same<T,
7270  Settings::Processing::Filters::Experimental::
7271  ContrastDistortion::Correction::Strength>::value,
7272  int>::type = 0>
7274  {
7275  return m_experimental
7277  }
7278 
7279  template<typename T,
7280  typename std::enable_if<
7281  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::
7282  value,
7283  int>::type = 0>
7285  {
7286  return m_experimental
7288  }
7289 
7290  template<typename T,
7291  typename std::enable_if<std::is_same<T,
7292  Settings::Processing::Filters::Experimental::
7293  ContrastDistortion::Removal::Enabled>::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::Removal::Threshold>::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, Settings::Processing::Filters::Noise>::value,
7314  int>::type = 0>
7316  {
7317  return m_noise;
7318  }
7319 
7320  template<typename T,
7321  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
7322  int>::type = 0>
7324  {
7326  }
7327 
7328  template<typename T,
7329  typename std::enable_if<
7330  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
7331  int>::type = 0>
7333  {
7335  }
7336 
7337  template<typename T,
7338  typename std::enable_if<
7339  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
7340  int>::type = 0>
7342  {
7344  }
7345 
7346  template<typename T,
7347  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value,
7348  int>::type = 0>
7350  {
7351  return m_outlier;
7352  }
7353 
7354  template<
7355  typename T,
7356  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
7357  int>::type = 0>
7359  {
7361  }
7362 
7363  template<typename T,
7364  typename std::enable_if<
7365  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::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::Outlier::Removal::Threshold>::value,
7375  int>::type = 0>
7377  {
7379  }
7380 
7381  template<typename T,
7382  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value,
7383  int>::type = 0>
7385  {
7386  return m_reflection;
7387  }
7388 
7389  template<
7390  typename T,
7391  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
7392  int>::type = 0>
7394  {
7396  }
7397 
7398  template<typename T,
7399  typename std::enable_if<
7400  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
7401  int>::type = 0>
7403  {
7405  }
7406 
7407  template<typename T,
7408  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value,
7409  int>::type = 0>
7411  {
7412  return m_smoothing;
7413  }
7414 
7415  template<
7416  typename T,
7417  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
7418  int>::type = 0>
7420  {
7422  }
7423 
7424  template<typename T,
7425  typename std::enable_if<
7426  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
7427  int>::type = 0>
7429  {
7431  }
7432 
7433  template<typename T,
7434  typename std::enable_if<
7435  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
7436  int>::type = 0>
7438  {
7440  }
7441 
7442  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
7444  {
7445  return m_experimental;
7446  }
7447 
7448  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
7450  {
7451  return m_noise;
7452  }
7453 
7454  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
7456  {
7457  return m_outlier;
7458  }
7459 
7460  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
7462  {
7463  return m_reflection;
7464  }
7465 
7466  template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
7468  {
7469  return m_smoothing;
7470  }
7471 
7473  template<typename F>
7474  void forEach(const F &f) const
7475  {
7476  f(m_experimental);
7477  f(m_noise);
7478  f(m_outlier);
7479  f(m_reflection);
7480  f(m_smoothing);
7481  }
7482 
7484  template<typename F>
7485  void forEach(const F &f)
7486  {
7487  f(m_experimental);
7488  f(m_noise);
7489  f(m_outlier);
7490  f(m_reflection);
7491  f(m_smoothing);
7492  }
7493 
7495  bool operator==(const Filters &other) const;
7496 
7498  bool operator!=(const Filters &other) const;
7499 
7501  std::string toString() const;
7502 
7504  friend std::ostream &operator<<(std::ostream &stream, const Filters &value)
7505  {
7506  return stream << value.toString();
7507  }
7508 
7509  private:
7510  void setFromString(const std::string &value);
7511 
7512  void setFromString(const std::string &fullPath, const std::string &value);
7513 
7514  std::string getString(const std::string &fullPath) const;
7515 
7516  Experimental m_experimental;
7517  Noise m_noise;
7518  Outlier m_outlier;
7519  Reflection m_reflection;
7520  Smoothing m_smoothing;
7521 
7522  friend struct DataModel::Detail::Befriend<Filters>;
7523  };
7524 
7525  using Descendants =
7526  std::tuple<Settings::Processing::Color,
7559 
7562 
7606 #ifndef NO_DOC
7607  template<typename... Args,
7608  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
7609  typename std::enable_if<
7610  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants,
7611  typename std::decay<Args>::type...>::value,
7612  int>::type = 0>
7613 #else
7614  template<typename... Args>
7615 #endif
7616  explicit Processing(Args &&...args)
7617  {
7618  using namespace Zivid::Detail::TypeTraits;
7619 
7620  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7621  "Found duplicate types among the arguments passed to Processing(...). "
7622  "Types should be listed at most once.");
7623 
7624  set(std::forward<Args>(args)...);
7625  }
7626 
7669 #ifndef NO_DOC
7670  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
7671 #else
7672  template<typename... Args>
7673 #endif
7674  void set(Args &&...args)
7675  {
7676  using namespace Zivid::Detail::TypeTraits;
7677 
7678  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7679  static_assert(AllArgsAreDescendantNodes::value,
7680  "All arguments passed to set(...) must be descendant nodes.");
7681 
7682  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7683  "Found duplicate types among the arguments passed to set(...). "
7684  "Types should be listed at most once.");
7685 
7686  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
7687  }
7688 
7732 #ifndef NO_DOC
7733  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
7734 #else
7735  template<typename... Args>
7736 #endif
7737  Processing copyWith(Args &&...args) const
7738  {
7739  using namespace Zivid::Detail::TypeTraits;
7740 
7741  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
7742  static_assert(AllArgsAreDescendantNodes::value,
7743  "All arguments passed to copyWith(...) must be descendant nodes.");
7744 
7745  static_assert(AllArgsDecayedAreUnique<Args...>::value,
7746  "Found duplicate types among the arguments passed to copyWith(...). "
7747  "Types should be listed at most once.");
7748 
7749  auto copy{ *this };
7750  copy.set(std::forward<Args>(args)...);
7751  return copy;
7752  }
7753 
7755  const Color &color() const
7756  {
7757  return m_color;
7758  }
7759 
7762  {
7763  return m_color;
7764  }
7765 
7767  Processing &set(const Color &value)
7768  {
7769  m_color = value;
7770  return *this;
7771  }
7772 
7775  {
7776  m_color.set(value);
7777  return *this;
7778  }
7779 
7782  {
7783  m_color.set(value);
7784  return *this;
7785  }
7786 
7789  {
7790  m_color.set(value);
7791  return *this;
7792  }
7793 
7796  {
7797  m_color.set(value);
7798  return *this;
7799  }
7800 
7803  {
7804  m_color.set(value);
7805  return *this;
7806  }
7807 
7810  {
7811  m_color.set(value);
7812  return *this;
7813  }
7814 
7817  {
7818  m_color.set(value);
7819  return *this;
7820  }
7821 
7823  Processing &set(const Color::Gamma &value)
7824  {
7825  m_color.set(value);
7826  return *this;
7827  }
7828 
7830  const Filters &filters() const
7831  {
7832  return m_filters;
7833  }
7834 
7837  {
7838  return m_filters;
7839  }
7840 
7842  Processing &set(const Filters &value)
7843  {
7844  m_filters = value;
7845  return *this;
7846  }
7847 
7850  {
7851  m_filters.set(value);
7852  return *this;
7853  }
7854 
7857  {
7858  m_filters.set(value);
7859  return *this;
7860  }
7861 
7864  {
7865  m_filters.set(value);
7866  return *this;
7867  }
7868 
7871  {
7872  m_filters.set(value);
7873  return *this;
7874  }
7875 
7878  {
7879  m_filters.set(value);
7880  return *this;
7881  }
7882 
7885  {
7886  m_filters.set(value);
7887  return *this;
7888  }
7889 
7892  {
7893  m_filters.set(value);
7894  return *this;
7895  }
7896 
7899  {
7900  m_filters.set(value);
7901  return *this;
7902  }
7903 
7906  {
7907  m_filters.set(value);
7908  return *this;
7909  }
7910 
7913  {
7914  m_filters.set(value);
7915  return *this;
7916  }
7917 
7920  {
7921  m_filters.set(value);
7922  return *this;
7923  }
7924 
7927  {
7928  m_filters.set(value);
7929  return *this;
7930  }
7931 
7934  {
7935  m_filters.set(value);
7936  return *this;
7937  }
7938 
7941  {
7942  m_filters.set(value);
7943  return *this;
7944  }
7945 
7948  {
7949  m_filters.set(value);
7950  return *this;
7951  }
7952 
7955  {
7956  m_filters.set(value);
7957  return *this;
7958  }
7959 
7962  {
7963  m_filters.set(value);
7964  return *this;
7965  }
7966 
7969  {
7970  m_filters.set(value);
7971  return *this;
7972  }
7973 
7976  {
7977  m_filters.set(value);
7978  return *this;
7979  }
7980 
7983  {
7984  m_filters.set(value);
7985  return *this;
7986  }
7987 
7990  {
7991  m_filters.set(value);
7992  return *this;
7993  }
7994 
7997  {
7998  m_filters.set(value);
7999  return *this;
8000  }
8001 
8004  {
8005  m_filters.set(value);
8006  return *this;
8007  }
8008 
8009  template<typename T,
8010  typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8012  {
8013  return m_color;
8014  }
8015 
8016  template<
8017  typename T,
8018  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8020  {
8021  return m_color.get<Settings::Processing::Color::Balance>();
8022  }
8023 
8024  template<typename T,
8025  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value,
8026  int>::type = 0>
8028  {
8029  return m_color.get<Settings::Processing::Color::Balance::Blue>();
8030  }
8031 
8032  template<typename T,
8033  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value,
8034  int>::type = 0>
8036  {
8037  return m_color.get<Settings::Processing::Color::Balance::Green>();
8038  }
8039 
8040  template<typename T,
8041  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value,
8042  int>::type = 0>
8044  {
8045  return m_color.get<Settings::Processing::Color::Balance::Red>();
8046  }
8047 
8048  template<typename T,
8049  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value,
8050  int>::type = 0>
8052  {
8054  }
8055 
8056  template<
8057  typename T,
8058  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
8059  int>::type = 0>
8061  {
8063  }
8064 
8065  template<typename T,
8066  typename std::enable_if<
8067  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
8068  int>::type = 0>
8070  {
8072  }
8073 
8074  template<typename T,
8075  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
8077  {
8078  return m_color.get<Settings::Processing::Color::Gamma>();
8079  }
8080 
8081  template<typename T,
8082  typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
8084  {
8085  return m_filters;
8086  }
8087 
8088  template<typename T,
8089  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value,
8090  int>::type = 0>
8092  {
8094  }
8095 
8096  template<typename T,
8097  typename std::enable_if<
8098  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
8099  int>::type = 0>
8101  {
8103  }
8104 
8105  template<
8106  typename T,
8107  typename std::enable_if<
8108  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
8109  int>::type = 0>
8111  {
8113  }
8114 
8115  template<typename T,
8116  typename std::enable_if<std::is_same<T,
8117  Settings::Processing::Filters::Experimental::
8118  ContrastDistortion::Correction::Enabled>::value,
8119  int>::type = 0>
8121  {
8122  return m_filters
8124  }
8125 
8126  template<typename T,
8127  typename std::enable_if<std::is_same<T,
8128  Settings::Processing::Filters::Experimental::
8129  ContrastDistortion::Correction::Strength>::value,
8130  int>::type = 0>
8132  {
8133  return m_filters
8135  }
8136 
8137  template<
8138  typename T,
8139  typename std::enable_if<
8140  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
8141  int>::type = 0>
8143  {
8145  }
8146 
8147  template<
8148  typename T,
8149  typename std::enable_if<
8150  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled>::
8151  value,
8152  int>::type = 0>
8154  {
8155  return m_filters
8157  }
8158 
8159  template<typename T,
8160  typename std::enable_if<std::is_same<T,
8161  Settings::Processing::Filters::Experimental::
8162  ContrastDistortion::Removal::Threshold>::value,
8163  int>::type = 0>
8165  {
8166  return m_filters
8168  }
8169 
8170  template<
8171  typename T,
8172  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
8174  {
8175  return m_filters.get<Settings::Processing::Filters::Noise>();
8176  }
8177 
8178  template<typename T,
8179  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
8180  int>::type = 0>
8182  {
8184  }
8185 
8186  template<
8187  typename T,
8188  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
8189  int>::type = 0>
8191  {
8193  }
8194 
8195  template<typename T,
8196  typename std::enable_if<
8197  std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
8198  int>::type = 0>
8200  {
8202  }
8203 
8204  template<
8205  typename T,
8206  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
8208  {
8209  return m_filters.get<Settings::Processing::Filters::Outlier>();
8210  }
8211 
8212  template<typename T,
8213  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
8214  int>::type = 0>
8216  {
8218  }
8219 
8220  template<typename T,
8221  typename std::enable_if<
8222  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
8223  int>::type = 0>
8225  {
8227  }
8228 
8229  template<typename T,
8230  typename std::enable_if<
8231  std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
8232  int>::type = 0>
8234  {
8236  }
8237 
8238  template<typename T,
8239  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value,
8240  int>::type = 0>
8242  {
8243  return m_filters.get<Settings::Processing::Filters::Reflection>();
8244  }
8245 
8246  template<typename T,
8247  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
8248  int>::type = 0>
8250  {
8252  }
8253 
8254  template<typename T,
8255  typename std::enable_if<
8256  std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
8257  int>::type = 0>
8259  {
8261  }
8262 
8263  template<typename T,
8264  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value,
8265  int>::type = 0>
8267  {
8268  return m_filters.get<Settings::Processing::Filters::Smoothing>();
8269  }
8270 
8271  template<typename T,
8272  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
8273  int>::type = 0>
8275  {
8277  }
8278 
8279  template<typename T,
8280  typename std::enable_if<
8281  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
8282  int>::type = 0>
8284  {
8286  }
8287 
8288  template<typename T,
8289  typename std::enable_if<
8290  std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
8291  int>::type = 0>
8293  {
8295  }
8296 
8297  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
8299  {
8300  return m_color;
8301  }
8302 
8303  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
8305  {
8306  return m_filters;
8307  }
8308 
8310  template<typename F>
8311  void forEach(const F &f) const
8312  {
8313  f(m_color);
8314  f(m_filters);
8315  }
8316 
8318  template<typename F>
8319  void forEach(const F &f)
8320  {
8321  f(m_color);
8322  f(m_filters);
8323  }
8324 
8326  bool operator==(const Processing &other) const;
8327 
8329  bool operator!=(const Processing &other) const;
8330 
8332  std::string toString() const;
8333 
8335  friend std::ostream &operator<<(std::ostream &stream, const Processing &value)
8336  {
8337  return stream << value.toString();
8338  }
8339 
8340  private:
8341  void setFromString(const std::string &value);
8342 
8343  void setFromString(const std::string &fullPath, const std::string &value);
8344 
8345  std::string getString(const std::string &fullPath) const;
8346 
8347  Color m_color;
8348  Filters m_filters;
8349 
8350  friend struct DataModel::Detail::Befriend<Processing>;
8351  };
8352 
8353  using Descendants =
8354  std::tuple<Settings::Acquisitions,
8391 
8394 
8396  explicit Settings(const std::string &fileName);
8397 
8445 #ifndef NO_DOC
8446  template<
8447  typename... Args,
8448  typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0,
8449  typename std::enable_if<
8450  Zivid::Detail::TypeTraits::AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>::value,
8451  int>::type = 0>
8452 #else
8453  template<typename... Args>
8454 #endif
8455  explicit Settings(Args &&...args)
8456  {
8457  using namespace Zivid::Detail::TypeTraits;
8458 
8459  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8460  "Found duplicate types among the arguments passed to Settings(...). "
8461  "Types should be listed at most once.");
8462 
8463  set(std::forward<Args>(args)...);
8464  }
8465 
8512 #ifndef NO_DOC
8513  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 2, int>::type = 0>
8514 #else
8515  template<typename... Args>
8516 #endif
8517  void set(Args &&...args)
8518  {
8519  using namespace Zivid::Detail::TypeTraits;
8520 
8521  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8522  static_assert(AllArgsAreDescendantNodes::value,
8523  "All arguments passed to set(...) must be descendant nodes.");
8524 
8525  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8526  "Found duplicate types among the arguments passed to set(...). "
8527  "Types should be listed at most once.");
8528 
8529  Zivid::DataModel::Detail::invokeSetWithEachArgument(*this, std::forward<Args>(args)...);
8530  }
8531 
8579 #ifndef NO_DOC
8580  template<typename... Args, typename std::enable_if<sizeof...(Args) >= 1, int>::type = 0>
8581 #else
8582  template<typename... Args>
8583 #endif
8584  Settings copyWith(Args &&...args) const
8585  {
8586  using namespace Zivid::Detail::TypeTraits;
8587 
8588  using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
8589  static_assert(AllArgsAreDescendantNodes::value,
8590  "All arguments passed to copyWith(...) must be descendant nodes.");
8591 
8592  static_assert(AllArgsDecayedAreUnique<Args...>::value,
8593  "Found duplicate types among the arguments passed to copyWith(...). "
8594  "Types should be listed at most once.");
8595 
8596  auto copy{ *this };
8597  copy.set(std::forward<Args>(args)...);
8598  return copy;
8599  }
8600 
8603  {
8604  return m_acquisitions;
8605  }
8606 
8609  {
8610  return m_acquisitions;
8611  }
8612 
8614  Settings &set(const Acquisitions &value)
8615  {
8616  m_acquisitions = value;
8617  return *this;
8618  }
8619 
8622  {
8623  return m_experimental;
8624  }
8625 
8628  {
8629  return m_experimental;
8630  }
8631 
8633  Settings &set(const Experimental &value)
8634  {
8635  m_experimental = value;
8636  return *this;
8637  }
8638 
8641  {
8642  m_experimental.set(value);
8643  return *this;
8644  }
8645 
8647  const Processing &processing() const
8648  {
8649  return m_processing;
8650  }
8651 
8654  {
8655  return m_processing;
8656  }
8657 
8659  Settings &set(const Processing &value)
8660  {
8661  m_processing = value;
8662  return *this;
8663  }
8664 
8667  {
8668  m_processing.set(value);
8669  return *this;
8670  }
8671 
8674  {
8675  m_processing.set(value);
8676  return *this;
8677  }
8678 
8681  {
8682  m_processing.set(value);
8683  return *this;
8684  }
8685 
8688  {
8689  m_processing.set(value);
8690  return *this;
8691  }
8692 
8695  {
8696  m_processing.set(value);
8697  return *this;
8698  }
8699 
8702  {
8703  m_processing.set(value);
8704  return *this;
8705  }
8706 
8709  {
8710  m_processing.set(value);
8711  return *this;
8712  }
8713 
8716  {
8717  m_processing.set(value);
8718  return *this;
8719  }
8720 
8723  {
8724  m_processing.set(value);
8725  return *this;
8726  }
8727 
8730  {
8731  m_processing.set(value);
8732  return *this;
8733  }
8734 
8737  {
8738  m_processing.set(value);
8739  return *this;
8740  }
8741 
8744  {
8745  m_processing.set(value);
8746  return *this;
8747  }
8748 
8751  {
8752  m_processing.set(value);
8753  return *this;
8754  }
8755 
8758  {
8759  m_processing.set(value);
8760  return *this;
8761  }
8762 
8765  {
8766  m_processing.set(value);
8767  return *this;
8768  }
8769 
8772  {
8773  m_processing.set(value);
8774  return *this;
8775  }
8776 
8779  {
8780  m_processing.set(value);
8781  return *this;
8782  }
8783 
8786  {
8787  m_processing.set(value);
8788  return *this;
8789  }
8790 
8793  {
8794  m_processing.set(value);
8795  return *this;
8796  }
8797 
8800  {
8801  m_processing.set(value);
8802  return *this;
8803  }
8804 
8807  {
8808  m_processing.set(value);
8809  return *this;
8810  }
8811 
8814  {
8815  m_processing.set(value);
8816  return *this;
8817  }
8818 
8821  {
8822  m_processing.set(value);
8823  return *this;
8824  }
8825 
8828  {
8829  m_processing.set(value);
8830  return *this;
8831  }
8832 
8835  {
8836  m_processing.set(value);
8837  return *this;
8838  }
8839 
8842  {
8843  m_processing.set(value);
8844  return *this;
8845  }
8846 
8849  {
8850  m_processing.set(value);
8851  return *this;
8852  }
8853 
8856  {
8857  m_processing.set(value);
8858  return *this;
8859  }
8860 
8863  {
8864  m_processing.set(value);
8865  return *this;
8866  }
8867 
8870  {
8871  m_processing.set(value);
8872  return *this;
8873  }
8874 
8877  {
8878  m_processing.set(value);
8879  return *this;
8880  }
8881 
8884  {
8885  m_processing.set(value);
8886  return *this;
8887  }
8888 
8891  {
8892  m_processing.set(value);
8893  return *this;
8894  }
8895 
8896  template<typename T, typename std::enable_if<std::is_same<T, Settings::Acquisitions>::value, int>::type = 0>
8898  {
8899  return m_acquisitions;
8900  }
8901 
8902  template<typename T, typename std::enable_if<std::is_same<T, Settings::Experimental>::value, int>::type = 0>
8904  {
8905  return m_experimental;
8906  }
8907 
8908  template<typename T,
8909  typename std::enable_if<std::is_same<T, Settings::Experimental::Engine>::value, int>::type = 0>
8911  {
8912  return m_experimental.get<Settings::Experimental::Engine>();
8913  }
8914 
8915  template<typename T, typename std::enable_if<std::is_same<T, Settings::Processing>::value, int>::type = 0>
8916  const Settings::Processing &get() const
8917  {
8918  return m_processing;
8919  }
8920 
8921  template<typename T,
8922  typename std::enable_if<std::is_same<T, Settings::Processing::Color>::value, int>::type = 0>
8924  {
8925  return m_processing.get<Settings::Processing::Color>();
8926  }
8927 
8928  template<typename T,
8929  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance>::value, int>::type = 0>
8931  {
8932  return m_processing.get<Settings::Processing::Color::Balance>();
8933  }
8934 
8935  template<
8936  typename T,
8937  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Blue>::value, int>::type = 0>
8939  {
8940  return m_processing.get<Settings::Processing::Color::Balance::Blue>();
8941  }
8942 
8943  template<
8944  typename T,
8945  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Green>::value, int>::type = 0>
8947  {
8948  return m_processing.get<Settings::Processing::Color::Balance::Green>();
8949  }
8950 
8951  template<
8952  typename T,
8953  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Balance::Red>::value, int>::type = 0>
8955  {
8956  return m_processing.get<Settings::Processing::Color::Balance::Red>();
8957  }
8958 
8959  template<
8960  typename T,
8961  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental>::value, int>::type = 0>
8963  {
8964  return m_processing.get<Settings::Processing::Color::Experimental>();
8965  }
8966 
8967  template<typename T,
8968  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping>::value,
8969  int>::type = 0>
8971  {
8973  }
8974 
8975  template<typename T,
8976  typename std::enable_if<
8977  std::is_same<T, Settings::Processing::Color::Experimental::ToneMapping::Enabled>::value,
8978  int>::type = 0>
8980  {
8982  }
8983 
8984  template<typename T,
8985  typename std::enable_if<std::is_same<T, Settings::Processing::Color::Gamma>::value, int>::type = 0>
8987  {
8988  return m_processing.get<Settings::Processing::Color::Gamma>();
8989  }
8990 
8991  template<typename T,
8992  typename std::enable_if<std::is_same<T, Settings::Processing::Filters>::value, int>::type = 0>
8994  {
8995  return m_processing.get<Settings::Processing::Filters>();
8996  }
8997 
8998  template<
8999  typename T,
9000  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Experimental>::value, int>::type = 0>
9002  {
9003  return m_processing.get<Settings::Processing::Filters::Experimental>();
9004  }
9005 
9006  template<typename T,
9007  typename std::enable_if<
9008  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9009  int>::type = 0>
9011  {
9013  }
9014 
9015  template<
9016  typename T,
9017  typename std::enable_if<
9018  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9019  int>::type = 0>
9021  {
9023  }
9024 
9025  template<
9026  typename T,
9027  typename std::enable_if<
9028  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled>::
9029  value,
9030  int>::type = 0>
9032  {
9033  return m_processing
9035  }
9036 
9037  template<
9038  typename T,
9039  typename std::enable_if<
9040  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength>::
9041  value,
9042  int>::type = 0>
9044  {
9045  return m_processing
9047  }
9048 
9049  template<typename T,
9050  typename std::enable_if<
9051  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9052  int>::type = 0>
9054  {
9056  }
9057 
9058  template<
9059  typename T,
9060  typename std::enable_if<
9061  std::is_same<T,
9063  int>::type = 0>
9065  {
9066  return m_processing
9068  }
9069 
9070  template<
9071  typename T,
9072  typename std::enable_if<
9073  std::is_same<T, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold>::
9074  value,
9075  int>::type = 0>
9077  {
9078  return m_processing
9080  }
9081 
9082  template<typename T,
9083  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise>::value, int>::type = 0>
9085  {
9086  return m_processing.get<Settings::Processing::Filters::Noise>();
9087  }
9088 
9089  template<typename T,
9090  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal>::value,
9091  int>::type = 0>
9093  {
9094  return m_processing.get<Settings::Processing::Filters::Noise::Removal>();
9095  }
9096 
9097  template<typename T,
9098  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Enabled>::value,
9099  int>::type = 0>
9101  {
9102  return m_processing.get<Settings::Processing::Filters::Noise::Removal::Enabled>();
9103  }
9104 
9105  template<
9106  typename T,
9107  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Noise::Removal::Threshold>::value,
9108  int>::type = 0>
9110  {
9112  }
9113 
9114  template<typename T,
9115  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier>::value, int>::type = 0>
9117  {
9118  return m_processing.get<Settings::Processing::Filters::Outlier>();
9119  }
9120 
9121  template<typename T,
9122  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal>::value,
9123  int>::type = 0>
9125  {
9127  }
9128 
9129  template<
9130  typename T,
9131  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Enabled>::value,
9132  int>::type = 0>
9134  {
9136  }
9137 
9138  template<
9139  typename T,
9140  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Outlier::Removal::Threshold>::value,
9141  int>::type = 0>
9143  {
9145  }
9146 
9147  template<
9148  typename T,
9149  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection>::value, int>::type = 0>
9151  {
9152  return m_processing.get<Settings::Processing::Filters::Reflection>();
9153  }
9154 
9155  template<typename T,
9156  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal>::value,
9157  int>::type = 0>
9159  {
9161  }
9162 
9163  template<
9164  typename T,
9165  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Reflection::Removal::Enabled>::value,
9166  int>::type = 0>
9168  {
9170  }
9171 
9172  template<
9173  typename T,
9174  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing>::value, int>::type = 0>
9176  {
9177  return m_processing.get<Settings::Processing::Filters::Smoothing>();
9178  }
9179 
9180  template<typename T,
9181  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian>::value,
9182  int>::type = 0>
9184  {
9186  }
9187 
9188  template<
9189  typename T,
9190  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Enabled>::value,
9191  int>::type = 0>
9193  {
9195  }
9196 
9197  template<
9198  typename T,
9199  typename std::enable_if<std::is_same<T, Settings::Processing::Filters::Smoothing::Gaussian::Sigma>::value,
9200  int>::type = 0>
9202  {
9204  }
9205 
9206  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
9208  {
9209  return m_acquisitions;
9210  }
9211 
9212  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
9214  {
9215  return m_experimental;
9216  }
9217 
9218  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
9219  const Settings::Processing &get() const
9220  {
9221  return m_processing;
9222  }
9223 
9225  template<typename F>
9226  void forEach(const F &f) const
9227  {
9228  f(m_acquisitions);
9229  f(m_experimental);
9230  f(m_processing);
9231  }
9232 
9234  template<typename F>
9235  void forEach(const F &f)
9236  {
9237  f(m_acquisitions);
9238  f(m_experimental);
9239  f(m_processing);
9240  }
9241 
9243  bool operator==(const Settings &other) const;
9244 
9246  bool operator!=(const Settings &other) const;
9247 
9249  std::string toString() const;
9250 
9252  friend std::ostream &operator<<(std::ostream &stream, const Settings &value)
9253  {
9254  return stream << value.toString();
9255  }
9256 
9258  void save(const std::string &fileName) const;
9259 
9261  void load(const std::string &fileName);
9262 
9263  private:
9264  void setFromString(const std::string &value);
9265 
9266  void setFromString(const std::string &fullPath, const std::string &value);
9267 
9268  std::string getString(const std::string &fullPath) const;
9269 
9270  Acquisitions m_acquisitions;
9271  Experimental m_experimental;
9272  Processing m_processing;
9273 
9274  friend struct DataModel::Detail::Befriend<Settings>;
9275  };
9276 
9277 #ifndef NO_DOC
9278  template<>
9279  struct Settings::Version<8>
9280  {
9281  using Type = Settings;
9282  };
9283 #endif
9284 
9285 } // namespace Zivid
9286 
9287 #ifdef _MSC_VER
9288 # pragma warning(pop)
9289 #endif
9290 
9291 #ifndef NO_DOC
9292 # if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
9293 namespace std // NOLINT
9294 {
9295  template<>
9296  struct tuple_size<Zivid::Settings::Experimental> : integral_constant<size_t, 1>
9297  {};
9298 
9299  template<size_t i>
9300  struct tuple_element<i, Zivid::Settings::Experimental>
9301  {
9302  static_assert(i < tuple_size<Zivid::Settings::Experimental>::value, "Index must be less than 1");
9303 
9304  using type // NOLINT
9305  = decltype(declval<Zivid::Settings::Experimental>().get<i>());
9306  };
9307 
9308  template<>
9309  struct tuple_size<Zivid::Settings::Processing> : integral_constant<size_t, 2>
9310  {};
9311 
9312  template<size_t i>
9313  struct tuple_element<i, Zivid::Settings::Processing>
9314  {
9315  static_assert(i < tuple_size<Zivid::Settings::Processing>::value, "Index must be less than 2");
9316 
9317  using type // NOLINT
9318  = decltype(declval<Zivid::Settings::Processing>().get<i>());
9319  };
9320 
9321  template<>
9322  struct tuple_size<Zivid::Settings::Processing::Color> : integral_constant<size_t, 3>
9323  {};
9324 
9325  template<size_t i>
9326  struct tuple_element<i, Zivid::Settings::Processing::Color>
9327  {
9328  static_assert(i < tuple_size<Zivid::Settings::Processing::Color>::value, "Index must be less than 3");
9329 
9330  using type // NOLINT
9331  = decltype(declval<Zivid::Settings::Processing::Color>().get<i>());
9332  };
9333 
9334  template<>
9335  struct tuple_size<Zivid::Settings::Processing::Color::Balance> : integral_constant<size_t, 3>
9336  {};
9337 
9338  template<size_t i>
9339  struct tuple_element<i, Zivid::Settings::Processing::Color::Balance>
9340  {
9341  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Balance>::value, "Index must be less than 3");
9342 
9343  using type // NOLINT
9344  = decltype(declval<Zivid::Settings::Processing::Color::Balance>().get<i>());
9345  };
9346 
9347  template<>
9348  struct tuple_size<Zivid::Settings::Processing::Color::Experimental> : integral_constant<size_t, 1>
9349  {};
9350 
9351  template<size_t i>
9352  struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental>
9353  {
9354  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Experimental>::value,
9355  "Index must be less than 1");
9356 
9357  using type // NOLINT
9358  = decltype(declval<Zivid::Settings::Processing::Color::Experimental>().get<i>());
9359  };
9360 
9361  template<>
9362  struct tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping> : integral_constant<size_t, 1>
9363  {};
9364 
9365  template<size_t i>
9366  struct tuple_element<i, Zivid::Settings::Processing::Color::Experimental::ToneMapping>
9367  {
9368  static_assert(i < tuple_size<Zivid::Settings::Processing::Color::Experimental::ToneMapping>::value,
9369  "Index must be less than 1");
9370 
9371  using type // NOLINT
9372  = decltype(declval<Zivid::Settings::Processing::Color::Experimental::ToneMapping>().get<i>());
9373  };
9374 
9375  template<>
9376  struct tuple_size<Zivid::Settings::Processing::Filters> : integral_constant<size_t, 5>
9377  {};
9378 
9379  template<size_t i>
9380  struct tuple_element<i, Zivid::Settings::Processing::Filters>
9381  {
9382  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters>::value, "Index must be less than 5");
9383 
9384  using type // NOLINT
9385  = decltype(declval<Zivid::Settings::Processing::Filters>().get<i>());
9386  };
9387 
9388  template<>
9389  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental> : integral_constant<size_t, 1>
9390  {};
9391 
9392  template<size_t i>
9393  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental>
9394  {
9395  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Experimental>::value,
9396  "Index must be less than 1");
9397 
9398  using type // NOLINT
9399  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental>().get<i>());
9400  };
9401 
9402  template<>
9403  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
9404  : integral_constant<size_t, 2>
9405  {};
9406 
9407  template<size_t i>
9408  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>
9409  {
9410  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>::value,
9411  "Index must be less than 2");
9412 
9413  using type // NOLINT
9414  = decltype(declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion>().get<i>());
9415  };
9416 
9417  template<>
9418  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
9419  : integral_constant<size_t, 2>
9420  {};
9421 
9422  template<size_t i>
9423  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>
9424  {
9425  static_assert(
9426  i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>::value,
9427  "Index must be less than 2");
9428 
9429  using type // NOLINT
9430  = decltype(
9431  declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Correction>().get<i>());
9432  };
9433 
9434  template<>
9435  struct tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
9436  : integral_constant<size_t, 2>
9437  {};
9438 
9439  template<size_t i>
9440  struct tuple_element<i, Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>
9441  {
9442  static_assert(
9443  i < tuple_size<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>::value,
9444  "Index must be less than 2");
9445 
9446  using type // NOLINT
9447  = decltype(
9448  declval<Zivid::Settings::Processing::Filters::Experimental::ContrastDistortion::Removal>().get<i>());
9449  };
9450 
9451  template<>
9452  struct tuple_size<Zivid::Settings::Processing::Filters::Noise> : integral_constant<size_t, 1>
9453  {};
9454 
9455  template<size_t i>
9456  struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise>
9457  {
9458  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise>::value, "Index must be less than 1");
9459 
9460  using type // NOLINT
9461  = decltype(declval<Zivid::Settings::Processing::Filters::Noise>().get<i>());
9462  };
9463 
9464  template<>
9465  struct tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal> : integral_constant<size_t, 2>
9466  {};
9467 
9468  template<size_t i>
9469  struct tuple_element<i, Zivid::Settings::Processing::Filters::Noise::Removal>
9470  {
9471  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Noise::Removal>::value,
9472  "Index must be less than 2");
9473 
9474  using type // NOLINT
9475  = decltype(declval<Zivid::Settings::Processing::Filters::Noise::Removal>().get<i>());
9476  };
9477 
9478  template<>
9479  struct tuple_size<Zivid::Settings::Processing::Filters::Outlier> : integral_constant<size_t, 1>
9480  {};
9481 
9482  template<size_t i>
9483  struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier>
9484  {
9485  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Outlier>::value,
9486  "Index must be less than 1");
9487 
9488  using type // NOLINT
9489  = decltype(declval<Zivid::Settings::Processing::Filters::Outlier>().get<i>());
9490  };
9491 
9492  template<>
9493  struct tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal> : integral_constant<size_t, 2>
9494  {};
9495 
9496  template<size_t i>
9497  struct tuple_element<i, Zivid::Settings::Processing::Filters::Outlier::Removal>
9498  {
9499  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Outlier::Removal>::value,
9500  "Index must be less than 2");
9501 
9502  using type // NOLINT
9503  = decltype(declval<Zivid::Settings::Processing::Filters::Outlier::Removal>().get<i>());
9504  };
9505 
9506  template<>
9507  struct tuple_size<Zivid::Settings::Processing::Filters::Reflection> : integral_constant<size_t, 1>
9508  {};
9509 
9510  template<size_t i>
9511  struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection>
9512  {
9513  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Reflection>::value,
9514  "Index must be less than 1");
9515 
9516  using type // NOLINT
9517  = decltype(declval<Zivid::Settings::Processing::Filters::Reflection>().get<i>());
9518  };
9519 
9520  template<>
9521  struct tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal> : integral_constant<size_t, 1>
9522  {};
9523 
9524  template<size_t i>
9525  struct tuple_element<i, Zivid::Settings::Processing::Filters::Reflection::Removal>
9526  {
9527  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Reflection::Removal>::value,
9528  "Index must be less than 1");
9529 
9530  using type // NOLINT
9531  = decltype(declval<Zivid::Settings::Processing::Filters::Reflection::Removal>().get<i>());
9532  };
9533 
9534  template<>
9535  struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing> : integral_constant<size_t, 1>
9536  {};
9537 
9538  template<size_t i>
9539  struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing>
9540  {
9541  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing>::value,
9542  "Index must be less than 1");
9543 
9544  using type // NOLINT
9545  = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing>().get<i>());
9546  };
9547 
9548  template<>
9549  struct tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian> : integral_constant<size_t, 2>
9550  {};
9551 
9552  template<size_t i>
9553  struct tuple_element<i, Zivid::Settings::Processing::Filters::Smoothing::Gaussian>
9554  {
9555  static_assert(i < tuple_size<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>::value,
9556  "Index must be less than 2");
9557 
9558  using type // NOLINT
9559  = decltype(declval<Zivid::Settings::Processing::Filters::Smoothing::Gaussian>().get<i>());
9560  };
9561 
9562  template<>
9563  struct tuple_size<Zivid::Settings> : integral_constant<size_t, 3>
9564  {};
9565 
9566  template<size_t i>
9567  struct tuple_element<i, Zivid::Settings>
9568  {
9569  static_assert(i < tuple_size<Zivid::Settings>::value, "Index must be less than 3");
9570 
9571  using type // NOLINT
9572  = decltype(declval<Zivid::Settings>().get<i>());
9573  };
9574 
9575 } // namespace std
9576 # endif
9577 #endif
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:57
Class describing a range of values for a given type T
Definition: Range.h:58
Aperture setting for the camera. Specified as an f-number (the ratio of lens focal length to the effe...
Definition: Settings.h:126
bool operator<(const Aperture &other) const
Comparison operator
Definition: Settings.h:189
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:195
bool operator==(const Aperture &other) const
Comparison operator
Definition: Settings.h:177
static constexpr Range< double > validRange()
The range of valid values for Aperture
Definition: Settings.h:148
bool operator!=(const Aperture &other) const
Comparison operator
Definition: Settings.h:183
Aperture()=default
Default constructor
constexpr Aperture(double value)
Constructor
Definition: Settings.h:157
double ValueType
The type of the underlying value
Definition: Settings.h:145
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:201
bool hasValue() const
Check if the value is set
Brightness controls the light output from the projector.
Definition: Settings.h:237
bool operator!=(const Brightness &other) const
Comparison operator
Definition: Settings.h:304
bool operator<(const Brightness &other) const
Comparison operator
Definition: Settings.h:310
bool operator>(const Brightness &other) const
Comparison operator
Definition: Settings.h:316
friend std::ostream & operator<<(std::ostream &stream, const Brightness &value)
Operator to serialize the value to a stream
Definition: Settings.h:322
void reset()
Reset the node to unset state
static constexpr Range< double > validRange()
The range of valid values for Brightness
Definition: Settings.h:269
std::string toString() const
Get the value as string
double value() const
Get the value
constexpr Brightness(double value)
Constructor
Definition: Settings.h:278
bool hasValue() const
Check if the value is set
Brightness()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:266
bool operator==(const Brightness &other) const
Comparison operator
Definition: Settings.h:298
Exposure time for each single image in the measurement. Affects frame rate.
Definition: Settings.h:346
bool operator<(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:407
static constexpr Range< std::chrono::microseconds > validRange()
The range of valid values for ExposureTime
Definition: Settings.h:366
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:413
friend std::ostream & operator<<(std::ostream &stream, const ExposureTime &value)
Operator to serialize the value to a stream
Definition: Settings.h:419
std::chrono::microseconds ValueType
The type of the underlying value
Definition: Settings.h:363
bool operator==(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:395
bool operator!=(const ExposureTime &other) const
Comparison operator
Definition: Settings.h:401
std::chrono::microseconds value() const
Get the value
constexpr ExposureTime(std::chrono::microseconds value)
Constructor
Definition: Settings.h:375
Analog gain in the camera
Definition: Settings.h:444
static constexpr Range< double > validRange()
The range of valid values for Gain
Definition: Settings.h:462
bool operator==(const Gain &other) const
Comparison operator
Definition: Settings.h:491
constexpr Gain(double value)
Constructor
Definition: Settings.h:471
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:515
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:459
std::string toString() const
Get the value as string
bool operator!=(const Gain &other) const
Comparison operator
Definition: Settings.h:497
bool operator>(const Gain &other) const
Comparison operator
Definition: Settings.h:509
bool operator<(const Gain &other) const
Comparison operator
Definition: Settings.h:503
Settings for a single acquisition
Definition: Settings.h:108
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:780
const Settings::Acquisition::Aperture & get() const
Definition: Settings.h:727
ExposureTime & exposureTime()
Get ExposureTime
Definition: Settings.h:694
const Aperture & aperture() const
Get Aperture
Definition: Settings.h:650
bool operator==(const Acquisition &other) const
Equality operator
Brightness & brightness()
Get Brightness
Definition: Settings.h:675
Acquisition & set(const Brightness &value)
Set Brightness
Definition: Settings.h:681
bool operator!=(const Acquisition &other) const
Inequality operator
const ExposureTime & exposureTime() const
Get ExposureTime
Definition: Settings.h:688
Acquisition & set(const Gain &value)
Set Gain
Definition: Settings.h:719
Acquisition & set(const ExposureTime &value)
Set ExposureTime
Definition: Settings.h:700
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:598
const Settings::Acquisition::Gain & get() const
Definition: Settings.h:749
Acquisition & set(const Aperture &value)
Set Aperture
Definition: Settings.h:662
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:632
const Gain & gain() const
Get Gain
Definition: Settings.h:707
const Brightness & brightness() const
Get Brightness
Definition: Settings.h:669
const Settings::Acquisition::ExposureTime & get() const
Definition: Settings.h:742
Acquisition(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:569
const Settings::Acquisition::Brightness & get() const
Definition: Settings.h:734
Acquisition()
Default constructor
Gain & gain()
Get Gain
Definition: Settings.h:713
friend std::ostream & operator<<(std::ostream &stream, const Acquisition &value)
Operator to send the value as string to a stream
Definition: Settings.h:808
std::tuple< Settings::Acquisition::Aperture, Settings::Acquisition::Brightness, Settings::Acquisition::ExposureTime, Settings::Acquisition::Gain > Descendants
Definition: Settings.h:540
std::string toString() const
Get the value as string
Aperture & aperture()
Get Aperture
Definition: Settings.h:656
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:790
List of Acquisition objects
Definition: Settings.h:830
bool operator!=(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:944
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:848
void forEach(const F &f) const
Run the given function on each element in the list
Definition: Settings.h:929
const std::vector< Settings::Acquisition > & value() const
Get the value
bool operator==(const Acquisitions &other) const
Comparison operator
Definition: Settings.h:938
Acquisitions()=default
Default constructor
Acquisitions(std::initializer_list< Settings::Acquisition > value)
Constructor
Definition: Settings.h:862
void forEach(const F &f)
Run the given function on each element in the list
Definition: Settings.h:919
Acquisitions(std::vector< Settings::Acquisition > value)
Constructor
Definition: Settings.h:857
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:845
friend std::ostream & operator<<(std::ostream &stream, const Acquisitions &value)
Operator to serialize the value to a stream
Definition: Settings.h:950
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:991
ValueType value() const
Get the value
static std::set< ValueType > validValues()
All valid values of Engine
Definition: Settings.h:1023
static const Engine phase
phase
Definition: Settings.h:1019
friend std::ostream & operator<<(std::ostream &stream, const Engine::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:1052
bool hasValue() const
Check if the value is set
ValueType
The type of the underlying value
Definition: Settings.h:1015
friend std::ostream & operator<<(std::ostream &stream, const Engine &value)
Operator to serialize the value to a stream
Definition: Settings.h:1070
std::string toString() const
Get the value as string
bool operator==(const Engine &other) const
Comparison operator
Definition: Settings.h:1058
Engine()=default
Default constructor
bool operator!=(const Engine &other) const
Comparison operator
Definition: Settings.h:1064
constexpr Engine(ValueType value)
Constructor
Definition: Settings.h:1032
static const Engine stripe
stripe
Definition: Settings.h:1020
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:965
const Settings::Experimental::Engine & get() const
Definition: Settings.h:1214
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1145
Experimental & set(const Engine &value)
Set Engine
Definition: Settings.h:1206
const Engine & engine() const
Get Engine
Definition: Settings.h:1194
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:1176
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:1249
std::tuple< Settings::Experimental::Engine > Descendants
Definition: Settings.h:1093
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:1227
bool operator==(const Experimental &other) const
Equality operator
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1119
Experimental()
Default constructor
Engine & engine()
Get Engine
Definition: Settings.h:1200
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1234
Digital gain applied to blue channel
Definition: Settings.h:1318
void reset()
Reset the node to unset state
bool operator==(const Blue &other) const
Comparison operator
Definition: Settings.h:1367
friend std::ostream & operator<<(std::ostream &stream, const Blue &value)
Operator to serialize the value to a stream
Definition: Settings.h:1391
std::string toString() const
Get the value as string
static constexpr Range< double > validRange()
The range of valid values for Blue
Definition: Settings.h:1338
bool operator<(const Blue &other) const
Comparison operator
Definition: Settings.h:1379
constexpr Blue(double value)
Constructor
Definition: Settings.h:1347
bool operator!=(const Blue &other) const
Comparison operator
Definition: Settings.h:1373
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1335
bool operator>(const Blue &other) const
Comparison operator
Definition: Settings.h:1385
Digital gain applied to green channel
Definition: Settings.h:1416
friend std::ostream & operator<<(std::ostream &stream, const Green &value)
Operator to serialize the value to a stream
Definition: Settings.h:1489
void reset()
Reset the node to unset state
bool operator>(const Green &other) const
Comparison operator
Definition: Settings.h:1483
bool hasValue() const
Check if the value is set
double ValueType
The type of the underlying value
Definition: Settings.h:1433
constexpr Green(double value)
Constructor
Definition: Settings.h:1445
static constexpr Range< double > validRange()
The range of valid values for Green
Definition: Settings.h:1436
bool operator==(const Green &other) const
Comparison operator
Definition: Settings.h:1465
bool operator!=(const Green &other) const
Comparison operator
Definition: Settings.h:1471
std::string toString() const
Get the value as string
bool operator<(const Green &other) const
Comparison operator
Definition: Settings.h:1477
Digital gain applied to red channel
Definition: Settings.h:1514
bool operator!=(const Red &other) const
Comparison operator
Definition: Settings.h:1569
static constexpr Range< double > validRange()
The range of valid values for Red
Definition: Settings.h:1534
constexpr Red(double value)
Constructor
Definition: Settings.h:1543
double ValueType
The type of the underlying value
Definition: Settings.h:1531
bool operator==(const Red &other) const
Comparison operator
Definition: Settings.h:1563
bool operator<(const Red &other) const
Comparison operator
Definition: Settings.h:1575
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:1587
bool operator>(const Red &other) const
Comparison operator
Definition: Settings.h:1581
bool hasValue() const
Check if the value is set
std::string toString() const
Get the value as string
Color balance settings
Definition: Settings.h:1302
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:1668
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:1822
bool operator!=(const Balance &other) const
Inequality operator
Blue & blue()
Get Blue
Definition: Settings.h:1727
std::string toString() const
Get the value as string
const Red & red() const
Get Red
Definition: Settings.h:1759
Balance(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:1640
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:1780
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:1702
std::tuple< Settings::Processing::Color::Balance::Blue, Settings::Processing::Color::Balance::Green, Settings::Processing::Color::Balance::Red > Descendants
Definition: Settings.h:1612
Balance & set(const Green &value)
Set Green
Definition: Settings.h:1752
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:1831
Red & red()
Get Red
Definition: Settings.h:1765
friend std::ostream & operator<<(std::ostream &stream, const Balance &value)
Operator to send the value as string to a stream
Definition: Settings.h:1848
const Blue & blue() const
Get Blue
Definition: Settings.h:1721
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:1797
Balance & set(const Blue &value)
Set Blue
Definition: Settings.h:1733
Balance & set(const Red &value)
Set Red
Definition: Settings.h:1771
const Green & green() const
Get Green
Definition: Settings.h:1740
Green & green()
Get Green
Definition: Settings.h:1746
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:1789
This setting controls when tone mapping of colors is performed. Tone mapping will normalize the captu...
Definition: Settings.h:1911
ValueType
The type of the underlying value
Definition: Settings.h:1937
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:1980
friend std::ostream & operator<<(std::ostream &stream, const Enabled::ValueType &value)
Operator to serialize ValueType to a stream
Definition: Settings.h:1974
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:1986
static const Enabled always
always
Definition: Settings.h:1941
static const Enabled hdrOnly
hdrOnly
Definition: Settings.h:1942
static std::set< ValueType > validValues()
All valid values of Enabled
Definition: Settings.h:1945
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:1992
constexpr Enabled(ValueType value)
Constructor
Definition: Settings.h:1954
Tonemapping settings.
Definition: Settings.h:1887
ToneMapping(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2043
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:2163
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2143
bool operator==(const ToneMapping &other) const
Equality operator
std::tuple< Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2017
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:2156
ToneMapping & set(const Enabled &value)
Set Enabled
Definition: Settings.h:2132
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:2126
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:2101
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:2120
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2069
friend std::ostream & operator<<(std::ostream &stream, const ToneMapping &value)
Operator to send the value as string to a stream
Definition: Settings.h:2178
Experimental color settings. These may be renamed, moved or deleted in the future.
Definition: Settings.h:1869
Experimental & set(const ToneMapping &value)
Set ToneMapping
Definition: Settings.h:2314
ToneMapping & toneMapping()
Get ToneMapping
Definition: Settings.h:2308
const ToneMapping & toneMapping() const
Get ToneMapping
Definition: Settings.h:2302
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:2361
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2223
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2341
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2250
std::tuple< Settings::Processing::Color::Experimental::ToneMapping, Settings::Processing::Color::Experimental::ToneMapping::Enabled > Descendants
Definition: Settings.h:2196
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:2376
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:2354
bool operator==(const Experimental &other) const
Equality operator
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:2331
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:2283
Experimental & set(const ToneMapping::Enabled &value)
Set ToneMapping::Enabled
Definition: Settings.h:2321
Gamma applied to the color values. Gamma less than 1 makes the colors brighter, while gamma greater t...
Definition: Settings.h:2397
static constexpr Range< double > validRange()
The range of valid values for Gamma
Definition: Settings.h:2419
double value() const
Get the value
bool operator>(const Gamma &other) const
Comparison operator
Definition: Settings.h:2466
void reset()
Reset the node to unset state
Gamma()=default
Default constructor
double ValueType
The type of the underlying value
Definition: Settings.h:2416
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:2472
constexpr Gamma(double value)
Constructor
Definition: Settings.h:2428
bool operator!=(const Gamma &other) const
Comparison operator
Definition: Settings.h:2454
bool operator<(const Gamma &other) const
Comparison operator
Definition: Settings.h:2460
std::string toString() const
Get the value as string
bool operator==(const Gamma &other) const
Comparison operator
Definition: Settings.h:2448
Color settings
Definition: Settings.h:1286
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:2727
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:2760
Color & set(const Gamma &value)
Set Gamma
Definition: Settings.h:2710
Gamma & gamma()
Get Gamma
Definition: Settings.h:2704
bool operator==(const Color &other) const
Equality operator
Color & set(const Experimental::ToneMapping &value)
Set Experimental::ToneMapping
Definition: Settings.h:2684
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:2567
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:2735
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:2665
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:2743
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:2501
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:2777
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:2769
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:2751
Color & set(const Balance &value)
Set Balance
Definition: Settings.h:2637
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:2811
Balance & balance()
Get Balance
Definition: Settings.h:2631
std::string toString() const
Get the value as string
const Balance & balance() const
Get Balance
Definition: Settings.h:2625
bool operator!=(const Color &other) const
Inequality operator
Color & set(const Balance::Green &value)
Set Balance::Green
Definition: Settings.h:2651
Color & set(const Experimental::ToneMapping::Enabled &value)
Set Experimental::ToneMapping::Enabled
Definition: Settings.h:2691
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:2719
friend std::ostream & operator<<(std::ostream &stream, const Color &value)
Operator to send the value as string to a stream
Definition: Settings.h:2828
Color & set(const Experimental &value)
Set Experimental
Definition: Settings.h:2677
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:2606
const Gamma & gamma() const
Get Gamma
Definition: Settings.h:2698
Experimental & experimental()
Get Experimental
Definition: Settings.h:2671
Color(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:2534
Color & set(const Balance::Red &value)
Set Balance::Red
Definition: Settings.h:2658
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:2802
Color & set(const Balance::Blue &value)
Set Balance::Blue
Definition: Settings.h:2644
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:2949
bool ValueType
The type of the underlying value
Definition: Settings.h:2944
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:2958
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:2978
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:2990
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:2984
Higher values gives more correction.
Definition: Settings.h:3005
double ValueType
The type of the underlying value
Definition: Settings.h:3024
bool operator>(const Strength &other) const
Comparison operator
Definition: Settings.h:3074
bool operator!=(const Strength &other) const
Comparison operator
Definition: Settings.h:3062
constexpr Strength(double value)
Constructor
Definition: Settings.h:3036
friend std::ostream & operator<<(std::ostream &stream, const Strength &value)
Operator to serialize the value to a stream
Definition: Settings.h:3080
bool operator<(const Strength &other) const
Comparison operator
Definition: Settings.h:3068
static constexpr Range< double > validRange()
The range of valid values for Strength
Definition: Settings.h:3027
bool operator==(const Strength &other) const
Comparison operator
Definition: Settings.h:3056
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:3290
friend std::ostream & operator<<(std::ostream &stream, const Correction &value)
Operator to send the value as string to a stream
Definition: Settings.h:3314
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength > Descendants
Definition: Settings.h:3105
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:3192
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:3255
Correction & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3223
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:3268
bool operator!=(const Correction &other) const
Inequality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3211
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3159
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3298
Correction & set(const Strength &value)
Set Strength
Definition: Settings.h:3242
const Strength & strength() const
Get Strength
Definition: Settings.h:3230
Correction(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3132
static const Enabled yes
On/enabled.
Definition: Settings.h:3370
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:3383
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:3409
bool ValueType
The type of the underlying value
Definition: Settings.h:3369
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:3415
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:3403
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:3374
static const Enabled no
Off/disabled.
Definition: Settings.h:3371
Higher values remove more points.
Definition: Settings.h:3430
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:3452
constexpr Threshold(double value)
Constructor
Definition: Settings.h:3461
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:3487
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:3505
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:3493
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:3481
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:3499
double ValueType
The type of the underlying value
Definition: Settings.h:3449
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:3713
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3584
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:3737
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:3636
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3557
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:3692
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:3617
Threshold & threshold()
Get Threshold
Definition: Settings.h:3661
std::tuple< Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled, Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold > Descendants
Definition: Settings.h:3530
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:3655
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:3680
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:3648
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:3721
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:3667
Corrects artifacts that appear when imaging scenes with large texture gradients or high contrast....
Definition: Settings.h:2887
Removal & removal()
Get Removal
Definition: Settings.h:3919
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:3950
Correction & correction()
Get Correction
Definition: Settings.h:3886
const Correction & correction() const
Get Correction
Definition: Settings.h:3880
ContrastDistortion & set(const Correction::Enabled &value)
Set Correction::Enabled
Definition: Settings.h:3899
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:4030
const Removal & removal() const
Get Removal
Definition: Settings.h:3913
friend std::ostream & operator<<(std::ostream &stream, const ContrastDistortion &value)
Operator to send the value as string to a stream
Definition: Settings.h:4054
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:3861
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:3761
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:3824
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4038
ContrastDistortion & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:3939
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:3975
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:3962
ContrastDistortion & set(const Correction::Strength &value)
Set Correction::Strength
Definition: Settings.h:3906
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4009
ContrastDistortion & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:3932
ContrastDistortion & set(const Correction &value)
Set Correction
Definition: Settings.h:3892
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:3986
bool operator==(const ContrastDistortion &other) const
Equality operator
ContrastDistortion(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:3792
ContrastDistortion & set(const Removal &value)
Set Removal
Definition: Settings.h:3925
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:3996
Experimental filters. These may be renamed, moved or deleted in the future.
Definition: Settings.h:2865
Experimental & set(const ContrastDistortion::Correction::Strength &value)
Set ContrastDistortion::Correction::Strength
Definition: Settings.h:4233
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4355
Experimental & set(const ContrastDistortion::Removal &value)
Set ContrastDistortion::Removal
Definition: Settings.h:4240
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:4181
Experimental(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4111
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4143
Experimental & set(const ContrastDistortion &value)
Set ContrastDistortion
Definition: Settings.h:4212
ContrastDistortion & contrastDistortion()
Get ContrastDistortion
Definition: Settings.h:4206
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:4333
friend std::ostream & operator<<(std::ostream &stream, const Experimental &value)
Operator to send the value as string to a stream
Definition: Settings.h:4370
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:4348
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:4298
Experimental & set(const ContrastDistortion::Correction::Enabled &value)
Set ContrastDistortion::Correction::Enabled
Definition: Settings.h:4226
Experimental & set(const ContrastDistortion::Removal::Enabled &value)
Set ContrastDistortion::Removal::Enabled
Definition: Settings.h:4247
bool operator!=(const Experimental &other) const
Inequality operator
const ContrastDistortion & contrastDistortion() const
Get ContrastDistortion
Definition: Settings.h:4200
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:4286
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:4265
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:4079
Experimental & set(const ContrastDistortion::Removal::Threshold &value)
Set ContrastDistortion::Removal::Threshold
Definition: Settings.h:4254
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:4275
Experimental & set(const ContrastDistortion::Correction &value)
Set ContrastDistortion::Correction
Definition: Settings.h:4219
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:4311
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:4322
Enable or disable the SNR filter
Definition: Settings.h:4425
static const Enabled yes
On/enabled.
Definition: Settings.h:4443
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:4482
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:4476
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:4456
static const Enabled no
Off/disabled.
Definition: Settings.h:4444
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:4447
bool ValueType
The type of the underlying value
Definition: Settings.h:4442
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:4488
std::string toString() const
Get the value as string
Discard points with signal-to-noise ratio (SNR) below the given value
Definition: Settings.h:4503
constexpr Threshold(double value)
Constructor
Definition: Settings.h:4532
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:4552
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:4576
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:4523
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:4570
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:4564
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:4520
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:4558
Discard points with signal-to-noise ratio (SNR) values below a threshold
Definition: Settings.h:4407
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4627
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:4718
std::tuple< Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:4600
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:4706
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:4712
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:4725
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:4747
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:4799
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:4783
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4654
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:4775
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:4756
Threshold & threshold()
Get Threshold
Definition: Settings.h:4731
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:4687
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:4737
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:4389
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:4995
std::string toString() const
Get the value as string
Noise(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:4847
Removal & removal()
Get Removal
Definition: Settings.h:4934
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:4909
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5002
Noise & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:4954
Noise & set(const Removal &value)
Set Removal
Definition: Settings.h:4940
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:4973
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:4964
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:4982
std::tuple< Settings::Processing::Filters::Noise::Removal, Settings::Processing::Filters::Noise::Removal::Enabled, Settings::Processing::Filters::Noise::Removal::Threshold > Descendants
Definition: Settings.h:4819
Noise & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:4947
const Removal & removal() const
Get Removal
Definition: Settings.h:4928
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:4875
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:5017
bool operator==(const Noise &other) const
Equality operator
Enable or disable the outlier filter
Definition: Settings.h:5072
bool ValueType
The type of the underlying value
Definition: Settings.h:5089
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5129
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5103
static const Enabled no
Off/disabled.
Definition: Settings.h:5091
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5094
std::string toString() const
Get the value as string
static const Enabled yes
On/enabled.
Definition: Settings.h:5090
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5135
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5123
Discard point if Euclidean distance to neighboring points is above the given value
Definition: Settings.h:5150
friend std::ostream & operator<<(std::ostream &stream, const Threshold &value)
Operator to serialize the value to a stream
Definition: Settings.h:5223
constexpr Threshold(double value)
Constructor
Definition: Settings.h:5179
bool operator<(const Threshold &other) const
Comparison operator
Definition: Settings.h:5211
bool operator==(const Threshold &other) const
Comparison operator
Definition: Settings.h:5199
bool operator!=(const Threshold &other) const
Comparison operator
Definition: Settings.h:5205
static constexpr Range< double > validRange()
The range of valid values for Threshold
Definition: Settings.h:5170
bool operator>(const Threshold &other) const
Comparison operator
Definition: Settings.h:5217
std::string toString() const
Get the value as string
double ValueType
The type of the underlying value
Definition: Settings.h:5167
Discard point if Euclidean distance to neighboring points is above a threshold
Definition: Settings.h:5054
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5365
bool operator!=(const Removal &other) const
Inequality operator
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5403
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:5334
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5353
Removal & set(const Threshold &value)
Set Threshold
Definition: Settings.h:5384
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5446
const Threshold & threshold() const
Get Threshold
Definition: Settings.h:5372
std::tuple< Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5247
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5274
std::string toString() const
Get the value as string
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5359
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:5422
bool operator==(const Removal &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5301
Threshold & threshold()
Get Threshold
Definition: Settings.h:5378
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5394
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5430
Contains a filter that removes points with large Euclidean distance to neighboring points
Definition: Settings.h:5036
Outlier & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:5594
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:5629
Outlier(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5494
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5649
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:5611
Outlier & set(const Removal &value)
Set Removal
Definition: Settings.h:5587
std::string toString() const
Get the value as string
const Removal & removal() const
Get Removal
Definition: Settings.h:5575
std::tuple< Settings::Processing::Filters::Outlier::Removal, Settings::Processing::Filters::Outlier::Removal::Enabled, Settings::Processing::Filters::Outlier::Removal::Threshold > Descendants
Definition: Settings.h:5466
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:5642
bool operator!=(const Outlier &other) const
Inequality operator
Outlier & set(const Removal::Threshold &value)
Set Removal::Threshold
Definition: Settings.h:5601
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:5620
Removal & removal()
Get Removal
Definition: Settings.h:5581
friend std::ostream & operator<<(std::ostream &stream, const Outlier &value)
Operator to send the value as string to a stream
Definition: Settings.h:5664
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:5556
bool operator==(const Outlier &other) const
Equality operator
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:5522
Enable or disable the reflection filter. Note that this filter is computationally intensive and may a...
Definition: Settings.h:5719
bool ValueType
The type of the underlying value
Definition: Settings.h:5736
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:5741
static const Enabled yes
On/enabled.
Definition: Settings.h:5737
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:5776
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:5750
std::string toString() const
Get the value as string
static const Enabled no
Off/disabled.
Definition: Settings.h:5738
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:5782
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:5770
Discard points likely introduced by reflections (useful for shiny materials)
Definition: Settings.h:5701
std::tuple< Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:5795
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:5847
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:5921
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:5904
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:5934
friend std::ostream & operator<<(std::ostream &stream, const Removal &value)
Operator to send the value as string to a stream
Definition: Settings.h:5956
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:5879
Removal(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:5821
Removal & set(const Enabled &value)
Set Enabled
Definition: Settings.h:5910
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:5898
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:5941
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:5683
const Removal & removal() const
Get Removal
Definition: Settings.h:6080
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:6028
Removal & removal()
Get Removal
Definition: Settings.h:6086
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:6109
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6138
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:6131
Reflection & set(const Removal::Enabled &value)
Set Removal::Enabled
Definition: Settings.h:6099
std::tuple< Settings::Processing::Filters::Reflection::Removal, Settings::Processing::Filters::Reflection::Removal::Enabled > Descendants
Definition: Settings.h:5974
Reflection & set(const Removal &value)
Set Removal
Definition: Settings.h:6092
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:6118
Reflection(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6001
friend std::ostream & operator<<(std::ostream &stream, const Reflection &value)
Operator to send the value as string to a stream
Definition: Settings.h:6153
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:6061
Enable or disable the smoothing filter
Definition: Settings.h:6206
static std::set< bool > validValues()
All valid values of Enabled
Definition: Settings.h:6228
bool ValueType
The type of the underlying value
Definition: Settings.h:6223
bool operator!=(const Enabled &other) const
Comparison operator
Definition: Settings.h:6263
static const Enabled yes
On/enabled.
Definition: Settings.h:6224
bool operator==(const Enabled &other) const
Comparison operator
Definition: Settings.h:6257
static const Enabled no
Off/disabled.
Definition: Settings.h:6225
friend std::ostream & operator<<(std::ostream &stream, const Enabled &value)
Operator to serialize the value to a stream
Definition: Settings.h:6269
constexpr Enabled(bool value)
Constructor
Definition: Settings.h:6237
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:6284
double ValueType
The type of the underlying value
Definition: Settings.h:6301
bool operator!=(const Sigma &other) const
Comparison operator
Definition: Settings.h:6339
bool operator>(const Sigma &other) const
Comparison operator
Definition: Settings.h:6351
constexpr Sigma(double value)
Constructor
Definition: Settings.h:6313
static constexpr Range< double > validRange()
The range of valid values for Sigma
Definition: Settings.h:6304
bool operator==(const Sigma &other) const
Comparison operator
Definition: Settings.h:6333
std::string toString() const
Get the value as string
bool operator<(const Sigma &other) const
Comparison operator
Definition: Settings.h:6345
friend std::ostream & operator<<(std::ostream &stream, const Sigma &value)
Operator to serialize the value to a stream
Definition: Settings.h:6357
Gaussian smoothing of the point cloud
Definition: Settings.h:6188
Sigma & sigma()
Get Sigma
Definition: Settings.h:6512
friend std::ostream & operator<<(std::ostream &stream, const Gaussian &value)
Operator to send the value as string to a stream
Definition: Settings.h:6581
const Sigma & sigma() const
Get Sigma
Definition: Settings.h:6506
Gaussian & set(const Enabled &value)
Set Enabled
Definition: Settings.h:6499
Gaussian(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6408
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:6538
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:6557
Enabled & isEnabled()
Get Enabled
Definition: Settings.h:6493
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6381
bool operator==(const Gaussian &other) const
Equality operator
const Enabled & isEnabled() const
Get Enabled
Definition: Settings.h:6487
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:6518
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:6468
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:6529
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6435
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6565
Smoothing filters
Definition: Settings.h:6172
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:6691
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6657
Smoothing & set(const Gaussian::Enabled &value)
Set Gaussian::Enabled
Definition: Settings.h:6729
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:6784
friend std::ostream & operator<<(std::ostream &stream, const Smoothing &value)
Operator to send the value as string to a stream
Definition: Settings.h:6799
bool operator!=(const Smoothing &other) const
Inequality operator
const Gaussian & gaussian() const
Get Gaussian
Definition: Settings.h:6710
Smoothing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6629
Smoothing & set(const Gaussian::Sigma &value)
Set Gaussian::Sigma
Definition: Settings.h:6736
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:6777
Gaussian & gaussian()
Get Gaussian
Definition: Settings.h:6716
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:6746
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:6764
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:6755
Smoothing & set(const Gaussian &value)
Set Gaussian
Definition: Settings.h:6722
std::tuple< Settings::Processing::Filters::Smoothing::Gaussian, Settings::Processing::Filters::Smoothing::Gaussian::Enabled, Settings::Processing::Filters::Smoothing::Gaussian::Sigma > Descendants
Definition: Settings.h:6601
Filters
Definition: Settings.h:2849
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:7485
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:7367
Noise & noise()
Get Noise
Definition: Settings.h:7082
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:6989
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:7393
std::string toString() const
Get the value as string
const Reflection & reflection() const
Get Reflection
Definition: Settings.h:7156
const Noise & noise() const
Get Noise
Definition: Settings.h:7076
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:7376
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:7349
Reflection & reflection()
Get Reflection
Definition: Settings.h:7162
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:7295
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:7240
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:7419
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:6839
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:7332
Filters & set(const Reflection::Removal::Enabled &value)
Set Reflection::Removal::Enabled
Definition: Settings.h:7182
Filters & set(const Noise::Removal::Threshold &value)
Set Noise::Removal::Threshold
Definition: Settings.h:7109
Filters & set(const Smoothing &value)
Set Smoothing
Definition: Settings.h:7201
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:7410
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:7323
Filters & set(const Experimental::ContrastDistortion::Correction &value)
Set Experimental::ContrastDistortion::Correction
Definition: Settings.h:7034
Filters & set(const Smoothing::Gaussian::Enabled &value)
Set Smoothing::Gaussian::Enabled
Definition: Settings.h:7215
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:6935
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:7284
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:7437
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:7315
Filters & set(const Smoothing::Gaussian &value)
Set Smoothing::Gaussian
Definition: Settings.h:7208
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:7428
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:7358
Filters & set(const Outlier::Removal::Threshold &value)
Set Outlier::Removal::Threshold
Definition: Settings.h:7149
Filters & set(const Noise::Removal &value)
Set Noise::Removal
Definition: Settings.h:7095
Filters & set(const Reflection &value)
Set Reflection
Definition: Settings.h:7168
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:7474
Filters & set(const Noise &value)
Set Noise
Definition: Settings.h:7088
Filters & set(const Experimental::ContrastDistortion::Correction::Enabled &value)
Set Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7041
Filters & set(const Experimental::ContrastDistortion::Removal::Threshold &value)
Set Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7069
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:7306
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:7384
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:7262
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:7231
friend std::ostream & operator<<(std::ostream &stream, const Filters &value)
Operator to send the value as string to a stream
Definition: Settings.h:7504
Filters & set(const Experimental::ContrastDistortion::Removal &value)
Set Experimental::ContrastDistortion::Removal
Definition: Settings.h:7055
Filters & set(const Outlier &value)
Set Outlier
Definition: Settings.h:7128
bool operator==(const Filters &other) const
Equality operator
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:7251
Filters(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:6887
const Smoothing & smoothing() const
Get Smoothing
Definition: Settings.h:7189
Filters & set(const Noise::Removal::Enabled &value)
Set Noise::Removal::Enabled
Definition: Settings.h:7102
Filters & set(const Experimental::ContrastDistortion &value)
Set Experimental::ContrastDistortion
Definition: Settings.h:7027
Filters & set(const Outlier::Removal &value)
Set Outlier::Removal
Definition: Settings.h:7135
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:7402
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:7341
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:7008
Filters & set(const Outlier::Removal::Enabled &value)
Set Outlier::Removal::Enabled
Definition: Settings.h:7142
Filters & set(const Smoothing::Gaussian::Sigma &value)
Set Smoothing::Gaussian::Sigma
Definition: Settings.h:7222
const Outlier & outlier() const
Get Outlier
Definition: Settings.h:7116
Filters & set(const Reflection::Removal &value)
Set Reflection::Removal
Definition: Settings.h:7175
Filters & set(const Experimental::ContrastDistortion::Correction::Strength &value)
Set Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7048
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:7273
Outlier & outlier()
Get Outlier
Definition: Settings.h:7122
Filters & set(const Experimental::ContrastDistortion::Removal::Enabled &value)
Set Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7062
Experimental & experimental()
Get Experimental
Definition: Settings.h:7014
Smoothing & smoothing()
Get Smoothing
Definition: Settings.h:7195
Filters & set(const Experimental &value)
Set Experimental
Definition: Settings.h:7020
Settings related to processing of a capture, including filters and color balance
Definition: Settings.h:1268
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:8153
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:7558
Color & color()
Get Color
Definition: Settings.h:7761
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:8266
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:7737
Processing & set(const Filters::Reflection::Removal::Enabled &value)
Set Filters::Reflection::Removal::Enabled
Definition: Settings.h:7975
Processing & set(const Filters::Outlier::Removal::Threshold &value)
Set Filters::Outlier::Removal::Threshold
Definition: Settings.h:7954
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:8069
Processing & set(const Filters::Reflection::Removal &value)
Set Filters::Reflection::Removal
Definition: Settings.h:7968
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:7898
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:8258
Processing & set(const Filters::Outlier::Removal::Enabled &value)
Set Filters::Outlier::Removal::Enabled
Definition: Settings.h:7947
Processing & set(const Color::Experimental &value)
Set Color::Experimental
Definition: Settings.h:7802
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:8215
Processing()
Default constructor
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:8060
Processing & set(const Filters::Smoothing &value)
Set Filters::Smoothing
Definition: Settings.h:7982
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:8091
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8035
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:8051
std::string toString() const
Get the value as string
Filters & filters()
Get Filters
Definition: Settings.h:7836
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8043
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:8274
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:7870
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:8241
Processing & set(const Filters::Reflection &value)
Set Filters::Reflection
Definition: Settings.h:7961
Processing & set(const Filters::Noise::Removal::Threshold &value)
Set Filters::Noise::Removal::Threshold
Definition: Settings.h:7926
Processing & set(const Filters::Smoothing::Gaussian &value)
Set Filters::Smoothing::Gaussian
Definition: Settings.h:7989
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:8319
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:8142
const Filters & filters() const
Get Filters
Definition: Settings.h:7830
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:8207
Processing & set(const Filters::Noise &value)
Set Filters::Noise
Definition: Settings.h:7905
Processing & set(const Filters::Experimental::ContrastDistortion::Correction &value)
Set Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:7863
Processing & set(const Color &value)
Set Color
Definition: Settings.h:7767
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:8283
const Settings::Processing::Filters & get() const
Definition: Settings.h:8083
Processing & set(const Filters::Smoothing::Gaussian::Sigma &value)
Set Filters::Smoothing::Gaussian::Sigma
Definition: Settings.h:8003
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:8233
friend std::ostream & operator<<(std::ostream &stream, const Processing &value)
Operator to send the value as string to a stream
Definition: Settings.h:8335
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:8100
Processing & set(const Filters::Experimental::ContrastDistortion::Removal &value)
Set Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:7884
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:8224
Processing & set(const Color::Balance &value)
Set Color::Balance
Definition: Settings.h:7774
const Color & color() const
Get Color
Definition: Settings.h:7755
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:8120
Processing & set(const Filters::Experimental &value)
Set Filters::Experimental
Definition: Settings.h:7849
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:8110
Processing & set(const Filters::Noise::Removal::Enabled &value)
Set Filters::Noise::Removal::Enabled
Definition: Settings.h:7919
Processing & set(const Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:7891
Processing & set(const Filters::Experimental::ContrastDistortion &value)
Set Filters::Experimental::ContrastDistortion
Definition: Settings.h:7856
Processing(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:7616
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:8199
Processing & set(const Color::Experimental::ToneMapping::Enabled &value)
Set Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:7816
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8019
Processing & set(const Color::Balance::Red &value)
Set Color::Balance::Red
Definition: Settings.h:7795
bool operator==(const Processing &other) const
Equality operator
Processing & set(const Filters::Outlier::Removal &value)
Set Filters::Outlier::Removal
Definition: Settings.h:7940
Processing & set(const Color::Balance::Green &value)
Set Color::Balance::Green
Definition: Settings.h:7788
bool operator!=(const Processing &other) const
Inequality operator
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:8173
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:8076
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:7674
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8027
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:8131
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:8249
Processing & set(const Filters &value)
Set Filters
Definition: Settings.h:7842
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:8190
Processing & set(const Color::Balance::Blue &value)
Set Color::Balance::Blue
Definition: Settings.h:7781
Processing & set(const Color::Gamma &value)
Set Color::Gamma
Definition: Settings.h:7823
Processing & set(const Filters::Smoothing::Gaussian::Enabled &value)
Set Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:7996
Processing & set(const Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:7877
const Settings::Processing::Color & get() const
Definition: Settings.h:8011
Processing & set(const Color::Experimental::ToneMapping &value)
Set Color::Experimental::ToneMapping
Definition: Settings.h:7809
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:8181
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:8164
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:8311
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:8292
Processing & set(const Filters::Outlier &value)
Set Filters::Outlier
Definition: Settings.h:7933
Processing & set(const Filters::Noise::Removal &value)
Set Filters::Noise::Removal
Definition: Settings.h:7912
Settings used when capturing with a Zivid camera
Definition: Settings.h:76
Settings & set(const Processing::Filters::Experimental &value)
Set Processing::Filters::Experimental
Definition: Settings.h:8736
Settings(Args &&...args)
Constructor taking variadic number of arguments
Definition: Settings.h:8455
Settings & set(const Processing::Filters::Noise::Removal::Enabled &value)
Set Processing::Filters::Noise::Removal::Enabled
Definition: Settings.h:8806
Experimental & experimental()
Get Experimental
Definition: Settings.h:8627
Settings & set(const Processing::Color::Balance::Red &value)
Set Processing::Color::Balance::Red
Definition: Settings.h:8694
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal
Definition: Settings.h:8771
const Settings::Acquisitions & get() const
Definition: Settings.h:8897
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength & get() const
Definition: Settings.h:9043
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:8584
const Settings::Processing::Color::Balance & get() const
Definition: Settings.h:8930
Settings & set(const Processing::Filters::Outlier::Removal::Enabled &value)
Set Processing::Filters::Outlier::Removal::Enabled
Definition: Settings.h:8834
Settings & set(const Processing::Filters::Reflection::Removal::Enabled &value)
Set Processing::Filters::Reflection::Removal::Enabled
Definition: Settings.h:8862
Settings & set(const Processing::Filters::Smoothing::Gaussian::Enabled &value)
Set Processing::Filters::Smoothing::Gaussian::Enabled
Definition: Settings.h:8883
const Settings::Processing::Color::Balance::Blue & get() const
Definition: Settings.h:8938
Settings & set(const Processing::Filters::Noise::Removal::Threshold &value)
Set Processing::Filters::Noise::Removal::Threshold
Definition: Settings.h:8813
const Settings::Processing::Filters::Noise::Removal::Threshold & get() const
Definition: Settings.h:9109
Settings & set(const Processing::Color::Balance::Green &value)
Set Processing::Color::Balance::Green
Definition: Settings.h:8687
const Settings::Processing::Filters::Experimental::ContrastDistortion & get() const
Definition: Settings.h:9010
Settings & set(const Processing::Color &value)
Set Processing::Color
Definition: Settings.h:8666
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled & get() const
Definition: Settings.h:9064
const Settings::Processing::Filters::Reflection::Removal & get() const
Definition: Settings.h:9158
const Settings::Processing::Color::Experimental::ToneMapping::Enabled & get() const
Definition: Settings.h:8979
const Settings::Processing::Filters & get() const
Definition: Settings.h:8993
Settings & set(const Processing::Color::Gamma &value)
Set Processing::Color::Gamma
Definition: Settings.h:8722
const Settings::Processing::Filters::Noise & get() const
Definition: Settings.h:9084
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Strength &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Strength
Definition: Settings.h:8764
const Settings::Experimental & get() const
Definition: Settings.h:8903
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:8701
Settings & set(const Processing::Filters::Reflection &value)
Set Processing::Filters::Reflection
Definition: Settings.h:8848
Settings & set(const Processing::Color::Balance::Blue &value)
Set Processing::Color::Balance::Blue
Definition: Settings.h:8680
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold
Definition: Settings.h:8785
const Settings::Processing::Filters::Noise::Removal::Enabled & get() const
Definition: Settings.h:9100
const Settings::Processing::Color::Experimental::ToneMapping & get() const
Definition: Settings.h:8970
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:9226
const Acquisitions & acquisitions() const
Get Acquisitions
Definition: Settings.h:8602
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled
Definition: Settings.h:8778
Settings & set(const Processing::Filters::Smoothing::Gaussian &value)
Set Processing::Filters::Smoothing::Gaussian
Definition: Settings.h:8876
const Settings::Processing::Filters::Smoothing & get() const
Definition: Settings.h:9175
friend std::ostream & operator<<(std::ostream &stream, const Settings &value)
Operator to send the value as string to a stream
Definition: Settings.h:9252
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter
Definition: Settings.h:9235
const Settings::Processing & get() const
Definition: Settings.h:8916
Settings()
Default constructor
Settings & set(const Processing::Filters::Reflection::Removal &value)
Set Processing::Filters::Reflection::Removal
Definition: Settings.h:8855
Settings & set(const Processing::Color::Experimental::ToneMapping &value)
Set Processing::Color::Experimental::ToneMapping
Definition: Settings.h:8708
void set(Args &&...args)
Set multiple arguments
Definition: Settings.h:8517
const Settings::Processing::Color & get() const
Definition: Settings.h:8923
Settings & set(const Processing::Filters::Smoothing &value)
Set Processing::Filters::Smoothing
Definition: Settings.h:8869
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:8890
const Settings::Processing::Filters::Noise::Removal & get() const
Definition: Settings.h:9092
const Settings::Processing::Filters::Outlier & get() const
Definition: Settings.h:9116
Settings & set(const Processing::Color::Balance &value)
Set Processing::Color::Balance
Definition: Settings.h:8673
Settings & set(const Acquisitions &value)
Set Acquisitions
Definition: Settings.h:8614
Processing & processing()
Get Processing
Definition: Settings.h:8653
Settings & set(const Processing::Filters::Experimental::ContrastDistortion &value)
Set Processing::Filters::Experimental::ContrastDistortion
Definition: Settings.h:8743
Settings & set(const Processing::Filters::Noise::Removal &value)
Set Processing::Filters::Noise::Removal
Definition: Settings.h:8799
const Processing & processing() const
Get Processing
Definition: Settings.h:8647
bool operator==(const Settings &other) const
Equality operator
const Settings::Processing::Filters::Experimental & get() const
Definition: Settings.h:9001
const Settings::Experimental::Engine & get() const
Definition: Settings.h:8910
Settings(const std::string &fileName)
Construct Settings by loading from file
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction & get() const
Definition: Settings.h:9020
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled
Definition: Settings.h:8757
Settings & set(const Processing::Filters::Outlier &value)
Set Processing::Filters::Outlier
Definition: Settings.h:8820
const Settings::Processing::Filters::Smoothing::Gaussian::Enabled & get() const
Definition: Settings.h:9192
Acquisitions & acquisitions()
Get Acquisitions
Definition: Settings.h:8608
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:8390
const Settings::Processing::Filters::Smoothing::Gaussian & get() const
Definition: Settings.h:9183
std::string toString() const
Get the value as string
const Settings::Processing::Color::Experimental & get() const
Definition: Settings.h:8962
const Experimental & experimental() const
Get Experimental
Definition: Settings.h:8621
Settings & set(const Experimental::Engine &value)
Set Experimental::Engine
Definition: Settings.h:8640
const Settings::Processing::Filters::Reflection::Removal::Enabled & get() const
Definition: Settings.h:9167
const Settings::Processing::Filters::Reflection & get() const
Definition: Settings.h:9150
const Settings::Processing::Color::Balance::Red & get() const
Definition: Settings.h:8954
Settings & set(const Processing::Filters::Noise &value)
Set Processing::Filters::Noise
Definition: Settings.h:8792
Settings & set(const Processing::Color::Experimental::ToneMapping::Enabled &value)
Set Processing::Color::Experimental::ToneMapping::Enabled
Definition: Settings.h:8715
bool operator!=(const Settings &other) const
Inequality operator
Settings & set(const Processing &value)
Set Processing
Definition: Settings.h:8659
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal & get() const
Definition: Settings.h:9053
Settings & set(const Processing::Filters &value)
Set Processing::Filters
Definition: Settings.h:8729
const Settings::Processing::Color::Gamma & get() const
Definition: Settings.h:8986
Settings & set(const Experimental &value)
Set Experimental
Definition: Settings.h:8633
Settings & set(const Processing::Filters::Outlier::Removal::Threshold &value)
Set Processing::Filters::Outlier::Removal::Threshold
Definition: Settings.h:8841
const Settings::Processing::Filters::Smoothing::Gaussian::Sigma & get() const
Definition: Settings.h:9201
const Settings::Processing::Filters::Outlier::Removal::Threshold & get() const
Definition: Settings.h:9142
Settings & set(const Processing::Filters::Outlier::Removal &value)
Set Processing::Filters::Outlier::Removal
Definition: Settings.h:8827
const Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled & get() const
Definition: Settings.h:9031
const Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold & get() const
Definition: Settings.h:9076
const Settings::Processing::Filters::Outlier::Removal::Enabled & get() const
Definition: Settings.h:9133
const Settings::Processing::Filters::Outlier::Removal & get() const
Definition: Settings.h:9124
const Settings::Processing::Color::Balance::Green & get() const
Definition: Settings.h:8946
Settings & set(const Processing::Filters::Experimental::ContrastDistortion::Correction &value)
Set Processing::Filters::Experimental::ContrastDistortion::Correction
Definition: Settings.h:8750
NodeType
Definition: NodeType.h:56
Ret validRange(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:158
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:55