Problem with c3d from Motive

77 views
Skip to first unread message

Yoann

unread,
Sep 21, 2016, 12:06:30 PM9/21/16
to BTK Users
Salut Arnaud,

J'essaye de lire les c3d créé par Motive avec BTK 0.3.0. Je suis capable de le lire mais tout de suite après la commande "btkReadAcquisition", j'ai le message suivant:
Warning: Essai_001.c3d - The number of blocks to be read in the parameter section is different than the number of blocks read. The value kept is the number of blocks read.

Finalement, j'utilise le même traitment qui fonctionnait avant pour recréer un nouveau c3d avec "btkWriteAcquisition" à partir des données obtenus. Le c3d se créé mais je ne suis pas capable de le lire:
No IO found, the file is not supported or valid or the file suffix is misspelled (Some IO use it to verify they can read the file)

Pourrais tu m'aider SVP?

Merci.

Yoann

Arnaud Barré

unread,
Sep 21, 2016, 12:14:58 PM9/21/16
to btk-...@googlegroups.com
Can you send me a C3D file generated by Motive?
> --
> You received this message because you are subscribed to the Google Groups "BTK Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to btk-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Yoann Dessery

unread,
Sep 21, 2016, 12:16:32 PM9/21/16
to btk-...@googlegroups.com
Voilà!

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.


Essai_001.c3d

Arnaud Barré

unread,
Sep 21, 2016, 12:25:26 PM9/21/16
to btk-...@googlegroups.com
I also should have asked you the C3D file generated by BTK :-)

On my side, I have just tried with Matlab and Mokka and the regenerated file was correctly loaded.

