Scaling lesson #4 and new AMMR

Hi guys,

I tried the scaling lesson #4 (“StandingModelScalingDisplay”) with the new AMMR v.1.6.1 included in the packages that comes with the AMS v6.0. However, when I plot the final results, my thigh bones are not looking like the ones in the tutorial (see attached figure). This is specially obvious for the greater trochanter. From the release notes of the new AMMR and AMS, it seems that a lot of changes were made in the scaling laws and TLEM model definition. So I just want to know if the new results obtained with the new AMS and AMMR and the “StandingModelScalingDisplay” are ok or not. Eventually, I will need to use the custom scaling functions with my own bones, so I need the TLEM model to give physiological scaling !

Could you please try it and give me a feedback ?

Thank you.

Pierre

Hi again,

I think I found the reason. The femur in the tutorial is different from the one in the TLEM model. Thus, the points used to define the scaling law are not right.

Pierre

Hi again,

I’ve been working on the new scaling method for 2 days now, but I’m still not able to make my scaling works properly.

First, what is the difference between anatomical and segmental reference frames ? The AMMR release notes gives information about it, but it is still unclear. From my researches in the code, it seems that the segmental reference frame is the one used in the cadaver study to define the various nodes on the segment, is that it ?

Which reference frame is used to scale the whole model ? Anatomical or segmental ? In the global scaling law (name: Scale), your final transform is from scaled anatomical to segmental, so I guess that it is the segmental frame, right ?

Which reference frame is used to apply custom scaling laws (GeomScale), like RBF and STL transforms ?

When I change the PreTransform of the Scale function to this :

PreTransforms = {
&.GeomScale,
&T1
};

and the PreTransform of the T0GT0_Inv function to this:

PreTransforms = {
  &..GeomScale, 
  &.T0
};

… I obtain a much more physiological scaling.

I also wonder why you name function like T0 and T0_Inv, while in fact, their respective ScaleMat and Offset are reversed.

I hope that my work will help to find the issue !

Thank you.

Pierre

Hi Pierre,

in AMMR v1.6 the concept of anatomical and segmental ref frames have been introduced. The idea is to make it easier to use other subject data. While previously a “theoretical” ref frame was used to scale the subject, difficulties showed up in how this segmental ref frame is defined.
Now, the anatomical frame is used for scaling and defining the whole segment. That means the frame is defined by anatomical/ bony landmarks.

So for your question which ref frame to use, it is the anatomical ref frame. I will look further into your other comments, I think I need some time to reproduce the model.

Hi,

Just try to do the tutorial with the new scaling code. You might see that something is going wrong.

Pierre

Hi again,

I’ve found that when complex non-uniform scaling is involved, the final scaling matrix is not commutative. This means that the transpose and the inverse are not the same.

http://www.arcsynthesis.org/gltut/Illumination/Tut09%20Normal%20Transformation.html#ftn.d0e9340

Do you think that this influence how the whole scaling is performed when non-uniform scaling is involved (eg. RBF and STL transforms) ?

Pierre

Hi Pierre,

I am back. Let me read the whole thread and try the problem in the tutorials. I will come back to you once resolved it. But you should not worry about the internal transforms - as Amir said they are used for going to and from anatomical reference frame. They are constructed based on the original unscaled and morphed points and, thus, should not affect the nonlinear transforms.

I will come back to you shortly (might be after the weekend).

Regards,
Pavel

Hi Pierre,

We are sorry for a very late reply. Essentially you are right. There is an issue in the current repository and the following block suggests a solution.

Our intention was to scale segments in anatomical frames (we call it scaling, since there are a number of ways to define ‘anatomical’ frame) and internally everything has been prepared for that. So the T0 transform that you found is the transform from segmental to scaling (anatomical) reference frame. And to get the correct result you would need to transform all source entities using this transform: Points0 = …pathhere…T0(Points0_segmental). But we cannot process surface using this transform until the next updated version of AMS, which comes out very soon. The solution would be manually process the source surface (move it using rigidbody T0 transform), save into another file and use this file as an input.The version 6.0.3 will contain a feature to pretransform surfaces and the new tutorial will suggest a simple way for handling everything.

So ‘thigh’, ‘shank’, ‘pelvis’ segments will need such pretransformations - to access them you can use the following path:
Thigh: BodyModel.Right[Left].Leg.Seg.Thigh.Scale.T0
Shank: BodyModel.Right[Left].Leg.Seg.Shank.Scale.T0
Pelvis: BodyModel.Trunk.SegmentsLumbar.PelvisSeg.Scale_Trunk_Pelvis.ScaleAfterInterfaceMorphingDef.Scale.T0

We are very sorry for not coming back to this issue before.

Thanks for your help.

Regards,
Pavel