abfDefineComponent()

Defines the numeric contents of a component via an expression.

Syntax

void abfAnnotateRequest(const char *expr);

Inputs

expr
The expression to be evaluated.

Example

abfOpenDatatype("Accleration");
abfOpenRequest("Lumbar Region");
abfOpenComponent("MAG"):
abfDefineComponent("sqrt(c0 * c0 + c1 * c1 + c2 * c2)");

Comments

The expression can reference other values in the file either by specifying the desired component in the form datatype:request:component where datatype, request and component are the labels of the desired data or in the form cn where n is the zero-based index of a component in the current request.

In the example, the magnitude of the acceleration is computed by taking the square root of the sum of the squares of the first three components (X, Y, and Z values).