Contents || Index

Xray Map Simulator

Object List

    • You can edit an object list and immediately use
    • "Object List / Make Map"
    • to see the effects of your changes, without having to save the list to a file.


  • Some ways to get started
  • Rationalle.  What this tool is for.
  • Object list syntax.  The object list is a text list or text file.  The first line specifies the map.  Succeeding lines specify one object each.
  • Examples

Map with Poisson Noise


Getting Started

Here are some ways to get started:

Start from scratch.
  • File / New List, use default values
  • Object List / Add Sample Object, pick one
  • Object List / Make Map
  • Map / Add Noise
Look at example object list.
  • Help / Browse Examples, pick one.
  • Object List / Make Map
  • Map / Add Noise

If any example errors out, please let me know.  I've been changing some things since making some of the examples.

Make map directly from file.
  • File / Make Map, Navigate to and elect an object list file.
  • Map / Add Noise
Make a number of objects
  • File / New List, use default values
  • Object List / Add Random Objects, ...
  • Object List / Make Map
  • Map / Add Noise


This tool is for testing the visibility of various image features under conditions of low visibility due to noise from poor counting statistics. It generates gray level images of various shapes such as circles or rectangles, and then it adds Poisson noise to these images.  Viewing these simulated maps, which have intensities (thus signal to noise ratios) that you specify, can help to determine whether or not an object of interest is visible under given imaging conditions.

Overlap Method

The overlap method controls how objects are pasted into the map. 

  overlap method


Simulates opaque objects (the default).


Simulates transparent objects.

pos Absolute.  Intensity can be less than background, but not less than zero. Incremental - added to whatever is there
neg (Intensity cannot be negative.)

Fractional - whatever is there is reduced by this ratio

(B - I) / B

which can approach zero.



The simulator tool interprets the intensity parameter differently, according to the overlap method.  If the overlap method is replace, the intensity parameter denotes absolute intensity - the intensity in the finished map.  If the overlap method is add, the parameter denotes incremental intensity relative to the background.  In add mode, the intensity parameter can be negative, meaning the intensity of the object is less than the background.  Absolute intensities cannot be negative.  Incremental intensities of overlapped objects cannot 'add' up to be more negative than the backround.

In the replace mode, the backround intensity is subtracted from the object intensity (as given in the text file), and this difference is then added to the background image.  In the add mode, the object (incremental) intensity is added to the background.




  1. To debug:
    1. Debug / Use List -- Lists the file, putting 'nil' in places where the text was not used. (This shows what Lispix didn't understand).
    2. Debug / Object List  -- Lists the decoded objects. (This shows what Lispix did understand.).  If you get a list of objects that may be out of bounds, you can look at this numbered list to identify the offending objects.
  2.  Whe Windows button has conveniences for deleting the maps, which are special images.  The maps with noise are regular images and not touched by this button.  You can also use this button to delete object lists, which are special text windows.  No other text windows will be deleted.
  3. Note:  This button opens a note taking facility which you can copy and paste to or from.  Contents is saved when you close the window.



List of Shapes -- Object File Syntax

The input to this tool is a text file listing the objects, one object per line.

You specify the image size, background level, and a list of objects with size, position, angle, and intensity.

Key words are in bold.

;;; Blank lines and lines beginning with a semicolon are ignored.

;;; Comments beginning with a semi-colon can go at the end of any line.

;;; The map line, beginning with the word map, must be the firstnon-commented line.  The data type need not be specified.  See note on map data type.

map dimensions <x-dim> <y-dim> background <n counts> data-type <byte, integer> overlap-method <replace, add>;; data-type and overlap-method are optional
disc position <center x> <center y> intensity <n counts> radius <pixels> ;; example
box position <center x> <center y> intensity <n counts> angle <deg> size <x-dim> <y-dim>
equilateral-triangle position <center x> <center y> intensity <n counts> angle <deg> side <pixels>
outline-shape position <center x> <center y> intensity <n counts> angle <deg> vertices <vertex> <vertex> <vertex> ...
regular-hexagon position <center x> <center y> intensity <n counts> angle <deg> radius <pixels>
hemisphere-image position <center x> <center y> radius <pixels>
cone-image position <center x> <center y> radius <pixels>

x-dim is the width of the simulated x-ray map (or box) in pixels.

The tilt of an object is in degrees counter clockwise, zero degrees is East or to the right.

A vertex is an x and y coordinate, each in pixels.

Positions, center-x and center-y, are from the upper left corner.