AntoineCC / b-tk

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

Support AMTI files in Mokka #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Based on the thread "3D visualization of GRF !" in Biomch-L 
(http://biomch-l.isbweb.org/threads/23245-3D-visualization-of-GRF-!).

The attached files came from this thread, thanks to Daniel.

Original issue reported on code.google.com by arnaud.barre on 5 Feb 2012 at 2:01

Attachments:

GoogleCodeExporter commented 8 years ago
The revision r960 implement the reader for "FxFyFzMxMyMz" file while the 
revision r961 implement the user interface and especially the assistant 
required to provides extra information on the force platform (dimensions, or 
geometry).

WARNING: It is assumed that the data FxFyFzMxMyMz come from the sensor and not 
from the center of pressure. Is it true or not?

For the moment, only the file with the extension ASC is proposed. The support 
of the extension TXT could be implemented but the use of this file extension is 
too large and could contain easily other data than FxFyFzMxMyMz.

Moreover, it was decided to no use the "COP" file, as Mokka compute 
automatically the COP (more exactly PWA (Zatsiorsky - Kinetics of human motion 
- 2002) [1]), based on the forces, moments and geometry of the force plateform.

Furthermore, the geometry of the force platform is also required to visualize 
it in 3D views. So an assistant was implemented to give these informations (see 
joined file assistantAMTI.png).

At the end, you can display the data as every other acquisition file format 
(see joined file dataAMTI.png).

[1] 
http://books.google.ch/books?id=wp3zt7oF8a0C&pg=PA47&lpg=PA47&dq=zatsiorsky+PWA&
source=bl&ots=Kj633Hzi0b&sig=r5__I-33Cd_eioe11Wls2MnD2pk&hl=en&sa=X&ei=3ZMuT7nXG
sGg-wbt2OGtDg&redir_esc=y

Original comment by arnaud.barre on 5 Feb 2012 at 2:48

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

If I have a good understanding of the AMTI documentation, the force and moments 
are calculated by the sensors [AccuGait Platform which I'm using]. In the same 
time the COP is calculated only from the Mx and My moments and the Fz force . 
-One question is how exactly Mokka compute automatically the COP ? [ as I don't 
have access to the cited reference : PWA (Zatsiorsky - Kinetics of human motion 
- 2002)] 
-The second question is how Issue 25 is implemented in Mokka because I don't 
have experience with this kind of activity !

Thank you !
Regards,
Daniel 

Original comment by crispini...@gmail.com on 7 Feb 2012 at 10:17

GoogleCodeExporter commented 8 years ago
(Same answer than posted in Biomch-L)

Hi Daniel,

The computation of the PWA (point of wrench application) uses all the 
components of the forces and the moments measured by the sensors. So, the 
computation of the PWA doesn't assume that horizontal forces (Fx,Fy) are 
negligible, and then this calculation should be more accurate when computing 
joint kinetics. However, for gait analysis, the difference is low.

The following link gives you the formulas and the differences between the PWA 
and the COP: 
http://books.google.ch/books?id=wp3zt7oF8a0C&lpg=PA47&ots=Kj633Hzi0b&dq=zatsiors
ky%20PWA&hl=de&pg=PA45#v=onepage&q&f=false

The implementation of the issue 25 is based on the forces and moments stored in 
the FxFyFzMxMyMz file and the geometry of the force platform (given by the 
user). The use of the geometry is twofold. First it is used to display a 
rectangle representing the force platform in the 3D space. Second, it computes 
the matrix between the platform frame and the laboratory (global) frame. From 
this matrix, the FxFyFzMxMyMz data are expressed in the global frame and then 
used to compute the PWA. The ground reaction moments acting at the PWA are 
computed (same computation than if you use the COP). The final result is the 
display of the GRF in 3D acting at the point of application.

So the user has to give the geometry (corners and origin) of the force platform 
expressed in the global frame. But to simplify that, it is possible to give 
only the dimensions of the force platform (Width x Length x Height), then Mokka 
computes automatically the corresponding geometry (assuming the force plate is 
in the ground and the origin is at the middle of the height). You can find the 
dimensions in the AMTI documentation. By default Mokka uses the dimensions of 
the AMTI OR6-7 force platform, but if you set other dimensions, they will be 
stored automatically and reloaded the next time you open an AMTI file. For the 
Accugait platform, and based on the technical drawing, the dimensions to give 
will be 501.7 x 497.8 x 43.1 mm

Regards,

Arnaud

Original comment by arnaud.barre on 7 Feb 2012 at 12:37

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

Thanks for all these information ! Please, explain me how can I import in Mokka 
installed on my computer the AMTI .asc files. I've updated the software but 
your assistant is not available yet ! As, I told you I don't have any 
experience with software programming, I'm just an user !
Thank you,
Daniel

Original comment by crispini...@gmail.com on 9 Feb 2012 at 7:29

GoogleCodeExporter commented 8 years ago
Hi Daniel,

The current release (Mokka 0.4) does not support the implementation of the 
issue as it was released few months ago.

However, you can download a pre-release of Mokka 0.5 which contains the code to 
read AMTI ASC file. The link is available until February 16, 2012 09:00 PST.

http://www.yousendit.com/download/T2djNHB3cG9ZY1I3czlVag?cid=tx-0200220734020000
0000&s=19102

Let me know if everything works for you.

Original comment by arnaud.barre on 10 Feb 2012 at 6:16

GoogleCodeExporter commented 8 years ago
Hello Arnaud,

Unfortunately it doesn't run ! I've downloaded it two times but every time when 
I run it I'm receiving an error message [ the usually error message to send to 
Microsoft...]
What can I do ?

Regards,
Daniel

Original comment by crispini...@gmail.com on 11 Feb 2012 at 9:20

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

On the office computer [having Windows 7 on it] it works but at home [with 
Windows XP] doesn't work ! I've performed the same operation on both computers 
- what can be wrong with XP?

Thanks,
Daniel

Original comment by crispini...@gmail.com on 13 Feb 2012 at 7:58

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

It could be from un-zip software [home -WinRar, office-WinZip) I'll try again 
at home again !
At the moment I can't vizualize [or I don't know exactly how to proceed to 
vizualize] the Fx, Fy, Fz like in your images !

