-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMyScalingFunction.any
More file actions
135 lines (124 loc) · 4.88 KB
/
MyScalingFunction.any
File metadata and controls
135 lines (124 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* This file defines a subject-specific morphing law for the Lesson 4 of Scaling tutorial*/
AnyFolder MyScalingFunction = {
AnyFunTransform3DLin Transform = {
ScaleMat = {{1,0,0},{0,1,0},{0,0,1}};
Offset = {0,0,0};
PreTransforms = {&.STLTransform, &.ReverseTransform};
};
AnyFunTransform3DLin2 AffineTransform =
{
//PreTransforms = {};
Points0 = ..TSeg2ScaleFrame(
{{-0.00906139, 0.36453, 0.0175591}, // fovea capitis
{0.0358368, -0.0100391, -0.0162062}, // lateral anterior condyle
{0.0295267, -0.0112881, 0.0194889}, // medial anterior condyle
{0.0282045, 0.157599, -0.0172379}, // anterior mid shaft
{-0.0245689, -0.00701566, -0.0238393}, // lateral posterior condyle
{-0.0320739, -0.00877602, 0.0244234}});// medial posterior condyle
Points1 =
{{0.289913,0.420538,0.0138931}, // fovea capitis
{0.322038,0.433232,-0.378636}, // lateral anterior condyle
{0.289309,0.426839,-0.372994}, // medial anterior condyle
{0.328859,0.425856,-0.175012}, // anterior mid shaft
{0.306293,0.487243,-0.370319}, // lateral posterior condyle
{0.261891,0.47585,-0.372696}}; // medial posterior condyle
Mode = VTK_LANDMARK_AFFINE;
};
AnyFunTransform3DLin2 ReverseTransform = {
Points0 = .AffineTransform.Points1;
Points1 = .AffineTransform.Points0;
Mode = VTK_LANDMARK_RIGIDBODY;
};
AnyFunTransform3DRBF RBFTransform =
{
PreTransforms = {&.AffineTransform};
PolynomDegree = 1;
RBFDef.Type = RBF_Triharmonic;
Points0 = ..TSeg2ScaleFrame({
{-0.00920594, 0.36459700, 0.0174376}, // fovea capitis
{ 0.03691960, -0.01011610, -0.0197803}, // anterior lateral condyle
{ 0.03001110, -0.00998133, 0.0186877}, // anterior medial condyle
{ 0.02009270, 0.34511400, -0.0387426}, // anterior greater trochanter point
{ 0.02783850, 0.18320400, -0.0217463}, // anterior shaft point
{-0.02461770, -0.00623515, -0.0231383}, // posterior lateral condyle
{-0.03211040, -0.00908290, 0.0246153}, // posterior medial condyle
{-0.02643670, 0.35630800, 0.0014140}, // posterior head point
{ 0.01780310, 0.36194400, 0.0059740}, // anterior head point
{-0.00197744, 0.38387300, -0.0031698}, // superior head point
{-0.00316772, 0.34248600, 0.0114698}, // inferior head point
{-0.02469710, 0.30335600, -0.0171113}, // medial lesser trochanter
{-0.00969883, 0.34826800, -0.0462823}, // distal trochanteric fossa
{-0.01959660, 0.36243100, -0.0441186}, // proximal posterior greater trochanter
{-0.00084335, 0.32253400, -0.0641596}, // distal trochanteric fossa
{-0.00431680, 0.35912600, 0.0036940} // femoral COR
});
PointNames = {
"Medial_Head_Point",
"Anterior_LateralCondyle_Point",
"Anterior_MedialCondyle_Point",
"Anterior_GreaterTrochanter_Point",
"Anterior_Shaft_Point",
"Posterior_LateralCondyle_Point",
"Posterior_MedialCondyle_Point",
"Posterior_Head_Point",
"Anterior_Head_Point",
"Proximal_Head_Point",
"Infeior_Head_Point",
"Medial_LesserTrochanter_Point",
"Distal_TrochantericFossa_Point",
"Proximal_Posterior_GreaterTrochanter_Point",
"Lateral_Lesser_Trochanter_Point",
"Femoral_COR"
};
Points1 = {
{ 0.2900, 0.4205, 0.0139},
{ 0.3220, 0.4332,-0.3786},
{ 0.2893, 0.4268,-0.3730},
{ 0.3599, 0.4429,-0.0050},
{ 0.3289, 0.4259,-0.1750},
{ 0.3062, 0.4872,-0.3703},
{ 0.2619, 0.4759,-0.3727},
{ 0.2900, 0.4405, 0.0139},
{ 0.3200, 0.4095, 0.0134},
{ 0.3100, 0.4295, 0.0314},
{ 0.2983, 0.4196,-0.0066},
{ 0.3089, 0.4599,-0.0355},
{ 0.3349, 0.4579, 0.0050},
{ 0.3329, 0.4679, 0.0175},
{ 0.3519, 0.4599,-0.0355},
{ 0.3075, 0.4235, 0.0139}
};
BoundingBox =
{
Type = BB_Cartesian;
ScaleXYZ = {2, 2, 2};
DivisionFactorXYZ = 5*{1, 1, 1};
};
BoundingBoxOnOff = On;
};
AnyFunTransform3DSTL STLTransform =
{
PreTransforms = {&.RBFTransform};
PolynomDegree = 1;
RBFDef.Type = RBF_Triharmonic;
AnyFixedRefFrame Input = {
AnySurfSTL SourceSurf = {
FileName = "../../../lesson4/SourceFemur";
ScaleXYZ = {1, 1, 1};
AnyFunTransform3D &pre = ....TSeg2ScaleFrame;
};
AnySurfSTL TargetSurf = {
FileName = "../../../lesson4/TargetFemur";
ScaleXYZ = {1, 1, 1};
};
};
SurfaceObjects0 = {&Input.SourceSurf};
SurfaceObjects1 = {&Input.TargetSurf};
//FileName0 = "SourceFemur.stl"; // such definition was used previously
//FileName1 = "TargetFemur.stl"; // such definition was used previously
NumPoints = 1000;
BoundingBox.ScaleXYZ = {2, 2, 2};
BoundingBox.DivisionFactorXYZ = {1, 1, 1};
BoundingBoxOnOff = On;
};
}; // MyScalingFunction