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