Hi Pavel, sorry its taken so long to get back to you, I am currently balancing an MSc and PhD simultaneously.
I’ve changed a few things so that the ScaleFunction is a combination of all the transformations/morphs like so:
RBFLandmarks.any…
AnyFunTransform3DLin ScaleFunction = {
PreTransforms = {
&.ScaleCalcaneus,
&.ScaleTalus,
&.ScaleNavicular,
&.ScaleInt_Med_Lat_Cunneiforms,
&.ScaleCuboid,
&.ScaleMetatarsal1,
&.ScaleMetatarsal2,
&.ScaleMetatarsal345,
&.ScaleDistalPhalange1,
&.ScaleProximalPhalange1,
&.ScaleDist_Mid_Prox_Phalanges2345
};
ScaleMat = {{1,0,0},{0,1,0},{0,0,1}};
Offset = {0,0,0};
};
With each morph constructed like so:
//Start of Calcaneus Scaling
AnyFunTransform3DLin ScaleCalcaneus = {
PreTransforms = {&.RBFCalcaneus,&.RevCalcaneus};
ScaleMat = {{1,0,0},{0,1,0},{0,0,1}};
Offset = {0,0,0};
};
AnyFunTransform3DLin2 FwCalcaneus = {
Points0 = .CalcaneusMorphingLandmarks.SourceCalcaneusPointCloud; //Original MorphingPointCloud matrix.
Points1 = .CalcaneusMorphingLandmarks.TargetCalcaneusPointCloud; //Target MorphingPointCloud matrix.
Mode = VTK_LANDMARK_AFFINE;
};
AnyFunTransform3DRBF RBFCalcaneus = {
PreTransforms = {&.FwCalcaneus};
RBFDef.Type = RBF_ThinPlate;
Points0 = .CalcaneusMorphingLandmarks.SourceCalcaneusPointCloud; //Original MorphingPointCloud matrix.
Points1 = .CalcaneusMorphingLandmarks.TargetCalcaneusPointCloud; //Target MorphingPointCloud matrix.
BoundingBoxOnOff = On;
BoundingBox.ScaleXYZ = {1,1,1}*2;
BoundingBox.DivisionFactorXYZ = {1, 1, 1}*2;
};
AnyFunTransform3DLin2 RevCalcaneus = {
Points1 = .CalcaneusMorphingLandmarks.SourceCalcaneusPointCloud;
Points0 = .CalcaneusMorphingLandmarks.TargetCalcaneusPointCloud;
Mode = VTK_LANDMARK_RIGIDBODY;
};
//STL Transformation
AnyFunTransform3DSTL STLCalcaneus ={
PreTransforms = {&.RBFCalcaneus};
RBFDef.Type = RBF_ThinPlate;
AnyFixedRefFrame Input = {
AnySurfSTL Source = {
FileName = "CalcaneusGM.stl";
ScaleXYZ = {1, 1, 1};
//AnyFunTransform3D &pre = ....TSeg2ScaleFrame;
};
AnySurfSTL Target = {
FileName = "MBFOOT5_calcaneus.stl";
ScaleXYZ = {1, 1, 1}*0.001;
};
};
SurfaceObjects0 = {&Input.Source};
SurfaceObjects1 = {&Input.Target};
//Max NumPoints = Number of Source Surface Verticies
NumPoints = 5000;
BoundingBoxOnOff = On;
BoundingBox.ScaleXYZ = {1,1,1}*2;
BoundingBox.DivisionFactorXYZ = {1, 1, 1}*2;
//UseClosestPointMatchingOnOff= On;
};
AnyFolder CalcaneusMorphingLandmarks= {
AnyFolder &SegRef = .....BodyModel.Right.Leg.Seg;
// AnyFolder &SegRef = .....BodyModel.Right.Leg.Seg.Calcaneus;
//Matrix of the point cloud in foot ref frame.
AnyMatrix SourceCalcaneusPointCloud =
FunCEx("CalcaneusGM_picked_points_43.pp", Main.FootPrintFolderPath +"/Scaling");
AnyInt Size = 43;
AnyFunEx FunCEx =
{
AnyMatrix Return = {iarr(1,.Size)*0,iarr(1,.Size)*0,iarr(1,.Size)*0}';
AnyFunExMonoPy ReadMLFile =
{
ModuleFile = "ReadMeshlabIn.py";
ArgList =
{
AnyStringVar filename = "";
AnyStringVar path = "";
};
};
};
AnyMatrix TargetCalcaneusPointCloudMillimeter =
FunCEx("MBFOOT5_calcaneus_picked_points_43.pp", Main.FootPrintFolderPath +"/Scaling");
AnyMatrix TargetCalcaneusPointCloud = TargetCalcaneusPointCloudMillimeter*0.001;
};//CalcaneusMorphingLandmarks
//End of Calcaneus Scaling
//Start of Talus Scaling
AnyFunTransform3DLin ScaleTalus = {
PreTransforms = {&.RBFTalus,&.RevTalus};
ScaleMat = {{1,0,0},{0,1,0},{0,0,1}};
Offset = {0,0,0};
};
AnyFunTransform3DLin2 FwTalus = {
Points0 = .TalusMorphingLandmarks.SourceTalusPointCloud; //Original MorphingPointCloud matrix.
Points1 = .TalusMorphingLandmarks.TargetTalusPointCloud; //Target MorphingPointCloud matrix.
Mode = VTK_LANDMARK_AFFINE;
};
AnyFunTransform3DRBF RBFTalus = {
PreTransforms = {&.FwTalus};
RBFDef.Type = RBF_ThinPlate;
Points0 = .TalusMorphingLandmarks.SourceTalusPointCloud; //Original MorphingPointCloud matrix.
Points1 = .TalusMorphingLandmarks.TargetTalusPointCloud; //Target MorphingPointCloud matrix.
BoundingBoxOnOff = On;
BoundingBox.ScaleXYZ = {1,1,1}*2;
BoundingBox.DivisionFactorXYZ = {1, 1, 1}*2;
};
AnyFunTransform3DLin2 RevTalus = {
Points1 = .TalusMorphingLandmarks.SourceTalusPointCloud;
Points0 = .TalusMorphingLandmarks.TargetTalusPointCloud;
Mode = VTK_LANDMARK_RIGIDBODY;
};
//STL Transformation
AnyFunTransform3DSTL STLTalus ={
PreTransforms = {&.RBFTalus};
RBFDef.Type = RBF_ThinPlate;
AnyFixedRefFrame Input = {
AnySurfSTL Source = {
FileName = "TalusGM.stl";
ScaleXYZ = {1, 1, 1};
//AnyFunTransform3D &pre = ....TSeg2ScaleFrame;
};
AnySurfSTL Target = {
FileName = "MBFOOT5_talus.stl";
ScaleXYZ = {1, 1, 1}*0.001;
};
};
SurfaceObjects0 = {&Input.Source};
SurfaceObjects1 = {&Input.Target};
//Max NumPoints = Number of Source Surface Verticies
NumPoints = 5000;
BoundingBoxOnOff = On;
BoundingBox.ScaleXYZ = {1,1,1}*2;
BoundingBox.DivisionFactorXYZ = {1, 1, 1}*2;
//UseClosestPointMatchingOnOff= On;
};
AnyFolder TalusMorphingLandmarks= {
AnyFolder &SegRef = .....BodyModel.Right.Leg.Seg;
//Matrix of the point cloud in foot ref frame.
AnyMatrix SourceTalusPointCloud =
FunCEx("TalusGM_picked_points_31.pp", Main.FootPrintFolderPath +"/Scaling");
AnyInt Size = 31;
AnyFunEx FunCEx =
{
AnyMatrix Return = {iarr(1,.Size)*0,iarr(1,.Size)*0,iarr(1,.Size)*0}';
AnyFunExMonoPy ReadMLFile =
{
ModuleFile = "ReadMeshlabIn.py";
ArgList =
{
AnyStringVar filename = "";
AnyStringVar path = "";
};
};
};
AnyMatrix TargetTalusPointCloudMillimeter =
FunCEx("MBFOOT5_talus_picked_points_31.pp", Main.FootPrintFolderPath +"/Scaling");
AnyMatrix TargetTalusPointCloud = TargetTalusPointCloudMillimeter*0.001;
};//TalusMorphingLandmarks
//End of Talus Scaling
When I combine more than one …MorphingLandmarks (like the calcaneus and talus example above) the scaling behaves poorly and when I combine all the …MorphingLandmarks, the foot disappears, but the model loads dumping out:
Evaluating model...
Number of requested landmarks (5000) exceeds number of source surface vertices (2525). Using the latter one.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Talus.TaloNavicularJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Navicular.TaloNavicularJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Navicular.CenterNode: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Navicular.MedCuneiNaviJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Navicular.LatCuneiNaviJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.MedialCuneiform.CuneiNaviJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.MedialCuneiform.CenterNode: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.LateralCuneiform.CuneiNaviJoint: Non-orthogonal axes were adjusted.
WARNING for Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.LateralCuneiform.CenterNode: Non-orthogonal axes were adjusted.
Number of requested landmarks (5000) exceeds number of source surface vertices (2274). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (1181). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (889). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (444). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (415). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (920). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (313). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (1205). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (318). Using the latter one.
Number of requested landmarks (5000) exceeds number of source surface vertices (286). Using the latter one.
Loaded successfully.
Elapsed Time : 150.939000
Any ideas on a solution to this would be very warmly welcomed.
Kind Regards,
Zach