Describes a dimension of the signal's data. Eg. a column/row in a matrix. More...
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 | |
virtual ErrCode INTERFACE_FUNC | getName (IString **name)=0 |
Gets the name of the dimension. More... | |
virtual ErrCode INTERFACE_FUNC | getSize (SizeT *size)=0 |
Gets the size of the dimension. More... | |
virtual ErrCode INTERFACE_FUNC | getUnit (IUnit **unit)=0 |
Gets the unit of the dimension's labels. More... | |
virtual ErrCode INTERFACE_FUNC | getLabels (IList **labels)=0 |
Gets a list of labels that defines the dimension. More... | |
virtual ErrCode INTERFACE_FUNC | getRule (IDimensionRule **rule)=0 |
Gets the rule that defines the labels and size of the dimension. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
Gets a list of labels that defines the dimension.
[out] | labels | The list of labels. |
The list is obtained from the dimension rule parameters by parsing and evaluating the parameters in conjunction with the rule type.
Gets the name of the dimension.
[out] | name | The name of the dimension. |
The name that best describes the dimension, in example "Frequency" for spectrum data.
|
pure virtual |
Gets the rule that defines the labels and size of the dimension.
[out] | rule | The dimension rule. |
The rule takes as input the index of data value in a sample and produces a label associated with that index.
|
pure virtual |
Gets the size of the dimension.
[out] | size | 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.