Regards,
Daniel

Original comment by crispini...@gmail.com on 13 Feb 2012 at 8:11

Attachments:

GoogleCodeExporter commented 8 years ago
To visualize data into charts, you have to drag and drop item(s) from the 
acquisition explorer into the specific chart.

For more informations, you should look the help integrated into Mokka (Menu 
Help > Mokka Help) or using the online documentation: 
http://b-tk.googlecode.com/svn/doc/Mokka/0.4/_mokka_view.html#MokkaChartViewer

The documentation is not yet updated for Mokka 0.5, but the current 
documentation is enough to explain how to plot data into charts.

I don't know why it doesn't work under Windows XP. I used the default zip 
compressor included with Windows XP, and the default unzip work great. I know 
also that there is no problem with 7-zip.

Original comment by arnaud.barre on 13 Feb 2012 at 9:35

GoogleCodeExporter commented 8 years ago
To give you more information to plot ground reaction forces. You have to expand 
the item "Force platform reactions" in the acquisition explorer and expand also 
a force platform. From here, you have the choice to select the forces, the 
moments and/or the position. Drag the selected items into a Point chart, 
(analog chart are reserved onlz for the analog channels). Clicking on the 
orange button of the chart view will give you options for the plots.

From the joined screenshot, I think you import the file. But you can also 
directly open it. Using the menu File > Open (or File > Open Recent) you can 
select an ASC file, and then Mokka will automatically shows the dialog box used 
to give informations on the force platform geometry.

Last point, I won't have access to the web until next monday. I hope everything 
will work for you.

Regards,

Arnaud

Original comment by arnaud.barre on 13 Feb 2012 at 9:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Arnaud,

