1 \chapter{The Command Line Interface}\label{ctsimtext}\index{ctsimtext}%
2 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
5 \ctsimtext\ is a master shell for all of the command-line utilities.
7 \usage \ctsimtext\ can be invoked via three different
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.
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...}.
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...}
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}.
40 This parallel processing version has been tested with excellent results on
41 a 16-CPU \urlref{Beowulf}{http://www.beowulf.org} cluster.
44 \section{if1}\label{if1}\index{ctsimtext,if1}%
45 Performs math functions on a single image.
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}
56 \section{if2}\label{if2}\index{ctsimtext,if2}%
57 Performs math functions on a two images.
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}
69 \section{ifexport}\label{ifexport}\index{ctsimtext,ifexport}%
70 Export an image file to a standard graphics file.
73 \begin{itemize}\itemsep=0pt
74 \item \doublehyphen{format}
75 \begin{itemize}\itemsep=0pt
81 \item \doublehyphen{center}
82 \begin{itemize}\itemsep=0pt
87 \item \doublehyphen{auto}
88 \begin{itemize}\itemsep=0pt
96 \item \doublehyphen{scale}
97 \item \doublehyphen{min}
98 \item \doublehyphen{max}
101 \section{ifinfo}\label{ifinfo}\index{ctsimtext,ifinfo}%
103 Displays information about an imagefile.
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}
114 \section{phm2pj}\label{phm2pj}\index{ctsimtext,phm2pj}%
115 Simulates collection of X-rays data (projections) around a phantom object.
118 \texttt{phm2pj projection-file-name number-of-detectors number-of-views [options...]}
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}
128 \twocolitem{\doublehyphen{phmfile}}{Load a phantom definition definition}
130 \twocolitem{\doublehyphen{geometry}}{
131 \begin{itemize}\itemsep=0pt
132 \item \texttt{parallel}
133 \item \texttt{equiangular}
134 \item \texttt{equilinear}
138 \twocolitem{\doublehyphen{nray}}{ Number of samples per each detector}
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.}
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.}
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.}
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.}
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.
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.}
169 \section{pj2if}\label{pj2if}\index{ctsimtext,pj2if}%
170 Convert a projection file into an imagefile.
173 \texttt{pj2if projection-file-name image-file-name x-size ysize [options...]}
176 \twocolitem{\doublehyphen{help}}{Print brief online help}
179 \section{pjinfo}\label{pjinfo}\index{ctsimtext,pjinfo}%
180 Displays information about a projection file.
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}
191 \section{pjrec}\label{pjrec}\index{ctsimtext,pjrec}%
192 Reconstructs the interior of an object from a projection file.
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
200 \begin{itemize}\itemsep=0pt
201 \item \texttt{abs\_bandlimit}
202 \item \texttt{abs\_cosine}
203 \item \texttt{abs\_hamming}
205 } \twocolitem{\doublehyphen{filter-parameter}}{Sets the alpha level
206 for Hamming window. At setting of \texttt{0.54}, this equals
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
213 \begin{itemize}\itemsep=0pt
214 \item \texttt{convolution}
215 \item \texttt{fourier}
216 \item \texttt{fourier-table}
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
230 \item inverse-fourier
234 \twocolitem{\doublehyphen{interpolation}}{Interpolation technique.
235 \texttt{linear} is optimal.
236 \begin{itemize}\itemsep=0pt
243 \twocolitem{\doublehyphen{backprojection}}{Selects the
244 backprojection technique. A setting of \texttt{idiff} is optimal.
245 \begin{itemize}\itemsep=0pt
253 \twocolitem{\doublehyphen{zeropad}}{Zeropad factor. A setting of
254 \texttt{1} is optimal.}