8 | | 4. Tranformation may be calculated from 4 points in `ABAvoxel` SRS (`p1,p2,p3,p4`) and 4 corresponding point in `ABAreference` SRS (`p1',p2',p3',p4'`) by solving following equation: |
| 8 | 4. Tranformation may be calculated from 4 points in `ABAvoxel` SRS (`p1, p2, p3, p4`) and 4 corresponding point in `ABAreference` SRS (`p1', p2', p3', p4'`) by solving following equation: |
| 9 | |
| 10 | [[Image(gif.latex.gif)]] |
| 11 | |
| 12 | After all, matrix '''M''' is: |
| 13 | {{{ |
| 14 | |
| 15 | M= |
| 16 | [[ 2.71693750e-02 -8.17542750e-05 -5.01197500e-04 -1.25701700e+00] |
| 17 | [ 8.92628250e-04 2.82020000e-02 -2.71143000e-04 -1.28628500e+00] |
| 18 | [ -5.86774750e-04 -8.96920500e-04 -2.59281250e-02 6.04778000e+00] |
| 19 | [ 0.00000000e+00 1.73472348e-18 0.00000000e+00 1.00000000e+00]] |
| 20 | }}} |
| 21 | |
| 22 | |
| 23 | and '''M'''': |
| 24 | {{{ |
| 25 | M'= |
| 26 | [[ 1.00000000e+00 -2.89888217e-03 -1.93302640e-02 -1.25701700e+00] |
| 27 | [ 3.28542063e-02 1.00000000e+00 -1.04574858e-02 -1.28628500e+00] |
| 28 | [ -2.15969175e-02 -3.18034359e-02 -1.00000000e+00 6.04778000e+00] |
| 29 | [ 0.00000000e+00 6.15106544e-17 0.00000000e+00 1.00000000e+00]] |
| 30 | }}} |
| 31 | |
| 32 | |
| 33 | {{{#!comment |
| 34 | \\ |
| 35 | |
| 36 | \mathbf{V}=\begin{bmatrix} |
| 37 | p_1[1] & p_2[1] & p_3[1] & p_4[1] \\ |
| 38 | p_1[2] & p_2[2] & p_3[2] & p_4[2]\\ |
| 39 | p_1[3] & p_2[3] & p_3[3] & p_4[3]\\ |
| 40 | 1 & 1 & 1 & 1 |
| 41 | \end{bmatrix} |
| 42 | |
| 43 | \\ |
| 44 | \\ |
| 45 | |
| 46 | \mathbf{V'}=\begin{bmatrix} |
| 47 | p'_1[1] & p'_2[1] & p'_3[1] & p'_4[1] \\ |
| 48 | p'_1[2] & p'_2[2] & p'_3[2] & p'_4[2]\\ |
| 49 | p'_1[3] & p'_2[3] & p'_3[3] & p'_4[3]\\ |
| 50 | 1 & 1 & 1 & 1 |
| 51 | \end{bmatrix} |
| 52 | |
| 53 | \\ |
| 54 | |
| 55 | \mathbf{M} = \mathbf{V'} \mathbf{V^{-1}} |
| 56 | |
| 57 | \\ |
| 58 | \\ |
| 59 | |
| 60 | \textup{And normalizing so the all diagonal elements are equal to 1:} |
| 61 | |
| 62 | \\ |
| 63 | |
| 64 | \mathbf{M_c} = \begin{bmatrix} |
| 65 | |\mathbf{M}_{1,1}|^{-1} & 0 & 0 & 0\\ |
| 66 | 0 & |\mathbf{M}_{2,2}|^{-1} & 0 & 0\\ |
| 67 | 0 & 0 & |\mathbf{M}_{3,3}|^{-1} & 0\\ |
| 68 | 0 & 0 & 0 & 1 |
| 69 | \end{bmatrix} |
| 70 | |
| 71 | \\ |
| 72 | |
| 73 | \mathbf{M'} =\mathbf{M} \mathbf{M_c} |
| 74 | |
| 75 | }}} |
| 76 | |
| 77 | Then, initial volume `AtlasAnnotation25.sva` is transformed using '''M'''' and the resulting volume is used by the 3dBAR parser to create CAF dataset. |