I am keen to find out how to remove a particular muscle from a model. I am intersted in comparing the kinematics and muscle output forces of a model composed of different muscle combinations.
Taking the lower body model example of the ‘‘MoCapModel’’ provided when downloading the Anybody software, could someone walk me through the steps on how to remove a single muscle from the model?
A small comment first: since this a professional forum, we would very much recommend to provide your name and institution details in your profile. Otherwise we do not really know whom we are dealing with and may opt to answer your questions with the lowest priority.
Regarding the muscle exclusion: AnyBodyStudy class contains a member, called MechObjectExclude. This member is an array of object pointers and you could remove a muscle by writing the following line:
You can do it either in YourModel.Main.any after the line starting with AnyBodyStudy. Or you can make an include file, which might be easier to read in case of many exclusions, but you will write the same blocks of code.
I’ve been trying to remove the two muscles that you took as an example from a model I am using, but so far I have not been successful. Below is a short summary of what I have been doing. Perhaps you can find my mistake.
I am working with the example model ‘‘MoCapModel’’ that is provided with the Anybody download package. I paste the code that you provided me in the MoCap_LowerBody.main.any script, within the folder AnyFolder Studies ={, directly below the line #include “Model/RemoveMuscle.any”. I then run the MotionAndParameterOptimizationModel, and then run the InverseDynamicModel.
If I am correct, then the force output of the two muscles (Fout), should be zero. So I go into Window/Chart2D/Main/Studies/InverseDynamicStudy/Output/BodyModel/Right/Leg/Mus/GluteusMediusAnterior6/Fout. However, the graph depicts that there is a force present in the GluteusMediusAnterior6.
AnyFolder Studies ={
// Usually, there is no need to make changes in the following files. PLease be aware. that
// changes in the Kinematics and InverseDynamics may lead to model failure and/or unrealistic results:
#if MotionAndParameterOptimizationModel
#include "Model/Kinematics.any"
#endif
#if InverseDynamicModel
#include "Model/InverseDynamics.any"
InverseDynamicsStudy = {
MechObjectExclude = arrcat(
ObjSearch("Main.Studies.HumanModel...
ObjSearch("Main.Studies.HumanModel...
);
};
#endif
The structure of this model is a little different, you simply did not find those muscles because of the wrong path. To make sure it works - go to the model tree and select MechObjectExclude. In the object description window you should see that it found two objects.
As far as I know, arrcat only allows me to remove two muscles. My final question is: if I wanted to remove all six Gluteus Medius Anterior muscles, how would I go on about doing that? I tried creating three arrcat commands, but that did not seem to work.
Hi,
I would like to know the correct procedure to remove one entire leg from the model.
My final goal is to remove the leg and substitute with a prosthesis.
It doesn’t exclude the elements from the model structure, but excludes it from the analysis. Meaning that the loaded model in the memory will still have all components, but the analysis will solve a smaller problem and will not take into account excluded elements.
If you want to remove it from the model view - you could just set up your own custom view. In SpineFixationWithFDK you could find an example of using AnyProject to set up specific views without modifying the model in the memory.