libvisiontransfer
10.8.0
|
The main Parameter class. A variant-like type with current and default values and a lot of metadata. Parameter data is softly typed, the getters and setters accept a template parameter and are interoperable; with the notable exception of Tensor-type parameters, which have specific accessors.
If OpenCv is included ahead of including this file in your project, header-only TYPE_TENSOR<->OpenCv adapters for cv::Size and cv::Mat are made available.
Definition at line 71 of file parameter.h.
#include <visiontransfer/parameter.h>
Classes | |
class | Pimpl |
Public Member Functions | |
VT_EXPORT | Parameter () |
VT_EXPORT | Parameter (const std::string &uid) |
VT_EXPORT | Parameter (const Parameter &other) |
VT_EXPORT | ~Parameter () |
VT_EXPORT Parameter & | operator= (const Parameter &other) |
VT_EXPORT std::string | getUid () const |
VT_EXPORT std::string | getName () const |
VT_EXPORT std::string | getModuleName () const |
VT_EXPORT std::string | getCategoryName () const |
VT_EXPORT std::string | getDescription () const |
VT_EXPORT std::string | getUnit () const |
VT_EXPORT ParameterValue::ParameterType | getType () const |
VT_EXPORT ParameterAccessMode | getAccessForConfig () const |
VT_EXPORT ParameterAccessMode | getAccessForApi () const |
VT_EXPORT Parameter & | setAccessForConfig (ParameterAccessMode mode) |
VT_EXPORT Parameter & | setAccessForApi (ParameterAccessMode mode) |
VT_EXPORT ParameterInteractionHint | getInteractionHint () const |
VT_EXPORT Parameter & | setInteractionHint (ParameterInteractionHint hint) |
VT_EXPORT bool | getIsModified () const |
VT_EXPORT bool | getIsPolled () const |
VT_EXPORT Parameter & | setIsPolled (bool mod) |
VT_EXPORT Parameter & | setIsModified (bool mod) |
VT_EXPORT GovernorType | getGovernorType () const |
VT_EXPORT std::string | getGovernorString () const |
VT_EXPORT Parameter & | setGovernor (GovernorType govType, const std::string &govStr) |
VT_EXPORT Parameter & | setGovernorPollString (const std::string &govStr) |
VT_EXPORT bool | getInvokeGovernorOnInit () const |
VT_EXPORT Parameter & | setInvokeGovernorOnInit (bool invoke) |
VT_EXPORT std::string | interpolateCommandLine (const ParameterValue &newVal, GovernorFunction fn=GOVERNOR_FN_CHANGE_VALUE) |
VT_EXPORT bool | isTensor () const |
VT_EXPORT bool | isScalar () const |
VT_EXPORT bool | isCommand () const |
VT_EXPORT unsigned int | getTensorDimension () const |
VT_EXPORT std::vector< unsigned int > | getTensorShape () const |
VT_EXPORT unsigned int | getTensorNumElements () const |
VT_EXPORT std::vector< double > | getTensorData () const |
VT_EXPORT std::vector< double > | getTensorDefaultData () const |
VT_EXPORT std::vector< double > & | getTensorDataReference () |
VT_EXPORT std::vector< double > & | getTensorDefaultDataReference () |
VT_EXPORT Parameter & | setTensorData (const std::vector< double > &data) |
VT_EXPORT Parameter & | setTensorDefaultData (const std::vector< double > &data) |
VT_EXPORT Parameter & | setName (const std::string &name) |
VT_EXPORT Parameter & | setModuleName (const std::string &n) |
VT_EXPORT Parameter & | setCategoryName (const std::string &n) |
VT_EXPORT Parameter & | setDescription (const std::string &d) |
VT_EXPORT Parameter & | setUnit (const std::string &d) |
VT_EXPORT Parameter & | setType (ParameterValue::ParameterType t) |
VT_EXPORT Parameter & | setAsTensor (const std::vector< unsigned int > &shape) |
template<typename T > | |
VT_EXPORT bool | isValidNewValue (T t) const |
VT_EXPORT bool | ensureValidDefault () |
VT_EXPORT bool | ensureValidCurrent () |
template<typename T > | |
VT_EXPORT T | enforceIncrement (T t) |
template<typename T > | |
VT_EXPORT Parameter & | setDefault (T t) |
template<typename T > | |
VT_EXPORT Parameter & | setRange (T mn, T mx) |
VT_EXPORT Parameter & | unsetRange () |
template<typename T > | |
VT_EXPORT Parameter & | setIncrement (T t) |
template<typename T > | |
VT_EXPORT Parameter & | setCurrent (T t) |
VT_EXPORT Parameter & | setCurrentFrom (const Parameter &from) |
VT_EXPORT Parameter & | setCurrentFromDefault () |
template<typename T > | |
VT_EXPORT Parameter & | setOptions (const std::vector< T > &opts, const std::vector< std::string > &descriptions) |
template<typename T > | |
VT_EXPORT Parameter & | setOptions (std::initializer_list< T > opts, std::initializer_list< std::string > descriptions) |
template<typename T > | |
VT_EXPORT std::vector< T > | getOptions () const |
VT_EXPORT std::vector< std::string > | getOptionDescriptions () const |
VT_EXPORT ParameterValue | getCurrentParameterValue () |
template<typename T > | |
VT_EXPORT T | getCurrent () const |
VT_EXPORT ParameterValue | getDefaultParameterValue () |
template<typename T > | |
VT_EXPORT T | getDefault () const |
template<typename T > | |
VT_EXPORT T | getMin () const |
template<typename T > | |
VT_EXPORT T | getMax () const |
template<typename T > | |
VT_EXPORT T | getIncrement () const |
VT_EXPORT bool | hasOptions () const |
VT_EXPORT bool | hasCurrent () const |
VT_EXPORT bool | hasDefault () const |
VT_EXPORT bool | hasRange () const |
VT_EXPORT bool | hasIncrement () const |
VT_EXPORT double | at (unsigned int x) |
VT_EXPORT double | at (unsigned int y, unsigned int x) |
VT_EXPORT double | at (unsigned int z, unsigned int y, unsigned int x) |
VT_EXPORT Parameter & | setTensorFromCvSize (const cv::Size &cvSize) |
VT_EXPORT void | setCvSizeFromTensor (cv::Size &cvSize) |
template<typename T > | |
VT_EXPORT Parameter & | setTensorFromCvMat (const cv::Mat_< T > &cvMat) |
template<typename T > | |
VT_EXPORT void | setCvMatFromTensor (cv::Mat_< T > &cvMat) |
template<> | |
VT_EXPORT bool | isValidNewValue (int t) const |
template<> | |
VT_EXPORT bool | isValidNewValue (bool t) const |
template<> | |
VT_EXPORT bool | isValidNewValue (double t) const |
template<> | |
VT_EXPORT bool | isValidNewValue (std::string t) const |
template<> | |
VT_EXPORT int | enforceIncrement (int t) |
template<> | |
VT_EXPORT bool | enforceIncrement (bool t) |
template<> | |
VT_EXPORT double | enforceIncrement (double t) |
template<> | |
VT_EXPORT std::string | enforceIncrement (std::string t) |
template<> | |
VT_EXPORT Parameter & | setDefault (int t) |
template<> | |
VT_EXPORT Parameter & | setDefault (bool t) |
template<> | |
VT_EXPORT Parameter & | setDefault (double t) |
template<> | |
VT_EXPORT Parameter & | setDefault (std::string t) |
template<> | |
VT_EXPORT Parameter & | setRange (int mn, int mx) |
template<> | |
VT_EXPORT Parameter & | setRange (bool mn, bool mx) |
template<> | |
VT_EXPORT Parameter & | setRange (double mn, double mx) |
template<> | |
VT_EXPORT Parameter & | setRange (std::string mn, std::string mx) |
template<> | |
VT_EXPORT Parameter & | setIncrement (int t) |
template<> | |
VT_EXPORT Parameter & | setIncrement (bool t) |
template<> | |
VT_EXPORT Parameter & | setIncrement (double t) |
template<> | |
VT_EXPORT Parameter & | setIncrement (std::string t) |
template<> | |
VT_EXPORT Parameter & | setCurrent (int t) |
template<> | |
VT_EXPORT Parameter & | setCurrent (bool t) |
template<> | |
VT_EXPORT Parameter & | setCurrent (double t) |
template<> | |
VT_EXPORT Parameter & | setCurrent (std::string t) |
template<> | |
VT_EXPORT Parameter & | setOptions (const std::vector< int > &opts, const std::vector< std::string > &descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (const std::vector< bool > &opts, const std::vector< std::string > &descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (const std::vector< double > &opts, const std::vector< std::string > &descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (const std::vector< std::string > &opts, const std::vector< std::string > &descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (std::initializer_list< int > opts, std::initializer_list< std::string > descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (std::initializer_list< bool > opts, std::initializer_list< std::string > descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (std::initializer_list< double > opts, std::initializer_list< std::string > descriptions) |
template<> | |
VT_EXPORT Parameter & | setOptions (std::initializer_list< std::string > opts, std::initializer_list< std::string > descriptions) |
template<> | |
VT_EXPORT std::vector< int > | getOptions () const |
template<> | |
VT_EXPORT int | getCurrent () const |
template<> | |
VT_EXPORT int | getDefault () const |
template<> | |
VT_EXPORT int | getMin () const |
template<> | |
VT_EXPORT int | getMax () const |
template<> | |
VT_EXPORT int | getIncrement () const |
visiontransfer::param::Parameter::Parameter | ( | ) |
Generate a new Parameter for manual filling
Definition at line 716 of file parameter.cpp.
visiontransfer::param::Parameter::Parameter | ( | const std::string & | uid | ) |
Generate a new Parameter with specified UID (preferred) for manual filling
Definition at line 719 of file parameter.cpp.
visiontransfer::param::Parameter::Parameter | ( | const Parameter & | other | ) |
Generate a copy of a Parameter object
Definition at line 722 of file parameter.cpp.
visiontransfer::param::Parameter::~Parameter | ( | ) |
Destructor
Definition at line 726 of file parameter.cpp.
double visiontransfer::param::Parameter::at | ( | unsigned int | x | ) |
Returns the x-th element of a 1-d tensor (vector). Also extends to higher dimensional tensors by indexing the flat data (as if getTensorData() has been used)
Definition at line 1010 of file parameter.cpp.
double visiontransfer::param::Parameter::at | ( | unsigned int | y, |
unsigned int | x | ||
) |
Returns the y-th row, x-th column data element for a 2-dimensional tensor. Fails for other shapes or types
Definition at line 1013 of file parameter.cpp.
double visiontransfer::param::Parameter::at | ( | unsigned int | z, |
unsigned int | y, | ||
unsigned int | x | ||
) |
Returns the z-th slice, y-th row, x-th column data element for a 3-dimensional tensor. Fails for other shapes or types
Definition at line 1016 of file parameter.cpp.
VT_EXPORT T visiontransfer::param::Parameter::enforceIncrement | ( | T | t | ) |
Returns value with any increment applied (starting at minimum, if specified)
bool visiontransfer::param::Parameter::ensureValidCurrent | ( | ) |
Ensures that the current value is in the valid options (if set) or range (if set). Returns whether value was revised.
Definition at line 885 of file parameter.cpp.
bool visiontransfer::param::Parameter::ensureValidDefault | ( | ) |
Ensures that the default value is in the valid options (if set) or range (if set). Returns whether value was revised.
Definition at line 882 of file parameter.cpp.
Parameter::ParameterAccessMode visiontransfer::param::Parameter::getAccessForApi | ( | ) | const |
Return the visibility / access mode for the external API bridge
Definition at line 758 of file parameter.cpp.
Parameter::ParameterAccessMode visiontransfer::param::Parameter::getAccessForConfig | ( | ) | const |
Return the visibility / access mode for the configuration web interface
Definition at line 755 of file parameter.cpp.
std::string visiontransfer::param::Parameter::getCategoryName | ( | ) | const |
Return the finer-grained category name within a module
Definition at line 743 of file parameter.cpp.
VT_EXPORT T visiontransfer::param::Parameter::getCurrent | ( | ) | const |
Returns the current value for the Parameter. Not supported for tensors (use getTensorData() instead).
ParameterValue visiontransfer::param::Parameter::getCurrentParameterValue | ( | ) |
Returns the ParameterValue representing the Parameters current or default value
Definition at line 961 of file parameter.cpp.
VT_EXPORT T visiontransfer::param::Parameter::getDefault | ( | ) | const |
Returns the default value for the Parameter. Not supported for tensors.
std::string visiontransfer::param::Parameter::getDescription | ( | ) | const |
Return the parameter description (explanatory comment string)
Definition at line 746 of file parameter.cpp.
std::string visiontransfer::param::Parameter::getGovernorString | ( | ) | const |
Return the governor string, i.e. the specific script cmdline or the controlling D-Bus name
Definition at line 794 of file parameter.cpp.
Parameter::GovernorType visiontransfer::param::Parameter::getGovernorType | ( | ) | const |
Return the governor type (whether setting the parameter is controlled by a script, D-Bus, or nothing yet)
Definition at line 791 of file parameter.cpp.
VT_EXPORT T visiontransfer::param::Parameter::getIncrement | ( | ) | const |
Returns the increment (granularity) for the Parameter (or the smallest possible value for the inferred template type if unset). Not supported for tensors.
Parameter::ParameterInteractionHint visiontransfer::param::Parameter::getInteractionHint | ( | ) | const |
Gets the interaction UI hint (invisible / inactive / active)
Definition at line 770 of file parameter.cpp.
bool visiontransfer::param::Parameter::getInvokeGovernorOnInit | ( | ) | const |
Gets the oninit action (after first load). False = do nothing; true = perform the same action as on change. Used for calling governor scripts immediately when the parameter daemon initializes.
Definition at line 805 of file parameter.cpp.
bool visiontransfer::param::Parameter::getIsModified | ( | ) | const |
Returns whether the Parameter has unsaved (and unreverted) run-time modifications to its previously saved value, according to the parameter server.
Definition at line 777 of file parameter.cpp.
bool visiontransfer::param::Parameter::getIsPolled | ( | ) | const |
Returns true iff the tensor is only updated when polled. Such parameters are not synchronized in the background and must be polled (in the backend outside this class) to obtain their up-to-date values.
Definition at line 780 of file parameter.cpp.
VT_EXPORT T visiontransfer::param::Parameter::getMax | ( | ) | const |
Returns the maximum value for the Parameter (or the highest possible value for the inferred template type if unset). Not supported for tensors.
VT_EXPORT T visiontransfer::param::Parameter::getMin | ( | ) | const |
Returns the minimum value for the Parameter (or the lowest representable value for the inferred template type if unset). Not supported for tensors.
std::string visiontransfer::param::Parameter::getModuleName | ( | ) | const |
Return the overarching module name (abstract categorization for GUI etc.)
Definition at line 740 of file parameter.cpp.
std::string visiontransfer::param::Parameter::getName | ( | ) | const |
Return the current human-readable name
Definition at line 737 of file parameter.cpp.
std::vector< std::string > visiontransfer::param::Parameter::getOptionDescriptions | ( | ) | const |
Returns the list of option descriptions for an enum-style Parameter (or an empty list for non-enums).
Definition at line 957 of file parameter.cpp.
VT_EXPORT std::vector<T> visiontransfer::param::Parameter::getOptions | ( | ) | const |
Returns the list of possible values for an enum-style Parameter (or an empty list for non-enums).
std::vector< double > visiontransfer::param::Parameter::getTensorData | ( | ) | const |
Returns a flat copy of the tensor data as a vector<double>
Definition at line 833 of file parameter.cpp.
std::vector< double > & visiontransfer::param::Parameter::getTensorDataReference | ( | ) |
Returns a reference to the tensor data (CAUTION)
Definition at line 839 of file parameter.cpp.
std::vector< double > visiontransfer::param::Parameter::getTensorDefaultData | ( | ) | const |
Returns a flat copy of the tensor default data as a vector<double> (mostly internal use)
Definition at line 836 of file parameter.cpp.
std::vector< double > & visiontransfer::param::Parameter::getTensorDefaultDataReference | ( | ) |
Returns a reference to the tensor default data (CAUTION)
Definition at line 842 of file parameter.cpp.
unsigned int visiontransfer::param::Parameter::getTensorDimension | ( | ) | const |
Returns the tensor dimension, i.e. 1 for vectors, 2 for matrices etc.
Definition at line 824 of file parameter.cpp.
unsigned int visiontransfer::param::Parameter::getTensorNumElements | ( | ) | const |
Returns the total number of elements in the Tensor (product of the sizes in all dimensions).
Definition at line 830 of file parameter.cpp.
std::vector< unsigned int > visiontransfer::param::Parameter::getTensorShape | ( | ) | const |
Returns the tensor shape in all dimensions. This is {rows, columns} for matrices.
Definition at line 827 of file parameter.cpp.
ParameterValue::ParameterType visiontransfer::param::Parameter::getType | ( | ) | const |
Return the type of the parameter values, one of the scalar, tensor, or command types from ParameterValue::ParameterType. Value assignments are subject to type compatibility checks.
Definition at line 752 of file parameter.cpp.
std::string visiontransfer::param::Parameter::getUid | ( | ) | const |
Return the current UID
Definition at line 734 of file parameter.cpp.
std::string visiontransfer::param::Parameter::getUnit | ( | ) | const |
Return the reference unit for the values of the Parameter as a string (e.g. "cm", "µs" etc.)
Definition at line 749 of file parameter.cpp.
bool visiontransfer::param::Parameter::hasCurrent | ( | ) | const |
Returns true iff the Parameter has a defined current value
Definition at line 997 of file parameter.cpp.
bool visiontransfer::param::Parameter::hasDefault | ( | ) | const |
Returns true iff the Parameter has a defined default value
Definition at line 1000 of file parameter.cpp.
bool visiontransfer::param::Parameter::hasIncrement | ( | ) | const |
Returns true iff the Parameter has an increment (granularity) set, false otherwise
Definition at line 1006 of file parameter.cpp.
bool visiontransfer::param::Parameter::hasOptions | ( | ) | const |
Returns true for an enum-style Parameter (i.e. a list of valid options has been set), false otherwise.
Definition at line 994 of file parameter.cpp.
bool visiontransfer::param::Parameter::hasRange | ( | ) | const |
Returns true iff the Parameter has a limited range set, false otherwise
Definition at line 1003 of file parameter.cpp.
std::string visiontransfer::param::Parameter::interpolateCommandLine | ( | const ParameterValue & | newVal, |
Parameter::GovernorFunction | fn = GOVERNOR_FN_CHANGE_VALUE |
||
) |
Perform a substition of %-initiated placeholders with correctly quoted parameter [meta-]data (for compiling shell commandlines).
Definition at line 812 of file parameter.cpp.
bool visiontransfer::param::Parameter::isCommand | ( | ) | const |
Returns true iff the value type of the Parameter is COMMAND (a special string type that corresponds to single-shot actions such as buttons)
Definition at line 821 of file parameter.cpp.
bool visiontransfer::param::Parameter::isScalar | ( | ) | const |
Returns true iff the value type of the Parameter is scalar, i.e. neither TENSOR nor COMMAND
Definition at line 818 of file parameter.cpp.
bool visiontransfer::param::Parameter::isTensor | ( | ) | const |
Returns true iff the value type of the Parameter is TENSOR
Definition at line 815 of file parameter.cpp.
VT_EXPORT bool visiontransfer::param::Parameter::isValidNewValue | ( | T | t | ) | const |
Returns whether the specified value is acceptable for the current Parameter (if it is constrained by range or enum list)
Assignment copy operator
Definition at line 729 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setAccessForApi | ( | Parameter::ParameterAccessMode | mode | ) |
Sets the visibility / access mode for the external API bridge
Definition at line 766 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setAccessForConfig | ( | Parameter::ParameterAccessMode | mode | ) |
Sets the visibility / access mode for the configuration web interface
Definition at line 762 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setAsTensor | ( | const std::vector< unsigned int > & | shape | ) |
Sets a Parameter to be a tensor, specifying the shape at the same time
Definition at line 878 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setCategoryName | ( | const std::string & | n | ) |
Sets the finer-grained category name within a module
Definition at line 862 of file parameter.cpp.
VT_EXPORT Parameter& visiontransfer::param::Parameter::setCurrent | ( | T | t | ) |
Sets or overwrites the current value of the Parameter. Type compatibility is enforced and std::runtime_error is thrown for violations.
Copies over the current value from the specified Parameter into the present one
Definition at line 930 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setCurrentFromDefault | ( | ) |
Copies over the current value from the default value, if specified
Definition at line 934 of file parameter.cpp.
|
inline |
Sets an OpenCV Mat object of arbitrary base type from a Tensor-type Parameter, which must be two-dimensional.
Definition at line 335 of file parameter.h.
|
inline |
Sets an OpenCV Size object from a Tensor-type Parameter, which must be of shape {2}.
Definition at line 305 of file parameter.h.
VT_EXPORT Parameter& visiontransfer::param::Parameter::setDefault | ( | T | t | ) |
Sets the default value for the Parameter (Caveat: for scalars only)
Parameter & visiontransfer::param::Parameter::setDescription | ( | const std::string & | d | ) |
Sets the parameter description (explanatory comment string)
Definition at line 866 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setGovernor | ( | Parameter::GovernorType | govType, |
const std::string & | govStr | ||
) |
Sets the parameter governor, a script or D-Bus name that controls setting the parameter
Definition at line 797 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setGovernorPollString | ( | const std::string & | govStr | ) |
Sets the governor, a script or D-Bus name that controls setting the parameter
Definition at line 801 of file parameter.cpp.
VT_EXPORT Parameter& visiontransfer::param::Parameter::setIncrement | ( | T | t | ) |
Sets the uniform increment (granularity) for the Parameter (only checked for numerical scalars)
Parameter & visiontransfer::param::Parameter::setInteractionHint | ( | Parameter::ParameterInteractionHint | hint | ) |
Sets the interaction UI hint (invisible / inactive / active)
Definition at line 773 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setInvokeGovernorOnInit | ( | bool | invoke | ) |
Sets the oninit action (see getInvokeGovernorOnInit).
Definition at line 808 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setIsModified | ( | bool | mod | ) |
Sets the runtime-modified flag. This is controlled by the device; changing it has no effect in client-side code.
Definition at line 787 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setIsPolled | ( | bool | mod | ) |
Sets the polled-updates-only flag. This is controlled by the device; changing it has no effect in client-side code.
Definition at line 783 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setModuleName | ( | const std::string & | n | ) |
Sets the overarching module name (abstract categorization for GUI etc.)
Definition at line 858 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setName | ( | const std::string & | name | ) |
Sets the human-readable name
Definition at line 854 of file parameter.cpp.
VT_EXPORT Parameter& visiontransfer::param::Parameter::setOptions | ( | const std::vector< T > & | opts, |
const std::vector< std::string > & | descriptions | ||
) |
Specifies a vector of possible values and a vector of description strings, making the present Parameter an enum-style option list. Use zero-length arguments to remove an enum restriction.
VT_EXPORT Parameter& visiontransfer::param::Parameter::setOptions | ( | std::initializer_list< T > | opts, |
std::initializer_list< std::string > | descriptions | ||
) |
Specifies an initializer_list of possible values and an initializer_list of description strings, making the present Parameter an enum-style option list
VT_EXPORT Parameter& visiontransfer::param::Parameter::setRange | ( | T | mn, |
T | mx | ||
) |
Sets the valid value range for the Parameter (only checked for numerical scalars)
Parameter & visiontransfer::param::Parameter::setTensorData | ( | const std::vector< double > & | data | ) |
Sets the tensor data from a flat representation
Definition at line 845 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setTensorDefaultData | ( | const std::vector< double > & | data | ) |
Sets the fallback tensor data
Definition at line 849 of file parameter.cpp.
|
inline |
Sets a Tensor-type (or still undefined) Parameter from an OpenCV Mat object, yielding a two-dimensional tensor of identical shape
Definition at line 311 of file parameter.h.
|
inline |
Sets a Tensor-type (or still undefined) Parameter from an OpenCV Size object, yielding a tensor of shape {2}
Definition at line 288 of file parameter.h.
Parameter & visiontransfer::param::Parameter::setType | ( | ParameterValue::ParameterType | t | ) |
Sets the type of the parameter values, one of the scalar, tensor, or command types from ParameterValue::ParameterType. Value assignments are subject to type compatibility checks.
Definition at line 874 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::setUnit | ( | const std::string & | d | ) |
Sets the reference unit for the values of the Parameter as a string (e.g. "cm", "µs" etc.)
Definition at line 870 of file parameter.cpp.
Parameter & visiontransfer::param::Parameter::unsetRange | ( | ) |
Unsets the valid value range for the Parameter; i.e. removes min and max bounds
Definition at line 913 of file parameter.cpp.