Fitting the Deconvolution Kernel

5 Nov 2007

 

 

Introduction.. 1

Fitting Deconvolution Kernels for Electronic Portal Imaging Devices (EPID) 2

Other Electronic Devices.. 4

Select Machine Toolbar. 4

Fit Kernel Toolbar. 4

Initial Guess File. 5

Margin. 6

Center. 6

OCR Correction Type. 6

Multiply in in air OCR.. 6

Divide out in water OCR, multiply in in air OCR.. 6

Make no OCR correction. 6

Description. 6

Fit the Kernel 6

Kernel File. 7

Fit Data File. 7

 

Introduction

If the deconvolution kernel does not fit your EPID, then you need to run a new kernel fit.  If the kernel does not fit, you won't be able to compute the right dose in water.  The only way to tell if it fits is to check field size response for different square field sizes.  You might consider looking at a 5x5 cm field size and a 20x20 field size, using a 10x10 for calibration.

 

The EPID looks like a phantom that is denser than water.  Signals will be too large for field sizes > 10x10 and too small for fields < 10x10 compared to water.  In other words, the EPID looks like it has a larger back scatter factor than water does.  In either case, the deconvolution kernel is needed to convert signal back to in air fluence (rmu).  If you are not getting the right dose due to not getting the correct rmu, you need to fit your own kernel.  It all goes back to this equation:

 

Sc,p = Sp X Sc

 

Or

 

(dose in phantom)  =  (phantom scatter factor)  X  (in air collimator scatter factor)

 

Please see, for example, equation 10.2 on page 203 in The Physics of Radiation Therapy by Fraiz Khan, second edition; or page 226 in Radiation Therapy Physics by Hendee and Ibbott, second edition.

 

Sp, phantom scatter, is usually normalized to a value of 1.0 for a 10x10 field size.  For Cobalt 60 one can normalize to 1.0 for a field size of 0x0, in which case it is called the back scatter factor.

 

Our unit for fluence, rmu, here corresponds to the definition of Sc.   Consider putting a build up cap on an ion chamber, and reading the signal on the central axis for successively larger square field sizes, and normalize to that for 10x10.   That meets our definition of rmu and Sc.   However, the buildup cap will distort your values some what.  Hence, one instead should compute Sc by calculating phantom scatter Sp, which can now be done with Monte Carlo calculated dose kernels, and divide that into the measured output factor Sc,p to get Sc:

 

Sc   = Sc,p/Sp

 

Program GenerateBeamParameters in fact does this and writes the Sc table to the file CollimatorScatter06 (for 6 MV) in the beam data directory for the energy of a particular machine.  Because fluence cannot be directly accurately measured, here we work through it and always compare the use of the fluence to a dose in water result.

 

Since the EPID looks like a phantom (and looks like something denser than water), the deconvolution kernel is needed to convert the EPID signal values back to in air fluence, which is the Sc factor for square field sizes.  That is, the Sp factor for the EPID signal is removed, leaving the in air scatter collimator factor (fluence):

 

EPID signal for square field size = EPID phantom scatter X in air collimator scatter factor

 

With the correct point spread kernel for the EPID we can calculate EPID phantom scatter and get:

 

In air collimator scatter factor    =   EPID signal  / EPID phantom scatter.

 

Then:

 

In air collimator scatter factor  X  in water phantom scatter = in water output factor.

 

where in water phantom scatter is computed with a poly-energetic pencil beam kernel fitted to beam data by program GenerateBeamParameters.

 

EPID signal / EPID phantom scatter   (here on the central axis)

 

is computed using the inverse of the point spread function for the EPID, which we refer to as a deconvolution, see the JACMP paper:

 

WD Renner, K Norton, "A method for deconvolution of integrated electronic portal images to obtain incident fluence for dose reconstruction", JACMP, Vol. 6, No. 4, Fall 2005, pp. 22-39.

 

