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>;
92 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Strength);
96 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Threshold);
121 Settings::Processing::Filters::Experimental::ContrastDistortion::Correction::Enabled);
124 Settings::Processing::Filters::Experimental::ContrastDistortion::Removal::Enabled);
136 class DefaultDataModelSetter
138 const CameraInfo &m_cameraInfo;
141 DefaultDataModelSetter(
const CameraInfo &cameraInfo)
142 : m_cameraInfo(cameraInfo)
145 DefaultDataModelSetter(
const DefaultDataModelSetter &) =
delete;
146 DefaultDataModelSetter(DefaultDataModelSetter &&) =
delete;
147 DefaultDataModelSetter &operator=(
const DefaultDataModelSetter &) =
delete;
148 DefaultDataModelSetter &operator=(DefaultDataModelSetter &&) =
delete;
151 void operator()(T &dataModelNode)
const;
154 template<
typename T,
typename std::enable_if_t<T::nodeType == DataModel::NodeType::group,
bool> = true>
155 T defaultValue(Tag<T> ,
const CameraInfo &cameraInfo)
158 group.forEach(DefaultDataModelSetter(cameraInfo));
163 void DefaultDataModelSetter::operator()(T &dataModelNode)
const
165 dataModelNode = defaultValue(Tag<T>{}, m_cameraInfo);
168 ZIVID_CORE_EXPORT void validateSettings(
const Settings &settings,
const CameraInfo &cameraInfo);
169 ZIVID_CORE_EXPORT void validateSettings(
const Settings2D &settings,
const CameraInfo &cameraInfo);
173 namespace Experimental
175 namespace SettingsInfo
180 return Detail::defaultValue(Detail::Tag<T>{}, cameraInfo);
186 return Detail::validValues(Detail::Tag<T>{}, cameraInfo);
189 template<
typename T,
typename Ret = Range<
typename T::ValueType>>
192 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 a 3D capture or 2D+3D capture with a Zivid camera.
Definition Settings.h:81
T defaultValue(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:178
ZIVID_CORE_EXPORT Resolution resolution(const CameraInfo &cameraInfo, const Settings &settings)
Returns the resolution of captured frames according to the provided camera information and settings.
Ret validRange(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:190
std::set< typename T::ValueType > validValues(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:184
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:84