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 = TypeTraits::TypeIdentity<T>;
91 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength);
95 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold);
119 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled);
122 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled);
134 class DefaultDataModelSetter
136 const CameraInfo &m_cameraInfo;
139 DefaultDataModelSetter(
const CameraInfo &cameraInfo)
140 : m_cameraInfo(cameraInfo)
143 DefaultDataModelSetter(
const DefaultDataModelSetter &) =
delete;
144 DefaultDataModelSetter(DefaultDataModelSetter &&) =
delete;
145 DefaultDataModelSetter &operator=(
const DefaultDataModelSetter &) =
delete;
146 DefaultDataModelSetter &operator=(DefaultDataModelSetter &&) =
delete;
149 void operator()(T &dataModelNode)
const;
152 template<typename T, typename std::enable_if<T::nodeType == DataModel::NodeType::group, bool>::type =
true>
153 T defaultValue(Tag<T> ,
const CameraInfo &cameraInfo)
156 group.forEach(DefaultDataModelSetter(cameraInfo));
161 void DefaultDataModelSetter::operator()(T &dataModelNode)
const
163 dataModelNode = defaultValue(Tag<T>{}, m_cameraInfo);
168 namespace Experimental
170 namespace SettingsInfo
175 return Detail::defaultValue(Detail::Tag<T>{}, cameraInfo);
181 return Detail::validValues(Detail::Tag<T>{}, cameraInfo);
184 template<
typename T,
typename Ret = Range<
typename T::ValueType>>
187 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:79
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:80
T defaultValue(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:173
ZIVID_CORE_EXPORT Resolution resolution(const CameraInfo &cameraInfo, const Settings &settings)
Ret validRange(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:185
std::set< typename T::ValueType > validValues(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:179
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:56