So the only way to know if the kernel is right is to see if you get the correct in air collimator scatter factor for different field sizes, or equivalently, can compute the correct dose in water for different square field sizes.

 

Fitting Deconvolution Kernels for Electronic Portal Imaging Devices (EPID)

 

To fit a kernel that will be used to convert images to fluence, you will need to correspond a set of integrated images of increasing field size of known monitor units to a known measured dose, or to a set of scanned fields.  The field sizes should range from the smallest that can be accurately measured to the largest the imager can handle. 

 

We have found that it is sufficient to use a single point a depth for each field, as opposed to using a profile scan as was done in the publication:  Renner, Norton, "A method for deconvolution of integrated electronic portal images to obtain incident fluence for dose reconstruction", JACMP, Vol. 6, No. 4, Fall 2005, pp. 22-39.  Using a profile has the further complication that the profile must be precisely centered or the kernel fitting process will try to compensate.  The more important effect is the central axis dose, rather then edge response.

 

The output factor in the beam data base may be used instead of profile scans.  The output file has the name OutPut_w00_06 for example, and an example file is shown here and in the beam data section of the Dosimetry Check Manual:

 

/* file type: 5 = output factors */ 5

/* file format version: */ 1

/* machine directory name */ VarianStd

/* energy */ 6

/* date of file: */ <*07-JUN-2000 15:58:33*>

 

//        cm             cm        cm     cG/mu

//     field size       SSD      Depth  output factor

    3.00      3.00    98.40      1.60  0.907

    4.00      4.00    98.40      1.60  0.92

    5.00      5.00    98.40      1.60  0.935

    6.00      6.00    98.40      1.60  0.952

    8.00      8.00    98.40      1.60  0.977

   10.00     10.00    98.40      1.60  1.00

   12.00     12.00    98.40      1.60  1.019

   15.00     15.00    98.40      1.60  1.037

   20.00     20.00    98.40      1.60  1.060

   25.00     25.00    98.40      1.60  1.075

   30.00     30.00    98.40      1.60  1.086

   35.00     35.00    98.40      1.60  1.094

   40.00     40.00    98.40      1.60  1.101

 

Notice that in the above file the calibration point is at 100 cm, 98.40 cm to the surface.  The calibration file defining the calibration point in the same data base must be consistent.  Below is the corresponding calibration file Calibration06 for this machine:

 

/* file type: 4 = calibration */ 4

/* file format version: */ 1

/* machine directory name */ VarianStd

/* energy */ 6

/* date of calibration: */ <*May 2, 2005*>

/* calibration Source Surface Distance cm: */   98.4

/* calibration field size cm: */    10.00

/* calibration depth cm: */     1.60

/* calibration dose rate (cG/mu) : */ 1.000000

 

 

You may of course edit beam data to suit your machine.   You should run the program GenerateBeamParameters in tools.dir when you have done so.  You will simply pick the point for each field size integrated by the EPID.

 

Alternately, profile scans can be made of the fields for a few selected depths.  If the penumbra is significantly different in the x and y directions, than both cross plane and in plane scans should be made.  The scan format used here stores the scan data in cGy/mu.  Utility programs are provided to convert the ASCII scan files from various water tank scanning systems to this format.  Generally, you will have to know the dose rate in cGy for each scan on the central axis and provide that number.  The profile scans can be stored in the beam data directory for the particular energy.  The file names should indicate the field size and end in “.pro”.

 

However, in most cases you can fit a kernel using only a single point on the central axis for each field size using the above output factors.  Or you may create a profile scan file that consists of a single point for each field size.  An example of a file follows below:

 

// Varian 2100CD 6x

/* file type: 1 = scan  */ 1

/* file format version: */ 2

/* machine name: */ <*VarianStd*>

/* energy = */ 6

/* date of data: */ <**>

/* wedge number, 0 = no wedge */ 0

/* field size in cm = */   8.00    8.00

/* field size defined at isocentric distance of machine= */   100.000000

