The Muscle Force Direction plugin extends the functionalities of OpenSim providing a straighforward interface to extract the muscle lines of action.
The source code of the plugin is provided in the main repository and a dll that can be loaded through the main OpenSim user interface is available through the Releases
tab.
Leveraging the OpenSim Application Programming Interface (API), we also provide MATLAB scripts that replicate the plugin functionalities.
If you are using the internal forces estimated by musculoskeletal models as load sets in finite element models you find that you have few options to compute the direction of each force vector:
- use a PointKinematics analysis on the points of interest of your line of action, compute the force versor for the kinematic frame of interest
- use the PointForceDirection class and search for the segment of the muscle line of action that you are interested in.
The MuscleForceDirection plugin
(MFD
plugin for short) tries to streamline this operations and make easier to extract muscle forces and apply them to finite element models.
Anatomical muscle lines of actions are those whose attachments are on the bones.
Effective muscle lines of actions are those determining the effective mechanical effect of the muscle action on the equilibrium of the bone when considering its free body diagram.
A typical example is a muscle including via points or wrapping surface, for example the gastronemius, that can alter the muscle lines of action substantially between the first segment of the muscle and the last segment attached to a certain bone.
A good explanation of this difference is available in section 5.4.3 of Yamaguchi's book Dynamic Modeling of Musculoskeletal Motion: A Vectorized Approach for Biomechanical Analysis in Three Dimensions
entitled EFFECTIVE ORIGIN AND INSERTION POINTS
.
Using the plugin setup you can decide:
- the body/bodies of interest on which to run the MFD analysis
- the reference system in which you want to express the line of actions
- choose if you want to extract the "anatomical" lines of action or the "effective" lines of action.
- For compiling the C++ plugin, follow the instructions available on the OpenSim Developers' Guide, where you can also find some examples.
- For installing the MFD plugin for use in the OpenSim GUI follow the same procedure to install other plugins:
- place the plugin in the
plugins
folder - restart OpenSim
- place the plugin in the
- For using the MATLAB scripts (OpenSim version ), you need to:
- ensure that the OpenSim API are correctly installed. Please refer to the OpenSim documentation.
- include the MATLAB folder in your path.
- check the provided examples.
There will be examples of how to call the plugin from Matlab etc.
The plugin was originally described in the Appendix of this open access publication:
@article{van2013hip,
title={Hip abduction can prevent posterior edge loading of hip replacements},
author={van Arkel, Richard J and Modenese, Luca and Phillips, Andrew TM and Jeffers, Jonathan RT},
journal={Journal of Orthopaedic Research},
volume={31},
number={8},
pages={1172--1179},
year={2013},
publisher={Wiley Online Library}
}
but a better example of use is provided in this other open access paper:
@article{phillips2015femoral,
title={Femoral bone mesoscale structural architecture prediction using musculoskeletal and finite element modelling},
author={Phillips, Andrew TM and Villette, Claire C and Modenese, Luca},
journal={International Biomechanics},
volume={2},
number={1},
pages={43--61},
year={2015},
publisher={Taylor \& Francis}
}
Feel free of contributing as by standard GitHub workflow:
- forking this repository
- creating your own branch, where you make your modifications and improvements
- once you are happy with the new feature you have implemented create a pull request
- If you want to contribute but you are not familiar with Git, the Software Carpentry Lessons are a perfect place to start with Git and GitHub.
- If you know how to use git but you are not familiar with GitHub, you can check resources like "First Contributions" to learn how to contribute to existing projects.
- OpenSim Webinar: "Interfacing Musculoskeletal and Finite Element Models to Study Bone Structure & Adaptation"
Several researchers have contributed to this package:
- Luca Modenese: C++, Matlab
- John J. Davis IV: Plugin Matlab demo updated to OpenSim 4.2
- Ke Song: Matlab update to OpenSim 4.0
- Dimitar Stanev: C++ update to OpenSim 4.0
- Claudio Pizzolato: C++ makefiles
- Friedl De Groote: C++ legacy version of v1.0
- Alfred Thibon: C++