1 \chapter{The Command Line Interface}\label{ctsimtext}\index{ctsimtext}%
2 \setheader{{\it CHAPTER \thechapter}}{}{}{\ctsimheadtitle}{}{{\it CHAPTER \thechapter}}%
5 \ctsimtext\ is a master shell for all of the command-line utilities. The
6 command-line utilities can perform most of the functions of the graphical
7 shell. These command-line utilities are especially appropriate for use on
8 systems without graphics, batch files, and parallel processing in a Beowulf
11 \usage \ctsimtext\ can be invoked via three different
13 \begin{enumerate}\itemsep=3pt
14 \item \ctsimtext\ can executed without any parameters. In that case,
15 \ctsimtext\ offers a command-line to enter the function-names and
16 their parameters. The output of the command is displayed. Further
17 commands may be given to \ctsimtext. The shell is exited by the
18 \texttt{quit} command. \ctsimtext\ uses the
19 \urlref{readline}{http://www.gnu.org} library on UNIX and Linux platforms
20 to provide for command history processing.
22 \item \ctsimtext\ can also be called to
23 execute a single command. This is especially useful for batch
24 files containing multiple \ctsimtext\ commands. This is invoked by
25 calling\\ \texttt{ctsimtext function-name parameters...}.
27 \item Using operating systems that support soft or hard linking of
28 files (such as UNIX and Linux), the executable file \ctsimtext\ can
29 be linked to the function names. This is automatically done by
30 the installation file for Linux. Thus, to use \ctsimtext\ with the
31 function name \texttt{pjrec}, the below command can be executed:\\
32 \texttt{pjrec parameters...} \\
33 as a shortcut rather than the equivalent command \\
34 \texttt{ctsimtext pjrec parameters...}
38 \section{Parallel Processing}
39 \ctsimtext\ can be used to spread it's processing over a cluster. Specifically,
40 \ctsimtext\ supports the \urlref{LAM}{http://www.mpi.nd.edu/lam} version of
41 the MPI environment. On platforms with LAM installed, a parallel version of
42 \ctsimtext\ is created. The name of this program is \texttt{ctsimtext-lam}.
43 The functions that take advantage of the parallel processing are
44 \texttt{phm2if}, \texttt{phm2pj}, \texttt{pjrec}.
46 This parallel processing version has been tested with excellent results on
47 a 16-CPU \urlref{Beowulf}{http://www.beowulf.org} cluster.
50 \section{if1}\label{if1}\index{if1}%
51 Performs math functions on a single image.
54 \begin{itemize}\itemsep=0pt
55 \item \doublehyphen{invert}
56 \item \doublehyphen{log}
57 \item \doublehyphen{exp}
58 \item \doublehyphen{sqr}
59 \item \doublehyphen{sqrt}
62 \section{if2}\label{if2}\index{if2}%
63 Performs math functions on a two images.
66 \begin{itemize}\itemsep=0pt
67 \item \doublehyphen{add}
68 \item \doublehyphen{sub}
69 \item \doublehyphen{mul}
70 \item \doublehyphen{comp}
71 \item \doublehyphen{column-plot}
72 \item \doublehyphen{row-plot}
75 \section{ifexport}\label{ifexport}\index{ifexport}%
76 Export an image file to a standard graphics file.
79 \begin{itemize}\itemsep=0pt
80 \item \doublehyphen{format}
81 \begin{itemize}\itemsep=0pt
87 \item \doublehyphen{center}
88 \begin{itemize}\itemsep=0pt
93 \item \doublehyphen{auto}
94 \begin{itemize}\itemsep=0pt
102 \item \doublehyphen{scale}
103 \item \doublehyphen{min}
104 \item \doublehyphen{max}
107 \section{ifinfo}\label{ifinfo}\index{ifinfo}%
109 Displays information about an imagefile.
112 \begin{itemize}\itemsep=0pt
113 \item \doublehyphen{labels}
114 \item \doublehyphen{no-labels}
115 \item \doublehyphen{stats}
116 \item \doublehyphen{no-stats}
117 \item \doublehyphen{help}
120 \section{phm2pj}\label{phm2pj}\index{phm2pj}%
121 Simulates collection of X-rays data (projections) around a phantom object.
124 \texttt{phm2pj projection-file-name number-of-detectors number-of-views [options...]}
127 \twocolitem{\doublehyphen{phantom}}{Select a standard phantom.
128 \begin{itemize}\itemsep=0pt
129 \item \texttt{herman}
130 \item \texttt{shepp-logan}
131 \item \texttt{unit-pulse}
134 \twocolitem{\doublehyphen{phmfile}}{Load a phantom definition definition}
136 \twocolitem{\doublehyphen{geometry}}{
137 \begin{itemize}\itemsep=0pt
138 \item \texttt{parallel}
139 \item \texttt{equiangular}
140 \item \texttt{equilinear}
144 \twocolitem{\doublehyphen{nray}}{ Number of samples per each detector}
146 \twocolitem{\doublehyphen{rotangle}}{Sets the rotation amount as a multiple of pi.
147 For parallel geometries use a rotation angle of \texttt{1} and for equilinear and equiangular
148 geometries use a rotation angle of \texttt{2}. The default is to use to
149 appropriate rotation angle based on the geometry.}
151 \twocolitem{\doublehyphen{view-ratio}}{Sets the field of view as a ratio of the diameter of the phantom.
152 For normal scanning, a default value of \texttt{1.0} is optimal.}
154 \twocolitem{\doublehyphen{scan-ratio}}{Sets the length of scanning as a ratio of the view diameter.
155 For normal scanning, a value of \texttt{1.0} is optimal.}
157 \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.
158 For parallel geometries, a value of \texttt{1.0} is optimal. For other
159 geometries, this should be at least \texttt{2.0} to avoid artifacts.}
163 \section{phm2if}\label{phm2if}\index{phm2if}%
164 Converts a geometric phantom object into an imagefile. The size of the
165 imagefile in pixels must be specified as well as the number of samples
166 to average per pixel.
170 \twocolitem{\doublehyphen{nsamples}}{Number of samples in x \& y directions per pixel}
171 \twocolitem{\doublehyphen{view-ratio}}{Sets the view ration. For normal scanning,
172 the default value of \texttt{1.0} is optimal.}
175 \section{pj2if}\label{pj2if}\index{pj2if}%
176 Convert a projection file into an imagefile.
179 \texttt{pj2if projection-file-name image-file-name x-size ysize [options...]}
182 \twocolitem{\doublehyphen{help}}{Print brief online help}
185 \section{pjinfo}\label{pjinfo}\index{pjinfo}%
186 Displays information about a projection file.
189 \begin{itemize}\itemsep=0pt
190 \item \doublehyphen{binaryheader}
191 \item \doublehyphen{binaryview}
192 \item \doublehyphen{startview}
193 \item \doublehyphen{endview}
194 \item \doublehyphen{dump}
197 \section{pjrec}\label{pjrec}\index{pjrec}%
198 Reconstructs the interior of an object from a projection file.
201 \twocolitemruled{\textbf{Parameter}}{\textbf{Options}}
202 \twocolitem{\doublehyphen{filter}}{Selects which filter to apply to
203 each projection. To properly reconstruct an image, this filter
204 should be multiplied by the absolute value of distance from zero
206 \begin{itemize}\itemsep=0pt
207 \item \texttt{abs\_bandlimit}
208 \item \texttt{abs\_cosine}
209 \item \texttt{abs\_hamming}
211 } \twocolitem{\doublehyphen{filter-parameter}}{Sets the alpha level
212 for Hamming window. At setting of \texttt{0.54}, this equals
215 \twocolitem{\doublehyphen{filter-method}}{Selects the filtering
216 method. For large numbers of detectors, \texttt{rfftw} is optimal.
217 For smaller numbers of detectors, \texttt{convolution} might be a
219 \begin{itemize}\itemsep=0pt
220 \item \texttt{convolution}
221 \item \texttt{fourier}
222 \item \texttt{fourier-table}
230 \twocolitem{\doublehyphen{filter-generation}}{Selects the filter
231 generation. With convolution, \texttt{direct} is the proper method
232 to select. With any of the frequency methods,
233 \texttt{inverse-fourier} is the best method.
234 \begin{itemize}\itemsep=0pt
236 \item inverse-fourier
240 \twocolitem{\doublehyphen{interpolation}}{Interpolation technique.
241 \texttt{linear} is optimal.
242 \begin{itemize}\itemsep=0pt
249 \twocolitem{\doublehyphen{backprojection}}{Selects the
250 backprojection technique. A setting of \texttt{idiff} is optimal.
251 \begin{itemize}\itemsep=0pt
259 \twocolitem{\doublehyphen{zeropad}}{Zeropad factor. A setting of
260 \texttt{1} is optimal.}