Announcement

Collapse
No announcement yet.

Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

    Hi all,

    Does anyone either have or know of available Matlab code that reads in .c3d files and outputs ankle, knee, and hip joint angles and moments?

    Thanks
    Pete

    --
    Pete Shull
    Stanford University
    PhD Candidate, Mechanical Engineering

  • #2
    Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

    If you are working in the Microsoft Windows environment then you can use the C3Dserver - this is a small DLL that provides high-level support to read and write the data within C3D files for almost any application running in the Microsoft environment.

    The C3Dserver includes a manual documenting all of the functions with examples, as well as several applications that use the C3Dserver, including a basic C3D file editing utility written in Visual Basic using the C3Dserver DLL. The sample applications include their source code so that you can see exactly how to use the application - the installation includes both MATLAB and LABview examples. Manuals for the C3Dserver and the C3D format description are also on-line.

    The C3Dserver application, together with documentation and sample code can be downloaded free of charge from the http:///www.c3dserver.com web site. This free version runs slower than the licensed version (we sell a site license to use the full speed C3Dserver on any number of PC's at one location for $495) but otherwise the free version functions exactly the same as the full speed licensed version - code written for the free version simply runs faster on the licensed version.

    Comment


    • #3
      Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

      Hi Pete

      The BTK-Toolbox is a very nice tool for reading c3d-Files fast. You can download the whole software for free:

      http://code.google.com/p/b-tk/

      Enjoy it.

      Comment


      • #4
        Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

        Hi Pete,
        Just to complete Cora
        The BTK-Toolbox is an open-source and cross-platform library (Mac, Linux, Windows) for reading and editing c3d files.
        For matlab wrapping, you can download a binary or compiled version on : http://code.google.com/p/b-tk/downloads/list
        A full documentation is available on http://b-tk.googlecode.com/svn/doc/Matlab/0.1/index.html.

        Kind regards

        Stéphane ARMAND
        Willy Taillard Laboratory of Kinesiology
        University Hospitals of Geneva
        stephane.armand@hcuge.ch

        Comment


        • #5
          Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

          Hi Pete,

          There is a project on simtk.org started by Tim Dorn to extract data from C3D files in MATLAB. You may be able to modify some of the scripts for your purposes: https://simtk.org/home/c3dtoolbox

          -Sam
          _____________________________
          Samuel Hamner
          Neuromuscular Biomechanics Lab
          Stanford University

          Comment


          • #6
            Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

            Thanks everyone for the helpful suggestions!

            --
            Pete Shull
            Stanford University
            PhD Candidate, Mechanical Engineering

            Comment


            • #7
              Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

              I am reading this thread and i would like to ask, if with these options, matlab, labview and/or c3dserver are possible to get this kind of data, (ankle, knee, hip joint angles in the X,Y and Z plane, and moments) , even if the c3d file doesn´t got it, i mean if the c3d file only have the trace data. Is it possible to process the c3d file to generate the data.
              Thank you in advance.

              Comment


              • #8
                Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

                The C3D file is initially created by the motion capture system to store the trajectory and analog information (forces EMG etc) that is collected. A C3D file will always have the raw data but does not necessarily have the processed data - the angles, moments etc.

                The structure of the C3D file allows a post-data-collection application to calculate these additional values and write the results back to the C3D file while leaving the original data unchanged. These calculations can be performed with many different applications and since the data is stored in the C3D format you are not limited to any specific application - you can write your own application to calculate the results and verify the calculations performed by other applications.

                Comment


                • #9
                  Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

                  Thanks Edmund for your answer here and in the private message, your info has been very helpful and when you say.
                  "These calculations can be performed with many different applications"
                  What other applications do you mean ?
                  And about the c3dserver, is there any tutorial of how to process for example the angles of the gait cycle from a raw data c3d file with c3dserver, where do i start, Visual Studio; standalone c3dserver application ? I dont really know how to start.

                  Thank you again and i hope my questions can help others too.
                  Carlos

                  Comment


                  • #10
                    Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

                    Hi Pete,

                    I developed Matlab code to process Optotrak output files for motion analysis. This was back at Western University(Canada) about 7 years ago, but they may still have it in use. Let me know if you'd like details to contact and follow up.

                    Tim Bhatnagar
                    PhD Candidate
                    Mechanical Engineering
                    University of British Columbia

                    Comment


                    • #11
                      Re: Matlab code, Input: .c3d file, Ouput: ankle, knee, hip joint angles and moments??

                      The C3Dserver is mostly concerned with giving you access to the data in the C3D file - it doesn't assume that the point and analog data has any particular model or subject. It could be data from someone walking but it could just as easily be from a small robot wandering around - you can process this data using Excel, MATLAB, LabVIEW, C++, Pascal or whatever language you chose to use to perform calculations on the data.

                      So you start with a C3D file that contains your data, you then chose a language that you are comfortable using to write for processing algorithms (Visual Studio is fine) and then you write your program. You use the C3Dserver from within your programming language just to read the data from the C3D file, you perform your calculations and you generate the results - these can be written back to the C3D file using the C3Dserver, or you can send them to a printer or write them to another file.

                      If you are looking for details of how to calculate joint angles, moments etc - these will depend on the marker model that you use and you probably need to start a new thread on the forum to get the best answers on performing gait modeling. These sorts of calculations have a long history going back to The Boston Software, the Helen Hayes Model and software from the Cleveland Clinic - there's a package written by Dwight Meglan at The Ohio University for the Analysis and Display of Human Motion that is available with documentation and complete source code (MS-DOS) and can be downloaded from the C3D web site.

                      I'm sure that there are other, more recent, packages available if you ask around.

                      Comment

                      Working...
                      X