r535: no message
[ctsim.git] / doc / ctsim-textui.tex
1 \chapter{The Command Line Interface}\label{ctsimtext}\index{ctsimtext}%
2 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
3 \ctsimfooter%
4
5 \ctsimtext\ is a master shell for all of the command-line utilities.
6
7 \usage \ctsimtext\ can be invoked via three different
8 methods.
9 \begin{enumerate}\itemsep=3pt
10 \item \ctsimtext\ can executed without any parameters. In that case,
11 \ctsimtext\ offers a command-line to enter the function-names and
12 their parameters. The output of the command is displayed. Further
13 commands may be given to \ctsimtext. The shell is exited by the
14 \texttt{quit} command.
15
16 \item \ctsimtext\ can also be called to
17 execute a single command. This is especially useful for batch
18 files containing multiple \ctsimtext\ commands. This is invoked by
19 calling\\ \texttt{ctsimtext function-name parameters...}.
20
21 \item Using operating systems that support soft or hard linking of
22 files (such as UNIX and Linux), the executable file \ctsimtext\ can
23 be linked to the function names. This is automatically done by
24 the installation file for Linux. Thus, to use \ctsimtext\ with the
25 function name \texttt{pjrec}, the below command can be executed:\\
26 \texttt{pjrec parameters...} \\
27 as a shortcut rather than the equivalent command \\
28 \texttt{ctsimtext pjrec parameters...}
29
30 \end{enumerate}
31
32 \section{Parallel Processing With a Computer Cluster}
33 \ctsimtext\ can be used to spread it's processing over a cluster. Specifically,
34 \ctsimtext\ supports the \urlref{LAM}{http://www.mpi.nd.edu/lam} version of
35 the MPI environment. On platforms with LAM installed, a parallel version of
36 \ctsimtext\ is created. The name of this program is \texttt{ctsimtext-lam}.
37 The functions that take advantage of the parallel processing are
38 \texttt{phm2if}, \texttt{phm2pj}, \texttt{pjrec}.
39
40 This parallel processing version has been tested with excellent results on
41 a 16-CPU \urlref{Beowulf}{http://www.beowulf.org} cluster.
42
43
44 \section{if1}\label{if1}\index{ctsimtext,if1}%
45 Performs math functions on a single image.
46
47 \usage
48 \begin{itemize}\itemsep=0pt
49   \item \doublehyphen{invert}
50   \item \doublehyphen{log}
51   \item \doublehyphen{exp}
52   \item \doublehyphen{sqr}
53   \item \doublehyphen{sqrt}
54 \end{itemize}
55
56 \section{if2}\label{if2}\index{ctsimtext,if2}%
57 Performs math functions on a two images.
58
59 \usage
60 \begin{itemize}\itemsep=0pt
61   \item \doublehyphen{add}
62   \item \doublehyphen{sub}
63   \item \doublehyphen{mul}
64   \item \doublehyphen{comp}
65   \item \doublehyphen{column-plot}
66   \item \doublehyphen{row-plot}
67 \end{itemize}
68
69 \section{ifexport}\label{ifexport}\index{ctsimtext,ifexport}%
70 Export an image file to a standard graphics file.
71
72 \usage
73 \begin{itemize}\itemsep=0pt
74   \item \doublehyphen{format}
75   \begin{itemize}\itemsep=0pt
76     \item \texttt{gm}
77     \item \texttt{pgmasc}
78     \item \texttt{png}
79     \item \texttt{png16}
80   \end{itemize}
81   \item \doublehyphen{center}
82   \begin{itemize}\itemsep=0pt
83     \item \texttt{median}
84     \item \texttt{mode}
85     \item \texttt{mean}
86   \end{itemize}
87   \item \doublehyphen{auto}
88   \begin{itemize}\itemsep=0pt
89      \item \texttt{full}
90      \item \texttt{std0.1}
91      \item \texttt{std0.5}
92      \item \texttt{std1}
93      \item \texttt{std2}
94      \item \texttt{std3}
95   \end{itemize}
96   \item \doublehyphen{scale}
97   \item \doublehyphen{min}
98   \item \doublehyphen{max}
99 \end{itemize}
100
101 \section{ifinfo}\label{ifinfo}\index{ctsimtext,ifinfo}%
102
103 Displays information about an imagefile.
104
105 \usage
106 \begin{itemize}\itemsep=0pt
107   \item \doublehyphen{labels}
108   \item \doublehyphen{no-labels}
109   \item \doublehyphen{stats}
110   \item \doublehyphen{no-stats}
111   \item \doublehyphen{help}
112 \end{itemize}
113
114 \section{phm2pj}\label{phm2pj}\index{ctsimtext,phm2pj}%
115 Simulates collection of X-rays data (projections) around a phantom object.
116
117 \usage
118 \texttt{phm2pj projection-file-name number-of-detectors number-of-views [options...]}
119
120 \begin{twocollist}
121 \twocolitem{\doublehyphen{phantom}}{Select a standard phantom.
122 \begin{itemize}\itemsep=0pt
123 \item \texttt{herman}
124 \item \texttt{shepp-logan}
125 \item \texttt{unit-pulse}
126 \end{itemize}
127 }
128 \twocolitem{\doublehyphen{phmfile}}{Load a phantom definition definition}
129
130 \twocolitem{\doublehyphen{geometry}}{
131   \begin{itemize}\itemsep=0pt
132     \item \texttt{parallel}
133     \item \texttt{equiangular}
134     \item \texttt{equilinear}
135   \end{itemize}
136 }
137
138 \twocolitem{\doublehyphen{nray}}{ Number of samples per each detector}
139
140 \twocolitem{\doublehyphen{rotangle}}{Sets the rotation amount as a multiple of pi.
141 For parallel geometries use a rotation angle of \texttt{1} and for equilinear and equiangular
142 geometries use a rotation angle of \texttt{2}. The default is to use to
143 appropriate rotation angle based on the geometry.}
144
145 \twocolitem{\doublehyphen{view-ratio}}{Sets the field of view as a ratio of the diameter of the phantom.
146     For normal scanning, a default value of \texttt{1.0} is optimal.}
147
148 \twocolitem{\doublehyphen{scan-ratio}}{Sets the length of scanning as a ratio of the view diameter.
149     For normal scanning, a value of \texttt{1.0} is optimal.}
150
151 \twocolitem{\doublehyphen{focal-length}}{Sets the distance of the radiation source and detectors from the center of the object as a ratio of the radius of the object.
152     For parallel geometries, a value of \texttt{1.0} is optimal. For other
153     geometries, this should be at least \texttt{2.0} to avoid artifacts.}
154 \end{twocollist}
155
156
157 \section{phm2if}\label{phm2if}\index{ctsimtext,phm2if}%
158 Converts a geometric phantom object into an imagefile. The size of the
159 imagefile in pixels must be specified as well as the number of samples
160 to average per pixel.
161
162 \usage
163 \begin{twocollist}
164   \twocolitem{\doublehyphen{nsamples}}{Number of samples in x \& y directions per pixel}
165   \twocolitem{\doublehyphen{view-ratio}}{Sets the view ration. For normal scanning,
166   the default value of \texttt{1.0} is optimal.}
167 \end{twocollist}
168
169 \section{pj2if}\label{pj2if}\index{ctsimtext,pj2if}%
170 Convert a projection file into an imagefile.
171
172 \usage
173 \texttt{pj2if projection-file-name image-file-name x-size ysize [options...]}
174
175 \begin{twocollist}
176 \twocolitem{\doublehyphen{help}}{Print brief online help}
177 \end{twocollist}
178
179 \section{pjinfo}\label{pjinfo}\index{ctsimtext,pjinfo}%
180 Displays information about a projection file.
181
182 \usage
183 \begin{itemize}\itemsep=0pt
184   \item \doublehyphen{binaryheader}
185   \item \doublehyphen{binaryview}
186   \item \doublehyphen{startview}
187   \item \doublehyphen{endview}
188   \item \doublehyphen{dump}
189 \end{itemize}
190
191 \section{pjrec}\label{pjrec}\index{ctsimtext,pjrec}%
192 Reconstructs the interior of an object from a projection file.
193
194 \begin{twocollist}
195 \twocolitemruled{\textbf{Parameter}}{\textbf{Options}}
196 \twocolitem{\doublehyphen{filter}}{Selects which filter to apply to
197 each projection. To properly reconstruct an image, this filter
198 should be multiplied by the absolute value of distance from zero
199 frequency.
200 \begin{itemize}\itemsep=0pt
201 \item \texttt{abs\_bandlimit}
202 \item \texttt{abs\_cosine}
203 \item \texttt{abs\_hamming}
204 \end{itemize}
205 } \twocolitem{\doublehyphen{filter-parameter}}{Sets the alpha level
206 for Hamming window. At setting of \texttt{0.54}, this equals
207 the Hanning window.}
208
209 \twocolitem{\doublehyphen{filter-method}}{Selects the filtering
210 method. For large numbers of detectors, \texttt{rfftw} is optimal.
211 For smaller numbers of detectors, \texttt{convolution} might be a
212 bit faster.
213 \begin{itemize}\itemsep=0pt
214 \item \texttt{convolution}
215 \item \texttt{fourier}
216 \item \texttt{fourier-table}
217 \item \texttt{fftw}
218 \item \texttt{rfftw}
219 \item fftw
220 \item rfftw
221 \end{itemize}
222 }
223
224 \twocolitem{\doublehyphen{filter-generation}}{Selects the filter
225 generation. With convolution, \texttt{direct} is the proper method
226 to select. With any of the frequency methods,
227 \texttt{inverse-fourier} is the best method.
228 \begin{itemize}\itemsep=0pt
229 \item direct
230 \item inverse-fourier
231 \end{itemize}
232 }
233
234 \twocolitem{\doublehyphen{interpolation}}{Interpolation technique.
235 \texttt{linear} is optimal.
236 \begin{itemize}\itemsep=0pt
237 \item nearest
238 \item linear
239 \item cubic
240 \end{itemize}
241 }
242
243 \twocolitem{\doublehyphen{backprojection}}{Selects the
244 backprojection technique. A setting of \texttt{idiff} is optimal.
245 \begin{itemize}\itemsep=0pt
246 \item trig
247 \item table
248 \item diff
249 \item idiff
250 \end{itemize}
251 }
252
253 \twocolitem{\doublehyphen{zeropad}}{Zeropad factor. A setting of
254 \texttt{1} is optimal.}
255
256 \end{twocollist}