C3D File Header

A standard 512-byte header section record is found at the beginning of all C3D files and in its most basic form, this provides a pointer to the location of the start of the parameter data.  In addition, it also provides some basic information about the format of the C3D file and the data stored in the C3D file.  This information is principally copied from the parameter section of the C3D file and software applications should, in general, read the parameter section to obtain the “master” records.

A single 512 byte header section

A parameter section consisting of one or more 512-byte blocks.

3D point/analog data section consisting of one or more 512-byte blocks.

Figure 2 - The header section within the C3D file structure.

The information in the C3D header record is arranged so that any software application can quickly open a C3D file and obtain information about the file and its contents, without the need to understand the more complex format of the parameter section.  Among other items, the following parameter section values can be read from the C3D file header:

·      The number of trajectories stored within the file.

·      The number of analog channels recorded in the file.

·      The number of trajectory samples stored within the file

·      The number of analog samples stored within the file

·      The trajectory and analog sample rates.

·      The location of the start of the interleaved 3D and analog data records within the file.

·      The location of the start of the parameter records within the file.

In addition, the format of the stored 3D and analog data as floating point or signed integer values can be deduced by reading the header SCALE value.  This is a positive floating-point number used to convert the signed integer 3D point values into real-world values.  If the header SCALE value is negative then the 3D and analog data is always stored in floating-point format.

The basic function of the C3D header section is to provide a means for software application to retrieve basic information about the data contained in the file without the need to read and decode the parameter section.  Of necessity, the first word must contain a pointer to the location of the parameter section (byte-1) and a means for software applications to verify that the file is actually a C3D file.  In most cases, the C3D parameter section can be found immediately after the C3D header record section while the 3D/analog storage area will normally be found within a few blocks of the end of the parameter section, however, these locations should not be assumed.