r502: no message
[ctsim.git] / doc / ctsim-concepts.tex
index aa976159d95e0a10af58d7ca3d49b4f1c0e25e8f..32d60c83bd67b2f180637f1be1c3c09e93c9538b 100644 (file)
@@ -3,16 +3,17 @@
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
 \section{Overview}\label{conceptoverview}\index{Concepts,Overview}%
-In \ctsim, a phantom object, or a geometrical description of the object
-of a CT study is constructed and an image can be created.  Then a
-scanner geometry can be specified, and the projection data simulated.
-Finally that projection data can be reconstructed using various user
-controlled algorithms producing an image of the phantom or study object.
+The operation of \ctsim begins with the phantom object.  A phantom
+object consists of geometric elements.  A scanner is specified and the
+projection data simulated.  Finally 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.
 
 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 'phantom' and
-the 'scanner'.
+object, but the two objects we need to be concerned with are the 
+\emph{phantom} and the \emph{scanner}.
 
 \section{Phantoms}\label{conceptphantom}\index{Concepts,Phantoms}%
 \subsection{Overview}\label{phantomoverview}\index{Concepts,Phantoms,Overview}%
@@ -21,9 +22,10 @@ the 'scanner'.
 describe the object being 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 (Herman
-Shepp-Logan) can be constructed.  In fact, \ctsim\ provides a shortcut to construct those published phantoms.  \ctsim\ also
-reads text files of user-defined phantoms.
+With these elements, standard phantoms used in the CT literature can
+be constructed.  In fact, \ctsim\ provides a shortcut to load the
+published phantoms of Herman and Shepp-Logan.  \ctsim\ also reads text
+files of user-defined phantoms.
 
 The types of phantom elements and their definitions are taken from
 Herman's 1980 book\cite{HERMAN80}.
@@ -46,20 +48,20 @@ Where objects overlap, the attenuations of the overlapped objects are summed.
 \subsection{Phantom Elements}\label{phantomelements}\index{Concepts,Phantoms,Elements}
 
 \subsubsection{ellipse}
-Ellipses use dx and dy to define the semi-major and semi-minor axis lengths,
-with the center of the ellipse at cx and cy.  Of note, the commonly used
-phantom described by Shepp and Logan\cite{SHEPP74} uses only ellipses.
+Ellipses use \texttt{dx} and \texttt{dy} to define the semi-major and
+semi-minor axis lengths, with the center of the ellipse at \texttt{cx}
+and \texttt{cy}.  Of note, the commonly used phantom described by
+Shepp and Logan\cite{SHEPP74} uses only ellipses.
 
 \subsubsection{rectangle}
-Rectangles use
-cx  and cy to define the position of the center of the rectangle with respect
-to the origin.  dx and dy  are the half-width and half-height of the
-rectangle.
+Rectangles use \texttt{cx} and \texttt{cy} to define the position of
+the center of the rectangle with respect to the origin.  \texttt{dx}
+and \texttt{dy} are the half-width and half-height of the rectangle.
 
 \subsubsection{triangle}
-Triangles are drawn with the center of the base at cx,cy, with a base
-half-width of dx and a height of dy.  Rotations are then
-applied about the center of the base.
+Triangles are drawn with the center of the base at \texttt{(cx,cy)},
+with a base half-width of \texttt{dx} and a height of \texttt{dy}.
+Rotations are then applied about the center of the base.
 
 \subsubsection{segment}
 Segments are complex. They are the portion of an circle between a
@@ -89,7 +91,7 @@ rectangle of size 0.1 by 0.1, the actual phantom has extent 0.101 in
 each direction.
 
 \section{Scanner}\label{conceptscanner}\index{Concepts,Scanner}%
-\subsection{Sizes}
+\subsection{Dimensions}
 Understanding the scanning geometry is the most complicated aspect of
 using \ctsim. For real-world CT simulators, this is actually quite
 simple. The geometry is fixed by the manufacturer during the
@@ -117,18 +119,19 @@ absolute values.
 $$\image{5cm;0cm}{scangeometry.eps}$$
 \caption{Phantom Geometry}
 \end{figure}
-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}}
+The phantom diameter is automatically calculated by \ctsim\ from 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, 
-\latexonly{$P_d$,}\latexignore{\emph{Pd},}
+\latexonly{$p_d$,}\latexignore{\emph{Pd},}
 is then
 \latexignore{\\$$\emph{Pl x sqrt(2)}$$\\}
