The Generate Beam Parameters Program
Beam data is required for program RtDosePlan.
Whereas it may be suitable for the Dosimetry Check program to use generic beam data. The generic data provided can be copied to create a machine. It might then be only necessary to edit the geometry file specifying the geometric parameters of the treatment machine and for each energy the calibration file. The supplied generic data provides templates for modifying or creating beam data for a particular machine. A useful utility program is ReplaceText that will replace found text with a different string, to change the machine name in files if building a beam data file system from a template. After editing the calibration file, be sure to run program GenerateBeamParameters.
All the files are ASCII text files and are self documenting. Numerical information is off set with white space. Text fields that programs are to read are set off between the symbols <* and *>. If there are no spaces (white space) in the text string the text need not be delineated with the above symbols. A comment line is set off with two slashes to the end of the line. Or a comment may be enclosed between /* and */ which can be nested. When reading a file programs ignore the comments.
Utilities may exist to copy existing beam data in other formats to the file structure required here. Program ConvertRenBeamFiles, for example, will copy the ASCII beam data files used for Render-Plan 3-D from Elekta Oncology to our file format. This is an ASCII program run in an xterm. Just invoke the name of the program, the directory where Render-Plan beam data files are, and the directory where the data files are to be copied and transformed to. We expect to write these utilities on a need bases as people supply us with examples of their beam data.
All beam data resides in the directory specified by the file BeamData.loc in the program resources directory. Each treatment machine is represented by a subdirectory. In the subdirectory are files containing information common to the treatment machine. Each energy will have a subdirectory, for example X06 for 6 MV x-rays, X18 for 18 MV x-rays. We will here give examples of these files.
Program GenerateBeamParameters will read the below input files and write output files. The output files are not documented here. Those files that are ASCII are self documenting however. There should normally be no reason to edit the output files, but they might supply useful information. The kernel files are stored as binary files. This program is described above in the Algorithms section.
This file simply holds a text description of the treatment machine.
Example file name: Description
Example file:
/* file format version: */
1
<* SL20, 6 and 18 MeV
x-rays*>
This file defines the geometry of a treatment machine.
Example file name: Geometry
Example file:
/* file format version: */
1
/* Source Axis Distance
(cm) = */ 100.00
// This is also the
distance field sizes are defined at.
/* largest field size (cm)
is */ 40.00
/* Positive gantry
rotation: +1 = clockwise, -1 =
counter-clockwise */ -1
/* Gantry angle value when
pointed at floor: */ 180.00
/* Positive collimator
rotation: -1 = clockwise viewed from ceiling
+1 = counter-clockwise, with accelerator
pointed at floor */ -1
/* collimator nominal
angle value = */ 180.00
/* collimator rotation
lower limit = */ 83.00
/* collimator rotation
upper limit = */ 275.00
/* Positive couch
rotation: -1 = clockwise viewed from ceiling
+1 = counter-clockwise */ 1
/* couch nominal angle:
*/ 180.00
/* X axis, positive couch
lateral direction, positive is +x IEC (when moves to your right looking toward the
gantry)
Enter opposite sign here */ -1
/* center position value
(cm) */ 0.00
/* Y axis, positive couch
longitudinal direction, positive is +y IEC
(when moves toward gantry)
Enter opposite sign here */ -1
/* center position value
(cm) */ 0.00
/* Z axis, positive couch
height direction, positive is +z IEC(when moves up) Enter opposite sign here */
-1
/* center position value
(cm) */ 0.00
/* 1 = lower jaws are X
jaws (move sideways),
2 = lower are Y jaws (move front to back) */
1
/* Independent jaws: 0 =
neither, 1 = X jaws (left to right)
2 = Y jaws (front to back), 3 = both */ 2
/* label for -X jaw: */
<*X1 *>
/* label for +X jaw: */
<*X2 *>
/* label for -Y jaw: */
<*Y2 *>
/* label for +Y jaw: */
<*Y1 *>
/* limit of travel for
each independent jaw, given as a coordinate in cm
-x jaw
+x jaw -y jaw +y jaw
*/
0.00
0.00 10.0 -10.0
This file holds the list of x-ray (photon) energies available on the treatment machine. Each energy will have a subdirectory, for example X06.
Example file name: Photons
Example File
/* file format version: */
1
/* number of photon
energies: */ 2
6 18
This file is to hold data on the central axis for square fields and resides in the energy subdirectory. Generally the SSD should be the same as the isocentric machine, typically 100 cm. All the central axis files should have measurements at the same depths.
Example file name: CA12.0x12.0_w00_06
Example file:
/* file type: 2 = Central
Axis */ 2
/* file format version: */
1
/* machine directory name:
*/ SL20
/* energy = */ 6
/* date of data: */
<*25-AUG-1996 11:22:24*>
/* wedge number, 0 = no
wedge */ 0
/* field size in cm =
*/ 12.00
12.00
/* Source to Surface
Distance in cm = */ 100.00
/* Number of depths: */ 47
/* depth cm
value*/
0.00 46.680000
0.50 73.089996
1.00 95.760002
1.50 100.120003
1.60 100.000000
2.00 99.199997
3.00 95.699997
4.00 92.080002
5.00 87.470001
6.00 83.660004
7.00 79.959999
8.00 76.150002
9.00 72.550003
10.00 68.930000
...
39.00 15.430000
40.00 13.880000
42.50 12.170000
45.00 10.740000
47.50 9.440000
Note that the file starts with a file type field that defines this file as a central axis data file. The file format version that follows defines the format version of this type of file. If the type of data that this file holds must change in the future, we can simply define a different format. The machine name and energy follows. One will not be able to move files around between machines without changing the machine name here. This is the directory name under which the files are stored. The values are generally normalized to 100.0 at dmax.
This file contains the list of central axis files.
Example file name: CAFileListw00_06
Example file:
/* file type: 7 = list of
CA files: */ 7
/* file format version: */
1
/* machine directory name:
*/ SL20
/* nominal energy = */ 6
/* wedge number = */ 0
CA03.0x03.0_w00_06
CA04.0x04.0_w00_06
CA05.0x05.0_w00_06
CA06.0x06.0_w00_06
CA08.0x08.0_w00_06
CA10.0x10.0_w00_06
CA12.0x12.0_w00_06
CA15.0x15.0_w00_06
CA20.0x20.0_w00_06
CA25.0x25.0_w00_06
CA30.0x30.0_w00_06
CA35.0x35.0_w00_06
CA40.0x40.0_w00_06
// Depths measured should
be all the same.
This file is consulted when the data from separate central axis files need to be pooled together to create a table of field size versus depth dose, such as when creating the pencil beam kernel.
This file simply defines the depth of dmax for the particular energy.
Example file name: Dmax06
Example file:
/* file type: 3 = dmax
value */ 3
/* file format version: */
1
/* dmax in cm = */ 1.60
This file holds the measured output for field sizes.
Example file name: OutPut_w00_06
Example file:
/* file type: 5 = output
factors */ 5
/* file format version: */
2
// Note: version 1 does
not have a wedge number
/* machine directory name
*/ SL20
/* energy */ 6
/* wedge number */ 0
/* date of file: */
<*25-AUG-1996 11:22:24*>
//Normally only square
fields.
// cm cm cm
cG/mu
// field size SSD
Depth output factor
3.00
3.00 100.00 1.60
0.891000
4.00
4.00 100.00 1.60
0.910000
5.00
5.00 100.00 1.60
0.921000
6.00
6.00 100.00 1.60
0.933000
8.00
8.00 100.00 1.60
0.953000
10.00
10.00 100.00 1.60
0.969000
12.00
12.00 100.00 1.60
0.985000
15.00 15.00
100.00 1.60 0.998000
20.00
20.00 100.00 1.60
1.021000
25.00
25.00 100.00 1.60
1.034000
30.00
30.00 100.00 1.60
1.044000
35.00
35.00 100.00 1.60
1.049000
40.00
40.00 100.00
1.60 1.051000
The dose rate for the calibration field size must be consistent with the calibration file to follow.
This file holds the definition of the machine calibration.
Example file name: Calibration06
Example file:
/* file type: 4 =
calibration */ 4
/* file format version: */
1
/* machine directory name
*/ SL20
/* energy */ 6
/* date of calibration: */
<* 31-JUL-1996 13:39:24
*>
/* calibration Source
Surface Distance cm: */ 98.40
/* calibration field size cm:
*/ 10.00
/* calibration depth cm:
*/ 1.60
/* calibration dose rate
(cG/mu) : */ 1.000
Note that this machine is calibrated isocentrically 100 cm to the detector, hence 98.4 cm to the surface. The specification also could have been to a source surface distance of 100.0 with a dose rate of 0.969 cG/mu.
This file holds data measured on the diagonal of the largest field size. Rather than store the off axis distance, the tangent of the angle the ray makes to the central axis is stored. Typically this is just the off axis distance divided by 100. Note however, that this does not have to be measured at 100 cm SSD, but could be measured at a shorter distance. Otherwise a data acquisition system could have the central axis off set to one corner of the tank so that scans can be made along one diagonal. The field size refers to the jaw opening and is the field size at the isocentric distance of the machine, typically 100 cm. If possible data for more than one diagonal should be averaged. This data is used to compute the Off Axis Correction factor.
The depths in the table may be specified and measured as the vertical depth or slant depth. If vertical than all the data at each depth lie on the same plane. If slant than the data for the same depth lie on an arc. Most data acquistion systems would measure the off axis scans on the same plane.
The off axis data stored here starts with the central ray and goes on a 45 degree diagonal to the corner of the field. An increment of 1 or 2 cm is good. All the data for each off axis point must fall on diverging fan lines.
Example file name: DiagFanLine40.0_w00_06
Example file:
/* file type: 6 = Diagonal
Fan Line */ 6
/* file format version: */
1
/* machine directory name:
*/ SL20
/* energy = */ 6
/* date of data: */
<*25-AUG-1996 11:22:24*>
/* wedge number, 0 = no
wedge */ 0
/* field size (always
square) in cm = */ 40.00 40.00
/* Source to Surface
Distance in cm = */ 100.00
/* 1 = slant depth, 2 = vertical depth */ 1
/* Number of depths: */ 41
/* Number of radii: */ 15
// depth cm tan = radius/distance
0.0000 0.0200 0.0400 0.0600 0.0800
1.65
1.00000 1.01010 1.01710 1.02360 1.03420
2.00
0.99030 1.00390
1.01130 1.01610 1.02680
2.50
0.97490 0.98820 0.99640 1.00060 1.01110
...
34.00 0.23360 0.23810 0.23990 0.23950 0.23860
35.00 0.22290 0.22710 0.22870 0.22820 0.22740
// depth cm tan = radius/distance
0.1000 0.1200 0.1400 0.1600 0.1800
1.65
1.05310 1.05680 1.06180 1.06400 1.06200
2.00
1.04580 1.04910 1.05280 1.05620 1.05400
2.50
1.02760 1.03030 1.03330 1.03720 1.03700
...
34.00 0.23360 0.23810 0.23990 0.23950 0.23860
35.00 0.22290 0.22710 0.22870 0.22820 0.22740
// depth cm tan = radius/distance
0.1000 0.1200 0.1400 0.1600 0.1800
1.65
1.05310 1.05680 1.06180 1.06400 1.06200
2.00
1.04580 1.04910 1.05280 1.05620 1.05400
2.50 1.02760 1.03030 1.03330 1.03720 1.03700
...
33.00 0.21530 0.19790 0.16270 0.05830 0.03100
34.00 0.20370 0.18790 0.15470 0.05550 0.02970
35.00 0.19400 0.17770 0.14680 0.05320 0.02860
This file holds the off center ratio measured in air. Typically one will put a build up cap on an ion chamber, and measure the dose on the diagonal of the largest field size. The diagonals should be averaged with the data starting on the central axis and going to the corner of the field. The off axis distance is in terms of the tangent the ray makes with the central ray.
Example file name: InAirOCR06
Example file:
/* file type: 8 = In Air
OCR */ 8
/* file format version: */
1
/* machine directory name:
*/ SL20
/* energy = */ 6
/* date of data: */
<*25-AUG-1996 11:22:24*>
/* Number of data pairs:
*/ 33
// Must be in increasing
order, starting with central axis
// Tangent OCR
0.00000
1.00000
0.00980
1.00750
0.01960
1.01730
0.02930
1.02390
0.03910
1.02580
...
0.26400
0.07470
0.27370
0.04780
0.28350
0.03930
0.29330
0.03270
0.30310
0.02770
0.31280
0.02270
This file is written by program ComputePolyCAFiles and contains the report of comparing the same central axis points calculated with the pencil kernel to the data used to generate the pencil kernel, namely the central axis data files and the machine output file. This file is an ASCII file which may be printed. Both the percent depth dose is compared and the dose rate in cG/mu. A standard deviation is computed at the end of the printout. The standard deviation is only computed for points dmax or deeper.
Example file name: Careport06.txt
Example from one field size comparison:
Comparison to measured
data for field size 15.00 by 15.00 cm
% depth dose dose rate
Depth
Measured Calculated Difference
Measured Calculated Difference
0.00 49.55
49.66 0.11 0.4945 0.4956
0.0011
0.50 70.33
71.64 1.31 0.7019 0.7149
0.0130
1.00 96.18
96.23 0.05 0.9599
0.9604 0.0005
1.50
100.18 100.11 -0.07
0.9998 0.9991 -0.0007
1.60
100.00 100.00 0.00
0.9980 0.9980 0.0000
2.00 99.30
99.25 -0.05 0.9910 0.9905
-0.0005
3.00 95.29
95.46 0.17 0.9510 0.9527
0.0017
4.00 91.77
91.94 0.17 0.9159 0.9175
0.0017
5.00 88.17 88.04 -0.13 0.8799 0.8786 -0.0013
Example summary at the end of the file:
SL20 6 MeV
Standard Deviation Summary (beyond
depth of 1.60 cm):
field size % depth dose dose rate
3.00 by 3.00 0.140 0.00125
4.00 by 4.00 0.081 0.00074
5.00 by 5.00 0.217 0.00200
6.00 by 6.00 0.161 0.00150
8.00 by 8.00 0.163 0.00155
10.00 by 10.00 0.140 0.00136
12.00 by 12.00 0.103 0.00101
15.00 by 15.00 0.074 0.00074
20.00 by 20.00 0.088 0.00090
25.00 by 25.00 0.066 0.00069
30.00 by 30.00 0.086 0.00090
35.00 by 35.00 0.137 0.00144
40.00 by 40.00 0.092 0.00097
In the machine directory there must be a wedge geometry file for each wedge. File name is WedgeGeometry_w0n, where n is the wedge number. An example file follows:
/* file
type: 13 wedge geometry file */ 13
/* file
format version: */ 1
/*
machine directory name: */ testw
/*
wedge number (unique) = */ 3
/*
wedge angle = */ 45
/* 1 =
physical wedge, 2 = dynamic */ 1
/*
source to wedge distance */ 55.0
/*
Largest field size with wedge is:
point to butt in cm: */ 20.00
/* length of wedge in cm: */ 40.00
//
Allowed orientations of this wedge:
/* only
allowed label symbols are: -X +X
-Y +Y
where the symbol is the IEC coordinate
direction the wedge point is to. */
/* point is toward label */
+X <*05 +x wedge in *>
-X <*06 -x wedge in *>
+Y <*test+y wedge in *>
-Y <*test-y wedge in *>
For wedges, for each energy, there must be an output file, a list of central axis files for each wedge, and the central axis files, and a profile file. The central axis data is used to compute the wedge correction table file. The profile file is used to compute the in air profile.
Profile file, example file name: PR30.0x40.0_w02_06, which here contains a 30x40 field size scan of wedge number 2 for 6 MV x-rays. The profile must be for the largest field size across the wedge, point to heal, possible. An example wedge profile file follows:
/* file
type: 12 = profile data */ 12
/* file
format version: */ 1
/*
machine directory name: */ testw
/*
nominal energy = */ 6
/* date
of data: */ <*01/21/95 09:49:17*>
/*
wedge number, 0 = no wedge */ 2
//
field size is point to butt followed by length:
/*
field size in cm = */ 30.00 40.00
//
field size is at the machine's isocentric distance, not the SSD.
/*
Source to Surface Distance in cm = */ 100.00
/*
Number of Profiles: */ 6
/*
depth of profile = */ 1.400000
/*
central axis value (dose rate or %) */ 0.647900
/*
number of tangents this profile: */ 49
/* Tangent Value */
-0.168000 0.162500
-0.161000 0.181800
-0.154000 0.276300
-0.147000 1.474200
-0.140000 1.532800
.
.
.
0.133000 0.725600
0.140000 0.711400
0.147000 0.657500
0.154000 0.178700
0.161000 0.130400
0.168000 0.119200
/*
depth of profile = */ 5.000000
/*
central axis value (dose rate or %) */ 0.577200
/*
number of tangents this profile: */ 49
/* Tangent Value */
-0.168000 0.179100
-0.161000 0.210400
etc…
This file contains the definition of a multi-leaf. The file resides in the beam data directory under the machine name. The file name is MultiLeafGeometry. An example file follows (note this is file format version 2):
/* file
format version: */ 2
/* file
type: 12 = Multi-Leaf geometry */ 12
/*
transmission of leaf is under each energy directory */
//
NOTE: program is limited to ONLY X or Y
leaves, but not both.
/* X
leaves flag: 0 none, 1 leaves */ 0
/* see
Y leaves below if flag is 0 */
/* Y
leaves flag: 0 none, 1 leaves */ 1
// information
follows only if flag is 1
/*
source distance to bottom of leaf (cm) */ 37.3
/*
Maximum opening width */ 40.0
/*
Minimum opening width */ 0.50
/*
number of leaf pairs: */ 40
/* leaf
center coordinate (cm) followed by leaf
width,
followed by limits of the minus left, then
limits of
the postive leaf: */
-19.5
1.0 -16.40 12.50 -12.50 16.40
-18.5
1.0 -18.40 12.50 -12.50 18.40
-17.5
1.0 -17.50 12.50 -12.50 17.50
-16.5
1.0 -19.50 12.50 -12.50 19.50
-15.5
1.0 -20.00 12.50 -12.50 20.00
-14.5
1.0 -20.00 12.50 -12.50 20.00
-13.5
1.0 -20.00 12.50 -12.50 20.00
-12.5
1.0 -20.00 12.50 -12.50 20.00
-11.5
1.0 -20.00 12.50 -12.50 20.00
-10.5
1.0 -20.00 12.50 -12.50 20.00
-9.5
1.0 -20.00 12.50 -12.50 20.00
-8.5
1.0 -20.00 12.50 -12.50 20.00
-7.5
1.0 -20.00 12.50 -12.50 20.00
-6.5
1.0 -20.00 12.50 -12.50 20.00
-5.5
1.0 -20.00 12.50 -12.50 20.00
-4.5
1.0 -20.00 12.50 -12.50 20.00
-3.5
1.0 -20.00 12.50 -12.50 20.00
-2.5
1.0 -20.00 12.50 -12.50 20.00
-1.5
1.0 -20.00 12.50 -12.50 20.00
-0.5
1.0 -20.00 12.50 -12.50 20.00
0.5
1.0 -20.00 12.50 -12.50 20.00
1.5
1.0 -20.00 12.50 -12.50 20.00
2.5
1.0 -20.00 12.50 -12.50 20.00
3.5
1.0 -20.00 12.50 -12.50 20.00
4.5
1.0 -20.00 12.50 -12.50 20.00
5.5
1.0 -20.00 12.50 -12.50 20.00
6.5
1.0 -20.00 12.50 -12.50 20.00
7.5
1.0 -20.00 12.50 -12.50 20.00
8.5
1.0 -20.00 12.50 -12.50 20.00
9.5
1.0 -20.00 12.50 -12.50 20.00
10.5
1.0 -20.00 12.50 -12.50 20.00
11.5
1.0 -20.00 12.50 -12.50 20.00
12.5
1.0 -20.00 12.50 -12.50 20.00
13.5
1.0 -20.00 12.50 -12.50 20.00
14.5
1.0 -20.00 12.50 -12.50 20.00
15.5
1.0 -20.00 12.50 -12.50 20.00
16.5
1.0 -19.50 12.50 -12.50 19.50
17.5
1.0 -17.50 12.50 -12.50 17.50
18.5
1.0 -18.40 12.50 -12.50 18.40
19.5
1.0 -16.40 12.50 -12.50 16.40
The existence of this file signals that a multi-leaf collimator exist for the machine.
Comments:
The maximum leaf separation is the maximum distance in cm that leaves can be separated from each other. This would be the maximum opening. The minimum opening is the minimum distance the leaves can close. For some machines this is not zero. In the above example it is 0.5 cm. The assumption is made here that this minimum distance applies both to the opposite leaf and to the leaf on either side of the opposite leaf.
Information then follows about each leaf. The last leaf in the file above has the information:
19.5 1.0
-16.40 12.50 -12.50 16.40
The center of the leaf is at 19.5 cm in beam’s eye view coordinates. This is the X or Y coordinate depending upon whether the leaf is a Y leaf or an X leaf. The above leaves move parallel to the beam’s eye view Y axis and are Y leaves. The coordinate value of 19.5 cm is the X coordinate of this last Y leaf. The width of this leaf is 1.0 cm. Note that this allows for specifying leaves of different widths. The minus leaf can move from a Y coordinate value of –16.4 cm to 12.5 cm, and the positive leaf can move from a Y coordinate value of –12.5 cm to 16.4 cm. The maximum and minimum openings may further restrict a leaf position.
Under each energy there should be a multi-leaf transmission file, file name MultiLeafTrans. An example file follows:
/* file
format version: */ 1
/* file
type: 13 = Multi-leaf transmission */ 13
// This
is the transmission through the leafs to be used in computation.
// for
6 MV
0.0047
Scan files for open fields are used to fit the extended extra focal plane source model. These files for this purpose must have the scan data in terms of cG/mu. The file name simply ends in the lower case letters pro. An example file follows:
/* file
type: 1 = scan */ 1
/* file
format version: */ 2
/*
machine name: */ <*wsl22*>
/*
energy = */ 6
/* date
of data: */ <* 2000-11-27
18:25:21*>
/*
wedge number, 0 = no wedge */ 0
/*
field size in cm = */ 30.00 30.00
/*
field size defined at isocentric distance of machine= */ 100.000000
/*
Source to Surface Distance (SSD) in cm = */ 100.00
// Here
z = 0 is at SSD, negative is depth.
/*
Number of scans: */ 8
/*
number of points this scan: */ 47
/* x,
y, z value */
18.400
-0.000 0.000 0.135150
17.600
-0.000 0.000 0.147446
16.800
-0.000 0.000 0.161756
etc…
-17.600
0.000 0.000 0.147446
-18.400
0.000 0.000 0.135150
/*
number of points this scan: */ 49
/* x,
y, z value */
19.200
-0.000 -3.000 0.068264
18.400
-0.000 -3.000 0.077592
etc…
The file format is read by program AnalyzeBeam, used to compared computed to measured dose data.
See the Dosimetry Check beam data manual for conversion utilities for percent depth dose, in water diagonal scans data, and in air scan data.