Docstoc

A GUI application for creating macrofiles in GATE

Document Sample
A GUI application for creating macrofiles in GATE Powered By Docstoc
					                                                         ARTICLE IN PRESS



                              Nuclear Instruments and Methods in Physics Research A 569 (2006) 378–380
                                                                                                                    www.elsevier.com/locate/nima




                   A GUI application for creating macrofiles in GATE
                                    S. BoukisÃ, N. Sakellios, G. Loudos, K. Nikita
     Nuclear Imaging Medical Group, Biomedical Simulations and Imaging Applications Laboratory, School of Electrical & Computer Engineering,
                          National Technical University of Athens, 9 Iroon Polytechniou street, GR 15780 Athens, Greece
                                                         Available online 7 September 2006



Abstract

   GEANT4 Application for Tomographic Emission (GATE) is a Monte Carlo simulation toolkit based on GEANT4 for PET and
SPECT. GATE uses a high intuitive linear script language in a way that the code describing a system can be thought as a combination of
separate objects, each one with certain parameters. The above structure of GATE’s script language implies that by defining all the
parameters involved in a certain implementation, the macrofiles can be created automatically, using appropriate software. The Gate
Editor project, based on the above idea, aims the development of a homonym window application that exports GATE scripts based on
                                                                                             +
easy to understand parameters given by the end user. Gate Editor is developed using the C+ program language in Linux environment.
A WindowsXP version is also available. Object Oriented Programming allows the description of PET/SPECT system components with
relative objects belonging to corresponding classes. Gate Editor is able to export macrofiles of low complicity (like the SPECT and PET
benchmarks supplied with GATE). Objects such as collimator, crystal, detector blocks and sources can be described in the ‘real world’
and automatically constructed in ‘GATE world’. The relative position of these objects is adjusted as well, all under a user-friendly
interface. The end user can create his own code without concerning for the exact syntax of GATE’s script language. For more realistic
and complicated implementations though, further development is required.
r 2006 Published by Elsevier B.V.

PACS: 07.05.wr

Keywords: GATE; Monte-Carlo simulation; Gate Editor; Graphical User Interface



1. Introduction                                                            1.2. Gate Editor

1.1. GEANT4 Application for Tomographic Emission                             GATE uses a highly intuitive and ‘‘linear’’ script
(GATE) simulation platform                                                 language for describing the geometry and all the para-
                                                                           meters involved in a simulation process. On those
   The GATE simulation platform is based on GEANT4                         characteristics lies the key idea for the development of a
toolkit [1]. It comprises a large number of software                       Graphical User Interface (GUI) computer application
components enabling the modeling of various aspects of                     (Gate Editor) that helps the GATE user to produce script
nuclear medicine experiments, including the detector                       code files using a variety of wizard dialogs without the need
geometry and movement with source kinetics, the radiation                  of typing specific GATE commands. Another advance of
detection, data output, etc. Using an extended version of                  using Gate Editor emerges from the capabilities for real
GEANT4 scripting language the user can choose among                        time visualization that helps error tracking before the
                                            +
these options without performing any C+ coding. New                        simulation starts. An open/save mechanism is also avail-
scanner geometries can be defined and simulations can be                    able to fulfill the concepts of a GUI program environment.
set up interactively according to the user requirements.                   Gate Editor is designed in order to accelerate the process of
                                                                           simulation under Gate environment. Gate is a program in
                                                                           which the user interface is based on scripts. All information
  ÃCorresponding author.                                                   concerning the clinical system to be simulated is available
   E-mail address: photonmaster@hotmail.com (S. Boukis).                   in one or more script files called macrofiles. Macros are

0168-9002/$ - see front matter r 2006 Published by Elsevier B.V.
doi:10.1016/j.nima.2006.08.040
                                                      ARTICLE IN PRESS
                         S. Boukis et al. / Nuclear Instruments and Methods in Physics Research A 569 (2006) 378–380                          379


ASCII files in which each line contains a command or a                    observe the three major parts of the application. In more
comment. Commands in GATE perform a particular                           detail:
function and may require one or more parameters, given
with a specific syntax. Consequently the user should be
                                                                         1. This is the visualization window. It displays the current
familiar with GATE scripting language in order to
                                                                            system design, and adapts its contents to geometry
efficiently compose the necessary macros. The role of Gate
                                                                            changes.
Editor is to simplify the composition of macros describing
                                                                         2. This sub-window is the Properties Editor. Here the user
the simulation. This is achieved using GUI elements like
                                                                            can have access to all major parameters that describe an
