Skip to content

Commit

Permalink
DOC: change notation, add intermediate logic
Browse files Browse the repository at this point in the history
Change the notation of the row, column indices of the matrix.

Add intermediate step for showing why inverse of affine is mapping from
mm to voxels.
  • Loading branch information
matthew-brett committed Nov 30, 2016
1 parent 46ed742 commit 0f3048c
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions doc/source/coordinate_systems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,16 @@ We could record the parameters necessary for $f$ as the 3 by 3 matrix, $M$
and the 3 by 1 vector $(a, b, c)$.

In fact, the 4 by 4 image *affine array* does include exactly this
information. If $m_{ij}$ is the value in row $i$ column $j$ of matrix $M$,
information. If $m_{i,j}$ is the value in row $i$ column $j$ of matrix $M$,
then the image affine matrix $A$ is:

.. math::
A =
\begin{bmatrix}
m_{11} & m_{12} & m_{13} & a \\
m_{21} & m_{22} & m_{23} & b \\
m_{31} & m_{32} & m_{33} & c \\
m_{1,1} & m_{1,2} & m_{1,3} & a \\
m_{2,1} & m_{2,2} & m_{2,3} & b \\
m_{3,1} & m_{3,2} & m_{3,3} & c \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
Expand All @@ -546,9 +546,9 @@ vectors:
1\\
\end{bmatrix} =
\begin{bmatrix}
m_{11} & m_{12} & m_{13} & a \\
m_{21} & m_{22} & m_{23} & b \\
m_{31} & m_{32} & m_{33} & c \\
m_{1,1} & m_{1,2} & m_{1,3} & a \\
m_{2,1} & m_{2,2} & m_{2,3} & b \\
m_{3,1} & m_{3,2} & m_{3,3} & c \\
0 & 0 & 0 & 1 \\
\end{bmatrix}
\begin{bmatrix}
Expand Down Expand Up @@ -614,6 +614,19 @@ matrix. Put another way:
1\\
\end{bmatrix}
A^{-1}\begin{bmatrix}
x\\
y\\
z\\
1\\
\end{bmatrix} = A^{-1} A
\begin{bmatrix}
i\\
j\\
k\\
1\\
\end{bmatrix}
\begin{bmatrix}
i\\
j\\
Expand Down

0 comments on commit 0f3048c

Please sign in to comment.