google-code-export / b-tk

Automatically exported from code.google.com/p/b-tk
0 stars 0 forks source link

MATLAB C3Dserver emulator SetParameterValue Problem #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported from a user in the mailing list:

--------------------------------------------------------
I want to change some C3D parameter values in Matlab with the BTK toolkit.
Everything works fine and by calling the GetParameterValue() Funktion the Value 
is changed, but after saving, closing an reopening the file the old parameters 
are back.
But when I set some PointData for example there is no proplem.
Hier is some of my code:

c3dserverobj = c3dserver();
createc3d(c3dserverobj,name,framerate,Nframes,Nmarker,1,0,2,1,1);
savec3d(c3dserverobj);
closec3d(c3dserverobj);
c3dserverobj.Open(name, 3);
LabelIndex = c3dserverobj.GetParameterIndex('POINT','LABELS');
c3dserverobj.SetParameterValue(LabelIndex,0,'Knee_Right');
savec3d(c3dserverobj);
closec3d(c3dserverobj);
--------------------------------------------------------

This is clearly due to the way BTK regenerates the metadata (group/parameters) 
when writing the C3D file.
The code of the MEX function 'btkWriteAcquisition' must be adapted to give a 
way to deactivate the options which regenerate the metadata and update the data 
scaling in the C++ class.

Original issue reported on code.google.com by arnaud.barre on 26 Nov 2013 at 2:27

GoogleCodeExporter commented 9 years ago
Issue fixed in btkEmulateC3DServer 1.0b4. The C3D groups/parameters are not 
more regenerated. Moreover, the command NewFile creates correctly the default 
groups/parameters. Also, only the event stored in the C3D header section are 
now listed and will be saved again in the header section (previously the events 
written in the groups EVENT(S) were also listed).

Original comment by arnaud.barre on 3 Jan 2014 at 10:38