/* Source to Surface Distance (SSD) in cm = */ 100.0

// Here z = 0 is at SSD, negative is depth.

/* Number of scans: */ 1

 

/* number of points this scan: */ 1

/*   x,       y,       z        value */

 

    0.0     0.000   -1.600     0.946

 

 

Notice that if changing SSD, the dose rate reporte must correspond and be consistent.

 

Refer to the ASCII file standard in the System2100 manual.  // to end of line and /* to */ are comments which the program ignores when reading the file.   Text data of more than one word must be set off with <* to *>.  The value must be the dose rate in cGy/mu and must agree with the definition of the machine calibration in the calibration file.  This file is to be put in the machine data directory under the proper energy directory.  Note the above value is for calibration of 98.4 cm to surface where at a depth of 1.6 cm is 1.000 cGy/mu for a 10x10 cm field.

 

The image file is the image converted to RMU but not deconvoluted with a kernel (i.e. a Field Dose file).  When converting the image files, unselect the “Use Deconvolution Kernel” toggle button on the popup for that function.

 

Other Electronic Devices

It is expected that this same process can be applied to other imaging devices used for integrating beams, such as ion chamber arrays.

Select Machine Toolbar

The first toolbar you will encounter will require you to select an accelerator and and energy.  Shown below is the choose accelerator toolbar.

 

 

Hit the continue button after picking the machine and energy.

Fit Kernel Toolbar

The fit kernel toolbar is shown below:

 

 

Under Select Scan Data, select either Output Point or Scan File.  Here Output Point was selected.  Select the point from the output point list read from the above output file and hit the apply button.  Then hit the “Select RMU File” button to select an image file.  You must then type in the monitor units for the image file in the text box provided on the tool bar.  The number you type in is used to multiply the dose rates in the corresponding output point or profile scan file.  The entries must be performed in this sequence.  A list of point or scan and RMU (actually Field Dose files) files with the corresponding monitor units entered will be maintained on a popup.  You can subsequently delete individual items from the list, or reset the entire list to zero length with the “Reset List” button on the Action pull down.

Initial Guess File

The default is to fit five exponentials.  A default initial guess is provided internally.  You can reduce the number of exponentials and otherwise effect the down hill search method by reading in a file with an initial guess for each variable.  Under the Action pulldown you can select an initial guess file.  In the file for each variable must be specified a minimum and maximum range for the variable, the fraction of the initial variable value that is to be the initial step size, and the fraction of the initial variable value that is to be the stopping step size.  The step size is halved as the algorithm progresses and stops when the step size for all variables is less than the stop size specified here.

 

And example of an initial guess file follows:

/* File format version */ 1

/* file type:  14 = convolution kernel initial guess */  14

/* Description: */ <*Kernel guess*>

/* machine name: */ <*example*>

/* for energy */ 6

/* number of exponentials */ 5  // two variables per exponential.

 

// NO ENTRY MAY BE ZERO OR LESS.

 

/*  multiplier        exponent */

    6.966052e+001     2.288060e+001

    8.947527e-002     2.279832e+000

    3.360424e-003     6.242489e-001

    3.544861e-005     6.401189e-002

    4.606968e-008     5.748105e-003

 

/* min and max value for each variable

     Minimum             Maximum */

   

     1.0e1               1.0e3   // multiplier

     10.0                100.0   // exponent

 

     1.0e-2              1.0e1

     0.5                 10.0

 

     1.0e-4              1.0e-2

     0.05                1.5

 

     1.0e-7              1.0e-4

     0.01                1.0

 

     1.0e-16             1.0e-6

     0.0001              0.05

 

/*  starting step size fraction, and stopping step size fraction,

    fraction of the inital guess above.

 

    step      stop   */

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

     0.5      .005

    

 

An alternate file format version 2 list each variable followed by the minimum and maximum values for that variable, followed by the initial step size and the final step size, repeated for all the variables.  The first variable is the multiplier, the second the corresponding exponent, for an exponential, and so on.

