Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrrezaie
Copy link
Contributor

@mrrezaie mrrezaie commented May 5, 2025

Closing #3606

c3d.pointNames() reads all labels.

Testing I've completed

Worked in my test.

CHANGELOG.md (choose one)

  • if accepted.

This change is Reviewable

@mrrezaie mrrezaie changed the title Fix issue with large marker labels Fix issue with c3d marker labels more than 255 May 5, 2025
@nickbianco
Copy link
Member

Hi @mrrezaie, thanks for contributing a fix! If you have a working test, please consider adding it to testC3DFileAdapter.cpp:

* OpenSim: testC3DFileAdapter.cpp *

Additionally, based on discussion in #3606, it seems like some additional filtering of the point data returned by c3d.pointNames() will be necessary to ensure that only marker data is returned. The suggestion from @halleysfifthinc seems like a good one:

I mean, I wouldn't call it a workaround, it is a standards compliant extension of C3D capabilities. Regardless, my point was that if it is desired to remove non-marker point data, the the POINT:ANGLES, POINT:POWERS, POINT:FORCES, and POINT:MOMENTS parameters are arrays of strings that give the names of the point data (i.e. items in POINT:LABELS) that are not markers. That would be a simpler approach with fewer assumptions than hard-coding point names that are known™ to be non-markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants