For the landmarks, I utilized the insertion points of the ligaments on the surface of the L4 vertebra, as they were present in my model, and I could obtain the coordinates of those points from AnyBody.
Here, you can see the landmarks that I selected. In the Point0 matrix are the coordinates on the AnyBody model (source), and in Point1 are the coordinates of the Abaqus Model (target):
In grey is the "morphed" vertebra, and in yellow is the original one.
If you have any insights into why it is not working, whether it's a coding error or an issue with my chosen landmark, I would greatly appreciate your assistance.
Could you show the code how you are drawing these surfaces and applying the scaling function?
I am also a bit suspicious about the target landmarks (13mm from smallest to largest value on Y component). Could you try visualizing your landmarks against your surface?
AnyDrawPointCloud landmarksTarget = { // Same ref. frame as the surface
PointStyle = {
Style = PointStyleSphere;// Marker style.
Size = 0.005;// Size of markers.
};
Points3D = On;
RGB= {1,0,0};
Points= 0.001*..MyTransform.Points1; //CORRECT THIS PATH
};
If all landmarks match the surfaces and you apply transformations correctly it should make sense.
Regarding the code, I followed the same syntax as the tutorial. Below, you can find the code that describes how the drawing and transformations are applied to the segment.
I visualized my landmarks and some of them were indeed out of place. I also deleted some of them and it worked better. I was able to do all of the other transformations afterwards.
But I cannot help but notice that your AnyBody surfaces are called "L4Any_GlobalRef". For morphing, we always use local ref. frame and non-scaled model to export surfaces and landmarks. This may cause that your scaling would work for your test disconnected test, but not when you include it into the human model. I hope it is just naming
You guessed the name right. I initially utilized the STL file in the global reference frame for scaling. I recognized my mistake while doing the tutorial on implementing scaling directly into my model. However, I followed the tutorial instructions without using the TSeg2ScaleFrame Transform, and it surprisingly seems to work. Below is a picture showing the scaled L4 vertebra (circled in red) inside the model. Do you think there might still be issues if the scaling is done this way ?
Nevertheless, I also re-did the entire scaling process using the local reference frame of the vertebra to ensure accuracy.
If you are happy - then I am happy :))
But generally speaking we want the source surface and landmarks to be exactly in the non-scaled configuration in the local ref. frame. This is because our morphing function will be exactly to those entities. If it is not - it might introduce an error that hard to find - just be aware. Sometimes it is difficult visually to assess scaling from 120% to 118%. May not look critical, but there will be a difference.