-\latexonly{$$P_d = P_l \sqrt{2}$$}
+\latexonly{$$p_d = p_l \sqrt{2}$$}
 CT scanners actually collect projections around a circle rather than a
 square. The diameter of this circle is also the diameter of the boundary
 square
-\latexonly{$P_d$.}\latexignore{\emph{Pd}.}
+\latexonly{$p_d$.}\latexignore{\emph{Pd}.}
 These relationships are diagrammed in figure 2.1.
 
 \subsubsection{View Diameter}
@@ -138,12 +141,12 @@ is set equal to the \emph{phantom diameter}. It may be useful, especially for
 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{\emph{VR}.}
+\latexonly{$v_{R}$.}\latexignore{\emph{VR}.}
 The \emph{view diameter} is then set as
-\latexonly{$$V_d = P_d V_{R}$$}\latexignore{\\$$\emph{Vd = Pd x VR}$$}
+\latexonly{$$v_d = p_d v_{R}$$}\latexignore{\\$$\emph{Vd = Pd x VR}$$}
 
 By using a 
-\latexonly{$V_{R}$}\latexignore{\emph{VR}}
+\latexonly{$v_{R}$}\latexignore{\emph{VR}}
 less than 1, \ctsim\ will allow
 for a \emph{view diameter} less than 
 \emph{phantom diameter}.
@@ -155,29 +158,30 @@ scanner that is larger than the scanner itself!
 By default, the entire \emph{view diameter} is scanned. For experimental
 purposes, it may be desirable to scan an area either larger or smaller than
 the \emph{view diameter}. Thus, the concept of \emph{scan ratio}
-\latexonly{$S_{R}$}\latexignore{\emph{SR}}
+\latexonly{$s_{R}$}\latexignore{\emph{SR}}
 is born. The scan diameter
