Dear AnyBody,
I was trying to create/implement my own scaling law to incorporate subject-specific tibial geometries. However I received an error message as below:
ERROR(SCR.PRS9) : D:/B…s/Data/2…t/S02/W…g/S…n/M…l/ScalingTibiaR_xc.any(27) : ‘TSeg2ScaleFrame’ : Unresolved object
I looked up for TSeg2ScaleFrame but didn’t find much explanations. Your help is greatly appreciated!
here is my scaling law:
#ifdef NO_HUMAN_MODEL
AnyFunTransform3DIdentity TSeg2ScaleFrame = {};
#endif
#ifndef SOURCE_TIBIA
#path SOURCE_TIBIA “D:\Brent Edwards\Data\20170717_First batch of musculoskeletal-FE project\S02\Walking\S2G1L1F0 - GRFprediction\Model\StandingModel_Left.stl”
#endif
#ifndef TARGET_TIBIA
#path TARGET_TIBIA “D:\Brent Edwards\Data\20170717_First batch of musculoskeletal-FE project\S02\Walking\S2G1L1F0 - GRFprediction\Model\Brent_S02_morphed_source.stl”
#endif
AnyFolder ScalingTibiaR = {
AnyFile src = SOURCE_TIBIA;
AnyFile trg = TARGET_TIBIA;
AnyInt size = STL_Size(src, 1); //get the size of the stl
AnyInt VertNum = 200; //specify number of landmarks to be extracted automatically
AnyInt vertices = iarr(1, VertNum)*floor(size[0]/VertNum); //evenly space landmarks in the index field
AnyMatrix P0 = 0.001STL_Vertices(src, vertices, 1); //extract vertices with given indices
AnyMatrix P1 = 0.001STL_Vertices(trg, vertices, 1); //conversion from mm to m
AnyFunTransform3DLin2 affinetransform =
{
Points0 = .TSeg2ScaleFrame(.P0);
Points1 = .P1;
Mode = VTK_LANDMARK_AFFINE;
};
AnyFunTransform3DRBF rbftransform =
{
PreTransforms = {&.affinetransform};
RBFDef.Type = RBF_Triharmonic;
PolynomDegree = 1;
Points0 = .affinetransform.Points0;
Points1 = .affinetransform.Points1;
BoundingBoxOnOff = On;
BoundingBox.Type = BB_Cartesian;
BoundingBox.ScaleXYZ = {1,2,2}*1.2;
BoundingBox.DivisionFactorXYZ = {1,1,1}*3;
};
AnyFunTransform3DLin2 reversetransform =
{
Points0 = .affinetransform.Points1;
Points1 = .affinetransform.Points0;
Mode = VTK_LANDMARK_RIGIDBODY;
};
AnyFunTransform3DIdentity finaltransform =
{
PreTransforms = {&.rbftransform, &.reversetransform};
};
};