The C3D (Coordinate 3D) file format provides a means of storing all the data (data in both unprocessed and processed form) and other information (such as gait timing, cycle information, subject information) of a single file. Unfortunately, C3D format does not contain the history of the data processing and therefore valuable information can be lost. For more information on the C3D file format, please visit www.c3d.org.
Exporting C3D files
In ODIN the movement data of a trial can be exported into a C3D file. There are two ways to export the data to a C3D file: through the Export Menu command or using a python script.
Exporting through the Export Menu command
To Export C3D file, select the file you want to export from the “Trial List” panel and then click on “File / Export Current Trial”. A dialogue will open and allow you to choose where you wish to save the data and what name you want to give to the file. See picture below:
This will automatically export raw marker, analogue data and forceplate information (positions, type, calibration files) if they are present. Virtual markers (landmarks, centroids, …), filtered data, joint angles, moments and powers won’t be exported using this function. Also this will only export one file per export. It is not possible to do mass export using the Export Menu command. Calculated data such as virtual markers, filtered data, joint angle, etc .., can only be exported using the python script engine.
Exporting using a python script
Calculated (or processed) data can be exported in the C3D file format using bespoke Python script. The export of the data in a C3D format file is done thanks the Python BTK (Biomechanical Toolkit). Also an example of a C3D export script is available and automatically install with OdinPy 1.01.16 or above.
Please make sure that both python libraries are installed (BTK and OdinPy 1.01.16 (or above)). If i is not the case, please contact the support team.
Then, open ODIN, select the appropriate protocol and the data you wish to export. Then click on “Calculations … / import calculations …” from the ODIN toolbar menu. A dialogue box will open and allow you to select a python script. Select the file called “C3D Export.py” and located in the following folder: “C:\Codamotion\Odin\Scripts\Examples”. This will add a new script in the “User Input Script” section on the left tree menu. This script is a script which will only run when the user request it.
This example automatically exports marker and virtual marker data (filtered or not – the user can choose), analogue data, and forceplate information if present. Note that the C3D file doesn’t contain the force data. Software such as ODIN, Mokka, Visual 3D, automatically recalculate the forceplate data using the analogue data and the forceplate information (called forceplate metadata). The script can be edited from ODIN by right-clicking on the script from the “User Input Script” and by selecting “Preview …”
To choose between the non-filtered or filtered marker data (real or virtual markers), the user must edit the Python script and change the following line “ExportingFilteredData = 0” (see code below). If the the setting is “0”, then the script will export the raw data whereas if the parameter is “1” then the script will export the filtered data.
The script will automatically export each movement data trial (opened in the trial list) in a separate single trial. The data is saved in the following “‘C:\Codamotion\Odin\Data”. The user can change the location where to save the trials by changing the following lines:
and by indicating a new path:
The exported file(s) will automatically be named as follow: “SubjectID_RepLabel_Year_Month_Day.c3d”.
Importing C3D Files
C3D files can be imported using the Import Menu command. To import C3D file(s), click on “File / Import Trials …”. A dialogue box will open and allow the user to select multiple trials. Once the file(s) has been selected, click on “Import”.
A second dialogue box will open and display a summary of the selected file(s). Some information of the file might not be automatically inserted. If it is the case, the user needs to insert them manually. Note that if all information are not filled then the user won’t be able click “OK”.
Click on “OK” once the information are filled. The dialogue box will close and ODIN will 1) save the data in the database with the chosen names and replabels and 2) add the file in the “Trial List” panel.