r418: no message
[ctsim.git] / doc / tex2rtf / ctsim.tex
1 \documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
2 %\input{psbox.tex}
3 \usepackage{times}
4 \usepackage{hyperref}
5
6 \newcommand{\ctsim}{{\tt CTSim}}
7 \newcommand{\ctsimtext}{{\tt CTSimText}}
8 \newcommand{\usage}{{\bf Usage}{\par}}
9
10 \newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
11 \newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
12 \newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
13 \newcommand{\indexit}[1]{#1\index{#1}}%
14 \newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}%
15 \parskip=10pt%
16 \parindent=0pt%
17 %\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only
18 \winhelpignore{\title{Manual for CTSim 3.0}%
19 \author{Kevin Rosenberg, M.D.}%
20 \date{January 2001}%
21 }%
22 \winhelponly{\title{Manual for CTSim 3.0}%
23 \author{by Kevin Rosenberg, M.D.\\$$\image{3cm;3cm}{logo-huge.bmp}$$}%
24 }%
25 \makeindex%
26 \begin{document}%
27 \maketitle%
28 \pagestyle{fancyplain}%
29 \bibliographystyle{plain}%
30 \pagenumbering{roman}%
31
32 \setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
33 \setfooter{\thepage}{}{}{}{}{\thepage}%
34 \tableofcontents%
35
36 \chapter*{Copyright notice}%
37 \setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}%
38 \setfooter{\thepage}{}{}{}{}{\thepage}%
39
40 Copyright (c) 1983-2001 Kevin Rosenberg, M.D.
41
42 Permission to use, copy, modify, and distribute this software and its
43 documentation for any purpose is hereby granted without fee, provided that the
44 above copyright notice, author statement and this permission notice appear in
45 all copies of this software and related documentation.
46
47 THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
48 IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
49 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
50
51 IN NO EVENT SHALL KEVIN ROSENBERG BE LIABLE FOR ANY
52 SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR
53 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
54 WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
55 OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
56 PERFORMANCE OF THIS SOFTWARE.
57
58 \chapter{Introduction}\label{introduction}%
59 \pagenumbering{arabic}%
60 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
61 \setfooter{\thepage}{}{}{}{}{\thepage}%
62
63 \winhelponly{$$\image{3cm;3cm}{logo-huge}$$}%
64
65 Computed Tomography is a technique for estimating the interior of an object 
66 from measurement of radiation collected around the object. This radiation 
67 can be either projected through or emitted from the object.
68 \rtfsp\ctsim\ simulates the process of projecting X-rays through a phantom object.
69 \rtfsp\ctsim\ can then reconstruct the interior of the object from the projections
70 collected around the phantom object.
71
72 The \ctsim\ package has two executable files: the graphical \helprefn{ctsim}{ctsim} and text \helprefn{ctsimtext}{ctsimtext} programs.
73
74 \chapter{Installation}\index{Installation}%
75 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
76 \setfooter{\thepage}{}{}{}{}{\thepage}%
77
78 \section{Download}\label{download}\index{Installation,Download}%
79
80 The latest version of CTSim, plus source code, can be accessed from:
81
82 \begin{verbatim}
83 http://www.ctsim.org
84 ftp://ftp.ctsim.org
85 \end{verbatim}
86
87 It is available in Windows 95/NT/2000 and Linux GUI versions and non-GUI versions.
88
89 \section{Installing Linux RPM}\index{Installation,Linux}%
90
91 \section{Installing Windows Binary}\index{Installation,Windows}%
92
93 \section{Build From Sources}\label{build}\index{Installation,Build}%
94
95 See the INSTALL file included in the source distribution for instructions.
96
97 \section{Requirements}\label{installreq}\index{Installation,Requirements}%
98   \begin{itemize}\itemsep=0pt
99   \item zlib Library (optional)
100         \par Used for PNG file export.
101
102   \item libpng Library (optional)
103         \par Used for PNG file export.
104         \par www.libpng.org
105
106   \item FFTW library (optional)
107         \par Used for frequency-based filtering and fourier transformations of images.
108         \par www.fftw.org
109
110   \item readline library (optional)
111         /par Used for {/ctsimtext} interactive shell.
112
113   \item dmalloc library (optional)
114         \par Used for debugging memory allocation
115         \par www.dmalloc.com
116
117   \item wxWindows library (optional) 
118   \par Used for platform-independent graphical interface. The graphical-shell
119   program \ctsim\ requires this library.  
120   \par www.wxwindows.org
121
122 \end{itemize}
123
124 \chapter{ctsim - the Graphical User Interface}\label{ctsim}\index{ctsim}% 
125 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
126 \setfooter{\thepage}{}{}{}{}{\thepage}%
127
128 \ctsim\ is the graphical shell for the CTSim project. It is
129 written using the wxLibrary for cross-platform compatibility with GTK,
130 Motif, and Microsoft Windows. It includes all of the functionality of
131 the command-line tool {\tt ctsimtext} as well as image processing and visualization features.
132
133 \ctsim\ can open projection files, image files, phantom definition files, and plotfiles.
134
135 \usage
136 ctsim [OPTIONS] [files to open...]
137
138 \chapter{ctsimtext}\label{ctsimtext}\index{ctsimtext}%
139 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
140 \setfooter{\thepage}{}{}{}{}{\thepage}%
141
142 \ctsimtext\ is a master shell for all of the command-line utilities. 
143
144 \usage
145 \ctsimtext\ can be executed without any parameters. In that case, \ctsimtext
146 offers a command-line to enter the function-names and their parameters. The output of the command is displayed. Further commands may be given to \ctsimtext. The shell is exited by the {\tt quit} command.
147
148 \ctsimtext\ can also be called to execute a single command. This is especially useful for batch files containing multiple \ctsimtext\ commands. This is invoked by calling {\tt ctsimtext function-name parameters...}.
149
150 The following function names are available:
151
152 \helprefn{if1}{if1}\par
153 \helprefn{if2}{if2}\par
154 \helprefn{ifexport}{ifexport}\par
155 \helprefn{ifinfo}{ifinfo}\par
156 \helprefn{phm2if}{phm2if}\par
157 \helprefn{phm2pj}{phm2pj}\par
158 \helprefn{pj2if}{pj2if}\par
159 \helprefn{pjinfo}{pjinfo}\par
160 \helprefn{pjrej}{pjrec}\par
161
162 \subsection{if1}\label{if1}\index{ctsimtext,if1}%
163 Perfoms math functions on a single image.
164
165 \usage
166 \begin{itemize}\itemsep=0pt
167   \item --invert
168   \item --log
169   \item --exp
170   \item --sqr
171   \item --sqrt
172 \end{itemize}
173
174 \subsection{if2}\label{if2}\index{ctsimtext,if2}%
175 Perfoms math functions on a two images.
176
177 \usage
178 \begin{itemize}\itemsep=0pt
179   \item --add
180   \item --sub
181   \item --mul
182   \item --comp
183   \item --column-plot
184   \item --row-plot
185 \end{itemize}
186
187 \subsection{ifexport}\label{ifexport}\index{ctsimtext,ifexport}%
188 Export an imagefile to a standard graphics file.
189
190 \usage
191 \begin{itemize}\itemsep=0pt
192   \item --format
193   \begin{itemize}\itemsep=0pt
194     \item --pgm
195     \item --pgmasc
196     \item --png
197     \item --png16
198   \end{itemize}
199   \item --center
200   \begin{itemize}\itemsep=0pt
201     \item median
202     \item mode
203     \item mean
204   \end{itemize}
205   \item --auto
206   \begin{itemize}\itemsep=0pt
207      \item --full
208      \item --std0.1
209      \item --std0.5
210      \item --std1
211      \item --std2
212      \item --std3
213   \end{itemize}
214   \item --scale
215   \item --min
216   \item --max
217 \end{itemize}
218
219 \subsection{ifinfo}\label{ifinfo}\index{ctsimtext,ifinfo}%
220
221 Displays information about an imagefile.
222
223 \usage
224 \begin{itemize}\itemsep=0pt
225   \item --labels
226   \item --no-labels
227   \item --stats
228   \item --no-stats
229   \item --help
230 \end{itemize}
231
232 \subsection{phm2pj}\label{phm2pj}\index{ctsimtext,phm2pj}%
233 Simulates collection of X-rays data (projections) around a phantom object.
234
235 \usage
236 phm2pj projection-file-name number-of-detectors number-of-views [options...]
237 \begin{itemize}\itemsep=0pt
238   \item --phantom
239   Select a standard phantom 
240   \begin{itemize}\itemsep=0pt
241     \item herman
242     \item herman-b
243     \item shepp-logan
244     \item shepp-logan-b
245   \end{itemize}
246
247   \item --phmfile
248   Load a phantom definition definition
249
250   \item --geometry
251   \begin{itemize}\itemsep=0pt
252     \item parallel
253     \item equiangular
254     \item equilinear
255   \end{itemize}
256
257   \item --nray
258     Number of samples per each detector
259
260   \item --rotangle
261     Sets the rotation amount as a multiple of pi. For parallel geometries use
262 a rotation angle of 1 and for equilinear and equiangular geometries use a rotation angle of 2.
263
264   \item --field-of-view
265     Sets the field of view as a ratio of the diameter of the phantom. For parallel geometries, using a value of 1.0 is fine. For other geometies, this should be at least 1.3 to avoid artifacts.
266
267   \item --focal-length
268     Sets the distance of the radiation source and detectors from the center of the object as a ratio of the radius of the object. For parallel geometries, a value of 1.0 is fine. For other geometries, this should be at least 2.0 to avoid artifacts.
269 \end{itemize}
270
271 The Herman phantom is taken with permission from Gabor Hermans 1980 book\cite{HERMAN80}. The Shepp-Logan phantom was published in 1974\cite{SHEPP74}.
272
273 \subsection{phm2if}\label{phm2if}\index{ctsimtext,phm2if}%
274 Converts a geometric phantom object into an imagefile. The size of the
275 imagefile in pixels must be specified as well as the number of samples
276 to average per pixel.
277
278 \usage
279 \begin{itemize}\itemsep=0pt
280   \item --nsamples
281 \end{itemize}
282
283 \subsection{pj2if}\label{pj2if}\index{ctsimtext,pj2if}%
284 Convert a projection file into an imagefile.
285
286 \usage
287 \begin{itemize}\itemsep=0pt
288 \end{itemize}
289
290 \subsection{pjinfo}\label{pjinfo}\index{ctsimtext,pjinfo}%
291 Displays information about a projection file.
292
293 \usage
294 \begin{itemize}\itemsep=0pt
295   \item --binaryheader
296   \item --binaryview
297   \item --startview
298   \item --endview
299   \item --dump
300 \end{itemize}
301
302 \subsection{pjrec}\label{pjrec}\index{ctsimtext,pjrec}%
303 Reconstructs the interior of an object from a projection file.
304
305 \usage
306 \begin{itemize}\itemsep=0pt
307   \item Filter \par
308   Selects which filter to apply to each projection. To
309   properly reconstruct an image, this filter should be multiplied 
310   by the absolute value of distance from zero frequency.
311   \begin{itemize}\itemsep=0pt
312     \item abs_bandlimit
313     \item abs_cosine
314     \item abs_hamming
315   \end{itemize}
316
317   \item Filter Parameter \par
318   Sets the alpha level for Hamming
319   window. At setting of 0.54, this equals the Hanning window.
320
321   \item Filter Method
322     \begin{itemize}\itemsep=0pt
323       \item convolution
324       \item fourier
325       \item fourier_table
326       \item fftw
327       \item rfftw
328     \end{itemize}
329
330   \item Filter Generation
331     \begin{itemize}\itemsep=0pt
332       \item direct
333       \item inverse_fourier
334     \end{itemize}
335
336   \item Interpolation
337     \begin{itemize}\itemsep=0pt
338       \item nearest
339       \item linear
340     \end{itemize}
341      
342   \item Backprojection
343     \begin{itemize}\itemsep=0pt
344       \item trig
345       \item table
346       \item diff
347       \item diff2
348       \item idiff2
349       \item idiff3
350     \end{itemize}
351
352   \item Zeropad
353   \item Preinterpolation Factor
354 \end{itemize}
355
356 \chapter{The Web Browser CGI Interface}\label{webinterface}\index{Web Interface}%
357 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
358 \setfooter{\thepage}{}{}{}{}{\thepage}%
359
360 \section{Overview}\index{Web Interface,Overview}%
361 The CGI program {\tt ctsim.cgi} takes projections of a standard
362 phantom object, performs reconstruction, and then compares the
363 rasterized phantom object with the reconstruction. The comparison is
364 performed both visually by an image subtraction as well as by standard
365 statistics as described by Herman\cite{HERMAN80}.
366
367 \section{Requirements}\index{Web Interface,Requirements}%
368 \begin{itemize}\itemsep=0pt
369    \begin{itemize}\itemsep=0pt
370       \item Apache or other CGI compatible web server
371
372       \item Perl (version 4.0 or higher)
373
374       \item A client web browser than can display PNG files. Most
375       current web browsers support PNG.
376   \end{itemize}
377
378 \newpage
379
380 \bibliographystyle{plain}
381 \bibliography{ctsim}
382 \addcontentsline{toc}{chapter}{Bibliography}
383 \setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
384 \setfooter{\thepage}{}{}{}{}{\thepage}%
385
386 \addcontentsline{toc}{chapter}{Index}
387 \setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
388 \setfooter{\thepage}{}{}{}{}{\thepage}%
389 \printindex%
390
391 \end{document}%
392