<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MartinLoepprich</id>
	<title>Slicer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MartinLoepprich"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/wiki/Special:Contributions/MartinLoepprich"/>
	<updated>2026-08-21T08:04:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13494</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13494"/>
		<updated>2010-04-14T01:29:20Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* General definition of the IJKtoLPS- and IJKtoRAS-matrix */  text edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
The following figure shows the anatomical space with a L(P)S basis on the left and the corresponding image coordinates on the right.&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
The origin (the coordinates of the first 'pixel' in anatomical space) is ''(50 mm, 300 mm)'' and the spacing (the distance between two pixels) is ''(50 mm, 50 mm)''.&lt;br /&gt;
&lt;br /&gt;
As this is a 2D example &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;2\,\times\,2&amp;lt;/math&amp;gt; matrix and &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; a &amp;lt;math&amp;gt;2\,\times\,1&amp;lt;/math&amp;gt; vector. Therefore the equation of the affine transformation is:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; t_2 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
By multiplying the '''IJtoLS'''-matrix and the vector of the right side, the following product will be obtained:&lt;br /&gt;
[[Image:Matrix_multiplication.png| center]]&lt;br /&gt;
&lt;br /&gt;
The last equation and the matrix product show that a total of 6 unknown variables &amp;lt;math&amp;gt;\displaystyle(A_{11}, A_{12}, A_{21}, A_{22}, t_1, t_2)&amp;lt;/math&amp;gt; have to be determined. The knowledge of origin and spacing however allows the following relations between image and anatomical space:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \end{pmatrix} \equiv \begin{pmatrix} i \\ j \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 100 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 250 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix} \qquad \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, at least six equations can be derived:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 0 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;100 = A_{11} \cdot 1 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 1 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 1 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;250 = A_{21} \cdot 0 + A_{22} \cdot 1 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned above, the translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; contains the information about the geometric position of the first pixel and is therefore equivalent to the origin. This result is also confirmed by the first equations.&lt;br /&gt;
&lt;br /&gt;
The solution of the other equations leads to the following '''IJtoLS'''-matrix:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoLS =&lt;br /&gt;
  \begin{pmatrix} 50 &amp;amp; 0 &amp;amp; 50 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the event that a R(A)S basis was used, just the left and anterior axis of the anatomical space are flipped, and the image coordinate system appears in the same way as in the L(P)S case.&lt;br /&gt;
[[Image:IJtoRS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
For this 2D example the '''IJtoRS'''-matrix would be:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoRS =&lt;br /&gt;
  \begin{pmatrix} -50 &amp;amp; 0 &amp;amp; 250 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This matrix looks very similar to the '''IJtoLS'''-matrix with 2 differences:&lt;br /&gt;
* The translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; has changed because of another origin&lt;br /&gt;
* The right axis is flipped, so the first column of the '''IJtoRS'''-matrix has just an inverted sign&lt;br /&gt;
&lt;br /&gt;
=General definition of the ''IJKtoLPS''- and ''IJKtoRAS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the general formel''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13493</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13493"/>
		<updated>2010-04-14T01:28:52Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* General definition of the IJKtoLPS- and IJKtoRAS-matrix */  added the TODO&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
The following figure shows the anatomical space with a L(P)S basis on the left and the corresponding image coordinates on the right.&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
The origin (the coordinates of the first 'pixel' in anatomical space) is ''(50 mm, 300 mm)'' and the spacing (the distance between two pixels) is ''(50 mm, 50 mm)''.&lt;br /&gt;
&lt;br /&gt;
As this is a 2D example &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;2\,\times\,2&amp;lt;/math&amp;gt; matrix and &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; a &amp;lt;math&amp;gt;2\,\times\,1&amp;lt;/math&amp;gt; vector. Therefore the equation of the affine transformation is:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; t_2 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
By multiplying the '''IJtoLS'''-matrix and the vector of the right side, the following product will be obtained:&lt;br /&gt;
[[Image:Matrix_multiplication.png| center]]&lt;br /&gt;
&lt;br /&gt;
The last equation and the matrix product show that a total of 6 unknown variables &amp;lt;math&amp;gt;\displaystyle(A_{11}, A_{12}, A_{21}, A_{22}, t_1, t_2)&amp;lt;/math&amp;gt; have to be determined. The knowledge of origin and spacing however allows the following relations between image and anatomical space:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \end{pmatrix} \equiv \begin{pmatrix} i \\ j \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 100 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 250 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix} \qquad \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, at least six equations can be derived:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 0 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;100 = A_{11} \cdot 1 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 1 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 1 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;250 = A_{21} \cdot 0 + A_{22} \cdot 1 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned above, the translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; contains the information about the geometric position of the first pixel and is therefore equivalent to the origin. This result is also confirmed by the first equations.&lt;br /&gt;
&lt;br /&gt;
The solution of the other equations leads to the following '''IJtoLS'''-matrix:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoLS =&lt;br /&gt;
  \begin{pmatrix} 50 &amp;amp; 0 &amp;amp; 50 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the event that a R(A)S basis was used, just the left and anterior axis of the anatomical space are flipped, and the image coordinate system appears in the same way as in the L(P)S case.&lt;br /&gt;
[[Image:IJtoRS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
For this 2D example the '''IJtoRS'''-matrix would be:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoRS =&lt;br /&gt;
  \begin{pmatrix} -50 &amp;amp; 0 &amp;amp; 250 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This matrix looks very similar to the '''IJtoLS'''-matrix with 2 differences:&lt;br /&gt;
* The translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; has changed because of another origin&lt;br /&gt;
* The right axis is flipped, so the first column of the '''IJtoRS'''-matrix has just an inverted sign&lt;br /&gt;
&lt;br /&gt;
=General definition of the ''IJKtoLPS''- and ''IJKtoRAS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the general formulas''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13492</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13492"/>
		<updated>2010-04-14T01:26:55Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: added chapter 'General definition'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
The following figure shows the anatomical space with a L(P)S basis on the left and the corresponding image coordinates on the right.&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
The origin (the coordinates of the first 'pixel' in anatomical space) is ''(50 mm, 300 mm)'' and the spacing (the distance between two pixels) is ''(50 mm, 50 mm)''.&lt;br /&gt;
&lt;br /&gt;
As this is a 2D example &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;2\,\times\,2&amp;lt;/math&amp;gt; matrix and &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; a &amp;lt;math&amp;gt;2\,\times\,1&amp;lt;/math&amp;gt; vector. Therefore the equation of the affine transformation is:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; t_2 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
By multiplying the '''IJtoLS'''-matrix and the vector of the right side, the following product will be obtained:&lt;br /&gt;
[[Image:Matrix_multiplication.png| center]]&lt;br /&gt;
&lt;br /&gt;
The last equation and the matrix product show that a total of 6 unknown variables &amp;lt;math&amp;gt;\displaystyle(A_{11}, A_{12}, A_{21}, A_{22}, t_1, t_2)&amp;lt;/math&amp;gt; have to be determined. The knowledge of origin and spacing however allows the following relations between image and anatomical space:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \end{pmatrix} \equiv \begin{pmatrix} i \\ j \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 100 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 250 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix} \qquad \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, at least six equations can be derived:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 0 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;100 = A_{11} \cdot 1 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 1 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 1 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;250 = A_{21} \cdot 0 + A_{22} \cdot 1 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned above, the translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; contains the information about the geometric position of the first pixel and is therefore equivalent to the origin. This result is also confirmed by the first equations.&lt;br /&gt;
&lt;br /&gt;
The solution of the other equations leads to the following '''IJtoLS'''-matrix:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoLS =&lt;br /&gt;
  \begin{pmatrix} 50 &amp;amp; 0 &amp;amp; 50 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the event that a R(A)S basis was used, just the left and anterior axis of the anatomical space are flipped, and the image coordinate system appears in the same way as in the L(P)S case.&lt;br /&gt;
[[Image:IJtoRS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
For this 2D example the '''IJtoRS'''-matrix would be:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoRS =&lt;br /&gt;
  \begin{pmatrix} -50 &amp;amp; 0 &amp;amp; 250 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This matrix looks very similar to the '''IJtoLS'''-matrix with 2 differences:&lt;br /&gt;
* The translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; has changed because of another origin&lt;br /&gt;
* The right axis is flipped, so the first column of the '''IJtoRS'''-matrix has just an inverted sign&lt;br /&gt;
&lt;br /&gt;
=General definition of the ''IJKtoLPS''- and ''IJKtoRAS''-matrix=&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13491</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13491"/>
		<updated>2010-04-14T01:23:46Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* 2D example or calculating an IJtoLS-matrix */  added the text of the complete example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
The following figure shows the anatomical space with a L(P)S basis on the left and the corresponding image coordinates on the right.&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
The origin (the coordinates of the first 'pixel' in anatomical space) is ''(50 mm, 300 mm)'' and the spacing (the distance between two pixels) is ''(50 mm, 50 mm)''.&lt;br /&gt;
&lt;br /&gt;
As this is a 2D example &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;2\,\times\,2&amp;lt;/math&amp;gt; matrix and &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; a &amp;lt;math&amp;gt;2\,\times\,1&amp;lt;/math&amp;gt; vector. Therefore the equation of the affine transformation is:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; t_2 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
By multiplying the '''IJtoLS'''-matrix and the vector of the right side, the following product will be obtained:&lt;br /&gt;
[[Image:Matrix_multiplication.png| center]]&lt;br /&gt;
&lt;br /&gt;
The last equation and the matrix product show that a total of 6 unknown variables &amp;lt;math&amp;gt;\displaystyle(A_{11}, A_{12}, A_{21}, A_{22}, t_1, t_2)&amp;lt;/math&amp;gt; have to be determined. The knowledge of origin and spacing however allows the following relations between image and anatomical space:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} L \\ S \end{pmatrix} \equiv \begin{pmatrix} i \\ j \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 100 \\ 300 \end{pmatrix} \equiv \begin{pmatrix} 1 \\ 0 \end{pmatrix} \qquad&lt;br /&gt;
  \begin{pmatrix} 50 \\ 250 \end{pmatrix} \equiv \begin{pmatrix} 0 \\ 1 \end{pmatrix} \qquad \dots&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, at least six equations can be derived:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 0 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;100 = A_{11} \cdot 1 + A_{12} \cdot 0 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;300 = A_{21} \cdot 1 + A_{22} \cdot 0 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;50  = A_{11} \cdot 0 + A_{12} \cdot 1 + t_1 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;250 = A_{21} \cdot 0 + A_{22} \cdot 1 + t_2 \cdot 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned above, the translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; contains the information about the geometric position of the first pixel and is therefore equivalent to the origin. This result is also confirmed by the first equations.&lt;br /&gt;
&lt;br /&gt;
The solution of the other equations leads to the following '''IJtoLS'''-matrix:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoLS =&lt;br /&gt;
  \begin{pmatrix} 50 &amp;amp; 0 &amp;amp; 50 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the event that a R(A)S basis was used, just the left and anterior axis of the anatomical space are flipped, and the image coordinate system appears in the same way as in the L(P)S case.&lt;br /&gt;
[[Image:IJtoRS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
For this 2D example the '''IJtoRS'''-matrix would be:&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  IJtoRS =&lt;br /&gt;
  \begin{pmatrix} -50 &amp;amp; 0 &amp;amp; 250 \\ 0 &amp;amp; -50 &amp;amp; 300 \\ 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This matrix looks very similar to the '''IJtoLS'''-matrix with 2 differences:&lt;br /&gt;
* The translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; has changed because of another origin&lt;br /&gt;
* The right axis is flipped, so the first column of the '''IJtoRS'''-matrix has just an inverted sign&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:IJtoRS.png&amp;diff=13490</id>
		<title>File:IJtoRS.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:IJtoRS.png&amp;diff=13490"/>
		<updated>2010-04-14T01:19:17Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: image of an IJtoRS example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image of an IJtoRS example&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13489</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13489"/>
		<updated>2010-04-14T01:13:26Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Image transformation */  changed the appearance of matrix A (made it bigger)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;\displaystyle A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Matrix_multiplication.png&amp;diff=13488</id>
		<title>File:Matrix multiplication.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Matrix_multiplication.png&amp;diff=13488"/>
		<updated>2010-04-14T00:56:39Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: uploaded a new version of &amp;quot;File:Matrix multiplication.png&amp;quot;:&amp;amp;#32;smaller resolution&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image to visualize the matrix multiplication&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Matrix_multiplication.png&amp;diff=13487</id>
		<title>File:Matrix multiplication.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Matrix_multiplication.png&amp;diff=13487"/>
		<updated>2010-04-14T00:52:24Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: image to visualize the matrix multiplication&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image to visualize the matrix multiplication&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13484</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13484"/>
		<updated>2010-04-13T21:49:14Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Introduction */  changed image size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 600px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13483</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13483"/>
		<updated>2010-04-13T21:48:42Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* 2D example or calculating an IJtoLS-matrix */  added image of the example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&lt;br /&gt;
[[Image:IJtoLS.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:IJtoLS.png&amp;diff=13482</id>
		<title>File:IJtoLS.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:IJtoLS.png&amp;diff=13482"/>
		<updated>2010-04-13T21:47:26Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: image of the IJtoLS example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image of the IJtoLS example&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13481</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13481"/>
		<updated>2010-04-13T21:42:27Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Image transformation */  names of matrices changed to bold&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called '''IJKtoLPS'''- or '''IJKtoRAS'''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13480</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13480"/>
		<updated>2010-04-13T21:39:10Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /*References*/  added new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13479</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13479"/>
		<updated>2010-04-13T21:37:12Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Image coordinate system */  added exaples to the origin and spacing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system, e.g. (100mm, 50mm, -25mm)&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis, e.g. (1.5mm, 0.5mm, 0.5mm)&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13478</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13478"/>
		<updated>2010-04-13T21:34:56Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Introduction */  removed the thumb of the image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13477</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13477"/>
		<updated>2010-04-13T21:33:59Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Image coordinate system */  added image of the origin and spacing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
[[Image:Image_Coordinats.png| 300px | center]]&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Image_Coordinats.png&amp;diff=13476</id>
		<title>File:Image Coordinats.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Image_Coordinats.png&amp;diff=13476"/>
		<updated>2010-04-13T21:30:22Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: image to visualize the origin and spacing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image to visualize the origin and spacing&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13475</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13475"/>
		<updated>2010-04-13T21:24:05Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Introduction */  changed some words&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in imaging applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Image with origin and spacing''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13420</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13420"/>
		<updated>2010-04-12T23:32:59Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Image transformation */  changed one text error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Image with origin and spacing''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13419</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13419"/>
		<updated>2010-04-12T23:31:08Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Anatomical coordinate system */  changed one text bug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Image with origin and spacing''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last Equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13418</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13418"/>
		<updated>2010-04-12T23:26:55Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: changed the introduction and added the other chapters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces and their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways.&lt;br /&gt;
&lt;br /&gt;
==World coordinate system==&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
&lt;br /&gt;
==Anatomical coordinate system==&lt;br /&gt;
The most important model coordinate system for medical imaging techniques is the anatomical space (also called patient coordinate system). This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
* the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet~(Inferior)&lt;br /&gt;
* the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
* the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
&lt;br /&gt;
The anatomical coordinate system is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following bases:&lt;br /&gt;
* LPS (Left, Posterior, Superior) is used in DICOM images and by the ITK toolkit&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  LPS = \begin{Bmatrix} &lt;br /&gt;
                \text{from right towards left} \\&lt;br /&gt;
                \text{from anterior towards posterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped and used by 3D Slicer&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;  RAS = \begin{Bmatrix} &lt;br /&gt;
                \text{from left towards right} \\&lt;br /&gt;
                \text{from posterior towards anterior} \\&lt;br /&gt;
                \text{from inferior towards superior}&lt;br /&gt;
              \end{Bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Both bases are equally useful and logical. It is just necessary to know to which basis an image is referenced.&lt;br /&gt;
&lt;br /&gt;
==Image coordinate system==&lt;br /&gt;
The image coordinate system describes how an image was acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
In addition to the intensity value of each voxel ''(i j k)'' the origin and spacing of the anatomical coordinates are stored too.&lt;br /&gt;
* The origin represents the position of the first voxel (0,0,0) in the anatomical coordinate system&lt;br /&gt;
* The spacing specifies the distance between voxels along each axis&lt;br /&gt;
The following 2D example shows the meaning of origin and spacing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Image with origin and spacing''' &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the origin and spacing, the corresponding position of each (image coordinate) voxel in anatomical coordinates can be calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Image transformation=&lt;br /&gt;
The transformation from an image space vector &amp;lt;math&amp;gt;(i\;j\;k)'&amp;lt;/math&amp;gt; to an anatomical space vector &amp;lt;math&amp;gt;\vec{x}&amp;lt;/math&amp;gt; is an affine transformation, consists of a linear transformation &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; followed by a translation &amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \vec{x} = A \begin{pmatrix} i &amp;amp; j &amp;amp; k \end{pmatrix}' + \vec{t}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,3&amp;lt;/math&amp;gt; matrix and carries all information about space directions and axis scaling.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{t}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;3\,\times\,1&amp;lt;/math&amp;gt; vector and contains information about the geometric position of the first voxel.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} \\ A_{31} &amp;amp; A_{32} &amp;amp; A_{33} \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \end{pmatrix} + \begin{pmatrix} t_1 \\ t_2 \\ t_3 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last Equation shows that the linear transformation is performed by a matrix multiplication and the translation by a vector addition. To represent both, the transformation and the translation, by a matrix multiplication an augmented matrix must be used. This technique requires that the matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is augmented with an extra row of zeros at the bottom, an extra column-the translation vector-to the right, and a '1' in the lower right corner. Additionally all vectors have to be written as homogeneous coordinates, which means that a '1' is augmented at the end.&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
  \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} =&lt;br /&gt;
  \begin{pmatrix} A_{11} &amp;amp; A_{12} &amp;amp; A_{13} &amp;amp; t_1 \\ A_{21} &amp;amp; A_{22} &amp;amp; A_{23} &amp;amp; t_2 \\ &lt;br /&gt;
                  A_{31} &amp;amp; A_{32} &amp;amp; A_{33} &amp;amp; t_3 \\ 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 1 \end{pmatrix}&lt;br /&gt;
  \begin{pmatrix} i \\ j \\ k \\ 1 \end{pmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the used anatomical space (LPS or RAS) the &amp;lt;math&amp;gt;4\,\times\,4&amp;lt;/math&amp;gt; matrix is called ''IJKtoLPS''- or ''IJKtoRAS''-matrix, because it represents the transformation from IJK to LPS or RAS.&lt;br /&gt;
&lt;br /&gt;
=2D example or calculating an ''IJtoLS''-matrix=&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; '''TODO: Add the example of the session''' &amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13321</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13321"/>
		<updated>2010-04-08T18:22:04Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces with their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways:&lt;br /&gt;
* The '''world coordinate system''' is typically a cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
* The most important model coordinate system for medical imaging techniques is the '''anatomical space'''. This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
** the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
** the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
** the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FFFFFF&amp;quot;&amp;gt;....&amp;lt;/span&amp;gt; From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
* The '''image coordinate system''' describes how the images were acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The ''i'' axis increases to the right, the ''j'' axis to the bottom and the ''k'' axis backwards.&lt;br /&gt;
&lt;br /&gt;
=The relationship between the anatomical coordinate system and the image coordinate system=&lt;br /&gt;
The '''anatomical coordinate system''' (also called patient coordinate system) is a continuous three-dimensional space in which an image has been sampled. In neuroimaging, it is common to define this space with respect to the human whose brain is being scanned. Hence the 3D basis is defined along the anatomical axes of anterior-posterior, inferior-superior, and left-right.&lt;br /&gt;
&lt;br /&gt;
However different medical applications use different definitions of this 3D basis. Most common are the following:&lt;br /&gt;
* LPS (Left, Posterior, Superior), which is used in DICOM images and by the ITK toolkit&lt;br /&gt;
* RAS (Right, Anterior, Superior) is similar to LPS with the first two axes flipped used in 3D Slicer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=3rdCaption=&lt;br /&gt;
text&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13317</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13317"/>
		<updated>2010-04-08T17:46:22Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces with their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways:&lt;br /&gt;
* The '''world coordinate system''' is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
* The most important model coordinate system for medical imaging techniques is the '''anatomical space'''. This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
** the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
** the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
** the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FFFFFF&amp;quot;&amp;gt;....&amp;lt;/span&amp;gt; From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
* The '''image coordinate system''' describes how the images were acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The i axis increases to the right, the j axis to the bottom and the k axis backwards.&lt;br /&gt;
&lt;br /&gt;
=2nd Caption=&lt;br /&gt;
text&lt;br /&gt;
&lt;br /&gt;
=3rdCaption=&lt;br /&gt;
text&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13312</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13312"/>
		<updated>2010-04-08T17:30:35Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the '''world''', '''anatomical''' and the '''image coordinate system'''.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces with their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| thumb | 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways:&lt;br /&gt;
* The '''world coordinate system''' is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;br /&gt;
* The most important model coordinate system for medical imaging techniques is the '''anatomical space'''. This space consists of three planes to describe the standard anatomical position of a human:&lt;br /&gt;
** the ''axial plane'' is parallel to the ground and separates the head (Superior) from the feet (Inferior)&lt;br /&gt;
** the ''coronal plane'' is perpendicular to the ground and separates the front from (Anterior) the back (Posterior)&lt;br /&gt;
** the ''sagittal plane'' separates the Left from the Right&lt;br /&gt;
From these planes it follows that all axes have their notation in a positive direction (e.g. the negative Superior axis is represented by the Inferior axis).&lt;br /&gt;
* The '''image coordinate system''' describes how the images were acquired with respect to the anatomy. Medical scanners create regular, rectangular arrays of points and cells which start at the upper left corner. The i axis increases to the right, the j axis to the bottom and the k axis backwards.&lt;br /&gt;
&lt;br /&gt;
=2nd Caption=&lt;br /&gt;
text&lt;br /&gt;
&lt;br /&gt;
=3rdCaption=&lt;br /&gt;
text&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13311</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13311"/>
		<updated>2010-04-08T17:02:17Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the world, anatomical and the image coordinate system.&lt;br /&gt;
&lt;br /&gt;
The following figure illustrates the three spaces with their corresponding axes:&lt;br /&gt;
[[Image:coordinate_sytems.png| 550px | center | The 3 different spaces and their axes]]&lt;br /&gt;
Each coordinate system serves one purpose and represents their data in different ways:&lt;br /&gt;
The world coordinate system is typically a Cartesian coordinate system in which a model (e.g. a MRI scanner or a patient) is positioned. Every model has its own coordinate system but there is only one world coordinate system to define the position and orientation of each model.&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=File:Coordinate_sytems.png&amp;diff=13310</id>
		<title>File:Coordinate sytems.png</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=File:Coordinate_sytems.png&amp;diff=13310"/>
		<updated>2010-04-08T16:42:03Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: Image of the three different coordinate systems&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Image of the three different coordinate systems&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13309</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13309"/>
		<updated>2010-04-08T16:40:10Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: added introduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
One of the great issues while dealing with medical images and applications are the differences between the coordinate systems. There are three coordinate systems commonly used in medical applications: a difference can be made between the world, anatomical and the image coordinate system.&lt;br /&gt;
The following figure illustrates the three spaces with their corresponding axes:&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13307</id>
		<title>Coordinate systems</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Coordinate_systems&amp;diff=13307"/>
		<updated>2010-04-08T14:14:14Z</updated>

		<summary type="html">&lt;p&gt;MartinLoepprich: created a wiki page 'Coordinate systems'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;test&lt;/div&gt;</summary>
		<author><name>MartinLoepprich</name></author>
		
	</entry>
</feed>