r521: 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 \setfooter{\thepage}{}{}{}{}{\thepage}%
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{itemize}\itemsep=0pt
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
28 \end{itemize}
29
30 \section{if1}\label{if1}\index{ctsimtext,if1}%
31 Perfoms math functions on a single image.
32
33 \usage
34 \begin{itemize}\itemsep=0pt
35   \item -\,-invert
36   \item -\,-log
37   \item -\,-exp
38   \item -\,-sqr
39   \item -\,-sqrt
40 \end{itemize}
41
42 \section{if2}\label{if2}\index{ctsimtext,if2}%
43 Perfoms math functions on a two images.
44
45 \usage
46 \begin{itemize}\itemsep=0pt
47   \item -\,-add
48   \item -\,-sub
49   \item -\,-mul
50   \item -\,-comp
51   \item -\,-column-plot
52   \item -\,-row-plot
53 \end{itemize}
54
55 \section{ifexport}\label{ifexport}\index{ctsimtext,ifexport}%
56 Export an imagefile to a standard graphics file.
57
58 \usage
59 \begin{itemize}\itemsep=0pt
60   \item --format
61   \begin{itemize}\itemsep=0pt
62     \item -\,-pgm
63     \item -\,-pgmasc
64     \item -\,-png
65     \item -\,-png16
66   \end{itemize}
67   \item -\,-center
68   \begin{itemize}\itemsep=0pt
69     \item median
70     \item mode
71     \item mean
72   \end{itemize}
73   \item -\,-auto
74   \begin{itemize}\itemsep=0pt
75      \item -\,-full
76      \item -\,-std0.1
77      \item -\,-std0.5
78      \item -\,-std1
79      \item -\,-std2
80      \item -\,-std3
81   \end{itemize}
82   \item -\,-scale
83   \item -\,-min
84   \item -\,-max
85 \end{itemize}
86
87 \section{ifinfo}\label{ifinfo}\index{ctsimtext,ifinfo}%
88
89 Displays information about an imagefile.
90
91 \usage
92 \begin{itemize}\itemsep=0pt
93   \item -\,-labels
94   \item -\,-no-labels
95   \item -\,-stats
96   \item -\,-no-stats
97   \item -\,-help
98 \end{itemize}
99
100 \section{phm2pj}\label{phm2pj}\index{ctsimtext,phm2pj}%
101 Simulates collection of X-rays data (projections) around a phantom object.
102
103 \usage
104 phm2pj projection-file-name number-of-detectors number-of-views [options...]
105 \begin{itemize}\itemsep=0pt
106   \item -\,-phantom
107   Select a standard phantom
108   \begin{itemize}\itemsep=0pt
109     \item herman
110     \item shepp-logan
111     \item unit-pulse
112   \end{itemize}
113
114   \item -\,-phmfile
115   Load a phantom definition definition
116
117   \item -\,-geometry
118   \begin{itemize}\itemsep=0pt
119     \item parallel
120     \item equiangular
121     \item equilinear
122   \end{itemize}
123
124   \item -\,-nray
125     Number of samples per each detector
126
127   \item -\,-rotangle
128     Sets the rotation amount as a multiple of pi. For parallel geometries use
129 a rotation angle of 1 and for equilinear and equiangular
130 geometries use a rotation angle of 2. The default is to use to
131 appropriate rotation angle based on the geometry.
132
133   \item -\,-view-ratio
134     Sets the field of view as a ratio of the diameter of the phantom.
135     For normal scanning, a value of 1.0 is fine.
136
137   \item -\,-scan-ratio
138     Sets the length of scanning as a ratio of the view diameter.
139     For normal scanning, a value of 1.0 is fine.
140
141   \item -\,-focal-length
142     Sets the distance of the radiation source and detectors from the center of the object as a ratio of the radius of the object.
143     For parallel geometries, a value of 1.0 is fine. For other geometries, this should be at least 2.0 to avoid artifacts.
144 \end{itemize}
145
146 The Herman phantom is taken with permission from Gabor Hermans 1980 book\cite{HERMAN80}. The Shepp-Logan phantom was published in 1974\cite{SHEPP74}.
147
148 \section{phm2if}\label{phm2if}\index{ctsimtext,phm2if}%
149 Converts a geometric phantom object into an imagefile. The size of the
150 imagefile in pixels must be specified as well as the number of samples
151 to average per pixel.
152
153 \usage
154 \begin{itemize}\itemsep=0pt
155   \item -\,-nsamples
156   \item -\,-view-ratio
157 \end{itemize}
158
159 \section{pj2if}\label{pj2if}\index{ctsimtext,pj2if}%
160 Convert a projection file into an imagefile.
161
162 \usage
163 \begin{itemize}\itemsep=0pt
164 \item -\,-help    Print brief online help
165 \end{itemize}
166
167 \section{pjinfo}\label{pjinfo}\index{ctsimtext,pjinfo}%
168 Displays information about a projection file.
169
170 \usage
171 \begin{itemize}\itemsep=0pt
172   \item -\,-binaryheader
173   \item -\,-binaryview
174   \item -\,-startview
175   \item -\,-endview
176   \item -\,-dump
177 \end{itemize}
178
179 \section{pjrec}\label{pjrec}\index{ctsimtext,pjrec}%
180 Reconstructs the interior of an object from a projection file.
181
182 \begin{twocollist}
183 \twocolitemruled{\textbf{Parameter}}{\textbf{Options}}
184 \twocolitem{\textbf{-\,-filter}}{Selects which filter to apply to
185 each projection. To properly reconstruct an image, this filter
186 should be multiplied by the absolute value of distance from zero
187 frequency.
188 \begin{itemize}\itemsep=0pt
189 \item abs\_bandlimit
190 \item abs\_cosine
191 \item abs\_hamming
192 \end{itemize}
193 } \twocolitem{\textbf{-\,-filter-parameter}}{Sets the alpha level
194 for Hamming
195   window. At setting of 0.54, this equals the Hanning window.}
196
197 \twocolitem{\textbf{-\,-filter-method}}{Selects the filtering
198 method. For large numbers of detectors, \texttt{rfftw} is optimal.
199 For smaller numbers of detectors, \texttt{convolution} might be a
200 bit faster.
201 \begin{itemize}\itemsep=0pt
202 \item convolution
203 \item fourier
204 \item fourier\_table
205 \item fftw
206 \item rfftw
207 \end{itemize}
208 } \twocolitem{\textbf{-\,-interpolation}}{Interpolation technique.
209 \texttt{linear} is optimal.
210 \begin{itemize}\itemsep=0pt
211 \item nearest
212 \item linear
213 \item cubic
214 \end{itemize}
215 }
216 \end{twocollist}
217
218 \subsection{Advanced Options}
219
220 These options are only visible if \emph{Advanced Options} has been
221 selected in the \texttt{File/Preferences} dialog.
222
223 \begin{twocollist}
224 \twocolitem{\textbf{-\,-backprojection}}{Selects the
225 backprojection technique. A setting of \texttt{idiff} is optimal.
226 \begin{itemize}\itemsep=0pt
227 \item trig
228 \item table
229 \item diff
230 \item idiff
231 \end{itemize}
232 }
233
234 \twocolitem{\textbf{-\,-zeropad}}{Zeropad factor. A setting of
235 \texttt{1} is optimal.}
236
237 \twocolitem{\textbf{-\,-filter-generation}}{Selects the filter
238 generation. With convolution, \texttt{direct} is the proper method
239 to select. With any of the frequency methods,
240 \texttt{inverse-fourier} is the best method.
241 \begin{itemize}\itemsep=0pt
242 \item direct
243 \item inverse-fourier
244 \end{itemize}
245 }
246 \end{twocollist}