Hello, Im trying to modify the thickness of the muscle en OS 3.3, but I cannot find the way neither in the interface program nor in the code. Does anybody know how to do it? Many thanks,
Alejandro.
Muscle thickness in OS 3.3
- Alejandro Otero
- Posts: 4
- Joined: Thu Jul 18, 2013 6:09 am
- Pasha van Bijlert
- Posts: 229
- Joined: Sun May 10, 2020 3:15 am
Re: Muscle thickness in OS 3.3
Hi Alejandro,
If you mean the thickness as the muscles shown in the visualizer (which has no effect on the force that the muscles can generate, it's just an aesthetic choice), you can set this under edit - preferences - muscle display radius.
If you want to change the force productive capabilities of a muscle, you do this both in the standalone opensim program, and also via code. In the standalone program, you open a model in the navigator menu, then click forces - muscles (assuming your model has muscles and they're in the forceset). For each muscle, you can change max_isometric_force, which is probably the closest to muscle thickness (but you need to assume some value for specific tension to know what PCSA this is implying). Make sure to save the model as a copy, otherwise it will overwrite your existing model.
You can also do this in matlab, assuming you have loaded in a model:
Bear in mind that if you change max isometric force (i.e. PCSA) without changing the fiber length, you're implicitly changing the mass of the muscle.
Hope this helps!
Pasha
If you mean the thickness as the muscles shown in the visualizer (which has no effect on the force that the muscles can generate, it's just an aesthetic choice), you can set this under edit - preferences - muscle display radius.
If you want to change the force productive capabilities of a muscle, you do this both in the standalone opensim program, and also via code. In the standalone program, you open a model in the navigator menu, then click forces - muscles (assuming your model has muscles and they're in the forceset). For each muscle, you can change max_isometric_force, which is probably the closest to muscle thickness (but you need to assume some value for specific tension to know what PCSA this is implying). Make sure to save the model as a copy, otherwise it will overwrite your existing model.
You can also do this in matlab, assuming you have loaded in a model:
Code: Select all
yourmuscle = model.getMuscles().get('musclename'); %fill in the name of the muscle you want to adapt
yourmuscle.setMaxIsometricForce(3000); %fill in max iso force you want
model.initSystem;
model.finalizeConnections; %this might not be necessary
model.print('model_retuned.osim');
Hope this helps!
Pasha
- Alejandro Otero
- Posts: 4
- Joined: Thu Jul 18, 2013 6:09 am
Re: Muscle thickness in OS 3.3
Hello Pasha,
yes, I mean the thickness as the muscles shown in the visualizer. I tried your suggestion and worked perfectly. Many thanks for your quick help! Cheers.
yes, I mean the thickness as the muscles shown in the visualizer. I tried your suggestion and worked perfectly. Many thanks for your quick help! Cheers.