54#define ZIVID_DETAIL_CAMERA_DEFAULT_VALUE(T) ZIVID_CORE_EXPORT T defaultValue(Tag<T> tag, const CameraInfo &cameraInfo);
56#define ZIVID_DETAIL_CAMERA_VALID_VALUES(T) \
57 ZIVID_DETAIL_CAMERA_DEFAULT_VALUE(T) \
58 ZIVID_CORE_EXPORT std::set<T::ValueType> validValues(Tag<T> tag, const CameraInfo &cameraInfo)
60#define ZIVID_DETAIL_CAMERA_VALID_RANGE(T) \
61 ZIVID_DETAIL_CAMERA_DEFAULT_VALUE(T) \
62 ZIVID_CORE_EXPORT Range<T::ValueType> validRange(Tag<T> tag, const CameraInfo &cameraInfo)
71 using Tag = Detail::TypeTraits::TypeIdentity<T>;
91 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength);
95 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold);
118 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled);
121 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled);
133 class DefaultDataModelSetter
135 const CameraInfo &m_cameraInfo;
138 DefaultDataModelSetter(
const CameraInfo &cameraInfo)
139 : m_cameraInfo(cameraInfo)
142 DefaultDataModelSetter(
const DefaultDataModelSetter &) =
delete;
143 DefaultDataModelSetter(DefaultDataModelSetter &&) =
delete;
144 DefaultDataModelSetter &operator=(
const DefaultDataModelSetter &) =
delete;
145 DefaultDataModelSetter &operator=(DefaultDataModelSetter &&) =
delete;
148 void operator()(T &dataModelNode)
const;
151 template<typename T, typename std::enable_if<T::nodeType == DataModel::NodeType::group, bool>::type =
true>
152 T defaultValue(Tag<T> ,
const CameraInfo &cameraInfo)
155 group.forEach(DefaultDataModelSetter(cameraInfo));
160 void DefaultDataModelSetter::operator()(T &dataModelNode)
const
162 dataModelNode = defaultValue(Tag<T>{}, m_cameraInfo);
167 namespace Experimental
169 namespace SettingsInfo
174 return Detail::defaultValue(Detail::Tag<T>{}, cameraInfo);
180 return Detail::validValues(Detail::Tag<T>{}, cameraInfo);
183 template<
typename T,
typename Ret = Range<
typename T::ValueType>>
186 return Detail::validRange(Detail::Tag<T>{}, cameraInfo);
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
#define ZIVID_DETAIL_CAMERA_VALID_RANGE(T)
Definition SettingsInfo.h:60
#define ZIVID_DETAIL_CAMERA_DEFAULT_VALUE(T)
Definition SettingsInfo.h:54
#define ZIVID_DETAIL_CAMERA_VALID_VALUES(T)
Definition SettingsInfo.h:56
Information about camera model, serial number etc.
Definition CameraInfo.h:78
Class describing a resolution with a width and a height.
Definition Resolution.h:56
Settings used when capturing with a Zivid camera.
Definition Settings.h:79
T defaultValue(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:172
ZIVID_CORE_EXPORT Resolution resolution(const CameraInfo &cameraInfo, const Settings &settings)
Ret validRange(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:184
std::set< typename T::ValueType > validValues(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:178
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:54