-
Notifications
You must be signed in to change notification settings - Fork 331
Fix issue with c3d marker labels more than 255 #4072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @mrrezaie, thanks for contributing a fix! If you have a working test, please consider adding it to
Additionally, based on discussion in #3606, it seems like some additional filtering of the point data returned by
|
Hi, I just wanted to bring this to your attention. Unfortunately, I don't have a working example, and I don't know cpp. Filtering the marker labels sounds like a good idea, on the other hand, it's also great that users have access to every signal in the c3d. It might be a good idea to store the extra labels as table meta data. For example, adding a new meta data for each ANGLES, FORCES, MOMENTS, POWERS, MODELED_MARKERS, and SCALARS, like others: c3dAdapter = osim.C3DFileAdapter()
tables = c3dAdapter.read( 'path_to_c3d_file.c3d' )
markers = c3dAdapter.getMarkersTable(tables)
markers.getTableMetaDataKeys()
# ('DataRate', 'Units', 'events')
forces = c3dAdapter.getForcesTable(tables)
forces.getTableMetaDataKeys()
# ('CalibrationMatrices', 'Corners', 'DataRate', 'Origins', 'Types', 'events') They could be retrieved by one of the |
@mrrezaie you've modified the source code, re-built, and tested the Python bindings -- I'd say you're well on your way to understanding C++! If this is really important to you, I would consider investing some time in implementing the changes that you want. This would likely go faster than waiting on one of the few contributors to OpenSim to take it on. I'm happy to review additional changes to the PR. |
Thanks @nickbianco, it's nice to hear that from you. I think I have to learn cpp ;) |
You should! There will never be a shortage of a need for C++ devs (until Rust takes over the world...).
I still don't think we merge as-is, based on my comments above. That line is for exporting marker labels, and your change would include all point labels, including non-marker data label (if my understanding is correct). We still need changes to filter out the additional labels. |
Closing #3606
c3d.pointNames()
reads all labels.Testing I've completed
Worked in my test.
CHANGELOG.md (choose one)
This change is