Notes for Programmers – Floating Point 3D Data

1.  When a file contains floating-point scaled 3D data then all corresponding analog data values must also be stored in floating-point format.

2.  If the 3D data points are stored in floating point format, the X, Y, and Z co-ordinates have been already multiplied by the scale factor.  Words 7-8 contain normal 4th word signed integer value stored as a floating-point number.  To extract the mask and residual data, this word should be converted to a signed integer, divided into high and low bytes, and the low byte multiplied by the absolute value of the POINT:SCALE parameter to obtain the correct residual value.

3.  It is important to realize that the sign of the POINT:SCALE parameter and the magnitude of the parameter are treated as two independent factors in floating point data files. The sign simply indicates that the file is a floating-point format, while the magnitude is used to scale the residual values and should be set appropriately.

4.  Within each 3D sample, the 3D points are stored in the order recorded by the parameter POINT:LABELS followed by the analog data, if present.

5.  Software applications should be prepared to handle corrupted C3D files that contain header or parameter records that do not contain the correct pointers to the start of the 3D data section