Division of Nuclear Medicine

SimSET-
Getting Started

[News] [Installation guide] [User guide] [Programmers' info] [Resources] [Contacts]


Contents

 

Introduction

You have successfully installed the SimSET package, and read the overview chapter. You now want to start simulating. Unfortunately, using SimSET is somewhat more complex than editing a word-processing document or programming in PERL! You will need to read most of this user guide before you can start getting meaningful results. This section outlines the steps you need to take to get a simulation going.

A note about Parameter Files

All the modules used in SimSET are configurable by the user, and configuration is achieved by editing ascii text files called parameter files. There is a parameter file for each module. Parameter files consist of entries in the following format:

DATA_TYPE parameter_name = value

For example,

BOOL simulate_SPECT = TRUE

Where possible, parameter names have been chosen to reveal something meaningful about the parameter, and example parameter files and step-by-step instructions on how to chose appropriate parameter values are included in each chapter.

 

[top of page]

 

Step 1: Creating an activity and attenuation distribution to simulate

Basically, there are two steps to this process:

  1. Tell the Photon History Generator (PHG) what the dimensions and discretization of your object is going to be. This is achieved by editing the "OBJECT GEOMETRY VALUES" section in the PHG run-time parameters file. Step-by-step instructions for specifying object geometries can be found in the Object Editor chapter.

  2. Create binary files containing actual attenuation and activity values corresponding to the geometry you specifed in the phg run-time parameters file. This can be achieved using the SimSET Object Editor utility - again, see the Object Editor chapter for step-by-step instructions. Note that pre-existing image data can be used if desired.

     

    [top of page]

 

Step 2: Configuring the Photon History Generator

This involves further editing of the PHG run-time parameters file. Since the object geometry has already been specified, there remain three parameter categories to be dealt with:

  1. Simulation options, such as the number of decays to simulate, whether to simulate PET or SPECT, and the variance-reduction techniques to be applied, need to be chosen.

  2. The geometry of the Target Cylinder  needs to be specified. The PHG will pass on information about photons which pass through the side (as opposed to the ends) of this cylinder - it is used as the effective "Field of View" during the tracking-through-the-object phase of the simulation.

  3. Pointers to the relevant data tables, such as the binary files you created using the object editor, parameter files for the other modules and photon history files for post-simulation analysis need to be set up.

    Full instructions on setting up each parameter are given in the Photon History Generator chapter. Note that it is not necessary to simulate either collimators or detectors - for a simple simulation of the flux through the target cylinder, all that remains to be done is to configure the binning module. However, if you do want to simulate either collimators and/or detectors, their respective parameter files must also be configured (and specified in the PHG run-time parameters file).

  4. When specifying filenames in the parameter files, you can use '@simset' in place of the pathname specified as 'SIMSET_PATH' in the makefile (e.g., the default makefile ismake.files/simset.make, with 'SIMSET_PATH = /Users/useruser/Desktop/2.9.2').  As the SimSET software parses the text input files, it replaces all instances of the string '@simset' with the directory path specified as SIMSET_PATH (so with the default makefile all instances of '@simset' will be replaced by '/Users/useruser/Desktop/2.9.2' ).  To see a usage example, see the file phg.data/phg_ad_files - notice that each line now starts with '@simset'.  This is also useful in the main SimSET parameter file.  All the directory path for files from the phg.data directory can be specified as '@simset/phg.data', e.g., 'STR  attenuation_table = "@simset/phg.data/phg_att_table"'.  This simplifies the creation of the input file and improves portability between computer systems and to new SimSET releases.

     

    [top of page]

 

Step 3: Setting up collimators and end-plates

The first task is to choose an appropriate collimator model from the following:

Simple PET
Monte Carlo PET
UNC SPECT
Monte Carlo slat collimators (for dual-head coincidence imaging, DHCI)

The Simple PET option just uses perfectly absorbing end-plates. It is very easy to configure, and is often a good choice for PVI (3D PET). For 2D PET, the Monte Carlo option is needed. This is based on Chris Thompson's PETSIM model - it is very flexible in terms of septa geometry, but is commensurately more complex to configure. For SPECT, collimators are modelled using software predominantly developed at UNC (by the Tsui/Frey group then at the University of North Carolina, now at Johns Hopkins). Parallel, fan-beam or cone-beam collimators can be selected. A quite flexible Monte Carlo slat collimator module is provided for DHCI.

Having chosen the appropriate collimator model, the collimator parameters file must be edited to specify the exact collimator geometry. Step-by-step instructions for this can be found in the Collimator module chapter. Multiple collimators may also be simulated from one PHG run using the tomograph file feature.

 

[top of page]

 

Step 4: Setting up detectors

At this time there are 5 supported detector models:

Simple (PET and SPECT) - just performs Gaussian energy blurring
Planar (SPECT)
DHCI (Dual-Head Coincidence Imaging)
Cylidrical PET
Block detectors

Step-by-step instructions for specifying detector geometry and properties in the detector parameters file can be found in the Detector module chapter. Multiple detectors may also be simulated from one PHG run using the tomograph file feature.

 

[top of page]

 

Step 5: Configuring the binning module

Detected photon data generated by the simulation (with or without detectors and/or collimators) is histogrammed and written out by the binning module, which has it's own parameters file. In the binning module parameters file you specify whether you want the data written as sinograms, projections for 3D-RP or in other formats. You also specify whether photons should be binned according to energy and scattering history. Full instructions for configuring the binning module can be found in the Binning chapter. [You can bin in up to 12 different ways at once if you wish - simply specify up to 12 binning parameter files in the PHG run-time parameters file. NOTE, we are currently having problems with the multiple binning file feature--you may need to use multiple tomograph files instead.]

 

[top of page]

 

Step 6: Running the simulation

To run the simulation enter the following command at the UNIX prompt:

phg your_phg_params_file <return>

The phg binary will then read your parameters file and begin the simulation. The screen output produced during the simulation is useful diagnostic information and should be noted.

 

[top of page]

 

History files

The PHG, the collimator module, the detector module and the binning module can all create photon history files if desired. These contain records for each photon processed by that module. History files can be re-processed after simulation by the "downstream" modules (i.e., the collimator, detector, and binning modules for PHG history files; the detector and binning modules for collimator history files; etc) to finish simulating the history data.

The standard history file can become unmanageably long (100's of Gbytes) for a long simulation, so provision has been made for the user to chose which photon properties are written out. This customization process is achieved by means of a history parameters file. More information can be found in the History files chapter.

The history file format is fairly simple (see the file headers page and the History files chapter), so it is a reasonably straight-forward process to write your own binning code, if the options provided in the binning module do not suit your needs.

[top of page]

 

Customization

The collimator module, the detector module, and binning module contain hooks to which you can attach your own code. Further information on this can be found in the relevant chapters.

 

News 

Finally, make sure that you keep up with the news section while you are using SimSET. Important information on bug fixes and updates is regularly posted there.

[top of page]

 

Last revised by: Robert Harrison
Revision date: 7 January 2014