r426: Updated online help, html help now working
[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 \htmlonly{$$\image{3cm;3cm}{logo-huge.gif}$$}%
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{Web 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 \end{itemize}
122
123 \chapter{ctsim - the Graphical User Interface}\label{ctsim}\index{ctsim}% 
124 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
125 \setfooter{\thepage}{}{}{}{}{\thepage}%
126
127 \ctsim is the graphical shell for the CTSim project. It is
128 written using the wxLibrary for cross-platform compatibility with GTK,
129 Motif, and Microsoft Windows. It includes all of the functionality of
130 the command-line tool {\tt ctsimtext} as well as image processing and visualization features.
131
132 \ctsim can open projection files, image files, phantom definition files, and plotfiles.
133
134 \usage
135 ctsim [OPTIONS] [files to open...]
136
137 \chapter{ctsimtext}\label{ctsimtext}\index{ctsimtext}%
138 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
139 \setfooter{\thepage}{}{}{}{}{\thepage}%
140
141 \ctsimtext is a master shell for all of the command-line utilities. 
142
143 \usage
144 \ctsimtext can be executed without any parameters. In that case, \ctsimtext
145 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.
146
147 \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 \par
148 {\tt ctsimtext function-name parameters...}.
149
150 The available functions are:
151
152 \section{if1}\label{if1}\index{ctsimtext,if1}%
153 Perfoms math functions on a single image.
154
155 \usage
156 \begin{itemize}\itemsep=0pt
157   \item --invert
158   \item --log
159   \item --exp
160   \item --sqr
161   \item --sqrt
162 \end{itemize}
163
164 \section{if2}\label{if2}\index{ctsimtext,if2}%
165 Perfoms math functions on a two images.
166
167 \usage
168 \begin{itemize}\itemsep=0pt
169   \item --add
170   \item --sub
171   \item --mul
172   \item --comp
173   \item --column-plot
174   \item --row-plot
175 \end{itemize}
176
177 \section{ifexport}\label{ifexport}\index{ctsimtext,ifexport}%
178 Export an imagefile to a standard graphics file.
179
180 \usage
181 \begin{itemize}\itemsep=0pt
182   \item --format
183   \begin{itemize}\itemsep=0pt
184     \item --pgm
185     \item --pgmasc
186     \item --png
187     \item --png16
188   \end{itemize}
189   \item --center
190   \begin{itemize}\itemsep=0pt
191     \item median
192     \item mode
193     \item mean
194   \end{itemize}
195   \item --auto
196   \begin{itemize}\itemsep=0pt
197      \item --full
198      \item --std0.1
199      \item --std0.5
200      \item --std1
201      \item --std2
202      \item --std3
203   \end{itemize}
204   \item --scale
205   \item --min
206   \item --max
207 \end{itemize}
208
209 \section{ifinfo}\label{ifinfo}\index{ctsimtext,ifinfo}%
210
211 Displays information about an imagefile.
212
213 \usage
214 \begin{itemize}\itemsep=0pt
215   \item --labels
216   \item --no-labels
217   \item --stats
218   \item --no-stats
219   \item --help
220 \end{itemize}
221
222 \section{phm2pj}\label{phm2pj}\index{ctsimtext,phm2pj}%
223 Simulates collection of X-rays data (projections) around a phantom object.
224
225 \usage
226 phm2pj projection-file-name number-of-detectors number-of-views [options...]
227 \begin{itemize}\itemsep=0pt
228   \item --phantom
229   Select a standard phantom 
230   \begin{itemize}\itemsep=0pt
231     \item herman
232     \item herman-b
233     \item shepp-logan
234     \item shepp-logan-b
235   \end{itemize}
236
237   \item --phmfile
238   Load a phantom definition definition
239
240   \item --geometry
241   \begin{itemize}\itemsep=0pt
242     \item parallel
243     \item equiangular
244     \item equilinear
245   \end{itemize}
246
247   \item --nray
248     Number of samples per each detector
249
250   \item --rotangle
251     Sets the rotation amount as a multiple of pi. For parallel geometries use
252 a rotation angle of 1 and for equilinear and equiangular geometries use a rotation angle of 2.
253
254   \item --field-of-view
255     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.
256
257   \item --focal-length
258     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.
259 \end{itemize}
260
261 The Herman phantom is taken with permission from Gabor Hermans 1980 book\cite{HERMAN80}. The Shepp-Logan phantom was published in 1974\cite{SHEPP74}.
262
263 \section{phm2if}\label{phm2if}\index{ctsimtext,phm2if}%
264 Converts a geometric phantom object into an imagefile. The size of the
265 imagefile in pixels must be specified as well as the number of samples
266 to average per pixel.
267
268 \usage
269 \begin{itemize}\itemsep=0pt
270   \item --nsamples
271 \end{itemize}
272
273 \section{pj2if}\label{pj2if}\index{ctsimtext,pj2if}%
274 Convert a projection file into an imagefile.
275
276 \usage
277 \begin{itemize}\itemsep=0pt
278 \end{itemize}
279
280 \section{pjinfo}\label{pjinfo}\index{ctsimtext,pjinfo}%
281 Displays information about a projection file.
282
283 \usage
284 \begin{itemize}\itemsep=0pt
285   \item --binaryheader
286   \item --binaryview
287   \item --startview
288   \item --endview
289   \item --dump
290 \end{itemize}
291
292 \section{pjrec}\label{pjrec}\index{ctsimtext,pjrec}%
293 Reconstructs the interior of an object from a projection file.
294
295 \usage
296 \begin{twocollist}
297 \twocolitemruled{{\bf Parameter}}{{\bf Options}}
298 \twocolitem{{\bf --filter}}{Selects which filter to apply to each projection. To properly reconstruct an image, this filter should be multiplied 
299 by the absolute value of distance from zero frequency.
300   \begin{itemize}\itemsep=0pt
301     \item abs_bandlimit
302     \item abs_cosine
303     \item abs_hamming
304   \end{itemize}}
305   \twocolitem{{\bf --filter-parameter}}{Sets the alpha level for Hamming
306   window. At setting of 0.54, this equals the Hanning window.}
307   \twocolitem{{\bf --filter-method}}{Selects the filtering method. For large numbers of detectors, {\tt rfftw} is optimal. For smaller numbers of detectors, {\tt convolution} might be a bit faster. 
308 \begin{itemize}\itemsep=0pt
309 \item convolution
310       \item fourier
311       \item fourier_table
312       \item fftw
313       \item rfftw
314 \end{itemize}}
315   \twocolitem{{\bf --filter-generation}}{Selects the filter generation. With convolution, {\tt direct} is the proper method to select. With any of the frequency methods, {\tt inverse-fourier} is the best method.
316 \begin{itemize}\itemsep=0pt
317 \item direct
318       \item inverse-fourier
319 \end{itemize}
320 }
321   \twocolitem{{\bf --interpolation}}{Interpolation technique. {\tt linear} is optimal.
322 \begin{itemize}\itemsep=0pt
323 \item nearest
324 \item linear
325 \end{itemize}
326 }    
327   \twocolitem{{\bf -backprojection}}{Selects the backprojection technique. A setting of {\tt idiff3} is optimal.
328 \begin{itemize}\itemsep=0pt
329 \item trig
330 \item table
331 \item diff
332 \item diff2
333 \item idiff2
334 \item idiff3
335 \end{itemize}
336 }
337 \twocolitem{{\bf --zeropad}}{ Zeropad factor. A setting of {\tt 1} is optimal.}
338
339   \twocolitem{{\bf --preinterpolate}}{Selects preinterpolation interpolation technique and sets the preinterpolation factor. Currently, this is experimental and does not work well.}
340 \end{twocollist}
341
342 \chapter{The Web Browser CGI Interface}\label{webinterface}\index{Web Interface}%
343 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
344 \setfooter{\thepage}{}{}{}{}{\thepage}%
345
346 \section{Overview}\index{Web Interface,Overview}%
347 The CGI program {\tt ctsim.cgi} takes projections of a standard
348 phantom object, performs reconstruction, and then compares the
349 rasterized phantom object with the reconstruction. The comparison is
350 performed both visually by an image subtraction as well as by standard
351 statistics as described by Herman\cite{HERMAN80}.
352
353 \section{Requirements}\index{Web Interface,Requirements}%
354    \begin{itemize}\itemsep=0pt
355       \item Apache or other CGI compatible web server
356
357       \item Perl (version 4.0 or higher)
358
359       \item A client web browser than can display PNG files. Most
360       current web browsers support PNG.
361   \end{itemize}
362
363 \newpage
364
365 \bibliographystyle{plain}
366 \bibliography{ctsim}
367 \addcontentsline{toc}{chapter}{Bibliography}
368 \setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
369 \setfooter{\thepage}{}{}{}{}{\thepage}%
370
371 \addcontentsline{toc}{chapter}{Index}
372 \setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
373 \setfooter{\thepage}{}{}{}{}{\thepage}%
374 \printindex%
375
376 \end{document}%
377