The OpenSim 4.0 API includes methods for reading C3D data into OpenSim formatted files. The OpenSim C3DFileAdapter() class uses a forked version of Arnaud Barre's BTK package. Use of the C3DFileAdapter is limited to C++ and scripting with example code below.
Reading C3D files through Matlab
Documentation for the C3DFIleAdapter is located here. There is a working example Matlab script in your resources directory /Code/Matlab/c3dExport.m.
C3DFileAdapter()
To use the OpenSim classes directly, follow the code below. This code will give you OpenSim Times Series Tables for both markers and forces.
osimC3D
We have included a Matlab side class that can be used to perform some common operations, such as rotating data, converting data into Matlab data types, and writing marker and force data to OpenSim file format. The Matlab file can be found in your resources directory /Code/Matlab/Utilities/osimC3D.m.
Reading C3D files through Python and C++
Some example code for using C3DFileAdapter through Python can be found below.
Example code for using the C3DFileAdapter in C++ is found below