acq = btkReadAcquisition('../../Essai_001.c3d’);
btkWriteAcquisition(acq,'../../Essai_001_saved_bis.c3d');
acq2 = btkReadAcquisition('../../Essai_001_saved_bis.c3d’);

What are the Matlab commands that you used?
> --
> You received this message because you are subscribed to the Google Groups "BTK Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to btk-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <Essai_001.c3d>
>> You received this message because you are subscribed to a topic in the Google Groups "BTK Users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/btk-users/Hp_FqP77KNA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to btk-users+...@googlegroups.com.

Yoann Dessery

unread,
Sep 21, 2016, 12:26:51 PM9/21/16
to btk-...@googlegroups.com
C’est étrange!

Voici le fichier créé.
Essai_001_traite.c3d

Arnaud Barré

unread,
Sep 21, 2016, 12:35:18 PM9/21/16
to btk-...@googlegroups.com
All the bytes in your file are set to 0x00. This already happened to me once. To fix the problem. I restarted Matlab (or the computer) and I have no more this problem after that. I have to dig more in the Windows API to better understand this issue. Let me know if this does not solve the problem.
> --
> You received this message because you are subscribed to the Google Groups "BTK Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to btk-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <Essai_001_traite.c3d>
>
>
>
>> On 21 Sep 2016, at 18:25, Arnaud Barré <arnaud...@gmail.com> wrote:
>>
>> I also should have asked you the C3D file generated by BTK :-)
>>
>> On my side, I have just tried with Matlab and Mokka and the regenerated file was correctly loaded.
>>
>> acq = btkReadAcquisition('../../Essai_001.c3d’);
>> btkWriteAcquisition(acq,'../../Essai_001_saved_bis.c3d');
>> acq2 = btkReadAcquisition('../../Essai_001_saved_bis.c3d’);
>>
>> What are the Matlab commands that you used?
>>
>>> On Sep 21, 2016, at 12:16 PM, Yoann Dessery <ydes...@gmail.com> wrote:
>>>
>>> Voilà!
>>>
>>> Yoann Dessery, PhD
>>> Kneemo Researcher in Peacocks Medical Group Ltd.
>>>
>>>
>>>

Yoann Dessery

unread,
Sep 21, 2016, 1:00:28 PM9/21/16
to btk-...@googlegroups.com
J’ai redémarré l’ordi et j’ai toujours les mêmes messages dès que j’ouvre le fichier c3d et après que je l’ai transformé.

Arnaud Barré

unread,
Sep 21, 2016, 1:13:22 PM9/21/16
to btk-...@googlegroups.com
Can you answer these questions?
- What is your OS, its architecture,
- your Matlab version (architecture also),
- Which file did you download on the website of BTK?
- Is it the first you use BTK on this computer?

Yoann Dessery

unread,
Sep 21, 2016, 1:20:01 PM9/21/16
to btk-...@googlegroups.com
Can you answer these questions?
- What is your OS, its architecture,
Windows XP (sur une machine virtuelle VM Ware fusion pour Mac)

 
- your Matlab version (architecture also), 
Matlab 2011a

- Which file did you download on the website of BTK?
Yes, long time ago

- Is it the first you use BTK on this computer?
Non, je l’utilise depuis 4 ans maintenant

As tu besoin de plus d’informations?

Arnaud Barré

unread,
Sep 21, 2016, 2:11:52 PM9/21/16
to btk-...@googlegroups.com
Can you do the following steps:
- Verify that Windows XP is up to date.
- Restart MacOS
- Download the latest version of BTK for Matlab [1]
- Launch VMware
- Test the version of BTK
- Save one file in the Windows file system
- Save one file in the MacOS file system

Can you also try with Mokka (under MacOS and Windows) if this does not work with Matlab.

[1] https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/b-tk/btk-0.3.0_WinXP_MatlabR2008b_32bit.zip

Yoann Dessery

unread,
Sep 21, 2016, 6:00:35 PM9/21/16
to btk-...@googlegroups.com
J’ai fait tout ce qui était inscrit et la conclusion est que Mokka (mac et windows) n’a aucun problème à lire le fichier c3d de base mais ne peut pas lire celui que je créé par la suite.
J’ai toujours les mêmes messages d’erreurs dans matlab également (voir capture d’écran).
Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.




Yoann Dessery

unread,
Sep 21, 2016, 6:04:04 PM9/21/16
to btk-...@googlegroups.com
D’ailleurs je confirme que c’est avec les nouveaux fichiers c3d car je viens d’essayer un de mes anciens et cela fonctionne parfaitement!

Yoann Dessery

unread,
Sep 21, 2016, 6:09:36 PM9/21/16
to btk-...@googlegroups.com
C’est encore moi! je viens de remarquer que Mokka a des problèmes avec les blocs aussi (sur mac et windows) —> voir image jointe
Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.





Yoann Dessery

unread,
Sep 21, 2016, 6:17:47 PM9/21/16
to btk-...@googlegroups.com
Pour essayer de comprendre, j’ai essayé de comparer un c3d fonctionnant (à droite sur l’image jointe) et un ne fonctionnant pas (à gauche sur l’image jointe). il est possible de voir que le problème vient surement du nombre de frames.
à droite: 800 frames allant de 1 à 800
à gauche: 647 frames allant de 1 à 646 —> ce qui fait 646 frames donc problème

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.




Arnaud Barré

unread,
Sep 21, 2016, 7:42:28 PM9/21/16
to btk-...@googlegroups.com
The warnings are not important. They are only here to inform you that the structure of the C3D file is not perfect, but this is not critical. Because this already confused some users in the past, it was decided to hide these warnings by default in OpenMA.

Regarding the number of frames, the difference is because Motive sets the first frame to 0, but this not possible. The C3D format starts to 1 or greater. I modified your file manually with a hex editor to set the first frame to 1. Can you try on your side to rewrite the attached file and see if this works?

Essai_001_modified.c3d

Yoann Dessery

unread,
Sep 22, 2016, 12:35:17 AM9/22/16
to btk-...@googlegroups.com
J’ai essayé un basic Read-Write-Read et toujours pareil (voir image jointe).

Par contre, j’ai essayé un open-export-open avec Mokka et le fichier de base ‘Essai_001.c3d’ et je n’ai pas de problème.

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.





On 22 Sep 2016, at 01:42, Arnaud Barré <arnaud...@gmail.com> wrote:

The warnings are not important. They are only here to inform you that the structure of the C3D file is not perfect, but this is not critical. Because this already confused some users in the past, it was decided to hide these warnings by default in OpenMA.

Regarding the number of frames, the difference is because Motive sets the first frame to 0, but this not possible. The C3D format starts to 1 or greater. I modified your file manually with a hex editor to set the first frame to 1. Can you try on your side to rewrite the attached file and see if this works?

--
You received this message because you are subscribed to a topic in the Google Groups "BTK Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/btk-users/Hp_FqP77KNA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to btk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Essai_001_modified.c3d>


On Sep 21, 2016, at 6:17 PM, Yoann Dessery <ydes...@gmail.com> wrote:

Pour essayer de comprendre, j’ai essayé de comparer un c3d fonctionnant (à droite sur l’image jointe) et un ne fonctionnant pas (à gauche sur l’image jointe). il est possible de voir que le problème vient surement du nombre de frames.
à droite: 800 frames allant de 1 à 800
à gauche: 647 frames allant de 1 à 646 —> ce qui fait 646 frames donc problème

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.


<Comparaison files.tiff>

Yoann Dessery

unread,
Sep 22, 2016, 1:15:13 AM9/22/16
to btk-...@googlegroups.com
C’est vraiment un problème avec Matlab 2011 et Windows XP car je viens d’essayer avec mon ordi du boulot où j’ai Matlab 2015b avec Windows 8 et cela fonctionne bien avec le fichier de base.

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.






On 22 Sep 2016, at 01:42, Arnaud Barré <arnaud...@gmail.com> wrote:

The warnings are not important. They are only here to inform you that the structure of the C3D file is not perfect, but this is not critical. Because this already confused some users in the past, it was decided to hide these warnings by default in OpenMA.

Regarding the number of frames, the difference is because Motive sets the first frame to 0, but this not possible. The C3D format starts to 1 or greater. I modified your file manually with a hex editor to set the first frame to 1. Can you try on your side to rewrite the attached file and see if this works?

--
You received this message because you are subscribed to a topic in the Google Groups "BTK Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/btk-users/Hp_FqP77KNA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to btk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Essai_001_modified.c3d>


On Sep 21, 2016, at 6:17 PM, Yoann Dessery <ydes...@gmail.com> wrote:

Pour essayer de comprendre, j’ai essayé de comparer un c3d fonctionnant (à droite sur l’image jointe) et un ne fonctionnant pas (à gauche sur l’image jointe). il est possible de voir que le problème vient surement du nombre de frames.
à droite: 800 frames allant de 1 à 800
à gauche: 647 frames allant de 1 à 646 —> ce qui fait 646 frames donc problème

Yoann Dessery, PhD
Kneemo Researcher in Peacocks Medical Group Ltd.


<Comparaison files.tiff>

Edmund Cramp

unread,
Sep 23, 2016, 11:16:12 AM9/23/16
to BTK Users
I see a couple of potential issues with the Essai_001.C3D file - the first frame number is "0" but that's not a valid frame number for point data - this file should start at Frame 1 and end with Frame 648.  In addition, although there is no ANALOG data in the file, there's also no ANALOG group, so any attempt to read the ANALOG group to discover if the file contains analog data i.e. the value of the ANALOG:USED parameter, will fail.  Both of these errors could easily be fixed with a couple of quick edits but may point to issues with the software that created the file.

One oddity is that the subjects direction of progression in the file is in the Z axis which is not normal but is allowed. 

Edmund Cramp

Yoann Dessery

unread,
Sep 23, 2016, 12:24:12 PM9/23/16
to btk-...@googlegroups.com

Thank you for the information!

 

Both of these errors could easily be fixed with a couple of quick edits but may point to issues with the software that created the file.

How can I edit the file to open it with btk?

 

Do you know why can I open it with a newer version of Matlab and Windows while not with Matlab2011 and XP?

 

Thank you.

 

Yoann Dessery

--
You received this message because you are subscribed to a topic in the Google Groups "BTK Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/btk-users/Hp_FqP77KNA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to btk-users+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages