r543: no message
[ctsim.git] / doc / ctsim-concepts.tex
index c7c3ffd39350bd3a66b965e2c8aa25e2b5dcc8c9..ff76a9e52768e5ee2c1f07d2b5bd2c4df1985f2d 100644 (file)
@@ -8,13 +8,13 @@ phantom object consists of geometric elements.  A scanner is
 specified and the collection of x-ray data, or projections, is
 simulated. That projection data can be reconstructed using various
 user-controlled algorithms producing an image of the phantom
 specified and the collection of x-ray data, or projections, is
 simulated. That projection data can be reconstructed using various
 user-controlled algorithms producing an image of the phantom
-object. This reconstruction can then be statistically compared to
-the original phantom object.
+object. These reconstructions can be visually and statistically
+compared to the original phantom object.
 
 
-In order to use \ctsim\ effectively, some knowledge of how \ctsim\ works
-and the approach taken is required. \ctsim\ deals with a variety of
-object, but the two objects we need to be concerned with are the
-\emph{phantom} and the \emph{scanner}.
+In order to use \ctsim\ effectively, some knowledge of how
+\ctsim\ works and the approach taken is required. \ctsim\ deals with a
+variety of object, but the two primary objects that we need to be
+concerned with are the \emph{phantom} and the \emph{scanner}.
 
 \section{Phantoms}\label{conceptphantom}
 \subsection{Overview}\label{phantomoverview}\index{Phantom Overview}%
 
 \section{Phantoms}\label{conceptphantom}
 \subsection{Overview}\label{phantomoverview}\index{Phantom Overview}%
@@ -23,7 +23,7 @@ object, but the two objects we need to be concerned with are the
 scanned. A phantom is composed a one or more phantom elements.
 These elements are simple geometric shapes, specifically,
 rectangles, triangles, ellipses, sectors and segments. With these
 scanned. A phantom is composed a one or more phantom elements.
 These elements are simple geometric shapes, specifically,
 rectangles, triangles, ellipses, sectors and segments. With these
-elements, standard phantoms used in the CT literature can be
+elements, the standard phantoms used in the CT literature can be
 constructed.  In fact, \ctsim\ provides a shortcut to load the
 published phantoms of Herman\cite{HERMAN80} and
 Shepp-Logan\cite{SHEPP74}. \ctsim\ also reads text files of
 constructed.  In fact, \ctsim\ provides a shortcut to load the
 published phantoms of Herman\cite{HERMAN80} and
 Shepp-Logan\cite{SHEPP74}. \ctsim\ also reads text files of
@@ -70,23 +70,23 @@ Rotations are then applied about the center of the base.
 
 \subsubsection{segment}
 Segments are complex. They are the portion of an circle between a
 
 \subsubsection{segment}
 Segments are complex. They are the portion of an circle between a
-chord and the perimeter of the circle.  \texttt{dy} sets the radius of
-the circle. Segments start with the center of the chord located at
-\texttt{(0,0)} and the chord horizontal. The half-width of the chord
-is set by \texttt{dx}.  The portion of an circle lying below the chord
-is then added. The imaginary center of this circle is located at
-\texttt{(0,-dy)}. The segment is then rotated by \texttt{r} and then
-translated by \texttt{cx,cy}.
+chord and the perimeter of the circle.  \texttt{dy} sets the
+radius of the circle. Segments start with the center of the chord
+located at \texttt{(0,0)} and the chord horizontal. The half-width
+of the chord is set by \texttt{dx}.  The portion of an circle
+lying below the chord is then added. The imaginary center of this
+circle is located at \texttt{(0,-dy)}. The segment is then rotated
+by \texttt{r} and then translated by \texttt{(cx,cy)}.
 
 \subsubsection{sector}
 
 \subsubsection{sector}
-Sectors are the like a ``pie slice'' from a circle. The radius of the
-circle is set by \texttt{dy}. Sectors are
-defined similarly to segments. In this case, though, a chord is not
-drawn.  Instead, the lines are drawn from the origin of the circle
-\texttt{(0,-dy)} to the points \texttt{(-dx,0)} and \texttt{(dx,0)}.
-The perimeter of the circle is then draw between those two points
-below the x-axis. The sector is then rotated and translated the same
-as a segment.
+Sectors are the like a ``pie slice'' from a circle. The radius of
+the circle is set by \texttt{dy}. Sectors are defined similarly to
+segments. In this case, though, a chord is not drawn.  Instead,
+the lines are drawn from the origin of the circle \texttt{(0,-dy)}
+to the points \texttt{(-dx,0)} and \texttt{(dx,0)}. The perimeter
+of the circle is then drawn between those two points and lies
+below the x-axis. The sector is then rotated and translated the
+same as a segment.
 
 \subsection{Phantom Size}\index{Phantom size}
 The overall dimensions of the phantom are increased by 1\% above the
 
 \subsection{Phantom Size}\index{Phantom size}
 The overall dimensions of the phantom are increased by 1\% above the
@@ -106,13 +106,13 @@ real-world CT scanners can only take objects up to a fixed size.
 \ctsim, being a very flexible simulator,
 gives tremendous options in setting up the geometry for a scan.
 
 \ctsim, being a very flexible simulator,
 gives tremendous options in setting up the geometry for a scan.
 
-In general, the geometry for a scan all starts from the size of the
-phantom being scanned. This is because \ctsim\ allows for statistical
-comparisons between the original phantom image and it's reconstructions.
-Since CT scanners scan a circular area, the first important
-variable is the diameter of the circle surround the phantom, or the
-\emph{phantom diameter}. Remember, as mentioned above, the
-phantom dimensions are also padded by 1\%.
+In general, the geometry for a scan all starts with the size of
+the phantom being scanned. This is because \ctsim\ allows for
+statistical comparisons between the original phantom image and
+it's reconstructions. Since CT scanners scan a circular area, the
+first important variable is the diameter of the circle surround
+the phantom, the \emph{phantom diameter}. Remember, as mentioned
+above, the phantom dimensions are also padded by 1\%.
 
 The other important geometry variables for scanning phantoms are
 the \emph{view diameter}, \emph{scan diameter}, and \emph{focal
 
 The other important geometry variables for scanning phantoms are
 the \emph{view diameter}, \emph{scan diameter}, and \emph{focal
@@ -129,12 +129,12 @@ the phantom definition. The maximum of the phantom length and
 height is used to define the square that completely surrounds the
 phantom. Let \latexonly{$p_l$}\latexignore{\emph{Pl}} be the width
 and height of this square. The diameter of this boundary box,
 height is used to define the square that completely surrounds the
 phantom. Let \latexonly{$p_l$}\latexignore{\emph{Pl}} be the width
 and height of this square. The diameter of this boundary box,
-\latexonly{$p_d$,}\latexignore{\emph{Pd},} \rtfsp is then
-\latexignore{\\$$\emph{Pl x sqrt(2)}$$\\} \latexonly{$$p_d = p_l
-\sqrt{2}$$} CT scanners actually collect projections around a
+\latexonly{$p_d$,}\latexignore{\emph{Pd},} is then
+\latexignore{\\\centerline{\emph{Pl x sqrt(2)}}\\}
+\latexonly{\begin{equation}p_d = p_l \sqrt{2}\end{equation}}
+CT scanners actually collect projections around a
 circle rather than a square. The diameter of this circle is also
 circle rather than a square. The diameter of this circle is also
-the diameter of the boundary square
-\latexonly{$p_d$.  These
+the diameter of the boundary square \latexonly{$p_d$.  These
 relationships are diagrammed in figure~\ref{phantomgeomfig}.}
 \latexignore{emph{Pd}.}
 
 relationships are diagrammed in figure~\ref{phantomgeomfig}.}
 \latexignore{emph{Pd}.}
 
@@ -147,8 +147,9 @@ experimental reasons, to process an area larger (and maybe even
 smaller) than the phantom. Thus, during rasterization or during
 projections, \ctsim\ will ask for a \emph{view ratio},
 \latexonly{$v_r$.}\latexignore{\rtfsp \emph{VR}.} The \emph{view
 smaller) than the phantom. Thus, during rasterization or during
 projections, \ctsim\ will ask for a \emph{view ratio},
 \latexonly{$v_r$.}\latexignore{\rtfsp \emph{VR}.} The \emph{view
-diameter} is then calculated as \latexonly{$$v_d = p_d
-v_r$$}\latexignore{\\$$\emph{Vd = Pd x VR}$$}
+diameter} is then calculated as
+\latexonly{\begin{equation}v_d = p_dv_r\end{equation}}
+\latexignore{\\\centerline{\emph{Vd = Pd x VR}}\\}
 
 By using a
 \latexonly{$v_r$}\latexignore{\emph{VR}}
 
 By using a
 \latexonly{$v_r$}\latexignore{\emph{VR}}
@@ -156,7 +157,7 @@ less than 1, \ctsim\ will allow
 for a \emph{view diameter} less than
 \emph{phantom diameter}.
 This will lead to significant artifacts. Physically, this would
 for a \emph{view diameter} less than
 \emph{phantom diameter}.
 This will lead to significant artifacts. Physically, this would
-be impossible and is analagous to inserting an object into the CT
+be impossible and is analogous to inserting an object into the CT
 scanner that is larger than the scanner itself!
 
 \subsubsection{Scan Diameter}\index{Scan diameter}
 scanner that is larger than the scanner itself!
 
 \subsubsection{Scan Diameter}\index{Scan diameter}
@@ -166,8 +167,10 @@ larger or smaller than the \emph{view diameter}. Thus, the concept
 of \emph{scan ratio}, \latexonly{$s_r$,}\latexignore{\emph{SR},}
 is arises. The scan diameter
 \latexonly{$s_d$}\latexignore{\emph{Sd}} is the diameter over
 of \emph{scan ratio}, \latexonly{$s_r$,}\latexignore{\emph{SR},}
 is arises. The scan diameter
 \latexonly{$s_d$}\latexignore{\emph{Sd}} is the diameter over
-which x-rays are collected and is defined as \latexonly{$$s_d =
-v_d s_r$$}\latexignore{\\$$\emph{Sd = Vd x SR}$$\\} By default and
+which x-rays are collected and is defined as
+\latexonly{\begin{equation}s_d =v_d s_r\end{equation}}
+\latexignore{\\\centerline{\emph{Sd = Vd x SR}}\\}
+By default and
 for all ordinary scanning, the \emph{scan ratio} is to \texttt{1}.
 If the \emph{scan ratio} is less than \texttt{1}, you can expect
 significant artifacts.
 for all ordinary scanning, the \emph{scan ratio} is to \texttt{1}.
 If the \emph{scan ratio} is less than \texttt{1}, you can expect
 significant artifacts.
@@ -180,7 +183,8 @@ the phantom. The focal length is set as a ratio,
 \latexonly{$f_r$,}\latexignore{\emph{FR},}
 of the view radius. Focal length is
 calculated as
 \latexonly{$f_r$,}\latexignore{\emph{FR},}
 of the view radius. Focal length is
 calculated as
-\latexonly{$$f = (v_d / 2) f_r$$}\latexignore{\\$$\emph{F = (Vd / 2) x FR}$$}
+\latexonly{\begin{equation}f = (v_d / 2) f_r\end{equation}}
+\latexignore{\\\centerline{\emph{F = (Vd / 2) x FR}}}
 
 For parallel geometry scanning, the focal length doesn't matter.
 However, divergent geometry scanning (equilinear and equiangular),
 
 For parallel geometry scanning, the focal length doesn't matter.
 However, divergent geometry scanning (equilinear and equiangular),
@@ -192,7 +196,8 @@ source inside of the \emph{view diameter}.
 
 \subsection{Parallel Geometry}\label{geometryparallel}\index{Parallel Geometry}
 
 
 \subsection{Parallel Geometry}\label{geometryparallel}\index{Parallel Geometry}
 
-As mentioned above, the focal length is not used in this simple
+The simplest geometry, parallel, was used in \mbox{$1^{st}$} generation
+scanners. As mentioned above, the focal length is not used in this simple
 geometry. The detector array is set to be the same size as the
 \emph{scan diameter}.  For optimal scanning in this geometry, the
 \emph{scan diameter} should be equal to the \emph{phantom
 geometry. The detector array is set to be the same size as the
 \emph{scan diameter}.  For optimal scanning in this geometry, the
 \emph{scan diameter} should be equal to the \emph{phantom
@@ -210,7 +215,7 @@ the x-ray beams diverge from a single source to a detector array.
 In the equilinear mode, a single
 source produces a fan beam which is read by a linear array of detectors.  If
 the detectors occupy an arc of a circle, then the geometry is equiangular.
 In the equilinear mode, a single
 source produces a fan beam which is read by a linear array of detectors.  If
 the detectors occupy an arc of a circle, then the geometry is equiangular.
-\latexonly{See figure~\ref{divergentfig}.}
+\latexonly{The configurations are shown in figure~\ref{divergentfig}.}
 \begin{figure}
 \image{10cm;0cm}{divergent.eps}
 \caption{\label{divergentfig} Equilinear and equiangular geometries.}
 \begin{figure}
 \image{10cm;0cm}{divergent.eps}
 \caption{\label{divergentfig} Equilinear and equiangular geometries.}
@@ -241,22 +246,24 @@ there are significant artifacts. The primary way to manage the
 \emph{scan diameter} by the size of the phantom.
 
 To illustrate, the \emph{scan diameter} can be defined as
 \emph{scan diameter} by the size of the phantom.
 
 To illustrate, the \emph{scan diameter} can be defined as
-\latexonly{$$s_d = s_r v_r p_d$$}\latexignore{\\$$Sd = Sr x Vr x Pd$$\\}
+\latexonly{\begin{equation}s_d = s_r v_r p_d\end{equation}}
+\latexignore{\\\centerline{\emph{Sd = Sr x Vr x Pd}}\\}
 
 
-Further, $f$ can be defined as \latexonly{$$f = f_r (v_r p_d /
-2)$$}\latexignore{\\$$F = FR x (VR x Pd)$$\\}
+Further, $f$ can be defined as
+\latexonly{\[f = f_r (v_r p_d / 2)\]}
+\latexignore{\\\centerline{\emph{F = FR x (VR x Pd)$$\\}}}
 
 Substituting these equations into \latexignore{the above
 equation,}\latexonly{equation~\ref{alphacalc},} We have,
 \latexonly{
 \begin{eqnarray}
 
 Substituting these equations into \latexignore{the above
 equation,}\latexonly{equation~\ref{alphacalc},} We have,
 \latexonly{
 \begin{eqnarray}
-\alpha &= 2\,\sin^{-1} \frac{s_r v_r p_d / 2}{f_r v_r (p_d / 2)} \nonumber \\
-&= 2\,\sin^{-1} (s_r / f_r)
+\alpha &=& 2\,\sin^{-1} \frac{\displaystyle s_r v_r p_d / 2}{\displaystyle f_r v_r (p_d / 2)} \nonumber \\
+&=& 2\,\sin^{-1} (s_r / f_r)
 \end{eqnarray}
 \end{eqnarray}
-} \latexignore{\\$$\alpha = 2 sin (Sr / Fr$$\\}
+} \latexignore{\\\centerline{\emph{\alpha = 2 sin (Sr / Fr)}}\\}
 
 Since in normal scanning $s_r$ = 1, $\alpha$ depends only upon the
 
 Since in normal scanning $s_r$ = 1, $\alpha$ depends only upon the
-\emph{focal length ratio}.
+\emph{focal length ratio} in normal scanning.
 
 \subsubsection{Detector Array Size}
 In general, you do not need to be concerned with the detector
 
 \subsubsection{Detector Array Size}
 In general, you do not need to be concerned with the detector
@@ -285,8 +292,9 @@ figure~\ref{equiangularfig} indicates the positions of the detectors in this cas
 For equilinear geometry, the detectors are space along a straight
 line. The length of the line depends upon
 \latexonly{$\alpha$}\latexignore{\emph{alpha}} and the \emph{focal
 For equilinear geometry, the detectors are space along a straight
 line. The length of the line depends upon
 \latexonly{$\alpha$}\latexignore{\emph{alpha}} and the \emph{focal
-length}. It is calculated as \latexonly{$4\,f \tan (\alpha / 2)$}
-\latexignore{\emph{4 x F x tan(\alpha/2)}}
+length}. It is calculated as
+\latexonly{\begin{equation}4\,f \tan (\alpha / 2)\end{equation}}
+\latexignore{\\\centerline{\emph{4 x F x tan(\alpha/2)}}}
 \begin{figure}\label{equilinearfig}
 \image{10cm;0cm}{equilinear.eps}
 \caption{\label{equilinearfig} Equilinear geometry}
 \begin{figure}\label{equilinearfig}
 \image{10cm;0cm}{equilinear.eps}
 \caption{\label{equilinearfig} Equilinear geometry}
@@ -294,11 +302,8 @@ length}. It is calculated as \latexonly{$4\,f \tan (\alpha / 2)$}
 \latexonly{This geometry is shown in figure~\ref{equilinearfig}.}
 
 
 \latexonly{This geometry is shown in figure~\ref{equilinearfig}.}
 
 
-\subsubsection{Examples of Geometry Settings}
-
-
 \section{Reconstruction}\label{conceptreconstruction}\index{Reconstruction Overview}%
 \section{Reconstruction}\label{conceptreconstruction}\index{Reconstruction Overview}%
-\subsection{Overview}
+
 \subsection{Direct Inverse Fourier}
 This method is not currently implemented in \ctsim, however it is
 planned for a future release. This method does not give results as
 \subsection{Direct Inverse Fourier}
 This method is not currently implemented in \ctsim, however it is
 planned for a future release. This method does not give results as
@@ -314,11 +319,12 @@ these two steps are sequential, each view position can be processed individually
 \subsubsection{Multiple Computer Processing}
 This parallelism is exploited in the MPI versions of \ctsim\ where the
 data from all the views are spread about amongst all of the
 \subsubsection{Multiple Computer Processing}
 This parallelism is exploited in the MPI versions of \ctsim\ where the
 data from all the views are spread about amongst all of the
-processors. This has been testing in a 16-CPU cluster with good
+processors. This has been testing in a 16-CPU cluster with excellent
 results.
 
 \subsubsection{Filter projections}
 results.
 
 \subsubsection{Filter projections}
-The projections for a single view have their frequency data multipled by
+The first step in filtered backprojection reconstructions is the filtering
+of each projection. The projections for a each view have their frequency data multipled by
 a filter of $|w|$. \ctsim\ permits four different ways to accomplish this
 filtering.
 
 a filter of $|w|$. \ctsim\ permits four different ways to accomplish this
 filtering.
 
@@ -341,19 +347,26 @@ interpolation can be specified.
 \section{Image Comparison}\index{Image comparison}
 Images can be compared statistically. Three measurements can be calculated
 by \ctsim. They are taken from the standard measurements used by
 \section{Image Comparison}\index{Image comparison}
 Images can be compared statistically. Three measurements can be calculated
 by \ctsim. They are taken from the standard measurements used by
-Herman\cite{HERMAN80}.
-$d$ is the standard error, $e$ is the maximum error, and
-$r$ is the maximum error of a 2 by 2 pixel area.
-
-To compare two images, $A$ and $B$, each of which has $n$ columns and $m$ rows,
-these values are calculated as below.
-
-
-\latexonly{
-\begin{equation}
-d = \frac{\sum_{i=0}^{n}{\sum_{j=0}^{m}{(A_{ij} - B_{ij})^2}}}{m n}
-\end{equation}
-\begin{equation}
-r = \max(|A_{ij} - B{ij}|)
-\end{equation}
-}
+Herman\cite{HERMAN80}. They are:
+\begin{description}
+\item[$d$] The normalized root mean squared distance measure.
+\item[$r$] The normalized mean absolute distance measure.
+\item[$e$] The worst case distance measure over a $2\times2$ area.
+\end{description}
+
+These measurements are defined in equations \ref{dequation} through \ref{bigrequation}.
+In these equations, $p$ denotes the phantom image, $r$ denotes the reconstruction
+image, and $\bar{p}$ denotes the average pixel value for $p$. Each of the images have a
+size of $m \times n$. In equation \ref{eequation} $[n/2]$ and $[m/2]$ denote the largest
+integers less than $n/2$ and $m/2$, respectively.
+
+\latexignore{These formulas are shown in the print documentation of \ctsim.}
+%
+%Tex2RTF can not handle the any subscripts or superscripts for the inner summation unless
+% have a space character before the \sum
+\latexonly{\begin{equation}\label{dequation} d =\sqrt{\frac{\displaystyle \sum_{i=1}^{n}{ \sum_{j=1}^{m}{(p_{i,j} - r_{i,j})^2}}}{\displaystyle \sum_{i=1}^{n}{ \sum_{j=1}^{m}{(p_{i,j} - \bar{p})^2}}}}\end{equation}}
+\latexonly{\[\label{requation}r = \frac{ \displaystyle \sum_{i=1}^{n}{ \sum_{j=1}^{m}{|p_{i,j} - r_{i,j}|}}}{ \displaystyle \sum_{i=1}^{n}{ \sum_{j=1}^{m}{|p_{i,j}|}}}\]}
+\latexonly{\begin{equation}\label{eequation}e = \max_{1 \le k \le [n/2] \atop 1 \le l \le [m/2]}(|P_{k,l} - R_{k,l}|)\end{equation}}
+\latexonly{where}
+\latexonly{\[\label{bigpequation}P_{k,l} = \textstyle \frac{1}{4} (p_{2k,2l} + p_{2k+1,2l} + p_{2k,2l+l} + p_{2k+1,2l+1})\]}
+\latexonly{\begin{equation}\label{bigrequation}R_{k,l} = \textstyle \frac{1}{4} (r_{2k,2l} + r_{2k+1,2l} + r_{2k,2l+1} + r_{2k+1,2l+1})\end{equation}}