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 labels used to identify them and their associated descriptions) they are gathered together in “groups.” This concept allows us to have a simple, easy to remember, name for a parameter and then use the name in several different places. Thus, the parameter name USED represents the number of 3D points in a C3D file as well as the number of analog channels. The two parameters are assigned to their own groups and referred to as POINT:USED and ANALOG:USED to avoid confusion.
While there is a minimum set of parameter information required to process or simply read a C3D file, the parameter and group concept is very flexible and allows anyone to create both groups and parameters and then use them to store 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 can be recorded in the C3D file, together with other information such as the subjects 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. In addition, other applications will also be able to share this information and add to it or use it in their own analyses.
Before we discuss the details of the Group and Parameter formats it is useful to understand the logic by many applications that results in the apparent random assignment of group/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 require 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. If 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 finish up being quite random. When writing out 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, it means that in practice the order in which parameters are found within the parameter section will be random.
All information stored in a parameter section is organized into groups even though related items may be stored in widely separated 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 instance, 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.
Note that although the formats used to store group and parameter values are similar, the two data types provide quite different functionality within the C3D file and should not be confused. Applications are free to create their own group and parameter values within any C3D file provided that they conform to the basic rules.
More:
Notes for programmers - Parameters and Groups