wizards that offer a more ‘‘natural’’ way of describing
                                                                            object.
system parameters. Gate Editor translates these parameters
                                                                         3. This is the Objects sub-window: It informs the user for
into Gate native code internally without any further
                                                                            the tree structure of the geometry. Always the first item
participation of the user.
                                                                            in the list is the reserved word ‘‘World’’. Any new entry
                                                                            in the geometry will be a child item of World.
2. Materials and methods
                                                                         3.1. World definition
                                 +
   Gate Editor is written in C+ programming language.
                                     +
The object-oriented features of C+ provide an intuitive
                                                                           ‘‘World’’ in Gate is the volume that fixes the experi-
design approach and implementation. ‘‘Objects’’ like
                                                                         mental framework of the application. In Gate Editor the
radioactive sources, cylinders, boxes, etc., used in Gate
                                                                         user can set up the ‘‘world’’ by invoking the appropriate
                                                    +
can have an one-to-one correspondence with C+ classes
                                                                         dialog, as shown below. ‘‘World’’ is a simple geometrical
defining them. Gate Editor comes with real time visualiza-
                                                                         object. Only three parameters are necessary (lengths along
tion capabilities. Every time a user defines a new geometry
                                                                         the x-, y-, z-axis) (Fig. 2).
object, a visualization window updates itself to instantly
                                                                           The user should fill in the three line editors and accept
show the new object added. All the visualization proce-
                                                                         the values by pressing the OK button.
dures are based on OpenGL graphics library. In some cases
Mark Kilgard’s GLUT library is used, but this extra
dependency will be omitted in a future version. For the
GUI, the Qt toolkit is used, because it offers cross-platform
development capabilities. Thus, the source code is easy to
be compiled and run on a variety of operating systems-like
Windows XP, Mac OS X, Linux, etc.

3. Application environment

  In Fig. 1 the Gate Editor main application window is                   Fig. 2. The ‘‘World’’ dimensions can be defined using the appropriate
shown and in the screenshot shown in Fig. 1 one can                      dialog.




      Fig. 1. Gate Editor under Windows XP operating system.                 Fig. 3. The world object is shown in the visualization window.
                                                     ARTICLE IN PRESS
380                     S. Boukis et al. / Nuclear Instruments and Methods in Physics Research A 569 (2006) 378–380




                                                                                             Fig. 5. The collimator wizard.


                                                                          All major aspects of a simulation can be accessed and
                                                                        defined with methods similar to those described above.
                                                                        When the description of the simulation is completed the
                                                                        user can invoke Export Code command from the file menu
                                                                        in order to save the macrofile associated with the
                                                                        simulation. He can also save his work in a project file for
                                                                        continuing the simulation design at a later time.

                                                                        4. Discussion

                Fig. 4. The insert object wizard.                          Gate Editor is under development. By now only the
                                                                        geometry aspects of Gate are supported. The goal until the
                                                                        first functioning release is full support of Gate commands
   As can been seen in Fig. 3 the world is appeared in the              (naming a few: source definitions, digitizers, physics, etc.).
visualization window. By left clicking and dragging the                 Under development are also some useful tools like:
mouse over the visualization window users can change the                alignment capabilities, error prevent routines concerning
geometry viewpoint. In addition the item ‘‘World’’ is added             volume overlaps and off parent translations, reading from
to Objects List. By selecting the ‘‘World’’ item in the                 and writing to Gate Materials Database, etc. In addition
Objects Window, access to its properties is gained in the               useful tools such as collimator wizard or crystal-block
properties window.                                                      wizard are being designed and optimized. In Fig. 5 the
                                                                        collimator wizard is shown.
3.2. Inserting a new object                                                Window 1 shows the possible shape selections, window 2
                                                                        the hole properties (radius, high, septa) and window 3
   The first step in a simulation is the proper definition of             shows the collimator properties (x and y are, respectively,
model geometry. GATE supports a variety of 3D shapes                    the length of collimator and distance from edges). The
which are the building blocks the user can use to define the             main goal is to encourage the user to insert the physical
geometry. By choosing Tools-Insert Object from Gate                     properties of the collimator and then use the wizard to
Editor menu, the insert object wizard appears. This wizard              calculate the properties of the arrays, number of holes, etc.
prompts the user to give all the parameters (name, color,
shape, dimensions, position, etc.), describing the new                  References
object. Again by pressing the Finish button, the new object
is shown in the Visualization Window (Fig. 4).                          [1] G. Santin, et al., IEEE Trans. Nucl. Sci. NS-50 (2003) 1516.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:8/5/2011
language:English
pages:3