Dear AnyBody:
I have two questions regarding the scaling of a musculoskeletal model.
First, I have set up a musculoskeletal model using motion data from subject A. I also have a scaling law using images from subject B. Since RunMtoionAndParameterOptimization also scales the skeletal model, how do I morph the tibia of the musculoskeletal model (based on subject A)using the custom-defined scaling law (based on subject B)?
Typically we would do RunMotionAndParameterOptimzation, followed by inverse dynamics. I am considering the following the sequence:
- RunMotionAndParamterOptimization, results in segments with updated lengths (based on motion capture data) and joint moment/angles etc. This will make sure the model will move in a reasonable way.
- scale the model using the custom-defined scaling law - replace the generic tibia with the morphed tibia, scale the overall size using subject’s anthropometric data. This will make sure the model has a tibia with correct shape and size
- Inverse dynamics.
Please let me know if this order makes sense.
The second question is where to insert the custom scaling law. Right now I put it in the main MoCap file, inside the Studies folder like this:
…
…
Main[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]{
[SIZE=3] [/SIZE][SIZE=3]#include [/SIZE]“Model/ModelSetup.any”[SIZE=3] [/SIZE][SIZE=3]
[/SIZE][SIZE=3] #include [/SIZE]“Model/Environment.any”
[SIZE=3]
[/SIZE][SIZE=3]
#include[/SIZE][SIZE=3] [/SIZE]“Input/TrialSpecificData.any”[SIZE=3]
[/SIZE][SIZE=3]
[/SIZE][SIZE=3]// FIX ME!!! This is the scaling law
[/SIZE][SIZE=3] #include [/SIZE]“Model/ScalingLawTibiaR.any”
[SIZE=3]
AnyFolder [/SIZE]Studies[SIZE=3] [/SIZE]={
[SIZE=3] [/SIZE][SIZE=3]// FIX ME!!! Inclusion into the body scaling scheme
[/SIZE][SIZE=3]
[/SIZE][SIZE=3] [/SIZE]HumanModel.Scaling.GeometricalScaling[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]{[SIZE=3]
[/SIZE][SIZE=3]#define[/SIZE][SIZE=3] [/SIZE]CUSTOM_SCALING_Left_Shank
[SIZE=3] [/SIZE][SIZE=3]#include[/SIZE][SIZE=3] [/SIZE]"./Model/ScalingLawTibiaR.any"
[SIZE=3] [/SIZE]Left.Shank[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]{
[SIZE=3] [/SIZE][SIZE=3]AnyFunTransform3D[/SIZE][SIZE=3] [/SIZE]&ScaleFunction[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]Main.ScalingTibiaR.finaltransform;
[SIZE=3] [/SIZE]};
[SIZE=3] [/SIZE]};
[SIZE=3]
[/SIZE][SIZE=3]
#if [/SIZE]MotionAndParameterOptimizationModel
[SIZE=3] #include [/SIZE]“Model/Kinematics.any”[SIZE=3]
#endif
#if [/SIZE]InverseDynamicModel
[SIZE=3] #include [/SIZE]“Model/InverseDynamics.any”[SIZE=3]
#endif
[/SIZE]};
};[SIZE=3] [/SIZE][SIZE=3]//Main
[/SIZE]
Then I got this error message: [SIZE=1][SIZE=1]
ERROR(SCR.PRS1)[/SIZE] : [SIZE=1]C:/P…s/A…y/A…0/AMMR/Body/A…n/S…g/ScalingLengthMassFat.any(157)[/SIZE] : ‘ScaleFunction’ : Object already declared at :
[SIZE=1]D:\pQCT\IDF\PreCT_96\Female\Morph\Mode1\mean\L30I00WLowerBody-backpack\Model\ScalingLawTibiaR.any(25)[/SIZE] : ‘finaltransform’
Model loading skipped
[/SIZE]
I see ScalingLengthMassFat.any was called from …\AMMR\Body\AAUHuman\Scaling, I think my scaling should work if I can turn it off but don’t know where to do this.
Thank you!
-Phoebe
But let me try to give you some hints what could go wrong.