{"id":22122485,"url":"https://github.com/modenaxe/3d-muscles","last_synced_at":"2025-10-11T06:39:46.951Z","repository":{"id":81308598,"uuid":"227339823","full_name":"modenaxe/3d-muscles","owner":"modenaxe","description":"Materials to reproduce the results of our paper about 3D muscle modelling.","archived":false,"fork":false,"pushed_at":"2021-10-05T10:30:46.000Z","size":34896,"stargazers_count":32,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-25T19:50:21.464Z","etag":null,"topics":["bioengineering","biomechanics","geometry","hip","joint-models","muscle","muscle-model","opensim","scientific-papers","scientific-publications","scientific-research","scientific-visualization"],"latest_commit_sha":null,"homepage":"https://simtk.org/projects/3d-muscles","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modenaxe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-11T10:34:42.000Z","updated_at":"2025-06-17T23:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"72b96493-1ee1-420b-abe9-f243af031503","html_url":"https://github.com/modenaxe/3d-muscles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/modenaxe/3d-muscles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modenaxe%2F3d-muscles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modenaxe%2F3d-muscles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modenaxe%2F3d-muscles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modenaxe%2F3d-muscles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modenaxe","download_url":"https://codeload.github.com/modenaxe/3d-muscles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modenaxe%2F3d-muscles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006451,"owners_count":26084107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioengineering","biomechanics","geometry","hip","joint-models","muscle","muscle-model","opensim","scientific-papers","scientific-publications","scientific-research","scientific-visualization"],"created_at":"2024-12-01T15:21:58.890Z","updated_at":"2025-10-11T06:39:46.939Z","avatar_url":"https://github.com/modenaxe.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Table of Contents  \u003c!-- omit in toc --\u003e\n- [Overview](#overview)\n\t- [Brief summary of the publication](#brief-summary-of-the-publication)\n\t- [Video summary of the publication](#video-summary-of-the-publication)\n- [Requirements](#requirements)\n- [Contents](#contents)\n\t- [Visualizing the anatomical dataset](#visualizing-the-anatomical-dataset)\n\t- [Visualizing the OpenSim models](#visualizing-the-opensim-models)\n\t- [Running the MATLAB scripts](#running-the-matlab-scripts)\n- [Limitations and notes about reproducibility](#limitations-and-notes-about-reproducibility)\n- [Future work](#future-work)\n\n# Overview\nThis repository contains the data, models and the Matlab scripts to inspect and reproduce the results of the following publication:\n\n```bibtex\n@article{Modenese2020three,\n  title={Automated Generation of Three-Dimensional Complex Muscle Geometries for Use in Personalised Musculoskeletal Models},\n  author={Modenese, Luca and Kohout, Josef},\n  journal={Annals of biomedical engineering},\n  year={2020},\n  publisher={Springer}\n  doi={10.1007/s10439-020-02490-4}\n}\n```\nThe paper is open access and freely available [from the Journal website](https://link.springer.com/article/10.1007%2Fs10439-020-02490-4) or [this repository](https://github.com/modenaxe/3d-muscles/tree/master/docs).\n\nPlease cite the manuscript if you make use of these materials for your research or presentations.\n\n## Brief summary of the publication\nIn our manuscript: \n* We used a publicly available anatomical dataset to create a subject-specific musculoskeletal model of the hip joint using bone and muscle geometries from CT and MRI scans.\nThe medical images were collected on a cadaveric specimen. \n* We used this model to propose a new method for representing the geometry of the skeletal muscles surrounding the hip joint and how they change their shape\nwhen the joint moves.\n* We compared the muscle moment arms computed with our new approach against previous studies published in the biomechanical literature, finding remarkable agreement for \nranges of motion consistent with normal gait. If you need some background reading about computing muscle moment arms, you can refer to this [classic article by An K.N. et al.](http://e.guigon.free.fr/rsc/article/AnEtAl84a.pdf).\n\n![muscle_deformations](https://github.com/modenaxe/3d-muscles/blob/master/images/muscle_deformations.png)\n\n## Video summary of the publication\n\nThe paper associated with this repository was awarded the [:trophy: Athanasiou postdoctoral award :trophy: of the Biomedical Engineering Society (BMES)](https://www.bmes.org/athanasiou) and the talk Luca gave for the occasion, presenting the work and its future developments, has been recorded and shared on YouTube. Click on the image below to see the recorded:\n\n[![Alt text](images/youtube_thumbnail.png)](https://youtu.be/4YHMiScyYtg)\n\n\n# Requirements\nIn order to take full advantage of the content of this repository you will need to:\n1. download [OpenSim 3.3](https://simtk.org/projects/opensim). Go to the `Download` page of the provided link and click on `Previous releases`, as shown in [this screenshot](https://github.com/modenaxe/3d-muscles/blob/master/images/get_osim3.3.PNG).\n You will use OpenSim to visualize the models. \n2. have MATLAB installed in your machine. The analyses of the paper were performed using version R2017b.\n3. set up the OpenSim 3.3 API. Required to run the provided scripts. Please refer to the OpenSim [documentation](https://simtk-confluence.stanford.edu/display/OpenSim/Scripting+with+Matlab).\n4. (optional) [NMSBuilder](http://www.nmsbuilder.org)\n\n# Contents\nThis repository includes:\n1. LHDL Anatomical dataset (see [reference publication](https://www.jstage.jst.go.jp/article/physiolsci/58/7/58_7_441/_article)) including:\n\n\t\ta. bone geometries (pelvis, right femur)\n\t\tb. muscle geometries for iliacus, psoas, gluteus maximus and gluteus medius\n\t\tc. muscle attachments (as point clouds)\n2. OpenSim model with `straight-lines muscles` built from the LHDL dataset using NMSBuilder\n3. Motion data in OpenSim format (`.mot` files) to simulate the following hip motions:\n\n\t\ta. hip flexion/extension between -10 and 60 degrees\n\t\tb. hip abduction/adduction between -40 and 40 degrees \n\t\tc. hip internal/external rotation between -30 and 30 degrees.\n4. OpenSim models with `highly discretized muscles`. There is a model for each of the investigated hip motions.\n5. MATLAB scripts to recreate:\n\n\t\ta. Figure 4 and Figure 5 presenting the moment arms of the highly discretized muscles and their validation.\n\t\tb. the results that were included in Table 1 and Table 2.\nPlease note that the folders starting with `_` contain support functions and data used by the main scripts. \n\n## Visualizing the anatomical dataset \nThe LHDL anatomical dataset employed in this study is available in the folder [_LHDL_hip_r_dataset](https://github.com/modenaxe/3d-muscles/tree/master/_LHDL_hip_r_dataset) \nand can be visualised and used to build an OpenSim model using [NMSBuilder](http://www.nmsbuilder.org).\nPlease refer to the NMSBuilder [website](http://www.nmsbuilder.org) for documentation on how to use that software.\n![NMSBuilder_LHDL](https://github.com/modenaxe/3d-muscles/blob/master/images/NMSBuilder_view.png)\n\n## Visualizing the OpenSim models\nAll models and scripts are designed to be used in OpenSim 3.3, although \nit is possible to import the highly discretized models also in OpenSim 4.0 for better visualization, as OpenSim v4 allows using different colours for the fibres of each muscle.\n![OpenSim_models](https://github.com/modenaxe/3d-muscles/blob/master/images/OpenSim3_models.png)\n\n## Running the MATLAB scripts\nThe provided MATLAB scripts are meant to be executed in sequential order following the alphabetical order of the first character.\nFor scripts with the same initial character, the second character, which is a number, suggests the order of execution.\nSo the order is:\n1. a_compute_biomech_moving_viapoints.m\n2. b1_plot_momArms_Fig4_as_Blemker2005.m\n3. b2_plot_momArms_Fig5_as_Blemker2005.m\n4. etc.\n\n# Limitations and notes about reproducibility\n* The highly discretized muscle models are meant to be used for simulating the provided hip joint tasks and nothing else.\n* Please note that the results for the highly discretized muscles presented in the manuscript were generated from kinematic simulations \nperformed in LHPBuilder, a multimodal viewer for biomechanical applications that is not developed or supported anymore. \nA version of LHPBuilder compatible with the use done in this paper can be downloaded from \n[this website](https://mi.kiv.zcu.cz/en/research/musculoskeletal.html). LHPBuilder is a complex\n tool requiring preliminary training to be used, so we decided instead to implement the muscle fibre kinematics in the OpenSim models directly. \n This approach simplifies the reproducibility of our results because it allows to calculate the muscle fibre lengths using the OpenSim API directly. \n Please note that because of rounding errors in generating the models, some decimals of the results might differ from what reported in the manuscript. \n The LHPBuilder models and files are available on request.\n\n# Future work\n* A prototype of an `OpenSim plugin` implementing the methods described in this manuscript has already been\nimplemented and a preview is visible on Youtube [at this link](https://www.youtube.com/watch?v=BW_jjCcbf5o). The source code will be released with one of our next publications.\n* Upgrade scripts to openSim 4.0.\n* link to *work in progress* repository with LHPBuilder files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodenaxe%2F3d-muscles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodenaxe%2F3d-muscles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodenaxe%2F3d-muscles/lists"}