Closed GoogleCodeExporter closed 8 years ago
Original comment by arnaud.barre
on 1 Feb 2011 at 6:15
The proposed solution is to modify the creation of the handle. Instead of using
an unsigned integer coded on 32 bits (uint32), the handle will be stored as a
double. This solution seems to work under 32-bit and 64-bit system as a double
is coded on 8 bits under Maltab. Moreover, this solution is already used by
Mathworks to store handle.
The drawback of this method is the possibility to have incompatible code
between BTK-0.1.6 and BTK-0.1.7 if you store handles in a array.
For example:
% Matlab code
handles = uint32(zeros(4,1)); % Create a matrix with the type UINT32
handles(1) = btkReadAcquisition('myFile.c3d'); % Store the handle
markers = btkGetMarkers(handles(1)); % Don't work anymore for BTK-0.1.7 and
later.
To be able to use the same code, it is proposed to use the function
btkGetVersion to adapt the array initialization.
For example:
% Matlab code
if (strcmp(btkGetVersion,'0.1.6')==0)
handles = uint32(zeros(4,1)); % Create a matrix with the type UINT32
else
handles = zeros(4,1); % Create a matrix with the type DOUBLE
end
handles(1) = btkReadAcquisition('myFile.c3d');
markers = btkGetMarkers(handles(1)); % Works in every case
Original comment by arnaud.barre
on 1 Feb 2011 at 6:38
Original comment by arnaud.barre
on 3 Feb 2011 at 9:29
Original issue reported on code.google.com by
arnaud.barre
on 31 Jan 2011 at 11:11