a b/Docs/Scaling/lesson2.md
1
# Lesson 2: Scaling based on External Body Measurements
2
3
This tutorial presumes that you have completed {doc}`Scaling tutorial
4
Lesson 1: Joint to joint scaling methods <lesson1>`. It
5
covered the methods ScalingStandard, ScalingUniform, ScalingLengthMass
6
and ScalingLengthMassFat.
7
8
This lesson introduces a statistical scaling method based on external measures.
9
10
## Statistical Scaling
11
12
The scaling laws we discussed in Lesson 1 are using measures for the
13
segment lengths based on joint-to-joint distances, but some joint
14
locations cannot be easily palpated. The hip joints are a good example.
15
They are located deep under the skin and are not easy to measure from
16
the outside. So to facilitate scaling to individuals, another method of
17
scaling is provided that use only distances between external
18
bony landmarks.
19
20
Here is where our [Statistical Scaling
21
Plugin](https://anyscript.org/ammr/beta/Applications/Other/StatisticalScalingPlugin.html)
22
comes into play. It is a plugin that can be used to scale a model by specifying
23
a few anatomical or functional anthropometric parameters while calculating the
24
remaining parameters based on statistical data from the ANSUR [^f1] database.
25
26
In order to use the plugin, you need to include it in your model:
27
28
```AnyScriptDoc
29
#define BM_SCALING _SCALING_XYZ_
30
#include "<ANYBODY_PATH_AMMR>/Tools/Plugins/ANSUR_Plugin.any"
31
  
32
// Define a path variable so the plugin knows where to write
33
// Anthropometric information.
34
#path ANSUR_PLUGIN_ANYMAN_FILE "AnyMan_ANSUR.any"
35
#include "<ANSUR_PLUGIN_ANYMAN_FILE>"
36
```
37
38
We are enabling the `_SCALING_XYZ_` law. The plugin is designed to work with this scaling law only.
39
We will get back to how this law works in a later lesson.
40
41
Notice also that we are including the file `AnyMan_ANSUR.any` which we need to
42
create in order for the plugin to work. The plugin will write the anthropometric
43
information to this file. Create the file next to the main file of your model
44
and add the following content:
45
46
```AnyScriptDoc
47
// Anthropometrics file generated based on ANSUR PCA scaling 
48
Main.HumanModel.Anthropometrics = 
49
{
50
 BodyMass = 81.99788166330553;
51
 BodyHeight = 1.8000000000000007;
52
};    
53
    
54
Main.HumanModel.Anthropometrics.SegmentDimensions = 
55
{
56
  HeadDepth = DesignVar(0.19854919694591627);
57
  HeadHeight = DesignVar(0.13435062679846901);
58
  HeadWidth = DesignVar(0.15408461276045118);
59
  Left.FootHeight = DesignVar(0.05346215076533939);
60
  Left.FootLength = DesignVar(0.26540765594237714);
61
  Left.FootWidth = DesignVar(0.08057585258177535);
62
  Left.HandBreadth = DesignVar(0.08836086489212641);
63
  Left.HandLength = DesignVar(0.18919620482784752);
64
  Left.LowerArmLength = DesignVar(0.2787988940627688);
65
  Left.ShankLength = DesignVar(0.44933350273014644);
66
  Left.ThighLength = DesignVar(0.4329345672323976);
67
  Left.UpperArmLength = DesignVar(0.31474556404210224);
68
  NeckLength = DesignVar(0.13339097946419404);
69
  PelvisDepth = DesignVar(0.14549510408533453);
70
  PelvisHeight = DesignVar(0.10915196667715318);
71
  PelvisWidth = DesignVar(0.17734410213497);
72
  Right.FootHeight = DesignVar(0.05346215076533939);
73
  Right.FootLength = DesignVar(0.26540765594237714);
74
  Right.FootWidth = DesignVar(0.08057585258177535);
75
  Right.HandBreadth = DesignVar(0.08836086489212641);
76
  Right.HandLength = DesignVar(0.18919620482784752);
77
  Right.LowerArmLength = DesignVar(0.2787988940627688);
78
  Right.ShankLength = DesignVar(0.44933350273014644);
79
  Right.ThighLength = DesignVar(0.4329345672323976);
80
  Right.UpperArmLength = DesignVar(0.31474556404210224);
81
  TrunkDepth = DesignVar(0.1943939027626778);
82
  TrunkHeight = DesignVar(0.6496243660543214);
83
  TrunkWidth = DesignVar(0.3781679964242773);
84
};
85
```
86
87
After saving this file, you can load the model and the anthropometrics from the
88
file will be used to scale the model.
89
90
To change the scaling of the model you can start the plugin by clicking the
91
**ANSUR Configuration** from the tools line:
92
93
```{image} _static/lesson2/ANSUR_Plugin_toolbar_icon.jpg
94
```
95
96
This will bring up the plugin window:
97
98
```{image} _static/lesson2/ANSUR_plugin_window.jpg
99
```
100
101
The plugin has 4 tabs:
102
103
- **Basic Input**: This tab allows you to overwrite *Stature*, *Weight*, *BMI*,
104
  *Fat percentage* and select gender.
105
- **Functional Dimensions**: This tab allows you to select a functional
106
  dimension from a drop down list. It will display a image of the dimension
107
  applied to the model and allow you to enter a value for the dimension or
108
  select if the plugin should calculate the value based on the other dimensions.
109
- **Anatomical Dimensions**: This tab allows you to select a anatomical
110
  dimension based on the available dimensions of the model. It will display a
111
  image of the dimension applied to the model and allow you to enter a value for
112
  the dimension or select if the plugin should calculate the value based on the
113
  other dimensions.
114
- **About**: This tab contains information about the plugin.
115
116
At the bottom of the window you can see the **Load to AMS** button. This button
117
will write the selected dimensions to the file `AnyMan_ANSUR.any` and load the
118
model.
119
120
```{rubric} Footnotes
121
```
122
123
[^f1]: Gordon, C. C. et al. 1988 Anthropometric Survey of U.S. Army personnel: methods and summary statistics. (US Army Natick Research, Development and Engineering Center, 1989).
124
125
:::{admonition} **Next lesson:**
126
:class: seealso
127
128
{doc}`lesson3`.
129
:::