Great job ! Thank you ! I've worked a lot to make some 3D representation with 
FreeMat but Mokka will add a lot of opportunities to interpret my data !
Till next week maybe you'll consider next two developments very interesting for 
me- hoping you'll agree with me:
-1. the posbility to have a 3D representation like "3D Buterfly diagram"  
[Reference :Vector (butterfly ) diagrams for osteoarthritic gait a preliminary 
report, Soussan Khodadadeh,Journal of Medical Engineering & Technology, Volume 
12, Number 1,January/February 1988, pages 15-19]
-2. the possibility to identify the phases of gait [References : 
- figure 3, pg.5 from V.Racic et al./Journal of Soundand 
Vibration326(2009)1–49, 
- Jacquelin Perry and Judith M. Burnfield, "Gait Analysis: Normal and 
Pathological Function", Thorofare, NJ, Slack Inc, 2010.]
As far as I know this facility is implemented in Contemplas software !

Thanks again for your nice and very useful job !

"Read" you Monday !
Respectfully,
Daniel

Original comment by crispini...@gmail.com on 13 Feb 2012 at 1:06

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Daniel,

-1. I filled a new issue for the 3D Pedotti. See issue 26 and especially the 
comment #1. Are you agree with the method proposed?

-2. You can already tag events using the time bar 
(http://b-tk.googlecode.com/svn/doc/Mokka/0.4/_mokka_tutorial__add_remove_event.
html) or using the right click button on a 3D view or a chart view. Using 
"Insert ...", you can give the label that you want.
We also think to implement a method to detect automaticaly heel strike and 
foot-off events, but this part of the project is not yet started. Are you 
waiting for an automatic method ?

Original comment by arnaud.barre on 20 Feb 2012 at 1:27

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

-1. It is interesting how it looks the butterfly diagram ! I've to work with it 
in order to see how this way to present will help me because in a Peddoti 
diagram the scale used for COP trajectory is different as you can see from the 
attached picture from comment 12. I've meet both representations in articles so 
I've to work with both of them in order to see which one is more apropriate for 
me! 
At the moment I'm studying a patient with unilateral hallux valgus and the main 
differences between feet has resulted in Fy [medio-lateral force] and COP 
trajectory. So, for me, it will be interesting to have the possibility to have 
the representation of COP [or PWA] trajectory. Maybe you'll find usefull for 
Mokka project, for the COP [PWA] trajectory to be complete drawn from starting, 
even when GRF is represented only with one single moving vector. Could I've 
access to the version with Butterfly diagram ? Thanks in advance !
2-From a functional point of view, the phase of gait as it was defined by Perry 
represent a reference in literature.I think there is a real interest in 
analyzing the gait cycle not only from the point of view of heel strike and 
foot-off events but also from heel contact...."Loading respone", 
"Midstance","Terminal stance" ,"Preswing",..toe off. As all thes phases could 
be automatically identified using force platform data. I think it will be 
useful to be implemented especially because the statistic report given by force 
platform are presenting, for example, the maximum Fz from the entire gait 
cycle. But I'm interested to compare the same functional tasks and phases of 
gait from different subjects, not only general values ! Hope I've succeeded to 
expres myself enough clear !
Thanks again for your work !
Regards,
Daniel

Original comment by crispini...@gmail.com on 22 Feb 2012 at 8:19

GoogleCodeExporter commented 8 years ago
Hi Daniel,

-1. Would you like to see the PWA trajectory in 3D or into a chart? If
it is in a chart, then as the ground reaction forces, you can drag the
force platform reaction position (which is the PWA) from the
acquisition explorer to a chart. You can even drag it in the same
chart than the plot of the ground reaction forces. If it is in the 3D
view, I think it should be possible. The next alpha version should
come tomorrow.

-2. I will fill a new issue to propose an automatic detection of the phases.

As all our conversation are no more related to the implementation of
the AMTI ASC file format, but on other features of Mokka, I think I
will close this issue. Our next conversation should be in the
dedicated issue (for example, our discussion on the point #1 could
continue in the issue 26).

Original comment by arnaud.barre on 22 Feb 2012 at 11:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Arnaud,

-1. I would like to see the PWZ trajectory in 3D! I've attached in image to 
show how I see this implementation [orthogonal-top view]!
-2. You are the Chief !
Thanks for your job !
Daniel

Original comment by crispini...@gmail.com on 22 Feb 2012 at 2:02

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Daniel,

I filled the issue 27 for the possibilty to see the trajectory of the PWA in 3D 
views.
The screnshots in the comment #1 can show you what it can be done.

Original comment by arnaud.barre on 23 Feb 2012 at 8:34

GoogleCodeExporter commented 8 years ago
Hi Arnaud,

One more question about PWA implementation : there is a writting mistake in the 
Xpwa formula [equation 1.50 pg. 45. The correct formula is 
     Xpwa=((fy*mz-fz*my)/f)-((fx*fx*my-fx*fy*mx)/(f*fz)) and NOT
     Xpwa=((fx*mz-fz*my)/f)-((fx*fx*my-fx*fy*mx)/(f*fz)) like in the link with  PWA formulas :  http://books.google.ch/books?id=wp3zt7oF8a0C&lpg=PA47&ots=Kj633Hzi0b&dq=zatsiorsky%20PWA&hl=de&pg=PA45#v=onepage&q&f=false
Which one is considered in the implementation of GRF visualization ?
Thank you !
Regards,
Daniel

Original comment by crispini...@gmail.com on 23 Feb 2012 at 8:31

GoogleCodeExporter commented 8 years ago
The formulas used in BTK to compute Xpwa and Ypwa are defined in the
file btkGroundReactionWrenchFilter.h, line 103
(http://code.google.com/p/b-tk/source/browse/BTK/trunk/Code/BasicFilters/btkGrou
ndReactionWrenchFilter.h#103).

I noticed the error in the book for Xpwa and also the error for Ypwa
in the original  paper. The formulas used in BTK should be correct.

Original comment by arnaud.barre on 28 Feb 2012 at 8:37

GoogleCodeExporter commented 8 years ago

Original comment by arnaud.barre on 3 Mar 2012 at 8:29