pyomeca / ezc3d

Easy to use C3D reader/writer for C++, Python and Matlab
https://pyomeca.github.io/Documentation/ezc3d/index.html
MIT License
145 stars 46 forks source link

Assessing other 'POINT' data #320

Closed PressGO closed 7 months ago

PressGO commented 7 months ago

Hi, i would like to know how to access other data types like 'ANGLES', 'SCALARS', 'POWERS' and 'FORCES' in 'POINT' using ezc3d. i know this is how you can access marker data: point_data = c['data']['points']

but besides 'points', 'meta_points', and 'analogs', there doesn't seem to be any other way of getting it in 'data'.

i know this is possible in btk. Thanks for all the help

pariterre commented 7 months ago

Dear @PressGO

ANGLES, SCALARS, POWERS and FORCES are not real concepts of a c3d, as C3D can only holds "points", "analogs" and "rotations". Nexus works around this limitation by storing these values in the POINT. So all these data are actually stored in data = c['data']['points']. To differentiate them, you have to look at their names in the parameters (POINT:LABELS).

BTK was splitting these data based on a prefix Nexus gives to the names, I did not implement this in ezc3d as it is not part of the c3d standard.