Margin

The margin text entry on the tool bar is used to restrict the data used in the fitting process.   A positive number will be the distance (cm) beyond the edge of the field for which profile data will be used.   A negative number will restrict that distance from the field edge inside the field.  There is no reason to make an entry for using a single point on the central axis.

Center

The center text entry provides an additional option to restrict data.  Only profile data within the entered distance (cm) from the central axis will be used in the fit.  Note above that kernels can be fitted using only a central axis value.

OCR Correction Type

There are three options for the Off Center Ratio data.  Generally, you would use the third option listed below which is the default.  The OCR should be specified out to the largest radius the EPID can measure.  The correct option to use must be selected before proceeding and is selected with the option menu on the toolbar, far right.

 

Multiply in in air OCR

The first option is to simply multiply the field image after deconvolution by the in air off center ratio.  This data will be read from the corresponding file in the beam data directory.  This would apply to images which have been corrected by a flood view and have had the OCR removed.

Divide out in water OCR, multiply in in air OCR

A second option is for the case where off axis data has been multiplied in after a flood view correction.   The option is to remove that data first before deconvolution.  Then afterward multiply in the in air off center ratio as done above.  The in water off axis data at dmax is used to divide into the image to remove the same data that was multiplied in.  This data comes from the DiagFanLine data file in the beam data directory.  It is here assumed that the first depth in that file is the data that was used to multiply in the OCR.  We have seen little difference between this option and the third below, which would be to let the OCR data go through the deconvolution process.  Further, Varian gives you the option of entering your own data to be multiplied in after the flood view correction.  And there is little difference between in water data at dmax and in air OCR data.

Make no OCR correction

A third option is to not make any OCR correction on the image files.  The images are simply normalized to 10x10 and then the deconvolution applied.  This option would be the case if the OCR has otherwise been multiplied in after the flood view correction.

 

Description

Under the Action pull down, enter a description of the kernel before selecting the fit action.

 

Fit the Kernel

When ready to run the fit algorithm, hit the “Fit Kernel” button on the Action pull down.  As the algorithm runs information will be written out to the command prompt window and a popup will maintain the current variable values and the current variance for each iteration.

 

The length of time can run from one to several hours, depending upon the number of exponentials, the total number of points, and how close the starting value was (and the speed of your computer, we did this on a 1.6 Gigahertz PC).  Time can be saved by only using profile files that have a profile at dmax only.   Reducing the number of points in those files will also save time.  

 

Kernel File

When the algorithm completes, the values of the fitted kernel will be written to a file using the machine name and energy.  The file will be in the directory DeconvKernels.d in the data directory (data.d) located by the DataDir.loc file in the program resources directory (which is located by file rlresources.dir.loc in the current directory).

 

An example file follows:

 

/* File format version */ 3

/* file type:  104 = convolution kernel */  104

/* Description: */ <*Fitted Kernel*>

/* machine name: */ <*VarianStd*>

/* for energy */ 6

/* variance for fit = */    1.246866e+000

/* number of exponentials */ 5

    7.040144e+001     2.288060e+001

    1.279281e-001     2.762086e+000

    8.210560e-004     2.618721e-001

    7.239994e-005     5.014250e-002

    9.275000e-005     1.477409e-001

 

/*  OCR correction type:

   0: divide out in water OCR at dmax, then multiply

      in in air OCR after deconvolution

   1: multiply in in air OCR after deconvolution

   2: make no OCR correction. */    2

 

/* file written 09-Aug-2005-13:12:38(hr:min:sec) */

 

Fit Data File

A file will also be written, “FitDataProfiles”, that list the computed and measured values for the fit in the temporary directory.  This file can be read by program DrawCompareProfiles and will product a plot in a window and is useful for judging how well the process went. 

 

Note also that data is written to standard out.  So if the program is run from a command prompt window you will see the progress of the fit and some central axis results at the end of the fit.