Describes a dimension of the signal's data. Eg. a column/row in a matrix. More...
Inherits ObjectPtr< IDimension >.
Describes a dimension of the signal's data. Eg. a column/row in a matrix.
Dimension objects define the size and labels of a single data dimension. Labels, in concert with the unit, provide information about the position of data in a structure. For example, for vector rank data in a frequency domain, the unit would be Hz, and the labels would range from the minimum to the maximum frequency of the spectrum.
The number of dimensions a sample descriptor defines the rank of the signals data. When no dimensions are present, one sample is a single value. When there's one dimension, a sample contains a vector of values, when there are three a sample contains a matrix. Higher ranks of data can be represented by adding more dimension objects to a sample descriptor.
The labels can be defined with a Rule (in example a linear rule with a coefficient and offset), where the the data index is the input to the rule. In example A Linear rule with coefficient = 5, offset = 10, size = 5 provides the following list of labels: [10, 15, 20, 25, 30]
To specify the labels can explicitly, the List dimension rule can be used. The list rule allows for a list of numbers, strings, or ranges to be used as the dimension labels. Dimension objects implement the Struct methods internally and are Core type ctStruct
.
Public Member Functions | |
daq::StringPtr | getName () const |
Gets the name of the dimension. More... | |
daq::SizeT | getSize () const |
Gets the size of the dimension. More... | |
daq::UnitPtr | getUnit () const |
Gets the unit of the dimension's labels. More... | |
daq::ListPtr< daq::IBaseObject > | getLabels () const |
Gets a list of labels that defines the dimension. More... | |
daq::DimensionRulePtr | getRule () const |
Gets the rule that defines the labels and size of the dimension. More... | |
|
inline |
Gets a list of labels that defines the dimension.
The list is obtained from the dimension rule parameters by parsing and evaluating the parameters in conjunction with the rule type.
|
inline |
Gets the name of the dimension.
The name that best describes the dimension, in example "Frequency" for spectrum data.
|
inline |
Gets the rule that defines the labels and size of the dimension.
The rule takes as input the index of data value in a sample and produces a label associated with that index.
|
inline |
Gets the size of the dimension.
The size is obtained from the dimension rule parameters - either from the size
parameter, or the count of elements in the list
parameter.
|
inline |
Gets the unit of the dimension's labels.