-\latexonly{$S_d$}\latexignore{\emph{Sd}}
+\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}$$\\}
+\latexonly{$$s_d = v_d s_{R}$$}\latexignore{\\$$\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.
 
 \subsubsection{Focal Length}
 The \emph{focal length},
-\latexonly{$F_l$,}\latexignore{\emph{Fl},}
+\latexonly{$f$,}\latexignore{\emph{F},}
 is the distance of the X-ray source to the center of
 the phantom. The focal length is set as a ratio,
-\latexonly{$F_{lR}$,}\latexignore{\emph{FllR},}
+\latexonly{$f_{R}$,}\latexignore{\emph{FR},}
 of the view radius. Focal length is
 calculated as
-\latexonly{$$F_l = (V_d / 2) F_R$$}\latexignore{\\$$\emph{Fl = (Vd / 2) x FlR}$$}
+\latexonly{$$f = (v_d / 2) f_R$$}\latexignore{\\$$\emph{F = (Vd / 2) x FR}$$}
 
 For parallel geometry scanning, the focal length doesn't matter. However, 
 divergent geometry scanning (equilinear and equiangular), the \emph{focal
 length ratio} should be set at \texttt{2} or more to avoid artifacts. 
 
+       
 \subsection{Parallel Geometry}\label{geometryparallel}\index{Concepts,Scanner,Geometries,Parallel}
 
 As mentioned above, the focal length is not used in this simple
@@ -189,6 +193,7 @@ the default values of \texttt{1} for the \emph{view diameter ratio} and
 the \emph{scan diameter ratio}. If values of less than \texttt{1} are
 used for these two variables, significant distortions will occur.
 
+
 \subsection{Divergent Geometries}\label{geometrydivergent}\index{Concepts,Scanner,Geometries,Divergent}
 \subsubsection{Overview}
 Next consider the case of equilinear (second generation) and equiangular
@@ -199,31 +204,41 @@ 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.
 See figure 2.2.
 \begin{figure}
-\image{10cm;0cm}{ctsimfig2.eps}
+\image{10cm;0cm}{divergent.eps}
 \caption{Equilinear and equiangular geometries.}
 \end{figure}
 
+
 \subsubsection{Fan Beam Angle}
 For these divergent beam geometries, the \emph{fan beam angle} needs 
 to be calculated. For real-world CT scanners, this is fixed at the
 time of manufacture. \ctsim, however, calculates the \emph{fan beam angle},
 \latexonly{$\alpha$,}\latexignore{\emph{alpha},} 
 from the diameter of the \emph{scan diameter} and the \emph{focal length}
-\latexignore{\\$$\emph{alpha = 2 x asin ( (Sd / 2) / F_l)}$$\\}
-\latexonly{$$\alpha = 2 \sin^{-1} ((S_d / 2) / F_l)$$}
+\latexignore{\\$$\emph{alpha = 2 x asin ( (Sd / 2) / f)}$$\\}
+\latexonly{$$\alpha = 2 \sin^{-1} ((s_d / 2) / f)$$}
 This is illustrated in figure 2.3.
 \begin{figure}
 \image{10cm;0cm}{alphacalc.eps}
 \caption{Calculation of $\alpha$}
 \end{figure}
 
+
 Empiric testing with \ctsim\ shows that for very large \emph{fan beam angles},
 greater than approximately 
-\latexonly{$120^{\circ}$,}\latexignore{120 degrees,}
+\latexonly{$120^\circ$,}\latexignore{120 degrees,}
 there are significant artifacts. The primary way to manage the
 \emph{fan beam angle} is by varying the \emph{focal length} since the
 \emph{scan diameter} by the size of the phantom.
 
+$$s_d = p_d v_R s_R$$
+If $v_r = 1$ and $s_R = 1$, then $s_d = p_d$. Further, $f = f_R v_R (p_d / 2)$
+Plugging these equations into the above equation,
+$$\alpha = 2\,\sin^{-1} \frac{p_d / 2}{f_R (p_d / 2)}$$
+$$\alpha = 2\,\sin^{-1} (1 / f_R)$$
+
+Thus, $\alpha$ depends only upon the \emph{focal length ratio}.
+
 \subsubsection{Detector Array Size}
 In general, you do not need to be concerned with the detector array
 size. It is automatically calculated by \ctsim.  The size of the
@@ -236,16 +251,25 @@ For equiangular geometry, the detectors are spaced around a
 circle covering an angular distance of 
 \latexonly{$\alpha$.}\latexignore{\emph{alpha}.}
 The dotted circle in
+\begin{figure}
+\image{10cm;0cm}{equiangular.eps}
+\caption{Equiangluar geometry}
+\end{figure}
 figure 2.4 indicates the positions of the detectors in this case. 
 
 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{$$\mathrm{detLengh} = 4\,F_l \tan (\alpha / 2)$$}
-\latexignore{\\$$\emph{detLength} = 4 x Fl x tan(alpha/2)$$\\}
+\latexonly{$$\mathrm{detLengh} = 4\,f \tan (\alpha / 2)$$}
+\latexignore{\\$$\emph{detLength} = 4 x F x tan(alpha/2)$$\\}
+\begin{figure}
+\image{10cm;0cm}{equilinear.eps}
+\caption{Equilinear geometry}
+\end{figure}
 An example of the this geometry is in figure 2.5.
 
+
 \subsubsection{Examples of Geometry Settings}
 Consider increasing the focal length ratio to two leaving the
 field of view ratio as 1,  as in  Figure 4.  Now the detectors array is
@@ -254,15 +278,6 @@ again that the field of view is not used. Instead, the focal length is
 used to give a distance from the center of the phantom to the source, and
 the detector array is adjusted to give an angular coverage to include the
 whole phantom.
-\begin{figure}
-\image{10cm;0cm}{ctsimfig4.eps}
-\caption{Equilinear and equiangluar geometry when focal length ratio = 2
-and the field of view ratio = 1.}
-\end{figure}
-\begin{figure}
-\image{10cm;0cm}{ctsimfig5.eps}
-\caption{Equilinear and equiangluar geometry when focal length ratio = 4.}
-\end{figure}
 
 
 
@@ -287,7 +302,7 @@ in a 16-CPU cluster with good results.
 The projections for a single view have their frequency data multipled by
 a filter of $|w|$. \ctsim\ permits four different ways to accomplish this
 filtering. Two of the methods use convolution of the projection data with the
-inverse fourier transform of $|w|$. The other two methods perform an fourier
+inverse Fourier transform of $|w|$. The other two methods perform an Fourier
 transform of the projection data and multiply that by the $|w|$ filter and
 then perform an inverse fourier transform.
 
@@ -297,5 +312,5 @@ filters for this purpose.
 
 \subsubsection{Backprojection of filtered projections}
 Backprojection is the process of ``smearing'' the filtered projections over
-the reconstructing image.
-
+the reconstructing image. Various levels of interpolation can be specified.
+In general, the trade-off is between quality and execution time.