Is it possible that AnyBody somehow returns the exact parameters used in the scaling function?
Another question is why the patella of my nicely scaled femur is suddenly distal of the femur:
I only scaled the femur, do you gave any ideas what happened?
Hi,
Question 1 - Unfortunately no, not possible. What parameters do you need? What transform do you use? It maybe be a very nested transform and thus can’t be returned
Question 2 - Very strange, please try to visualize some of the nodes and see where they are morphed, looks like the joint node morphing problem. Is that using RBF or just linear scaling?
Regards,
Pavel
Hi Pavel,
thanks for your answers.
1: I would like to use the real geometry in my FEA and I thought I might get information on how to transform the forces etc. for this application. But maybe you have another suggestion on how I could use the real geometry in ANSYS with the exported boundary conditions.
2: The geometry is created using AnyFunTransform3DLin2, AnyFunTransform3DRBF and AnyFunTransform3DSTL. Did you mead the joint nodes (figure below)? They are definitely not like the ones on the right side. What is the “joint morphing problem”?
Hi Patrick,
As far as I remember you use ANSYS. If you need to transfer the loads correctly - you should change a working plane that matches the force export reference frame. Normally we would compute a working plane in ANSYS using 3 points and find corresponding points on the musculoskeletal model and construct a ref. frame using them. Then call the working plane script first (the WP number should 1000, by default it is in the 0,0,0)
The morphing problem - it is not a specific term It is just that you have some sort of irregular behaviour. And probably a good idea is to visualize your morphing somehow. Have you used BoundingBox components for the RBF-based transforms. It might be an extrapolation misbehaviour of the RBF transforms. But basically try to investigate where the morphing goes wrong. It is hard for me to say from what i know.
Hope this helps,
Pavel
Hi Pavel,
thanks for your answer.
The morphing already fails with the AnyFunTransform3DLin2 (Mode = VTK_LANDMARK_RIGIDBODY). Which puzzles me because I thought this should work without problems.
I used the commands:
BoundingBox.ScaleXYZ = {2, 2, 2};
BoundingBox.DivisionFactorXYZ = {1, 1, 1};
BoundingBoxOnOff = On;
if that is what you mean with BoundingBox components, though I don’t really understand what they are doing.
How could I visualize the morphing like you suggested?
Hi Patrick,
No, AnyFunTransform3DLin2 does not contain these parameters. The bounding box is used to define extrapolating behaviour for non-linear transforms. So it is only the AnyFunTransform3DRBF and AnyFunTransform3DSTL that have these options. The linear transform will transform everything in a linear (r=A*r0+b) manner.
I recommend to have at look at the tutorial. As far as I remember i made a few examples for the bounding box case: here.
Regards,
Pavel
Hi Pavel,
yeah the BoundingBox is only used in the AnyFunTransform3DRBF and AnyFunTransform3DSTL.
But before these two transformations I am using the AnyFunTransform3DLin2 as a pretransformation (as proposed by the tutorial). The problem with the displaced patella is already present after this first linear scaling operation.
Regards,
Patrick
Hi Patrick,
It is hard to say what went wrong - sounds like incorrect linear morphing, can’t say what the reason might be (could be wrong order of landmarks, something else). Could you make a very simple model to demonstrate the problem? Normally it helps me to understand where the problem is and you could also share it with us to debug if it remains problematic.
Regards,
Pavel
Hi Pavel,
I would love to post it but unfortunately it is patient data which I mustn’t share.
Regards,
Patrick
Hi Patrick,
I am sorry about the delay. Have you figured out the problem?
I was not suggesting to post it in the first place, but just try to simplify your model to get down to the root of the problem. Display all nodes, check where they should be in the first place.
But if you can’t figure it out you could send me your model to have a look.
Regards,
Pavel
Hi Pavel,
the problem with the positioning of the segments could be resolved like you said:
By adding the reverse tranformation.
But now a new problem occurs: The model is kinematically indeterminate.
I checked the Mechanical System Infomation of the default standing model and the modified model and there are some differences. Maybe you have an idea of what to do.
This lines added in the scaled model:
29: Main.HumanModel.Scaling.GeometricalScaling.Right.Thigh.Right_Femur_Scaling.SourceFemur_R
30: Main.HumanModel.Scaling.GeometricalScaling.Right.Thigh.Right_Femur_Scaling.TargetFemur_R
31: Main.HumanModel.Scaling.GeometricalScaling.Left.Thigh.Left_Femur_Scaling.SourceFemur
32: Main.HumanModel.Scaling.GeometricalScaling.Left.Thigh.Left_Femur_Scaling.TargetFemur
These lines change in the scaled model:
Total number of rigid-body d.o.f.: 402
57: Main.Model.ModelEnvironmentConnection.Drivers.CoMDriver (2constr.) Segments(67): Thigh Thigh PelvisSeg SacrumSeg L5Seg L4Seg L3Seg L2Seg L1Seg ThoraxSeg SkullSeg BuckleSeg Seg Seg Seg Seg Seg Seg Seg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg SourceFemur_R TargetFemur_R SourceFemur TargetFemur Clavicula Scapula Humerus Ulna Radius WristJointSeg Hand Glove ContactSeg ContactSeg DeltoidMuscleConnector DeltoidMuscleRotControlSeg Cyl Talus Foot Shank Patella Clavicula Scapula Humerus Ulna Radius WristJointSeg Hand Glove ContactSeg ContactSeg DeltoidMuscleConnector DeltoidMuscleRotControlSeg Cyl Talus Foot Shank Patella
146: Main.Model.ModelEnvironmentConnection.Drivers.CoMDriver.Reaction (0 active of 2 reactions) Segments(67): Thigh Thigh PelvisSeg SacrumSeg L5Seg L4Seg L3Seg L2Seg L1Seg ThoraxSeg SkullSeg BuckleSeg Seg Seg Seg Seg Seg Seg Seg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg DiscSeg VirtuelSeg SourceFemur_R TargetFemur_R SourceFemur TargetFemur Clavicula Scapula Humerus Ulna Radius WristJointSeg Hand Glove ContactSeg ContactSeg DeltoidMuscleConnector DeltoidMuscleRotControlSeg Cyl Talus Foot Shank Patella Clavicula Scapula Humerus Ulna Radius WristJointSeg Hand Glove ContactSeg ContactSeg DeltoidMuscleConnector DeltoidMuscleRotControlSeg Cyl Talus Foot Shank Patella
Regards,
Patrick
Hi Pavel,
that was a bit stupid, of course I could solve this myself.
I forgot to delete the segments from the scaling process without those everything works fine.
Thanks for you support so far!
Patrick
Hi,
I’m relatively new to Anybody and have a pressing assignment:
I have to use the spine model from the model respiratory to determine muscle forces and their application points for a mild running scenario. So far so good… the problem is that I have to determine these for a patient-specific spine geometry (obtained from CT measurements).
I have morphed the existing vertebrae of the model to «my» dimensions and I’m stuck as to how to use these with the existing model, so I don’t have to redefine all the muscle attachment points over again. The tutorials say that this is possible but don’t say how!
Can anybody help me with AnyBody??? J
I’d really appreciate some insight.
George.
Hi George,
Please check the lesson4 of the scaling tutorial - it uses a femur as the example, but for the spine it should be just the same. The only thing that is changing is the name of the define that controls inclusion of the morphing law into the model. The naming is consistent with the segmental names.
So for the lumbar spine you would use:
#define CUSTOM_SCALING_L1Seg
#define CUSTOM_SCALING_L2Seg
..
#define CUSTOM_SCALING_L5Seg
#define CUSTOM_SCALING_SacrumSeg
and the scaling law would be included as:
Scaling.GeometricalScaling.L2Seg = {
#include "ScalingLawL2.any"
AnyFunTransform3D &ScaleFunction = ScalingLaw;
};
Do you only need lumbar vertebrae?
Regards,
Pavel
Dear Pavel,
Thank you very much for your immediate response,
I only need lumbar vertebrae so I think it would be ok if the code is as you said.
I don’t really remember if lesson 4 of the scaling tutorial has all these information about the code, but I will check it as soon as I go to my office. I hope I will find no difficulties in all these.
Thanks again.
Regards, George
Dear Pavel,
In the Scaling lesson in the tutorial there is an appendix that has a transformation of a vertebra, so I decided to follow this as an example.
When I used 50 matching points, the scaling was OK but it was lacking accuracy. I decided to go with approximately 160 points but then something “bad” is happening. The source vertebra is shown as a thin line.
Do you have any idea about this?
Thanks in advance.
George
Dear George,
I think you are experiencing something that I have described in the Appendix to the Lesson 3. Sometimes a set of parameters and choice of the RBF type do not work well and the geometry blows up.
I am not sure what you use exactly at the moment, but you could try using RBFDEF.Type=RBF_Triharmonic, which may help.
Regards,
Pavel
Dear Pavel,
I have tried all the RBF types available and none of them seems to work fine. I guess it’s not that easy to scale it to the exact geometry of a CT scan.
Do you think I have to try it again with a shorter number of points although I will lack accuracy?
Best regards
Giorgos
Dear Giorgos,
Yes, scaling is tricky, but generally you can reach some good level of accuracy. You should definitely try to play with the parameters (bounding box, number of points (increase/decrease), etc.). There is no unique solution to everything, since the target geometry may differ substantially. Appendix to Lesson 3 could be helpful to understand t
As well as that try to change the selection of the landmarks. Sometimes you need to add more to make your scaling work. Typically in the places where the problem is.
If you post a picture and brief description of your scaling method - I could probably recommend something.
Regards,
Pavel