|
3 | 3 |
|
4 | 4 | # Lesson 1: Personalizing Individual Segments Based on Geometric Data from Medical Images |
5 | 5 |
|
| 6 | +:::{note} |
6 | 7 | This tutorial presumes that you have read the [AMMR documentation](https://anyscript.org/ammr/Scaling/intro.html) |
7 | 8 | and know how to personalize your model using information about height, weight, |
8 | 9 | and individual segment lengths. |
| 10 | +::: |
| 11 | + |
| 12 | +In this lesson you will learn how to personalize a bone segment (the femur) so |
| 13 | +a generic model matches a specific person’s anatomy from medical imaging. We do |
| 14 | +this by scaling the bone surface, starting with basic affine |
| 15 | +transformations and advancing to more sophisticated nonlinear methods. |
9 | 16 |
|
10 | | -This lesson introduces an advanced approach to scaling based on a sequence of |
| 17 | +You will be introduced to an advanced approach to scaling based on a sequence of |
11 | 18 | affine and non-affine transformations. Each of these transforms is constructed |
12 | 19 | based either on subject-specific geometry or on a set of landmarks selected on |
13 | 20 | the bone surface. As opposed to the simple scaling laws explained in the AMMR |
14 | 21 | documentation, this lesson is rather methodological than conceptual and provides |
15 | 22 | a good overview of how to pipeline and combine different 3D transforms to obtain |
16 | 23 | subject-specific morphing and registration between frames of reference. |
17 | 24 |
|
18 | | -## Linear Point-Based Scaling |
| 25 | +Shortly explained, the sections in this lesson are as follows: |
| 26 | + |
| 27 | +- **Linear Point-Based Scaling**: Using a *set of matching landmarks (points)* on |
| 28 | + the source and target geometries to construct a *linear* transform |
| 29 | + (move, rotate, scale, and skew) that scales the source into the target |
| 30 | + geometry. |
19 | 31 |
|
20 | | -Scaling schemes described in the AMMR documentation are based on |
21 | | -anthropometric measurements and affine transform scaling. Such schemes |
22 | | -are good assumptions when more accurate measurements are not feasible or not |
23 | | -available. Therefore, these schemes are used quite often. However, a |
24 | | -natural next step would be to improve the precision of a model by |
25 | | -utilizing subject-specific geometry available from the medical images. Medical images |
26 | | -contain more subject-specific information about the bone shapes and local |
27 | | -deformities that cannot be handled by the anthropometric regression |
28 | | -equations. |
| 32 | +- **Landmark-Based Nonlinearities**: Refining the scaling by adding a *nonlinear* |
| 33 | + transform fitted to a *new set of matching landmarks (points)*. |
| 34 | + |
| 35 | +- **Surface-Based Nonlinearities**: Further refining the scaling by adding a |
| 36 | + *nonlinear* transform fitted to the *surfaces* of the source and target geometries. |
| 37 | + |
| 38 | +## Linear Point-Based Scaling |
29 | 39 |
|
30 | 40 | The simplest inclusion of the subject-specific bone shape from medical |
31 | 41 | image data is to find the affine (linear) transformation that fits a |
@@ -101,6 +111,20 @@ step, we change the mode of the `AnyFunTransform3DLin2` object to |
101 | 111 | :end-before: //# END SNIPPET 1 |
102 | 112 | ``` |
103 | 113 |
|
| 114 | +:::{admonition} Tip for landmark selection |
| 115 | +:class: tip dropdown |
| 116 | +If you want to extract the coordinates of the points on the surfaces in *your own |
| 117 | +model*, you can use the open source software MeshLab, which can be downloaded |
| 118 | +{download}`here<https://www.meshlab.net/>`. |
| 119 | + |
| 120 | +1. Import the STL surface into MeshLab |
| 121 | +2. Use the `PickPoints` tool to select points on the surface by right-clicking |
| 122 | + on the desired locations  |
| 123 | +3. Save the points to a file |
| 124 | +4. Open the saved file in a text editor and copy the coordinates of the points |
| 125 | + into your AnyScript model (be aware of the order of the x-, y-, and z-coordinates) |
| 126 | +::: |
| 127 | + |
104 | 128 | The selected points on the surface represent specific anatomical |
105 | 129 | landmarks and points described in the comments of the AnyScript code. |
106 | 130 | Final modification before we can use the constructed linear transform is |
|
0 commit comments