Check number of points in C3D-File
We should add a check for the number of points in the C3D-File to not get into a segfault later on.
This check probably should be in IO::readSkeletonC3D_XSENS
and look like this
constexpr int nbPointsXsensWithJoints = 87;
if(frames[0].points().nbPoints() != nbPointsXsensWithJoints)
{
throw std::invalid_argument("C3D-File " + person.getFilename() + " is not a XSens C3D with joints!");
}
NOTE: We currently have data which is only fused correctly without joints and currently don't use the joints. Once both matters have changed, this can be added.
NOTE: The exception is catched an the message shown to the user; the application does not crash.