From: Kevin M. Rosenberg Date: Tue, 6 Feb 2001 23:40:32 +0000 (+0000) Subject: r496: no message X-Git-Tag: debian-4.5.3-3~521 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=aef72024b6cd800802e2e478dedb67a3c3832813 r496: no message --- diff --git a/doc/ctsim-concepts.tex b/doc/ctsim-concepts.tex index 368c5e5..135c835 100644 --- a/doc/ctsim-concepts.tex +++ b/doc/ctsim-concepts.tex @@ -104,29 +104,29 @@ the dimensions of the 'before' and 'after' images were being matched. The code has a Phantom object and a Scanner object. The geometry of the Scanner is defined in part by the properties of the Phantom. In fact, all dimensions are determined in terms of the phantom size, which is used -as the standard length scale. Remember, as mentioned above, the +as the standard length scale. Remember, as mentioned above, the phantom dimensions are also padded by 1\%. The maximum of the phantom length and height is used to define the square that completely surrounds the phantom. Let $p_l$ be the width (also height) of this square. The diameter of this boundary box, $p_d$ is then -\latexonly{\begin{equation}p_d = \sqrt{2} (p_l/2)\end{equation}} +\latexonly{$$p_d = \sqrt{2}(p_l)$$} \latexignore{sqrt(2) * $p_l$.} -This relationship can be seen in figure 1. +This relationship can be seen in figure 1 with the parallel geometry. \subsubsection{Focal Length \& Field of View} The two important variables is the focal-length-ratio $f_lr$. This is used along with $p_d$ to define the focal length according to -\latexonly{\begin{equation}f_l = f_lr p_d\end{equation}} -\latexignore{$f_l$ = $f_lr$ x $p_d$\\} +\latexonly{$$f_l = f_lr p_d$$} +\latexignore{\\$f_l$ = $f_lr$ x $p_d$\\} where we consider the case of a first generation parallel beam CT scanner. \subsubsection{Parallel Geometry}\label{geometryparallel}\index{Concepts,Scanner,Geometries,Parallel} \begin{figure} -\includegraphics[width=\textwidth]{ctsimfig1.eps} -\caption{Geometry used for a 1st generation, parallel beam CT scanner.} +\image{10cm;0cm}{ctsimfig1.eps} +\caption{Geometry used for a 1st generation, parallel beam CT scanner}\label{fistgenfig} \end{figure} In figure 1A, the excursion of the source and detector need only be $l_p$, @@ -159,47 +159,33 @@ 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. \begin{figure} -\includegraphics[width=\textwidth]{ctsimfig2.eps} +\image{10cm;0cm}{ctsimfig2.eps} \caption{Equilinear and equiangular geometries.} \end{figure} For these geometries, the following logic is executed: A variable dHalfSquare $d_{hs}$ is defined as -\latexonly{\begin{equation} -d_{hs} = (f_v)/(2\sqrt{2}) = (l_p/2) f_{vR} -\end{equation}} +\latexonly{$$d_{hs} = (f_v)/(2\sqrt{2}) = (l_p/2) f_{vR}$$} This is then subtracted from the focal length $f_l$ as calculated above, and -assigned to a new variable $\mathrm{dFocalPastPhm} = f_l - d_{hs}$. Since $f_l$ and +assigned to a new variable +\latexonly{$\mathrm{dFocalPastPhm} = f_l - d_{hs}$}. Since $f_l$ and $d_{hs}$ are derived from the phantom dimension and the input focal length and field of view ratios, one can write, -\latexonly{ -\begin{equation} -\mathrm{dFocalPastPhm} = f_l -d_{hs} - = \sqrt{2}(l_p/2) f_{lR} - (l_p/2) f_{vR} = l_p(\sqrt{2}f_{lR} - f_{vR}) -\end{equation} -} +\latexonly{$$\mathrm{dFocalPastPhm} = f_l -d_{hs} + = \sqrt{2}(l_p/2) f_{lR} - (l_p/2) f_{vR} = l_p(\sqrt{2}f_{lR} - f_{vR})$$} If this quantity is less than or equal to zero, then at least for some projections the source is inside the phantom. Perhaps a figure will help at this point. Consider first the case where $f_{vR} = f_{lR} =1 $, figure 3. The square in the figure bounds the phantom and has sides $l_p$. For this case then, -\latexonly{ -\[ -f_l=\sqrt{2}l_p/2 = l_p/\sqrt{2}, -\] -\[ -f_v = \sqrt{2}l_p, -\] +\latexonly{$$f_l=\sqrt{2}l_p/2 = l_p/\sqrt{2}$$, +$$f_v = \sqrt{2}l_p$$, and -\[ -d_{hs} = {l_p}/{2}. -\] +$$d_{hs} = {l_p}/{2}$$. Then -\[ -\mathrm{dFocalPastPhm} = ({l_p}/{2}) (\sqrt{2}-1) -\] +$$\mathrm{dFocalPastPhm} = ({l_p}/{2}) (\sqrt{2}-1)$$ } \begin{figure} -\includegraphics[height=0.5\textheight]{ctsimfig3.eps} +\image{5cm;0cm}{ctsimfig3.eps} \caption{Equilinear and equiangluar geometry when focal length ratio = field of view ratio = 1.} \end{figure} @@ -220,24 +206,15 @@ used to give a distance from the centre of the phantom to the source, and the detector array is adjusted to give an angular coverage to include the whole phantom. \begin{figure} -\includegraphics[width=\textwidth]{ctsimfig4.eps} +\image{10cm;0cm}{ctsimfig4.eps} \caption{Equilinear and equiangluar geometry when focal length ratio = 2 and the field of view ratio = 1.} \end{figure} -Now consider a focal length ratio of 4 (figure 5). As expected, the angle -$\alpha$ is smaller still. The dotted square is the bounding square of -the phantom rotated by 45 degrees, corresponding to the geometry of a -projection taken at that angle. Note that the fan beam now clips the top -and bottom corners of the bounding square. This illustrates that one may -still be clipping the phantom, despite \ctsim\'s best efforts. You have -been warned. \begin{figure} -\includegraphics[width=\textwidth]{ctsimfig5.eps} +\image{10cm;0cm}{ctsimfig5.eps} \caption{Equilinear and equiangluar geometry when focal length ratio = 4.} - \end{figure} - \section{Reconstruction}\label{conceptreconstruction}\index{Concepts,Reconstruction}% \subsection{Overview} \subsection{Filtered Backprojection} @@ -266,4 +243,5 @@ filters for this purpose. \subsubsection{Backprojection of filtered projections} Backprojection is the process of ``smearing'' the filtered projections over -the reconstructing image. \ No newline at end of file +the reconstructing image. + diff --git a/doc/ctsim-latex.bib b/doc/ctsim-latex.bib index 821b299..c81c309 100644 --- a/doc/ctsim-latex.bib +++ b/doc/ctsim-latex.bib @@ -27,7 +27,7 @@ author = {J.D. Foley and A. van Dam}, title = {Fundamentals of Interactive Computer Graphics}, publisher = {Addison-Wesley}, - year = {circa 1982} + year = {1982} } @article{SHEPP74, diff --git a/doc/ctsim-tex2rtf.bib b/doc/ctsim-tex2rtf.bib index 67efad8..6d005fc 100644 --- a/doc/ctsim-tex2rtf.bib +++ b/doc/ctsim-tex2rtf.bib @@ -24,7 +24,7 @@ author = {J.D. Foley and A. van Dam}, title = {Fundamentals of Interactive Computer Graphics}, publisher = {Addison-Wesley}, - year = {circa 1982} + year = {1982} } @article{SHEPP74, diff --git a/doc/ctsim.tex b/doc/ctsim.tex index 62922d7..f8d26c0 100644 --- a/doc/ctsim.tex +++ b/doc/ctsim.tex @@ -16,9 +16,12 @@ \newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}% \newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}% -\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}% +\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}} \newcommand{\indexit}[1]{#1\index{#1}}% \newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}% + +\latexignore{\newcommand{\sqrt}[2]{sqrt(#2)}}% + \parskip=10pt% \parindent=0pt% %\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only diff --git a/doc/sgp.doc b/doc/sgp.doc deleted file mode 100644 index f6f56d6..0000000 --- a/doc/sgp.doc +++ /dev/null @@ -1,183 +0,0 @@ - Simple Graphics Package (SGP) Documentation - ------------------------------------------- - - - Documentation and Software Written by Kevin Rosenberg - Copyright (c) 1984, Kevin Rosenberg - - - - - - OVERVIEW - -------- - - +------------------------+ - | World Coordinate level | - +-----------+------------+ - | - | - +------------+-------------+ - | Convert to Normalized | - | device coordinates (NDC) | - +------------+-------------+ - | - | - +------+-------+ +--------------+ - | Segmentation +-----------+ Disk Storage | - +------+-------+ +--------------+ - | - +------------+-------------+ - | Convert to Physical | - | device coordinates (PDC) | - +--------------------------+ - - -World Coordinate Level ----------------------- - initgrf2 () Initialize 2 dimensional graphics - termgrf2 () Terminate 2 dimensional graphics - window2 (xmin, ymin, xmax, ymax) Set window for world coord - viewprt2 (xmin, ymin, xmax, ymax) Viewport for window in NDC - moveabs2 (x, y) Move graphics cursor - moverel2 (dx, dy) - pntabs2 (x, y) Plot point at current position - pntrel2 (dx, dy) - lineabs2 (x, y) Draw line from current point to point - linerel2 (dx, dy) - markabs2 (x, y) Draw marker at current position - markrel2 (dx, dy) - polylnabs (x[], y[], n) Draw a set of lines - polylnrel (dx[]. dy[]. n) - wc_to_ndc (xwc, ywc, xndc, yndc) Convert from world coord to NDC - ndc_to_wc (xndc, yndc, xwc, ywc) Convert from NDC to world coord - drawtext (str) Draw text string at current positon - - INTERNAL: - calc_map () Calculate wc to ndc factors - clip(rectangle[4], x1, y1, x2, y2) Clip a line againt rectangle - - -Normalized Coordinate level --------------------------- - stylus (x, y, beam) Draw a line from current position - opendevice (device) Open a device for output - closedevice (device) Close a device for output - flushdevice (device) Put all pending data on device - inqdev (device, xmax, ymax) Return data on device - setcolor (color) Set current drawing color - setlinestyle (style) Set current line style - setlinewidth (width) Set current line width - settext (h, w, orientation, dir, font) Set text attributes - settextclr (foreground, background) If back=-1, then transparent backg - inqtext(h, w, o, dir, font, fore, back) Get current text attributes - charndc (c, xndc, yndc) Draw char at NDC position - textndc (str, xndc, yndc) Draw text string at NDC position - - setmarker (marker_type, color) Set marker attibutes - markndc (xndc, yndc) Draw marker at NDC position - - ndc_to_pdc (device, xndc, yndc, xpdc, ypdc) - savescrn (filename, xmin, ymin, xmax, ymax) - readscrn (filename) - -Physical Device Level ---------------------- - crtdot (x, y, c) - crtline (x1, y1, x2, y2, color, style) - wrtchar (char, x, y, dotfunc()) - wrttext (str, x, y, dotfunc()) - - readblock (array, xmin, ymin, xmax, ymax) - writeblock (array, xmin, ymin, mode) - - prtdot (x, y, c) - prtline (func, x1, y1, x2, y2, color, style) - - -Input Functions ---------------- -Physical device level - joystk (sticknum, x, y) - -Normalized Coordinate level - readloc (xndc, yndc) - inithcur (height, width, color) Initialize haircross cursor - movhcurabs (xndc, yndc) Move haircross cursor to point - movhcurrel (dxndc, dyndc) Move relatively - termhcur () Turn off haircross cursor - readpnt (xndc, yndc) Have cursor track joystick - User press button at desired point - - DATA STRUCTURES - --------------- -struct DEVICE { - int xsize, ysize; Size of device in pixels - int xmax, ymax; Maximum coordinates - int colormax; Maximum color number of device - int style; Current linestyle of device - int width; Current width of device - int color; Current color of device - int curx, cury; Current position - int charwidth, charheight; Size of characters in pixels - float aspt Aspect ratio Multiple coord - int (*dot)(); Dot function for device - int (*line)(); Line function for device - int mode; Device mode -}; - -struct CHARSPEC { - float width, height; size of characters in NDC - int dirflag, orientflag text direction, character orientation - int fore, back; foreground & background color -}; - -struct CURRENT { - int color; - int linestyle; - int linewidth; - float xndc, yndc; -} - - Map directly from world coords to physical device coords - -------------------------------------------------------- - -Window: xwmin, xwmax, ywmin, ywmax -Viewport: xvmin, xvmax, yvmin, yvmax -Physical: xpmax, ypmax - -To convert from wc to ndc: - xndc = xvmin + (xwc - xwmin) / (xwmax - xwmin) - yndc = yvmin + (ywc - ywmin) / (ywmax - ywmin) - -To convert from ndc to pdc: - xpdc = xndc * xpmax - ypdc = yndc * ypmax - -So, for each device set up the following composite transformation: - xpdc = xpmax * (xvmin + (xwc - xwmin) / (xwmax - xwmin)) - ypdc = ypmax * (yvmin + (ywc - ywmin) / (ywmax - ywmin)) - - xpdc = xpmax * xvmin + (xwc - xwmin) * (xpmax / (xwmax - xwmin)) - = xadd + (xwc - xsub) * xfact - -Characters ----------- - Fonts: - NORMAL Regular character set - BOLD Overstike chars with x offset by 1 pixel - ITALICS Shear characters along character height - - NORMAL BOLD ITALICS - X XX X - XXX XXXX XXX - X X XX XX X X - X X XX XX X X - XXXXX XXXXXX XXXXX - X X XX XX X X - X X XX XX X X - - - - - diff --git a/doc/tex2rtf.ini b/doc/tex2rtf.ini index 15548a6..c64b45c 100644 --- a/doc/tex2rtf.ini +++ b/doc/tex2rtf.ini @@ -6,5 +6,7 @@ combineSubSections = true runTwice = yes useUpButton = yes winHelpTitle = "CTSim Manual" +\mathrm [1]{} +\sqrt [1]{} diff --git a/doc/texhelp.sty b/doc/texhelp.sty index af91bd5..df04b58 100644 --- a/doc/texhelp.sty +++ b/doc/texhelp.sty @@ -88,8 +88,6 @@ % Class: puts in index \newcommand{\class}[1]{#1\index{#1}} -%\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}} - % Void type \newcommand{\void}{{\it void}} @@ -109,7 +107,7 @@ % % Type text with section reference -\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) } +\newcommand{\helpref}[2]{{\it #1} (section \ref{#2}) } % Type text with URL in verbatim mode \newcommand{\urlref}[2]{#1 (\verb$#2$)} @@ -282,17 +280,3 @@ \newcommand{\background}[1]{} \newcommand{\textcolour}[1]{} \newcommand{\overview}[2]{See \helpref{#1}{#2}.} -\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[] -#2% -\end{list}} -\newcommand{\wxheading}[1]{{\bf #1}} -\newcommand{\const}[0]{{\bf const}} -\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}} -\newcommand{\windowstyle}[1]{{\bf #1}\index{#1}} - -\addtolength{\textwidth}{1in} -\addtolength{\oddsidemargin}{-0.5in} -\addtolength{\topmargin}{-0.5in} -\addtolength{\textheight}{1in} -\sloppy -