Patient Specific Scaling and Geometry

Hi,
I introduced a custom scaling law for the thigh and the shank.
Now i want to place patient specific geometry files (stl) at the thigh and shank position of the model.
I hav a transform from the patient specific femur to the femur of the human model. Now i want to transform the tibia file from the femur/thigh axes to the tibia/shank axes using AnyFunTransform3DLinRef2 but i cant get it to work.
Do you have any suggestions on how to achieve this?

Thanks,
Bella

It is not easy, but if you follow all steps as described in the tutorials it should work. What are the specific problems?

Sorry if i was too unspecific.
The custom scaling works fine but i also want to place the patient-specific geometry files at the position of the thigh/shank of the human model to use them later on for FDK analysis.

  1. Transformation from patient-specific geometries to thigh works but now all geometries (including tibia and patella) are placed at the thigh segment.
  2. Assign each geometry file to the respective segment in the human model (tibia file -> shank etc.), how can this be done? I thought about using the AnyFunTransform3DLin2 function but nothing is happening…

I tried using the follwoing code but then only the transformation from the patient-specific frame into the the femur reference frame is applied.

Main.HumanModel.BodyModel.Right.Leg.Seg.Shank = {

//Transform from patient specific frame to femur frame and the from femur to tibia
AnyFunTransform3DLinRef2 TibiaReg =
{
PreTransforms = {&Main.KneeModel.PSScaling.TransformFemur_PS_to_GEN};
Ref = &Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.AnatomicalFrame;
RefTarget = &Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.AnatomicalFrame;
TranslationOnOff = On;
RotationOnOff = On;
/Function_Ref2Global =
{
};
/
/Function_Ref2RefTarget =
{
};
/
};

AnyRefNode TibiaGeometryInt = {

AnySurfSTL TibiaSTL = {
FileName = Main.Model.Settings.TibiaSTL;

AnyFunTransform3DLin ScaleFun = {
AnyVec3 ScaleXYZ = 0.001 * {1, 1, 1};  
ScaleMat = {{ScaleXYZ[0],0,0},{0,ScaleXYZ[1],0},{0,0,ScaleXYZ[2]}};
      Offset = {0,0,0}; 
};
AnyDrawSurf drw = {
      FileName = .FileName;
      ScaleXYZ = .ScaleFun.ScaleXYZ;  
      Opacity = 0.7;
      RGB = {0,0,1};
      Visible = On;
      AnyFunTransform3D &ref = ...TibiaReg;
    };
};

};

};

Hi Bella,

There is some inconsistency in your code: (THIGH to SHANK?!)
Ref = &Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.Ana tomicalFrame;
RefTarget = &Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.Ana tomicalFrame;

Have you resolved your problem? Are you still trying to position the surface for the FDK simulation?

Regards,
Pavel

1 Like