It is useful at this point to review the concepts behind groups and parameters within the C3D file. Information that describes the data within the C3D file, or the data collection environment, is stored in the file as “parameters” - since many of these items are related (e.g. the number of 3D points, their names and descriptions) they are gathered together in “groups.” This concept allows users to have a simple, easy to remember, name for a parameter and then use the name in several different places.
While there is a minimum set of parameter information required to process or read a C3D file, the parameter and group concept is flexible and allows users to create groups and parameters to store relevant information. This information is then available to any other application that reads the C3D file. This capability can be very useful – for instance, a software application might analyze the 3D data and force plate data within the C3D file and determine various gait related parameters such as the average stride length, step length, and cadence etc. This information could be added to the parameters together with information such as the subject’s weight, height, and date of birth. The next time that the application opens the C3D file, it will be able to read this information without requiring any recalculation.
Before we discuss the details of the Group and Parameter formats, it is useful to understand the logic that results in the apparent random assignment of group and parameter numbers, and the random ordering of parameters within the parameter section. Many applications read the entire parameter section into memory as a single vector. To find a parameter within the parameter section, the vector is searched sequentially for the parameter’s group name, which then yields the group ID number. The vector is then searched again from the beginning for parameters belonging to the appropriate group ID and having the required name. The parameter’s data can then be accessed.
If a parameter or group is added to the parameter section then the new item will usually be appended after the last entry in the parameter section. When a parameter is deleted, it is first located and then all of its contents are packed out of the vector. This approach provides much flexibility, but means that the order of groups and parameters within the section will be random. When writing the parameter section, the total vector will be written – while this ensures that all parameters that were read in, but were not changed, will be written out accurately. As a result the order in which parameters are found within the parameter section may be random.
All information stored in a parameter section is organized into groups even though related items may be stored in various areas of the parameter section. A group is simply a collection of related parameters. Each parameter is a member of a single group thus allowing two parameters to have the same name if they belong to different groups. For example, there may be two parameters called SCALE – one SCALE parameter applies to 3D data while the other SCALE parameter applies to analog data. The two parameters are stored in separate groups called POINT and ANALOG. Thus, the 3D parameter can be referenced as POINT:SCALE while the analog value can be read from the ANALOG:SCALE parameter.
More: