Header events were added to the C3D format to allow applications to record timing information, relevant to the recorded data, for gait analysis – typically recording events like left/right heel-contact and toe-off information as the subject walked across one or more force plates. This feature ensures that gait analysis and other data processing programs perform their calculations in a repeatable manner using the event times to determine the gait cycle data analysis timing.
The description of an optional EVENT group in the parameter section has expanded the event storage feature, adding greater flexibility at the cost of additional complexity and creating the need to read the C3D event data from the parameter section instead of the C3D file header. Modern C3D files tend to use the EVENT group but the header event storage feature continues to be valid and may contain unique or duplicate events. Applications should always interpret and process the header events as well as the optional EVENT group if it exists. The C3D format does not specify any clinical interpretation of the event times, events may be stored independently with both methods - the C3D format only defines the storage method, the actual interpretation of the event data is application dependent.
Header events are used as a general way of designating significant times in a C3D file (e.g., initiation and/or termination of foot-floor contact – commonly called heel-contact and toe-off in a gait cycle). Each stored event is identified by a one to four character event label (e.g. RHS, RTO), and has an associated event time in seconds relative to the first sample (designated as 0.0s) of the C3D file.
Figure 5 - The C3D header record EVENT storage format.
A maximum of eighteen (18) of these events can be stored in the C3D header record, each header event has an on/off status flag that can be used by applications to control the display of the event position when the C3D file is processed.
Header word 150 in the C3D file header is used as a key value (0x3039h – 12345 decimal) that indicates that the C3D file supports event labels containing up to four characters - an older version of the C3D format supported only two characters per label. The presence of the key word only indicates that the C3D file supports labels with four characters – it does not indicate that any events are actually stored. Header word 151 stores the number of events stored in the C3D header. This can be any signed integer value between 0 and 18 with a value of 1 to 18 indicating that events are present. C3D header words 152 and 198 in this block of data are unused.
The C3D header events are stored as a list that can be indexed directly by the event count stored in header word 151. Events are always added to the end of the list – if one or more events are deleted from the middle of the list then all higher index events (together with their labels and status flags) are moved down to fill the empty space. Events may be stored in the list in any order so long as the event time, event label and event status are indexed correctly by the event count in header word 151.
Figure 6 - A hex dump of a C3D file header that contains eight, four character, events.
More: