Header events

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.

A maximum of eighteen (18) of these events can be stored in the C3D header record:

WORD

Typical Value

Description

150

0x3039 hex

A key value (12345 decimal) present if this file supports 4 char event labels. An older format supported only 2 character labels.

151

0

The number of time events present (0 to 18)

152

0x00 hex

Reserved for future use.

153 – 188

-

Event times (floating-point) in seconds (up to 18 events).

189 – 197

-

Event display flags 0=ON, 1=OFF.

198

0x00 hex

Reserved for future use.

199 – 234

-

Event labels.  Each label is 4 characters long

Figure 5 – The C3D header record EVENT storage format.

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 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.  This is done by header word 151, which records 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.

Figure 6 – A hex dump of a C3D header that contains eight events.

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.

More:

Event times

Event status

Event labels

Event interpretation

Notes for Programmers - C3D Header