1 \chapter{The Graphical User Interface}\label{ctsim}\index{ctsim}%
2 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
7 \ctsim\ is the graphical shell for the CTSim project. It utilizes
8 using the \urlref{wxWindows}{http://www.wxwindows.org} library for
9 cross-platform compatibility. The graphical shell is compatible
10 with Microsoft Windows, \urlref{GTK}{http://www.gtk.org}, and
11 \urlref{Motif}{http://www.openmotif.org} graphical environments.
13 \usage \texttt{ctsim [files to open...]}
15 You can invoke \ctsim\ by itself on the command line, or include
16 on the command-line any number of files that you want \ctsim\ to
17 automatically open. \ctsim\ can open projection files, image
18 files, phantom files, and plot files.
21 \section{File Types Support}
23 Phantom and plot files are stored as ASCII text. In contrast,
24 image and projection files are stored in binary format.
25 \ctsim\ incorporates logic so that binary files are cross-platform
26 compatible between both little and big endian architectures.
29 Besides loading phantom files from the disk, the Herman and
30 Shepp-Logan phantoms are built-in to \ctsim. Phantom files can be
31 read and stored on the disk. However, a text editor is required to
32 create and edit these files.
35 Image files are 2-dimensional files that store 4-byte floating
36 point values. Images files can be either real or complex valued.
37 Typically, all images are real except for images that have been
38 processed by Fourier transforms. As you might expect,
39 complex-valued images are twice the size of real-valued images
40 since both a real and imaginary component need to be store.
42 Images files can also store any number of text labels. \ctsim\ uses
43 these labels for storing history information regarding
44 the creation and modifications of images.
46 When complex-valued images are viewed on the screen, only the real
47 component is displayed.
49 \subsection{Projection}
50 Projection files are created from Phantom files during the
51 projection process. Numerous options are available for the
52 creation of the these files. The files are stored in a binary
53 format with cross-platform compatibility on little and big endian
57 Plot files are created by \ctsim\ during analysis of image files.
58 They can be read and stored on the disk. They are stored as ASCII
59 files for easy cross-platform support.
61 \section{Global Menu Commands}
62 These commands are present on the menus for all of the windows of
65 \subsection{Preferences...}
66 This command displays a dialog box that allows users to control
67 the behavior of \ctsim. These options are saved across \ctsim sessions.
68 Under Microsoft Windows environments, they are stored in the registry.
69 On UNIX and Linux environments, they are stored in the users home
70 directory with the filename of \texttt{.ctsim}.
72 \begin{description}\itemsep=0pt
73 \item[Advanced options] By default, this is turned off in new installations.
74 These advanced options are required for normal simulations. When \texttt{Advanced
75 Options} is set, \ctsim\ will display more options during scanning of programs and
76 the reconstruction of projections.
78 \item[Ask before deleting new documents] By default, this is turned on in
79 new installations. With this option set, \ctsim\ will ask before closing
80 documents that have been modified or never saved on disk. By turning off
81 this option, \ctsim\ will never ask if you want to save a file -- you'll
82 be responsible for saving any files that you create.
87 This command opens a file section dialog box. Of special consideration
88 is the \texttt{File Type} combo box on the bottom of the dialog. You need
89 to select that to the type of file that you wish to open.
92 This command saves the contents of the active window. If the window hasn't
93 been named, a dialog box will open asking for the file name to use.
95 \subsection{Save As...}
96 Allows the saving of the contents of a window to any filename.
99 This command displays the online help.
102 This command shows the version number of \ctsim.
105 \section{Phantom Menus}
107 \subsection{Properties}
108 Displays the properties of a phantom which includes:
110 \begin{itemize}\itemsep=0pt
111 \item Overall dimensions of a phantom
112 \item A list of all component phantom elements
115 \subsection{Rasterize Dialog}
116 This creates an image file from a phantom. Technically, it
117 converts the phantom from a vector (infinite resolution) object
118 into a 2-dimension array of floating-point pixels. The parameters
122 \twocolitemruled{\textbf{Parameter}}{\textbf{Options}}
123 \twocolitem{\texttt{X size}}{Number of columns in image file}
124 \twocolitem{\texttt{Y size}}{Number of rows in image file}
125 \twocolitem{\texttt{Samples per pixel}}{Numbers of samples taken
126 per pixel in both the x and y directions. For example, if the
127 \texttt{Samples per pixel} is set to \texttt{3}, then for every
128 pixel in the image file 9 samples (3 x 3) are averaged.}
131 \subsection{Projection Dialog}
132 This creates a projection file from a phantom. The options
133 available when collecting projections are:
136 \twocolitem{\texttt{Geometry}}{
137 \begin{itemize}\itemsep=0pt
142 \twocolitem{\texttt{Number of detectors}}{Sets the number of
143 detectors in the detector array.}
145 \twocolitem{\texttt{Number of views}}{Sets the number of views
148 \twocolitem{\texttt{Samples per detector}}{Sets the number of
149 samples collected for each detector}
151 \twocolitem{\texttt{View Ratio}}{Sets the field of view as a ratio
152 of the diameter of the phantom. For normal scanning, use a value of
155 \twocolitem{\texttt{Scan Ratio}}{Sets the length of scanning as a
156 ratio of the view diameter. For normal scanning, use a value of \texttt{1.0}.}
158 \twocolitem{\texttt{Focal length ratio}}{Sets the distance of the
159 radiation source and detectors from the center of the object as a
160 ratio of the radius of the object.
162 For parallel geometries, use a value of \texttt{1.0}. For other
163 geometries, this should be at least \texttt{2.0} to avoid artifacts.}
166 \subsection{Advanced Options}
168 \twocolitem{\textbf{Rotation Angle}}{Sets the rotation amount as a
169 multiple of pi. For parallel geometries use a rotation angle of \texttt{1}
170 and for equilinear and equiangular geometries use a rotation angle
171 of \texttt{2}. Using any other rotation angle will lead to artifacts.}
176 \section{Image Menus}
177 \subsection{File - Properties}
178 Properties of image files include
179 \begin{itemize}\itemsep=0pt
180 \item Whether the image is real or complex valued
181 \item Numeric statistics
182 \item Image file labels
185 \subsection{File - Export}
186 This command allows for exporting image files to a standard
187 graphics file format. This is helpful when you want to take an
188 image and import it into another application. The current
189 \helprefn{intensity scale}{intensityscale} is used when exporting
190 the file. The support file formats are:
192 \begin{description}\itemsep=0pt
193 \item[PNG]Portable Network Graphics format. This uses 8-bits or
196 \item[PNG-16]This is a 16-bit version of PNG which allows for
197 65536 shades of gray.
198 \item[PGM]Portable Graymap format. This is a common format used on
200 \item[PGM]ASCII version of PGM.
204 \subsection{View}\label{intensityscale}
205 These options are for change the intensity scale for viewing the image.
206 They do not change the image data.
208 This command brings up a dialog box that allows you to set the lower
209 and upper intensities to display.
212 This command brings up a dialog box that allows \ctsim\ to automatically
213 make an intensity scale. The options that \ctsim\ needs to make this
216 \begin{description}\itemsep=0pt
217 \item[Center] This sets the center of the intensity scale. Currently,
218 \ctsim\ allows you to use either the mean, mode, or median of the image
219 as the center of the intensity scale.
221 \item[Width] This sets the half-width of the intensity scale. The width
222 is specified as a ratio of the standard deviation.
225 As an example, if \texttt{median} is selected as the center and
226 \texttt{0.5} is selected as the width, the the minimum intensity will
227 be \texttt{median - 0.5 x standard deviation} and the maximum will be
228 \texttt{median + 0.5 x standard deviation}.
231 This resets the intensity scale to the full scale of the image.
234 These commands create a new image based upon the current image,
235 and for some commands, also a comparison image.
237 \subsubsection{Add, Subtract, Multiply, Divide}
238 These are simple arithmetic operations. \ctsim\ will display a dialog
239 box showing all of the currently opened image files that are the
240 same size of the active image. After selecting a compatible image,
241 \ctsim\ will perform the arithmetic operation on the two images and
242 make a new result image.
244 \subsubsection{Image Size}
245 This command will generate a new window with the current image scaled to
246 any size. Currently, \texttt{bilinear} interpolation provides the best
249 \subsubsection{3-D Conversion}
250 Generates a 3-dimensional view of the current phantom. This view can be
251 rotated in three dimensions. The left and right arrow control the z-axis
252 rotation, the up and down arrows control the x-axis rotation. The y-axis
253 rotation is controlled by the \texttt{T} and \texttt{Y} keys. Other options
259 \item Lighting on or off
264 These commands filter and modify the image.
266 \subsubsection{Arithmetic}
267 These are simple arithmetic functions that should be self explanatory.
269 \subsubsection{Frequency Based}
270 This commands allow the Fourier and inverse Fourier transformations of
271 images. By default, the transformations will automatically convert
272 images from Fourier to natural order as expected. For example, \texttt{2-D FFT}
273 will transform the points into natural order after the Fourier transform.
274 Similarly the inverse, \texttt{2-D IFFT}, will reorder the points from
275 natural order to Fourier order before applying the inverse Fourier transformation.
277 As you would expect, images that undergo frequency filtering will be complex-valued
278 images. Normally, only the real component is shown by \ctsim. However, \ctsim\ does
279 have options for converting a complex-valued image into a real-valued image via
280 the \texttt{Magnitude} and \texttt{Phase} filtering commands.
283 These commands are used for analyzing an image.
285 \subsubsection{Plotting}
286 The commands plot rows and columns of images. There are also commands
287 that perform FFT and IFFT transformations prior to plotting.
289 \subsubsection{Image Comparison}
290 This command performs statistical comparisons between two images. An option
291 also exists for generating a difference image from the two input images.
293 There are also commands for plotting rows and columns from two images on
294 a single plot. This is quite helpful when comparing a phantom to a reconstruction.
296 \section{Projection Menus}
298 \subsection{File - Properties}
299 The displayed properties include:
302 \item Number of detectors in the projections
303 \item Number of views
304 \item The variables used when generating the projections from the phantom
307 \subsection{Process - Convert Polar Dialog}\label{convertpolardialog}
308 The parameters are \texttt{xsize}, \texttt{ysize}, and \texttt{interpolation}.
309 The \texttt{xsize} and \texttt{ysize} parameters set the size of the
310 resulting image file. The \texttt{interpolation} parameter selects the
311 interpolation method. Currently, the \texttt{bilinear} option provides
312 the highest quality interpolation.
314 \subsection{Process - Convert FFT Polar Dialog}
315 The parameters for this option are the same as \helprefn{Convert
316 Polar Dialog}{convertpolardialog}. For this command, though, the
317 projections are Fourier transformed prior to conversion to polar
320 \subsection{Reconstruct - Filtered Backprojection Dialog}
321 This dialog sets the parameters for reconstructing an image from projections
322 using the Filtered Backprojection technique.
326 \twocolitemruled{\textbf{Parameter}}{\textbf{Options}}
327 \twocolitem{\textbf{Filter}}{Selects which filter to apply to each
328 projection. To properly reconstruct an image, this filter should
329 be multiplied by the absolute value of distance from zero
331 \begin{itemize}\itemsep=0pt
336 } \twocolitem{\textbf{Hamming parameter}}{Sets the alpha level for
337 Hamming window. At setting of 0.54, this equals the Hanning
340 \twocolitem{\textbf{Filter Method}}{Selects the filtering method.
341 For large numbers of detectors, \texttt{rfftw} is optimal. For
342 smaller numbers of detectors, \texttt{convolution} might be a bit
344 \begin{itemize}\itemsep=0pt
353 \twocolitem{\textbf{Interpolation}}{Interpolation technique.
354 \texttt{cubic} is optimal when many projections are taken and the
355 data is smooth. Otherwise, \texttt{linear} gives better results.
356 Linear is also much faster than cubic interpolation.
358 \begin{itemize}\itemsep=0pt
366 \subsection{Advanced Options}
368 These options are only visible if \emph{Advanced Options} has been
369 selected in the \texttt{File/Preferences} dialog. These parameters
370 default to optimal settings and don't need to be adjusted except
374 \twocolitem{\textbf{Backprojection}}{Selects the backprojection
375 technique. A setting of \texttt{idiff} is optimal.
376 \begin{itemize}\itemsep=0pt
384 \twocolitem{\textbf{Filter Generation}}{Selects the filter
385 generation. With convolution, \texttt{direct} is the proper method
386 to select. With any of the frequency methods,
387 \texttt{inverse-fourier}is the best method.
388 \begin{itemize}\itemsep=0pt
390 \item inverse-fourier
394 \twocolitem{\textbf{Zeropad}}{Zeropad factor when using
395 frequency-based filtering. A setting of \texttt{1} is optimal.}
400 \subsection{File - Properties}
401 The displayed properties include the number of curves in the plot
402 and the number of points per curve. Additionally, the EZPlot
403 commands used to format the plot are displayed.
405 \subsection{View Menu}
406 These commands set the scaling for the y-axis. They are analogous
407 to the options used for setting the intensity scale for images.
410 This command sets the upper and lower limits for the y-axis.
413 This command automatically sets the upper and lower limits for the
414 y-axis. Please refer to the \texttt{View - Auto} documentation for
415 image files for the details.
418 The command resets the upper and lower limits of the y-axis to the
419 minimum and maximum values of the curves.