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