btkWriteAcquisition
Description
Writes acquisition's data into file (C3D, ...) (C3D is the only format currently supported).
Parameters
h | Handle pointing to a C++ btk::Acquisition object. |
filename | String with the path of the acquisition to export. |
Returned Values
Detailed Description
btkWriteAcquisition(h, filename)
exports acquisition's data represented as the handle
h
into the file
filename
. The choice of the file format is based on the file extension in
filename
(for example, '.trc' or '.c3d'), the only currently supported format is .c3d.
A C3D File is written using the machine byte order and the float as storage format.
The writing of an empty acquisition (no point and no analog channel) in a C3D file will create a template C3D file. Only the metadata will be saved.
Notes
See also
btkReadAcquisition
Syntax
btkWriteAcquisition(h, filename)
Examples
filename= ('Static_Example.c3d');
acqstatic = btkReadAcquisition(filename);
[markersStatic, markersInfoStatic] = btkGetMarkers(acqstatic)
x1=markersStatic.epi_med_right(:,1); // x componets medial epicondylus marker
x2=markersStatic.epi_lat_right(:,1);
y1=markersStatic.epi_med_right(:,2);
y2=markersStatic.epi_lat_right(:,2);
z1=markersStatic.epi_med_right(:,3);
z2 =markersStatic.epi_lat_right(:,3);
M_p = [(x1+x2)/2, (y1+y2)/2, (z1+z2)/2];
[points, pointsInfo] = btkAppendPoint(acqstatic, 'marker' , 'V_Knee_Joint_Center_right',M_p);
btkWriteAcquisition(acqstatic, 'Static_Example_with_Knee_Joint_Center_right.c3d')