Citation
Modeling of a multileaf collimator

Material Information

Title:
Modeling of a multileaf collimator
Creator:
Kim, Siyong, 1962-
Publication Date:
Language:
English
Physical Description:
ix, 208 leaves : ill. ; 29 cm.

Subjects

Subjects / Keywords:
Collimators ( jstor )
Fluence ( jstor )
Geometric planes ( jstor )
Jaw ( jstor )
Leaves ( jstor )
Oblateness ( jstor )
Photon beams ( jstor )
Photons ( jstor )
Subroutines ( jstor )
Wedge bodies ( jstor )
Dissertations, Academic -- Nuclear and Radiological Engineering -- UF ( lcsh )
Nuclear and Radiological Engineering thesis, Ph. D ( lcsh )
Genre:
bibliography ( marcgt )
non-fiction ( marcgt )

Notes

Thesis:
Thesis (Ph. D.)--University of Florida, 1997.
Bibliography:
Includes bibliographical references (leaves 203-207).
General Note:
Typescript.
General Note:
Vita.
Statement of Responsibility:
by Siyong Kim.

Record Information

Source Institution:
University of Florida
Holding Location:
University of Florida
Rights Management:
Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.
Resource Identifier:
028027095 ( ALEPH )
37858458 ( OCLC )

Downloads

This item has the following downloads:


Full Text










MODELING OF A MULTILEAF COLLIMATOR


By

SIYONG KIM














A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL
OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
DOCTOR OF PHILOSOPHY

UNIVERSITY OF FLORIDA

























This dissertation is dedicated to
my loving wife, Gyejin,
and darling daughters, Minkyung and Minna,
for everything we have shared.














ACKNOWLEDGMENTS


I am very pleased to acknowledge the helpful guidance of my research advisor,

Dr. Jatinder R. Palta, who has been truly supportive in every way not only as an academic

teacher but also as a person.

I extend my gratitude to my committee member, Dr. Timothy C. Zhu, for

providing specialized guidance on the theoretical and experimental aspects of my study.

Thanks are extended to the rest of my committee members: Dr. Wesley E. Bolch,

representing the Department of Nuclear and Radiological Engineering; Dr. James K.

Walker, representing the Department of Physics; Dr. William Mendenhall, representing

the Department of Radiation Oncology at the University of Florida.

A special debt is acknowledged to Dr. Chihray Liu for his willingness to share his

precious time with me to discuss many problems and to lead me in the right direction,

especially for the development of the multileaf collimator module.

I would also like to thank Patsy McCarty and Anne Covell for their editorial

advice. The gracious assistance of John Jerico is acknowledged; he helped me to fabricate

the custom blocks for experiments. Phil Bassett and John Preisler kindly helped me to

solve several mechanical problems that occurred during operation of the linear

accelerator. My thanks are extended to them.








Finally, I would be remiss if I did not acknowledge all the time that I spent

together with every member of the physics group in the Department of Radiation

Oncology.















TABLE OF CONTENTS





A CKN O W LED G M EN TS .................................................... ....................................... iii

A B ST R A C T ................................................................................. .............................. viii

CHAPTERS

1 IN TRO D U CTION ...................................................................... .........................1

G general Introduction ................................................................... .............................
Significance of The Multileaf Collimator System............................. .......... 2
Overview of M LC Systems. ..................................................... ...................4
The A im of This Thesis ............................................................ ......................... 9

2 DEVELOPMENT OF AN MLC MODULE FOR A TREATMENT
PLANNING SYSTEM .................................. ..........................10

Introduction .................................. .................................................................... 10
M methods and M aterials............................... ......................... ........................11
Geometric Optimization of MLC Conformation............................ ........... 11
User Interface M odule ....................................................................13
R esu lts............................................. ................................................. .....................14
C on clu sion ................................................................................ ............................. 15

3 A STUDY OF THE EQUIVALENT FIELD CONCEPT FOR THE HEAD
SCATTER FA CTOR ............................................ ...........................................19

Introduction ......................................................................... ................................... 19
Methods and Materials........................ .. ... ....................................22
Equivalent Field for Head Scatter Factor...............................................................22
Equivalent Field for Wedge and Tertiary Collimator Scatter Factor...................27
R e su lts ............................................................................... ................................ ....2 9
Equivalent Field for Head Scatter Factor...........................................................29
Equivalent Field for Wedge and Tertiary Collimator Scatter Factor.....................34
D discussion ................................................................................. .............................3 7
C conclusion ................................................................................ .............................39








4 AN EQUIVALENT SQUARE FIELD FORMULA FOR DETERMINING
HEAD SCATTER FACTORS OF RECTANGULAR FIELDS ...............................40

Introduction ......................................................................... ...................................40
T theory ..........................................................................................................................42
Methods and Materials............................................................... ......................45
R esults............................................................................... .....................................46
D iscu ssio n ................................................................................. .............................5 3
C conclusion .................................................. ..................................................... 56

5 A GENERALIZED SOLUTION FOR THE CALCULATION OF IN-AIR
OUTPUT FACTORS IN IRREGULAR FIELDS .........................................58

Introduction ........................................................................... ................................. 58
Formalism of In-air Output Factor.........................................................61
Head Scatter Factor and Monitor Back Scatter Factor ........................................61
Presence of A Beam Modifier in The Field ...........................................64
A Shaped Field with A Tertiary Collimator .......................... ....................66
Calculation Algorithm .............................................................. .......................67
O pen F field ...................................................................... .................................. 67
W edged Field ........................................................ .................................. ......73
Methods and Materials............................................................. ........................76
R esults............................................................................... .....................................80
Tertiary Collimator Scatter Factor ......................................................................80
In-air Output Factor of Open Fields Defined by Tertiary Collimator.................... 80
In-air Output Factor of Varian Type Wedge (External Wedge) Fields .................84
In-air Output Factor of Irregular Shaped Fields.................... ..................... 87
D iscu ssio n ................................................................................... ...........................87
C o n clu sio n ............................................................................... ..............................90

6 TWO-EFFECTIVE-SOURCE METHOD FOR THE CALCULATION OF IN-
AIR OUTPUT FACTOR AT VARIOUS SDDs IN WEDGED FIELDS ...................92

Introduction ......................................................................... .......................... ......92
T theory ..................... ..................................................................................................94
Methods and Materials.............................................................. .....................100
R e su lts ....................................................................................... ........................... 10 1
D iscu ssio n ................................................................................... .........................110
C on clu sion ............................................................................. ............................. 11 1

7 CONCLUSIONS..................................................... .......................... ............113

General Discussion ........................................ ............ ...................... 113
C onclusions........................................................ .................................................. 1 8



vi








APPENDICES

A SOURCE PROGRAM OF THE MLC MODULE .........................................124

REFERENCES ................ ........................................203

BIOGRAPHICAL SKETCH ................... ...... ............ ........... 208















































vii














Abstract of Dissertation Presented to the Graduate School
of the University of Florida in Partial Fulfillment of the
Requirements for the Degree of Doctor of Philosophy

MODELING OF A MULTILEAF COLLIMATOR

By

Siyong Kim

August 1997


Chairman: Jatinder R. Palta
Major Department: Nuclear and Radiological Engineering

A comprehensive physics model of a multileaf collimator (MLC) field for

treatment planning was developed. Specifically, an MLC user interface module that

includes a geometric optimization tool and a general method of in-air output factor

calculation were developed.

An automatic tool for optimization of MLC conformation is needed to realize the

potential benefits of MLC. It is also necessary that a radiation therapy treatment planning

(RTTP) system is capable of modeling MLC completely. An MLC geometric

optimization and user interface module was developed. The planning time has been

reduced significantly by incorporating the MLC module into the main RTTP system,

Radiation Oncology Computer System (ROCS).








The dosimetric parameter that has the most profound effect on the accuracy of the

dose delivered with an MLC is the change in the in-air output factor that occurs with field

shaping. It has been reported that the conventional method of calculating an in-air output

factor cannot be used for MLC shaped fields accurately. Therefore, it is necessary to

develop algorithms that allow accurate calculation of the in-air output factor. A

generalized solution for an in-air output factor calculation was developed. Three major

contributors of scatter to the in-air output--flattening filter, wedge, and tertiary

collimator--were considered separately. By virtue of a field mapping method, in which a

source plane field determined by detector's eye view is mapped into a detector plane

field, no additional dosimetric data acquisition other than the standard data set for a range

of square fields is required for the calculation of head scatter. Comparisons of in-air

output factors between calculated and measured values show a good agreement for both

open and wedge fields. For rectangular fields, a simple equivalent square formula was

derived based on the configuration of a linear accelerator treatment head. This method

predicts in-air output to within 1% accuracy. A two-effective-source algorithm was

developed to account for the effect of source to detector distance on in-air output for

wedge fields. Two effective sources, one for head scatter and the other for wedge scatter,

were dealt with independently. Calculations provided less than 1% difference of in-air

output factors from measurements. This approach offers the best comprehensive accuracy

in radiation delivery with field shapes defined using MLC. This generalized model works

equally well with fields shaped by any type of tertiary collimator and have the necessary

framework to extend its application to intensity modulated radiation therapy.














CHAPTER 1
INTRODUCTION

General Introduction


The discovery of x-rays and radioactivity was promptly followed by its

therapeutic application in the treatment of benign and malignant diseases. The first

therapeutic use of x-rays is reported to have taken place on January 29, 1896, when a

patient with carcinoma of the breast was treated with x-rays. By 1899, the first cancer, a

basal cell epithelioma, had been cured by radiation. Nowadays, radiation therapy is used

in approximately half of cancer patients either in a stand alone therapy or in combination

with chemotherapy or surgery. Better cure rates with radiation therapy, preservation of

organ and its function, and cosmesis can be easily attributed to technological gains in

radiation physics and better insights into radiation biology and pathophysiology. The

primary goal of radiation therapy is to produce the highest probability of local and

regional tumor control with the lowest possible side effects. Most cancer cells, like other

highly proliferating cells, are more sensitive to ionizing radiation than normal cells. This

is the fundamental premise in radiation therapy. The difference, however, is not always

large enough to guarantee successful treatment all the time. Therefore, significant effort

has been expected in radiation therapy in developing means to conform the dose to the

tumor cells while minimizing the dose to the normal cells, and to deliver the dose as

accurately and safely as possible. Since the advent of radiation therapy, photon beams








have been used the most commonly. In the early days of radiation therapy, photon beams

from x-ray tubes were the only sources of radiation available at that time. Most

treatments were limited to diseases at shallow depths due to the lower penetrability of

these x-rays. With the development of the cobalt machine with the use of sealed, high-

activity 60Co source in 1951 (Johns et al. 1952, Green & Errington 1952), radiation

therapy techniques took a quantum leap. Although cobalt unit is still an important

machine today, linear accelerators have become the most commonly used treatment

machine in radiation therapy clinics. The developments of diagnostic modalities, such as

CT (computed tomography) and MRI (magnetic resonance imaging) have dramatically

increased the precision in localization of the tumor extensions and critical healthy tissues

in three dimensions. A greater precision in localization of the tumor volume has been

augmented by the computer controlled radiation therapy machines, equipped with

multileaf collimator (MLC) that enable precise customized beam shaping (Brahme 1987).



Significance of The Multileaf Collimator System

The computer controlled MLC system is regarded as the state-of-the art method

for generating arbitrary (and generally irregularly) shaped fields for radiation therapy.

Progress in imaging modalities such as CT and MRI dramatically enhance the ability to

differentiate and delineate the target volume and normal structures in three dimensions.

Better information about tumor shapes is leading to a greater need for achieving

conformal treatments. An MLC system is considered as the most versatile tool that is

available for delivery of three-dimensional conformal treatment. An MLC system for








conformal therapy is still a research tool with its use limited to only a few academic

centers. The MLC systems have also been used for shaping neutron beams. (Eenmaa et

al. 1985, Chu & Bloch 1987, Brahme 1988, Wambersie 1990). An MLC system offers a

number of other important advantages over conventional field shaping devices (Mohan

1992). First, an MLC can be used to implement computer-controlled dynamic or multi-

segmented conformal treatments in which the field aperture for each segment or direction

is automatically adjusted to conform to the shape of the target volume or to a desired

shape. Second, an MLC can be used to modulate intensity across the two dimensional

profile of a field. Third, an MLC eliminates the effort and cost of fabricating custom

blocks such as used in conventional treatments within static fields. It also eliminates the

need for storage space for blocks and blocking trays, and the effort required in lifting and

mounting heavy blocks. The use of the MLC system for static fields provides savings in

set-up time while reducing the probability of set-up mistakes.

There are some concerns in the field conformation with an MLC. An MLC can

provide only a 'zigzag' approximation to the shape of the target volume because of the

finite leaf edge dimension. This inevitable drawback of the MLC requires some change in

the concept of beam collimation. It is important to realize that an MLC does not provide

exact conformation to the target contour drawn by a physician. The degree of

nonconformality depends on the direction of the leaf placement along the contour edge.

Therefore, it is essential that there are methodologies available which allow optimized

positioning of the leaves automatically around the target contour. More importantly this

step should be completely incorporated within the treatment planning process.








Overview of MLC Systems

Motor-driven MLC systems have been in use since the mid-fifties (Mohan 1992,

Webb 1993). These devices have become very popular within the past several years and

many commercial MLCs (e.g., Siemens, Scanditronix MM50, Varian C-series, and

Philips SL-series) are now readily available. The MLC systems provided by different

venders are different in design and thus have different dosimetric characteristics. There

are two fundamentally different design concepts of MLC configuration. The first one

incorporates the MLC as an integral part of the secondary collimator system, thus

replacing either the upper or lower secondary collimator jaws. In the second design, the

MLC is attached below the secondary collimator system as a tertiary collimator system.

The advantage of the latter design is that repair of the MLC is relatively easier than an

integral MLC, thus allowing the machine to be operated in a conventional mode even

when the MLC is down. The disadvantage is that an enlarged treatment head reduces the

collision free zone for certain clinical setups.

The Philips Medical System offers an MLC system that is an integral part of the

secondary collimator system. In the Philips MLC, the MLC replaces the upper secondary

collimator jaws. The travel of MLC leaves is parallel to the axis of rotation of the gantry,

that is, in the y-direction. The MLC is augmented by a backup collimator which is located

below the leaves and above the lower jaws. The purpose of backup collimator is to

decrease the intensity of transmitted radiation through the MLC. Backup diaphragms are

designed to move automatically to the edge position of the outermost withdrawn leaf.

Because the vertical location of the MLC is close to the source, the range of motion of the








leaves is smaller in this configuration than compared to others. Consequently, it is

possible to make a more compact treatment head. On the other hand, the leaf width is

somewhat smaller and the tolerances on the dimensions of the leaves as well as the leaf

travel are tighter than those for other configurations. Another concern from an

engineering point of view is that gaps are inevitable between two adjacent leaves (to

reduce friction) and opposite leaves (to prevent collision). If the mechanical gap distance

is fixed, the irradiated area over the leakage radiation through the gap is larger when the

position of the gap is closer to the source. Therefore, a more integrated leakage is

expected for this configuration.

The configuration of the Scanditronix (Racetrack Microtron, MM50), Siemens,

and General Electric (GE) MLC systems is very similar to the previous configuration

except that the lower jaws are replaced with the MLC. In both the Scanditronix and the

Siemens design, the leaf ends are straight and are focused on the x-ray source. The leaf

sides are also matched to the beam divergence and that makes these leaves "double

focused". The Scanditronix MLC is positioned at 31 cm from the isocenter with a

maximum field size of 32 x 40 cm2 and a maximum over-center position of 5 cm. The

width of the individual leaves at isocenter is 1.25 cm. The Siemens MLC consists of 29

opposed leaf pairs. While the two outer leaves of each leaf bank project to a width of 6.5

cm, the inner 27 leaf pairs project to a width of 1.0 cm at the isocenter plane. Each leaf is

independently controlled and moves with the maximum velocity of 1.5 cm/sec. The

projected field edge of each leaf can be withdrawn up to 20 cm away from the isocenter

and can travel up to 10 cm across the isocenter. The leaves may be manually positioned








with an MLC hand control and these leaf-settings can be uploaded to an information

management record and verification system. The GE configuration uses curved leaf ends

and contains a secondary 'trimmer' similar to the Philips backup diaphragm. However,

this trimmer is located above the upper jaws in the GE design.

In the Varian design, MLC is an add-on device that mounts to the existing clinical

accelerator head thereby making it field retrofitable. The advantage of this design is that

it is possible to avoid down-time in the event of a system malfunction. In this

configuration, the leaves can be manually moved out of the field when a system failure

occurs. Treatment can continue with replacement Cerrobend blocks. A total of 26 pairs of

leaves can produce the maximum MLC field size of 26 x 40 cm2 at the isocenter plane.

The newer model of the Varian MLC has 40 pairs of leaves which gives a maximum field

size of 40 x 40 cm2. Each leaf can travel up to 16 cm beyond the isocenter with the

maximum leaf speed of 1.5 cm/sec (5 cm/sec in new design). Since the MLC is located

far from the source, the travel length of the leaves required to produce the same field size

is longer than in other configurations, thus it enlarges the diameter of the treatment head.

Clearance (from the bottom of the MLC to the isocenter) is 42.4 cm. Clearance can

potentially be a minor problem in some clinical cases.

Another tertiary system is the Mimic device provided by NOMOS Corporation.

This is designed to mount on the blocking tray of a linear accelerator. It collimates the x-

ray field to a fan-beam which is dynamically modulated by short-stroke leaves as the

gantry of the accelerator is rotated. The modulated fan beam irradiates a transverse plane








of the patient that is 2 cm thick. The leaves are either fully inserted into the beam or fully

retracted, providing either full attenuation or no attenuation at a given gantry angle.



In general, the following attributes of an MLC system affect its dosimetric

characteristics:



1) Leaf shape: Ideally one would like the leaves to be "double-focused", that is,

leaves form a cone of irregular cross-section diverging from an apex located at the

radiation source. The leaves travel on a spherical shell centered at the source.

This type of MLC produces a sharp cut-off at the edge and is used by at least two

of the manufacturers (Scanditronix and Siemens). However, double focusing is

difficult to achieve from the engineering point of view. Therefore some

manufacturers (Varian and Philips) use rounded leaf edges. The edge of each leaf

is a section of a cylinder and the leaves travel in a plane perpendicular to the

central ray. The purpose of rounded edges is to keep the transmission through the

leaf constant regardless of its position with respect to the central ray. There are

some potential problems with such designs: first, the light field may not coincide

with the 50% width of the radiation field; secondly, the radiation field may shift

as much as 5 mm when the leaves move from 0 to 20 cm.



2) Integral MLC vs. optional attachment: The integral MLC (such as those by

Scanditronix and Philips) replaces one pair ofjaws. In most instances, however,








the MLC is offered as an optional attachment (e.g., Varian). In an integral MLC,

the leaves are at the same distance from the flattening filter and the source as the

jaws they replace. Therefore, they affect the output in the same manner as the

jaws. On the other hand, an MLC offered as optional attachment is farther away

from the flattening filter and it affects the output in a manner similar to

conventional blocks.



Many authors have studied general dosimetric characteristics of MLC systems,

such as field-size dependence of output factors (Jordan & Williams 1994, Palta et al.

1996, Boyer et al. 1992), depth doses (Boyer et al. 1992, Huq et al. 1995, Palta et al.

1996), isodose distribution (Boyer et al. 1992, Zhu et al. 1992), penumbra (Galvin et al.

1992 and 1993, Boyer et al. 1992, LoSasso et al. 1993, Jordan & Williams 1994, Huq et

al. 1995, Palta et al. 1996, Powlis et al. 1993), and leaf transmission data (Jordan &

Williams 1994, Palta et al. 1996, Boyer et al. 1992, Huq et al. 1995, Galvin et al. 1993,

Klein et al. 1995). The dosimetric parameter that has the most profound effect on the

accuracy of dose delivered with an MLC is the change in output factor, especially the in-

air output factor that occurs with field shaping.

In linear accelerators, the in-air output factor changes according to the collimator

opening. The MLC, as a collimator system, also affects the characteristics of the in-air

output factor. The conventional method of in-air output factor calculation can often have

a significant discrepancy between the predicted and measured values when it is applied to








MLC systems. Therefore it is necessary to develop an accurate method of in-air output

factor calculation that can be applied to MLC shaped fields.



The Aim of This Thesis



The aim of this work is to develop a physics model for treatment planning which

describes the high energy photon beam collimated by an MLC system.

The above objective is divided into three goals which are essential in clinically

supporting MLC systems:



1. To develop and implement an algorithm for the geometric optimization of MLC

conformation based on an arbitrary contour shape (Chapter 2).



2. To develop and implement a user interface module of the MLC into a radiation

therapy treatment planning (RTTP) system based on a beam's eye view (BEV)

display (Chapter 2).



3. To develop an algorithm to determine the change of in-air output factor for

shaped fields (Chapters 3 6).













CHAPTER 2
DEVELOPMENT OF AN MLC MODULE FOR
A TREATMENT PLANNING SYSTEM

Introduction


An MLC system offers a state-of-the-art method for field shaping in radiation

therapy. The advantage of using an MLC is that since the field shaping is performed

using leaves, the fabrication of custom blocks is no longer needed. This increases the

treatment delivery efficiency because multiple fields can be treated in a short time

without reentering the treatment room. It also eliminates all problems associated with

heavy blocks, alterations, remodeling and remounting. The most important advantage of

this technology lies in its potential for use in the delivery of 3-D conformal therapy and

intensity modulated radiation therapy.

An issue that discourages some clinicians from accepting MLCs more readily is

the 'zigzag' approximation to the shape of the target volume with an MLC system

because of the finite leaf edge dimension compared with the smooth conformation using

shaped blocks. This inherent drawback of MLCs introduces some change in the concept

of beam collimation; that is, an MLC does not necessarily coincide with the target

contour prescribed by a physician. Given the geometrical constraints of the setup, it is

only possible to achieve an 'optimal' field fit with the MLC system. The optimization

criteria must be incorporated into the planning process as efficiently as possible. Manual

placement of all leaves (52 or 80 leaves maximum) that define an MLC portal can be








unacceptably time consuming. Therefore, a facility that automatically derives optimized

MLC leaf positions from a prescribed target contour and uses this information for a

subsequent treatment plan is necessary.



Methods and Materials



Geometric Optimization of MLC Conformation

The MLC system should be completely integrated in the planning process to

realize its full potential clinical benefits. The problem that must be solved is to determine

the best MLC leaf positions for the optimal target volume conformation. The use of

conventional Cerrobend blocks to get tertiary field margins has provided radiation

oncologists a means of smoothly matching the edge of collimation with the projection of

the irradiation volume. However, when an MLC is used, the collimation occurs in

discrete steps. Therefore, it is important to determine optimal placement of each leaf with

respect to the field edge. Several treatment machine-dependent characteristics must be

made known to determine leaf settings automatically with a computer algorithm, such as

the number of leaves, their widths, travel limits, source to MLC distance, and relative leaf

travel direction.

In this study, an optimization program was designed to fit a Varian MLC system.

Nevertheless, it is flexible in nature and can be adapted to any MLC systems. In the

Varian design, the MLC is an add-on device that mounts to the existing clinical

accelerator head. A total of 26 pairs of leaves can produce the maximum MLC field size








of 26 x 40 cm2 at the isocenter plane. Each leaf can travel up to 16 cm beyond the

isocenter with the maximum leaf speed of 1.5 cm/sec.

In the design of the optimization program, three automatic leaf coverage strategies

were provided as illustrated in Figure 2-1:



(a) 1/2 Overblocking : Each leaf end intersects with the prescribed field edge at its

midpoint. This is a simple algorithm that sets equal amounts of overblocking and

underblocking with regard to each leaf (LoSasso et al. 1993).

(b) Full overblocking (or zero underblocking): Leaf positions are always inside the field

to minimize the irradiation of normal tissue.

(b) 1/3 Overblocking: Each leaf end intersects with the prescribed field edge at one of the

'one third point' of the leaf end. In this strategy, about 1/3 of the leaf end is inside the

field. This strategy is a simplified algorithm of'variable insertion' done by Zhu et al.

(1992) that results in the 50% isodose line always outside the desired field edge.


Figure 2-1. Three automatic leaf conformation strategies.








Depending on the shape of the contour, it is often necessary to rotate the

collimator or to shift the contour with respect to the beam to get a better fit of leaves with

the target contour (e.g., 90 rotation for the diamond shape of contour). Strategies of

collimator rotation and contour shift are also provided. In the contour shift option, a

contour can be shifted in both the x- and y-direction.

Regardless of the automatic technique used, the MLC aperture shape may not be

logical when evaluated by the treatment planner. Sometimes, it is necessary to adjust

individual leaves to ensure target coverage in a critical region or to avoid small critical

structures, e.g., the optic chiasm, which may be close to a target volume. Therefore, a

manual leaf adjustment facility is provided in the BEV. In this option, each leaf can be

manually positioned, around a target volume or a critical structure.



User Interface Module

It is desirable to have MLC field shaping algorithm which is incorporated into the

RTTP system. A stand alone software package is more error prone and time consuming.

Therefore, it is necessary to develop and implement an user interface module of the MLC

model within an existing RTTP system.

There are many commercially available RTTP systems. Although the functional

characteristics of RTTP systems are very similar to each other, each RTTP system is

different from others in the structure of its programming; thus, an user interface module

of the MLC must be compatible with the RTTP system used at each hospital. One of the

more popular commercial RTTP systems is the Radiation Oncology Computer Systems








(ROCS) RTTP system (ROCS 1994) which was installed in the University of Florida's

Department of Radiation Oncology in 1994 and has been used as its main RTTP system.

In this study, an MLC user interface module which is adaptable to the ROCS RTTP

system was developed.

The source program for the user interface module is written in BASIC. Because

most modules of the ROCS RTTP system are written in BASIC, this was the

programming language of first choice. The following key points were adhered to during

the development of this MLC software module:

a) minimal change of the present source program,

b) minimal change of the present program structure,

c) minimal change of the present data library and their format, and

d) easy adaptation of the new module to the present RTTP system.



Results



A total of 38 subroutines were newly created and 8 present subroutines were

revised to develop an MLC optimization and user interface module for the ROCS main

RTTP system. The description of each newly generated subroutine is summarized in

Table 2-1. The complete source program of the module is contained within Appendix A.

Figure 2-2 shows a flow chart of the module. In the ROCS main module, users

enter into the irregular field module. Using the 'field editor' module, users can create

irregular fields. Once irregular fields are provided, the 'MLC field editor' module can be








used. In the 'MLC field editor' module, users can create MLC fields using the 'edit field'

tool. To perform leaf conformation, MLC geometric optimization strategies are used in

the 'edit field' tool. For geometric optimization, 'automatic fit', collimatorr angle

selection', 'contour shift', and 'manual fit' strategies are used. Calculation points can be

defined after the MLC field is provided using the 'point editing' tool. Once an MLC field

is created, users can make the opposite field simply by selecting the 'opposite field'

option in the 'MLC field editor' module. The 'export field' option creates an ASCII file

for file transfer to the MLC controller computer on the treatment machine.



Conclusion



An MLC geometric optimization and user interface module was developed as part

of this research. The module was implemented to the main RTTP system, ROCS (version

5.1.1) and is currently in clinical use. The planning time was significantly reduced by

incorporating the MLC module into the main RTTP system.








Table 2-1. Description of subroutines.


MLCINI: This subroutine specifies MLC dimension and set main variables.
MLCDRAW: This subroutine draws MLC leaves with leaf position data.
MLCOPT: This subroutine searches geometrically optimized MLC leaf
position.
MANOPTI: This subroutine enables manual MLC field editing.
LEAFLT: This subroutine moves leaf to left direction during manual fit.
LEAFUP: This subroutine selects upper leaf during manual fit.
LEAFRT: This subroutine moves leaf to left direction during manual fits
LEAFDN: This subroutine selects lower leaf during manual fit.
REDRAWMLC: This subroutine redraws MLC leaf changed during manual fit.
NOTELEAF: This subroutine assigns different color to selected leaf during leaf
change in same side.
NOTE2LEAF: This subroutine moves cursor and assigns different color to
selected leaf during leaf change between two different sides.
MLCSETMENU: This subroutine displays MLC field editor menu.
AUTOFIT: This subroutine carries out geometric optimization for MLC field
automatically.
MANUFIT: This subroutine carries out geometric optimization for MLC field
manually.
MLCOPTUNDER: This subroutine searches geometrically underblocked MLC leaf
position.
MLCOPTOVER: This subroutine searches geometrically overblocked MLC leaf
position.
AUTOUNDER: This subroutine carries out geometric underblocked optimization
for MLC field automatically.
AUTOOVER: This subroutine carries out geometric overblocked optimization
for MLC field automatically.








Table 2-1. -- continued.

CONVERTANG: This subroutine converts collimator angle in degree to radian
and get sine, cosine values.
MLCGETANG: This subroutine gets collimator angle in degree as user input.
MLCSHIFTX: This subroutine gets MLC offset in X-dir. as user input.
MLCSHIFTY: This subroutine gets MLC offset in Y-dir. as user input.
MFLDDATA: This subroutine gets collimator opening, field outline and
calculation point location for MLC field.
SAVEMFLD: This subroutine prompts the user to save MLC field data. If the
user chooses to save the data the MLC data file and the irregular
library file are updated.
MFLDDEF: This subroutine displays an MLC field based on user input. The
user selects an MLC field and chooses to edit, load, oppose or
export MLC fields.
GETMFLD: This subroutine gets MLC field data from the file.
IR7: This subroutine is the MLC field main editing menu. Control is
transferred to the appropriate routine based on which function key
is pressed.
ISODRW: This subroutine draws original isocenter before MLC offset
LEAFINI: This subroutine sets initial values for leaf position.
LEAFRETRIV: This subroutine sets existing MLC field.
GETIFLD2: This subroutine gets irregular field data from the file.
SAVEIFLD2: This subroutine prompts the user to save irregular field data. If the
user chooses to save the data the irregular data file and the irregular
library file are updated.
GETMFLD2: This subroutine gets MLC field data from the file.
SAVEMFLD2: This subroutine prompts the user to save MLC field data. If the
user chooses to save the data the MLC data file and the irregular
library file are updated.









Table 2-1. -- continued.

MLCOPPOSE: This subroutine creates opposed MLC field. Opposed block field is
generated at the same time.
MLCEXPORTV: This subroutine creates MLC field data file to be exported for
Varian type. Exported file can be directly used by Varian MLC
software, "SHAPER".
MLCSELECT: This subroutine prompts the user to select MLC type.
MLCIPAGE: This subroutine displays one page of beam information for MLC
field.


ROCS main module

Irregular field module
I


SLeaf conformation

Automatic fit
a) uwr-lockang
b) haff-blocdng
c) ovwr-blocking

Collimator angle

Contour shift

lManual fit


Calculation point defining -
a) point eating


Figure 2-2. Outline of MLC module.














CHAPTER 3
A STUDY OF THE EQUIVALENT FIELD CONCEPT FOR
THE HEAD SCATTER FACTOR

Introduction


In general, the equivalent field is defined as a field having the same central axis

depth-dose characteristics as the given field (Jones 1949, Day 1950). The relationship

between equivalent fields is based on integration of the phantom scatter parameter for

shaped fields. Therefore, a field is determined that produces the same ratio of phantom

scatter to primary dose on the central axis (Day & Aird 1983). It has been generally

assumed that the radiation output has two scatter components, Sc and S,; in convention, Sc

is referred to as the collimator scatter factor, which is characterized by the X and Yjaw

collimator openings, and Sp accounts for phantom scatter, which depends on the area of

the irradiated phantom. Although Sc is called the collimator scatter factor, Sc accounts for

both the monitor backscatter contribution and the head scatter contribution to the in-air

output. The monitor backscatter factor (Lam et al. 1996, Ahnesjo et al. 1992, Patterson &

Shragge 1981, Luxton & Astrahan 1988, Moyer 1978, Higgins et al. 1989, Kubo & Lo

1989, Kubo 1989, Duzenli et al. 1993) can be separated from Sc. The term, 'head scatter

factor' is limited to the contribution of head scatter in this present study. For nonstandard

fields such as rectangular and irregular fields, conventionally, S, is obtained through the

equivalent field relation, and the equivalent field relation for phantom scatter is well








established (Day & Aird 1983, Bjmrngard & Siddon 1982). The equivalent field method

has also been applied for determination of the scatter contribution to the in-air dose from

any scattering structure, such as the flattening filter. The stipulation is that the equivalent

field contributes the same amount of scatter radiation on the central axis as the

collimator-set field. The relationship between equivalent fields for head scatter is based

on integrating the head scatter parameter of the shaped field and finding the field that

produces the same ratio of head scatter to primary dose on the central axis. The head

scatter characteristics are not the same as the phantom scatter characteristics. Therefore, it

is necessary to establish the equivalent field relationship for head scatter separately from

that for phantom scatter.

When a scattering structure is located above the collimator, such as the flattening

filter or an internal wedge, the amount of scatter radiation that can reach a detector is

related to the configuration of the field at the source plane as seen from the detector, that

is, the detector's eye view (DEV) field (Lam et al. 1996, Ahnesjo 1994). When head

scatter factor is parametrized at the flattening filter (or the source) plane (Lam et al. 1996)

or the field mapping method (see Chapter 4) is used, it is imperative to assess the

equivalent field relationship at the source (or flattening filter) plane. Lam et al. (1996)

empirically showed that the formula of the area-to-perimeter ratio for the equivalent

square of a rectangular field for phantom scatter (Sterling et al. 1964, Worthley 1966) is

also valid for head scatter at the source plane and this relationship was successfully

applied to obtain a modified equivalent square formula at the detector plane through the

field mapping method. For an irregular field, conventionally, the head scatter factor is








approximated by that of the rectangular field determined by the secondary collimators.

Although the conventional method gives a good approximation in most clinical cases, the

difference of head scatter factor between a rectangular field and an irregular field can be

significant when the irregular field is much smaller than the rectangular field such as

mantle fields and fields in intensity modulation therapy. Furthermore, when an irregular

field is created by Philips type MLCs, which replace the upper set of secondary

collimators, the conventional method can not be used (Palta et al. 1996). In these cases,

Clarkson integration (Clarkson 1941) can be applied for a better estimation of head

scatter factor for irregular fields (Boyer 1996). To use Clarkson integration, it is required

to evaluate the equivalent field relationship between a circular field and a square field.

The use of Clarkson integration can also be expanded for the prediction of scatter

contribution from both the beam modifier (e.g., wedge) and the tertiary collimator (e.g.,

Cerrobend block and Varian type MLC) when it is needed to independently deal with

wedge scatter or tertiary collimator scatter. The amount of scattered radiation from a

wedge depends on the area of the wedge that intercepts the radiation coming downstream

through the treatment head. If a wedge is located above the collimator jaws like that in a

Philips machine, the detector's eye view field at the source plane can be used for both

head scatter and wedge scatter. However, when the wedge is located underneath the

secondary collimator like that in a Varian machine equipped with an MLC, the field size

for the wedge scatter contribution is different from the field size for the head scatter

contribution. Whereas the head scatter contribution is determined by the field seen by the

detector's eye view, the wedge scatter contribution depends on the field size projected at








the detector plane. Therefore, in this case, wedge scatter should be dealt with separately

from head scatter. Tertiary collimator scatter contribution may also be separately treated

when the amount of scatter is not negligible. For both wedge and tertiary collimator

scatter, the amount of scatter radiation that can reach a detector is related to the

configuration of the field projected at the detector plane. Therefore, in these cases, the

equivalent field relationship is obtained at the detector plane.

In this chapter, the equivalent field relationship of square and circular fields was

provided at the source plane for the head scatter factor. The fact that the area-to-perimeter

ratio of the equivalent square of a rectangular field for phantom scatter is also valid for

head scatter at the source plane (Lam et al. 1996) was analytically investigated. The

equivalent field relationships for wedge scatter and tertiary collimator scatter were

assessed at the detector plane.



Methods and Materials



Equivalent Field for Head Scatter Factor

The photon energy fluence equation at a detector point may be defined as




F= p(1 + (3.1)


= 'Tp(l + SPRh), (3.1)








where 4p is the energy fluence due to primary photons, ,s is the energy fluence due to

scatter photons from the head, and SPRh is the ratio of scatter fluence originating in head

to primary fluence. Assuming that dose is linearly proportional to energy fluence in

megavoltage photon beam, the equivalent field can be defined as the field that gives the

same scatter-to-primary ratio, SPRh, as the collimator-defined field. The SPRh of any

arbitrary shaped field is the integration of the differential scatter-to-primary ratio function

over the whole field,

SPR dSPRh dA (3.2)
dA

Several models have appeared in the literature that accurately describe the scatter photon

energy fluence distribution that emanates from the head such as uniform (Ahnesj et al.

1992), triangular (Ahnesjo 1994), Gaussian (Dunscombe & Nieminen 1992), a

combination of several functions (Yu & Sloboda 1993), and experimentally determined

distribution functions (Jaffray et al. 1993). Ahnesjb (1994) concentrated on scattered

photons from the flattening filter and calculated the differential scatter-to-primary ratio of

flattening filter scatter, dSPR,/dA, according to the radius from the central axis, using the

first scatter approximation. Ahnesjo's work showed that dSPRf/dA is well described by

either Gaussian or triangular function (Ahnesj6 1994). Since the dominant contributor of

head scatter is the flattening filter (Kase & Svensson 1986), we assume that the

equivalent field relationship for head scatter primarily depends on the characteristics of

scatter from the flattening filter. We can replace SPRh with SPRf, the scatter-to-primary

ratio of scatter from the flattening filter, in Eq. (3.2):








SPRf = J dSPRfA (3.3)
dA

Based on Ahnesj6's study (Ahnesj6 1994), it is assumed that the differential scatter-to-

primary ratio of flattening filter scatter, dSPR,/dA, decreases linearly according to the

radius within the physical radius of the flattening filter, that is,

dSPRf
dP = b-ar, (3.4)


where a and b are coefficients dependent on the photon beam energy and the shape and

material of the flattening filter. By substituting Eq. (3.4) into Eq. (3.3), the scatter-to-

primary ratio for scatter from the flattening filter for any field is given by

SPRf= J(b-ar)dA (3.5)

It has been reported that the contribution of backscatter into the monitor chamber

has a significant influence on the dependence of in-air output on secondary collimator

settings (Lam et al. 1996, Ahnesjo et al. 1992, Patterson & Shragge 1981, Luxton &

Astrahan 1988, Moyer 1978, Higgins et al. 1989, Kubo & Lo 1989, Kubo 1989, Duzenli

et al. 1993). However, monitor backscatter affects both primary and scatter photons in the

same way, thus, the shape of the differential scatter-to-primary ratio function, dSPR
dA
does not change. That is, the equivalent field relationship is not affected by the monitor

backscatter at the source plane if monitor backscatter factor is separated from collimator

scatter factor.

Equivalent square of a circular field. For a circular field with radius R, the result of the

integration (Eq. [3.5]) is








SPRi(cir) = bntR2 a 2 nR
3

=3.142bR2 -2.094aR3 (3.6)

For a square field with a side of s=2o the result of the integration (Eq. [3.5]) is

SPRf (sq)=4b 2 -3.061ao3 (3.7)

From Equations (3.6) and (3.7),

4ba2 -3.061ac3 =3.142bR -2.094aR3 (3.8)

By dividing both sides with b R3 and using (a/b) = (1/R, in Eq. (3.8), we can

eliminate the coefficients, a and b, that is, we get


4( )2 3.061( ),( 3 = 3.142( 2.094 1 (3.9)
Ra ) \ R R Rm '

where Rm is the maximum radius of the flattening filter. Now, multiply Eq. (3.9) by R

and rearrange to obtain

(4a2 3.142)+(2.094- 3.061a3 R R =0 (3.10)

where =(c IR). Equation (3.10) indicates that a is dependent on the radius R. For a

very small field, that is, when R -> 0, a =0.886 is obtained. Note that this is the same

result that would be obtained by simply equating the area of the circle to the area of the

square. Whereas Eq. (3.6) is valid within the maximum radius of the flattening filter, R,

, the valid range of Eq. (3.7) is given by one half the side of the largest square which can

be inscribed within the circle of radius R,,, that is, a mx =Rmiax /-2. Therefore, the safe

limit of R, which guarantees the validity of Eq. (3.10), is given by Rm,, = Rax / J2. With








R = Rim,, Eq. (3.10) gives a 0.9. Therefore, we can find the approximate range within

which the equivalent square field exists for the given circular field,

0.886R < a < 0.9R (3.11)

where R = the radius of the circle anda =one half of the side of the square. For

convenience, we may use one value of a = 0.9R. Equation (3.11) is obtained within

the dimension of flattening filter. However, it is considered that it can be used even when

a field at the flattening filter plane (or source plane) is larger than the dimension of the

flattening filter because the amount of scatter outside the flattening filter is relatively

small and slightly varies according to the radius. This fact is discussed in detail in

discussion section.

In-air output factors of circular fields and square fields were measured with a

cylindrical acrylic miniphantom as described by van Gasteren et al. (1991). The

cylindrical phantom is 3.8 cm in diameter and 15 cm long. Measurements were taken on a

Varian 2100C with 8 MV and 18 MV photon beams. A shonka plastic 0.1 cc ionization

chamber was inserted in the miniphantom with its center located at 5 cm for 8 MV or 10

cm for 20 MV from the front surface and 100 cm from the source. Both circular fields

(radius, r = 2.2, 3.3, 5.6, 7.8, and 10 cm at the source plane) and square fields (side, s = 4,

6, 10, 14, and 18 cm at the source plane) were created by an MLC. Each square field

corresponds to the equivalent square field of each circular field. During the

measurements, secondary collimators were set as 40 x 40 to eliminate the relative effect

of monitor backscatter.








Equivalent square of a rectangular field. For a rectangular field of dimensions L x W, the

integration (Eq. [3.5]) gives


SPRf(rec) = bLW a I2 2LWD+ L3ntan4 +_ +W3 ntan( _i-
I4 2 \2 2


= bLW -a 12LWD+L In D+W-L + In l (3.12)
12 I L+W-D] L W 11

where D is the length of the diagonal of the rectangle and < = tan-' W I L. In Equations

(3.7) and (3.12), it is not easy to obtain a simple equivalent square correlation for a

rectangular field.

Lam et al. (1996) obtained good agreements between the head scatter factors of

square fields and those of rectangular fields by using the area-to-perimeter ratio formula

as an equivalent square formula at the flattening filter plane for 6 MV and 15 MV photon

beams of Varian 2100C. We have calculated 1 +SPRyvalues, using Eq. (3.12) for different

L x Wrectangular fields and Eq. (3.7) for square fields of s = 2LW / (L + W) and

compared each other.



Equivalent Field for Wedge and Tertiary Collimator Scatter Factor

For both wedge and tertiary collimator such as a conventional Cerrobend block

and Varian-type MLC, we can assume

dSPR
-d =a (3.13)
dA

With Eq. (3.13), it is trivial to calculate an equivalent square field,








o = 0.886R, for a circular field with radius R, (3.14a)

and

s = 2a = -LW, for a rectangularfieldof Lx W. (3.14b)

For convenience, we can use a = 0.9 R for a circular field without significant error.

To evaluate the validity of the assumption, Eq. (3.13), scatter contribution from

tertiary collimator (Cerrobend block and Varian MLC) was measured according to the

irradiated area with the same mini-phantom as described in the section Equivalent square

of a circularfield. A set of measurements were made underneath a solid piece made out

of the same material as the tertiary collimator material (Cerrobend or MLC) with field

sizes ranging from 4 x 4 to 20 x 20 cm2 at the detector plane. The thickness of Cerrobend

block was 7.5 cm. The data were extrapolated to 0 x 0 cm2 field. The in-air output of (0,0)

field multiplied by Sc(X, Y)/Sc(0,0) was subtracted from in-air output for each field size,

(X, Y). The remaining in-air output of each field is only due to the scatter radiation from

tertiary collimator material. Scatter contribution from a 450 wedge was also measured.

When Clarkson integration is carried out on wedge scatter for an irregular field, the

assumption Eq. (3.13) is theoretically not correct, except in the case of a symmetric field,

because of the change in wedge thickness. However, if the difference in in-air output

between asymmetric fields is not significant, we may use that assumption without

significant error. We measured in-air outputs for a pair of asymmetric wedged fields (see

Figure 3-1). One field contains the most thin part and very little of the thick part of the

wedge, and the other is reverse (e.g., field sizes [X1=2.5, X2=10, Y1=10, Y2=10] and

[Xl=10, X2=2.5, YI=10, Y2=10], in which the Xaxis was parallel to the axis of slope of








the wedge). The contribution of unattenuated photons to in-air output is same for both

fields because the detector is located at the isocenter. The only difference comes from

wedge scatter contributions.


a) Field of thin part


b) Field of thick part


Figure 3-1. Description of a set of asymmetric wedged fields. The contribution of
unattenuated photons to in-air output is same for both fields. However, the wedge scatter
contribution is different.


Results



Equivalent Field for Head Scatter Factor

Equivalent square of a circular field. The measured in-air output factors of an 8 MV and

18 MV photon beams of Varian 2100C are shown in Figures 3-2 and 3-3, respectively. In

Figures 3-2 and 3-3, the in-air output is normalized to that of 10 x 10 MLC field at the

source plane. Circular fields are converted to equivalent square fields using the equivalent
















1.01
Varian 2100C, 8 MV, open, 40 x 40 fixed jaw settings
."

0
S 1.00
X




0.99

0 ..-.- Square
SCircle
0.98
0



0.97
0 5 10 15 20

Side of Equivalent Square Field at Source Plane (cm)



Figure 3-2. In-air output factor as a function of a circular field at the source plane for the
8 MV photon beam of a Varian 2100C. Fields were made by an MLC system. During the
measurements, secondary collimators were fixed at 40 x 40 cm2. Data are plotted
according to the side of the equivalent square obtained by a = 0.9R. Data for square
fields are also plotted for comparison.
















1.01
Varian 2100C, 18 MV, open, fixed 40 x 40 jaw settings

"o
1.00
x
0



S0.99


0 /.- Square
Circle
S0.98
0
.h



0.97
0 5 10 15 20

Side of Equivalent Square Field at Source Plane (cm)


Figure 3-3. In-air output factor as a function of a circular field at the source plane for the
18 MV photon beam of a Varian 2100C. Data are plotted according to the side of the
equivalent square obtained by a = 0.9 R.








field relation, a = 0.9R. The difference of in-air output factors between circular field

and square field is within 0.2 % for both 8 MV and 18 MV beams. Measured in-air output

accounts for not only head scatter but also the effect of backscatter into the monitor

chamber and forward scatter to the detector from the MLC. However, since the field

shapes of circular fields and square fields are very close, it is considered that the amounts

of scatters (both backscatter to the monitor chamber and forward scatter to the detector)

of both fields are almost the same. Therefore, the difference of in-air output factors

between two fields (circular and square fields) indicates the difference of head scatter

factors. In a Varian 2100C, the radius of flattening filter is 3.6 cm at the source plane.

That is, two fields (r = 2.2 and 3.3 cm) are smaller than the flattening filter and others are

larger. Measurements show that the equivalent field relation, r = 0.9R is also valid

even when a field is larger than the flattening filter.

Equivalent square of a rectangular field. Values of the percentage differences between

values for 1+SPRffor rectangular and square fields are plotted in Figure 3-4 according to

the elongation ratio. In Figure 3-4, the percentage difference was calculated as

100[{l+SPR/eq. square)}-{l+SPR/rectangle)}] / {1+SPR/rectangle)} (3.14)

The coefficients a and b in Eq. (3.4) are obtained from Ahnesj6's work (Ahnesjb 1994).

From Figure 3-4, it can be noted that the amount of difference is dependent on the beam

energy and the material and size of flattening filter. The most dominant factor is the

material of the flattening filter. Whereas an aluminum flattening filter shows a larger

difference (maximum -2.9 % with an elongation ratio of 10), a tungsten filter shows a

smaller difference (maximum -1.4 % with an elongation ratio of 10). We can also see that















0.50


0.00 -


-0.50


S -.00 -o *
-* !

-1.50
S* Al Filter, 24MV, Rmax=4 (a=0.0025, b=0.01)
-2.00 At Filter, 4MV, Rmax=4 (a=0.0005, b=0.002) 4
AW Filter, 24MV, Rmax=4 (a=0.0012, b=0.0048)
-2.50 W Filter, 4MV, Rmax=4 (a=0.0004, b=0.0016)
x Al Filter, 24MV, Rmax-5 (a=0.00225, b=0.0124)
3.00 W Filter, 24MV, Rmax=5 (a=0.00102, b=0.0056)
-3.00 J
0.0 2.0 4.0 6.0 8.0 10.0
Elongation Ratio



Figure 3-4. Difference (%) of I +SPRJ between a rectangular field and the equivalent
square field according to the elongation ratio. The equivalent field is determined by the
area-to-perimeter relation. The difference (%) is given by 100[{l+SPR,(eq. square)}-
{1+SPR rectanglee)] / {1+SPR/rectangle)}. Data for determination of dSPRf/dA are
obtained from Ahnesj6's work (Ahnesji 1994). The elongation ratio is given by [length
of long side] / [length of short side] of the rectangular field.








a smaller flattening filter (R,_= 4 cm) gives less difference (-1.27 % for an aluminum

filter with an elongation ratio of 7 and -0.63 % for a tungsten filter with an elongation

ratio of 7) than does a larger filter (for R,, = 5 cm, -2.38 % for an aluminum filter with

an elongation ratio of 7 and -1.10 % for a tungsten filter with an elongation ratio of 7) at

the same elongation ratio. In principle, the amount of difference is dependent on the

coefficient, a. The stiffer slope causes the larger difference. Lower Z material, higher

energy beam, and larger radius of flattening filter require a thicker flattening filter which

causes stiffer slope of scatter function. Since Rma is the physical radius of a flattening

filter at 15 cm downstream from the source, the maximum radial field size at 100 cm SSD

becomes 6.67R,, That is, for R,, = 4 cm, the radius of the field at 100 cm is 26.7 cm

(diameter d = 53.3 cm). Considering the fact that most linear accelerators allow a

maximum 40 x 40 cm2 field size and also that a high Z material is preferred as a

flattening filter, it appears Figure 3-4 supports the fact demonstrated by Lam et al. (1996)

that the formula for the area-to-perimeter ratio can also be used as the equivalent field

formula for head scatter at the source plane.



Equivalent Field for Wedge and Tertiary Collimator Scatter Factor

Measured scatter contributions from the tertiary collimator (Cerrobend block and

Varian MLC) of an 8 MV photon beam of Varian 2100C are shown in Figure 3-5. Figure

3-5 shows that the behavior of tertiary collimator scatter is very close to a linearly

increasing function according to the irradiated area. Therefore, it is considered that Eq.

(3.13) is a reasonable assumption. A similar result is obtained for a wedge (Figure 3-6).














1

0.9 Varian 2100C, 8 MV

0.8

o 0.7

iE 0.6
--Block
S0.5 MLC

g 0.4

0.3

S0.2

I 0.1

0

0 100 200 300 400
Field Area (cm x cm)



Figure 3-5. Tertiary collimator scatter contribution as a function of field area of solid
tertiary collimator material for the 8 MV photon beam of a Varian 2100C. Data are
plotted according to the irradiated area projected to the detector plane.













1.00

0.90 Varian 2100C, 8 MV, 45-Wedge

0.80

0.70

a 0.60

0.50
L-
0 0.40

a 0.30
-45-Wedge
g 0.20

0.10

0.00
0 100 200 300 400
Field Area (cm x cm)




Figure 3-6. Wedge scatter contribution as a function of field area of 450 wedge for the 8
MV photon beam of a Varian 2100C. Data are plotted according to the irradiated area
projected to the detector plane.








The measured in-air outputs for a pair of asymmetric wedged fields are summarized in

Table 3-1, where we can see that the difference is less than 1%. The contribution of

unattenuated photon to in-air output is same for both fields because the detector is located

at the isocenter. The only difference comes from the wedge scatter contribution.

Considering that most practical fields are closer to symmetric than those studied, we can

expect that the differences will become smaller in most clinical cases. Therefore, we can

use Eq. (3.13) without compromising accuracy.



Discussion



In the derivation of equivalent field relationship, SPRh is replaced with SPRfand it

is assumed SPRf is a linear function. There are two concerns with this approach. The one

is that SPRh can be described better as either a Gaussian (Dunscombe & Nieminen 1992)

or polynomial (Yu & Sloboda 1993) function. The other is that SPRfis restricted within

the physical dimensions of the flattening filter. However, the approach is very reasonable

for circular fields. For a circular field with radius of R, the equivalent square field exists

within the range of 0. 71R < a < R The circle which can inscribe the square a = R is r =

1.41R. Thus, the range we are interested in for the integration of SPR function to obtain

the equivalent square is only 0. 71R < r
SPR varies both inside 0. 71R and outside 1.41R. If SPR is close to a linear function

between r = 0. 71R and r = 1.41R, our assumption can be applied and this is the most

cases even outside the flattening filter. For rectangular fields, these concerns still remain,









Table 3-1. Comparison of in-air output factors between pairs of asymmetric wedged
fields for the 8 MV photon beam of a Varian 2100C. The contribution of unattenuated
photon to in-air output is same for both fields. However, wedge scatter contribution is
different. Data are normalized to the in-air output of the field of thin part.

Wedge Angle In-air Output Factor (normalized to field of thin part)
XI = 10, X2 = 2.5, Thin Part XI = 2.5, X2 = 10, Thick Part
Y=5 Y=20 Y=5 Y=20


15 1.000 1.000 1.002 1.005
30 1.000 1.000 1.002 1.007
45 1.000 1.000 1.002 1.007


XI = 7.5, X2 = 2.5, Thin Part Xl = 2.5, X2 = 7.5, Thick Part


60 1.000 1.000 1.001 1.004


especially for highly elongated fields. Therefore, Eq. (3.12) and the analysis results,

Figure 3-4, are restricted within the physical dimensions of the flattening filter (e.g., D=

3.55 cm at the source plane for Varian 2100C).

In an irregular field, scatter contribution from a tertiary collimator depends not

only on the irradiated area perpendicular to the axis, but also on the irradiated area of side

wall on the field edge. However, the scatter contribution from side wall is not included in

the derivation of Eq. (3.14). This effect should be independently treated because it is

dependent of contour shape.








Conclusion



Equivalent field relationships for the head scatter factor at the source plane were

analyzed. A relationship of a /R 0.9 was obtained for a circular field, where a is one

half the side length of the equivalent square and R is the radius of the circular field. The

fact that the formula for the area-to-perimeter ratio of the equivalent square of a

rectangular field for phantom scatter is also valid for head scatter at the source plane in

most clinical linear accelerators was analytically investigated. The equivalent field

relationships for wedge and tertiary collimator scatter were also studied. The relationships

of a = 0.886 R (or 0.9 for convenience) for a circular field and a = .,L-W / 2 for a

rectangular field were obtained. These relationships can be used in the calculation of in-

air output factors for irregular fields in clinical applications.














CHAPTER 4
AN EQUIVALENT SQUARE FIELD FORMULA FOR
DETERMINING HEAD SCATTER FACTORS OF RECTANGULAR FIELDS

Introduction


The head scatter factor (or collimator scatter factor) accounts for the change in

scattered radiation with collimator setting that reaches the point of measurement on the

central axis in high energy x-ray beams. Conventionally, the head scatter factor is

expressed as

H(XT, Y) = D(X YO)/D(X,=10,Y=10) (4.1)

where D(XD Y0) is the dose in air on the central axis at the reference plane (which we call

the detector plane hereafter), which is usually the isocenter, and XD, YD are the field sizes

determined by the lower and upper collimator jaws, respectively, at the detector plane.

The collimator setting for the reference field size is 10 cm for both x and y sets of jaws.

For a wedged field, the change in scattered radiation with collimator setting depends not

only on the head scatter but also on the wedge scatter. Thus, we will use a different

terminology, 'wedge-head scatter factor' for wedged field.

Head (or wedge-head) scatter factor, H is often measured as a function of square

field size at the isocenter. To account for Hofa rectangular field, usually the well

established equivalent square relations are used, either in the form of table (Day & Aird

1983) or the area-to-perimeter ratio formula (Sterling et al. 1964). These formulae give an








estimate of the effect of field elongation only. An inherent assumption is that the head (or

wedge-head) scatter factors for two different rectangular fields, L x W(i.e., Xo=L, Y=W)

and W x L (i.e., XD=W, Y,=L), are the same. In reality, H(XD, Yo) is different from

H(Y,XD) by 2 3% for open fields (Moyer 1978, Kase & Svensson 1986, Tatcher &

Bjamgard 1993) and 3 ~ 4% for wedged fields (Tatcher & Bjmrngard 1993) between two

different rectangular fields, L x W and W x L. This collimator exchange effect has been

discussed extensively in the literature (Vadash & Bjarngard 1993, Moyer 1978, Kase &

Svensson 1986, Tatcher & Bjarngard 1993, Lam et al. 1996). Vadash and Bjmrngard

(1993) obtained an empirical formula to account for this exchange effect for a Philips

machine. Yu et al. (1995) obtained the same empirical formula for a Varian machine.

Lam et al. (1996) suggested parametrization with the equivalent square at the flattening

filter to account for this effect. Ahnesja (1994) modeled the energy fluence of scattered

photons from the flattening filter by approximating the fluence to be proportional to the

solid angle of the filter seen from the isocenter. All of these recent publications provide

methods to calculate change in head scatter as a function of the field size; these methods

explicitly account for the upper and lower collimator settings.

Another simple equivalent square formula that accounts for the collimator

exchange effect was provided. The formula was derived by a method that will henceforth

be called thefield mapping method. In the field mapping method, a field that is defined in

the source plane by back-projection from the point of measurement (i.e., the detector's

eye view) is mapped back into the detector plane by an equivalent field relationship.

Therefore, this method retains parametrization at the detector plane (measurement point).








No new data are required to implement the method clinically. The field size dependence

of head (or wedge-head) scatter that is measured for a range of square field sizes is

sufficient to implement this method.



Theory



The head scatter factor primarily depends on scattered radiation called extrafocal

radiation (Jaffray et al. 1993) above the field-defining collimators (e.g., the flattening

filter). Therefore, head scatter accounts for not only the primary but also the scattered

radiation. The magnitude of the scattered radiation from extrafocal sources is accurately

determined by the projected area in the source plane from the detector's eye view rather

than the conventional field area at the detector plane (Lam et al. 1996, Ahnesjb 1994).

Because of the different positions of the lower and upper collimatorjaws, projected field

sizes at the source plane as determined by the detector's eye view are different for L x W

and W x L rectangular fields. The projected field in the source plane as defined by the

detector's eye view is illustrated in Figure 4-1, where X, YD are the field sizes

determined by the lower (or X) and upper (or Y) collimator jaws, respectively, at the

detector plane; Xs, Ys are the field sizes determined by the X and Y collimator jaws at the

source plane through the detector's eye view; l1, ly are the distances from the source

plane to the top of the X and Y collimators, respectively; and 12, 12, are the distances

from the detector plane to the top of the X and Y collimators. Based on simple divergent













Ys/2 Xs/2


- -


Source Plane


----------------.Q----------- xr------------ -------------.
SDetector Plane
Detector's Eye

Yn/2 XD/2


Figure 4-1. Schematic diagram showing the geometric relationship between the detector
and the collimator jaws. Also shown are field sizes projected in the source plane and
detector plane.








geometry, we can define the field conversion factors from detector to source plane, kx for

Xand k for Yside, as

kx = /12x, (4.2)

k = lIl2y (4.3)

Note that for most medical linear accelerators, k, and k are less than one. The field size at

the source plane, Xs and Ys. becomes

Xs = kXo, (4.4)

Ys = kYD (4.5)

Using the area-to-perimeter ratio formula of the equivalent square at the source plane

(Lam et al. 1996), we can obtain the equivalent square at the source plane, Seq :

Ss = 2XsY/(X + Y). (4.6)

Since most dosimetric data are obtained for square fields at the detector plane, it is

necessary to find an equivalent square at the detector plane, Sq, that gives the same head

scatter factor as Ssq. If we convert the square field, SDeq, to the source plane, it becomes a

rectangular field, kSDeq x kSoD'. If we let SS' be the equivalent square at the source

plane for this field, then

SSq' = 2kSDeqkgDeq/(kSDe + Seq) (4.7)

Since S"' should match Ss9, we obtain

Soq = {(k + k/2kky^}S (4.8)

From Eq. (4.8) and Eq. (4.6), we obtain a modified equivalent square formula,

SDo" = (1 + k)XDY/(kXD + YD) (4.9)

where k is a geometrical weighting factor, defined as:








k = kky = (71jl12)2,/1 ). (4.10)

Equation (4.9) provides an equivalent square, which is based on a rectangular field, XD x

YD, projected in the detector plane, and the geometric weighting factor, which is

accelerator-dependent.



Methods and Materials



Head (or wedge-head) scatter factors of rectangular fields were measured with a

cylindrical acrylic miniphantom as described by van Gasteren et al. (1991). The

cylindrical phantom is 3.8 cm in diameter and 15 cm long. Measurements were taken on a

Varian 2100C with an 8 MV photon beam and a Philips SL25 with a 20 MV photon

beam for both open and wedged fields. A shonka plastic 0.1 cc ionization chamber was

inserted in the miniphantom with its center located at 5 cm for 8 MV or 10 cm for 20 MV

from the front surface and 100 cm from the source. Two independent sets of data were

taken. The first set of measurements was taken with the X (lower) collimator jaws fixed

while the Y (upper) jaws were varied. In the second set of measurements, the Y

collimators were fixed and the X collimators were varied. Collimators were varied from

30 x 4 to 30 x 30 cm2 for the open fields. For wedged fields, collimators were varied

from 20 x 4 to 20 x 20 cm2 with a 450 wedge (external wedge) for an 8 MV (Varian

2100C) and from 30 x 4 to 30 x 30 cm2 with a 600 wedge (internal wedge) for a 20 MV

(Philips SL25) photon beam. The wedge gradient was always orthogonal to the long axis

of the chamber. The data also were measured for a range of square field sizes projected at








the isocenter. Special attention was paid to the position of the chamber on the central axis

for measurements with a wedge. Reversing the wedge did not change the measured

readings by more than 0.4%.



Results



The measured head scatter factors of an 8 MV photon beam of Varian 2100C

normalized to a 10 x 10 cm2 field size are shown in Figure 4-2. Figure 4-3 shows the

measured wedge-head scatter factors of 450 wedged fields for 8 MV photon beam of

Varian 2100C. The rectangular fields are plotted according to the side of the equivalent

square field obtained by Sterling's area-to-perimeter relationship (Sterling et al. 1964).

The same data are plotted in Figures 4-4 and 4-5 for open and wedged fields but

according to the side of the square field obtained by the modified equivalent square

formalism presented in Equation (4.9) with the calculated geometric weighting factor, k =

1.5, for a Varian 2100C. The collimator exchange effects are obvious in Figures 4-1 and

4-2. The magnitude of the difference in output caused by this effect ranges from 0.2% to

2.5% for both open and wedged fields. The maximum difference is for the most elongated

fields. The modified equivalent square formalism provides output with a difference of

less than 1% for open fields and less than 0.5% for wedged fields.

Similar results were obtained with the 20 MV photon beam. Head and wedge-

head scatter factors are shown in Figure 4-6 and Figure 4-7, respectively, according to the

side of the equivalent square field obtained by Sterling's area-to-perimeter relationship
















1.04
Varian 2100C, 8 MV, open, k=1

1.03

1.01
LL.
S1.00

g 0.99

/ 0.98 -.- Square

S0.97. -. Fix-X(30)
0.96 Fix-Y(30)
0.96

0.95
0 5 10 15 20 25 30
Side of Eq. Square (cm)




Figure 4-2. Head scatter factor as a function of a rectangular open field for the 8 MV
photon beam of a Varian 2100C. During these measurements, one set of collimator jaws
was fixed and the other set of collimator jaws was changed symmetrically. The field size
varied from 30 x 4 to 30 x 30 cm2. Data are plotted according to the side of the
equivalent square obtained by the conventional area-to-perimeter relation.



































0 5 10 15
Side of Eq. Square Field (cm)


Figure 4-3. Wedge-head scatter factor as a function of a rectangular 450 wedged field for
the 8 MV photon beam of a Varian 2100C.

















1.04
Varian 2100C, 8 MV, open, k=1.5
1.03

1.02

S1.01

1.00
0/
8 0.99

S0.98 Square

0.97 / a Fix-X(30)
SFix-Y(30)
0.96

0.95
0 5 10 15 20 25 30
Side of Eq. Square Field (cm)




Figure 4-4. Head scatter factor as a function of a rectangular open field for the 8 MV
photon beam of a Varian 2100C. Data are plotted according to the side of the equivalent
square obtained by Eq. (4.9) with k = 1.5.
















1.08
Varian 2100C, 8 MV, 45-wedge, k=1.5
1.06

1.04

I 1.02
LL
I 1.00

o 0.98

0.96 -- Square
Fix-X(20)
0.94 Fix-Y(20)

0.92
0 5 10 15 20
Side of Eq. Square Field (cm)




Figure 4-5. Wedge-head scatter factor as a function of a rectangular 450 wedged field for
the 8 MV photon beam of a Varian 2100C. Data are plotted according to the side of the
equivalent square obtained by Eq. (4.9) with k = 1.5.
















1.04
1.03 Philips SL25, 20 MV, open, k=1
1.02
1.01
3 1.00
S0.99 -Square
S0.98 / Fix-X(30)
SA Fix-Y(30)
0.97
I 0.96
0.95
0.94
0.93
0 5 10 15 20 25 30
Side of Eq. Square Field (cm)


Figure 4-6. Head scatter factor as a function of a rectangular open field for the 20 MV
photon beam of a Philips SL25.
















1.11
1.09 Philips SL25, 20 MV, 60-wedge, k=1

1.07
1.07
1.05
S 1.03
,, A .
1.01
g 0.99
0.97
S0.95 -- Square
0.93 Fix-X(30)
SFix-X(30)
0.93
1 / Fix-Y(30)
0.91
0.89
0 5 10 15 20 25 30
Side of Eq. Square Field (cm)


Figure 4-7. Wedge-head scatter factor as a function of a rectangular 600 wedged field for
the 20 MV photon beam of a Philips SL25.








(Sterling et al. 1964). In Figures 4-8 and 4-9, the same data are plotted according to the

side of the square field obtained by the modified equivalent square formalism. The

geometric weighting factor k= 1.85 is obtained for the Philips SL25. The magnitude of

the difference in output caused by the collimator exchange effect ranges from 0.3% to 3%

for open and 0.4% to 5% for wedged fields. The modified equivalent square formalism

provides output with a difference of less than about 1% for both open and wedged fields.



Discussion



The top edge of the collimator was considered to be the field-determining edge for

calculation of the geometric weighting factor k. Although the distance from the source

plane to the top of the collimator, lx, or 1,y, changes according to the field size because of

the circular movement, the amount of variation is negligible. Therefore, one value of lIx

or I,, can be used. Interestingly, our formula has the same format as the formula that was

empirically obtained by Vadash and Bjmrngard (1993). In this study, k = 1.5 for the

Varian 2100C and k = 1.85 for the Philips SL25 were obtained. Vadash and Bjamgard

(1993) empirically obtained k= 1.92 for open fields and k= 1.84 for wedged fields for

the Philips SL25 25MV photon beam, and Yu et al. (1995) obtained k = 1.7 for the

Varian 2300CD 6 MV photon beam. Equation (4.9) shows that the equivalent field size

varies slightly according to k. For example, the equivalent square field size for a 5 x 20

cm2 (or 20 x 5 cm2) field is 9.1 x 9.1 cm2 (or 7.1 x 7.1 cm2) with k= 1.5, and 9.5 x 9.5














1.04
1.03 Philips SL25, 20 MV, open, k=1.85
1.02
1.01
I 1.00
U-
S0.99
U 0.98
*o 0.97
~S Square
I 0.96
Fix-X(30)
0.95 Fix-Y(30)
0.94
0.93
0 5 10 15 20 25 30
Side of Eq. Square Field (cm)



Figure 4-8. Head scatter factor as a function of a rectangular open field for the 20 MV
photon beam of a Philips SL25. Data are plotted according to the side of the equivalent
square obtained by Eq. (4.9) with k = 1.85.














1.11
Philips SL25, 20 MV, 60-wedge, k=1.85
1.09 a _
1.07
1.05

I 1.03
1.01

S0.99

0.97
Square
S0.95-
Fix-X(30)
0.93 Fix-Y(30)
0.91
0.89
0 5 10 15 20 25 30
Side of Eq. Square Field (cm)




Figure 4-9. Wedge-head scatter factor as a function of a rectangular 600 wedged field for
the 20 MV photon beam of a Philips SL25. Data are plotted according to the side of the
equivalent square obtained by Eq. (4.9) with k = 1.85.









cm2 (or 6.9 x 6.9 cm2) with k = 1.7. And the difference of head scatter factors between

9.1 x 9.1 and 9.5 x 9.5 cm (or 7.1 x 7.1 and 6.9 x 6.9 cm2) fields is about 0.2%.

The wedge-head scatter factor of a wedged field depends on both the scatter from

scatterers in the head like the flattening filter and scatter from the wedge itself. The

scattered radiation from a wedge depends on the area of the wedge that intercepts the

radiation coming downstream through the treatment head. If the wedge is located above

the collimatorjaws like that in a Philips machine, the detector's eye view field at the

source plane can be used for both head scatter and wedge scatter. However, when the

wedge is located underneath the secondary collimator like that in a Varian machine

equipped with an MLC, the field size for the wedge scatter contribution is different from

the field size for the head scatter contribution. Whereas the head scatter contribution is

determined by the field seen by the detector's eye view, the wedge scatter contribution

depends on the field size projected at the detector plane. Therefore, in this case, the

formula shown as Eq. (4.9) may slightly overcompensate for the collimator exchange

effect. Our results for wedge-head scatter in Figure 4-5 show that Eq. (4.9) gives an

accurate calculation of output even for a Varian-type wedged field.



Conclusion



The equivalent square field formula (Eq. [4.9]) with the geometric weighting

factor (Eq. [4.10]) provides an accurate estimate of output even when there is a

significant collimator exchange effect in a linear accelerator. Since only the geometric





57

weighting factor is considered, this formula is very simple and is applicable to any

accelerator as long as the geometric data are known. Also, this formula can be used

directly with conventional dosimetric data, which are always measured for a set of square

fields at isocenter. It is not necessary to measure data for a series of rectangular fields

(except for verification) for parametrization, as has been discussed extensively in the

literature.













CHAPTER 5
A GENERALIZED SOLUTION FOR THE CALCULATION OF
IN-AIR OUTPUT FACTORS IN IRREGULAR FIELDS

Introduction


Most treatment fields used in radiation therapy are irregular in shape while the

dosimetry data is measured with square or rectangular fields. Conventionally, the in-

phantom dosimetric parameters, such as the tissue-air-ratio (TAR) or tissue-maximum-

ratio (TMR), are calculated based on the actual field shape created by a custom

Cerrobend block, but the in-air output factor calculation is based on the rectangular field

shaped by collimator jaw(secondary collimator), and is considered independent of any

tertiary blocking (Kahn 1994). This conventional method for the calculation of in-air

output of irregular field is valid when the size of irregular field is close to the size of

collimator jaw opening. However, if the irregular field is much smaller than the

collimatorjaw opening or is extremely irregular so that part of block is close to central

axis, the measured in-air output can be significantly different from the one obtained with

conventional methods. Many authors have studied the physical origin of in-air output

factors (Patterson & Shragge 1981, Kase & Svensson 1986, Mohan et al. 1985, Huang et

al. 1987, Luxton & Astrahan 1988, Chaney & Cullip 1994, Zhu & Bjarngard 1995). It is

primarily due to the amount of scattered radiation that is produced within the accelerator

head structure and the fraction that can reach the point of measurement as the position of








the collimators is varied. There are several components in the head which produce scatter

radiation. The flattening filter is considered to be the most dominant source of scattered

radiation from the head (Kase & Svensson 1986, Mohan et al. 1985, Luxton & Astrahan

1988, Chaney & Cullip 1994). When a tertiary collimator, such as a conventional

Cerrobend block or MLC installed below the field-defining secondary collimators, is

used for field shaping, scatter radiation from the tertiary collimator may not be negligible,

especially for small tertiary collimator openings with a large secondary collimator setting.

The scatter radiation from beam modifiers such as physical wedges or compensators, can

also be significant. There are several models which have appeared in the literature that

accurately describe the scatter photon energy fluence distribution emanating from the

head (Ahnesjo et al. 1992, Ahnesjo 1994, Dunscombe & Nieminen 1992, Yu & Sloboda

1993, Jaffray et al. 1993). However, these model-based approaches, which are based on

uniform (Ahnesjo et al. 1992), triangular (Ahnesjo 1994), Gaussian (Dunscombe &

Nieminen 1992), combination of several functions (Yu & Sloboda 1993), and

experimentally determined distribution functions (Jaffray et al. 1993) require

sophisticated programming and/or complex measurements. Moreover, most of these

studies have mainly concentrated on the modeling of scatter radiation from the flattening

filter. Recently, a method of parametrization with the equivalent square at the flattening

filter was studied (Lam et al. 1996) and a similar approach, in which the parametrization

was kept at the detector plane, was studied in the previous chapter (see Chapter 4). These

studies have been limited to rectangular fields only.








In this chapter, an in-air output calculation formalism was set up and a simple

algorithm for calculation of in-air output factor of irregular shaped fields was developed

for both open and wedged fields by expanding the application of field mapping method

that is based on detector's eye view field which has been successfully applied to

rectangular fields (see Chapter 4).

In the algorithm, three major scatter contributors--flattening filter, wedge, and

tertiary collimator--are considered. For the calculation of flattening filter scatter, first, the

collimatorjaw field and tertiary collimator shaped field are projected into the source

plane through the detector's eye view to get a combinational field shape. Clarkson

integration (Clarkson 1941) is carried out on the combined field using measured data at

the detector plane in conjunction with field mapping method, instead of describing a

discrete scatter source function that has been described in the literature. In the field

mapping method, a field at the source plane is segmented and each segment field is

mapped into a corresponding field at the detector plane by using equivalent field

relationships obtained in Chapter 3. The algorithm is also valid for the treatment

machines in which MLC replaces the upper or lower collimatorjaw instead of being a

tertiary collimator system. In that case only one projected field is used since there is no

additional field. For a machine in which the MLC replaces the upper collimator jaws,

Palta et al. (1996) have suggested an equivalent field method at the detector plane.

Although equivalent field method at the detector plane provides a simple methodology, it

does not explicitly account for both the collimator jaw exchange effects and non-linearity

of in-air output dependence on field size.








The change of scatter radiation from tertiary collimator was also measured and

parametrized. In the calculation of total head scatter factor, the tertiary collimator scatter

factor is added to the collimator scatter factor.

In the case of wedged fields, the in-air output is dependent not only on scatter

from flattening filter but also scatter from the wedge itself. Therefore, the relative

position of the collimators (both secondary collimator and tertiary collimator) and wedge

will determine the method of calculation of in-air output. When wedge is below the

tertiary collimator (e.g., external wedge), the field size for wedge scatter contribution is

different from the field size for head scatter contribution. The conventional collimator

scatter factor for wedged field is separated into two components: one for the change of

scatter radiation from flattening filter and the other for the change of scatter radiation

from the wedge. Each component is independently calculated using a field mapping

method with corresponding detector's eye view field sizes.



Formalism of In-air Output Factor



Head Scatter Factor and Monitor Back Scatter Factor

The total energy fluence in air on central axis produced by an external photon

beam can be divided into two components: one is due to unscattered primary photons

from the target and the other is due to scattered photons, which are generated in

scattering materials in the head (for example, primary collimator, flattening filter, and

field defining collimators).








T = Vp + I's


=Y, 1+ V (5.1)


where, Tp is the energy fluence due to primary photons, 's is the energy fluence due to

scatter photons from the scattering materials in the head. Considering the effect of

backscatter radiation to the monitor chamber (Lam et al. 1996, Ahnesj6 et al. 1992,

Patterson & Shragge 1981, Luxton & Astrahan 1988, Moyer 1978, Higgins et al. 1989,

Kubo & Lo 1989, Kubo 1989, Duzenli et al. 1993), primary energy fluence can be

expressed as

, (X, Y)= (o,oo),,(X,, Y,) (5.2)

where, (Xc, Y,) is secondary collimator setting, 'F (oom,) is unperturbed energy

fluence, and f,, is the function which accounts for the monitor backscatter effect on the

energy fluence. By both multiplying and dividing Eq. (5.2) with monitor backscatter

effect function, fb (X,, Y,) for a reference collimator setting, (X,,Y,), we can get


f. (X, Y,)

= Y,(,(Y,,)f (X,, Y,) ( )
=, (oo, oo)f,, (X,, (Xr Y

= ',(X,, Y,)Sb (Xc, Y,) (5.3a)

where, (X,, Y,) is secondary collimator setting for the reference field and S,, is monitor

backscatter factor, defined as,

f,(Xt 'Y)
S (X, YY) = ) (5.3b)
fmh(X, YD)








Now, consider head scatter contribution. For the energy fluence of any field, we can get,


4(X ,, Y)= (X,, Y,) (X Y)
Y(X,,Y,)
y(X, 'y )
= (x,, Y,) ) (5.4)
T'(X,,Y,)

By substituting Eq. (5.1) into Eq. (5.4), we have


I + T., (X, Y,)

TV,(X,,Y,) Iv,(X,,Y,)
S,((X,,Y,))

Using Eq. (5.3a), we can get,

(X, Y,) = (X,, Y, )S,, (X., Y, )S, (X, Y, ) (5.6a)

with head scatter factor, S, defined as


1+ p(X, Y,)
S,.(XI, Y)= -- (X"Y'). (5.6b)
I+- (X,, Yr)
f (X,,Y,))

From the conventional definition of collimator scatter factor, S we can get


SI(XI, e) = T(X YD
T(X,, Y,)


=S,, (X, Y,)S.,(X,,Y,) (5.7)

Equations (5.6) and (5.7) show that we can separate collimator scatter factor, S,. into two

components, monitor back scatter factor, S,,, and head scatter factor, S,. When a field is








very small, source obscuring may occur. In that case, a source obscuring factor should be

included in the Eq. (5.7) (Zhu & Bjarngard 1995).



Presence of A Beam Modifier in The Field

When photon beam passes a beam modifier (for example, a wedge), the energy

fluence changes due to both attenuation of incident photons and scatter photons produced

in the beam modifier. If we denote the energy fluence below the beam modifier as (D,

then, we can express

I=0 ,+D,



= du -,+ ) (5.8)


where D, is the unscattered energy fluence which is due to the primary head scattered

photons and (, is the energy fluence due to scatter photons by the beam modifier. With

attenuation factor of beam modifier, Abm (~u is given by

,.=Abm- (5.9)

where T is the total energy fluence incident on the beam modifier, expressed in Eq.

(5.1). For the energy fluence of any field with beam modifier, we can get,


<(Xc,Ye)=0(Xy)(
(c(X,,Y,)


= (X I Y,) (5.10)
(XBy substituting, Yinto Eq. (5.10),

By substituting Eq. (5.8) into Eq. (5.10),









o)(Xc,rY) Y((Xc,Yc)-
i(X Y, Y) = o(X, Y) (5.11)
S -,(X,,Y,) o(X,,Y,)
~, (X,,Y,)

is obtained. Using Eq. (5.9) and (5.7), we can get,

D(X, Y e) = ((X,, Y, )S,, (X,, Y,)S,, (X,, Y,)S,,, (X,, Y,), (5.12a)

with beam modifier scatter factor, S,,, defined as



Sbs (X' Y)= X,, Y,) (5.12b)
I DO,(X,,Y,)J

In the derivation of Eq. (5.12), we assumed the dependency of Abm on field size is

negligible. When wedge is used as a beam modifier, using the standard convention of

collimator scatter factor of wedged field, S, we can get

S, (X, I Y) =, (Xc, e)
,(X,, (,)


=S,,b (X,, IY )SX,, (X, I Y)S-,(X, I Y)
= S, (X,, Y)S,, (Xo,Y, ) (5.13)

where Sh,, is replaced with wedge scatter factor, S., in order to indicate wedge is the

beam modifier. Equations (5.12) and (5.13) show we can separate wedge scatter factor,

S,, from conventional collimator scatter factor of wedge field, S,.,.








A Shaped Field with A Tertiary Collimator

Tertiary collimator, such as conventional Cerrobend block and Varian type MLC,

can change the in-air output factors. There are two components. One is the change of

head scatter factor, S, due to the change of detector's eye view of head scatter area. The

other is scatter photons produced in the tertiary collimator itself which, in some cases,

may not be negligible. If we let the energy fluence below the tertiary collimator as (p,

then, we can express

(P(P ,+(P, (5.14)

where cpU is the energy fluence coming from upstream of the tertiary collimator and (p,

is the energy fluence due to scatter photons by the tertiary collimator. We define

p, (X ,Y.) as energy fluence due to scattered photons that emanate from a solid material

of same thickness and composition as tertiary collimator with X, x Y, collimator setting.

For a field with tertiary collimator, we get,


cp(Xe,,,X.,c)=cP,(Xc,Yc,X,,Yc)+cp,(Xc,Yc)- tP( Yps(X,c ,) (5.15)


where (X,c, Y,) is setting of the tertiary collimator. Without tertiary collimator,

(X Y,,)=(oo,oo) and cp is the same as F, that is,

(p,(X ,Y,,o,o)=y(Xc, Y) (5.16)

By both multiplying and dividing with 'F(X,,Y,) to Eq. (5.15), we can get








(p(X,Y,X,Y ) = V(X ,Y)


x p.(Xc, Y,,)+I,(xY r) .(Xo,Y,) (5.17)
1 ,(X,,Y,) V(X,,Y,) (X,,,Y,) (X,,Y,) (.1

Then, collimator scatter factor for a shaped field with tertiary collimator, S,,c is given

by


Sh (Xtertiary colli r scate f(X" S, ),
X(X,, Y,)



= (X,,Y,) Y(X,,Y,) T(XcYc) (X,,Y,)

=sM(xc'y,xoY)+Sc,(xc',)-. (X, )S, s(xc ^),

(5.18a)
with tertiary collimator scatter factor, Sc, defined as

S, (X,Y)- ( Y) (5.18b)
Y(X,,Y,)



Calculation Algorithm


Open Field

Head scatter factor and field definition by DEV. The head scatter factor given in Eq.

(5.6b) depends on head scattered radiation which can reach the detector. If any ray line of

head scatter to the detector is blocked by tertiary collimator such as Cerrobend block or

MLC, the head scatter factor will decrease. Therefore, S,, is dependent on the field size








determined by detector's eye view instead of the collimator field size. The field defined

by detector's eye view is illustrated in Figure 5-1. In Figure 5-1, l,, 1;, and lir are the

distances from the source plane to the top of X Y collimator jaws and tertiary collimator,

respectively. The distances from the detector plane to the top of X Ycollimators, and

tertiary collimator are noted as 12, 2y, and 12T. Now, let X, Yo and TD be the field sizes

determined by the lower (or X), upper (or Y) collimator jaws and the tertiary collimator,

respectively, at the detector plane andX, Ys and Ts be the field sizes determined by the

X, Ycollimator jaw, and tertiary collimator at the source plane through the detector's eye

view. Then, the field conversion factors from detector-to-source plane, k, ky and k are

given by

kx = l12, (5.19)

ky = 1/12y, (5.20)

kr= 117/12T- (5.21)

Then, field sizes at the source plane, X, Ys and Ts become

Xs = ko, (5.22)

Ys = YD, (5.23)

Ts = kTo. (5.24)

After the field size conversion from the detector plane to source plane, the projected

collimator jaw and tertiary collimator shaped fields are combined in the source plane.

That is, the area common to both fields is used to determine head scatter factor.

Clarkson integration and field mapping. The head scatter factor is calculated by carrying

out Clarkson integration in the combined field in the source plane. Typically,

















Field edge is determined
by Upper Collimator Jaw
Source -------.-. ........ -



Upper(Y) Collimator Jaw


Lower(X) Collimator Jaw

Tertiary Collimator
(Block or MLC)












Detector Plane Det


Field edge is determined
by Tertiary Collimator
S ----------- ----











12y









-etor's Eye ......
ector's Eye


Figure 5-1. Schematic diagram showing the geometrical relationship among detector, X
and Y collimator jaw settings, tertiary collimator settings, detector plane field size and
source plane field size.








conventional dosimetric data is available only for square fields at detector plane.

Therefore, it is convenient to project source plane field to detector plane. For any circular

field of radius, rs at source plane, we can get equivalent square field at source plane, ss'

from equivalent field relationship for head scatter,

ss"'(rs) = 1.8rs. (5.25)

It is necessary to find an equivalent square in the detector plane, seD which is equivalent

to s"'. If we project sq' to source plane, the square field changes to the rectangular field,

ko' x kyS S. Once again, by using the equivalent field relationship, we can let

sq' = [2kxk/(kx + k)]SD (5.26)

Since ss"' should match with sS', we can get an equivalent square field at detector plane,

sf'(rs) for the circular field, rs at the source plane,

s o'(rs) = [(kx + k)/2k1ky]ss'(rs)

= 0.9[(k, + k/k)k]rs. (5.27)

The head scatter factor for irregular shaped open field is obtained by


Sh(irregular) = (1/360) S r(seq(r))A (5.28)


where, Sh,(sDe(rs)) is the head scatter factor of the equivalent square field at detector

plane which corresponds to circular field with radius rs, at source plane. And A4, is i-th

interval of angle in Clarkson summation. To get conventional collimator scatter factor, S,

we must multiply Eq. (5.28) with monitor backscatter factor. Since monitor backscatter

factor is primarily dependent on secondary collimator settings, we can multiply monitor

backscatter factor of X x YD rectangular field at detector plane, that is, Sm,(XD, Yo). We

can rewrite Eq. (5.28) as,








Sl(irregular)= S,(irregular)/Smb(X ,Y


= (1/360) D [Sc(se(rs))/Smb(sD(rsl)] A,, (5.29a)

or,


S,(irregular) = Sb(XY) (1/60) [S(s (rs)) /Smb(sq(rs))] A, (5.29b)

where S,(seq'(rs)) is the collimator scatter factor of the equivalent square field at detector

plane which corresponds to circular field with radius rs, at source plane. Monitor

backscatter factor can be measured by telescopic method (Kubo 1989). Ahnesj6 et. al.

(1992) assumed that the amount of backscatter to the monitor chamber from the back

surface of a collimator jaw is proportional to the irradiated surface area. With same

assumption, Lam et. al. (1996) modeled monitor back scatter factor as a function of

collimator settings. When each segmented field is not much different from collimator

settings, we can make an approximation,


S,(irregular) = (1/360) C Sc(sD'(rsd) Ai,, (5.30a)

by assuming,

Smb(XYd) zSmb(sDe (rs)) Smb(SDeq (2)) ..... (5.30b)

In most clinical situations, this expression is a good approximation. Equation (5.29) can

be directly used with the measurement of monitor backscatter factor if a more accurate

monitor backscatter factor is required. This will probably be necessary in the case of

beam intensity modulation, in where very small shaped fields with large secondary

collimator setting may be used.








Scatter Factor of Tertiary Collimator. Since the tertiary collimator transmits more

radiation and is closer to the detector than collimator jaws, it is necessary to consider

scatter contribution from tertiary collimator itself. The amount of scatter contribution is

dependent on irradiated area of tertiary collimator. We define tertiary collimator scatter

factor, Sc,(s), as the ratio of scatter dose from a solid block material with s x s collimator

setting to the dose of reference 10 x 10 field in Eq. (5.18b). Tertiary collimator scatter

factor of an irregular shaped field with XD x Y, collimator jaw setting can be obtained as


St,(irregular) = Scs(XD,Y (1/360) [S,(XD, YoW/Sc(s(rD))] St,(so,(rD)Ai ,


(5.31)

where sDeq(rD) is the equivalent square field at detector plane which gives same tertiary

collimator scatter contribution as a circular field with radius rD, at detector plane, and is

obtained by s,"(r,) = 1.8rD. When each segmented field is not much different from

collimator settings, we can make an approximation,


S./(irregular) = S,(XDr D) (1/360) S,(sD (rD)) i, (5.32a)

by assuming,

Sc(X, Yar) S,(sD D(r) Sc(SDeq(rs2)) ... (5.32b)

Finally, in-air output factor for irregular open field, OF, becomes

OF(irregular) = S,(irregular) + Sc,(irregular) (5.33)

where Sc is obtained by Eq. (5.29b) or Eq. (5.30a) and S,c is obtained by Eq. (5.31) or Eq.

(5.32a). Note that the MLC on Varian linear accelerators, which is mounted below the X








and Y jaws, is handled the same way as a block except S,, that corresponds to the scatter

from the leaves of the MLC system.



Wedged Field

Depending on the position of wedge, the method of in-air output factor calculation

are different. On a Varian accelerator with MLC, a wedge is inserted underneath the

tertiary collimator (MLC). In this case, the field size for wedge scatter contribution is

different from the field size for head scatter contribution. It can be clearly seen from

Figure 5-2 that the head scatter contribution is determined by the detector's eye view of

the field defined by collimator jaws and the wedge scatter contribution is dependent on

irregular field shaped by the tertiary collimator in the detector plane. To account for this

fact, the collimator scatter factor for wedged field is separated into collimator scatter

factor and wedge scatter factor as given in Eq. (5.13),

S,w =S ,. (5.34)

Therefore,

S, = Sc,/Sc. (5.35)

For an irregular field, each component is calculated by,


S(irregular) = (1/360) Y Sc(s o'(rs))Ad (5.36a)


with

SD'(rs) = 0.9[(kx + /kk]rs,,

and
















Head Scatter is determined by Source Plane Field Size
through Detector's Eye View


Source --. -- --- -----------.-------



Upper Collimator Jaw

Lower Collimator Jaw

Tertiary Collimator
(Block or MLC)
Wedge

edge Scatter is determined/


Detector Plane- -


L.---


Detector's Eye


Figure 5-2. Schematic diagram showing the detector's eye view scatter area for head
scatter and wedge scatter in Varian type (external) wedged MLC field.









S,,(irregular) = (1/360) Sjs0f(ro,))Ai,, (5.36b)

with

s "(rDd = 1.8 rDi .

Finally, in-air output factor for irregular wedged field is obtained by

OF,(irregular) = Sc (irregular) S. (irregular) (5.37)

Note that the scatter contribution from the tertiary collimator is not considered since

wedge is underneath the tertiary collimator.

If the wedge is located above the collimator jaws, the field size for wedge scatter

contribution is the same as that for head scatter contribution. That is, the collimator

scatter factor of a wedge fi id.. is given by


S, (irregular) =[(1/360) Sc(sq(rs,))A, ][(1/360) S, (s (rs)s)Ai, ] (5.38)

and the in-air output factor of a wedge field, OF, is obtained by

OF(irregular) = S, (irregular) + Sb.w (irregular),

where Sb, is the block scatter factor for a wedged beam. In Eq. (38), sD'q(rsi)c is the

equivalent square field at the detector plane for head scatter contribution and is the same

as for Eq. (27). However, the equivalent square field at the detector plane for wedge

scatter contribution, sD'(rsi)ws, is not the same as sD'q(rsi). From the equivalent field

relationship,

s'q(rs) = 1.8rs (5.39)








If we project so'e (an equivalent square at detector plane) to the source plane, the square

field changes to a rectangular field, kxSDq x kSyD'. Using the equivalent field relationship

for wedge scatter, we can let

ssq' = (k)/)"2 seq. (5.40)

Because Eq. (5.39) and Eq. (5.40) should match each other, we can get the equivalent

square field at the detector plane, sD'(r,), for any circular field with a radius ofrs at the

source plane:

sfq(rs)s= 1.8 rs/(k,)1/"2. (5.41)



Methods and Materials



In-air output factors of tertiary collimator shaped fields were measured with a

cylindrical acrylic mini-phantom as described by van Gasteren et al. (1991). The

cylindrical phantom is 3.8 cm in diameter and 15 cm long. A shonka plastic 0.1 cc

ionization chamber was inserted in the mini-phantom with its center located at 5 cm from

the front surface and 100 cm from the source. Measurements were taken on a Varian

2100C with 8 MV photon for both open and wedge fields. Since wedge can not be used

with conventional block in Varian machine that is equipped with MLC, only MLC fields

were considered with wedges. The measurements were taken with the fixed X and Y

collimator jaw settings (22.5 x 22.5 cm2 for Cerrobend block field, 21.6 x 20.4 cm2 for

open MLC field, and 20 x 20 cm2 for wedged MLC field). The tertiary collimated field

sizes were varied for 4 x 4 to 20 x 20 cm2 for both open and 450 wedge field (for








systematic analysis of calculated data, only square shapes were devised with tertiary

collimator instead of irregular shape fields). Special care was taken to position the

chamber on the central axis for measurements with wedge. Reversing the wedge direction

did not change the measured readings by more than 0.4%. In the case of open field,

scatter contribution from tertiary collimator (Cerrobend block and Varian MLC) was also

measured with the same mini-phantom as described above. A set of measurements were

made underneath a solid piece made out of the same material as the tertiary collimator

material (Cerrobend or MLC) with field sizes ranging from 4 x 4 to 20 x 20 cm2. The

thickness of Cerrobend block was 7.5 cm. The data were extrapolated to 0 x 0 cm2 field.

The fluence of (0,0) field multiplied by Sc(X Y)/S(O, 0) was subtracted from total fluence

for each field size, (X, Y). The remaining fluence of each field is divided by the fluence of

10 x 10 cm2 reference open field to get tertiary collimator (block or MLC) scatter factor,

S,,,. Finally, in-air output factors of two irregular fields were also measured. One shape

was made with Cerrobend material and the other was made with MLC. Figures 5-3 and 5-

4 show beam's eye view of block and MLC shaped irregular fields projected at the

detector plane, respectively. For all these experimental measurements, in-air output

factors were calculated using the algorithm described in the previous section.






































-15 L
-1i


5


-10 -5 0 5 10 15


X (cm)




Figure 5-3. A beam's eye view irregular field shaped by Cerrobend block at detector
plane. Outer rectangle indicates collimator jaw setting at detector plane. Both 8 and 18
MV photon beams of Varian 2100C were used.
































-4



-8



-12
-12 -8 -4 0 4


8 12


X (cm)




Figure 5-4. A beam's eye view irregular field shaped by MLC at detector plane. Outer
rectangle indicates collimator jaw setting at detector plane. Both 8 and 18 MV photon
beams of Varian 2100C were used.








Results



Tertiary Collimator Scatter Factor

The measured tertiary collimator scatter factor, Sc for Cerrobend block and

Varian MLC are shown in Figure 5-5. As defined in Eq. (5.18b), S,,(20,20) for blocked

field is the ratio of energy fluence due to scattered photons from a 20 x 20 cm2 solid

Cerrobend block to energy fluence of a 10 x 10 cm2 open field at the reference point.

Therefore, for a 20 x 20 cm2 completely blocked field, energy fluence due to scattered

photons is 1.3 % of energy fluence of 10 xl0 cm2 open field. As an example, The value

of Sc for a Cerrobend block with outer dimension of 20 x 20 cm2 and inner dimension of

15 x 15 cm2 from Figure 5-5 is 0.005. This is the difference in S,,(20,20) and S,(15,15)

values. The tertiary collimator scatter factors for Cerrobend block are almost twice as

large as those for MLC. Two possible reasons for this may be that the block is closer to

the detector than MLC and that it has larger transmission than MLC.



In-air Output Factor of Open Fields Defined by Tertiary Collimator

In-air output factors for open fields were calculated using Eqs. (5.30a), (5.32a),

and (5.33). The calculated data for fields shaped with Cerrobend block and MLC are

compared with measured data in Figures 5-6 and 5-7, respectively. Note that the

secondary collimator settings were fixed for these measurements. The settings were 22.5

x 22.5 cm for Cerrobend block and 21.6 x 20.4 cm2 for MLC shaped fields. Two other

alternate methods of obtaining in-air output factors are also shown for comparison. One















0.014
3 Varian2100C, 8 MV
w 0.012

IM 0.010
U.

0.008

S0.006

0 0.004 MLC

0.002
1-
0.000
0 5 10 15 20
Side of Square Field (cm)





Figure 5-5. Tertiary collimator scatter factor for 8 MV photon beam of Varian 2100C.
Where tertiary collimator scatter factor is defined as the ratio of scatter dose from solid
tertiary collimator material(Cerrobend block or Varian type MLC) to the dose of
reference 10 x 10 cm2 open field at detector plane.















1.05
Varian2100C, 8MV, Block field

1.04


S1.03 ------
U-

& 1.02
0 -~ Measurement]

-e- Sc + Stcs
1.01

-..... Conventional

1.00
0 5 10 15 20 25
Side of Square Field (cm)



Figure 5-6. In-air output factor of open fields with Cerrobend block tertiary collimator for
8 MV photon beam of Varian 2100C. While the collimator jaw setting is fixed as 22.5 x
22.5 cm2, block shaped field is changed from 4 x 4 to 21 x 21 cm2 at detector plane.















1.04
Varian2100C, 8 MV, MLC field

1.03


1.02


., 1.01
-10- Measurement
0
/ Sc + Stcs

1.00 --Sc
......Conventional


0.99
0 5 10 15 20
Side of Square Field (cm)



Figure 5-7. In-air output factor of open field with MLC tertiary collimator for 8 MV
photon beam of Varian 2100C. While the collimator jaw setting is fixed as 21.6 x 20.4
cm2, MLC shaped field is changed from 4 x 4 to 20 x 20 cm at detector plane.








of the methods is labeled as conventional method in which it is assumed that the in-air

output depends on only Xand Y secondary collimatorjaw settings and is independent of

tertiary collimator. The other method is labeled as Sc method. This is simply a field

mapping method through detector's eye view field and it does not include tertiary

collimator scatter factor. It is obvious from Figures 5-6 and 5-7 that the conventional

method of calculating in-air in-air output factor is grossly inadequate when the tertiary

collimated field is much smaller than the secondary collimator opening. This is attributed

to the screening of head scattered photon fluence by the tertiary collimator. Field

mapping method through DEV field predicts the behavior of in-air output very well but it

underestimates the in-air output if the tertiary collimator scatter factor is not included.

Once the tertiary collimator scatter factor is included, the agreement between the

calculated in-air output and measured in-air output for all field sizes is very good (within

0.5 %). However, for fields defined with MLC, the agreement between the calculated in-

air output and measured in-air output is fairly good with field mapping method through

DEV field even if tertiary collimator scatter factor is not included. This is primarily due

to the small scatter contribution from MLC.



In-air Output Factor of Varian Type Wedge (External Wedge) Fields

Wedge scatter factor, S,,, for 450 wedge was obtained by Eq. (5.35) and is shown

in Figure 5-8. In the Figure 5-8 for field sizes 4 x 4 to 20 x 20 cm2. The data were

extrapolated to 0 x 0 field. Using the Eq. (5.36) and (5.37), in-air output factor of wedge

field was calculated and compared with measured data in Figure 5-9. Since block can not


































0 5 10 15 20
Side of Square Field (cm)





Figure 5-8. Wedge scatter factor, S, of 450 wedge field for 8 MV photon beam of Varian
2100C. Wedge scatter factor is obtained by dividing the collimator scatter factor of
wedge field, S, with collimator scatter factor of open field, S,.















1.10
Varian2100C, 8MV, 45-External Wedge, MLC field
1.08


1.06


S1.04


1.02
0

-.- Separation of Sc, Sws
0.98 -- No Separation
...... Conventional

0.96
0 5 10 15 20
Side of Square Field (cm)






Figure 5-9. In-air output factor of wedge field with MLC tertiary collimator for 8 MV
photon beam of Varian 2100C. While the collimator jaw setting is fixed as 20 x 20 cm2,
MLC shaped field is changed from 4 x 4 to 20 x 20 cm2 at detector plane.








be used with wedge in Varian 2100C, only MLC fields were considered. In-air output

factors obtained by conventional method and field mapping method with DEV field

without separating S., were also plotted for comparison. Conventional method gives one

in-air output factor value for all field sizes. Field mapping method through DEV field

without separating S, always overestimated the in-air output with the differences

reaching to about 4 %. The separation of S, and S, shows good agreement (within 0.5 %

difference) with experimental data for all field sizes.



In-air Output Factor of Irregular Shaped Fields

In-air output factors for irregular fields were calculated and compared with

experimental data in Table 5-1 for both 8 and 18 MV photon beams. The experimental

data were also measured with 18 MV photon beam available on the same Varian 2100C

and compared with the calculated data to verify the validity of algorithm for other photon

energies. Calculated in-air output factors matched well with the measurements. The

maximum difference was less than 0.5 %. In-air output factors obtained by conventional

method were also tabulated in Table 5-1 for comparison. The conventional method tends

to overestimate in-air output in the presence of wedges and underestimate for open fields.



Discussion



The importance of piecewise separation of scatter radiation component in the in-

air output from a linear accelerator obvious from the measured data are shown in Figures








Table 5-1. In-air output factors of test irregular fields for 8 and 18 MV photon beams of
Varian 2100C. Data are normalized to reference 10 x 10 cm2 field. In-air output factors
obtained by conventional method are also included for comparison. Beam's eye view
irregular field shapes are shown in Figures 5-3 and 5-4.


Tertiary Collimator Energy (MV) In-air Output


Measurement Calculation Conventional


Block(open) 8 1.034 1.031 1.026
18 1.032 1.028 1.024


MLC(open) 8 1.013 1.012 1.020
18 1.012 1.010 1.017


MLC(450 wedge) 8 1.021 1.021 1.047
18 1.020 1.018 1.041




5-6, 5-7, and 5-9. A close examination of Figure 5-6 shows that as the field is

increasingly blocked, the relative in-air output starts to increase first and then decreases

as the field blocking becomes extreme. This is attributed to increasing scatter from the

tertiary collimator and decreasing head scatter as the field is progressively blocked. A

simple geometrical back projection of the field to the source plane that accounts for the

head scatter is not sufficient to predict the in-air output accurately. The tertiary collimator

scatter from field shaping blocks must be included to achieve better accuracy. Even the

calculations show lower relative in-air output than measured data for larger tertiary

collimated fields. The reason for this small difference can be attributed to the scatter








contribution from side wall of tertiary collimator that is not included in our calculation

model. Figure 5-7 indicates that the amount of scatter contribution from MLC is not

significant. Therefore, it may not be necessary to consider MLC scatter factor for in-air

output calculation as long as head scatter is calculated accurately. But the inclusion of

scatter from MLC gives better accuracy. The importance of separating scatter component

from the head and beam modifier (wedge) is clearly demonstrated in Figure 5-9. Thicker

wedges introduce significant amount of scatter. The magnitude of scattered radiation

from an external wedge is dependent upon the surface area of the wedge seen by the

photon fluence that is incident on it.

Scatter source distribution functions described in the literature have been defined

within the physical dimension of flattening filter. In reality, in-air output may changes

even when the field size becomes larger than the flattening filter dimension. If this effect

is not considered, the calculation can result in an increasing discrepancy with

measurement. To account for this effect, Yu and Sloboda (1993) assumed a pseudo

source distribution function outside the flattening filter and it is determined by

experiment for each beam. In field mapping method, since measurement data is directly

used combined with equivalent field relationships, this effect is inherently included, thus,

no additional experiment is required.

When the source-to-detector (SDD) distance changes, the inverse law has been

used to calculate in-air output change. As the detector point changes, the field through

detector's eye view also changes. Therefore, the effective field size for inverse square law

calculation should be changed and this can be easily done with field conversion factors








specific for each detector point. This effect may not be negligible with very small field

size because the gradient of in-air output change is much steeper in smaller field sizes

than larger field sizes. However, it is not easy to separate these two effects, pure inverse

square law and DEV field size change due to SDD change. It is found the effective source

position of photon beam is not the same as physical source position in megavoltage linear

accelerators (Tatcher & Bjamgard 1992, McKenzie & Stevens 1993). The effective

source position can be easily determined by experiments (Tatcher & Bjarngard 1992).

When a effective source position is determined by experiments with fixed field size for

all SDD (Tatcher & Bjmrngard 1992), it inherently includes the effect of field size

change.

However, there are two complications for external wedge field: 1) effective source

position is dependent on field size, and 2) field sizes for head scatter and wedge scatter

are different each other when tertiary collimator is used. Therefore, it may be necessary to

separate each effective source position corresponding to each scatter source.



Conclusion



An in-air output factor calculation algorithm based on field mapping through the

detector's eye view field was developed and programmed. This method can predict in-air

output factor behavior in irregular fields with very good agreement for both open and

wedge fields. Although source plane field size is used to determine the head scatter

factor, parametrization at detector plane is kept by mapping the source plane field size





91

into the detector plane field size. That is, no additional dosimetric data acquisition is

required, which makes it is very simple to implement this method. In order to include the

scatter contribution from tertiary collimator, tertiary collimator scatter factor can be

measured and parametrized. This gives more accurate prediction of in-air output,

especially in the case of the use of Cerrobend block. By virtue of the simplicity, field

mapping method through the detector's eye view field can be easily implemented in any

clinic.




Full Text

PAGE 1

MODELING OF A MUL TILEAF COLLIMATOR By SIYONGKIM A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY UNIVERSITY OF FLORIDA 1997

PAGE 2

This dissertation is dedicated to my loving wife, Gyej in and darling daughters, Minkyung and Minna, for everything we have s hared.

PAGE 3

ACKNOWLEDGMENTS I am very pleased to acknowledge the helpful guidance of my research advisor, Dr. Jatinder R. Palta, who has been truly supportive in every way not only as an academic teacher but also as a person. I extend my gratitude to my committee member, Dr. Timothy C. Zhu, for providing specialized guidance on the theoretical and experimental aspects of my study. Thanks are extended to the rest of my committee members: Dr. Wesley E. Bolch, representing the Department of Nuclear and Radiological Engineering; Dr. James K. Walker, representing the Department of Physics; Dr. William Mendenhall, r epresenting the Department of Radiation Oncology at the University of Florida. A special debt is acknowledged to Dr. Chihray Liu for his willingness to share his precious time with me to discuss many problems and to lead me in the right direction, especially for the development of the multileaf collimator module. I would also like to thank Patsy McCarty and Anne Covel l for their editorial advice. The gracious assistance of John Jerico is acknowledged; he helped me to fabricate the custom blocks for experiments. Phil Bassett and John Preisler kindly helped me to solve several mechanical problems that occurred during operation of the linear accelerator. My thanks are extended to them Ill

PAGE 4

Finally, I would be remiss if I did not acknowledge all the time that I spent together with every member of the physics group in the Department of Radiation Oncology lV

PAGE 5

TABL E OF C ONT EN TS pag e ACKNOWL E D G M EN TS ......................... ...... . . .. ..... .. ............. .. ........ . .............. .. .. . i ii ABSTRA. C T . .. .... .. .. . .. .. .... ...... . ........ .. . . . ... .... .. .. . .. ..... ....... ..... . . .... . ....... ......... v iii CHAPT E RS 1 INTRODU C TION .. . .. . ... .. . ...... . .. .. .... . ..... ... .... . .. . .. .. .. . ... .. . .. ... . ... ..... . .... .. . .. .. 1 Gener a l Introduction .. . .. .. .. .............. . .. .. .. ................. . .. .. .. . .. . . . .. .... . . . . . ... . . ....... 1 Si g nifi cance o f Th e M u ltil eaf Co lli ma t o r Sys t e m ............. ........ .... ............... ....... 2 O v ervie w of ML C S yste m s ............. .. .. .... ..... . ... .......... ............. ... .... .... .. ........ 4 The Aim of This Th es i s . .................. ....... ........ .... ... .. .. .. .... . .. .... ... .. .. .. ... .. .. . .... . . . .. .. . ... . .... 9 2 D E VELOPM EN T OF AN ML C MOD U L E FOR A T REATMENT PL~ G S YSTEM ....... .. .. .... .... .. .. . .. . . .. .... .. .. .. ............ .. .. .. ... . ... . .. .. .. .. .. ......... . . .. .. .. .. ... . .... 10 Introduction .. .. ... . ..... .. ... .... .. ... . . ... .. .... .. .. .. ..... .. ..... ... . .. . . .. ... .. . .. .... .. .. . .. . ..... .. .. . .. .... .. . .. . .. .. 10 Method s an.d Material s ...... ........ .. .. ...... .. .. .. .. .......................... ............................... ............ .. ............ 11 Geomet r i c Optimi z ati o n of ML C Co nf o rm atio n .. . . .. . .. .... . . . .. .. ... .... ........ .. 11 Use r Int e r fa c e M o dcl e ............... ....... .. ...... .. .. .............................. .............. . .. ......... .. ........... .. ...... .. ..... 13 R es ult s .. .. ... .......... ... .. ... ............. .. ............ .. ............... ..... .. .. .. .................. ..... .......... .. ...... ........ .. .................. ........ 14 Co n c lu s ion .............. .. . .... .... .. .. . . ... .. .. . .. .. .. .. ... . .... . .... . . .. .. ... . . . . .. .. ......... .. .. .. ..... .. .... .... ...... 15 3 A STUDY OF T H E EQ U IVAL EN T FI E LD C O NCE PT FOR THE HEAD SCATTER FA C TOR .... .. ... .. ... .. . .. ... . .. .. ..... .. ... . .. ... ... ... . ........ . .. . . ... .. ..... .. .. . .. .. .. ... .. .. ... . .... ... .. . .. . . ... . 19 Introduction .. .... ... .. .. .. .. ... ... ... .. .. .. ... ........ .... ....... ..... .. .. .. . ..... . .. .. .. .. . ................. ... . . .. .. .. .. .. ... . . .. 19 Method s an.d M aterial s ......... ........ .. .... .. . ... .. .. .... .. .. .. ..... .... .. ..... .... ... .. . .. . .. ..... .. ................. ............. 2 2 Equi v alen t Fi e ld f o r H ea d S ca tt e r Facto r .... .. . . .... .. .... .. . .... ... .. .................... ..... 22 Equi v al e n t Fi e ld for W edge and Te rtiar y Co ll imato r S c att e r F a c t o r ............ ........ 27 R es ult s .... .. . .. .. ....... .. .. .. ................... .. ..... ..... .. .. .... ..... ..... ... ... .. .... .. . .. ............................. 29 E qui v al e n t Fi e ld f o r He a d S ca tt e r Fac tor . . . . . .. ... . .... . ... .......... .. . . .... . . .. . . .. . 29 E qui val en t F i e ld for W e d ge and Te rtiar y Co llim a t o r S c atter F act o r .... . . .... . .. . 3 4 Di s cu ss i o n .. .. ... .. . .. . ... . . .. .. .. .. .. ..... ..... . ... .. ... .. . .. .. . .... .. . ..... .. .. ... . . ... . ........ .. .. ......... ... ... .... .. ... 3 7 Conclu s ion ............. .. ..... .. .. ... .. .. . .. ... ......... ....... . .. .. ... .. . .. ... . ... .... ... .. ... ....... .... .... ....... .. .... .. . 3 9 V

PAGE 6

4 AN EQUIVL EN T SQUARE FI E LD FORMULA F OR DETERMINING HEAD SCATTER FACTORS OF RECTANGULAR FIELDS ...... .. . . . .... . . .. . .... . 40 Introduction . ..... .. .. ....... .. . ...... .. .. .. . .. .. ..... . .. .. . . .. .... . .. .. ... . .. . .. . . .... . . .. . .. 40 Theory . ..... . .. .. . .. . .. .. . .... .... . .... ..... ..... . ..... .. .. . ..... . .. .. ... .. ... ........ .. . ...... . ...... ... 42 Method s and Material s . ... ....... ..... .. . .. .. ... ... . .. . .. .. .. . .. .. . .... . . .... .... . ... . ... .. . . 4 5 Re s ult s . . ... ... .. .... .... .. .. ..... .. . ... . .. .. . .. .. ..... .. . ........ .. . . .. .. . . .. . .. . . .... . ... .. . .... .. 46 Discussion .... .. . .. .. . .. .. ... .. ...... ....... ..... ..... . ... .... . ........ .. ...... .... ............... ...... ..... 53 Conclusion . .. . .. . .. .. . ..... .. .... .. .. ........ ..... .. . .. .......... .. .. . .. ........... . .. . .... ... . ...... .... .... 56 5 A GENERALIZED SOLUTIO N FOR THE C AL C ULATION OF IN-AIR OUTPUT FA C TORS IN IRREGULAR FIELDS .... ..... ....... . . .. ...... . ... ...... .. ........ 58 Introduction .. ..... .... . ... . .. .. . ... .... .. .. .... .. ....... .. .. .... ..... . .. . .. . ......... . ... .... . .. .......... 5 8 Formali s m o f In-air Output Factor . .. . .. .. .. . .. ........ .... .. .... ... .. .... ............. . ...... .. . 61 Head Scatt e r Factor and Monitor Back Scatter Factor .. ..... . .. . . .. ... . . .. . . .... . .. 61 Pre s ence of A Beam Modifier in The Field . ....... . .. .. . .. . .. . .. . ... .. . . ... ... . .... ... .. 64 A Shaped Field with A Tertiary Collimator ....... ... ... . .. . .. . . . .. .... ............... .. .. 66 Calculation Al g orithm .. .... ... ..... . ... .. .. .. .............. . ... . ...... . .. ... . .. . .. . ........ ...... .. 67 Open Field ... ... .. .. .. .. . .. .. .. ....... ........... .. .. . .. ...... .. ..... ... . .. . .. ... .. . .. . . . .. ... .. ...... . 6 7 Wedged Field ................. .. ........... .......... .. .. . .. .. . ... . . .. . .. ... .. . . ... .... .. ........ .... 73 Methods and Materials .. . .. .. .. .. .. . ..... .. .. . .. . .. .. .. . .. . .. .. .. ... .. .. .. .. . . .. . ........ .... .. ... 7 6 Results .. ..... ... .. . .. .. . .. .. .. .. .. . ..... .... . .. .. .. .. .. . ......... . .. . . .. .... .. . ........ .. . ... . .. . .. . . .. 80 Tertiary C ollimator Scatter Factor .. .. .. ... . .. .. . .. .. .. .. . .. ... .. ... .. . ... ........ ......... . ... 80 In air Output Factor of Open Field s Defined by Tertiary Collimator .... .............. 80 In-air Ou t put Factor of Varian Typ e Wedge ( E x ternal Wedge ) Field s . . ..... .. .. .. 84 In-air Ou t put Fa c tor o f Irr eg ular Shap e d Field s ... . .. ... ... .... . .... ... . .. ..... .... .... . 87 Di s cu s sion . . .. . .. .. ..... .. . . . . ... . ...... . .. .. .. . ..... .... .. ..... . . . ... . .... . .. ... ... ...... .... . 87 Conclusion . .. . .. .. .. . .. .. ..... . .... ....... .... .. ..... ....... .. .. ....... ........... . ... .. ..... . .. . .... . 90 6 TWO-EFFECTIVE-SOURCE METHOD FOR THE CALCULATION OF INAIR OUTPU T FACTOR ATV ARIOUS SDD s IN WEDGED FIELDS ..... .. ... .... . 92 Introduction .. .. . ..... .. .... .. .. .. .. .... ... . . ..... .. .. .. . .. ..... ..... . .. ...... . . .... ... ... .. . . .. .. 9 2 Theory ..... . .. .... .. . .. .. . .. .. .. .... .. .. .. .... .. .. .. .. .... ..... .. .. . .. . ....... ... .. . . . . ... .. .. .. ... . 9 4 Methods and Material s .... ... .. ............. . .... .. ... . .. ......... ..... . ... . . . .. . ... . .. .. . . . . . .. ........ 100 Result s .... .... .. . .............. .......... . ... ............... .. . ........... ............. ........................ . .. .. . .. 1 0 1 Di s cu s sion . .. .. . ... . .. .. .. ..... ................. ... ..... . .. ............. ... .. .. . .. ..... .. . ...... ................ 110 Conclusion ..... .. ..... .. ... .. . . ... .. .. .. . .. .. . .. .. . .. .. . ... . .. .... .. . . .. .. ......... .. ..... .. .. ... .... ... 111 7 CONCLUSIO N S .. ... ... .. .. ... ..... ... ....... .. .. ... .. . ......... ..... .. .. . .. ....... .. ....... ........ .... .... ..... ............. ... 113 General Di s cu s sion . ....... . ... . .. .... .. .. .. .... .. ...... . .. . .......... .... .. .. .. . .. ............ . ..... ..... .. .. . . ... ....... . 113 Conclusion s .. .. ......... .. . .. .. . .. .. ...... .. ... .. .. ......... .. .. ... ..... ........ ...... ......... .... .. ... ... . ..... .. ....... ..... . 118 V l

PAGE 7

APP E NDI CE S A SOUR C E PR OG RAM O F THE ML C MOD ULE ................ . ...... .. .. ..... ............. ... 124 REF E RENC E S . .. . .. .. .. .. ..... . . .. . .. ... .. .. .... .. ..... .. .. . .. . .. .... . . ........ ... ... .. . . ....... 2 0 3 BI OGRA.Pill C AL SKET C H ..... ..... .. .. ............. ........ ........... .. ..... .. . ............ .... .... .. 2 08 V ll

PAGE 8

Abstract of Dissertation Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy MODELING OF A MULTILEAF COLLIMATOR By Siyong Kim August 1997 Chairman: Jatinder R. Palta Major Department: Nuclear and Radiological Engineering A comprehensive physics model of a multileaf collimator (MLC) field for treatment planning was developed. Specifically, an MLC user interface module that includes a geometric optimization tool and a general method of in-air output factor calculation were developed. An automatic tool for optimization of MLC conformation is needed to realize the potential benefits of MLC. It is also necessary that a radiation therapy treatment planning (RTTP) system is capable of modeling MLC completely. An MLC geometric optimization and user interface module was developed. The planning time has been reduced significantly by incorporating the MLC module into the main RTTP system, Radiation Oncology Computer System (ROCS) Vlll

PAGE 9

The dosimetric parameter that has the mo st profound effect on the accuracy of the dose delivered with an MLC is the change in the in-air output factor that occurs with field shaping. It has been reported that the conventional method of calculating an in-air output factor cannot be used for MLC shaped fields accurately. Therefore, it is necessary to develop algorithms that allow accurate calculation of the in-air output factor. A generalized solution for an in-air output factor ca lcul ation was developed. Three major contributors of scatter to the in-air output--flattening filter, wedge, and tertiary collimator--were considered separately By virtue of a field mapping method, in which a source plane field determined by detector's eye view is mapped into a detector plane field, no additional dosimetric data acquisition other than the stan dard data set for a range of square fields is required for tl1e calculation of head scatter. Comparisons of in-air output factors between ca lct1lated and measured values show a good agreement for both open and wedge fields. For rectangular fields, a simple equivalent sq uare formula was derived based on the configuration of a linear accelerator treatment head This method predicts in-air output to within 1 o/o accU1acy. A two-effective-source algorithm was developed to account for the effect of source to detector distance on in-air output for wedge fields. Two effective so urce s, one for head scatter and the other for wedge scatter, were dealt with independently. Calculations provided less than 1 % difference of in air output factors from measurements This approach offers the best comprehensive accuracy in radiation delivery with field s hape s defmed using MLC. This generalized model works equally well with fields shaped by any type of tertiary co llimator and have the necessary framework to extend its application to intensity modulated radiation therapy lX

PAGE 10

CHAPTER 1 INTRODUCTION General Introduction The discovery of x-rays and radioactivity was promptly followed by its therapeutic application in the treatment of benign and malignant diseases. The first therapeutic use of x-rays is reported to have taken place on January 29, 1896, when a patient with carcinoma of the breast was treated with x-rays. By 1899 the first cancer, a basal cell epithelioma, had been cured by radiation Nowadays, radiation therapy is used in approximately half of cancer patients either in a stand alone therapy or in combination with chemotherapy or surgery. Better cure rates with radiation therapy, preservation of organ and its function, and cosmesis can be easily attributed to technological gains in radiation physics and better insights into radiation biology and pathophysiology The primary goal of radiation therapy is to produce the highest probability of local and regional tumor control with the lowest possible side effects. Most cancer cells, like other highly proliferating cells, are more sensitive to ionizing radiation than normal cells. This is the fundamental premise in radiation therapy. The difference however is not always large enough to guarantee successful treatment all the time. Therefore, significant effort has been expected in radiation therapy in developing means to conform the dose to the tumor cells while minimizing the dose to the normal cells, and to deliver the dose as accurately and safely as possible. Since the advent of radiation therapy, photon beams 1

PAGE 11

2 have been used the most commonly. In the early days of radiation therapy, photon beams from x-ray tubes were the only sources of radiation available at that time. Most treatments were limited to diseases at shallow depths due to the lower penetrability of these x-rays. With the development of the cobalt machine with the use of sealed, high activity 6 Co source in 1951 (Johns et al. 1952, Green & Errington 1952), radiation therapy techniques took a quantum leap. Although cobalt unit is still an important machine today, linear accelerators have become the most commonly used treatment machine in radiation therapy clinics. The developments of diagnostic modalities, such as CT (computed tomography) and MRI (magnetic resonance imaging) have dramatically increased the precision in localization of the tumor extensions and critical healthy tissues in three dimensions. A greater precision in localization of the tumor volume has been augmented by the computer controlled radiation therapy machines, equipped with multileaf collimator (MLC) that enable precise customized beam shaping (Brahme 1987). Significance of The Multileaf Collimator System The computer controlled MLC system is regarded as the state-of-the art method for generating arbitrary (and generally inegularly) shaped fields for radiation therapy. Progress in imaging modalities such as CT and MRI dramatically enhance the ability to differentiate and delineate the target volume and nortnal structures in three dimensions. Better information about tumor shapes is leading to a greater need for achieving conformal treatments. An MLC system is considered as the most versatile tool that is available for delivery of three-dimensional conformal treatment. An MLC system for

PAGE 12

3 conformal therapy is still a research tool with its use limited to only a few academic centers. The MLC systems have also been used for shaping neutron beams. (Eenmaa et al. 1985, Chu & Bloch 1987, Brahme 1988, Wambersie 1990). An MLC system offers a number of other important advantages over conventional field shaping devices (Mohan 1992). First, an MLC can be used to implement computer controlled dynamic or multi segmented conf or1nal treatments in which the field aperture for each segment or direction is automatically adjusted to confortn to the shape of the target volume or to a desired shape. Second, an MLC can be used to modulate intensity across the two dimensional profile of a field. Third, an MLC eliminates the effort and cost of fabricating custom blocks such as used in conventional treatments within static fields It also eliminates the need for storage space for blocks and blocking trays, and the eff art required in lifting and mounting heavy blocks. The use of the MLC system for static fields provides savings in set up time while reducing the probability of set-up mistakes. There are some concerns in tl1e field conformation with an MLC. An MLC can provide only a 'zigzag' approximation to the shape of the target volume because of the finite leaf edge dimension This inevitable drawback of the MLC requires some change in the concept of beam collimation. It is important to realize that an MLC does not provide exact conformation to the target contour drawn by a physician. The degree of nonconformality depends on the direction of the leaf placement along the contour edge. Therefore, it is essential that there are methodologies available which allow optimized positioning of the leaves automatically around the target contour. More importantly this step should be completely incorporated within the treatment planning process.

PAGE 13

4 Overview of MLC Systems Motor-driven MLC systems have been in use s ince the mid-fifties (Mohan 1992, Webb 1993). These devices have become very pop11lar within the past several years and many commercial MLCs ( e.g., Siemens, Scanditronix MM50, Varian C-series, and Philips SL-series) are now readily available. The MLC systems provided by different venders are different in design and thus have different dosimetric cl1aracteristics. There are two fundamentally different design concepts of MLC configuration. The first one incorporates the MLC as an integral part of the secondary collimator system, thus replacing either the upper or lower secondary collimator jaws. In the second design, the MLC is attached below the secondary collimator system as a tertiary collimator system. The advantage of the latter design is that repair of the MLC is relatively easier than an integral MLC, thus allowing the machine to be operated in a conventional mode even when the MLC is down. The disadvantage is that an enlarged treatment head reduces the collision free zone for certain clinical setups. The Philips Medical System offers an MLC system that is an integral part of the secondary collimator system. In the Philips MLC the MLC replaces the upper secondary collimator jaws. The travel of MLC leaves i s parallel to the axis of rotation of the gantry, that is, in they-direction The MLC is augmented by a backup collimator which is located below the leaves and above the lower jaws. The purpose of backup collimator is to decrease the intensity of transmitted radiation through the MLC. Backup diaphragms are designed to move automatically to the edge position of the outermost withdrawn leaf Because the vertical location of the MLC i s close to the source, the range of motion of the

PAGE 14

5 leaves is smaller in this configuration than compared to others. Consequently, it is possible to make a more compact treatment head. On the other hand, the leaf width is somewhat smaller and the tolerances on the dimensions of the leaves as well as the leaf travel are tighter than those for other configurations. Another concern from an engineering point of view is that gaps are inevitable between two adjacent leaves (to reduce friction) and opposite leave s (to prevent collision). If the mechanical gap distance is fixed, the irradiated area over the leakage radiation through the gap is larger when the position of the gap is closer to the source. Therefore, a more integrated leakage is expected for this configuration. The configuration of the Scanditronix (Racetrack Microtron, MM50), Siemens, and General Electric (GE) MLC systems is very similar to the previou s configuration except that the lower jaws are replaced with the MLC. In both the Scanditronix and the Siemens design the leaf ends are straig ht and are focused on the x-ray source. The leaf sides are also matched to the beam divergence and that make s these leaves '' double focused''. The Scanditronix MLC is positioned at 31 cm from the isocenter with a maximum field size of 32 x 40 cm 2 and a maximum over-center position of 5 cm. The width of the individual leave s at isocenter is 1.25 cm. The Siemens MLC consists of 29 opposed leaf pairs. While the two outer leaves of eacl1 leaf bank project to a width of 6.5 cm, the inner 27 leaf pairs project to a width of 1.0 cm at the i socenter plane. Each leaf is independently controlled and moves with the maximum velocity of 1.5 cm/sec. The projected field edge of each leaf can be withdrawn up to 20 cm away from the isocenter and can travel up to 10 cm across the isocenter. The leaves may be manually positioned

PAGE 15

6 with an MLC hand control and these leaf-settings can be uploaded to an information management record and verification system. The GE configuration uses curved leaf ends and contains a secondary 'trimmer' similar to the Philips backup diaphragm. However, this trimmer is located above the upper jaws in the GE design. In the Varian design, MLC is an add-on device that mounts to the existing clinical accelerator head thereby making it field retrofitable The advantage of this design is that it is possible to avoid down-time in the event of a system malfunction. ln this configuration, the leaves can be manually moved out of the field when a system failure occurs. Treatment can continue with replacement Cerro bend blocks. A total of 26 pairs of leaves can produce the maximum MLC field size of 26 x 40 cm 2 at the isocenter plane. The newer model of the Varian MLC has 40 pairs of leaves which gives a maximum field size of 40 x 40 cm 2 Each leaf can travel up to 16 cm beyond the isocenter with the maximum leaf speed of 1.5 cm/sec (5 cm/sec in new desig11). Since the MLC is located far from the source, the travel length of the leaves required to produce the same field size is longer than in other configurations, thus it enlarges the diameter of the treatment head. Clearance (from the bottom of the MLC to the isocenter) is 42.4 cm. Clearance can potentially be a minor problem in some clinical cases. Another tertiary system is the Mimic device provided by NOMOS Corporation. This is designed to mount on the blocking tray of a linear accelerator. It collimates the x ray field to a fan-beam which is dynamically modulated by short-stroke leaves as the gantry of the accelerator is rotated The modulated fan beam irradiates a transverse plane

PAGE 16

7 of the patient that is 2 cm thick. The leaves are either fully inserted i11to the beam or fully retracted, providing either full attenuation or no attenuation at a given gantry angle. In general, the following attributes of an MLC system affect its dosimetric characteristics: I) Leaf shape: Ideally one would like the leaves to be "double-focused" that is, leaves form a cone of irregular cross-section diverging from an apex located at the radiation source. The leaves travel on a spherical shell centered at the source. This type ofMLC produces a sharp cut-off at the edge and is used by at least two of the manufacturers (Scanditronix and Siemens). However double focusing is difficult to achieve from the engineering point of view. Therefore some manufacturers (Varian and Philips) use rounded leaf edges. The edge of each leaf is a section of a cylinder and the leaves travel in a plane perpendicular to the central ray. The purpose of rou11ded edges is to keep the transmission through the leaf constant regardless of its position with respect to the central ray. There are some potential problems with such designs: first, the light field may not coincide with the 50% width of the radiation field; seco11dly, the radiation field may shift as much as 5 mm when the leaves move from O to 20 cm. 2) Integral MLC vs optional attachment : The integral MLC (such as those by Scanditronix and Philips) replaces one pair of jaws. In most instances, however

PAGE 17

8 the MLC is offered as an optional attachment (e.g., Varian). In an integral MLC the leaves are at the same distance from the flattening filter and the s0U1ce as tl1e jaws they replace. Therefore they affect the output in the same manner as the jaws. On the other hand, an MLC offered as optional attachment is farther away from the flattening filter and it affects the output in a manner similar to conventional blocks Many authors have studied general dosimetric characteristics of MLC systems, such as field-size dependence of output factors (Jordan & Williams 1994, Palta et al. 1996, Boyer et al 1992) depth doses (Boyer et al. 1992, Hug et al. 1995 Palta et al. 1996), isodose distribution (Boyer et al. 1992, Zhu et al. 1992) penumbra (Galvin et al. 1992 and 1993, Boyer et al. 1992 LoSasso et al. 1993 Jordan & Williams 1994, Hug et al. 1995, Palta et al. 1996, Powlis et al. 1993), and leaf transmission data (Jordan & Williams 1994 Palta et al. 1996 Boyer et al. 1992 Hug et al. 1995, Galvin et al. 1993, Klein et al. 1995) The dosimetric parameter that has the most profound effect on the accuracy of dose delivered with an MLC i s the change in output factor, especially the in air output factor that occurs with field shaping. In linear accelerators, the in air output factor changes according to the collimator opening. The MLC as a collimator system, also affects the characteristics of the in-air output factor The conventional method of in-air output factor calculation can often have a significant discrepancy between the predicted and measured values when it is applied to

PAGE 18

9 MLC systems. Therefore it is necessary to develop an accurate method of in-air output factor calculation that can be applied to MLC shaped fields. The Aim of This Thesis The aim of this work is to develop a physics model for treatment planning which describes the high energy photon beam collimated by an MLC system. The above objective is divided into three goals which are essential in clinically supporting MLC systems: l. To develop and implement an algorithm for the geometric optimization of MLC conforn1ation based on an arbitrary contour shape (Chapter 2). 2. To develop and implement a user interface module of the MLC into a radiation therapy treatment planning (RTTP) system based on a beam's eye view (BEV) display (Chapter 2). 3. To develop an algorithm to detem1ine the change of in-air output factor for shaped fields (Chapters 3 6).

PAGE 19

CHAPTER2 DEVELOPMENT OF AN MLC MODULE FOR A TREATMENT PLANNING SYSTEM Introduction An MLC system offers a state-of-the-art method for field shaping in radiation therapy. The advantage of using an MLC is that since the field shaping is performed using leaves, the fabrication of ct1stom blocks is no longer needed. This increases the treatment delivery efficiency because multiple fields can be treated in a short time without reentering the treatment room. It also eliminates all problems associated with heavy blocks, alterations remodeling and remounting. The most important advantage of this technology lies in its potential for use in the delivery of 3-D conformal therapy and intensity modulated radiation therapy. An issue that discourages some clinicians from accepting MLCs more readily is the 'zigzag' approximation to the shape of the target volume with an MLC system because of the finite leaf edge din1ension compared with the smooth conformation using shaped blocks. This inherent drawback of MLCs introduces some change in the concept of beam collimation; that is, an MLC does not necessarily coincide with the target contour prescribed by a physician. Given the geometrical constraints of the setup, it is only possible to achieve an 'optimal' field fit with the MLC system. The optimization criteria must be incorporated into the plaiming process as efficiently as possible. Manual placement of all leaves (52 or 80 leaves maximum) that defme an MLC portal can be 10

PAGE 20

11 unacceptably time consuming. Therefore, a facility that automatically derives optimized MLC leaf positions from a prescribed target contour and uses this information for a subsequent treatment plan is necessary. Methods and Materials Geometric Optimization of MLC Conformation The MLC system should be completely integrated in the planning process to realize its full potential clinical benefits The problem that must be solved is to determine the best MLC leaf positions for the optimal target volume conformation. The use of conventional Cerrobend blocks to get tertiary field margins has provided radiation oncologists a means of smoothly matching the edge of collimation with tl1e projection of the irradiation volume. However, when an MLC is used the collimation occurs in discrete steps Therefore it is important to determine optimal placement of each leaf with respect to the field edge. Several treatment machine-dependent characteristics must be made known to determine leaf settings automatically with a computer algorithm, such as the number of leaves, their widths, travel limits, solllce to MLC distance, and relative leaf travel direction. In this study, an optimization program was designed to fit a Varian MLC system. Nevertheless, it is flexible in nature and can be adapted to any MLC systems. In the Varian design, the MLC is an add-on device that mounts to the existing clinical accelerator head A total of 26 pairs of leaves can produce the maximum MLC field size

PAGE 21

12 of 26 x 40 cm 2 at the isocenter plane. Each leaf can travel up to 16 cm beyond the isocenter with the maximum leaf speed of 1 5 cm/sec In the design of the optimization program three automatic leaf coverage strategies were provided as illustrated in Figure 2-1: (a) 1 / 2 Overblocking : Each leaf end intersects with the prescribed field edge at its midpoint. Thi s is a simple algorithm that sets equal amounts of overblocking and underblocking with regard to each leaf (LoSasso et al. 1993). (b) Full overblocking ( or zero underblocking): Leaf positions are always inside the field to minimize the irradiation of normal tissue. (b) 1/3 Overblocking: Each leaf end intersects with the prescribed field edge at one of the 'one third point of the leaf end. In this strategy about 1 / 3 of the leaf end is inside the field. This strategy is a simplified algorithm of variable insertion done by Zhu et al. (1992) that results in the 50% isodose line always outside the desired field edge 1/2 overblocking Full overblocking Field Contour 1/3 overblocking Figure 2-1 Three automatic leaf conforrnation strategies.

PAGE 22

13 Depending on the shape of the contour, it is often necessary to rotate the collimator or to shift the contour with respect to the beam to get a better fit of leaves with the target contour (e.g., 90 rotation for the diamond shape of contour). Strategies of collimator rotation and contour shift are also provided. In the contour shift option, a contour can be shifted in both the xand y-direction. Regardles s of the automatic technique used, the MLC aperture shape may not be logical when evaluated by the treatment planner. Sometimes it is nece ss ary to adjust individual leaves to ensure target coverage in a critical region or to avoid small critical structures, e.g., the optic chiasm which may be close to a target volume. Therefore, a manual leaf adjustment facility is provided in the BEV. In this option each leaf can be manually positioned, around a target volume or a critical structure. User Interface Module It is desirable to have MLC field shaping algorithm which is incorporated into the RTTP system. A stand alone software package is more error prone and time consuming Therefore, it is necessary to develop and implement an user interface module of the MLC model within an existing RTTP system. There are many commercially available R TTP systems. Although the functional characteristics of RTTP systems are very similar to each other, each RTTP system is different from others in the structure of its programming; thus, an user interface module of the MLC must be compatible with the RTTP system used at each hospital. One of the more popular commercial RTTP systems is the Radiation Oncology Computer Systems

PAGE 23

14 (ROCS) RTTP system (ROCS 1994) which was installed in the University of Florida's Department of Radiation Oncology in 1994 and has been used as its main R TTP system. In this study, an MLC user interface module which is adaptab l e to the ROCS R TTP system was developed. The source program for the user interface module is written in BASIC. Because most modules of the ROCS RTTP system are written in BASIC, this was the programming language of frrst choice. The following key points were adhered to during the development of this MLC software module: a) minimal change of the present source prograin, b) minimal change of the present program structure, c) minimal change of the present data library and their format, and d) easy adaptation of the new module to the present RTTP system. Results A total of 38 s ubroutine s were newly created and 8 present subrout ines were revised to develop an MLC optimization and user interface module for the ROCS main R TIP sys tem The description of each newly generated sub routine is summarized in Table 2-1. The complete source program of the module i s contained within Appendix A. Figure 2-2 shows a flow chart of the module. In the ROCS main module, users enter into the irregular field module. Using the 'field editor' module, users can create irregular fields. Once irregular fields are provided, the 'MLC field edi tor module can be

PAGE 24

15 used In the 'MLC field editor' 1nodule, u se r s can create MLC fields using the 'edit field' tool To perfortn leaf conformation MLC geometric optimization strategies are used in the 'edit field' tool. For geometric optimization, 'automatic fit ', 'collimator angle selection', 'contour shift', and 'manual fit strategies are used Calculation points can be defined after the MLC field is provided using the point editing' tool. Once an MLC field i s created user s can make the opposite field s imply by se lecting the 'op posite field' option in the 'MLC field editor' module. The 'ex port field' option creates an ASCII file for file transfer to the MLC controller computer on the treatment machine. Conclusion An MLC geometric optimization and user interface module was developed as part of this research. The module was implemented to the main RTTP system, ROCS (version 5 .1.1) and is currently in clinical u se The planning time was significantly reduced by incorporating the MLC module into the main R TTP system.

PAGE 25

16 Table 2-1. Description of subroutines. MLCINI: MLCDRAW : MLCOPT : MANOPTI: LEAFLT: LEAFUP: LEAFRT: LEAFDN: REDRAWMLC: NOTELEAF: NOTE2LEAF: selected MLCSETMENU : AUTOFIT: This subroutine specifies MLC dimension and set main variables. This subroutine draws MLC leaves with leaf position data This s ubroutine searches geometrically optimized MLC leaf position. This subroutine enables manual MLC field editing. This s ubroutine moves leaf to left direction during manual fit. This s ubroutine selects upper leaf during manual fit. This subroutine move s leaf to left direction during manual fits This subroutine se lect s lower leaf during manual fit. Thi s sub routine redraw s MLC leaf changed during manual fit. This subroutine assigns different color to selected leaf during leaf change in same side. This subroutine move s cursor and assigns different color to leaf during leaf change between two different sides. This s ubroutine di s play s MLC field editor menu. This subroutine carrie s out geometric optimization for MLC field automatically. MANUFIT: This subroutine carries out geometric optimization for MLC field manually. MLCOPTUNDER: This s ubroutine searches geometrically underblocked MLC leaf position MLCOPTOVER : This subroutine searches geometrically overblocked MLC leaf position AUTOUNDER: AUTOOVER: Thi s s ubroutine carries out geometric underblocked optimization for MLC field automatically. This s ubroutine carries out geometric overblocked optimization for MLC field automatically.

PAGE 26

17 Table 2-1. -continued. CONVERTANG: MLCGETANG: MLCSHIFTX: MLCSHIFTY: MFLDDATA: SAVEMFLD: MFLDDEF: GETMFLD: IR7: ISODRW: LEAFINI: LEAFRETRIV: GETIFLD2: SAVEIFLD2: GETMFLD2: SAVEMFLD2: This subroutine converts col limator angle in degree to radian and get sine cosine values. This subroutine gets collimator angle in degree as user input. This subroutine gets MLC offset in X-dir. as user input. This s ubroutine gets MLC offset in Y-ctir. as user input. This s ubroutine gets collimator opening, field outline and ca lculati on point location for MLC field. This subroutine prompts the user to save MLC field data. If the user chooses to save the data the MLC data file and the irregular library file are updated. This subroutine displays an MLC field ba sed on user input. The user selects an MLC field and chooses to edit, load, oppose or export MLC fields This subroutine gets MLC field data from the file. This subroutine is the MLC field main editing menu Control is transferred to the appropriate routine based on which function key i s pressed This subroutine draws original isocenter before MLC offset This su broutine sets initial values for leaf position. This subroutine sets existing MLC field. This subroutine gets irregular field data from the file. Tl1is subro u tine prompt s the user to save irregular field data. If the user chooses to save the data the irregular data file and the irregular library file are updated. This subroutine ge t s MLC field data from the file. This s ubroutine prompts the user to save MLC field data. If the u ser chooses to save the data the MLC data file and the irregular library file are updated

PAGE 27

18 Table 2-1. -continued. MLCOPPOSE: MLCEXPORTV : MLCSELECT: MLClPAGE: This subroutine creates opposed MLC field. Opposed block field is generated at the same time. This subroutine creates MLC field data file to be exported for Varian type Exported file can be directly used by Varian MLC s oftware "SHAPER" This subroutine prompts the user to select MLC type. This subroutine displays one page of beam information for MLC field. ROCS main module f eaf coofonnatioo -1 ------! Automatic fit I Irregular field module a) under-blocking b) half-blocking c) over-blocking Field editor IVLC field editor a) load field .. -------------Collimator angle ,----------b) edit field Contour shift c) ~ite field cl) field IVlanual fit .. .... -.. __ __ , __ rc;,~~,;t i oo .. ix>i nt ~ ~ ~ i ~ -a) point eclting .. Figure 2-2. Outline of MLC module

PAGE 28

CHAPTER3 A STUDY OF THE EQUIVALENT FIELD CONCEPT FOR THE HEAD SCA TIER FACTOR Introduction In general the equivalent field is defined as a field having the same central axis depth-dose characteristics as the given field (Jones 1949, Day 1950). The relationship between equivalent fields is based on integration of the phantom s catter parameter for shaped fields. The ref ore, a field is determined that produces the same ratio of phantom scatter to primary dose on the central axis (Day & Aird 1983). It has been generally assumed that the radiation output has two scatter components, S c and S P; in convention, S c is referred to as the col l imator scatter factor which is characterized by the X and Y jaw collimator openings and S P accounts for phantom scatter, which depends on the area of the irradiated phantom. Although S c is called the collimator scatter factor, S c accounts for both the monitor backscatter contribution and the head scatter contribution to the in-air output. The monitor backscatter factor (Lam et al. 1996 Ahnesj o et al. 1992, Patterson & Shragge 1981, Luxton & Astrahan 1988 Moyer 1978 Higgins et al 1989 Kubo & Lo 1989 Kubo 1989 Duzenli et al 1993) can be s eparated from S c The term 'head scatter factor' is limited to the contribution of head scatter in this present study. For nonstandard fields such as rectangular and irregular fields, conventionally, SP is obtained through the equivalent field relation, and the equivalent field relation for phantom scatter is well 19

PAGE 29

20 established (Day & Aird 1983, Bjamgard & Siddon 1982). The equivalent field method has also been applied for determination of the scatter contribution to the in-air dose from any scattering structure, such as the flattening filter. The stipulation is that the equivalent field contributes the same amount of scatter radiation on the central axis as the collimator-set field. The relationship between equivalent fields for head scatter is based on integrating the head scatter parameter of the shaped field and finding the field that produces the same ratio of head scatter to primary dose on the central axis. The head scatter characteristics are not the same as the phantom scatter characteristics. Therefore, it is necessary to establish the equivalent field relationship for head scatter separately from that for phantom scatter. When a scattering structure is located above the collimator, such as the flattening filter or an internal wedge, the amount of scatter radiation that can reach a detector is related to the configuration of the field at the source plane as seen from the detector, that is, the detector's eye view (DEV) field (Lam et al. 1996, Ahnesjo 1994). When head scatter factor is parametrized at the flattening filter (or the source) plane (Lam et al. 1996) or the field mapping method (see Chapter 4) is used, it is imperative to assess the equivalent field relationship at the source (or flattening filter) plane. Lam et al. (1996) empirically showed that the formula of the area-to-perimeter ratio for the equivalent square of a rectangular field for phantom scatter (Sterling et al. 1964, Worthley 1966) is also valid for head scatter at the source plane and this relationship was successfully applied to obtain a modified equivalent square formula at the detector plane through the field mapping method. For an irregular field, conventionally, the head scatter factor is

PAGE 30

21 approximated by that of the rectangular field determined by the secondary collimators. Although the conventional method gives a good approximation in most clinical cases, the difference of head scatter factor between a rectangular field and an irregular field can be significant when the irregular field is much smaller than the rectangular field such as mantle fields and fields in intensity modulation therapy. Furthermore when an irregular field is created by Philips type MLCs which replace the upper set of secondary collimators, the conventional method can not be used (Palta et al. 1996) In these cases, Clarkson integration (Clarkson 1941) can be applied for a better estimation of head scatter factor for irregular fields (Boyer 1996). To use Clarkson integration, it is required to evaluate the equivalent field relationship between a circular field and a square field. The use of Clarkson integration can also be expanded for the prediction of scatter contribution from both the beam modifier ( e.g ., wedge) and the tertiary collimator ( e.g Cerrobend block and Varian type MLC) when it is needed to independently deal with wedge scatter or tertiary collimator scatter. The amount of scattered radiation from a wedge depends on the area of the wedge that intercepts the radiation coming downstream through the treatment head. If a wedge is located above the collimator jaws like that in a Philips machine, the detector's eye view field at the source plane can be used for both head scatter and wedge scatter. However when the wedge is located underneath the secondary collimator like that in a Varian machine equipped with an MLC, the field size for the wedge scatter contribution is different from the field size for the head scatter contribution. Whereas the head scatter contribution is determined by the field seen by the detector's eye view the wedge scatter contribution depends on the field size projected at

PAGE 31

22 the detector plane. Therefore, in this case, wedge scatter should be dealt with separately from head scatter. Tertiary collimator scatter contribution may also be separately treated when the amount of scatter is not negligible For both wedge and tertiary collimator scatter, the amount of scatter radiation that can reach a detector is related to the configuration of the field projected at the detector plane Therefore, i11 the se cases, th e equivalent field relationship is obtained at the detector plane. In this chapter the equivalent field relationship of square and circular fields was provided at the source plane for the head sc atter factor The fact that the area-to-perimeter ratio of the equivalent s quare of a rectangular field for pl1antom s catter i s also valid for head scatter at the so urce plane ( Lam et al. 1996 ) was analytically inve s tigated. The equivalent field relationships for wedge scatte r and tertiary collimator scatter were assessed at the detector plane. Methods and Material s Equivalent Field for Head Scatter Factor The photon ene r gy fluence equation at a detector point may be defined as qi = \J' p + 'I' s = \f' p( l + SP R 11), (3.1)

PAGE 32

23 where 'l'p is the energy fluence due to primary photons, 'l' s is the energy fluence due to scatter photons from the head, and SP Rh is the ratio of scatter fluence originating in head to primary fluence. Assuming that dose is linearly proportional to energy fluence in megavoltage photon beam, the equivalent field can be defmed as the field that gives the same scatter-to primary ratio, SP R 11 as the collimator-defined field. The SP Rh of any arbitrary shaped field is the integration of the differential scatter-to-primary ratio function over the whole field, SPRh = ff dSPR.h dA dA (3 2) Several models have appeared in the literature that accurately describe the scatter photon energy fluence distribution that emanates from the head such as uniform (Ahnesjo et al. 1992), triangular (Abnesjo 1994) Gaussian (Dunscombe & Nieminen 1992), a combination of several functions (Yu & Slaboda 1993), and experimentally determined distribution functions (Jaffray et al. 1993). Ahnesjo (1994) concentrated on scattered pl1otons from tl1e flattening filter and calculated the differential scatter-to-primary ratio of flattening filter scatter, dSPR 1 l dA according to the radius from the central axis, using the first scatter approximation. Ahnesjo 's work showed that dSPR 1 l dA is well described by either Gaussian or triangular function (Ahnesjo 1994) Since the dominant contributor of head scatter is the flattening filter (Kase & Svensson 1986), we assume that the equivalent field relationship for head scatter primarily depends on the characteristics of scatter from the flattening filter. We can replace SP Rh with SPR fi the scatter-to-primary ratio of scatter from the flattening filter, in Eq (3.2):

PAGE 33

SPRt = ff dSPR t dA dA 24 (3.3) Based on Ahnesjo's study (Ahnesjo 1994), it is assumed that the differential scatter-to primary ratio of flattening filter scatter dSP R 1 dA decreases linearly according to the radius within the physical radius of the flattening filter, that is, dSPR 1 =b-ar dA (3 4) where a and b are coefficients dependent on the photon beam energy and the shape and material of the flattening filter. By substituting Eq. (3.4) into Eq (3.3) the scatter-to primary ratio for scatter from the flattening filter for any field is given by SPR1=JJ (b-ar)dA (3.5) It has been reported that the contribution of backscatter into the 1nonitor chamber has a significant influence on the dependence of in-air outpt1t on secondary collimator settings (Lam et al 1996, Ahnesj o et al. 1992 Patterson & Shragge 1981 Luxton & Astrahan 1988, Moyer 1978, Higgins et al. 1989 Kubo & Lo 1989, Kubo 1989, Duzenli et al. 1993). However, monitor backscatter affects both primary and scatter photons in the h h h f h d "" l . fun dSP RJ same way, t us t es ape o t e 11.1erent1a scatter-to-primary ratio ct1on, -dA does not change. That is, the equivalent field relationship is not affected by the monitor backscatter at the source plane if monitor backscatter factor is separated from collimator scatter factor. Equivalent square of a circular field. For a circular field with radius R, the result of the integration (Eq. (3.5]) is

PAGE 34

2 SPR1(cir) =bnR 2 -a-nR 3 3 = 3.142bR 2 -2.094aR 3 25 For a square field with a side of s=2 cr the result of the integ1 ation (Eq. [3 .5]) is SPRJ(sq)=4bcr 2 3.061acr 3 From Equations (3 6) and (3. 7), 4bcr 2 -3.061acr 3 =3.l42bR 2 -2.094aR 3 By dividing both sides with b R 3 and using (alb) = (JI R, 11 a) in Eq. (3.8), we can eliminate the coefficients a and b, that is we get 4 (J R 2 _!_ 3.061 1 R (J R 3 = 3.142 _!_ 2.094 R 1 (3.6) (3.7) (3.8) (3.9) where Rmax is the maximum radius of the flattening filter. Now, multiply Eq. (3.9) by R and rearrange to obtain (4a 2 3.142 )+ (2.094 3 061a 3 R = 0 (3.10) wherea=(cr / R). Equation (3 10) indicates that a is dependent on the radius R. For a very small field, that is, when R 0 a=0.886 is obtained. Note that this is the same result that would be obtained by simply equating the area of the circle to the area of the square. Whereas Eq. (3.6) is valid within the maximum radius of the flattening filter, Rn 1 ax the valid range of Eq. (3 7) is given by one half the side of the largest square which can be inscribed within the circle of radius R,n ax that is, cr max = Rmax I~ Therefore the safe limit of R which guarantees the validity of Eq. (3 .10), is given by R 1 i 1 n = R max I With

PAGE 35

26 R = Riirn, Eq. (3.10) gives a~ 0.9. Therefore, we can find the approximate range within which the equivalent square field exists for the give11 circular field, 0.886R cr 0.9R (3 .11) where R = the radius of the circle andcr =one half of the side of the square. For convenience, we may use one value of cr = 0. 9 R. Equation (3 .11) is obtained within the dimension of flattening filter. However it is considered that it can be used even when a field at the flattening filter plane (or source plane) is larger than the dimension of the flattening filter because the amount of scatter outside the flattening filter is relatively small and slightly varies according to the radius. This fact is discussed in detail in discussion section In-air output factors of circular fields and square fields were measured with a cylindrical acrylic miniphantom as described by van Gasteren et al. (1991). The cylindrical phantom is 3.8 cm in diameter and 15 cm long. Measurements were taken on a Varian 21 OOC with 8 MV and 18 MV photon beams A shonka plastic 0.1 cc ionization chamber was inserted in the mini phantom with its center located at 5 cm for 8 MV or 10 cm for 20 MV from the front surface and 100 cm from the source. Both cit cular fields (radius, r = 2.2, 3.3, 5.6, 7.8, and 10 cm at the so urce plane) and sq uare fields (si de, s = 4 6, 10, 14, and 18 cm at the source plane) were created by an MLC Each square field corresponds to the equivalent square field of each circular field. During the measurements, secondary collimators were set as 40 x 40 to eliminate the relative effect of monitor backscatter.

PAGE 36

27 Equivalent square of a rectangular field For a rectangular field of dimensions L x W, the integration (Eq. [3.5]) gives 1 SPRJ(rec) = bLW a 12 1 = bLW a 12 2 LWD+ L 3 ln tan ~+!. +W 3 1n tan 4 2 7t 2 2 2LWD+L 3 ln D+W L L+W-D +W 3 ln D+L w (3.12) where D is the length of the diagonal of the rectar1gle and = tan 1 W I L. In Equations (3.7) and (3.12), it is not easy to obtain a simple equivalent square correlation for a rectangular field. Lam et al. (1996) obtained good agreements between the head scatter factors of square fields and those of rectangular fields by using the area-to-perimeter ratio formula as an equivalent square forrnula at the flattening filter plane for 6 MV and 15 MV photon beams of Varian 2100C. We have calculated I +SPR 1 values, using Eq. (3.12) for different L x W rectangular fields and Eq. (3.7) for square fields of s = 2LW I (L + W) and compared each other. Equivalent Field for Wedie and Tertiary Collimator Scatter Factor For both wedge and tertiary collimator such as a conventional Cerrobend block and Varian-type MLC, we can assume dSPR =a dA (3 13) With Eq. (3.13), it is trivial to calculate an equivalent square field,

PAGE 37

cr = 0.886R, and 28 for a circular field with radius R, s = 2cr = -J L W for a rectangular field of L x W (3.14a) ( 3 14b) For convenience, we can use cr = 0.9 R for a circular field without significant error. To evaluate the validity of the assumption, Eq. (3.13), scatter contribution from tertiary co llim ator (Cerrobend block and Varian MLC) was measured according to the irradiated area with the s ame mini-phantom a s described in the section Equival e nt s quar e of a circular field A set of measurements were made underneath a s olid piece made out of the same material as the tertiary collimator material (Cerro bend or MLC) with field sizes ranging from 4 x 4 to 20 x 20 cm 2 at the detector plane. The thickness of Cerro bend block was 7.5 cm The data were extrapolated to Ox O cm 2 field The in-air output of ( 0 0) field multiplied b y S c(X, Y) / S c( O 0 ) wa s s ubtracted from in-air output for eacl1 field s ize, (X, Y). The remaining in air output of each field i s only due to the scatter radiation from tertiary collimator material. Scatter contribution from a 45 wedge was also measured. When Clarkson integration is carried out on wedge scatter for an irregular field the assumption Eq. (3.13) is theoretically not correct except in the case of a symmetric field, because of the change in wedge thickne s s Howe v er, if the difference in in-air output between asymmetric fields is not significant, we may use that assumption without significant error We measured in-air outputs for a pair of asymmetric wedged fields (see Figure 3 1). One field contains the most thin part and very little of the thick part of the wedge, and the other is rever s e (e.g ., field size s [X1 = 2.5 X2 = 10 YI = IO, Y2 = 10] and [X1 = 10 .x2 = 2 5 Yl = lO, Y2 = 10] in which the ./ Yaxi s was parallel to the axis of s lope of

PAGE 38

29 the wedge). The contribution of unattenuated photons to in-air output is same for both fields because the detector is located at the isocenter The only difference comes from wedge scatter contributions. + a) Field of thin part I I I I I I I I I I I I I I I + b) Field of thick part Figure 3-1. Description of a set of asymmetric wedged fields. The contribution of unattenuated photons to in-air output is same for both fields. However the wedge scatter contribution i s different. Result s Equivalent Field for Head Scatter Factor Equivalent square of a circular field. The measured in-air output factors of an 8 MV and 18 MV photon beams of Varian 2100C are s hown in Figures 3 -2 and 3 3, re spec tivel y. In Figures 3-2 and 3-3, the in-air output is normalized to that of 10 x 10 MLC field at the source plane. Circular fields are converted to equivalent square fields using the equivalent

PAGE 39

30 1.01 Varian 21 OOC, 8 MV open, 40 x 40 fixed jaw settings "C C1) I.: 0 T1.00 >< 0 T0 .., "C C1) N 0.99 C'G E ... Square 0 C Circle .., :, C. 0.98 .., :, 0 ... C'G I C 0.97 -1-------4------+-------+-----~ 0 5 10 15 20 Side of Equivalent Square Field at Source Plane (cm) Fig ur e 3 2. In-air out p ut factor as a function of a circular fie l d at the source p l ane for the 8 MV photon beam of a Varian 21 OOC. Fields were ma d e by an MLC system. During the measurements, secondary collimators were fixed at 40 x 40 cm 2 Data are plotted according to the side of t he equivalent square obtained by cr = 0. 9 R. Data for square fie l ds are also plotted for comparison.

PAGE 40

31 1.01 -r------------------------, Varian 21 OOC 18 MV open fixed 40 x 40 jaw settings "C G> &;:: 0 1 00 "I""" >< 0 "I""" 0 .... "C G> N 0.99 C'G E ... 0 Square 1 C .... Circle ::, 0. .... 0.98 ::, 0 ... C'G I C 0.97 -+-------+--------+------+--------I 0 5 10 15 20 Side of Equ i valent Square Field at Source Plane (cm ) Figure 3-3 In-air output factor as a function of a circular field at the source plane for the 18 MV photon beam of a Varian 21 OOC. Data are plotted according to the side of the equivalent square obtained by cr = 0. 9 R

PAGE 41

32 field relation, cr = 0. 9 R. The difference of in air output factors between circular field and square field is within 0.2 % for both 8 MV and 18 MV beams. Measured in-air output accounts for not only head scatter but also the effect of backscatter into the monitor chamber and forward scatter to the detector from the MLC. However, since the field shapes of circular fields and square fields are very close, it is considered that the amounts of scatters (both backscatter to the monitor chamber and forward scatter to the detector) of both fields are almost the same. Therefore, the difference of in-air output factors between two fields ( circular and square fields) indicates the difference of head scatter factors. In a Varian 2100C, the radius of flattening filter is 3 6 cm at the source plane. That is, two fields (r = 2.2 and 3.3 cm) are smaller than the flattening filter and others are larger. Measurements show that the equivalent field relation, cr = 0. 9 R is also valid even when a field is larger than the flattening filter. Equivalent square of a rectangular field Values of the percentage differences between values for 1 +SP R 1 for rectangular and square fields are plotted in Figure 3-4 according to the elongation ratio. In Figure 3-4, the percentage difference was calculated as lOO[{l+SPRjeq. square)}-{l+SP.Rjrectangle)}] / {l+SPRjrectangle)}. (3.14) The coefficients a and bin Eq. (3.4) are obtained from Ahnesjo's work (Ahnesjo 1994). From Figure 3-4, it can be noted that the amount of difference is dependent on the beam energy and the material and size of flattening filter. The most dominant factor is the material of the flattening filter. Whereas an aluminum flattening filter shows a larger difference (maximum -2.9 % with an elongation ratio of 10), a tungsten filter shows a smaller difference (maximum -1.4 % with an elongation ratio of 10). We can also see that

PAGE 42

-;fl. 33 0.50 -" .------------------------, X X 0.00 +-' -0.50 X 6 6 6 -1.00 Q) (.) C f c -1.50 -2.00 -2.50 X Al Filter 24MV Rmax:=4 (a=0.0025, b=0.01) Al Fi lte r 4MV Rmax=4 (a= 0.0005, b=0.002) 6 W Filter, 24MV Rma x=4 (a =0 0012 b=0.0048 ) x W Filter, 4MV, Rma x=4 (a=0.0004, b=0 0016) x Al Filter 24MV Rmax:=5 (a=0.00225, b=0.0124) W Filter 24MV, Rmax=5 (a =0.00102, b=0.0056) -3.00 _.__ _____________________ __, 0.0 2.0 4.0 6.0 8.0 10.0 Elongation Ratio Figure 3-4. Difference(%) of 1 + SPR 1 between a rectangular field and the equivalent square field according to the elongation ratio The equivalent field is determined by the area-to-perimeter relation. The difference(%) is given by 100[ { 1 + SPRJeq square)}{ 1 +SP Rf rectangle)}] / { 1 + SP Rf rectangle)}. Data for deterrnination of dSP R 1 dA are obtained from Ahnesjo's work (Ahnesjo 1994). The elongation ratio is given by [length of long side] / [length of short side] of the rectangular field.

PAGE 43

34 a smaller flattening filter (R,,,ax = 4 cm) gives less difference ( 1.27 % for an aluminum filter with an elongation ratio of 7 and -0.63 o/o for a tungsten filter with an elongation ratio of 7) than does a larger filter (for R,n ax= 5 cm, -2.38 % for an aluminum filter with an elongation ratio of 7 and -1.10 % for a tungsten filter with an elongation ratio of 7 ) at the same elongation ratio. In principle the amount of difference is dependent on the coefficient, a The stiffer slope causes the larger difference. Lower Z material, higher energy beam and larger radius of flattening filter require a thicker flattening filter which causes stiffer slope of scatter function. Since Rmax is the physical radius of a flattening filter at 15 cm downstream from the source, the maximum radial field size at 100 cm SSD becomes 6.67 Rm ax That i s, for R ,nax = 4 cm the radius of the field at 100 cm is 26. 7 cm (diameter d = 53.3 cm). Considering the fact that most linear accelerators allow a maximum 40 x 40 cm 2 field size and also that a high Z material is preferred as a flattening filter, it appears Figure 3-4 supports the fact demonstrated by Lam et al. (1996) that the formula for the area-to-perimeter ratio can also be used as the equivalent field for1nula for head sca tter at the source plane. Equivalent Field for Wedge and Tertiary Collimator Scatter Factor Measured scatter contributions from the tertiary collimator (Cerrobend block and Varian MLC) of an 8 MV photon beam of Varian 2100C are shown in Figure 3-5. Figure 3-5 shows that the behavior of tertiary collimator scatter is very close to a linearly increasing function according to the irradiated area. Therefore, it is considered that Eq. (3.13) is a reasonable assumption. A similar result is obtained for a wedge (Figure 3-6 ).

PAGE 44

35 1 --.---------------~ 0.9 Varian 21 OOC, 8 MV cu ... ..., 0.8 .c ... cu 0 C 0.7 Cl) :, 0.6 u.. ... Block Cl) = 0.5 MLC cu )( 0 (/) ... 0.4 0 ..., cu E 0 3 0 0 0.2 cu 0.1 Cl) t0 0 100 200 300 4 0 0 Field Area (cm x cm) Figure 3-5. Tertiary collimator scatter contribution as a function of field area of solid tertiary collimator material for the 8 MV photon beam of a Varian 21 OOC. Data are plotted according to the irradiated area projected to the detector plane.

PAGE 45

36 1.00 --------------------:: 0.90 0.80 i :C 0.70 ... C'G Cl) (.) C: Cl) u. ... 0.60 0.50 lj 0.40 -C'G (.) "' C1> 0.30 C) "C 0.20 0.10 0 00 0 Varian 21 OOC 8 MV 45-Wedge I -45-Wedge ] 100 200 300 400 Field Area (cm x cm) Figure 3-6. Wedge scatter contribution as a function of field area of 45 wedge for the 8 MV photon beam of a Varian 21 OOC. Data are plotted according to the irradiated area projected to the detector plane.

PAGE 46

37 The measured in-air outp u ts for a pair of asymmetric wedged fields are summarized in Table 3 1, where we can see that the difference is less than 1 %. The contribution of unattenuated photon to in-air output is same for both fie l ds because the detector is located at the isocenter. The only difference comes from the wedge scatter contribution. Considering that most practical fields are closer to symmetric than those studied, we can expect that the differences will become smaller in most clinical cases. Therefore, we can use Eq. (3 13) without compromising accuracy Discussion In the derivation of equivalent field relationship, SP Rh is replaced with SPR 1 and it is assumed SP R 1 is a linear function. There are two concerns with this approach. The one is that SP Rh can be described better as either a Gaussian (Dunscombe & Nieminen 1992) or polynomial (Yu & Sloboda 1993) function. The other is that SPR 1 is restricted within the physical dimensions of the flattening filter. However, the approach is very reasonable for circular fields. For a circular field with radius of R, the equivalent square field exists within the range of 0. 71 R < cr < R The circle which cru1 inscribe the square cr = R is r = 1 41R. Thus, the range we are interested in for the integration of SPR function to obtain the equivalent square is only 0 7 1 R < r < 1 41 R. Physically we are not interested in how SPR varies both inside 0. 71R and outside 1 41R. If SPR is close to a linear function between r = 0. 71 R and r = 1 41 R, our assumption can be applied and this is the most cases even outside the flattening filter. For rectangular fields, these concerns still remain,

PAGE 47

38 Table 3-1. Comparison of in-air output factors between pairs of asymmetric wedged fields for the 8 MV photon beam of a Varian 21 OOC. The contribution of unattenuated photon to in-air output is same for both fields. However wedge scatter contribution is different. Data are normalized to the in-air output of the field of thin part. Wedge Angle 15 30 45 60 In air Output Factor (normalized to field of thin part) Xl = 10, X2 = 2.5, Thin Part Y = 5 Y = 20 1.000 1.000 1.000 1.000 1.000 1 000 Xl = 7.5 X2 = 2.5, Thin Part 1 000 1 000 Xl = 2.5, X2 = 10, Thick Part Y = 5 Y = 20 1.002 1.002 1 002 1.005 1.007 1.007 XI = 2.5, X2 = 7.5, Thick Part 1.001 1.004 especially for highly elongated fields. Therefore, Eq. (3.12) and the analysis results Figure 3-4 are re s tricted within the physical dimensions of the flattening filter ( e.g., D = 3 55 cm at the source plane for Varian 2100C). In an irregular field, scatter contribution from a tertiary collimator depends not only on the irradiated area perpendicular to the axis, but also on the irradiated area of side wall on the field edge. However, the scatter contribution from side wall is not included in the derivation of Eq (3 .14 ). This effect should be independently treated because it is dependent of contour shape.

PAGE 48

39 Conclusion Equ i valent field relationships for the head scatter factor at the source plane were analyzed. A relationship of CJ I R = 0.9 was obtained for a circular fie l d, where CJ is one half the side length of the equivalent square and R is the radius of the circular field. The fact that the formula for the area-to-perimeter ratio of the equivalent square of a rectangular field for phantom scatter is also valid for head scatter at the source plane in most clinical linear accelerators was analytically investigated. The equivalent field relationships for wedge and tertiary collimator scatter were also studied. The relationships of CJ = 0.886R (or 0.9 for convenience) for a circular field and CJ = .J LW I 2 for a rectangular field were obtained. These relationships can be used in the calcu la tion of in air output factors for irregular fields in clinical applications

PAGE 49

CHAPTER4 AN EQUIVALENT SQUARE FIELD FORMULA FOR DETERMINING HEAD SCATTER FACTORS OF RECTANGULAR FIELDS Introduction The head scatter factor (or collimator scatter factor) accounts for the change in scattered radiation with collimator setting that reaches the point of measurement on the central axis in high energy x -r ay beams. Conventionally the head s catter factor is expressed as (4.1) where D(X D Y n) is the dose in air on the central axis at the reference plane ( which we call the detector plane hereafter) which is usually the isocenter andX 0 Y 0 are the field sizes determined by the lower and upper collimator jaw s, re s pe c tively at the detector plane The collimator setting for the reference field size is 10 cm for both x and y sets of jaws For a wedged field the change in scattered radiation with col lim ator setting depends not only on the head scatter but also on the wedge scatter. Thus we will use a different terrninology, 'wedge-head s catter factor for wedged field. Head ( or wedge-head ) sc atter factor Hi s often measured a s a function of s quare field size at the isocenter. To account for Hof a rectangular field usually the well established equivalent square relations are used, either in the form of table (Day & Aird 1983) or the area-to-perimeter ratio formula (Sterling et al. 1964). These forrnulae give an 40

PAGE 50

41 estimate of the effect of field elon g ation only. An inherent assumption is that the head (or wedge-head) scatter factor s for two different rectangular fields L x W (i.e. X D= L Y D= W) and W x L (i.e. XD= W Y D= L) are the same. In reality H (XD, Y o) i s different from H(YD,XnJ by 2 3 o/ o for open field s ( Moyer 1978 Ka s e & Sven ss on 1986 Tatcher & Bjarngard 1993) and 3 ....., 4% for wedged field s (Tatcher & Bjarngard 1993) between two different rectangular fields L x Wand W x L This collimator exchange effect has been discussed extensively in the literature ( Vadash & Bjarn g ard 1993 Moyer 1978 Ka s e & Svensson 1986 Tatcher & Bjarngard 1993 Lan1 e t al. 1996 ). Vada s h and Bjarn g ard (1993) obtained an empirical formula to account for thi s exchange effect for a Philip s machine Yu et al. ( 1995) obtained the same empirical formula for a Varian machine Lam et al. (1996) suggested parametrization with the equivalent square at the flattening filter to account for thi s effect. Ahnesjo (1994 ) modeled the energy fluence of s catter e d photons from the flattening filter b y approximating the fluenc e to be proportional to t he solid angle of the filter seen from the isocenter All of the s e recent publication s provide methods to calculate change in head s catter a s a function of the field size ; these methods explicitly account for the upper and lower collimator s ettin g s Another simple equivalent s quare formula that accounts for the collimator exchange effect wa s pro v ided. The formula wa s derived by a m e thod that will hence fo rth be called the field mapping method. In the field mapping method a field that is defined in the source plane by back-projection from the point of measurement (i e. the detector 's eye view) is mapped back i11to the detector plane by an equivalent field relation s hip. Therefore thi s method retain s parametrization at the detector plane ( mea s urement point ).

PAGE 51

42 No new data are required to implement the method clinically. The field s ize dependence of head ( or wedge-head) scatter that is measured for a range of square field sizes is sufficient to implement this method. Theory The head scatter factor primarily depends on scattered radiation called extrafocal radiation (Jaffray et al. 1993) above the field-defining collimators ( e g the flattening filter). Therefore, head scatter accounts for not only the primary but also the scattered radiation. The magnitude of the scattered radiation from extrafocal sources is accurately deter1r1ined by the projected area in the source plane from the detector 's eye view rather than the conventional field area at the detector plane (Lam et al. 1996, Ahnesjo 1994). Because of the different positions of the lower and upper collimator jaws projected field sizes at the source plane as deter1nined by the detector's eye view are different for L x W and W x L rectangular fields. The projected field in the source plane as defmed by the detector's eye view is illustrated in Figtire 4-1, where XD, YD are the field sizes determined by the lower (or X) and upper (or Y) collimator jaws respectively at the detector plane ; Xs, Ys are the field sizes determined by tl1e X and Y collimator jaws at the source plane through the detector's eye view; 1 1 l 1 y are the distances from the source plane to the top of the X and Y collimators respectively; and l 2 XJ l 2 y are the distances from the detector plane to the top of the X and Y collimators. Based on simple divergent

PAGE 52

43 Y 8 /2 Source Plane ----------------------------~ -----' t ' ' : Filter .. ' ' ' ' ' . ' ' ' ' . ' Y Collimator ----------. : ._ __ . ... ' . ' . ' ' ' ' . ' ' . ' ' . . . ' . . ' ' . . ' . .. t X Collimator ----------y --------------------------------D E Detector Plane etector s ye 1 l+--Y 0 /2 ~M4--X 0 /2 Figure 4-1. Schematic diagram showing the geometric relationship between the detector and the collimator jaws Also shown are field s izes projected in the s ource plane and detector plane.

PAGE 53

44 geometry, we can define the field conversion factors from detector to source plane, k x for X and k y for Y side as (4.2) (4.3) Note that for most medical linear accelerators, k x and ky are less than one The field size at the source plane, X s and Ys becomes (4 4) (4.5) Using the area-to-perimeter ratio formula of the equivalent square at the source plane (Lam et al. 1996), we can obtain the equivalent square at the source plane, Ss eq : (4.6) Since most dosimetric data are obtained for square fields at the detector plane, it is necessary to find an equivalent square at the detector plane, S De q that gives the same head scatter factor as Ss eq If we convert the square field SD e q to the source plane, it becomes a eq eq eq 1 rectangular field, kx8D x kySD If we let S s be the equivalent square at the source plane for this field, then (4.7) I Since Ss e q should match Ss eq, we obtain (4.8) From Eq. ( 4.8) and Eq. ( 4.6), we obtain a modified equivalent square formula, (4.9) where k is a geometrical weighting factor defined as:

PAGE 54

45 ( 4.10) Equation ( 4.9) provides an equivalent square, which is based on a rectangular field, XD x YD projected in the detector plane and the geometric weighting factor, which is accelerator-dependent. Methods and Materials Head ( or wedge-head) scatter factors of rectangular fields were measured with a cylindrical acrylic miniphantom as described by van Gasteren et al. (1991 ). The cylindrical phantom is 3 8 cm in diameter and 15 cm long. Measurements were taken on a Varian 21 OOC with an 8 MV photon beam and a Philips SL25 with a 20 MV photon beam for both open and wedged fields. A shonka plastic 0.1 cc ionization chamber was inserted in the miniphantom with its center located at 5 cm for 8 MV or 10 cm for 20 MV from the front surface and 100 cm from the source. Two independent sets of data were taken. The first set of measurements was taken with the X (lower) collimator jaws fixed while the Y (upper) jaws were varied. In the second set of measurements the Y collimators were fixed and the X collimators were varied. Collimators were varied from 30 x 4 to 30 x 30 cm 2 for the open fields. For wedged fields, collimators were varied from 20 x 4 to 20 x 20 cm 2 with a 45 wedge (external wedge) for an 8 MV (Varian 2100C) and from 30 x 4 to 30 x 30 cm 2 with a 60 wedge (internal wedge) for a 20 MV (Philips SL25) photon beam. The wedge gradient was always orthogonal to the long axis of the chamber. The data also were measured for a range of square field sizes projected at

PAGE 55

46 the isocenter. Special attention was paid to the position of the chamber on the central axis for measurements with a wedge Reversing the wedge did not change the measured readings by more than 0.4%. Resttlts The measured head scatter factors of an 8 MV photon beam of Varian 21 OOC normalized to a 10 x 10 cm 2 field size are shown in Figure 4-2. Figure 4-3 shows the measured wedge-head scatter factors of 45 wedged fields for 8 MV photon beam of Varian 2100C. The rectangular fields are plotted according to the side of the equivalent square field obtained by Sterling 's area -to-perim eter relationship (Sterling et al. 1964 ). The same data are plotted in Figure s 4-4 and 4-5 for open and wedged fields but according to the side of the square field obtained by the modified equivalent square fortnalism presented in Equation ( 4.9) with the calculated geometric weighting factor, k = 1. 5, for a Varian 21 OOC. The collimator exchange effects are obvious in Figures 4-1 and 4-2. The magnitude of the difference in output caused by this effect range s from 0.2% to 2.5% for both open and wedged fields The maximum difference is for the most elongated fields. The modified equivalent square formalism provides output with a difference of less than 1 % for open fields and less than 0.5% for wedged fields. Similar results were obtained with the 20 MV photon beam. Head and wedge head scatter factor s are shown in Figure 4-6 and Figure 4-7, re s pectivel y, according to the side of the equivalent square field obtained by Sterling 's area-to -p erimeter relationship

PAGE 56

47 1.04 -,---------------------~ 1 03 Varian 21 OOC, 8 MV, open k=1 1 02 A .. 0 1.01 ..., (.) cu LL .. 1.00 cu 0.99 (.) en "C 0.98 Square cu Cl) J: Fix-X(30) 0.97 0.96 A Fix-Y(30) 0.95 +--------lr---+-----+---t-----+ ----1 0 5 10 15 20 25 30 Side of Eq. Square (cm) F i g ur e 4 2 Head scatter factor as a func t ion of a rectangular open fie l d for the 8 MV p h oton beam of a Varian 21 OOC During t h ese measure m e n ts one set of co lli mator jaws was fixed an d t he othe r set of co l limato r jaws was changed symmetr i ca ll y. The field size varied from 30 x 4 to 30 x 30 cm 2. Data are p l otted according to the side of the equivalent square obtai n e d by the conventional area-to per i meter relation.

PAGE 57

48 1.08 ----------------, 1.06 Varian 2100C 8 MV 45-wedge k=1 L. 1.04 0 ..., (,) 1.02 c,s LL L. (1) = 1.00 c,s (,) Cl) 0.98 "tS Square c,s (1) J: 0.96 Fix-X(20) 0.94 6 Fix-Y(20) 0.92 +--+----+-----1-----1 0 5 10 15 20 Side of Eq. Square Field (cm) Figure 4 3. Wedge-head scatter factor as a function of a rectangular 45 wedged field for the 8 MV photon beam of a Varian 21 OOC

PAGE 58

... 0 .., (.) C'G u. ... C'G (.) en ,, C'G Q) J: 49 1.04 -,-----------------------~ 1.03 1 02 1 01 1 00 0.99 0.98 0 97 0 96 Varian 21 OOC 8 MV open k=1 5 A Square Fix X(30) A Fix-Y(30 ) 0.95 -'-------,-----+-----+-----------r-------i 0 5 10 15 20 25 30 Side of Eq Square Field (cm) Figure 4 4. Head scatter factor as a function of a rectangular open field for the 8 MV photon beam of a Varian 2100C. Data are plotted according to the side of the equivalent square obtained by Eq. ( 4.9 ) with k = 1.5

PAGE 59

50 1.08 -.-----------------------1.06 Varian 2100C, 8 MV, 45-wedge, k=1.5 1.04 ... 0 .., (,) 1.02 cu LL ... Cl) = 1.00 cu (,) u, "C 0.98 cu Cl) :c 0.96 Square Fix-X(20) 0.94 A Fix-Y(20) 0.92 -+-----.-----------.-----~------1 0 5 10 15 20 Side of Eq. Square Field {cm) Figure 4-5 Wedge-head scatter factor as a function of a rectangular 45 wedged field for the 8 MV photon beam of a Varian 21 OOC Data are plotted according to the side of the equivalent square obtained by Eq. ( 4.9) with k = 1 .5

PAGE 60

51 1 04 1.03 Philips SL25 20 MV open k=1 1.02 A ... 1.01 0 .. 1.00 (.) cu LL Square ... 0.99 Cl) = Fix-X(30) cu 0 98 (.) en Fix-Y(30) "C 0.97 A cu Cl) ::x: 0.96 0.95 0 94 -0.93 -+-------i-------------~---......_----.----------" 0 5 10 15 20 25 30 Side of Eq Square Field (cm) Figure 4 6. Head scatter factor as a function of a rectangular open field for the 20 MV photon beam of a Philips SL25.

PAGE 61

52 1.11 -.--------------------------, 0 1.09 1.07 1.05 u 1.03 C'G LL 1.01 = 0.99 u, "g 0.97 Cl) ::c 0.95 0.93 0.91 Philips SL25, 20 MV, 60-wedge, k=1 Square Fix-X(30) 6 Fix-Y(30) 0.89 !------+------:-----+------+-----+---~ 0 5 10 15 20 25 30 Side of Eq. Square Field (cm) Figure 47. Wedge-head scatter factor as a function of a rectangular 60 wedged field for the 20 MV photon beam of a Philip s SL25.

PAGE 62

53 (Sterling et al. 1964) In Figures 4-8 and 4-9 the same data are plotted according to the side of the square field obtained by the modified equivalent square formalism. The geometric weighting factor k = 1.85 is obtained for the Philips SL25. The magnitude of the difference in output caused b y the collimator exchange effect ranges from 0.3% to 3o/o for open and 0 4% to 5o/o for wedged field s The modified equivalent s quare formali s m provides output with a difference of less than about 1 % for both open and wedged fields. Discussion The top edge of the collimator was considered to be the field-determining edge for calculation of the geometric weighting factor k. Although the distance from the source plane to the top of the collimator l 1 x or l 1 y, changes according to the field size becau s e of the circular movement, the amount of variation is negligible. Therefore one value of l ,x or l 1 y can be used Interestingly our formu l a has the s ame format a s the formula that was empirically obtain e d by Vadash and Bjarngard ( 1993 ). In this s tudy k = I .5 for the Varian 2100C and k = 1 85 for the Philips SL25 were obtained. Vadash and Bjarngard (1993) empirically obtained k = 1 .92 for open fields and k = 1 84 for wedged fields for the Philips SL25 25MV photon beam and Yu et al. (1995) obtained k = 1.7 for the Varian 2300CD 6 MV photon beam Equation ( 4 .9) shows that the equivalent field size varies slightly according to k. For example, the equivalent s quare field s ize for a 5 x 20 cm 2 (or 20 x 5 cm 2 ) field i s 9 1 x 9 1 cm 2 (o r 7 1 x 7.1 cm 2 ) with k = 1.5 and 9.5 x 9.5

PAGE 63

54 1.04 -...-------------------------, 1.03 Philips SL25, 20 MV, open, k=1.85 1.02 1.01 ... 6. 0 ..., 1.00 (.) t'G LL ... 0.99 6 t'G 0.98 (.) en ,, 0.97 t'G Square Cl) J: 0.96 Fix-X(30) 0.95 6 Fix-Y(30) 0.94 0.93 -+-----+----+-----+----+-------+----~ 0 5 10 15 20 25 30 Side of Eq. Square Field (cm) Figure 4-8. Head scatter factor a s a function of a rectangular open field for the 20 MV photon beam of a Philip s SL25 Data are plotted accordin g to the s ide of the equivalent square obtained by Eq ( 4.9) with k = 1 85

PAGE 64

55 1.11 -r---------------------, 1.09 Philips SL25 20 MV, GO-wedge k=1.85 6. 1.07 6 1.05 ... 0 .. 1 03 0 ns LL ... 1.01 Cl) = ns 0.99 0 "' "t'S 0.97 ns Square Cl) ::c 0.95 Fix-X(30) 0.93 Fix-Y(30) 6 0.91 0.89 -+------+-----+----+------+-----:--------i 0 5 10 15 20 25 30 Side of Eq. Square Field (cm) Figure 4-9. Wedge-head scatter factor as a function of a rectangular 60 wedged field for the 20 MV photon beam of a Philip s SL25. Data are plotted according to the s ide of the equivalent square obtained by Eq. (4.9) with k = 1.85

PAGE 65

56 cm 2 ( or 6. 9 x 6. 9 cm 2 ) with k = 1. 7. And the difference of head scatter factors between 9.1 x 9.1 and 9.5 x 9 5 cm 2 (or 7.1 x 7.1 and 6.9 x 6.9 cm 2 ) fields is about 0.2%. The wedge-head scatter factor of a wedged field depends on both the scatter from scatterers in the head like the flattening filter and scatter from the wedge itself. The scattered radiation from a wedge depends on the area of the wedge that intercepts the radiation coming downstream through the treatment head. If the wedge is located above the collimator jaws like that in a Philips machine, the detector's eye view field at the source plane can be used for both head scatter and wedge scatter However, when the wedge is located underneath the secondary collimator like that in a Varian machine equipped with an MLC, the field size for the wedge scatter contribution is different from the field size for the head scatter contribution. Whereas the head scatter contribution is determined by the field seen by the detector s eye view, the wedge scatter contribution depends on the field size projected at the detector plane. Therefore in this case, the formula shown as Eq. (4.9) may slightly overcompensate for the collimator exchange effect. Our results for wedge-head scatter in Figure 4-5 show that Eq. ( 4.9) gives an accurate calculation of output even for a V aria11-type wedged field. Conclusion The equivalent square field formula (Eq. (4.9]) with the geometric weighting factor (Eq. [4.1 OJ) provides an accurate estimate of output even when there is a significant collimator exchange effect in a linear accelerator. Since only the geometric

PAGE 66

57 weighting factor is considered, this formula is very s imple and is applicable to any accelerator as long as the geometric data are known. Also this formula can be used directly with conventional dosimetric data, which are always measured fo r a set of square fields at isocenter. It is not nece ssary to measure data for a se rie s of rectangular fields ( except for verification) for parametrization, as has b ee n discussed extensively in the Ii terature.

PAGE 67

CHAPTERS A GENERALIZED SOLUTION FOR THE CALCULATION OF IN-AIR OUTPUT FACTORS IN IRREGULAR FIELDS Introduction Most treatment fields used in radiation therapy are irregular in shape while the dosimetry data is measured with square or rectangular fie l ds. Convent i onally, the in phantom dosimetric parameters such as the tissue-air ratio (TAR) or tissue-maximum ratio (TMR), are calculated based on the actual field shape created by a custom Cerrobend block but the in-air output factor calculation is based on the rectangular field shaped by collimator jaw(secondary collimator), and is considered independent of any tertiary blocking (Kahn 1994). This conventional method for the calculation of in-air output of irregular field is valid when the size of irregular field is close to the size of collimator jaw opening. However if the irregular field is much smaller than the collimator jaw opening or i s extremely irregular so that part of block is close to central axis, the measured in-air output can be significantly different from the one obtained with conventional methods. Many authors have studied the physical origin of in-air output factors (Patterson & Shragge 1981, Kase & Svensson 1986 Mohan et al. 1985 Huang et al 1987 Luxton & Astrahan 1988 Chaney & Cullip 1994 Zhu & Bj a rngard 1995) It is primarily due to the amount of scattered radiation that is produced within the accelerator head structure and the fraction that can reach the point of measurement as the position of 58

PAGE 68

59 the collimators is varied. There are several components in the head which produce scatter radiation. The flattening filter i s considered to be the mo s t dominant source of scattered radiation from the head (Kase & Svensson 1986 Mohan et al. 1985, Luxton & Astrahan 1988, Chaney & Cullip 1994). When a tertiary collimator, such as a conventional Cerrobend block or MLC installed below the field-defining secondary collimators is used for field shaping scatter radiation from the tertiary collimator may not be negligible especially for small tertiary collimator opening s with a large secondary collimator setting The scatter radiation from beam modifiers such as physical wedges or compensators can also be significant. There are several models which have appeared in the literature that accurately describe the scatter photon energy fluence distribution emanating from the head (Ahnesj o et al 1992 Ahnesj o 1994 Dunscombe & Nieminen 1992 Yu & Sloboda 1993, Jaffray et al. 1993). However these model-based approaches, which are based on unifor1n (Ahnesj o et al. 1992) triangular (Ahnesj o 1994), Gaussian (Dunscombe & Nieminen 1992), combination of several functions (Yu & Slaboda 1993), and experimentally determined distrib1.1tion functions (Jaffray et al. 1993) require sophisticated programming and/or complex measwements Moreover most of these studies have mainly concentrated on the modeling of scatter radiation from the flattening filter. Recently, a method of parametrization with the equivalent square at the flattening filter was studied (Lam et al. 1996) and a similar approach, in which the parametrization was kept at the detector plane was studied in the previous chapter (see Chapter 4) These studies have been limited to rectangular fields only.

PAGE 69

60 In this chapter, an in-air output calculation formalism was set up and a simple algorithm for calculation of in-air output factor of irregular shaped fields was developed for both open and wedged fields by expanding the application of field mapping method that is based on detector's eye view field which has been successfully applied to rectangular fields (see Chapter 4). In the algorithm, three major scatter contributors--flattening filter, wedge, and tertiary collimator--are considered. For the calculation of flattening filter scatter, first, the collimator jaw field and tertiary collimator shaped field are projected into the source plane through the detector's eye view to get a combinational field shape. Clarkson integration (Clarkson 1941) is carried out on the combined field using measured data at the detector plane in conjunction with field mapping method, instead of describing a discrete scatter source function that has been described in the literature. In the field mapping method, a field at the source plane is segmented and each segment field is mapped into a corresponding field at the detector plane by using equivalent field relationships obtained in Chapter 3. The algorithm is also valid for the treatment machines in which MLC replaces the upper or lower collimator jaw instead of being a tertiary collimator system. In that case only one projected field is used since there is no additional field. For a machine in which the MLC replaces the upper collimator jaws, Palta et al. (1996) have suggested an equivalent field method at the detector plane. Although equivalent field method at the detector plane provides a simple methodology, it does not explicitly account for both the collimator jaw exchange effects and non-linearity of in air output dependence on field size.

PAGE 70

61 The change of scatter radiation from tertiary collimator was also measured and parametrized. In the calculation of total head scatter factor, the tertiary collimator scatter factor is added to the collimator scatter factor. In the case of wedged fields, the in-air output is dependent not only on scatter from flattening filter but a l so scatter from the wedge itself. Therefore, the relative position of the collimators (both secondary collimator and tertiary co llim ator) and wedge will determine the method of calculation of in-air output. When wedge is below the tertiary collimator (e g., external wedge), the field size for wedge scatter contribution is different from the field size for bead scatter contribution. The conventional collimator sca tter factor for wedged field is separated into two components: one for the change of scatter radiation from flattening filter and the other for the change of scatter radiation from the wedge. Each component is independently calculated using a field mapping method with corresponding detector's eye view field sizes. Formalism of In-air Qutput Factor Head Scatter Factor and Monitor Back Scatter Factor The total energy fluence in air on central axis produced by an external photon beam can be divided into two components: one is due to unscattered primary photons from the target and the other is due to scattered photons, which are generated in scattering materials in the head (for example primary collimator, flattening filter, and field defining collimators ).

PAGE 71

'f' = \f'p + 'f' s 'I' ., =\J' 1+ . p \J' p 62 (5.1) where, \f'p is the energy fluence due to primary photons, 'f' s is the energy fluence due to scatter photons from the scattering materials in the head. Considering the effect of backscatter radiation to the monitor chamber (Lam et al. 1996 Ahnesj 6 et al. 1992, Patterson & Shragge 1981 Luxton & Astrahan 1988 Moyer 1978, Higgins et al. 1989 Kubo & Lo 1989 Kubo 1989 Duzenli et al. 1993) primary energy fluence can be expressed as 'f' p (X e ,~)= 'f' p ( 00, 00 )J,nb (Xe,~) (5.2) where, (X e ) is secondary collimator setting, 'f' P ( oo, oo) is unperturbed energy fluence, and f, 11 b is the function which accounts for the monitor backscatter effect on the energy fluence By both multiplying and dividing Eq. (5 .2) with monitor backscatter effect function f, 11 h ( X r Y,. ) for a reference collimator setting, ( Xr Y,. ) we can get 'f' p ( X c Ye ) = 'f' p ( 00, 00) J,,,h (X e Y e ) f,ub ( X r Y,. ) f,,,b (Xr 'Y,.) = 'f' (oo oo) + (X Y ) J,,,1, (X e Y e ) p J n1h r r + (X y ) J 111h r' r (5.3a) where (Xr, Y,.) i s secondary collimator setting for the reference field and S, 11 1, i s monitor backscatter factor defined as s (X y ) = f,llh (X e r:,) '"" C C + (X y ) J 111b r r ( 5 .3 b )

PAGE 72

63 Now, consider head scatter contribution. For the energy fluence of any field, we can get, (5.4) By substituting Eq. (5.1) into Eq. (5.4), we have (5.5) Using Eq (5.3a), we can get, ~(X e, Y e)= ~(X,., Y,. )S,,,b (X e J'c )Shs (X e Y e ) (5.6a) with head scatter factor S1i .., defmed as (5.6b) From the conventional defmition of collimator scatter factor, S c we can get S (X Y)= ~(X c ,i'c) c c> c ~(X y) ,. ,. = S,,,b ( X c i'c )S h v ( X c r::) (5.7) Equations (5.6) and (5.7) show that we can separate collimator scatter factor S c, into two components, monitor back scatter factor, Stnb, and head scatte1 factor, Shs When a field is

PAGE 73

64 very small, source obscuring may occur. In that case, a source obscuring factor should be included in the Eq (5 7) (Zhu & Bj a mgard 1995 ). Presence of A Beam Modifier in The Field When photon beam passes a beam modifier (for example a wedge), the energy fluence changes due to both attenuation of incident photons and scatter photons produced in the beam modifier. If we denote the energy fluence below the beam modifier as then, we can express = u ( 5 8 ) where u is the unscattered energy fluence which is due to the primary head scattered photons and s is the energy fluence due to scatter photons by the beam modifier With attenuation factor of beam modifier A b ,n u is given by (5 9) where \J' is the total energy fluence incident on the beam modifier expressed in Eq. (5.1). For the energy fluence of any field with beam modifier, we can get, (X y) = (X y) (X r ~) C C C' C (X y ) r' r (5 10) By substituting Eq (5.8) into Eq. (5.10),

PAGE 74

65 ( 5 11 ) is obtained. Using Eq. (5.9) and (5.7 ) we can get ( 5 12a) with beam modifier scatter factor Sb, 11 s defined a s ( 5.12b ) In the derivation ofEq (5.12) we a s sumed the dependency of Ab,n on field s i ze i s negligible. When wedge is used a s a beam modifier, u s ing the s tandard convention o f collimator scatter factor of wedged field S e ltl we can get = s ,11b (X e y e )S h r (X e y e ) S lV S ( X e }'c) ( 5 13) where S h ,u s is replaced with wedge s catter factor S ,vs in order to indicate wedge is the beam modifier Equation s ( 5 .12 ) and ( 5 .1 3) s how we c an separate wedge scatter factor S lvs, from conventional collimator scatter factor of wedge field S c, ,v

PAGE 75

66 A Shaped Field with A Tertiary Collimator Tertiary collimator, such as conventional Cerro bend block and Varian type MLC, can change the in-air output factors. There are two components. One is the change of head scatter factor, S 11 s due to the change of detector's eye view of head scatter area. The other is scatter photons produced in the tertiary collimator itself which in some cases may not be negligible. If we let the energy fluence below the tertiary collimator as


PAGE 76

67


PAGE 77

68 determined by detector s eye view in s tead of the collimator field size. The field defined by detector s eye view is illustrated in Figure 5-1 In Figure 5-1, l 1 X) l 1 y and l 1 r are the distance s from the s ource plane to the top of X, Y collimator jaws and tertiary collimator respectively The distance s from the detector plane to the top of X, Y collimator s, and tertiary collimator are noted as l 2 XJ l 2 y, and l 2 r Now letX D, Y 0 and T n be the field s i z e s determined by the lower (or X) upper (or Y) collimator jaws and the tertiary collimator respectively at the detector plane andX s, Y s and T s be the field sizes determined by the X, Y collimator jaw and tertiary collimator at the s ource plane through the detector 's eye view. Then the field conver s ion factor s from detector-tos ource plane ky and k r are given by k x = l1 J l 2x' ky = l1 / l 2y' k r = l1 rf l 2r Then field s ize s at the source plane X s, Y s and T s b e come Xs = k){ n, Y s = kyY n' T s= krT n. ( 5.19) ( 5 .2 0) ( 5 .2 1 ) ( 5 22) ( 5.23) (5 .2 4 ) After the field size conversion from the detector plane to s ource plane the projected collimator jaw and tertiary collimator s l1aped field s ar e combined in the s ource plane. That is the area common to both fields is used to determine head scatter factor Clarkson inte~ation and field mapping The head scatter factor is calculated by carrying out Clark s on integr a tion in the combined field in the s ource plane Typicall y,

PAGE 78

F ield e d ge i s determin e d b y U pp er Co llimat o r Jaw -' r 69 r F i e ld e d ge i s de t er m ine d b y Te rtia ry Co llim ato r So urc e ---. . 1 U p pe r (Y) Co l li m a tor Jaw Lowe r (X) Co l li m a t or Jaw Tert i ary Colli m ator (Block or MLC) r I I I I I I I I I , I I I I I ' I I I I .. I .....:......... \ / 1 ' \ ' ' ' ' ' ' . ' ' ' I .... I \ \ \ \ \ \ ' I \ \ I I I \ ' \ \ \ ' ~ -0 D etector P l a n e Detector's Eye ---Figure 5-1. Schematic diagram s howing the geomet1ical re l ationship among detector X and Y collimator jaw se tting s, tertiary col l imator se tting s, detector plane field size and source plane field s i ze.

PAGE 79

70 conventional dosimetric data is available only for square fields at detector plane. Therefore it is convenient to project source plane field to detector plane For any circular field of radius, rs at source plane, we can get equivalent square field at source plane, sseq from equivalent field relationship for head scatter, (5.25) It is necessary to find an equivalent square in the detector plane sDeq which is equivalent to sseq. If we project s Deq to source plane the square field changes to the rectangular field, kx:5D eq X 9D eq. Once again by using the equivalent field relationship, we can let S seq' = [2kj(/(kx + k)JsDeq. (5.26) Since S seq should match with s seq, we can get an equivalent square field at detector plane, s Deq (rs) for the circular field, r s at the source plane, S Deq (rs) = f(kx + k)l2k)
PAGE 80

71 1 = (1/360) L [S c(sneq (rsJ) I sm b(sneq (rsJ)] i1~ ;, (5.29a) i or, 1 S c( irregular) = smb(Xn,YJ (1/360) L [S c(sneq (rsJ) I sm b( sn eq( r sJ) j i1~ ;, (5 29b) where S c( s Deq (r sJ ) is the collimator scatter factor of the equivalent square field at detector plane which corresponds to circular field with radius rs; at source plane. Monitor backscatter factor can be measured by telescopic method (Kubo 1989) Ahnesjo et. al. (I 992) assumed that the amount of backscatter to the monitor chamber from the back surface of a collimator jaw is proportional to the irradiated surface area. With same assumption, Lam et al. (1996) modeled monitor back scatter factor as a function of collimator settings. When each segmented field is not much different from collimator settings, we can make an approximation 1 S c( irregular) = (1/360) L Sc(sneq(rsJ) i1~ ;, (5.30a) i by assuming, (5.30b) In most clinical situations, tl1is expression is a good approximation. Equation (5.29) can be directly used with the measure1nent of monitor backscatter factor if a more accurate monitor backscatter factor is required. This will probably be necessary in the case of beam intensity modulation, in where very small shaped fields with large secondary collimator setting may be used

PAGE 81

72 Scatter Factor of Tertiary Collimator Since the tertiary collimator transmits more radiation and is closer to the detector than collimator jaws, it is necessary to consider scatter contribution from tertiary collimator itself The amount of scatter contribution is dependent on irradiated area of tertiary collimator. We defme tertiary collimator scatter factor, S, cs( s), as the ratio of scatter dose from a solid block material withs x s collimator setting to the dose of reference 10 x 10 field in Eq. (5.18b). Tertiary collimator scatter factor of an irregular shaped field with X 0 x Y O collimator jaw setting can be obtained as I st cs( irregular) = stcs(XD,Y J (1/360) L [Sc(XD, Y JISc(SDeq (rDJ)] s,cs(sDeq (rDJ)D.$;, I (5.31) where sDeq(rDJ is the equivalent square field at detector plane which gives same tertiary collimator scatter contribution as a circular field with radius r D; at detector plane, and is obtained by sDeq(rDJ = 1 .8 rD ; When each segmented field is not much different from collimator settings, we can make an approximation, I s, cs( irregular) = s,cs(XD,YJ (1/360) L st cs( sD eq( rDJ)D.$;, I by assuming, Finally, in-air output factor for irregular open field OF, becomes OF(irregular) = S c(i rregular) + S 1 cs(irregular) (5.32a) (5.32b) (5.33) where Sc is obtained by Eq. (5.29b) or Eq. (5.30a) and S,cs is obtained by Eq. (5.31) or Eq. (5.32a). Note that the MLC on Varian linear accelerators, which is mounted below the X

PAGE 82

73 and Y jaws, is handled the same way as a block except S, cs that corresponds to the scatter from the leaves of the MLC system. Wedged Field Depending on the position of wedge, the method of in-air output factor calculation are different On a Varian accelerator with MLC, a wedge is inserted underneath the tertiary collimator (MLC). In this case the field size for wedge scatter contribution is different from the field size for head scatter contribution It can be clearly seen from Figure 5-2 that the head scatter contribution is determined by the detector's eye view of the field defined by collimator jaws and the wedge scatter contribution is dependent on irregular field shaped by the tertiary collimator in the detector plane. To account for this fact, the collimator s catter factor for wedged field i s separated into collimator scatter factor and wedge scatter factor as given in Eq. (5.13), (5.34) Therefore, (5.35) For an irregular field, each component is calculated by, 1 S c (irregular) = (1/360) I S c( sD eq (r 8 J)t1~;, (5.36a) i with and

PAGE 83

Source 74 Head Scatter i s determined by So urce Plane Field Size through Detector's Eye View J _;;,..-\ / I 4 I I ' ,' I I I I I 1 1 '-.:..... \\ i I ' ' I \ I I l Upper Collimator Jaw Lo wer Collimator Jaw Tertiary Collimator (Block or MLC) We dge mined / I rtiary ,' I Wedge Scatter is deter by Field shaped by Te I I I I I I Collimator I I I I I I I I I I I I I I I I ' ' I \ I \ \ \ \ I \ \ I \ I I I \ Detector Plane ----~ 0 ~ --Detector's Eye Figure 5-2. Schematic diagram showing the detector s eye view scatter area for head scatter and wedge s catter in Varian type ( external) wedged MLC field.

PAGE 84

75 1 Sw s (irregular) = ( J / 360) L Sv 1 s( s oeq (r 0 J}l1$ ;, I with Finally, in-air output factor for irregular wedged field is obtained by OF ,v (irr e gular ) = S c (irregular ) S 1 11 (i rr e gular ) (5.36b) (5.37) Note that the scatter contribution from the tertiary collimator is not considered since wedge is underneath the tertiary collimator. If the wedge is located above the collimator jaws, the field size for wedge scatter contribution is the same as that for head scatter contribution. That is the collimator scatter factor of a wedge field S c 111 i s given by I I S c, w (irregular) = ((1 / 360) L S c (s oeq (r s; ) c )l1$; ]((1 / 360) L s ,11s (s Deq (r s1 )w s )li$ ] i i and the in air output factor of a wedge field, OF 1 11 is obtained by OF} 11 (irregular) = S c i v (irregular) + S b. 11 (irregular) (5 38) where S b i v is the block scatter factor for a wedged beam. In Eq. (38), s 0 eq (r s ;) c is the equivalent square field at the detector plane for head s catter contribution and is the same as for Eq. (27). However, the equivalent square field at the detector plane for wedge scatter contribution, s 0 e q(rs ; )..,v s is not the same as sn eq (r s ;) c From the equivalent field relationship, ( 5.39 )

PAGE 85

76 If we project s 0 e q (an equivalent square at detector plane) to the source plane, the square field changes to a rectangular field ky:S 0 eq x kyS oe q_ Using the equivalent field relationship for wedge scatter, we can let Ss eq = (k)cy)l / 2 So e q (5.40) Because Eq. (5.39) and Eq (5.40) should match each other, we can get the equivalent square field at the detector plane s 0 e q(r 3 ) for any circular field with a radius of r s at the source plane: (5 41) Methods and Materials In-air output factors of tertiary collimator shaped fields were measured with a cylindrical acrylic mini-phantom as described by van Gasteren et al. (1991). The cylindrical phantom is 3. 8 cm in diameter and 15 cm long. A shonka plastic O 1 cc ionization chamber was inserted in the mini-phantom with its center located at 5 cm from the front surface and 100 cm from the source. Measurements were taken on a Varian 21 OOC with 8 MV photon for both open and wedge fields Since wedge can not be used with conventional block in Varian machine that is equipped with MLC, only MLC fields were considered with wedges. The measurements were taken with the fixed X and Y collimator jaw settings (22.5 x 22 5 cm 2 for Cerrobend block field 21.6 x 20 4 cm 2 for open MLC field, and 20 x 20 cm 2 for wedged MLC field) The tertiary collimated field sizes were varied for 4 x 4 to 20 x 20 cm 2 for both open and 45 wedge field (for

PAGE 86

77 systematic analysis of calculated data, only square shapes were devised with tertiary collimator instead of irregt1lar shape fields). Special care was taken to position the chamber on the central axis for measurements with wedge. Reversing the wedge direction did not change the measured readings by more than 0 4%. In the case of open field, scatter contribution from tertiary collimator (Cerro bend block and Varian MLC) was also measured with the same mini phantom as described above. A set of measurements were made underneath a solid piece made out of the same material as the tertiary collimator material (Cerrobend or MLC) with field sizes ranging from 4 x 4 to 20 x 20 cm 2 The thickness of Cerrobend block was 7 5 cm. The data were extrapolated to Ox O cm 2 field. The fluence of (0, 0) field multiplied by S c (X, Y)/S c (O 0) was subtracted from total fluence for each field size, (X, Y) The remaining fluence of each field is divided by the fluence of 10 x 10 cm 2 reference open field to get tertiary collimator (block or MLC) scatter factor Si c s Finally, in-air output factors of two irregular fields were also measured. One shape was made with Cerrobend material and the other was made with MLC. Figures 5-3 and 54 show beam's eye view of block and MLC shaped irregular fields projected at the detector plane, respectively. For all these experimental measurements, in-air output factors were calculated using the algorithm described in the previous section.

PAGE 87

78 15 10 5 ) 5 0 I I I I I >-5 + 10 15 -15 -10 5 0 5 10 1 5 X (cm) Figure 5-3. A beam 's eye view irregular field s haped by Cerrobend block at detector plane. Outer rectan g le indicate s colli1nator jaw s etting at detector plai1e Both 8 and 18 MV photon b e am s of Varian 2 1 O OC w er e u s ed

PAGE 88

79 12 8 ,_ 4 5 0 I I I I I I I -, >-4 ..... ...._ -8 --12 -12 -8 -4 0 4 8 12 X (cm) Figure 5-4. A beam 's eye view irregular field s haped by MLC at detector plane Outer rectangle indicates col limator jaw setting at detector plane. Both 8 and 18 MV photon beams of Varian 2 1 OOC were u se d.

PAGE 89

80 R esu lt s Tertiary Collimator Scatter Factor The measured tertiary collimator scatter factor, S, cs for Cerrobend block and Varian MLC are shown in Figtrre 5-5. As defined in Eq. (5. 18b ), S 1 cs(20,20) for blocked field is the ratio of energy fluence due to scattered photons from a 20 x 20 cm 2 solid Cerro bend block to energy fluence of a IO x IO cm 2 open field at the reference point. Therefore, for a 20 x 20 cm 2 completely blocked field, energy fluence due to scattered photons is 1.3 % of energy fluence of IO xl O cm 2 open field. As an example, The value of Sics for a Cerrobend block with outer dimen s ion of 20 x 20 cm 2 and inner dimension of 15 x 15 cm 2 from Figure 5-5 is 0.005 This i s the difference in S, cs(20,2 0) and S,cs(l5,15) values. The tertiary collimator scatter factors for Cerrobend block are almost twice as large as those for MLC. Two possible reasons for this may be that the block i s closer to the detector than MLC and that it has larger transmission than MLC. In-air Output Factor of Open Field s Defined by Tertiary Collimator In-air output factors for open fields were calculated using Eqs. (5 .30a) (5.32a), and (5.33). The calculated data for fields shaped with Cerrobend block and MLC are compared with measured data in Figure s 5-6 and 57 respectively. Note that the secondary collimator settings were fixed for these measurements. The settings were 22.5 2 2 x 22.5 cm for Cerrobend block and 21.6 x 20.4 cm for MLC s haped fields Two otl1er alternate methods of obtaining in-air output factors are also shown for comparison. One

PAGE 90

81 0.014 ,.,, Varian21 OOC 8 MV (J .... 0.012 en .. ... 0 .., (J 0.010 "' LL ... Cl) = 0.008 "' (J en ... 0 0.006 .... "' Block E MLC 0.004 0 (.) "' 0.002 t= Cl) I0.000 0 5 10 15 20 Side of Square Field (cm) Figure 5-5 Tertiary collimator scatter factor for 8 MV photon beam of Varian 2100C Where tertiary collimator scatter factor i s defmed as the ratio of s catter dose from solid tertiary collimator material(C e rrobend block or Varian type MLC ) to the do s e o f 2 reference 10 x 10 cm open field at d e t e ctor plane

PAGE 91

82 1.05 -.----------------------, 1.04 ... 1.03 C'G LL ..., :::s Q. 1.02 0 1.01 Varian2100C, SMV, Block field Measurement Sc+ Stcs ts Sc ...... Conventional 1.00 +------1-----+----, :---+-----1 0 5 10 15 20 25 Side of Square Field (cm) Figure 5-6. In-air output factor of open fields with Cerrobend block tertiary collimator for 8 MV photon beam of Varian 2100C While the collimator jaw setting i s fixed as 22 5 x 22 5 cm 2 block shaped field is changed from 4 x 4 to 21 x 21 cm 2 at detector plane.

PAGE 92

1.04 1.03 .. .S 1.02 (.) cu u. ::s C. '5 1.01 0 1.00 8 3 Varian21 OOC 8 MV MLC field ------. .... --Measurement Sc+ Stcs -A Sc . . Conventional 0.99 -t--------+ 1 ------1-----'----------1 0 5 10 15 20 Side of Square Field (cm) Figure 5 7 In-air output factor of open fie l d with MLC tertiary col l imator for 8 MV photon beam of Varian 2100C While the collimator jaw setting i s fixed a s 2 1 6 x 20.4 cm 2 MLC shaped field is changed from 4 x 4 to 20 x 20 cm 2 at det e ctor plane

PAGE 93

84 of the methods is labeled as conventional method in which it is assumed that the in-air output depends on only X and Y secondary collimator jaw settings and is independent of tertiary collimator The other method is labeled as S c n1ethod. This is simply a field mapping method through detector's eye view field and it does not include tertiary collimator scatter factor. It is obvious from Figures 5-6 and 57 that the conventional method of calculating in-air in-air output factor is grossly inadequate when the tertiary collimated field is much smaller than the secondary collimator opening. This is attributed to the screening of head scattered photon fluence by the tertiary collimator. Field mapping method through DEV field predicts the behavior of in-air output very well but it underestimates the in-air output if the tertiary collimator scatter factor is not included. Once the tertiary collimator scatter factor is included, the agreement between the calculated in-air output and measured in-air output for all field sizes is very good (within 0.5 %). However, for fields defined with MLC the agreement between the calculated in air output and measured in-air output is fairly good with field mapping method through DEV field even if tertiary collimator scatter factor is not included. This is primarily due to the small scatter contribution from MLC. In-air Output Factor of Varian Type Wedge (External Wedge) Fields Wedge scatter factor, S, 11 3 for 45 wedge was obtained by Eq. (5.35) and is shown in Figure 5-8. In the Figure 5-8 for field sizes 4 x 4 to 20 x 20 cm 2 The data were extrapolated to Ox O field Using the Eq. (5.36) and (5 37), in-air output factor of wedge field was calculated and compared with measured data in Figure 5-9. Since block can not

PAGE 94

85 1.10 -.----------------------. Varian21 OOC 8 MV 45-External Wedge ; 1.05 u, .. ... 0 .... 1 00 (.) cu LL ... (1) i:: cu 0 95 (.) u, ' Sc (1) ' C) # ' -eSc w "C ' (1) ' I -trSWS 0 90 ' , 0.85 -1------4-----+-----------------' 0 5 10 15 20 S i de o f Square F i eld (cm) Figure 5-8 Wedge scatter factor Sl 11 s of 45 wedge field for 8 MV photon beam of Varian 21 OOC. Wedge scatter factor is obtained b y dividing the collimator scatter factor of wedge field S c w with collimator scatter factor of open field S c.

PAGE 95

.. 0 ... (.) cu LL ... ::, C. ... ::, 0 86 1.10 -------------------------, 1.08 1 06 1.04 1.02 1 00 0 98 Varian21 OOC, 8MV 45-External Wedge MLC field Measurement Separation of Sc Sws es No Separation ... .. Conventional 0 96 --1-------1-------.------. -------1 0 5 10 15 20 Side of Square Field (cm) Figure 5-9. In air output factor of wedge field with MLC tertiary collimator for 8 MV photon beam of Varian 2100C While the collimator jaw setting is fixed as 20 x 20 cm 2 MLC shaped field i s changed from 4 x 4 to 20 x 20 cm 2 at detecto1 plane

PAGE 96

87 be used with wedge in Varian 21 OOC, only MLC fields were considered. In-air output factors obtained by conventional method and field mapping method with DEV field without separating S,v s were also plotted for comparison. Conventional method gives one in-air output factor value for all field sizes. Field mapping method through DEV field without separating S,Y s always overestimated the in-air output with the differences reaching to about 4 %. The separation of S c and S,vs shows good agreement (within 0.5 % difference) with experimental data for all field sizes. In-air Output Factor of Irregular Shaped Fields In-air output factors for irregular fields were calculated and compared with experimental data in Table 5-1 for both 8 and 18 MV photon beams. The experimental data were also measured with 18 MV photon beam available on the same Varian 21 OOC and compared with the calculated data to verify the validity of algorithm for other photon energies. Calculated in-air output factors matched well with the measurements. The maximum difference was less than 0.5 o/o. In-air output factors obtained by conventional method were also tabulated in Table 5-1 for comparison. The conventional method tends to overestimate in-air output in the presence of wedges and underestimate for open fields. Discussion The importance of piecewise separation of scatter radiation component in the in air output from a linear accelerator obvious from the measured data are shown in Figures

PAGE 97

88 Table 5 1. In-air output factors of test irregular fields for 8 and 18 MV photon beams of Varian 21 OOC. Data are normalized to reference 10 x 10 cm 2 field In-air output factors obtained by conventional method are also included for comparison. Beam's eye view irregular field shapes are shown in Figures 5-3 and 5-4 Tertiary Collimator Energy ( MV) Block( open) MLC(open) MLC( 45 wedge) 8 18 8 18 8 18 In-air Output Measurement Calculation 1.034 1 032 1 013 1 012 1 021 1 020 1.031 1.028 1.012 1.010 1.021 1 018 Conventional 1 026 1.024 1.020 1.017 1 047 1 041 5-6 57, and 5-9. A close examination of Figure 5-6 shows that as the field is increasingly blocked the relative in-air output starts to increase frrst and then decreases as the field blocking becomes extreme. Thi s i s attributed to increasing scatter from the tertiary collimator and decreasing head scatter as the field is progressively blocked A simple geometrical back projection of the field to the s ource plane that accounts for the head scatter is not sufficient to predict the in-air output accurately. The tertiary collimator scatter from field shaping blocks mu s t be included to achieve better accuracy Even the calculations show lower relative in-air output than mea s ured data for lar g er tertiary collimated fields. The reason for this s mall difference can be attributed to the scatter

PAGE 98

89 contribution from s ide wall of tertiary collimator that is not included in our calculation model. Figure 5 7 indicates that the amount of scatter contribution from MLC is not sign ificant Therefore, it may not be nece ssary to consider MLC scatter factor for in-air output calculation as long as head scatter is calculated accurately. But the inclusion of scatter from MLC gives better accuracy. The importance of separating scatter component from the head and beam modifier (wedge) is clearly demonstrated in Figure 5-9. Thicker wedges introduce significa nt amount of scatter. The magnitude of scattered radiation from an external wedge is dependent upon the surface area of the wedge seen by the photon fluence that is incident on it Scatter source distribution functions described in the literature have been defined within the physical dimension of flattening filter. In reality in air output may changes even when the field size becomes larger than the flattening filter dimension If this effect is not considered, the calculation can result in an increasing discrepancy with measurement. To account for this effect, Yu and Slaboda (1993) assumed a pseudo source distribution function outside the flattening filter and it is determined by experiment for each beam. In field mapping method, since measurement data is directly used combined with equivalent field relationships, this effect i s inherently included, thus, no additional experiment is required When the source-to-detector (SDD) distance changes, the inverse law ha s been used to calculate in-air output change. As the detector point changes, the field through detector's eye view also changes. Therefore, the effective field size for inverse square law calculation should be changed and this can be easily done with field conversion factors

PAGE 99

90 specific for each detector point. This effect may not be negligible with very small field size because the gradient of in-air output change is much steeper in smaller field sizes than larger field sizes. However it is not easy to separate these two effects, pure inverse square law and DEV field size change due to SDD change. It is found the effective source position of photon beam is not the same as physical source position in megavoltage linear accelerators (Tatcher & Bj a mgard 1992 McKenzie & Stevens 1993) The effective source position can be easily determined by experiment s (Tatcher & Bj a rngard 1992 ). When a effective source position is determined by experiments with fixed field size for all SDD (Tatcher & Bj a rngard 1992), it inherently includes the effect of field size change However, there are two complication s for external wedge field : 1) effective source position is dependent on field size and 2 ) field s i z e s for head s catter and wedge s catter are different each other when tertiary collimator is used. Therefore, it may be necessary to separate each effective source position corre s ponding to each scatter source. Conclusion An in-air output factor calculation algorithm based on field mapping through the detector's eye view field was developed and programmed. This method can predict in-air output factor behavior in irregular field s with very good agreement for both open and wedge fields Although source plane field si z e i s u s ed to determine th e head s catter factor parametrization at detector plane i s kept by mappin g the s ource plane field s ize

PAGE 100

91 into the detector plane field size. That is no additional dosimetric data acquisition i s required which makes it is very simp le to implement this method. In order to include the scatter contribution from tertiary co llimator tertiary collimator scatter factor can be measured and parametrized. This gives more accurate prediction of in-air output, especially in the case of the use of Cerro bend block. By virtue of the s implicity field mapping method through the detector 's eye view field can be easily implemented in any clinic.

PAGE 101

CHAPTER6 TWO-EFFECTIVE-SOURCE METHOD FOR THE CALCULATION OF IN-AIR OUTPUT FACTOR ATV ARIOUS SDDs IN WEDGED FIELDS Introduction In megavoltage photon therapy, it has generally been assumed that in-air output at central axis varies proportional to the inverse square of SDD (Kahn 1994). That is, the in air output factor is given by OF( c, SDD) = OF( C r SDDrJH( c)[SDD,I SDD ] 2 (6.1 ) where, c, r, and H indicate collimator opening reference condition, and field size dependence of in-air output factor (collimator scatter factor, Sc ), respectively Conventionally, the isocenter is chosen as the reference point of measurement. In most linear accelerators SDD for isocenter is 100 cm. In a megavoltage linear accelerator, the physical source of x-rays lies at the site where the electron beam hit s the target As the photons move forward, they pass through other structures in which they may undergo s cattering interactions Depending on the structure and collimator system, different amounts of scattered photons can reach the point of measurement. Therefore, one can expect that the contribution of these scattered photons will produce a downstream shift in the location of the effective x-ray source (Tatcher & Bj a 1ngard 1992) This problem may be s olved by u s ing a one-effectives our c e 92

PAGE 102

93 method combined with the inverse square law (Tatcher & Bjarngard 1992, McKenzie & Stevens 1993) That is Eq. (6 1) can be replaced with OF( C, SDD) = OF( Cr, SDD r) H( C eff )[ {SDDr-V o (FS)}I {SDD-v o (FS)} ] 2 ( 6.2) where, v 0 i s the distance to the effective source from the physical source. Effective field size, Ceff, accounts for the change of field size through detector's eye view, which can be obtained through field mapping with geometric field conversion factors specific for the linear accelerator (see Chapters 4 & 5 ) However when an effective source position is obtained by experiments with a fixed field s ize (Tatcher & Bj a rngard 1992 McKenzie & Stevens 1993 ), it inherently includes the effect of field size change. Furthermore, the effect of field size change is much smaller than the effect of inverse square law. Therefore we can expres s Eq. (6.2) as OF(c, SDD) = OF(c n SDDr)H( c) [(SDD r -v (c) }I {SDD-v( c)} J 2 ( 6.3 ) It has been shown in the literature that v is independent on field size for open field ( 1 cm) (Tatcher & Bj a rngard 1992, McKenzie & Stevens 1993). When one-effective source method is applied for a wedge field, SDD-v indicates the pseudo-source position of the sum of prima1y ( head scatter) and wedge scatter radiation. However, v depends on field size and ranges from 2 4 cm (Tatcher & Bj a rngard 1992) The literature is sparse on the effective source position in the pre s ence of an exte1nal wedge. One would expect that the increa se d scatter from external wedges would move the effective so urce position further downstream from the target and that the position would be highly field-size dependent. Moreover, when a tertiary collimator is used with an external wedge, the field size for determination of wedge scatter is different from that for head scatter (see Chapter

PAGE 103

94 5). This ca s e may not be properly dealt with in Eq. ( 6 3 ) becau s e vi s obtained with one field size In this chapter, a simple algorithm for calculating in-air output factor at any SDD point on the central axis for wedged fields was developed The method separately deals with wedge scatter s ource from head scatter s ource. Theory When photon beams pass a wedge, energy fluence changes because of both attenuation of incident photons and scatter photons by the wedge. If we express the energy fluence b e low the wedge a s then w e ca n e xpr ess 1+ s u u ( 6.4 ) where, u is the unscattered energy fluen c e due to the head s catter photons and s i s the energy fluen c e due to photon s sc attered by th e wedge With the attenuation factor of the wedge, Aw u is given by u=Aw'I', (6.5 ) where \J' is energy fluence incident on the wedge For the energy fluence of any field with a wedge, we can get (X Y, f)= ( X Y. f) ( Xr ,Yr ,fr ) c, c c, c ( Xr,Yr,fr )

PAGE 104

95 (Xe ,Ye ,f ) (X Y, F ) -r, r,Jr (X,,Yr,fr) where (Xe, Ye ,f) indicates collimator sett ing, Xe x Ye with SDD off, and (6.6) (Xr ,Yr ,fr) indicate s a reference field with the co llimator sett ing Xr x Yr with SDD of fr. By substituting Eq. (6.4) into Eq. (6.6), we obtain u(Xc,Ye,f) ( Xe ye f) = ( X y f ) ( X y 1 ) r r r u r, r, r s(Xe,Ye,f) l + --u (Xe ,Ye ,f) 1 + s (Xr ,Yr ,fr) u (Xr ,Yr ,fr) Using the effective source position of open field, we have (X Y f) = U e e f,-vo f-vo 2 (X Y f ) U C C r (6.7) (6.8) where vo is the shift of source position for the open field, which i s the same as v in Eq. (6.3) and is deter1r1ined by experiment (Tatc ber & Bjamgard 1992, McKenzie & Stevens 1993) On the other hand, we can express (X Y f) = S e e fwr+w fw+w 2 (X ,Y,f) S C C t (6.9) for wedge scatter, where fwr (or fw) is the distance to the reference point (or point of measurement) from the wedge and w i s the s hift of source posit i on of wedge scatter radiation Because the behavior of scatter so ur ce fits better into the inverse square law as the SDD increases, we may assume positive s hift of w. Figure 6-1 sc h ematical ly shows each parameter. In Figure 6-1, vw [ same as v in Eq. (6 3)] i s the shif t of so urce position for wedge fie l d in the one-effective-source method and should be distinguished from w.

PAGE 105

vol fr w fwr I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 96 I I I I I I I 1 1 /\ I \ I \ I \ \ \ \ \ \ \ \ \ f ) I ====~J Wedge I I I I \ \ \ I I I \ I \ 0 Reference Point 0 Point of Measurement I \ \ I \ I \ \ \ I \ \ \ f fw Figure 6-1 Schematic diagram s howing the geometrical parameters v o and vw indicate the shift of effective s ource po s itjon in 1 eff ec tive s our c e method for open and wedge field, re s pectively. fr ( or j) is the distances from source to the reference point ( or point of measurement ) andfwr ( or fw ) is the distanc es from wedge to the reference point ( or point of measurement ).

PAGE 106

97 By inserting Eq. (6.8) and (6.9) into Eq.(6.7), we h ave ( X Y f) = ( X Y f ) e e r r r fr-VO f-vo 2 u (Xe Ye ,fr) u (Xr Yr ,fr) l+ (f-vo)(fwr+w) (fr -vo )(fw +w) 2 s ( Xe ,Ye ,fr) u (Xe ,Ye ,fr) (6.10) Using the definition of collimator scatter factor, Sc for open field and Sc, w for wedged field, we can get S (X Y f) = C,W C C with fr-VO f-vo (X v )= s (Xe ,Ye ,fr) a c,1c -----, u (Xe ,Ye ,fr) and 2 2 l+ (f-vo)(fwr +w) (fr-vo)(fw +w) a(Xc ,Ye) S (X ,Y,f) -----, ~ 1 + -~--c c c r a, (6.lla) (6.l lb ) -rv(X v )s(Xr,Yr ,f r) Ur-u. r, 1 r ---, u (Xr ,Yr ,fr) (6.llc) where a is defined as ratio of sc atter fluence from wedge to unattenuated fluence. Although the numerator accounts for the change in wedge scatter with field size, it actually includes the effect of field size dependence of head scatter. However, the field size dependence of head scatter is canceled by dividing it by the unattenuated fluence.

PAGE 107

98 Therefore, a indicates the real field size dependence of wedge scatter. With a collimator scatter factor, Sc w (Xr ,Yr ,f), for any point that is not on the reference SDD (i.e., j'# fr) for wedged field, Eq. (6.1 la) gives a r when w is known. Using a rand two sets of standard dosimetric data, Sc (Xe ,Ye ,fr) and Sc,w (Xe ,Ye ,fr), a set of a(Xc ,Ye) is calculated. Once a rand a (Xe ,Ye) are obtained, the collimator scatter factor at any field size and SDD, Sc w (Xe ,Ye ,f), can be calculated by Eq. (6.1 la). In practice, w is deter1nined such that it gives the best agreement between calculated Sc w (Xe ,Ye ,f) and experimental data. When a tertiary collimator is used with an external wedge, the field size for the determination of wedge scatter is different from that for head scatter (see Figure 6-2). In Eq. (6.1 la), Sc (Xe ,Ye ,f) is deternuned by the field size for head scatter and a(Xc ,Ye) is determined by the field size for wedge scatter. Note that the last ter1n of Eq. (6.1 la) is a general wedge scatter factor at any SDD and becomes the same wedge scatter factor defined in the previous chapter (see Chapter 5) at SDD = fr, (6.12)

PAGE 108

99 Field which determines Sc(Xc, YcJ) Source Plane -r:::::;p-. -----\ \ Upper Collimator Jaw Lower Collimator Jaw Tertiary Collimator (Block or MLC) : ,, --==n=~ \ ==~ = =;:::J, Wedge J \ / : : a(Xc,Yc) is determined ,1 1 \ f '\ by Field shaped by TertiarY, / \ f '\ : \ Collimator / Point Mea urement I ----M I I I I I I I I I I I I I : \ \ \ \ \ \ \ \ \ \ \ \ \ Figure 6-2. Schematic diagram showing the detector's eye view s catter area for head scatter and wedge scatter in external wedged field.

PAGE 109

100 Method s and Material s In thi s s tudy w, the shift of source position of wedge scatter radiation is determined for a Varian 2100C linear accelerator. The Varian 2100C produces photon beams of 8 and 18 MV. An MLC is in sta ll e d as a tertiary collimator. Four wedge filters, 15, 30, 45 and 60 wedges, can be in se rted externally. In-air output factor wa s measured with a cylindrical acrylic minipbantom as described by van Gasteren et al. (1991). The cylindrical phantom is 3.8 cm in diameter and 15 cm long. A shonka plastic 0.1 cm 3 ionization chamber was inserted in the rniniphantom with its center located at 5 cm for 8 MV and 10 cm for 18 MV from the front surface. Measurements were taken for squa re fields with SDD ranging from 80 to 130 cm The collimator setting varied from 6 x 6 to 20 x 20 cm 2 ( 15 x 20 cm 2 for 60 wedge) at the isocenter with 15, 30, 45, and 60 wedges. Special care was taken to position the chamber on the central axis for measurements with wedge. Rever si ng the wedge direction did not change the measured reading s by more than 0.4o/o. To obtain vo, the s hift of effective so urce for open field, in-air output factors of open fields were measured. Collimator settings of open field varied from 6 x 6 to 40 x 40 cm 2 For comparison, vw, the shift of effective source in the one-effective-source method for wedge fields was also determined. The values of vo and vw were extracted as the be s t fit to an inver se sq uare dependence of the in-air output factor on di s tance. To determine whether the algorithm i s valid for a field in which the tertiary collimator shapes the irradiated area of wedge, in-air output factors of tertiary collimator

PAGE 110

101 shaped fields were measured. Because wedge cannot be used with conventional blocks in a Varian machine that is equipped with MLC, only the MLC field was considered. The measurements were taken with the fixed X and Y collimator jaws ( 20 x 20 cm 2 ) for an 18 MV photon beam. The tertiary collimator varied from 6 x 6 to 14 x 14 cm 2 for 45 wedge field (for convenience, square shapes were used instead of irregularly shaped fields) The SDDs varied from 80 to 130 cm Re s ults As in the literature ( Tatcher & Bj a rngard 1992, McKenzie & Stevens 1993 ), no systematic dependence of the effective source position on field size was observed A vo = 1.4 cm for 8 MV and 1 1 cm for 18 MV photon beam was obtained. The magnitude of maximum relative differences [100 x (calculated measured ) / measured] between calculated in-air output factors using the inverse square law with the application of vo values and measurements was 0.3 o/o for 8 MV and 0 5o/ o for 18 MV through all field sizes (6 x 6 to 40 x 40 cm 2 ) and all SDDs (80 130 cm). However, even without the application of effective source method (vo = 0) the maximum difference did not exceed 1 %. Therefore, it may not be neces s ary to apply an effective s ource method for open field The shift of effective s ource po s ition vw of 15, 30, 45 and 60 wedge fields i s shown in Figt1re 6-3 for both 8 and 18 MV photon beams. Depending on field size and wedge angle, vw ranged 1 8 9 cm for 8 MV and 2.3 to 8.6 cm for 18 MV. The values of vw and corresponding maximum relative differences are tabulated in Table 6-1 for 8 MV

PAGE 111

102 10 + W15(8 MV) 9 W30(8 MV) ,X -tr W45(8 MV) , A W60(8 MV) , 8 , )I( W15(18 MV) .-. E W30(18 MV) 0 ..._, 7 W45(18 MV) W60(18 MV) .. (1) 6 0 ... ::, 0 , , en 5 (1) t:: > .... 0 , (1) 4 , = w )( .... 0 3 = .c ,tit. ~ en 2 . 1 Varian 21 OOC 0 -t---4 -4-----+-+~i----+-~ --I--~ 4 6 8 10 12 14 16 18 20 22 S i de of Square Field (cm) Figure 6-3. The shift of effective source position for wedged fields, vw in the one effective-source method for 15 30, 45 and 60 wedge fields of Varian 2100C with 8 and 18 MV photon beam s vw i s dependent on wedge angle, field size and beam energy.

PAGE 112

103 and Table 6-2 for 18 MV beam. The magnitude of difference was maximal (l .4o/o for both 8 and 18 MV) at the larger field size and higher wedge angle. For comparison, in-air output factors were also calculated using the inverse square law without applying an effective source method (i.e. vw = 0), and relative differences of in-air output factors at SDDs of 80 and 130 cm are tabulated in Table 6-3 for 8 MV and Table 6-4 for 18 MV beam. Differences were maximal at 80 cm SDD in negative direction and at 130 SDD in positive direction. Without applying an effective source method, the magnitude of difference reached up to 6% at 80 cm SDD for a 15 x 20 cm 2 field with 60 wedge for both 8 and 18 MV beams. As shown in Figure 6-3, vw depends on wedge angle, field size, and beam energy. While vw varies greatly according to wedge angle and field size, it does not change much between 8 and 18 MV energies. The shift of effective source position of wedge scatter, w, was found to be independent of field size. No systematic dependency of won either wedge angle or beam energy was observed. One value, w = 7 .5 cm, provided less than 1 % difference in in-air output factors throughout the experimental ranges of 6 x 6 to 20 x 20 cm 2 ( 15 x 20 cm 2 for a 60 wedge) field size, 15 60 wedge angle, 80 to 130 cm SDD for both 8 and 18 MV photon beams. The differences among in-air output factors according to field size and SDD are given in Table 6-5 for a 45 wedge field with an 18 MV photon beam. For comparison, the differences among in-air output factors obtained by the one-effective source method and the inverse square law without application of an effective source method are also tabulated in Tables 6-6 and 67, respectively. For illustration, the maximum difference in in-air output factors obtained by each method is plotted according

PAGE 113

104 Table 6-1. The shift of effective source position, vw(cm ) in the one-effective-source method and maximum relative difference ( o/o) of in-air output factor for 15, 30, 45, and 60 wedge fields with 18 MV photon beam of Varian 2100C. SDD ranges 80130 cm. Relative difference i s obtained by 100 x ( calculated measured ) / measured. Field Size 15 W 6x6 2.3 8x8 2.6 JOxlO 2 8 15xl5 3.3 20x20* 4.0 vw (cm) 30 w 45 w 2.9 3 4 3.9 4.8 5.8 3 8 4.6 5.3 6.7 8.1 15x20 for 60 wedge 60 W 4.4 5.3 6.1 7.9 8 6 Max. Difference (o/o) 15 w 30 w 45 w 60 W -0 4 -0.4 -0.6 -0.7 -0.5 -0.6 -0.8 -0.8 -0.5 -0 6 -0.9 -0.9 -0.6 -0.8 -1.2 -1 2 -0.7 -1.0 -1.4 -1.4 Table 6-2 The s hift of effective source po s ition, vw(cm ) in the one-effective-source method and maximum relative difference (%) of in-air output factor for 15, 30 45, and 60 wedge fields with 8 MV photon beam of Varian 21 OOC. SDD ranges 80 130 cm. Field Size 15 w 6x6 1.8 JOxJO 2.4 20x20* 3.9 vw (cm) 30 w 45 w 2.3 3.5 5 9 3.0 4.9 8.4 15x20 for 60 wedge 60 W 3.6 5.9 9 0 Max. Difference(%) 15 W 30 w 45 w 60 W -0.3 -0.4 -0 4 -0 6 -0.4 -0.6 -0.7 -1.l -0.6 -1.0 -1.2 -1 4

PAGE 114

105 Tab l e 6 3. The relative difference of in-air output factor according to fie l d size at 80 and 130 SDDs for 15, 30, 45, and 60 wedge fie l ds with 18 MV photon beam of Varian 2100C. In-air output factor is calculated by the inverse square law without app l ication of an effective source method. Difference( o/o) at 80 SDD Field Size 15 W 6x6 -1.5 8x8 -1.7 JOxlO -1.9 15xl 5 -2.3 20x20* -2.8 30w 45 w -1.9 -2.6 -2.3 -3.1 -2.6 -3.6 -3.3 -4.7 -4.0 -5 .7 15x20 for 60 wedge 60 W -2.9 -3.6 -4.1 -5 4 -6.0 Difference( o/o) at 1 3 0 SDD 15 W 0 .7 0 8 0.9 1.0 1.2 30w 1 0 1.1 1 .2 1.5 1.8 45 w 1 2 1.4 1.7 2.1 2.8 60 W 1.5 1.8 2.1 2.7 2.9 Table 6-4 The relative difference of in-air output factor according to field size at 80 and 130 SDDs for 15 30, 45, and 60 wedge fields with 8 MV photon beam of Varian 2100C. In-air output factor is calculated by the inverse square law without application of an effective so urce method. Difference(%) at 80 SDD Field Size 15W 6x6 -1.2 JOxJO -1.6 20x20* -2 5 30 w 4s 0 w -1.5 -1.9 -2.4 -3.2 -4.0 -5.6 l 5x20 for 60 wedge 60 W -2.4 -4.1 -6 2 Difference( % ) at 130 SDD 1s 0 w 0.6 0.8 1 4 30w 4s 0 w 0 8 1.1 2.0 1.2 1.8 3.1 60 W 1.2 1.9 3.2

PAGE 115

106 Table 6-5. The relative difference of in-air output factor according to field size and SDD for 45 wedge field with 18 MV photon beam of Varian 21 OOC. In-air output factor is calculated by the two-effectives ource method that is, Eq. ( 6 11 ) with w = 7 .5 cm. To calculate a,, S c, w( 10, 10, 80) is used. Field Size 80 6x6 0 4 8x8 0.2 JOxlO 0.0 15xl5 0.4 20x20 0.6 Diff erence(o/o) at each SDD 90 0 4 0.4 0.3 0.5 0.5 100 0 0 0.0 0.0 0.0 0.0 110 -0.3 -0.3 -0.3 -0.3 -0.4 120 130 -0 5 -0.4 -0 5 -0.4 -0 5 -0.3 -0.5 -0.5 -0.7 -0.6 Table 6-6. The relative difference of in-air output factor according to field size and SDD for 45 wedge field with 18 MV photon beam of Varian 21 OOC. In-air output factor is calculated by the one-effective-source method. Field Size 80 6x6 -0.7 8x8 -0.8 JOxlO -0.9 15xl5 -1.2 20x20 -1.4 Difference(%) at each SDD 90 0.2 0.2 0.2 0.2 0.2 100 0.0 0.0 0.0 0.0 0.0 110 -0.3 -0.4 -0.4 -0.5 -0.6 120 130 -0.6 -0.7 -0.7 -0 .8 -0.8 -1.0 -0.8 -1.2 -1 .1 -1.4

PAGE 116

107 Table 6-7. The relative difference of in-air output factor according to field size and SDD for 45 wedge field with 18 MV photon beam of Varian 21 OOC. In-air output factor is calculated by the inverse square law without application of an effective source method. Field Size 80 6x6 -2.6 BxB -3.2 JOxJO -3.7 15x15 -4.7 20x20 -5.7 Difference(o/ o) at each SDD 90 -0.8 -0.9 -1.2 -1.4 -1.9 100 0.0 0.0 0.0 0.0 0.0 110 0.5 0.5 0.7 0.9 I.I 120 0.8 1.0 I.I 1.6 1.9 130 1.2 1.5 1.7 2.2 2.8 to field size in Figure 6-4 for a 45 wedge field with an 18 MV photon beam. In the inverse square method the maximum difference dramatically increases as field size increases. The maximum difference for the one -ef fective-source method also increases by a significant amount with field size. However, the two-effective-source method showed very little dependence of maximum difference on field size. The differences among in-air output factors according to SDD are shown in Figure 6-5 for a 20 x 20 cm 2 field with a 45 wedge with an 18 MV photon beam. The two-effective-source method predicted in air output factors accurately (less than 1 % difference) through the whole range of SDDs (80 to 130 cm). The differences among in-air output factors for 45 wedge fields for an 18 MV photon beam with a tertiary collimator (MLC) are presented in Table 6-8. The secondary

PAGE 117

108 Side of Square Field (cm) 5 10 15 20 o_.,_-------~---------+----------1 -1 ';f!.. 0 cu g -2 e c -3 cu > .., (U cu a: -4 -5 two-effective-source method -wone-effective-source Method A inverse square method Varian 21 OOC 18 MV, 45Wg -6 --------------------------Figure 6-4 Maximum relative difference of in-air output factors according to field size for 45 wedge fields of Varian 21 OOC with 18 MV photon beam. In-air output factors are calculated by 3 different methods, inverse square method, one-effective-source method, and two-effective-source method.

PAGE 118

0 -C1) u C C1) 'C1) = C C1) > .... ns C1) a: 109 3--------------------------, Varian 2100C, 18 MV, 45Wg, 20x20 2 1 0 -1 -2 -3 -4 two-effective-source method --one-effective-source method -5 A inverse square method -6 ....L------------------------1 60 80 100 SDD (cm) 120 140 Figure 6-5 Relative difference of in-air output factors according to SDD for 20 x 20 field with 45 wedge of Varian 21 OOC at 18 MV photon beam. In-air outp t1 t factors are calcu l ated by 3 different method s inverse square method, one-effectives ource method, and two effectives ource method.

PAGE 119

110 collimator was fixed as 20 x 20 cm 2 during variation of the tertiary collimator. Becau se the field size for the determination of wedge scat ter is different from that for head sca tter the one-effective-source method cannot be applied to this case. However, as shown in Table 6-8, the two-effective-source method accurately predicted the in-air output factor with a difference of less than 1 %. The field mapping method through the detector's eye view was used to calculate Sc (Xe, Ye ,fr) for the tertiary co llimator field (see Chapter 5). Table 6-8. The relative difference of in-air output factor according to MLC field s ize and SDD for 45 wedge field with 18 MV photon beam of Varian 2100C. Secondary collimator is set 20 x 20. In -air output factor is calculated by the two-effective-source method, Eq. (6. 11 ) with w= 7.5 cm. To calculate Ur, S c,w (l0,10,80) is used. S c i s calculated using field mapping method through detector's eye view. MLC Field 80 Size 6x6 lOxlO 14x14 -0.1 -0.3 -0.3 Difference( %) at each SDD 90 0.1 0 0 -0. 1 100 -0.3 -0.2 -0.3 Discussion 110 -0.2 -0.2 0 4 120 130 -0.5 -0.3 -0.4 -0.3 -0.6 -0.4 The parameter a i s simi lar to scatter-to-prima ry ratio [ see Eq. (6. 11 b)]. Whereas the numerator accounts for the change in wedge scatter with field size, the denominator

PAGE 120

111 accounts for the change in head scatter. As illustrated in Eq. (6.12), (l+a) (l+ar) becomes wedge scatter factor, Sws, when SDD = fr. To determine fwr (or fw ), the distance from wedge to the reference point (or point of measurement), the top of the wedge was chosen. Any point (middle or bottom of the wedge) can be chosen as the location of wedge. However, this does not change f wr +w (or fw +w ), the distance from the effective source of wedge scatter to the reference point ( or point of measurement). In Eq. (6.11 a), a r is obtained using the collimator scatter factor, Sc, w (Xr ,Yr ,f), of a point that is not on the reference SDD ( f "#fr) for a wedged field. In Table 6-5, S (10,10,80) was used to get a r. Depending on which measurement e,w data are used, the values of a r and a ( Xe Ye ) may change. The same calculation as in Table 6-5 was accomplished with Sc,w (10,10,130) and very similar results were obtained (Table 6-9). Conclusion A simple algorithm was developed for caJculating the in-air output factor at various SDDs on the central axis for wedged fields. In the algorithm, two effective sources, one for head scatter and the other for wedge scatter, are dealt with independently. The effective source position of head scatter for wedged fields is the same

PAGE 121

112 as for open fields. The effective source position of wedge scatter is assumed to be at certain distances upstream from the physical l ocation of wedge. The shift of effective source of wedge scatter, w, is found to be independent of field size. Moreover, no systematic dependency of w on both wedge angle and beam energy was observed. One va l ue, w = 7 .5 cm, provided less than a 1 % difference among in-air output factors through the whole experimental ranges, that is, 6 x 6 to 20 x 20 cm 2 ( 15 x 20 cm 2 for 60 wedge) field size, 15 60 wedge angle, 80 to 130 cm SDD, and both 8 and 18 MV photon beams. The algorithm is also valid when a tertiary collimator is used with an external wedge, in which field size for the detertnination of wedge scatter is different from that for head scatter. Table 6-9. The relative difference of in-air output factor according to field size and SDD for 45 wedge field with 18 MV photon beam of Varian 2100C. In-air output factor is calculated by the two-effective-source method, Eq (6.11) with w = 7.5 cm. To calculate ar, S c,w ( 10, 10,130) is used. Field Size 80 6x6 -0.3 8x8 -0 5 JOxlO -0.6 15xl5 -0 .3 20x20 0.1 Difference( o/o) at each SDD 90 0.2 0.1 0.0 0.3 0.3 100 0.0 0.0 0 0 0.0 0 0 110 -0.1 -0.2 -0.2 0.2 -0 3 120 -0 3 -0.3 -0 2 -0.2 -0.4 130 -0.2 -0.1 0.0 -0.3 -0.3

PAGE 122

CHAPTER 7 CONCLUSIONS General Discussion Irregular fields have historically been shaped by a tertiary collimator system. Conventionally Cerrobend blocks have been used as tertiary collimators. The in-phantom dosimetric parameters, such as the tissue-air-ratio (TAR) or tissue-maximum-ratio (TMR), and phantom scatter factor are calculated based on the actual field shape created by the custom Cerro bend block, but the in-air output factor ( or collimator scatter factor) calculation is based on the rectangular field shaped by secondary collimator jaws, and is considered independent of any tertiary blocking. For irregular fields shaped with MLC, the method for in-air output factor calculation i s dependent on the MLC design. When a MLC is attached as a tertiary collimator below the secondary collimators, the method of in-air output factor calculation has been the same as the conventional method using Cerrobend blocks. However, there are three concerns with the conventional method. First, the effect of collimator exchange is not explicitly accounted if the conventional equivalent square field forrnula that is, area-to-perimeter ratio formula (Sterling et al. 1964 ), is used to convert the rectangular field to the equivalent square field. Second, the effect of tertiary collimator is not considered. And finally, the effect of beam modifier ( or wedge) is either overestimated or underestimated. 113

PAGE 123

114 The in-air output factors of a L x W and a W x L rectangular field are not the same. The difference reaches 2 to 3% for open field (Moyer 1978 Kase & Svensson 1986, Tatcher & Bjamgard 1993) and 3 to 4% for wedged field (Tatcher & Bjamgard 1993). It increases with tl1e elongation ratio. This effect is referred to as ''collimator exchange effect''. To account for the collimator exchange effect, an empirical formula (Vadash & Bjarngard 1993 Yu et al 1995b) has been introduced. However, users have to carry out a large number of measurements to determine the weighting factor for the formula described in these publications. When a tertiary collimator is used to form an irregular field, scatter contribution from the tertiary collimator may affect the in-air output factor, especially when the area of irregular field is too small compared to the collimator opening. In Chapter 5, in-air output factors were measured according to the tertiary collimator (Cerro bend block and Varian MLC) field size with the fixed secondary collimator openings using an 8 MV photon beam on a Varian 21 OOC. The results (see Figures 5-6 & 5-7) show that the in-air output factor increases at first (up to 1.5% for Cerrobend block field and 0.5% for MLC field) then decreases as the field size is decreased. Also shown in Figures 5-6 & 57 are the conventional in-air output factors which have a constant value (1.030 for block field and 1.028 for MLC field) for all field sizes. The results of this experiment indicate that the amount of scatter contribution from the tertiary collimator is not negligible The Varian MLC is an add-on device that is attached to the conventional linear accelerator head Varian changed the location of the wedge to make enough room for MLC inside the head. The wedge is inserted below the MLC. This kind of wedge is

PAGE 124

115 referred to as ''external wedge''. When a wedge is located above the secondary collimator, a tertiary blocking does not change the area of wedge that is irradiated by the incident photon beam. However, if a wedge is located underneath the tertiary collimator, for example, in the case of a Varian MLC, the irradiated area of wedge changes according to the irregular shape formed by the MLC. Thus, the amount of scatte r contribution from the wedge varies as the tertiary collimator field size changes. The conventional method of in air output calculation cannot account for this effect and always overestimates wedge scatter contribution. Figure 5-9 shows the in-air output factor as a function of the MLC field size with a fixed secondary collimator opening for a 45 wedge field with an 8 MV photon beam on a Varian 21 OOC. While the conventional method predicts a constant value of output factor for all field sizes, experimental measurement shows that output continuously decreases as MLC field size decreases. These experiments show tl1at tl1e accurate prediction of output factor requires explicit accounting of collimator exchange effect, scatter from tertiary collimator, and scatter from beam modifiers. The head scatter factor depends on head scattered radiation which can reach the detector. If any ray line of head scatter to the detector is blocked by tertiary collimator such as Cerrobend block or MLC, the head scatter factor is expected to decrease Therefore, head scatter factor depends on the field size defined at the source ( or flattening ftlter) plane through the detector's eye view instead of the conventional field size defined at the detector ( or isocenter) plane by the collimator jaw opening. The field defined by DEV is illustrated in Figure 5-2. To ca lcul ate the head scatter factor the DEV field should be used. There are two ways of using the DEV field; (i) the method of

PAGE 125

116 modeling the source distribution function and (ii) the field mapping method. In the first method, a source distribution function is set at the source ( or flattening filter) plane. Head scatte r factor is calculated by integrating the function over the DEV field. Several models have appeared in the literature that describe the scatte r photon energy fluence distribution that emanates from the head. However, these model based approaches require sophisticated programming and/or complex measurements. Moreover, these studies have mainly concentrated on the modeling of scatter radiation from flattening filter, and are applicable only to open field. In the field mapping method developed in this study, a DEV field is mapped back into the detector plane by an equivalent field relationship at the source plane. For an irregular field, the field is segmented into sectors and each segmented DEV sector is mapped into an equivalent square field at the detector plane; and Clarkson integration is performed over the whole DEV field. There are two advantages of this method. One is that this method keeps parametrization at the detector plane. The other is that the user can easily choose the degree of comprehensiveness of standard dosimetry because the components that affect the in-air output factor are piecewise parameterized. For example, no new data is required to clinically implement this method if the field size dependence of monitor back scatter factor is insignificant and scatter from the tertiary MLC is negligible. In this case, the field size dependence of head scatter measured for a range of square field sizes is sufficient to implement this methodology When more accurate treatment of monitor back scatter factor is needed, as is expected to be the case in beam intensity modulation therapy, the user can measure monitor back scatter factors and can explicitly account for it.

PAGE 126

117 When an MLC replaces one set of the secondary collimators, the effect of MLC on the in-air output factor is much more prominent. The in-air output factors are determined by the actual irregular field shape instead of the rectangular field. Methods such as the conventional Clarkson calculation (Clarkson 1941) are often employed to determine the scatter from an irregular s haped field. Clarkson calculations make use of an equivalent square fie ld and circular field relationship to deterrnine the collimator scatter factor. Palta et al. (1996) u sed an equivalent square method to predict the collimator scatter factor for Philips MLC fields. In their method, an effective radius of an irregular field is obtained first, then, the circular field with the effective radius is converted to an equivalent square field using Day's formula (Day & Aird1983). Although this method provides a simple methodology, it does not account for either the collimator exchange effect or the nonlinearity of in-air output dependency on field size. In the Philips MLC, the MLC is the closest collimator to the source. If a set of collimator scatter factors is measured according to the sq uare fields determined by only the MLC (i.e., dosimetry with a single-plane collimator) and lower collimator jaws are always positioned beyond or at the edge of the MLC field, it is not necessary to use the detector's eye view approach. In this case the DEV field and the conventional field at the detector plane are directly proportional (i.e., there is no collimator exchange effect). Therefore, Clarkson integration can be carried out directly over the conventional field. When the MLC replaces the lower collimator jaws, the collimator exchange effect still exists. Further1r1ore, the secondary trimmer should be considered during the DEV field

PAGE 127

118 determination on a GE MLC because in their design the trimmer is the closest collimator system to the source. Conclusions The conclusions of the present research are as follows: 1) Development of MLC module The use of MLC has significantly increased There are three major advantages of using an MLC. At first, s ince the field shaping is done using the leaves, the fabrication of custom block is no longer needed. This increases the treatment delivery efficiency because multiple fields can be treated in a short time without reentering the treatment room. The second is that all probl ems associated with heavy blocks, alterations, remodeling and remounting can be eliminated. The third advantage is in the future use of this technology for the delivery of 3-D conformal therapy and intensity modulated radiation therapy. In Chapter 2, an MLC geometric optimization and user interface module wa s developed. The MLC module was implemented on a main RTTP syste m ROCS (version 5 1.1) and is used clinica lly in many clinical sites worldwide. The incorporation of the MLC module into the main RTTP system significantly reduced the planning time

PAGE 128

119 2) In-air output factor calculation method To solve the problem of the collimator exchange effect, a simple formula was derived for the calculation of an equivalent sq uare field that gives the same head scatter factor as a given rectangular field (Chap ter 4). This formula is based strictly on the configuration of a medical linear accelerator treatment head The geometric parameters used in this formula are the distances between the target and the top of each field-defining aperture. The formula accounts for both the effect of field elongation and the collimator exchange effect. This method predicts the output to within I % accuracy for both open and wedge fields and does not require any new measured data other than the field size dependence of head scatte r for a range of square field sizes. In Chapter 4 the study was limited to rectangular fields only. A generalized so lution for in-air output factor calculation was introduc ed in Chapter 5. Three major scatter contributors to the in air output of a medical linear accelerator are flattening filter, wedge, and tertiary collimator These were considered separate ly in the development of the algorithm which was used to set up an in-air output factor calculation formalism for irregular shaped open and wedge fields. A detector's eye view field def med at the source plane i s used to account for the effects of collimator exchange and the partial blockage of flattening filter by tertiary collimator in the deterrr1ination of head scatter. An irregular field detennined at the source plane by detector's eye view is segmented and mapped back into the detector plane by field mappi11g method. Field mapping is performed by using geometric conversion factor and equivalent field relationships for head scatter. Scatter contribution of each segmented equivalent field at the detector plane is summed

PAGE 129

120 by Clarkson integration. Same methodology is applied for determining both tertiary collimator ar1d wedge scatter contribution However, the field size which determines the amount of scatter contribution is not the same for each component. For tertiary collimator scatter, a field projected to the detector plane is directly used. While a detector's eye view field at the source plane is used to determine the amount of wedge scatter when wedge is located above the secondary collimator, a field projected at the detector plane is used if wedge is below the tertiary collimator ( e.g., external wedge). Comparisons of the in-air output factors between calculated and measured values show a good agreement for both open and external wedge fields. This algorithm can be used for MLC fields irrespective of the position of MLC (i.e., whether an MLC replaces one of secondary collimator or is used as a tertiary collimator). The measurement and parametrization of tertiary collimator scatter is necessary to account for tertiary collimator scatter contribution to the in-air output Because a source p l ane field is mapped into the detector plane, no additional dosimetric data acquisition is necessary for the calculation of head scatter. An equivalent field relationship is necessary to apply the field mapping method in the derivation of the generalized in-air output factor calculation algorithm. In Chapter 3, an equivalent field relationship between square and circular fields for head scatter factor was evaluated at the source plane The method is based on integrating the head scatter parameter for projected shaped fields in the source plane and frnding a field that produces the same ratio of head scatter to primary dose on the central axis. A value of cr I R= 0.9 is obtained, where cr is one half of the side length of the equivalent square and R is the radius of the circular field. The assumptions are that the equivalent field relationship for

PAGE 130

121 head scatter depends primarily on the characteristics of scatter from the flattening filter and that the differential scatter-to-primary ratio of scatter from the flattening filter decreases linearly according to the radius within the physical radius of the flattening filter. It is empirically shown in a literature (Lam et al. 1996) that when the area-to perimeter ratio formula is applied to an equivalent square formula at the flattening filter plane, it gives accurate prediction of head scatter factor. The validity of the area-to perimeter ratio formula was analytically investigated. The result supports the area-to perimeter ratio formula of the equivalent field for head scatter at the source plane. The equivalent field relationships for wedge and tertiary collimator scatter were also evaluated. The relationships of cr = 0. 886 R for a circular field and cr = -J LW I 2 for a L x W rectangular field were obtained. In megavoltage photon therapy, it has been generally assumed that in-air output at central axis varies proportional to the inverse square of SOD. In a megavoltage linear accelerator the physical source of x-rays lies at the site where the electron beam hits the target As the photons move forward they pass through other structures in which the y may undergo scattering interactions. Depending on the structure and collimator system, different amount of scattered photons can reach the point of measurement. Therefore, one can expect that the contribution of scattered photons will produce a downstream shift in the location of the effective x-ray source (Tatcher & Bj a mgard 1992) One would expect that the increased scatter from an external wedge will move the effective source position further downstream from the target and that the position is highly field size dependent. Moreover, when a tertiary collimator is used with an external wedge a field -

PAGE 131

122 size for the determination of wedge scatter is different from that for head scatter ( see Chapter 5). A simple algorithm for the calculation of in-air output factors at various SDDs on central axis for wedged fields was developed in Chapter 6. In the algorithm two effective sources, one for head scatter and the other for wedge scatter, were dealt with independently The effective source po s ition of head scatter for wedged fields is the same as for open field s The effective source position of wedge scatter is assumed to be at a certain distance upstream from the physical location of wedge. It is found that the shift of effective source of wedge scatter w is independent of field size. Moreover no systematic dependency of won both wedge angle and beam energy was observed One value of w = 7.5 cm provided less than 1 % difference of in-air output factors. This algorithm is also valid when a tertiary collimator is used with an external wedge, and in which a field size for the determination of wedge scatter is different from that for head scatter. 3) Future work One of the more exciting applications of MLC is the delivery of intensity modulated radiation field Many methods of beam delivery for intensity modulation have been developed (K a llman et al. 1988 Convery & Rosenbloom 1992 Bortfeld et al. 1994, Yu et al. 1995a). In the s e techniques the field sizes used are relatively smaller than the fields used in conventional therapy. The ref ore on a Varian MLC, small MLC fields with a large secondary collimator opening may be used The conventional method of calculating the in-air output factor is expected to be inaccurate. Accurate calculations will require explicit accounting of the combined effect of MLC and secondary collimator

PAGE 132

123 on both the central axis and off-axis points. In this study, the in-air output factor calculation method has been restricted to central axis However the generalized in-air output factor calculation method can be easily expanded to off-axis fields This issue will be an important s ubject for future re search.

PAGE 133

APPENDIX A SOURCE PROGRAM OF THE MLC MODULE The following computer program was written in BASIC to provide MLC module for ROCS treatment planning system. Each subroutine containes the description of subroutine. Variables are also explained in the heading comment. This program has been implemented for ROCS version 5 .1.1 and is in clinical use at many clinic sites worldwide. SUBROUTlNE: MLCINI () SYNOPSIS: t INCLUDE comrocs.inc INCLUDE comir.inc INCLUDE cornirl.inc INCLUDE cornir3.inc INCLUDE comir6.inc LNCLUDE co mir7.in c SUB MLCLNI STATIC 1000 DESCRIPTION : Th is sub routine specify MLC demension and set main variables ASSUMPTIONS : Thi s subroutine assumes valid input variables GLOBAL VARIABLES : HLEA.FNUM I 1/2 of number of leaves LEAF CO LR I Color for MLC leaf LEAFLEN 0 Length of MLC leaf LEAFNUM O Number of leaves in one side (26 for Varian, 40 for Philip s) LEAFWID 0 Width ofMLC leaf MAXMLCDIF I Max of difference among leav es MAXMLCFLD! I Max ofMLC field size in one side MBAXJS I Lower left Y world coo rdinate for MLC field MINMLCFLD! I Max of leaf stretch to opposite side MLAXIS I Lower left X world coordinate for MLC field MLCMAG! 0 Ma g. for projection of MLC fr om 100cm to s urface MLCTYPE O Type o fMLC (l = Varian, 2 = Phillp s) MRAXISI I Upper ri g ht X world coo rdinate for MLC fi e ld MT AXIS! I Upper right Y world coo rdinate for MLC field NOTECOLR I Color for se lected MLC leaf during manual MLC editing SSDSAD! 0 SSD/SAD distance (cm) SSDSADMODE I Mod e of se tup (0 = SSD beam, l = SAD beam) FILES USED : None 124

PAGE 134

125 I SUBROUTINES_CALLED: LEAFIN J Set initial values for l eaf position I AUTHOR: Siyong Kim I I REVISION_HISTORY: I '[------------------==-=---=--=-=-===-=-=== =====--=-======------------------------------------------' I 'I=-DEMENSION SPEC lFl CA TION =-= IF MLCTYPE = 1 THEN 'Varian Type MLC LEAFLEN!=l6.0 LEAFLENGTH LEAFWID != J 0 'LEAF WIDTH LEAFNUM=26 '# OF LEAF FOR EACH S IDE ELSEIF MLCTYPE = 2 THEN 'P hil ips T ype ML C ELSE END IF '1-GET MAGNIFICATION FACTOR ==I MLCMAG! = 1 IF SSDSADMODE = 0 THEN MLCMAG! = SSDSAD!*0.01 ENDlF 'I== PROJECT LEAF DIMENS I ON FROM 100cm TO SURFACE -I LEAFLEN != LEAFLEN !*MLCMAG! LEAFWID !=LEAFWID !* MLCMAG 'I== SET MAIN VARIABLES ---1 MAXMLCFLD !=20 0*M L CMAG! 'MAX. OF MLC F I EI.O S I ZE IN ONE SIDE MINMLCFLD != l 6.0*MLC MAG 'MAX. OF LEAF STRETC H TO OPPOSf1E S ID E MAXMLCD1F! =l4.5*MLC MAG MAX OF DIFFERENCE BETWEEN LEA YES HI .EAFNUM!=0.5*LEAFNUM LEAFCOLR=14 LEAF COLOR N01ECO LR =3 'SELEC 1ED LEAF COLOR HCURCOLR=4 'CROSS HAIR CURSOR CO LOR HCURDJM l=0.5 'C R OSS HAlR CURSOR DIMENSION CAL L LEAFINI 'SET IN ITIAL LEAF PO S I TION END SUB 'I---==--------------------wrm.-.---------rm rm------------______ ,rr _, __ I SUBROUTlNE: MLCDRAW O I SYNOPSIS: INCLUDE comrocs.inc INCLUDE com ir7.in c SUB MLCDRAW STATIC 11 00 I DES C RIPTION : Thi s sub r o utine draws MLC leaves with leaf position data ASSUMPTIONS: Thi s s ubr ou tin e assumes valid input variables. I GLOBAL_ VAR IAB LES: AXDATA!O I X-coordinate data of leaf A AXDATAS!O I X-coordinate da t a of l eaf A for display on screen A YDA TA!() I Y coordinate data of l eaf A A YDA T AS !O I Y-coordinate data of leaf A for display on screen SAXIS! I Lower l eft Y world coordinate BXDATA !() I X-coordina t e data ofleaf B BXDA TAS !O I X-coordinate data of l eaf 8 for display o n screen BYDATA I() I Y coo rdin ate data of leaf B B YDA TAS !O I Y-coordinate data of leaf B for disp l ay on screen CA! 0 Cosine value of collimato r angle CLROLD I Original color i nd ex for graphics LAXI S I Lower left X world coo rdinat e LEAFCOLR I Color for MLC l ea f

PAGE 135

126 LEAFNUM O Number o f leaves in one side (26 for Varian, 40 for Philips) SA! 0 Sine value of collimator angle F l LES_USED: None SUBROUTINES_CALLED: lNQCLR HALO inquire color index at (X, Y) ISODRW Draws origi nal i soce nt er before MLC offset MOY ABS HALO move graphics cursor t o (X. Y) POL YLNABS HAL O. draw a polygon specified by absolute points SETCOLOR HALO, set active color AUTHOR: Siyong Kim REVISION_HISTORY: [--==---------------------:::==========---------=--====---------~--=-----------~---------' 'l=== GET POSITION ON SCREEN BY CONVERT I NG WITH ANGLE---1 J=LEAFNUM 1 FORI=OTOJ FOR K=OT04 AXDATAS !(K.l)=AXDATA!(K,l)*CA!-A YDA TA!(K.I)*SA! A YDA T AS !(K,l)=A YDA TA !(K.l)*CA !+AXDA TA !(K ,I )*SA BXDATAS!(K,l)=BXDATAl(K,l)*CA!-BYDATA!(K,l)*SA! BYDATAS!(K.l)=BYDATA!(K,[)*CA!+BXDATA!(K,l)*SA! NEXTK NEXTI 'II== ORA W MLC ON SCREEN I CALLS lNQCLR(LAXIS!. SAXIS!, CL ROLO ) CALLS SETCOLOR(LEAFCOLR) J=LEAFNUM-1 FOR l =OTOJ CALLS MOY ABS(BXDATAS! (O,I),BYDATAS!(O, l )) CALLS POL YLNABS(BXDAT AS !(0 .1 ). BYDA T AS !(0, I ).5) CALLS MOY ABS(AXDATAS!(O,I),AYOATAS!(O,l)) CALLS POL YLNABS(AXDATAS!(O,n,A YDATAS!(0,1),5) NEXTI CALLS SETCOLOR(CLROLD) 'I== DRAW I SOCENTER BEFORE OFFSET --=I CALLISODRW END SUB [ -------~-----==-------------------==-----------------------------------------------------------------------------------------I SUBROUTINE: MLCOPT() SYNOPSIS: INCLUDE comir.inc lNCLUDE comir7. in c SUB MLCOPTSTATIC 1 200 ' DESCRIPTION: Thjs subroutine search geometrically optimized MLC leaf position ASSUMPTIONS: Thi s s ubroutin e ass um es valid input variables GLOBAL_ VARIABLES: AXDATA!O I X-coordinate data of leaf A AYDATA!O I Y-coordinate data of leaf A BXDATA! O IX -coo rdin ate data o f l eaf B CA! 0 Cosine value of co llimator ang l e CCWX!O O Temporary X-coord. for field outline rotated

PAGE 136

' ' ' t 127 opposite to collimato r rotation CCWY !() 0 Temporary Y-coord. for field outline rotated opposite to collimator rotation CONTSHIFfX! I MLC offset in X-dir (cm) CONTSHIFfYI I MLC offset in Y dir. (c m) DIFF! 0 Difference between longest leaf and each one DY! 0 Difference in Y between two consecutive vertices (cm) FLDEDGEO I Irre gular field o utlin e coordinates (c m 100) FLDMAXVER! 0 Highest point of outline in vertical direction FLDMINVER! 0 L owest poinr of outline in vertical direction FLDPTNUM I Number of vertices in field outline GRA! 0 Gradient between tw o vertices LA!() 0 Temporary leaf po s iti o n in side A LADIFF! 0 Differen ce between most right and mo st left l eaves in s ide A LAMINU S 0 Most left leaf po sition in side A LAPLUS 0 Most right l eaf position in side A LB 10......., 0 T emporary l eaf position in side B LBDIFF! 0 Difference between most ri ght and most l e ft leav es in side B LBMINUS 0 Most left leaf position in side A LB PLUS! 0 Mo st right l eaf po s iti o n in s ide A LEAFLEN 0 Length of MLC l eaf LEAFNUM O Number of leaves in one side (26 for Varian 40 for Philip s) LEAFWID 0 Width of MLC leaf MAXMLCDIF! I Max of difference among l eaves MAXMLCFLD! I Max of MLC field size in one side MINMLCFLD! I Max of leaf stretch to opposite s ide MLAXIS I Initial A leaf position before optimization process MAXMLCDIF I Max. of difference among l eaves MRAXIS I Initial B l eaf position before optimization process OPTIERRFLAG O Indi cate type of e rr o r during o ptimiz atio n SA I O Sine value of colJima t o r ang l e XMAGIO O X-coord for field outline with offset (cm) XORG! 0 Original X-coord. for field outline (cm) XPARA! 0 Optimized leaf p os iti o n during o ptimizati on process YMAG !() 0 Y-coord for field ou tline with offse t (c m ) YMID I O Y-coord at mid point for each l eaf (c m) YORG! 0 Original Y-coo r d. for fie l d outline (cm) FILES_USED : None SU BRO UTINES_CALLED : CONVERT ANG Convert collimator angle in degree t o radian and get sine, cosine values AUTHOR : Siyong Kim REVISION HISTORY : t t [, -, -------------------------------------------------------------------------------------------------------t DIM LA !(O TO LEAFNUM-1), LB !(O TO L EAFNUM1 ), CCWX! (O TO FLDPTNUM+J) CCWYl(O TO FLDPTNUM+I) CALL CONVERT ANG FOR 1 =0 TO FLDPTNUM XORG!=FLDEDGE ( I.0)*0.01 'XORG!; OR I G TNAL CONTOUR DATA YORGt-FLDEDGE ( l 1 )*0.0 I XMAG !(l)=XORG !+CONTSHIFfX YMAG!(l)=YORG +CONTSHIFTY! 'YMAG!; SHIFTED CCWX!(I)=XMAG!(I)*CAI + YMAG!(l)*SA! 'CCWX!; ROTATED I N CCW DIREC TJON CCWY!(l)=YMAG !( l )*C A! XMAG!(l )*S A I NEXTI 'I ENSURE CLOSED CURVE ---=I CCWX!(FLDPTNUM+l)=CCWXl(O) CCWY!(FLDPTNUM+l)=CCWY!(O) 'II== I NITIAL LEAF POSIT I ON ---=I MLAXIS !=-40 MRAXJS!=40I J=LEAFNUM-1

PAGE 137

FOR l =OTO J LA!(l)=MLAXlS! LB !( l )=MRAXIS l NEXTI FOR 1=0 TO FLDPTNUM DY!=CCWY!(J+l )-C CWY!(I) IF DY I > 0.0 THEN FOR J= O TO LEAFNUM-1 128 '1--MIDDLE POSITION OF EACH LEAF ==I YMID! = A YDATA!(O,J) + 0.5*LEAFWID! IF YMID! >= CCWY!(I ) AND YMID! <= CCWY!(l+ l ) THEN GRA!=(CCWX!(I+ 1)-CCWX!(l))/(CCWY!(I+ l )-CCWY!(I)) XPARA!=GRA!*(YMTD!-CCWY!(l))+CCWX!(I) IF XPARA! > LA! ( J) THEN LA!(J )= XPARA END IF IF XPARA! < LB !( J ) THEN LB! ( J)=XP ARA! END IF END IF NEXTJ END IF rF DY!< 0.0 THEN FOR J =O TO LEAFNUM-1 'I=== MIDDLE POSITION OF EACH LEAF --=I YMID! = AYDATA!(O J) + 0.5*LEAFWID! IF YMID! <= CCWY!(I) AND YMLD! >= CCWY!(l+I) THEN GRA!=(CCWX!(I+l)-CCWX!(l))/(CCWY! ( I+l )-C CWY!(l )) XPARA!=GRA!*(YMID!-CCWY! ( l))+CCWX !( I ) IF XPARA! > LA !(J) THEN LA!(J)=XPARA! END lF [F XPARA! < LB! ( J ) THEN LB!(J)=XPARAI ENDtF END IF NEXTJ END IF IF DY!= 0.0 THEN FOR 1=0 TO LEAFNUM-1 'I=-MIDDLE POSITION OF EACH LEAF --1 YMTD l = A YDA TA !(0, J ) + 0.5*LEAFWID lF YMlD! = CCWY!(I) THEN XPARA!=CCWY!(l ) lF XPARA! > LA !(J) THEN LA! { J)=XPARA! END IF IF XP ARA! < LB !(J) THEN LB I (J)=XP ARA! ENDIF END IF NEXTJ END IF NEXTI 'I ADJUST THE ZEROS ---1 J = LEAFNUM -1 FOR l =OTOJ IF LA!(l)=MLAXIS! THEN LAl(l )=O.O END IF IF LB !(I)=MRAXIS THEN LB! ( I )=O.O END IF NEXT! 'I RESTRICTION CHECK AND FIT TO LlMlT VALUE ----1 'I=== HO RIZ O NT AL FIELD SIZE ---1 J =LEAFNUM-1 FOR l =OTO J

PAGE 138

IF LA (J ) > MAXMLCFLD THEN LA ( l ) =MAXMLCFLD OP'I'IERRFLAG = 77 END IF IF LA l( I ) <-MINMLCFLD! THEN LA !( l )=MIN MLCFLD OPTIERRFLAG = 77 END IF IF LB !(I) > MINMLCFLD THEN LB !(l)=MINMLCFLD OPTIERRFLAG = 77 END IF lF LB !( I ) < -MAXMLCFLD! THEN LB I ( l )=MAXMLCFLD OPTIERRFLAG = -7 7 END IF NEXTI 'I=== VERTICAL FIELD S I ZE ==I MLCMAXVER! = HI .E AFNUM!*LEAFWID! FLDMAXVER! = CCWY!(O) FLDMlNVER! = CCWY!(O) FOR l = 0 TO FLDPTNlJM IF CCWY!(I) > FLDMAXVER THEN FLDMAXVER! = CCWY!(I) END I F JP CCWY!(I) < FLDMlNVER THEN FLDMINVER! = CC WY!(I ) END IF NEXTI 129 IFFLDMAXVER > ML C MAXVER OR FLDMINVER MLCMAXVER! OR FLDMAXVER! < MLCMAXVER THEN OPTIERRFLAG = -100 END IF 'I-:= CHECK MAX DIFFERENCE AMONG LEAVES ==I J = LEAFNUM I LAPLU S! = LA! (O) LAMTNUS = LA !(O) LBPLUS! = LB !(O) LB M I NUS = LB (0) FOR I= I TO J IF LA!(I ) > LAPLUS THEN LAPLUS! = LA! ( I ) END IF IFLA!(t) < LAMTNUS! THEN LAMINUS! = LA! ( I ) END IF lF LB !(I) > LB PLUS I THEN LBPLUS = LB !( I ) ENDlF IF LB !(l) < LBMI NUS! THEN LBMINU S! = LB! (I) END IF NEXTI LADIFF! = LAPLUS LAMINUS LBDIFF! = LBPLUS! LBMINUS! IF LADIFF! > MAXMLCDIP! OR LBDlFF! > MAXMLCDIF I THEN IF OPl'IERRFLAG = -77 THEN OPTIERRFLAG = -3 77

PAGE 139

ELSEIF OPTIERRFLAG = -88 THEN OPTIERRFLAG = -388 ELSEIF OP'I'IERRFLAG = -99 THEN OP'I'JERRFLAG = -399 ELSEIF OPTIERRFLAG = -100 THEN ELSE OPTIERRFLAG = -33 ENO IF ENO IF IF LADIFF! > MAXMLCDIF! THEN FOR l=OTOJ OIFP = LAPLUS! LA !(I) IF OIFF! > MAXMLCOlF! THEN LA !( l ) = LAPLUS MAXMLCOIF! ENDIF NEXTI END IF IF LBDIFF! > MAXMLCOIF! THEN FOR l=OTOJ OIFF! = LB! ( l ) LBMINUS IF OIFF! > MAXMLCDIF! THEN LB !( I) = LBM1NUS! + MAXMLCOIF! ENO IF NEXTI END IF 130 'I--= ASSIGN THE OPTlMIZED POSITION TO LEAF DATA ---1 FOR 1=0 TO LEAFNUM-1 AXDATA!(O,I)=LA !(l) AXDA TA! ( 1,l )= LA !( I)+LEAFLEN AXDATA!(2,l)=LA !( I)+LEAFLEN AXDATAl(3.l)=LA!(I) AXDATA! ( 4 ,l)= LA!(I) BXDAT A !(0,l)=LB !(I) BXDATA !(l,l)=LB !{1)-LEAFLEN BXDATA!(2 l )= LB !(I)-LEAFLEN! BXDAT A!(3,l)=LB !(I) BXDATA !(4, l)=L8 !(1) NEXTI ERASE LA! LB!, CCW XI, CCWY I END SUB '[=_!'.__-=--~==-=-=-==-=-=-=-=--~ -----------------------------------------------------------------I SUBROUTINE: MANOPTIO I I SYNOPSIS: INCLUDE comrocs.inc IN CLUDE comir7.inc SUB MANO PTT ST A TIC 1300 I DESCRIPTlON : This subroutine enables manual MLC field editing I ASSUMPTIONS : This subroutine assumes valid input variables. I GLOBAL VARIABLES : AXDATA!O I X-coordinatedataofleaf A A YDATA!O I Y -coo rdinate data of leaf A CA! 0 Cosi n e value of collima t or angle CHCS O I An array of c haracter strings which make up main menu CONTSHIFTXI I MLC offse t in X-dir. (c m ) CURX 0 C urren t X of selected l eaf CURXS 0 Current X of se lected leaf for display on screen CURY! 0 Current Y of selected leaf

PAGE 140

t 131 CURYS 0 Current Y of selected leaf for display on screen INCR! 0 Increment for leaf change at each step LEAFID O Current leaf ID selected MLCOPTIMODE I Indicate type of fit ( l=auco/2=manual ) OLDSHIFfX! I MLC offset in X-dir (cm) ROW I lndex for first row in menu box SIDE$ 0 Indicates current leaf side (A or B) SA! 0 Sine value of collimator angle XORMODE I Rubber band mode on/off I FILES_USED : None SUBROUTINES_CALLED: t I I CONVERT ANG Convert collimator angJe in degree to radian and get sine, cosine values DELHCUR HALO, delete the crosshair c ursor DISDA TA Display isodose/phantom heading s and data DRWFLD Draw field outline and MLC KYB ALLKeysOFF Remove all key masks accept no events KYB ARROWKeysON Enable the arrow keys (U P, DN, LT. RTI KYBESCKeyON Enable the escape key (ESC) KYB.KeyON Enable a single key KYB KeyPoll$ Listen to the keyboard event queue return a token representation of all accepted events. Apply key masks, interpret special key s trokes KYB.RETKeyON Enable the return key (RET) LEAFDN Select lower leaf during manual fit LEAFL T Move leaf to left during manual tit LEAFR T Select l owe r leaf during manual fit LEAFUP Move leaf to right during manual fit MENUCLR Clear menu display sectio n MFLDDATA Get co llimator opening and field outline for MLC field MOVHCURABS HALO, move crosshair cursor to (X, Y) NOTELEAF Assign different co lor to selec ted leaf during leaf change in same side N01E2LEAF Assign cursor and different color to selected leaf during side change REDRA WMLC Redraw the changed leaf during manual fit SETXOR HALO, se t bubberband mode I AUTHOR : Siyong Kim I REVISION HISTORY : '[--------------------------------------------------------------------------------------...--------------------------------I INCR = .5 SIDE$= "A" LEAFID= 13 CHC$(0) =" MANUAL FIT" CALL MENUCLR LOCATE ROW+ I, 42 PRTNT "Use"; CHR$(27); "; CHR$(26); to m ove leaf edge ": LOCATE ROW + 2, 42 PRINT "Use"; CHR$(24);" "; CHR$(25);" to select leaf" ;"("; LEAFID ; '')." LOCATE ROW + 3, 42 PRINT "Use FI Lo choose leaf s ide(" ; SIDE$; ")." LOCATE ROW + 4, 42 PRINT USING"&#.##!"; "Use*/ to INC/DEC increment("; INCR! ; '').''; XORMODE= I 'I== SET INITIAL CURSOR POSITION ----1 CALL NOTELEAF CURX !=AXDA T A!(O,LEAFID 1) CURY!=O.S*(A YDATA! (O, LEAFID-l )+ AYDATA !(3, LEAFID 1 )) CURXS!=CURX!*CA!-CURY!*SA!

PAGE 141

132 CURYSl=CURY!*CA!+CURX!*SA! CALLS INITHCUR(HCURDIM!, HCURDIMI HCURCOLR ) CALLS MOVHCURABS(CURXS !, CURYS!) LOCATE ROW 3 PRINT USING "LEAF POSITION :<+##.##>"; CURX! CALL KYB .A RROWK eysON CALL KYB .ESC K eyON CALL KYB.RETKeyON CALL KYB KeyON (" Fl ") CAL L KYB.KeyON ("*") C ALL KYB KeyON("/") DO LO CA TE ROW 10 'IUser input -I SELECT CASE KYB K ey Poll$ CASE ESC EXIT DO CASE RET CALL REDRAWMLC CONTSHIFTX l=OL DSHIFl'X CASE Fl II IF SIDE$= "A" THEN SIDE$ = "B II ELSE S IDE$= "A" END IF LOCATE ROW+ 3, 69 PRINT "("; SLOE$; ")." CALL NOTE2LEAF CASE "U P XORMODE=I CALLS SETXOR(XORMODE) CALLLEAFUP CASE "ON" XORMODE=l CALLS SETXO R ( XORMODE ) CALLLEAFDN CASE LT XORMODE=I CALLS SETXOR(XORMODE) CALLLEAFLT CASE RT XORMODE=l CAILS SETXOR(XORMODE) CALLLEAFRT CASE"*" IF IN C R = 8! THEN OS .So und 104 6, I ELSElF !NCR!=. I THEN IN CR! = .25 ELSE INCR! = lNCR 2! END IF LOCATE ROW+ 4 71 PRINT USING "(#.##)"; !NCR !; CASE"/" IFIN CRI = 1 THEN OS Sound 1046, I ELSEIF INCR! = 25 THEN INCR! =. 1 ELSE

PAGE 142

l NCR = INCR 5 END CF LOCATE ROW+ 4, 71 PRINT USING "(#.##)"; INCR! ; END SELECT LOOP CALL KYB.ALLKeysOFF CALLS DELHCUR XORMODE=O MLCOPTIMODE=l CALL MFLDDATA CALLDRWFLD CALL DISDATA END SUB 133 I[-----====----~-_____ ._ -----------~----------------------------wwwmm-wwww-www www --www --www www wwwwwwwww-.wwm -www-w www-www-m--mw wwwwwwwwww-I SUBROUTINE: LEAFLT() I SYNOPS I S: INCLUDE comir.inc INCLUDE cotnir7.inc SUB LEAFLT STAT I C 14 00 DESCRrPTION: This subroutine move leaf to left direction during manual fit I ASSUMPTIONS: This subroutine assumes valid input variables. I GLOBAL_ VARIABLES: AXDATA!Q I X-coordinare data o f l eaf A BXDA TA!() I X -coo rdinate data of leaf B CA! 0 Cosine value of collimator angle CURX! 0 Current X of selected leaf CURXS 0 Current X of se l ec ted leaf for display on sc r een CURY! 0 Current Y of se l ected leaf CU RYS! 0 Current Y of selected l eaf for di s play o n screen INCR! 0 In crement for leaf change at each s tep LAD IF! 0 Limit l eaf position ca n be far to l eft direction t from most right leaf in side A LALIMIT! 0 Limit leaf position can be reached to l eft direction in side A LAPLUS 0 Most ri ght l eaf position in side A LBDCF! 0 Limit l eaf position can be far to left direction from most right leaf in side B LBLIMIT! 0 Limit leaf position can be reached to left direction in s id e B LB PLUS 0 Mo s t right leaf position in side A LEAFID O Current leaf ID selected MAXMLCDIF! I Max of difference among l eaves MINMLCFLD I ( Max of leaf stretc h to opposite side OPPX! 0 Leaf position of opposite leaf ROW I Index for fust row in menu box SIDE$ 0 Indicates curren t l eaf s i de ( A or 8) SA! 0 Sine value of collimator angle I I FILES_USED: None I SUBROUTINES _C ALLED : MOVHCURABS HALO, move crosshair cursor to (X,Y) AUTHOR : Siyong Kirn

PAGE 143

134 REVlSION_lllSTORY: [-----. ---------------------==-=-=-::=-========== -~------------,;;,;.___ ----' I 'I-GET L IMI T LEAF POS ITI ON -I J = LEAFNUM l LAPLUS = AXDATA!(0,0) LBPLUS = BXDATA !(O,O) FOR I = I TOJ (F AXDA TA !(O,I) > LAPLUS THEN IF 1 <> LEAFID J THEN LAPLUS = AXDATA!(O I ) END IF END IF IF BXDATA!(O.I) > LBPLUS! THEN IF I <> LEAFID 1 THEN LBPLUS! = B XDATA!(O, I ) ENDlF END IF NEXTI LADIF I = LAPLU S! MAXMLCDIF LBDIF = LB PLUS I MAXMLCD I F! 'I = SIDE B ==I IF LBDlF! > -MAXMLCFL D! THEN LBLIMIT! = LBDIF ELSE LBLIMJT = -MAX MLCFLD END IF 'I=-SIDE A -1 OPPX! = BXDATA! (O, LEAFID-1) IF OPPX! > L AD IF! THEN LALlMIT = OPPX! ELSE LALIMIT = LADIF! END IF IF LALIMIT < MINMLCFLD! THE N LALIMIT I = MTNMLCFLD END IF 'I==== GET CHANGED LEAF POS ITI ON ==I IF SIDE$= B THEN CURX! = CU RX INCR! IF CURX! <= LBLIMIT THEN OS.So und 262, I CURX! = LBLIMIT! END IF ELSE CURX! = CURX! INCR I IF CURX! <= LALIMIT! THEN OS.Sound 262, l CURX! = LALIMIT I END IF ENDIF CURXS!::::CURX!*CA!-CURYl*SA! CURYS!=CURY!*CA!+CURX!*SA! CALLS MOVH CU RABS (CURXS!, CU RY S!) LOCA1E ROW 3 PR I NT USING "LEAF POSITION :< t## .##>"; CURX! END SUB [=--=-=-=-===:-= =--==----==----======-------------------------------------------------------------------

PAGE 144

I SUBROUTINE: LEAFUP() I SYNOPSIS: I INCLUDE comir.inc INCLUDE comir7.inc SUB LEAFUP ST A TIC 1500 I DESCRIPTION : This subroutine select upper leaf during manual fit I I ASSUMPTIONS : Thi s s ubr o utine assumes valid input variables. t I GLOBAL VARIABLES : AXDATA!O IX-coordinate data of leaf A A YDATA!O I -coordinate data of leaf A BXDATA! O I X-coordinatedataofleafB BYDATA!() I -coordinate data of leaf B CA! 0 Cosine value of collimator angle CURX! 0 Current X of se l ected leaf 135 CU RXS 0 Current X o f selected leaf for display on scree n CURY! 0 C urrent Y of se le cted leaf CUR YS 0 Current Y of selec t ed leaf for display o n scree n LEAFID O Curren t l eaf ID selected LEAFNUM O Number of leaves in one si de (26 for Varian 40 for Philip s) ROW I Index for first row in menu box SIDE$ 0 Indi cates c urrent leaf side ( A or B ) SA! 0 Sine value of collimato r angle I I FILES_USED: None I SUBROUTINES_CAI,LED : MOYHCURABS HALO move c ro sshai r curso r t o (X,Y) NOTELEAF Assign different colo r t o se l ected leaf I during leaf change in s am e side I AUTHOR : Siyong l(jm I REVlSlON HlSTORY : I(--_ _______ ________ =====---------------------------------------------------------1 IF LEAFID >= LEAFNUM THEN LEAFID = I ELSE LEAFID = LEAFID + 1 ENDIF IF SIDE$ = B THE N CURY!=0 5*(BYDATA!(O,LEAFID-1)+BYDATA!(3 LEAFID-l) ) CURX!=BXDA TA !(O, LEAFID-1 ) ELSE CURY!=0.5*(AYDATA!(O,LEAFID-l)+A YDATA! (3, LEAFID-I )) CURX !=AXDA TA !(0, LEAFID 1 ) END IF CALL NOTELEAF CURXS!=CURX!*CA! -C URY!*SA! CURYS!=CURY!*CA!+CURX!*SA! CALLS MOYHCURABS(CURXS!, CURYSI ) LOCATE ROW 3 PRINT USING "LEAF POSITION :< +## ##> "; CURX! LOCATE ROW + 2, 42 PRINT Use" ; C HR$ (2 4) ;" "; CHR$ ( 25 ); "to se lect leaf ";"("; LEAFID : ")."

PAGE 145

136 END SUB I [-: =-----------------------------------------------------------------------------------------------------------------' SUBROUTINE: LEAFRT O I SYNOPSIS : INCLUDE comir.inc INCLUDE comir7.inc SUB LEAFRT ST A TIC 1600 ' DESCRIPTION : This s ubroutine move leaf t o left di rection during manual fit ASSUMPTIONS : Thi s s ubroutin e assumes valid input variables. I GLOBAL_ V ARlABLES : AXDATA! O IX -coo rdinate data of leaf A BXDA TA 1 0 1 X-coordinate data of l eaf B CA! 0 Co s ine value of collimator ang l e CURX! 0 Current X of se l ected leaf CURXS 0 Current X o f selected leaf for di sp lay o n scree n CUR Y 0 C urrent Y of se l ected l eaf CURYS! 0 Current Y of selected leaf for di sp la y o n scree n INCR 0 In c rement for leaf change at each step LADIF 0 Limit l eaf pos i tion can be far t o right djrection from most l e ft leaf in s ide A LALIMJT 0 Limit l eaf p osi ti o n can be reached t o ri g ht direction in s ide A LAMlNUS 0 Mo s t l eft l e af po s iti o n in s ide A LBDlF I O Limit leaf po s iti o n c an be far t o right direction fr o m most left leaf in s ide B LBL[MIT! 0 Limit leaf position c an be reached t o right djre c ti o n in s ide B LBMlNUS! 0 M ost left leaf position in side B LEAFID O Current leaf ID se lec t ed MAXMLCDlF! I Max of differen ce among leaves MINMLCFLD I M ax of leaf stretch to o ppo s ite si d e OPPX 0 Leaf position of o ppo s ite leaf ROW I I ndex for first row in m e n u box SIDE$ 0 I ndi ca t es curre nt leaf s ide (A or 8 ) SA! 0 Sine value o f co llimat or angle I ALES USED : None I SUBROUTINES_CALLED: MOV H CU RABS HALO ,n o v e crosshair cursor to ( X ,Y) AUT H OR : Siyong Kim REVIS I ON HISTORY : I [ ----------:=::;-::= =-= :::-=-=: ======= ,==== -----------=-----------------------------------------------------' I '1GET LIMlT LEAF POS I TION --=I J=LEAFNUM 1 LAMINUS = AXDATA !(O,O) LBMINUS = BXDATA !(O,O) FOR I = I TOJ fF AXDA TA !(0,1) < LAM IN US! THEN lF I <> LEAFID I THEN LAMINUS! = AXDATA! (O, I )

PAGE 146

END IF END IF IF BXDA TA !(0,I) > LB MINUS! THEN IF I <> LEAFID 1 THEN LBMINUS! = BXDATA! (O, I ) END IF END IF NEXTI LAD IF = LAMINUS I + MAXMLCDIF! LBDIF! = LBMINUS! + MAXMLCDIF! '1---S I DE A ==I IFLADIF! MINMLCFLD THEN LBLIMIT = MINMLCFLD END IF 'IGET CHANGED LEAF POSITION ==I IF SIDE$= "A" THEN CURX! = CURX! + INCR IF CURX >= LALJMIT! THEN OS.Sound 262. 1 CURXI = LALIMIT! END IF ELSE CURX! = CURX! + INCR! IF CURX! >= LBLIMIT! THEN OS.S o und 262, l CURXI = LBLIMIT! END IF END IF CURXS!=CURX!*CA!-CURYl*SA! CURYSl=CURY!*CA!+CURX!*SA! CALLS MOVHCURABS (CURXS!, CURYS!) LOCATE ROW. 3 PRINT USING LEAF POSITION :": CURX! END SUB 137 '[------------------===-===-=-==-----===-------------------------------------------------I SUBROUTINE: LEAFDN () SYNOPSIS: INCLUDE comir.inc INCLUDE comir7.i n c SUB LEAFDN STATIC 1700 I DESCRIPTION : This s u broutine se l ect l owe r l eaf during manual fit I I ASSUMPTIONS : This subroutine assumes valid input variables.

PAGE 147

138 I GLOBAL_ VARIABLES: AX.DATA!() J X-coordinatedataofleaf A A YDATA!() l Y-coordinate data of leaf A BXDATA !() IX -coo rdinat e data of leaf B B YDA TA!() I Y-coordinate data of leaf B CA! 0 Cosine value of co llimator angle CURX! 0 Current X of selected leaf CURXS 0 Current X of selected leaf for display on screen CURY! 0 Currenl Y of selec ted leaf CUR YS 0 Current Y of se le cted leaf for display on sc r een LEAFID O Current leaf ID selected LEAFNUM O Number of leaves in one side (26 for Varian, 40 for Philips) ROW I Index for first row in 1nenu box SIDE$ 0 Indicates c urrent leaf side (A or B) SA! 0 Sine value of collimator angle I FILES_USED: None I SUBROUTINES_CALLED: MOVHCURABS HALO, move cross hair cursor to (X, Y) NOTELEAF Assign different color to se l ected leaf during leaf change in same side AUTHOR: Siyong Kim I REVISION_HISTORY : I [ ----= ---------------------------=-----------------------. ----------------------==----------------I IF LEAFID <= I THEN LEAFID = LEAFNUM ELSE LEAFID = LEAFID 1 END IF IF SIDE$= "B" THEN CURYl=0.5*(BYDATA!(O,LEAFLD-J)+BYDATA!(3,LEAFID-J)) CURX!=BXDA TA !(O,LEAFID1 ) ELSE CURY!=0.5*(A YDATA!(O,LEAFIDl)+A YDATA!(3,LEAFID-l)) CURX!=AXDATA!(O,LEAFID-1) END IF CALL NOTELEAF CURXS!=CURX!*CA!-CURY!*SA! CURYS!=CURY!*CA!+CURX!*SA! CALLS MOVHCURABS(CURXS!, CURYS!) LOCATE ROW, 3 PRINT USING "LEAF POSITION:<+##.##>"; CURX! LOCATE ROW + 2, 42 PRINT "Use"; CHR$(24); 11 "; CHR$(25); 11 to select leaf";"(''; LEAFID; '')." END SUB '[-----------------------------------------------------------------------------=----------------------------------------' SUBROUTINE: REDRAWMLCO SYNOPSIS: INCLUDE comir.inc INCLUDE comir7 .in c SUB REDRAWMLC STATIC 1800 DESCRIPTION: Thls subroutine redraws MLC leaf changed during manual fit

PAGE 148

139 I ASSUMPTIONS: Thi s s ubr o utine as s umes valid input variables I GLOBAL_ V ARlABLES: AXDATA!O I X-coordinatedataofleaf A AXDATAS !O I X-c oo rdinate data of leaf A for display on screen A YDA TA !0 I Y-coordinate data of leaf A A YDA T AS !O I Y-coordinate data of leaf A for display on screen BAX.IS I Lower left Y world coordinate BXDATAI O I X-coordinate data of leaf B BXDATAS! () IXcoordinate data of leaf B for display on screen BYDATA!() I Y-coordinate data of leaf B B YDA T AS !0 I Ycoord inate data of leaf B for display on scree n CA! 0 Cosine value o f colli mat or angle CLROLD I Original colo r index for graphi cs LAX.IS! I Lower left X world coordinate LEAFID O Current leaf ID selected MLCOPTIMODE I Indicate type of fit (l=auton=manuaJ) NOIBCOLR 1 Color index f o r se l ected leaf SA! 0 Sine value of collimator angle SIDE$ 0 Indicate s curre nt leaf side ( A or B ) XORMODE l Rubber band mode on/off I FILES_USED: None I SUBROUTINES CALLED : DISDAT A Display isodose/phantom beadings and data DRWFLD Draw field outline and MLC INQCLR HALO inquire color index at (X,Y) MFLDDA TA Get collima tor opening and field outline for MLC field MOVABS HALO m ove graphics cursor to (X Y) MOVHCURABS HALO, move crossha ir cursor to (X, Y) POL YLNABS HALO, draw a polygon specified by absol ute points SETCOLOR HALO se t active co lor SETXOR HALO set bubberband mode I AUTHOR : Siyong Kim I REVISION HISTORY : '(--------------------------------~==-----------------------------------------------------------------~-------------........... ----------------I I '11== REDRAW MLC LEAVES ---1 XORMODE=O CALLS SETXOR ( XORMODE) IF SIDE$="A'' THEN AXDATA !( O LEAFID l )=CURX! AXDATA !( l LEAFID-l)=AXDATA!(O, LEAFID-l )+ LEAFLEN! AXDATA !(2, LEAFID-l)=AXDATA! (O, LEAFID l ) +LEAFLEN! AXDATA!(3, LEAFID l)=CURX! AXDATA l( 4, LEAFID-l ) =CURX! ELSE BXDATA!(O, LEAFID-l)=C1JRX! BXDATA! ( l LEAFID-l)=BXDATA!(O LEAFID-1 )LEAFLEN! BXDATA!(2, LEAFID -l)= BXDATA !(O, LEAFID 1 )LEAFLEN! BXDATA! (3, LEAFID-l)=CURX! BXDATA!(4, LEAFID l)=CURX END IF MLCOPTIMODE = 1 CAIL MFLDDATA CALLDRWFLD CALL DISDA TA J=LEAFID -J CALLS SETCOLOR ( NOTECOLR ) IF SIDE$="A THEN CALLS MOVABS(AXDATAS! (O, J). A YDATAS! (O, J ))

PAGE 149

140 CALLS POLYL N ABS ( AXDATAS! (O, J ), AYDATAS!(OJ),5) ELSE CALLS MOVAB S(B XDATAS !(O, J ), BYDATAS! (O ,J )) CALLS POL YLNABS ( BXDATAS !(0, J ), BYDA TAS !(0,J),5) END IF XORMODE = l CALLS SETXOR (XO RMODE ) CURXS! =C URX! *CA!-CU RY !*S A CURYS!=CURY!*CA !+ CURX!*SA! CALLS MOVHCURAB S(CU RXS !, CU RY S!) C ALLS INQCLR(LAXI S!, BAXl S!, CL ROLD ) C ALLS SETC OLOR (C LROLD) END SUB '[--------------------------------------------------==-------------------------------------------------------' SUBROUTINE : NOTELEAF O SYNOPSIS : lNCLUDE comir.inc INCLUDE comh-7.inc SUB NOTELEAF STA TI C 1900 DESCRIPTION: Thi s s ubr o utin e assig n diffe rent co l o r to selec t ed l eaf during l eaf c han ge in same side ASSUMPTIONS : Thi s subroutine assumes valid input variables. GLOBAL VAR IABLE S: AXDATAS! O IX -coo rdinat e data o f l eaf A f o r di s play o n scree n A YDA T AS O I Y -coor dinate data of l eaf A f o r di s play o n scree n BXDA T AS !() I Xcoo rdinate data of leaf B f or display on scree n BYDATAS! O I Y-coordinate data ofleafB f or disp l ay o n scree n LEAFCOLR I Color ind e x for MLC leaf LEAFDNID O Lower l eaf 1D from c urrent l e af selec t ed LEAFID O Current l e af ID se l ecte d LEAFNUM O Number o f l e ave s in one side (26 for Varian 40 for Philip s) LEAFUPID O Upper l eaf ID from c urr ent leaf se l ec t ed NOTECOLR I Color index for se l ected leaf S IDE$ 0 In dicate s curren t leaf s id e ( A or B) XORMODE I Rub ber band m ode on/off FILES_USED : None SUBROUTINES_CALLED: DELHCUR HALO, d e lete cross hair c ur so r MOY ABS HAL O, move graphi cs cursor t o (X, Y) POL YLNABS HALO draw a polyg o n spec ified by a b sol ut e points SETCOLOR HALO se t active co l or SETXOR HALO set bubberband mode AUTHOR : Siyong Kim REVISION HISTORY : '(----------~====-------------------------------------------------------------~ ------------------------------I '1---= NO'I'IFY S ELE CTED LEAF --=I CALLS DELHCUR XORMODE=O CALLS SETXOR(XORMODE) lF LEAFID = I THEN

PAGE 150

LEAFUPID=2 LEAFDNID = LEAFNUM ELSEIF LEAFID = LEAFNUM THEN LEAFUPID= 1 LEAFDNID = LEAFNUM I ELSE LEAFUPID = LEAFID + 1 LEAFDNID = LEAFID 1 END IF J = LEAFID 1 JUP=LEAFUPID-1 JDN=LEAFDNID-1 lF SIDE$="A" THEN CALLS SETCOLOR(LEAFCOLR) 141 CALLS MOY ABS(AXDATAS!(O,JUP), A YDATAS!(O,JUP)) CALLS POL YLNABS(AXDATAS!(O,JUP), AYDATAS!(O,JUP),5) CALLS MOYAB S(AXDATAS!(O.JDN), AYDATAS!(O,JDN)) CALLS POL YLNABS(AXDA TAS !(0,JDN), A YDA TAS 1(0, J DN),5) CALLS SETCOLOR(NOTECOLR) CALLS MOY ABS(AXDA TAS !(0,J), A YDA T AS !(O, J )) CALLS POL YLNABS(AXDATAS !(0, J ), A YDATAS !(0,J),5) CALLS SETCOLOR(LEAFCOLR) ELSE CALLS SETCOLOR(LEAFCOLR) CALLS MOV ABS(BXDATAS!(O,JUP), BYDATAS!(O,JUP)) CALLS POL YLNABS(BXDATAS! (O,JUP), BYDATAS!(O,JUP),5) CALLS MOVABS(BXDATAS!(O,JDN), BYDATAS!(O,JDN)) CALLS POL YLNABS(BXDATAS 1(0, JDN) BYDATAS !(O,JDN),5) CALLS SETCOLOR(NOTECOLR) CALLS MOYABS(BXDATAS !(O, J ), BYDATAS!(O,J)) CALLS POLYLNAB S(BXDA TAS !(O, J ). BYDATAS!(O,J),5) CALLS SETCOLOR(LEAFCOLR) END IF XORMODE=l CALLS SETXO R (XORMODE) END SUB I [ ------------------------------------~-------------====-------------------------------------------------------------' I SUBROUTINE: NOTE2LEAF () ' SYNOPSIS: INCLUDE comir.inc INCLUDE comir7 .inc SUB NOTE2LEAF ST A TIC 2000 I DESCRIPTION: Thi s subroutine move cursor and assign different color t o selected leaf during leaf change betwee n two different sides I ASSUMPTIONS: This subroutine assumes val id input variables. I GLOBAL_ VARIABLES: AXDATA!O IX-coordinate data of leaf A AXDATAS !0 I X-coordinate data of leaf A for display on sc reen A YDA T AS !O I Y-coordinate data of leaf A for display o n screen BXDATA !() IX -coord inat e dataofleafB BXDATAS!O IX -coordinate dat a of l eaf B fo r display on scree n BYDATAS !O I Y-coordinate data o f leaf B for display on scree n CA! 0 Cosine value of colli mator angle CURX! 0 Current X of se le cted leaf CUR.XS! 0 Current X of se l ected l eaf for display on screen

PAGE 151

1 42 CURY! 0 Current Y of se le c ted leaf CUR YS 0 Current Y o f se l ected leaf for display on screen LEAFCOLR I Color index for MLC l eaf LEAFID O Current leaf ID selected NOlECOLR I Color index for se l ected leaf ROW I Index for first row in menu box SA! 0 Sine value of collima t or ang l e SIDE$ 0 Indicates c urrent leaf side ( A o r 8 ) XORMODE I Rubber band mode on/off I FILES USED: No n e I SUBROUTINES _CAL LED : DELHCUR HALO del e t e c rosshair curso r MOY ABS HALO move graphics cursor to ( X Y) MOVHCURABS HALO. move crosshair c urs o r to ( X Y ) POL YLNABS HALO draw a polygon spec ified by absolute points SETCOLOR H ALO se t active color SETXOR H ALO se t bubberband mode AUTHOR : Siyong Kim I REV I SION HI STORY: '[ -------------------==-==-=-=-:-=-=-=--==-=-===---------------==-------. ----------------------' 'INOTIFY SELEClED LEAF -CALLS DELHCUR XORMODE--0 CALLS SETXOR ( XORMODE ) J=LEAFID 1 IF SlDE$="A" THEN CALLS MOY ABS ( AXDATAS !(0,J), A YDA TAS !(0,J)) CALLS SETCOLOR(NOTECOLR) CAL L S POL YLNABS(AXDA T AS !(0,J). A YDA TAS !(O, J ),5) CALLS SETCOLOR ( LEAFCOLR ) CALLS MOVABS(BXDATAS! (O, J ), BYDATAS !(O, J )) CALLS POLYLNABS ( BXDATAS !(O, J ). BYDATA S!(O,J),5) ELSE CALLS MOVABS(BXDATAS!(O J ), BYDATAS! (O J )) CALLS SETCOLOR ( NOTECOLR ) CALLS POL YLNABS(BXDATAS! (O, J ), BYDATAS !(O, J) ,5) CALLS SETCOLOR ( LEAF C OLR ) CALLS MOVABS ( AXDATAS!(O J ), A YDATAS! (O, J )) CALLS POL YLNABS ( AXDATAS (0, J ), A YDATAS !(0, J ),5) END IP XORMODE=l CA I .LS SE T XOR ( XORMODE) IF SIDE$= A" THEN CURX!=AXDATA! (O, J ) CURXS!=CURX !*C A!-CURY !S A CU R YS != CURY !*C A!+CURX!*SA! CALLS MOVHCURABS (C URXS !,CU RYS! ) ELSE CURX!=BXDATA !(O ,J ) CURXS!=CURX!*CA!-CU R Y!*SA CURYSl=CURY!*CA +CURX !* SAI CALLS MOVHC U RABS (C URXS !,CURYS !) ENDIF LOCATE ROW. 3 PRINT USING LEAF POS I TION :< +## .##>"; CU RX END SUB '[=-=-=======-===,==-=-=---=-=-=-==----==-=-=-====---------------------------------------------I SUBROUTINE : MLCSETMEN U ()

PAGE 152

' SYNOPSIS: INCLUDE comrocsjnc INCLUDE comir.inc SUB MLCSETMENU STATIC 2300 DESCRIPTION: This subroutine display s MLC field editor 1nenu ASSUMPTIONS: This subroutine assumes valid input variables GLOBAL_ V ARlABLES : CALPTNUM I Number of calculation points 143 CHC$0 0 An array of character strings which 1nake up main menu DPHFLAG I Are depths defined (O=no, !=yes) MLC:SEl'FLAG I MLC is set? (O=no, l=yes) WDGANG O Wedge angle (degrees) FILES_USED: None SUBROUTINES_CALLED: BLDMENU Display menu function keys & active keys (arrows, + -,*/, PgUp PgDn ) AUTHOR : Siyong Kim I REVISION_HlSTORY : [ ---------------------------------,== == ------------------------------------------------------------------------------------' I ERASECHC$ CHC$(0) = MLC FIELD EDITOR '' CHC$(1) = "Autofit" CHC$(2) = "Autofit-Under" CHC$(3) = "Autofit-Over" CHC$(5) = "Manual Fit IF WDGANG = 0 THEN CHC$(6) = "Coll Angle" END IF CHC$(9) = "Offset X" CHC$(10) = "Offset Y" IF MLCSETFLAG = l THEN CHC$(7) = "Cale Points" ENDlF IF CALPTNUM > 0 THEN CHC$(1 l) = "Point Depths" END IF IF DPHFLAG = I THEN CHC$(17) = "ON" ENDlF CALL BLDMENU END SUB [------===-------------------------------------------------------___________________________ _ __ _____________________ __________ ___ SUBROUTINE : AUTOFIT () SYNOPSIS: INCLUDE comrocs.inc CNCLUDE co1nir.inc SUB AUTOFIT STATIC 2600 I DESCRIPTION: This subroutine carry out geometric optimization for MLC field

PAGE 153

144 automatically I ASSUMPTIONS: This subroutine assumes vali d input variables I GLOBAL VARIABLES : CONTSHIFfXI I MLC offset in X-dir (c m ) MLCFLAG I ML C fi e l d editor i s o n (O=no, 1 -yes) MLCOPTlMODE I Indi ca te type of fit ( 1 =au t on=manu al ) OLDSHIF'fX! l ML C o ff se t in X-dir (c m ) FILES USED : None I SUBROUTINES_CALLED : DISDA TA Display i so d ose/p han1 o m h eadings and da ta DRWFLD Draw field o utline and MLC MFLDDA TA Get co llimat o r openi n g and field ou tline for MLC field MLClNJ Se t ML C dimension and initi al l eaf p osition ML C OPT Search geo m e tricall y opti 1n ized ML C lea f p osition I AUTHOR : Siyong Kim I REVISION HISTORY : [ -----------------------------=----,=---------------------------------------==--------------------------------------I I OLDSHIFTX !=CON TSlflFIX IF MLCFLAG = 1 THEN CALLMLCINl CALLMLCOPT MLCOPTIMOD E = 1 CALL MFLDDA TA CALLDRWR.D CAL L DISDA T A ELSE OS.Sound 261, 2 END IF CONTSHIF I'X !=OLDSHIFfX! END SUB [-- --==== --------------M ,_ -------------=-=-=-=-===-==-=-======c----... -~-----------------------------I SUBROUTINE : MANUFIT O SYNOPS I S: INCLUDE co mr ocs. in c INCLUDE comir.inc SUB MANUFIT STATIC 2700 I DESCRIPTION : t Thi s s ubroutine c arry ou t geometric optimization f o r MLC field manuall y ASSUMPTIONS : Thi s s ubroutine assumes valid input variables I GLOBAL VARIABLES : CON TSHIFl'X I ML C offset in X-dir (c m ) MLCFLAG I ML C fi e ld editor is oo (O=oo I =yes) ML CO PTIMOD E I Iad icate type of fit ( l =auto/2=manual) OLDSHIFrX! I MLC offset in X-dir (cm) ML CSTART I Ind icate specific type of MLC edit ( I =a ut o fit, 2=au t ound er, 3=auto-over 4=manual) I FILES _USE D : None

PAGE 154

145 I SUBROUTINES_CALLED: DISDA TA Display isodose/p bant om headings and data DRWFLD Draw field o utJine and MLC MANOPTI Enables manual MLC field editing MFLDDA TA Get co llimat o r opening and field outline for MLC fie ld MLCIN1 Set MLC dimension and initial l eaf position MLCOPT Search geometrically optimized MLC l eaf position I AUTHOR : Siyong Kim REVISION_HlSTOR Y : '[---------------------------------------------==-----=-===== --=--~ ------------------------------------------------I I OLDSHJFfXl=CONTSHIFrX! fF MLCFLAG = I THEN IF MLCST ART= 0 THEN CALLMLCINl CALLMLCOPT MLCOPTIMODE = I CALL MFLDDATA CAI.LDRWFLD CALL DISDATA END IF CALL MANOPTl ELSE OS .Sound 261, 2 END IF CONTSH1FI'X !=OLDSHIFTX END SUB '[---,=--------:=--------------~-------------:====----------------------------------------------------------------I SUBROUTINE: MLCOPTUNDER () SYNOPSIS: TNCLUDE comir.inc TNCLUDE comir7 inc SUB MLCOPTUNDER STA TIC 2800 I DESCRIPTION: This subro utin e search geometrical l y underbl ocked MLC l eaf position I ASSUMPTIONS: I This subroutine assumes valid input variables. GLOBAL_ VARIABLES: AXDATA!O I X-coordinatedataofleaf A A YDATAIO J Y-coordinate data of leaf A BXDATA!Q IX -coordinate data of leafB CA! 0 Cosine value of colli mat or angle CCWX!() 0 Temporary X-coord. for field outline rotated opposite to collimator rotation CCWY !() 0 Temporary Y-coord. for field outline rotated opposi t e to co llimat o r rotation CONTSHIFI'X! I MLC offset in X-dir. (c m ) CONTSHIFI'Y I MLC offset in Y-dir. (cm) DIFF! 0 Diff ere n ce between longest leaf and each one DY! 0 Difference in Y between two consecutive vertices (cm) FLDEDGEO I Irregular field outline coordinates (cm I 00) FLDMAXVER! 0 Highest p oin t of outline in vertical direction FLDMINVER! 0 Lowest point of outline in vertical direction FLDPTNUM I Number of vertices in field outline GRAI O Gradient between tw o vertices LA!O O Temporary leaf position in s id e A LADIFF! 0 Difference between most right and most l eft leaves in side A LAMINUS 0 Most left leaf position in side A

PAGE 155

146 LAPLUS 0 Most right leaf position in side A LB!() 0 Temporary leaf position in side B LBDIFF! 0 Difference between most right and most l eft leaves in side B LBMINUS! 0 Most l eft leaf position in side A LB PLUS! 0 Most right leaf position in side A LEAFLEN 0 Length of MLC l eaf LEAFNUM O Number of lea ves in one side (26 for Varian, 40 for Philips) LEAFWID! 0 Width of MLC leaf MAXMLCDIF! I Max of difference among leaves MAXMLCFLD I Max. of MLC field size in one s id e MINMLCFLD I Max of leaf stretch to opposite side MLAXIS I I Initial A l eaf p osition before optimization process MAXMLCDIF! I Mnx. of difference among leaves MRAXIS I Ini tial 8 l eaf po sition before optimization process OPI'IERRFLAG O Indicate type of erro r during optimizatlon SA! 0 Sine val u e of collimator angle XMAGI() 0 X-coord. for field outline with offset (cm) XORGI O Original X-coord. for field outline (cm) XPARA! 0 Optimized leaf position during optimization process YBOT! 0 Y-coord at bottom point for each l eaf (cm) YMAG!O O Y-coord. for field outline with offset (cm) YORGI O Original Y-coord. for field outline (cm) YTOPI O Y-coord. at top point for each leaf (cm) FILES_USBD: None SUBROUTINBS_CALLED: CONVERT ANG Convert collimator angle in degree to radian and get s ine cosine val u es ' AU1HOR: S iy o n g Kim REVISION_HISTORY: '[--------------------------------------------. ----------------------------------------------------------------------I l DIM LA!(O TO LEAFNUM-1), LB!(O TO LEAFNUM-1), CCWX! ( O TO FLDPTNUM+l), CCWY!(O TO FLDPTNUM+l) 'I== TOP A ND BOITOM PO SIT IO N OF EACH LEAF ===I CALL CONVERT ANG FOR I=O TO FLDPTNUM XORG!=FLDEDGE(I 0)*0.01 'XORG!; ORIGINAL CONTOUR DATA YORG !=FLDEDGE(I, 1)*0.0 I XMAGl(I)=XORG!+CONTSHIFTX! XMAG!; PROJECJ'EO AND SHIFIED YMAG!(l)=YORGl+CONTSHIFTY! 'YMAG!; SHJFIED CCWX!(l)=XMAG!(I)*CAI + YMAG!(I)*SA! 'CCWX!; ROTATED I N CCW DIRECTION CCWYl(I)=YMAGl(I)*CA! XMAGl(l)*SA! NEXTI 'I== ENSURE CLOSED CURVE =---1 CCWX!(FLDPTNUM+l)=CCWX!(O) CCWYl(FLDPTNUM+l)=CCWY!(O) 'I== INITIAL LEAF POSITION ==I MLAXIS I = -40 MRAXJS! = 401 J=LEAFNUM-1 FORI=OTOJ LA !(l)=MLAXIS LB l(l)=MRAXIS NEXT I FOR 1 =0 TO FLDPTNUM DY!=CCWY!(l+l) CCWY!(I) IF DY! > 0 0 THEN 'I---= COMPAR WITH TOP POSITION -l FOR 1=0 TO LEAFNUM-1 YTOP! = A YDATAl(3,J) IF YTOP >= CCWY!( I ) AND YTOP! <= CCWY!(l+1) THEN

PAGE 156

147 GRA !=(C CWX (l + 1 ) -C C WX (I )) / ( CCWY !( I + 1 )CCWY !( I )) XPARA =GRA !*( YTOP CC WY!(l )) +CCWX l (I ) IF XP ARA > LA !( J ) THEN LA !( J )= XPARA ENDIF IF XPARA < LB !( J ) THEN LB !( J )XPARA ENDIF END IF NEXTJ I=== COMPAR WITH BOTTOM POSITION ====I FOR J =O TO LEAFNUM-1 YBOT I = AYDATA!(O, J ) IF YB O T >= CCWY! ( I) AND YBOT! <= CCWY (l + l ) THEN GRA !=( CCWX!(l+ 1 ) -CCWX (l ) )/ ( CCWY!(I+ 1 )CCWY (I) ) XP A RA! = GRA *(YBOT! -C CWY! ( I )) + C CWX! ( l ) IF XPARA > LA !( J ) THEN LA!(J )= XPARA! END IF IF XPARA I < LB !( J ) THEN LB !( J )XPARA E N D IF END IF NEXTJ END IF IF DY I < 0 0 THEN 'I -COMPAR W I TH TOP POS I T I ON--1 FOR J=O TO LEAFNUM1 YTOP! = AYDATA!(3 J) IF YTOP! < = CCWY!(I) AND YTOP! >= CCWY!(l+l) THEN GRA !=( CCWX!(I+l )CCWX!(l) ) / ( CCWY!(I+ l ) -CCWY!(I )) XPARA! = GRA!* ( YTOP !-C CWY !( l )) +C C WX (I ) IF XPARA! > LA !( J) THEN LA !( J )= XPARA END IF IF XPARA < LB !( J ) THEN LB ( J ) =XP ARA END IF ENDIF NEXTJ I COMPA R WITH BOTTOM POS I TION == I FOR J =O TO LEAFNUM 1 YBOT! = A YDATA! ( O J) IF YBOT <= CCWY !( I) AND YBOT! > = CCWY !( T +I ) THEN GRA = ( CCWX! ( I + 1 )CCWX! ( l )) / ( CCWY !( I+ 1 )CCWY !( I )) XPARA!=GRA *(YBOT !CCWY !( l ) ) + CCWX! ( I ) IF XPARA! > LA !( J ) THEN LA! ( J )= XPARA! END IF IFXPARA! < LB !( J ) THEN LB !( J )= XPARA END IF END IF NEXTJ ENDIF IF DY! = 0.0 THEN 'I COMPARE WITH TOP POSITION ---1 FOR 1 =0 TO LEAFNUM 1 YTOP = AYDATA! (3, J ) IF YTOP = CCWY!(l ) THEN XPARA != CCWY (I) IF XPARA! > LA (J ) THEN LA !( J )= XPARA ENDIF IF XP ARA! < LB l ( J) THEN LB !( J )= XPARA EN D IF END IF NEXT J

PAGE 157

148 'ICOMPARE WITH BOTTOM POSITION== FOR 1=0 TO LEAFNUM -l YBOT! = A YDA TA !(0,J) [F YBOT! = CCWY!(I) THEN XPARA!=CCWY!(l) [F XPARA! > LA!(J) THEN LA!(J)=XPARA! ENDIF IF XPARAI MAXMLCFLD! THEN LA !(I)-MAXMLCFLD OPTIERRFLAG = -77 END IF lF LA !(I) < MlNMLCFLO THEN LA!(l)=-MINMLCFLD! OPJ'IERRFLAG = -77 ENDrF IF LB!(l) > MlNMLCFLD THEN LB !(l)= MINMLCFLD I OPTIERRFLAG = -77 END IF IF LB !(I} < -MAXMLCFL D THEN LB !(l)=-MAXMLCFLD OJ"l'IERRFLAG = -77 END IF NEXTI 'I--= VERTI CAL FIELD SIZE I MLCMAXVER = HI EAFNUM!*LEAFWID! FLDMAXVER l = CCWY!(O) FLDMJNVER! = CCWY!(O) FOR I = 0 TO FLDPTNUM IF CCWYl(I) > FLDMAXVER THEN FLDMAXVER! = CCWY!( l ) END IF IF CCWY!(l) < FLDMINVER THEN FLDMINVER = CCWY!(I) END IF NEXTI IF FLDMAXVERI > MLCMAXVER OR FLDMINVER! < MLCMAXVER THEN IF OPTIERRFLAG = -77 THEN OPTIERRFLAG = -99 ELSE OP,.,,...l"..,..IERRFLAG = -88 END IF END IF IF FLDMINVER > MLCMAXVER! OR FLDMAXVER! < -MLCMAXVER! THE N OPTIERRFLAG =-100 END IF 'II== CHECK MAX DIFFERENCE A M ONG LEA YES --1

PAGE 158

J = LEAFNUM l LAPLUS! = LA!(O) LAMlNUS! = LA!(O ) LBPLUS! = LB!(O) LBMINUS = LB !(0) FOR I = l TOJ IF LA!(l) > LAPLUS! THEN LAPLUS! = LA!(l) END IF IF LA!(I) < LAMINUS! THEN LAMINUS! = LA! (D ENDIF IF LB ( l) > LB PLUS! THEN LBPLUS! = LB!(l) END IF IF LB!(I) < LBMINUS! THEN LBMINUS = LB!(I) END IF NEXTI LADIFF! = LAPLUS LAMINUS LBDIFF! = LBPLUS!-LBMINUS! 149 IF LADIFF! >= MAXMLCDIF! OR LBDIFF! >= MAXMLCDIF! THEN IF OPTIERRFLAG = -77 THEN OPTIERRFLAG = -3 77 ELSEIF OPTIERRFLAG = -88 THEN OPTIERRFLAG = -388 ELSEIF OPTIERRFLAG = -99 THEN OP'l'IERRFLAG = -399 ELSEIF OPTIERRFLAG = -100 THEN ELSE OPTIERRFLAG = -33 END IF END IF IF LADIFF! > MAXMLCDIF! THEN FOR l =OTOJ DIFF! = LAPLUS! LA!(l) IF DIFF! > MAXMLCDIF! THEN LA!(I ) = LAPLUS! MAXMLCDIFI ENDIF NEXT! ENDIF IF LBDIFF > MAXMLCDIF! THE N FORI=OTOJ DIFF! = LB!(I ) LBMINUS! IF DIFF > MAXMLCDJF! THEN LB !{I) = LB MINUS! + MAXMLCDIF! END IF NEXTI END IF '1---= ASSIGN THE OPTIMIZED POSITION TO LEAF DAT A ==I FOR 1=0 TO LEAFNUM 1 AXDATA!(O,l)=LA!(l) AXDATA! ( l,J)=LA!(l )+ LEAFLEN AXDA TA !(2,l)=LA !( J )+ LEAFLEN AXDATA! (3,l)=LA!( I) AXDATAl(4 I )= LA!(I) BXDATA! (O, l)=LB!(I ) BXDA TA! ( 1.I )= LB !(1)-LEAFLEN BXDATA! (2, l)=LB !(I)-LEAFLEN BXDATA!{3 l)=LB !(l) BXDA TA! ( 4,l)=LB !(I) NEXTI

PAGE 159

150 ERASE LA!, LB!, CCWX!, CCWY! END SUB '[ -====------------------~------------------------==-== ======== =-------------=c=.-------------, -----------' SUBROUTINE: MLCOPTOVER () SYNOPSIS: INCLUDE comir.inc INCLUDE comir7.inc SUB MLCOPTOVER STATIC 2900 DESCRIPTION: This subroutine search geometrically overblocked MLC leaf position ASSUMPTIONS: This subroutine assumes valid input variables. I GLOBAL_ VARIABLES: AXDATA!O IX-coordinate data of leaf A A YDA TA!() I Y-coordinate data of leaf A BXDATA!Q IX-coordinate data of leaf B CA! 0 Cosine value of collimator angle CCWXI() 0 Temporary X-coord. for field outline rotated opposite to collimator r otation CCWY !O O Temporary Y-coo r d. for fie l d outline rotated opposite to collimator rotation CONTS I-ll FI'X! I MLC offset in X-dir. (cm) CONTSHIFTY! I MLC offset in Y-dir. (cm) DIFF! 0 Difference between longest leaf and each one DY! 0 Difference in Y between two consecutive vertices (cm) FLDEDGEO I Irregular field outline coordinates (cm* 100) FLDMAXVERI O Highest point of outline in vertical direction FLDMINVER! 0 Lowest point of outline in vertical direction FLDPTNUM I Nwnber of vertices in field outline GRA! O Gradient between two vertices LA !O O Temporary leaf position in side A LA2!() 0 Temporary leaf position in side A LADIFF! 0 Difference between most right and most l eft leaves in side A LAMINUS 0 Most left leaf position in side A LAPLUS! 0 Most right leaf position in side A LB !O O Temporary leaf position in side B LB2!0 0 Temporary leaf position in side B LBDIFF! 0 Difference between most right and most left leaves in side B LB MINUS! 0 Most Left leaf position in side A LB PLUS I O Most right leaf position in side A LEAFI..EN! 0 Length ofMLC leaf LEAFNUM O Number of leaves in one s i de (26 for Varian, 40 for Philips) LEAFWTD 0 W i dth of MLC leaf MAXMLCDIF! T Max of difference among leaves MAXMLCFLD! I Max ofMLC field size in one side MI NMLCFLD! I Max. of leaf stretch to oppos i te side MLAXIS I Initial A leaf position before optimization process MAXMLCDIF! I Max. of diffe r ence among leaves MRAXIS I I nitial B leaf position before optimization process OPTIERRFLAG O Indicate type of error during optimization SA! 0 Sine value of collimator angle XMAG!O O X-coord for fie l d outline with offset (cm) XORG! 0 Original X-coord for field outline (c m ) XP ARA! 0 Optimized leaf position during optimization process YBOT! 0 Y-coord. at 1/3 bottom point for each leaf (cm) YMAG!() 0 Y-coord for field outline with offset (cm) YORG I O Original Y-coord. for field outline (cm) YTOP! 0 Y-coord at 2/3 top point for each leaf (cm) FILES_USED: None

PAGE 160

151 I SUBROUTINES_CALLED: CONVERT ANG Conve rt co llimat or angle in degree t o radian and get sine, cosi n e values I I AUTHOR : Siyong Kim I REVISION HISTORY : [---. --------------------------------------==== --------------------------------------------' l DIM LA !(O TO LEAFNUM-1 ), LB l(O TO LEAFNUM-1) CCWXl(O TO FLDPTNUM+l ), CCWY!(O TO FLDPTNUM+l ) DIM LA2!(0 TO LEAFNUM-1) LB2! (0 TO LEAFNUM -1) 'I=-TURN THE CONTOUR TO ALIGN WITH COLLIMATOR ANGLE --=I CALL CONVERT ANG FOR l =O TO FLDPTNUM XORG!=FLDEDGE(I,0)*0.01 'XORG!; ORIGINAL CONTOU R DATA YORG !=FLDEDGE(I.l)*0.01 XMAG !(I)=XORG !+CONTSHIFTX YMAG!(I )= YORG !+C ONTSHlFTY! YMAG!; SHIFTED CCWX!(l)=XMAG!(l)*CAI + YMAG!(l )*S A 'CCWX!; ROTATED IN CCW DIRECTION CCWYl(l)=YMAG!(l)*CA! XMAG !(I)*SA! NEXTI 'I=== ENSURE CLOSED CURVE --1 CCWX!(FLDPTNUM+ l )=CC WX! (O) CCWYl(FLDPTNUM+l)=CCWY!(O) 'I== INITIAL LEAF POS ITION == MLAXIS = -40 I MRAXIS = 40! J = LEAFNUM-1 FOR l =OTOJ LA !( l )= MLAXlS LB !( l )= MRAXIS I LA2 !(l) =MLAXI S LB2 !(l)= MRAXI S NEXTI 'I=== COMP AR WITH TOP 1/3 POSITION ===I FOR 1 =0 TO FLDPTNUM DY l=CCWY!(I+ 1 )-CC WY l(l) IF DY!> 0.0 THEN FOR J =O TO LEAFNUM -1 YTOP = A YDATA! (OJ) + 2!*LEAFWID!/31 IF YTOP >= CCWY!( l ) AND YTOP! <= CCWY!(l+l) THEN GRAl=(CCWX!( l + 1 )-CC WX !(l))/(CC WY!(l+ 1 )-CC WY l(l)) XPARA!=GRA!*(YTOPI-CCWY!(l))+CCWX!(I) IF XPARA > LA!(J) THEN LA!(J)=XPARA! END IF IF XPARA! < LB !( J ) THEN LB!(J)=XPARA! END IF ENDIF NEXTJ ENDIF IF DY!< 0.0 THEN FOR 1=0 TO LEA.FNUM-1 YTOP! = AYDATAl(O.J) + 2l*LEAFWID!/3! IF YTOP! <= CCWY!(l) AND YTOP! >= CCWY!(l+l) THEN GRA !-( CCWX! ( I+ 1 )-CC WX!(I ))/(CC WY! ( l + 1)-CCWY!(I)) XPARA!=GRA!*(YTOP !-CCW Y!(I) )+CCWX!( l ) lF XPARA! > LA!(J) THEN LA! ( J )= XPARA END IF IF XPARA! < LB !(J) THEN LB l(J)= XP ARA! END IF ENDIF NEXTJ

PAGE 161

152 END IF IF DY!= 0.0 THEN FOR J=O TO LEAFNUM-J YTOP! = AYDATA!(O,J) + 21*LEAFWID!/3! IF YTOP! = CCWY!(I) THEN XPARA!=CCWY!(I) IF XP ARA I > LA !(J) THEN LA! (J)= XPARA! END IF IF XPARA! < LB ( J ) THEN LB !( J)=XPARA END IF END IF NEXTJ END IF NEXTJ 'I COMPAR WITH BOTTOM 1/3 POSITION =--1 FOR I=O TO FLDPTNUM DY !=CCWY ( I+ 1 )-CC WY ( I ) IF DY!> 0.0 THEN FOR J= O TO LEAFNUM-1 YBOT! = AYDATA!(O,J) + L EAFWID!/3! IF YBOT! >= CCWY!(l) AND YBOT! <= CCWY!(I+ l ) THEN GRA!=(CCWX!(I+l}-CCWX!(I))/(CCWY!(l+l)-CCWY!( I )) XPARA!=GRA!*(YBOT -CCWY!(l ))+CC WX! ( I ) IF XPARA! > LA2! ( J ) THEN LA2 ( J )= XPARA END IF IF XPARA! < LB2! (J) THEN LB2!( J )=X PARA END IF END IF NEXTJ END IF IF DY!< 0 .0 THEN FOR 1= 0 TO LEAFNUM-1 YBOT! = A YDATA !(O, J ) + LEAFWID !/3! IF YBOT <= CCWY! ( I ) AND YBOT! >-= CCWY!(I+I) THEN GRA!=(CCWX!(l+ 1)-CCWX !( l))/ (CC WY!(I+ l )-CC WY!(I )) XPARA!=GRA!*(YBOT!-CCWY! ( I ))+CC WX!(I ) IF XPARA! > L A2!( J ) THEN LA2l(J)=XPARA I END IF IF XPARA! < LB2! ( J ) THEN LB 2 ( J )=XPARA! END IF END IF NEXTJ END IF IF DY! = 0.0 THEN FOR J=O TO LEAFNUM 1 YBOT = A YDATA!(O ,J) + LEAFWIDl/31 IF YBOTI = CCWY!(I) THEN XPARA!=CCWY!(I ) IF XPARA! > LA2! (J) THEN LA2 !( J )= XP ARA END IF IF XPARA! < LB2 !( J ) THEN LB2 !( J )= XPARA END IF END IF NEXTJ END IF NEXTI 'I== FIND LEAF PO SIT ION LA AND LB! -I J-LEAFNUM -1 FOR l =OTOJ

PAGE 162

lF LA!(I) > LA2!(1) THEN LA! (l)=LA2 ( 1 ) ENDlF IF LB !( I )< LB2 ( I) THEN LB !( l )=LB2!(I) END IF NEXTI 'I=:= ADJUST THE ZEROS == J =LEAFNUMJ FOR l =OTOJ lF LA!(l)=MLAXIS THEN LA !(I)=0.0 ENDlF IF LB!(I)=MRAXIS! THEN LB !(1)=0 0 END IF NEXTI 'I=--= RESTRICTION CHECK =---1 'I==== HORlZONT AL FIELD S IZE ===I J=LEAFNUM-1 FOR l=OTOJ IF LA!(I) > MAXMLCFLD! THEN LA !(I)=MAXMLCFLD OPI'IERRFLAG =-77 END IF IF LA !(I) < MINMLCFLD! THEN LA!(l)=-MINMLCFLD OPTIERRFLAG = -77 END IF IFLB!(I) > MINMLCFLD! THEN LB!(I)-MJNMLCFLDI OPTIERRFLAG = 77 END IF IF LB! ( I ) <-MAXMLCFLD! THEN LB !(l)=-MAXMLCFLD OPTIERRFLAG::: -77 ENDlF NEXTI 'I== VERTICAL FJELD SIZE =--1 MLCMAXVERI = HLEAFNUM!*LEAFWID! FLDMAXVER! = CCWY!(O) FLDMJNVER! = CCWY!(O) FOR I = 0 TO FLDPTNUM IF CCWY!(f) > FLDMAXVER I THEN FLDMAXVER! = CCWY!(l) END IF IF CCWY !(I) < FLDMINVER! THEN FLDMINVER! = CCWY!(I) END IF NEXTl 153 IFFLDMAXVER I > MLCMAXVER! OR FLDMlNVER! MLCMAXVER! OR FLDMAXVER! < -MLCMAXVER! THEN OPTIERRFLAG = 100 END IF '1 1 == CHECK MAX DIFFERENCE AMONG LEA YES --1 J = LEAFNUM 1 LAPLUS! = LA!(O) LAM1NUS! = LA !(O) LBPLUS! = LB !(O) LB MINUS! = LB !(O)

PAGE 163

FOR I = l TOJ IF LA!(l) > LAPLUS! THEN LAPLUS! =LA!(l) END IF IF LA !(J) < LAMINUS! THEN LAMIN US! = LA!( I ) END IF IF LB !(I) > LB PLUS! THEN LBPLU S! = LB!(I) END IF IF LB!(l) < LBMl NUS! THEN LBMlNU S = LB !(1) END IF NEXTI LADIFF! = LAPLUS LAMINU S LBDIFF = LBPLU S! LBMINUS! 154 IF LADIFF! >= MAXML CD IF OR LBDIFF >= MAXMLCDIF! THEN IF OPTIERRFLAG = -77 THEN OPTIERRFLAG = -377 ELSEJF OPTIERRFLAG = -88 THEN OPTIERRFLAG = -388 EL SE IF OPTIERRFLAG = -99 THEN OPTIERRFLAG = -399 ELSEIF OPTIERRFLAG = J 00 THE N ELSE OPI'IERRFLAG = -33 END IF END IF I F LADIFF! > MAXMLCDIF! THEN FO R l =OTO J DIFF! = LAPLUS! LA! (I) IF DIFF > MAXMLCDIF! THEN LA!(J) = LAPLUS! MAXMLCDIF END IF NEXT! END IF IF LBDIFF > MAXML CDIF! THEN FOR l =OTOJ DIFF! = LB !(1) LBMINU S! IF DIFF! > MAXMLCDIF! THEN LB !(1) = LB MINUS! + MAXMLCDIF! END IF NEXTI END IF 'I ASSIGN THE OPTIMIZED POSIT I ON TO LEAF DAT A ===I FOR 1 =0 TO LEAFNUM-1 AXDATA!(O.I)=LA!(I) AX.DATA!( l l )=LA !( l )+L EAFLEN AXDATA !(2,l)=LA !(T)+LEAFLEN AXDATA!(3.I)=LA!(l) AXDATA!(4.I)=LA!(I) BXDATA!(O,l)=LB !( I ) BXDATA !( l ,l)= LB !(T)-LEAF LEN BXDATA! (2,l)=LB!(J)LEAFLEN! BXDATA !(3 ,l )=LB !( I ) BXDATA !(4,l)=LB !( I ) NEXTI ERASE LA!, LB !, CCWX!, CCWY!, LA2!, LB2! END SU B '(----------------------~---------------=--------------------------------------------------' SUBROUTINE:

PAGE 164

AUTOUNDER () I SYNOPSIS: INCLUDE comrocs.inc INCLUDE co mir .inc SUB AUTOUNDER STATIC 3000 I DESCRIPTION : 155 This subro u ti n e carry out geometric underblocked opti1nization for MLC field a ut omatically ASSUMPTIONS: This subroutine assumes valid input variables. I GLOBAL_ VARIABLES: CONTSHIFfX! I MLC offse t in X-dir. (c 1n ) MLCFLAG 1 MLC field editor i s o n (O=no, l=yes) MLCOPTlMODE I Indicate t ype of fit (l=a ut o/2:: manu a l ) OLDSHIFJ'X! I MLC offset in X-dir. (cm) I FILES_USED: None ' SUBROUTINES CALLED : DISDA TA Display isodose/phantom headings and data DRWFLD Draw field ou tlin e and MLC MFLDDATA Get collimator o p e n i n g and field outline for MLC field MLCINI Set MLC dimension and initial leaf position MLCOPTUNDER Search geo m etrica ll y underblocked MLC l eaf position AUTHOR: Siyong Kim ' REVISION HlSTORY : I [--------= ---------------------------====------w ---------------------------------------------------------' OLDSHIFI'X!=CONTSHIFl'X IF MLCFLAG = l THEN CALLMLCINI CALL ML COPTUNDER MLCOPTIMODE = 1 CALL MFLDDATA CALLDRWFLD CALL DISDATA ELSE OS Sound 261, 2 ENDJF CONTSHIFI'X !=OLDS HIFl'X END SUB [ -----------------------------------------------------------~=----------------------------------------------' I SUBROUTINE : AUTOOVER () SYNOPSIS : INCLUDE comrocs.in c INCLUDE comic.inc SUB AUTOOVER STATIC 3 1 00 I DESCRIPTION: This s ubr o ut i n e carry out geometric overb l ocked o ptimizati on f o r MLC field automatically ASSUMPTIONS :

PAGE 165

156 This subroutine assumes valid input variables. GLOBAL VARIABLES : CONTSHIFTX! I MLC offset in X-dir (cm) MLCFLAG 1 MLC field editor is on (O= no l=yes ) MLCOPTIMODE I Indicate type of fit (l=auto/2=manual) OLDSHIFI'X! I MLC offset in X-dir. (cm) FILES USED: None SUBROUTINES_CALLED : DlSDA TA Display isodose/phan t om beadings and data DRWFLD Draw field ou tli11 e and MLC MFLDDAT A Get collimator opening and field oulline for MLC field MLCINl Set MLC di m ension and initial leaf position MLCOPTOVER Search geometrically overblocked MLC leaf position AUTHOR: Siyong IGm REVlSION_HISTORY : f [ -------~==-----==-==mmw---------~-----------------------------------------------------------------' OLDSHIFTX !=CONTSHIFI'XI IF MLCFLAG = l THEN CALLMLCINI CALL MLCOPTOVER MLCOPTIMODE = 1 CALL MFLDDATA CALLDRWFLD CALLDISDATA ELSE OS .Sound 26 1 2 ENDIF CONTSHIFTX !=OLDSHIFTX END SUB ,-----------------------' SUBROUTINE: CONVERTANG 0 SYNOPSIS: INCLUDE comrocs.inc INCLUDE comir7.inc --w mmw------===--------www -----m mm --------m--wmm SUB CONVERTANG STATIC 3200 DESCRIPTION : This s ubroutine co nvert co llimator angle in degree to radian and gee sine, cosine values ASSUMPTIONS : This subroutine assumes valid input variables. GLOBAL_ VARIABLES : CA! 0 Cosine value of colli m ator angle COLANGRAD! I Collimator angle in radian COLLANG J Collimator angle in degree Pl! I Constant for pi (3 1415926536# ) SA! 0 Sine value of collimator angle FILES _US ED : None SUBROUTINES_CALLED: None AUTHOR : Siyong Kim

PAGE 166

157 ' REVISION_HISTORY : -------------------------------------'[ :====------------------------------------=-------------------------' I COLAN GRAD !=-CO LLANG !*Pl !/180.0 SA !=S IN ( COLANGRAD !) CA!=COS(COLANGRAD!) END SUB '[===--=======-----====~=--:=-=--=-=-=-====-=-=-=, -=-=-==-=-=-=:==-= -~--------=--' SUBROUTINE : MLCGETANG () SYNOPSIS: ' INCLUDE comrocs.inc INCLUDE comir.inc SUB MLCGETANG STATIC 3300 DESCRIPTION : Thi s s ubroutine get co llimat o r an g le in degree as user input I ASSUMPTIONS : Thi s subroutine as s um es vaUd i nput variables. GLOBAL V ARlABLES : B $ 0 Temporary s tring COLLANG I Collimator angle in degree ERRFLAG M Status of the file VO routine ROW I Index for first row in m enu box I FILES _U SED : None SUBROUTINES _C ALLED : KYB GetRea1$ Get keyboard input in floating p o int format I AUTHOR : Siyo ng Kim REVISION HISTORY : [-----------==--------------------------------------------------------------------I I ERRFLAG=O I ICOLLIMATOR ANGLE SELECTION =-==I CALL MENUCLR LOCATE ROW + 2, 5 PRINT "Enter Co llim ator Angle . (Degree)"; LOCATE ROW, 3 PRINT USING ENTER :<+##.#>"; COLLANG! 'I=User inpul =---1 LOCATE ROW 1 6 B$ = KYB .Ge tReaJ$ ( I) IF 8$ <> "" THEN SELECT CASE 8 $ CASE "E SC ERRFLAG == 99 EXIT SUB CASE RET

PAGE 167

CASE ELSE COLLANG! = V AL(B$ ) END SELECT END IF EXIT SUB END SUB 158 [---------. --------------------------------------------------------------------------' SUBROUTINE: MLCSHIFI'X () I SYNOPSIS : INCLUDE comrocs.inc INCLUDE comir.inc SUB MLCSHIFfX STATIC 3400 DESCRIPTION : This subroutine get MLC offset in X-clir as user input I ASSUMPTIONS: This subroutine assumes valid inpul variables I GLOBAL VARIABLES : B$ 0 Temporary string CALPTNUM I Number of calculation point s COLLANG I ColUmator angle in degree CONTSHIFI'X! I MLC offset in X-dir. (cm) ERRFLAG M Status of the file l/0 r outine FLDEDGEO I Irregular field outline coordinates (cm* 1 00) IRCALPTO O X-Y coord. of calculation points OLDSHIFTX! I MLC offset in X dir (c m ) ROW I Index for first row in menu box XMAG!() 0 X-coord for field outline with offset (cm) XORG! 0 Original X-coord. for field outline (cm) XX! 0 X-coord for shifted cal. point I FILES _US ED : None SUBROUTINES _C ALLED : KYB GetRea1$ Get keyboard input in floating point format I AUTHOR : Siyong Kim I REVISION HISTORY : '[--------------------------------------------~---------------------------------------------------------------------I ERRFLAG=O I=--CONTOUR SHIFT ====I CALL MENUCLR LOCATE ROW + 2, 5 PRINT "Enter Contour Shift in X-dir ... (cm)"; LOCATE ROW 3 PRJNT USING "ENTER:<+##.#>"; CONTSHIFl'X! OLDSHIFl'X! = CONTSHIFI'X! I==== User input =-== LOCATE ROW 16 B$ = KYB.GetReal$(1 ) IF B$ <> "" THEN SELECT CASE B$

PAGE 168

CASE ''ESC" ERRFLAG = -99 EXIT SUB CASE RET CASE ELSE CONTSHIFl"X! = V AL(B $) END SELECT END IF 'I== S HlFI' CONTOUR --=I FOR l =O TO FLDPTNUM 159 XORG!=FLDEDGE ( l ,0)*0. 0l XORG! ; ORIGINAL CONTOUR DATA XMAG!(I) =XO RG!+CONTSHIFTX XMAG!; PROJECI'ED AND SHIFI'ED NEXTT 'I--SHIFI' CAL. POINT ----1 FOR I = l TO CALPTNUM XX != IRCALPT (l,0)*0.01 OLDSHIFfX! + CONTSHIF l"X l IRCALPT(l, 0) = C I NT(XX!* 1 001) NEXTI 'IFIX SHIFT ==I OLDSHJFl'X = CON TSHIFl'X END SUB '[--------------. --------' SUBROUTINE : MLCSHTFTY () I SYNOPSIS : INCLUDE comrocs.inc INCLUDE comi r.in c SUB MLCSHIFTY STATlC 3500 DESCRlPTION : ----==== -------------------mm-----------rm Thi s s ubroutine get MLC offset in Y dir as user input ASSUMPTIONS : Thi s s ubr o utine assumes valid input variab l es GLOBAL V ARIABL.E S : 8$ 0 Temporary string CALPTNUM I Number o f c al c ulati o n p oin t s COLLANG I Col limator angle in d eg r ee CONTSHIFTY! I MLC offset in Y-dir (c m ) ERRFLAG M Status of th e file 1/0 r outine FLDEDGE O I irregular fie ld outline coordinates (cm I 00 ) IRCALPT O O X Y coo rd of calc ulati o n p oi nt s OLDSHIFIY! I MLC offset in Y dir (c m ) ROW I Index for first row in menu box YMAG !O O Y -coo rd for field outline with offset (cm) YORG 0 Original Y -coo rd for fi el d ou tlin e (cm) YY! 0 X -coo rd for s hifted c al point I FlLES _USE D : None I SUBROUTINES_CALLED: KYB GetReal $ Get keyboard input in floating point format I AUTHOR : Siyong Kim REVISION HISTORY :

PAGE 169

160 [--------=----------------------------------------------------------------------~------------w ---' I ERRFLAG=O 1--CONTOUR S HIFI' -1 CALL MENUCLR LOCATE ROW + 2, 5 PRJNT "Enter Contour S hift in Y-dir .. (cm)" ; LOCATE ROW, 3 PRINT USTNG "ENTE R :< 1 ##.#>"; CO NTSHIFfY OLDSHIFfY = C ONTSHIFl'Y! I= == User input =-I LOCATE ROW 1 6 B$ = KYB .Ge tRea1$ ( I ) IF B$ <> "" THEN SELECT CASE B $ CASE "ESC" ERRFLAG = -99 EXIT SU B CASE "RET" CASE ELSE CONTSHlFTYI = V AL(B$) END SELECT END IF 'I=:= SHIFI' CONTO U R --=I FOR 1=0 TO FLDPTNUM YORG !=FLDEDGE(l, l )*0.01 YMAG (I )= YOR G !+CONTSIIlFTY l YMAG! ; S H I Fl'ED NEXTI 'I== SHIFT CAL. POINT ====I FOR I = l TO CALPTNU M YY = IRCALPT (l 1)*0.01 -O LDSHIFfY + CONTSlilFl'YI IRCALPT(l,l) = C INT(YY I* 1 001) NEXTI END SUB '[-----------------~------------------:=----------------------------------------------------------' SUBROUTINE: MFLDDATA () SYNOPSIS : INCLUDE co mr ocs.i n c INCLUDE co mir.in c SUB MFLDDATA STATIC 3600 I DESCRIPTION : Thi s s u broutine get co l limator opening, field outline and c al c ulation point l oca ti o n for MLC field I ASSUMPTIONS: Thi s s ubroutine assumes valid input variables I GLOBAL_ VARIABLE S: AXDATA! O I X -coor dinatedataof l ea.f A A YDA TA!() l Y-coordinate data o f l eaf A BXDATA !O I Xcoord inate data of leaf B BYDATA !O I Y-coordinate data of leafB

PAGE 170

161 CA! 0 Cosine val ue of co llimator angle CALPTNUM l Number o f calcu lation p o int s COLCEN'IER !O O X-Y coord. of collimator cen ter (cm) COLLEN! 0 Collimator opening length (cm) COL WID 0 Collimator ope ning width (c m ) FLDEDGEO I lrre guJar field o utline coo rdin ates (cm* 100) FLDPTNUM l Number of vertices in field outline rRCALPTO O X-Y coo rd of c al c ulation points IML CSA VE l Save MLC field o r n o t (O= n o, l =yes), f o r 0, only coll imat o r center is calculated LEAFNUM O Number of l eaves in o n e side (26 for Varian 40 for Philips) ML C MAG! 0 Mag for projection o fMLC from 100 cm to s urfa ce SA! 0 Sine val ue of co llima t or angl e LOCAL VARIABLES : CCWCPX! 0 X-coord. of r o tated ca l cu lati on p oin t (c m ) CCWCPY! 0 Y-coord. o f r o tated ca l cu l ation point (cm) CPX! 0 X-coord. of origi nal calculation point (cm) CPY l O Y -coord. of o riginal c al culation point (c m ) DEM AG! 0 Mag for d eproje c tion from l 00c m t o s urfa ce LEAFMAXI O M ost right l eaf po s iti on LEAFMIN 0 M os t left leaf position OPEN I O Lowest leaf ID opened OPENF O Hjgh est leaf ID opened FILES USED : None SUBROUTINES _CAL LED : CONVERT ANG Convert co llimat or angle in degree t o r a dian and get sine, cosine values I AUTHOR: Siyong Kiln I REVIS I ON_ffiSTORY: I [ --== : ------------------:=,===-::-:=--=--==--------------------------=--=-==----------------------------------' I 'I== FIND OPENED PAIR OF LEAF == FOR I = 0 TO LEAFNUM -1 IF BXDATA !(O,l) <> AXDATA!(O.l) THEN OPENI = I GOTOOPENl ENDlF NEXTI OPEN! : 1 = LEAFNUM l FOR I =O TOJ lF BXDATA !(O, J -1) <> AXDATA!(O.J-1) THEN OPENF=J-1 GOTOOPEN2 END IF NEXT! OPEN2: DEMAG != 1 !/MLCMAG 'I=== S ET COLLlMATOR ==I LEAFMIN = BXDATA !(O,O PEN I ) LEAFMAX! = AXDATA!(O,OPENI) FOR l = OPENl+l TO OPENF IF BXDA TA !(0 ,1 ) < LEAFMIN THEN LEAFMJN! = BXD A TA !(O,I) END IF IF AXDATA!(O,[) > LEAFMAX THEN LEAPMAX = AXDATA!(O.I) END IF NEXTI LEAFMIN! = LEAFMIN !*DE MAG! LEAFMAX! = LEAFMAX !* DEMAG COLWTD! = LEAFMAX LEAFMIN

PAGE 171

162 COLLEN!= (A YDATA!(3,0PENF) A YDATA!(O,OPENT))*DEMAG! COLCENTER!(O) = LEAFMAX I 0.5*CO LWID COLCENTER!(l) = AYDATA!(3,0PENF)*DEMAG! 0.5*COL L EN! COLWID! = COLWID! + 1.6! COLLEN!= CO i .LEN! + 4! IF IMLCSA VE = 0 THEN EXIT SUB END IF 'I---FIELD OUTLINE =--1 FLDPTNUM = (OPENF-OPEN l +l)*4-l 'RED IM FLDEDGE(FLDPTNUM,2) 1=0 J = I FOR K = OPEN I TO OPENF FLDEDGE(I,O) = CINT(BX DATA !(O,K)* l 00!) F LDED GE( l l ) = C I NT(BYDATA!(O,K)* 100!) 1 = 1+2 FLDEDGE( J ,O) = ClNT(BXDATA!(3,K)* 10 0!) FLDEDGE(J,l) = ClNT(BYDATA!(3,K)*l00!) J=J+2 NEXTK KK = OPENF + OPENI FOR K = OPEN I TO OPENF FLDEDGE ( l ,0) = CINT(AXDAT Al(3,KK-K)* J 00!) FLDEDGE( l ,l) = CJNT(A YDATA! (3, KK -K)* 100!) 1 = 1+ 2 FLDEDGE ( J .O) = CIN T (AXDA TA !(O,KK-K)*lOO!) FLDEDGE (J.I) = CINT(A YDATA!(O,KK-K)*lOO!) J = J+2 NEXTK 'I== CONVERT CAL. POINT OPPOSITE TO COL LIMATOR ANGLE -=I lF COLLANG! <> 0.0 THEN IF CALPTNUM > 0 THEN CALL CONVERT ANG FOR I = l TO CALPTNUM CPX! = IRCALPT( l ,0)*0.01 CPY! = IR CALPT(I, 1 )*0.01 CCWCPX! = C PX!*CA I + C PY !*SA! CCWCPY! = CPY!*CA! CPX!*SA! lRCALPT ( l ,0) = C I NT(CCWCPX!* 1 00!) IRCALPT(I,l) = C I NT(CCWCPY!*lOO!) NEXT END IF END IF END SUB I [--~---=====---------===-========--=-=-----------------------==-=----------------------------------I SUB R OUTINE: SAVEMFLD() I SYNOPS I S: I I NCLUDE comrocs.inc I NCLUDE comir.inc INCLUDE comir3 inc SUB SAVEMFLD STAT I C 3700 I DESCRlPTION : Thi s subroutine prompts the u se r t o save MLC field data. Uthe u ser chooses to save the data th e MLC data file and the lrreg library file i s u pdated I ASSUMPT I ONS:

PAGE 172

163 This s ubr o utine assu.1nes valid input variables GLOBAL_ VARIABLES : AXDATA!O IX -coordinate data of l eaf A BEAMTYPE I O=photon; l=Co-60; 2-e l ectron BXDATA !Q IX -coordinate data of leaf B CALPTNUM I Number o f calculation p oints COLLANG I Collimator angle in degree COLCENTER 10 I X Y coordinate of co l Li mater center (cm) CO LLEN I Collimator length (cm) COLWID! I Collima t o r width (cm) CONTS HIFl'X I MLC offse t in X-dir (c m ) CONTSHIFI'Y! I MLC offset in Y-dir. (cm) DATADIR$ I Directory pointer to a spec ifi c patient DAT ADRV$ 1 Drive pointer to patient data sto ra ge DAT AP A TH$ I Path pointer t o patient data storage DEPTH!() I Isoline depths ORV$ 0 Name of the drive where FILE$ can be found EDGECODEO I Edge code EDITMODE I Beam calc ulati on status flag ENERGY r Norn.i11al energy (Mev) ERRFLAG O Status of the file I/0 routine FIELDS M Number of irregular fields stored FILE$ 0 Temporary pointer to a ll l ibrary filenames FLDEDGE O I Irregular field outline coord inat es (cm 1 00 ) FLDPTNUM 1 Number of vertices in field outlines IFLDNUM O Current irregular fi eld numb er IRCALPTO I X-Y coo rd of coll im a t or points (temp arra y) rMLCSA VE r Save MLC fi eld o r not (O=no, l=yes), for 0, o nly collimato r cen t er is calc ul ated LEAFNUM O Number of leaves in one side ( 26 for Varian 40 for Phili ps ) MAG! I Field magnification factor MFLAG $ I MLC field exists (N=no, V=Varian P=Philips ) MLCFLAG I ML C fi eld editor is on (O= n o l =yes) MLCMAG! 0 Mag. for projection of MLC from 1 00c m to surface MLCTYPE O Type of ML C (1 = Varian 2 = Philips) ROW I ind ex for first row in menu box PA TH$ 0 Name of th e path where FILE$ can be found PORTDES$ I P ort designation lab el ROW I Index for first row in menu box SITE$0 I Cale p oint label SSD !() I Source t o skin distance for each calc point SSDSAD! I SSD/SAD distance (c m ) SSDSAD MODE I O = SSD beam 1 = SAD beam TRA YFAC! I Tray factor TRTUNT$ I Treatment unit TRTUNTNUM I Treatmen t unit file pointer WDGANG I Wedge angle (degrees) WDGORN I Wedge orientation I Fll ,ES_USED: CD : DATAPATH$\DATADIR$ IFLD## DAT Irregular field shape coord CD : DATAPATH $\OATAD 1R $ MFLD## DAT MLC field shape coord SUBROUTINES CALLED: K YB GetStrlnclude$ Retrieves a string o f MaxLen length. Enables specified keys with ASCII code 321 26. Also could return RET or ESC string MENUCLR Clear menu/command area & display time/version & title MFLDDA TA Gets collimator ope 1tin g, field outline and calcula ti on point l oca ti o n for MLC field GE TIFLD 2 AUTHOR : Gets irregular fi eld data from the file Siyo ng Kim I REVISION_HISTORY : [---------------------:===-=--,:======-----------------_,.. __ --------~-----------------------------

PAGE 173

I ERRFLAG=O IF EDITMODE = l AND MLCFLAG = J THEN CAI L MENUCLR LOCATE ROW+ 2, 1 0 PRlNT "Save changes? (Y or N)''; LOCATE ROW 3 PRINT "ENTER:"; SELECT CASE KYB GetStrlnclude$("YyNn", I) CASE ''ESC" N ", n" ERRFLAG = -99 EX1TSUB CASE ELSE END SELECT CALL MENUCLR LOCATE ROW+ 2, J O IF MFLAG$ = "N" THEN 164 PRINT "Overwrite old? (Y or N) NO MLC Field exist"; ELSE PRINT "Overwri te old? ( Y or N)" ; END IF LOCATE ROW 3 IF MFLAG$ = N" THEN PRINT "ENTER : "; ELSE PRINT ENTER : "; ENDJF SELECT CASE KYB GetStrlnclude$("YyNn", 1 ) CASE "ESC" ERRFLAG = -99 EXlTSUB CASE "y", Y OVERWRITE= 1 CASE "RET" IF MFLAG$ = N" THEN OVERWRITE= I ELSE OVERWRITE= 0 ORGF LDNUM = IFLDNUM IFLDNUM = FIELDS + I ENDIF CASE ELSE OVERWRITE= 0 ORGFLDNUM = IFLDNUM JFLDNUM = FIELDS + I END SELECT END IF IF MLCTYPE = 1 THEN MFLAG$ = "V" ELSEIF MLCTYPE = 2 THEN MFLAG$ = "P" ENDIF 'I== SA VE MLC FIELD --1 IMLCSAVE= I CAIJJ MFLDDATA IMLCSAVE=O CALL DisplayBusyMessage ( "Sav ing MLC field data .... ) 1 $ = M1D$ ( STR$ ( IFLDNUM) 2 LEN (S TR$(IFLDNUM )))

PAGE 174

IF LEN(!$) < 2 THEN I $ = "O" + I $ END IF DRY$= DATADRY$ PATH$=DATAPATH$ + DATAD I R$ MFILE$ = "\MFLD" + 1$ + ".DA T 165 IF ( OpenFile( DRY $, PATH$, MFllE $, OUTPUTMODE$, 3) <>SUCCESS) THEN CA I L ERR.Warning( "File A ccess", lrr eg::SaveMFld",_ EXIT SUB END IF DEMAG != 1/MLCMAG l ''Cannot write + Orv$ + Path $ + File$ ) PRINT #3, USTNG "\ \"; PORTDE S$ PRINT #3, USING "##.###.#+##.##+##.##+##.#+##.#+##.###. ## "; CO LWlD! COLLEN!. COLCENTER!(O), COLCENTER!( l ), COLLANG!, CONTSHIFJ'X!, CONTS HIFTY !, MLCMAG! PRINT #3, USING "###" ; LEAFNUM FOR I = 0 TO L EAFNUM1 PRJN T #3, USING"+##.## +##.##"; AXDATA!(O,I)*DEMAG!; BXDATA!(O,l)*DEMAG! NEXTI PRINT #3, USING "II##"; FLDPTNUM IF FLDPTNUM > 0 THEN FOR I = 0 TO FLDPTNUM EDGECODE(I) = I PRI NT #3 US I NG "+#### 11#111## #": FLDEDGE(I, 0); FLDEDGE(I l) ; EDGECODE(I) NEXT I END IF PRINT #3, USING "###"; CAL PT NUM FOR I = 1 T O CALPTNUM PRINT #3, USING "\ \"; SITE$(l) PRINT #3 US I NG"+#### +###1# ##.## ###.#"; I RCALPT(l, 0); IR C ALPT ( I I); DEPTH! ( ); SSD!( l ) NEXTI CloseFile 3 '1---= UPDATE IRREGULAR FIELD LIBRARY =---1 'I== C H ANGE VARIABLE NAME FOR ML C ---1 M COLWID! = COLWTD! MCOLLEN! = COLLEN! MCALPTNUM = CALPTNUM 'IDRV$=DATADRV$ PATH$ = DATAPATH$ + DATADIR$ FILE$ = \IRREGFLD.LIB" IF ( OpenF il e( ORV$, PA TH $, FILE$ RANDOMMODE$, 4 ) <>SUCCESS) THEN CALL ERR.Warning( File Access", "lrreg::Save IFld ",_ "Cannot ope n + Orv $ + P ath$ + Fil e$ ) EXIT SUB END IF FIELD #4, 15 AS PD $, 4 AS TU$ 2 AS EY$, 2 AS BT $, 2 AS CW$,_ 2 AS CL$, 2 AS SS$, 2 AS SM$, 2 AS WA$, 2 AS WO$,_ 2 AS CP$, IO AS ED$ 2 AS NU$,_ 1 AS MF$ 2 AS M CW$, 2 AS MC L $, 1 0 AS MED$,_ 2AS MCP$ 'IGET PARAMETER F OR BLOCK FIELD ==I GET #4, IFLDNUM C OLWID = CSNG(CYI(CW$))*0. l COLLEN = CSNG(CVl(CL$))*0. l WDGORN = CV l (WO$) 'W DGANG = CVI(W A$) BED$ =E D$ CALPTNUM = CV I (CP$) 'fLSET PD$ = PORTDES $

PAGE 175

LSET TU$= TRTUNT$ LSET EY$ = MKI$(ENERGY ) LSET BT$ = MKl$(BEAMTYPE) LSET CW$= MK1$ (CIN T (COL WID 1 01)) LSET CL$= MKI$ (CINT(COI .I.EN I 10 !)) LSET SS$ = MKI$ (ClNT(SSDSAO! 1 0!)) LSET SM$ = MK1$ (SSDSA DMODE ) LSET WO$= MK1$ (WDGO RN ) LSET WA$ = MK1 $(WDGANG) LSET CP$ = MK1$(CALPTNUM) LSET NU$= MK1 $(TRTUNTNUM) LSET ED$ = BED $ LSET MF $ = MFLAG $ LSET MCW$ = MKl $(C lNT ( MCOLWID 1 0!)) LSET M C L$ = MK1$(CINT(MCOLLEN! 10!)) LSET MED$ = DA TE$ LSET MCP$ = MK1$(MCALPTNUM) PUT #4, IFLDNUM IF IFLDNUM = FIELD S + l THEN FIELDS = FIELDS + I LSET PD$ = "-99" PUT #4, FIELDS + l ENDIF CloseFile4 166 'I=:: -SA VE BL OCK FIELD FOR NO OVERWRITE CASE =---1 IF OVER WRITE = 0 THEN 'I GET ORIGINAL BLOCK F I ELD DAT A -1 OLDFLDNUM = IFLDNUM IFLDNUM = ORGFLDNUM CAL L GETIFLD2 IFLDNUM = OLDFLDNUM '1CALL Di splayB u sy M essage( "Savi n g b l ock field data .... ") 1 $ = MIO$ (STR$(IFLDNUM), 2, LEN(STR$(IFLDNUM))) IF LEN(l$) < 2 THEN 1 $ = "O'' + 1$ END IF ORV$= DATADRV$ PATH $= DATAPATH$ + DATAOIR$ '1--= BLOCK FIELD DATA FILE --1 FILE$= "\IF LD +I$+ ". DAT IF ( OpenFile( ORV$, PAT H $, F I LE$, OUTPUTMODE$, 3) <>SUCCESS) THEN CALL ERR.Warning( ''F il e A ccess", l rreg::SavelFld",_ ERRFLAG = -99 EXIT SUB END IF "Cannot write + Orv$ + Path$ + File$ ) PRINT #3 USING "\ \"; PORTDES$ PRINT #3, USING"#####.###.####.###+##.##+##.##"; SSDSADMODE; TRTUNTNUM ; COL WID !; COLLEN!; WDGANG ; TRAYFAC!; CO LCENTER !(O); COLCENTER!(I) PRINT #3, USING"#.## ### .####": MAG!; SSDSAD!; FLDPTNUM lF FLDPTN U M > 0 THEN FOR I = 0 TO FLDPTNUM PRINT #3, USING"+#### 1 #### #";FLDEDGE(I, 0); FLDEDGE ( I I ); EDGECODE(I) NEXT I END IF PRINT #3, US I NG ''###''; CALPTNUM FOR I = I TO CAL PTNUM PRINT #3, USING "\ \"; STTE$(1) PRINT #3, USING" t #### +##1111 ##.## ###.#'';IRCALPT( I O); lRCALPT{l, 1 ); DEPT H !(l); SS D !(I) NEXT! CloseFile 3 'I= UPDATE IRREGULAR FIELD LIBRARY --=I DRY$= DATADRV$

PAGE 176

PATH$= DATAPATH$ + DATADIR$ FILE$ = "\IRREGFLD .LIB" 167 IF ( OpenFile( ORV$, PATH$, FILE$, RANDOMMODE$ 4 ) <>SUCCESS) THEN CALL ERR Warning( "File Access " lrreg ::Save IFld ",_ Cannot open + Orv$ + Path$ + File$ ) ERRFLAG = 99 EXIT SUB END IF FIELD #4 15 AS PD$ 4 AS TU$ 2 AS EY$, 2 AS BT$, 2 AS CW$,_ 2 AS CL$, 2 AS SS$, 2 AS SM$ 2 AS WA$ 2 AS WO$ ,_ 2 AS CP$, 10 AS ED$ 2 AS NU$, 1 AS MF$ 2 AS MCW$ 2 AS MCL$ 10 AS MED$ ,_ 2AS MCP$ 'GET #4, IFLDNUM MCOLWID! = CSNG(CVI(MCW$))*0.l 'MCOLLEN! = CSNG(CV l (MCL$))*0. I 'MCALPTNUM = CV1(MCP$} LSET PD$ = PORTDES$ LSET TU$ = TRTUNT$ LSET EY$ = MKI$(ENERGY ) LSET BT$ = MK1$(BEAMTYPE ) LSET CW$= MKI$(CJNT (CO LW1D! 10!)) LSET CL$= MKI$ (C lNT(COLLEN 10! )) LSET SS$ = MKI$ ( CINT(SSDSAD! 101 )) LSET SM$ = MKI$(SSDSADMODE) LSET WO$= MKl$(WDGORN) LSET WA$= MKI$(WDGANG) LSET CP$ = MKl$ (C ALPTNUM) LSET NU$= MKI$(TRTUNTNUM) LSET ED$= DATE$ LSET MF$= MFLAG$ LSET MCW$ =MKI$(CINT(MCOLWID! 10! )) LSET MCL$ =MK1$(CINT(MCOLLEN! 10!) ) LSET MED$ =DA TE$ LSET MCP$ = MKl$(MCALPTNUM) PUT #4 IFLDNUM IF IFLDNUM = FIELDS + l THEN FIELDS = FIELDS + I LSET PD$ = "-99" PUT #4 FIELDS+ l END IF OoseFile 4 END IF END SUB --------------------' [ ---------. ------------------I SUBROUTINE : MFLDDEF O SYNOPSIS: fNCLUDE comrocs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB MFLDDEF STATIC 3800 DESCRIPTION : This subroutine displays an MLC field based on user input. The user selects an MLC field and c h ooses to edit, load, oppose or export MLC fie l ds I ASSUMPTIONS : This subroutine assumes valid input variables. GLOBAL V AR1ABLES : -----=== --------------

PAGE 177

168 ASYCOL O Assyma ti c colli mat o r used B$ 0 Temp orary s tring BEAMTYPE I O=photon; l =Co -60 ; 2=electron C$ I Input stri ng ( modified by STRIP) CALCFLAG O O=plan n ot c al c ulated l =plan calculated CALPTNUM O Number of calculation points CHC$() 0 An array of character s tring s whi c h make up main menu COLCENlER!O OX Y coordinate of collimater center (c m ) COLFLAG O Collimator defined (O= n o, l=yes) DAT ADIR$ I Dire ctory pointer to a spec ifi c patient DAT ADRV$ I Drive pointer to patient data sto rag e DAT AP A TH$ I Path pointer to patient data s t o rage DECA YFAC! 0 I so line de cay factor DEPTH! O O l so line depths DPHFLAG O Are depths defined (O=no, l=yes) ORV$ 0 Name o f the drive where FILE$ c an be found EDITMODE O Beam calc ulation s tatu s fla g ENERGY I Nominal energy ( Mev ) ERRFLAG M Status of the ftle 1/0 r o utine FIELDS O Number of irregular fields stored FILE$ 0 Temporary pointer to all library filenames FLDPTNUM O Number of vertices in fi eld o utlin es I IFLDFLAG O Field loaded ? (O=no, l=yes ) IFLDNUM O Current irregu l ar field number TMLCSA VE I Save MLC field or not (O=no, l=yes ). for 0, only collimator center i s calculated MFLAG$ I MLC field exists (N= no V=Varian, P=Philips) MLCTYPE O Type of MLC ( l = Varian, 2 = Philip s) NEXTSUB O Pointer to defau l t menu item NORMFLAG O Plan nonnnlized (O=no, l=yes ) PA TH$ 0 Name of the path where FILE$ can be found PATNAJv1E$ I Pati en t name PORTDES$ 0 P ort designation label ROW I Ind ex for first row in menu box SPD!O O Source t o point distance for each calc point SSD!O O Source t o skin di stance for ea.ch calc point SSDSAD! 1 SSD/SAD distance (cm) SSDSADMODE I O = SSD beam, 1 = SAD beam SSDSADMODE$ 0 SSD/SAD mode l abel TOPOINT O P oin ter to first record on sc reen TRA YFAC! 0 Tray fa c tor TRTFLAG O Treatment unit defined? (O= n o, l =yes) TRTUNT$ I Treatment unit TRTUNTNUM O Treatment unit file p ointe r I WDGANG O Wed ge angle ( degree s) WDGORN O Wedge orientation FlLES _US ED : SUBROUTINES_CALLED: CAL VIEWPORT Calculates the viewport for the graphics scree n DECAY Calculate i so tope decay factor DISDA TA Display mi sc data on graphix screen DISPIPG Display 1 page of calculation points DRWIFLD Draw irreguJar field ERR.menu5c Di s play error message on line 5 of menu area GETCALIBR Get treatment unit calibration fi l e GEl lFLD Get irregular field HEADING Print screen titl e in reverse video on row l IR7 MLC field editor KYB GetSpecFonn$ Get keyboard input in spec ified format KYB PAGEKey sO FF Di sa ble PGUP and PGDN keys KYB PAGEKey sON Enable the pa g in g keys (PGUP, PGD N). MLCI PAGE Di spalys one page of ML C beam information MLCSELECT Selects MLC type MLCEXPORTV Crea te s expo rt file co ntainin g varian MLC field data MLCOPPOSE Creates o ppo se d ML C field PAGEDN Ke e p s track o f page information and ftle pointer information and di sp la ys th e next page if there i s one PAGEUP Keep s track of page information and file p ointer

PAGE 178

t infonnation and displays the previous page if th ere is one SETVJEWPORT HALO fun ction, sets active viewpon 169 S TRIP Searches input string 8$ FOR 11 -,= ,@,<,,+ 11 and spaces. Returns every thin g up to and after delimeter & ASCII value AUTHOR: Siyoog Kim REVISION H1 STORY : '[--, --~---~--------------------------_ ___ _____________________________ ----------------------------------------------------------------' I MNFLDO : IFLDFLAG=O CAL~CFLAG = 0 TR1'FLAG=O COLFLAG=O DPHFLAG=O NORMFLAG=O FLDPTNUM=O PORTDES$ = 11 CALPTNUM =0 WDGANG=O TRA YFAC! = 1 COLCENTER!(O) = O! CO LCENTER! (l) = O! ASYCOL=O IRPAGE = 1 IMLCSAVE=O 'I=OPEN FIELD LIBRARY== DRY$= DAT ADRY$ PATH$= DATAPATH$ + DATADJR$ FILE$= "\IRREGFLD.LIB" IF ( OpeoFile ( Orv$ Path$ File$ RANDOMMODE$ 4) <> SUCCESS ) THEN CALL ERR Warning ( "File Acces s", lrreg: : IFldDef ',_ "Cannot open + Orv$ + Path$ + File$ ) EXIT SUB END IF 'rev-i FIELD #4, 1 5 AS PD$ 4 AS TU$, 2 AS EY$, 2 AS BT$ 2 AS CW$._ 2 AS CU, 2 AS SS$, 2 AS SM$, 2 AS WA$, 2 AS WO$,_ 2 AS CP$,10 AS ED$, 2 AS NU$,_ 'rev-f 1 AS MF$, 2 AS MCW$, 2 AS MCL$, 10 AS MED$, 2ASMCP$ NUMRECS = LOF ( 4 ) / 128 FOR FIELDS = 1 TO NUMRECS GET #4, FIELDS IF LEFT$(PD$ 3) = "-99" THEN EXITFOR END IF NEXT FIELDS FIELDS = FIELDS l IF FIELDS = -1 THEN L SET POK$ = "-99" PUT #4 1 FIELDS=O END IF IF FIELDS = 0 THEN OS Sound 261, 2 EXIT SUB END IF 'IDISPLAY IRREGULAR FIELD LIBRARY ===I MNFLD5 : TITLE$=" IRREGULAR FIELDS FOR :"+ PATNAME$ + II II CLS CAL L HEADING ( TITLE $ )

PAGE 179

1 70 LOCATE 2 l PR I NT II # F IE I .D LOCATE 3 1 PRINT TOPO I N T = 1 PO I NTER= 1 UN I T Mv COL SET SSD/SAD WDG CALC LAST MLC' '; W x L( c m ) (c m ) ANG POINTS UPDATE Var Phi "; IFLDNUM = FIELDS CALL IRl P AGE CAL L MLCl P AGE ERASEC H C$ C H C$ ( 0 ) = MLC FIELD EDITOR MNFLD 3: CALL MENUCLR L OCATE ROW + 1 10 PRTNT 11 # ... Field# to be lo a ded ." ; LOCATE ROW +2 1 0 PRINT # E ... Fi e ld # t o be edited ."; LOCATE ROW + 3, 1 0 PRINT "# 0 ... F i e ld # t o be oppo s ed ; LOCATE ROW+ 1 50 PRINT X ... Exp o rt MLC Fi e l d s. ; 'LOCATE ROW + 2 50 PRTNT l .. .lm po rt MLC Field s "; MNFLD2 : l RPAGE = I ED I TMODE =O DO IF IFLDNUM > 1 5 THEN LOCATE ROW + 3 59 PRINT P gUp P g Dn "; CALL KYB PAG E K eys ON END IF LOCATE ROW 3 PRINT US I NG ENTER : <##> "; IFLDNUM ; B $ = KYB GetSpe c F o rm$ ( "{XxO 1 2 345 6 789} [##)[.{EeO o } ) 11 ) CAL L KYB PAGEKey s OFF SELECT CASE 8 $ C ASE 11 PGUP CALLPAGEUP CASE 11 PGDN CALLPAGEDN CASE ES C 11 C l os eFil e4 EXIT SUB CASE RET 8$ ="11 GOTOMNFLD4 CASE "x ", 11 X C ALL MLCSELECT IF ERRFLA G = -99 THEN ERRFLAG == 0 GO T OMNFLD3 END IF IF ML CT YPE == J THEN O LDD A TADRV $== D A TADR V$ OLDDATAPAT H $ = DATAPATH $ OLD DAT ADIR $ = DAT ADIR$ CAI,L MLCEXPORTV

PAGE 180

Cl os eFil e 4 DATADRV $= 0LD D ATADRV $ DATAPATH$ = 0LDDATAPATH $ D A T ADJR $ = OLD DAT ADIR$ EL S EIF MLCTYPE = 2 THEN 'C AI L ML C EXPORTP END IF GOTOMNFLDO CASE "i II I C ALL MLCSELECT IF ERRFLAG = 99 THEN ERRFLAG = O GOTOMNFLD 3 END IF IF MLCTYPE = 1 THEN CALL MLCIMPORTV ELSEIF ML C TYPE = 2 THEN CALL ML C IMPORTP END IF GOT O MNFLD 3 CASE ELSE CALL S TRIP 171 fF V AL ( C$ ) < 1 OR V AL (C$) > FIELDS THEN MNFLD4 : CALL ERR menu 5c(" l NV ALID FIELD NUMBER RE ENTER ","", ") G O TOMNFLD2 ELSE IFLDNUM = V AL ( C$ ) B $ = RI G HT$ ( UCASE$ ( B$ ), l ) GET #4, lFLDNUM MFLAG$ = MF$ fF MFLA G$ = V THEN ML CT YPE = 1 EL S EIF MFLAG $ :: P THE N MLCTYPE =2 ELSEIF MFLAG$ = "N THEN IF B$ = "" THEN CALL ERR menu5 c(" NO ML C FIELD -RE ENTER ","","") GOTOMNFLD 2 ELSEJF B$ = "E" THEN C ALL MLCSELECT fF ERRFLAG = 99 THEN ERRFLAG =O GOTOMNFLD 3 END IF E N DTF END IF EXITD O END IF END SELECT LOOP I I=: = EDIT FIELD =-= IF B $ = E THEN EDITMODE = l END IF 'I== OPPOSED FIEL D== IF B$ = O THEN GET #4 IFLDNVM TRTUNT$ = TU$ ENERGY = C VI (E Y $) BEAMTYPE = CVI(BT $) WDGORN = CVl(W0$ ) WDGANG = CVI(W A $)

PAGE 181

MFLAG$=MF $ CloseFile 4 IF MFLAG$ = "N" THEN 172 CALL ERR.menu5c("INV ALID MLC FIELD# -RE-ENTER'',"" "") GOTO MNFLD2 END IF CAI .L MLCOPPOSE ERRFLAG=O GOTOMNFLDO ENDlF 1 1--LOAD IRREGULAR FIELD=== CALL DisplayBusyMessage ( "Loadjng field data ... ") GET #4, IFLDNUM TRTUNTNUM = CVI(NU$) WDGANG = CVl(W A$) WDGORN = CV1(W0$) MFLAG$=MF$ IF WDGANG <> 0 THEN WEDGE=TRUE ENDIF C l oseFile4 MNFLDI : CAI, l GETCALIBR CALL GETIFLD IF SSDSADMODE = 0 THEN SSDSADMODE$ = "SSD" ELSE SSDSADMODE$ = "SAD" END IF 'I===== CHECK FOR EDITING ====I IF EDITMODE = I THEN CALLIR7 EDITMODE=O IF ERRFLAG = 0 THEN GOTOMNFLDI ELSE NEXTSUB=2 ERRFLAG =O COLFLAG=O CALLS SETVIEWPORT(Ol, O!, I!, J !, 0, 0) EXIT SUB END IF END IF IF BEAMTYPE = I THEN CALL DECAY ELSE DECA YFAC! = I END IF CALL CALCVIEWPORT 1DRAW TEXT/GRAPHlCS SCREEN == : -I DEPTH!(CALPTNUM + 1) = DMAX! IF SSDSADMODE = 0 THEN SSD! (C ALPTNUM + J ) = SSDSAD! ELSE SSD!(CALPTNUM +I )= SSD!(I) END IF SPD!(CALPTNUM + 1 ) = SSD!(CALPTNUM +I)+ DEPTH!(CALPTNUM + l) CALLS SETVIEWPORT (O!, O!, 1 !, 1 !, 0, 0) CALL DRWIFLD CALL DISDATA TOPOINT= I CALL DISPIPG

PAGE 182

IF CALPTNUM > 0 THEN NEXTSUB =3 ELSE NEXTSUB =6 ENDIF 173 ERRFLAG = -99 END SUB '[--= ----------------------------------------------------------------------------------------I I SUBROUTINE: GETMFLD() I SYNOPSIS: I NCLUDE co m.r oes.inc LNCLUDE co mir.in c lNCLUDE co mir 3.i n c SUB GETMFLD STATIC 3900 I DESCRIPTION : Thi s s ubr o utine gets MLC fi e ld data from the til e I ASSUMPTIONS : Thi s s ubroutine assumes valid input variables. I GLOBAL VARIABLES : CALPTNUM 1 Number o f c al c ul ation points COLLANGO! I Collimator angle in degree COLCENTER!O IX Y coo rdinate o f collimate r cente r (cm) COLLEN! 1 Collimator len g th (c m ) COLWID! I Collimator width (c m ) DAT ADIR$ I Dire c tory pointer to a spec ifi c patient DAT AD RV$ I Drive pointer to patient dat a s t orage DAT AP ATH$ I Path pointer t o patient data storage DEPTH! O I I so lin e depth s ORV$ 0 Name of the drive where FILE$ c an be found EDGECODEO I Edge code EDITMODE I Beam cal c ulation status flag FLDEDGEO I Irregular field outline coordinates (c m I 00) FLDPTNUM I Number of vertices in fie l d outlines JFLDFLAG O Field loaded? (O=no, l =yes) IFLDNUM O Current irregular field number IR CALPTO I X Y coo rd o f co llimat o r points ( temp arra y) LEAFNUM O Number o f leaves in one s id e (26 f or Varian, 40 for Ph ilips) LEAFAO! O I Leaf position for A side LEAFBO! () l Leaf p os iti o n for B side MLCMAGO! 0 Mag. for pr ojec ti o n of MLC from 10 0cm c o surface MLCOFFSETXO I MLC offset in X -d ir (c m ) MLCOFFSETYO I MLC offse t in Y-dir (cm) PA TH $ 0 Name of the path where FILE$ c an be found PORTDES$ I Port designation label SITE$ 0 I Cal e p o int label SPD !() l Source t o point di s tance for each c al c p o int SSDIO I Sour c e to s kin distance for ea c h calc point FILES USED : CD: DATAPATH$\DATADIR$ MFLO## DAT MLC field s hape coor d SUBROUTINES _C ALLED : AUT H OR : Siyong Kim REVlSION HI STORY: I [---------------------------------------====== -------------------------------------------------' 1 $ = MID$(STR$ ( JFLDNUM ), 2, LEN ( STR$ ( IFLDNUM ))) IF LEN ( $)< 2 THEN

PAGE 183

1 $ = O + 1 $ END IF ORV $= DATADRV $ PATH $ = DATAP A TH $ MFII.E $ = DATADf R$ + \MFLD + 1 $ + ". D A T MRR0 2: 174 IF ( O pe nFil e( Orv $, P a th $, MFile$ TNPUTM O D E$, 3) <> SU CCE S S) THEN C ALL ERR W am i n g( '' Fil e A ccess", lrr eg:: G e tMFld ,_ "C ann o t o pen + Orv $ + P a th$ + Fil e$ ) EXIT S UB ENDTF INPUT #3 PORTDES $ INPUT # 3, COLWID !, C OLLEN!, C OL CE NTER !(O), C OL C ENTER !( l ), COLLANGO !, MLCOFF S E T XO !, ML C OFF SE TY O! ML C MAGO INPUT # 3, LEAFNUM LEAFNUM =2 6 FOR I = 0 TO LEAFNUM l INPUT # 3, LEAFAO !( I ), LEAFBO (I ) NEXTI IF EDITMODE = 0 THE N INPUT # 3, FLDPTNUM I = R.,DPTNUM IFl > OTHEN REDIM FLD E DGE ( O TO I 0 TO 1 ) ED G E C ODE (O T O I ) IF FLDPTNUM > 0 THE N FOR I = 0 TO FLDPTNUM INP U T # 3, FLDEDGE (I, 0) FLDEDGE (I, l ), EDGECODE ( I) NEXTI IFLDFLAG = l END IF END IF ELSE INPUT # 3, DUMMYNUM IF D U MMYNUM > 0 THEN FOR I = 0 T O DUMMYN U M INP UT #3, DUMMY I D U MMY 2, DUMMY 3 NEXTI END IF ENDTF INPUT # 3, C ALPT NUM OLDPNT S = C ALPT NU M I = CALPTNUM + 1 REDIM IRCALPT ( l TO I 0 TO 1 ), DEPTH !( T O I ), SSD!( l TO I ) REDIM SPD! ( l T O I ) S ITE$ ( TO I ) IF CALPTNUM > 0 THEN DPHFLAG = I FOR I = 1 TO CAL PTNUM INP U T # 3, S ITE $( J ) INPUT #3 IR C ALPT ( I 0), IR C ALPT ( I 1 ), DEPTH (! ), SSD !( I ) SPD !(I) = SS D !(I) + DEPTH !( J ) NEXTI END IF Cl os eFil e 3 'I== = REVERT CAL POINT ACCORDING TO COLLlMATOR ANGLE ===I IFEDJTMO D E = 0 THEN EXIT S UB E ND IF IF COLLANGO <> 0.0 THEN IF CALPTNUM > 0 THEN C OLANGRAD O!= COLLAN GO!* PI !/ 1 80.0 SAO !=S lN (C OLANG RADO !) CAO != CO S(C OLANGRADO !) FOR I = 1 T O C ALPTNUM CPX I = IR C ALPT(l 0 ) 0.0 1 C PY = IRCALPT ( l 1 )*0.0 1 CCWCP X! = C PX !*C AO CPY !*S AO CCWCPY = CPY!*CAO! + CPX !*S AO! IRCALPT ( l O ) = CINT ( C C WCPX !* 1 00!)

PAGE 184

IRCALPT(I, I)= ClNT(CCWCPY!* 100!) NEXTI END IF END IF 175 END SUB I[----~---------mwm mm--------===== :=======------: ==--------------------------------------------I SUBROUTINE: IR 7 () I SYNOPSIS: INCLUDE co mr ocs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB lR7 STATIC 4000 I DESCRIPTION: This subroutine is the MLC field m ain editing 1nenu. Control is transferred to the appropriate routine based on which function key is pressed I ASSUMPTIONS : This s ubr outi ne assumes valid input variables. GLOBAL_ VARI.ABLES : B$ I Temporary string BACKCOLR I Color index for background BT! 0 Lower viewport coordinale for current window CALPTNUM I Nu1nber of calculation points CHC$() 0 An array of character strings which make up main menu COLLANG! I Collimato r angle in degree CONTSHIFfX! I MLC offset in X-dir (cm) CONTSHIFfY! I MLC offset in Y dir (c m ) DPHFLAG I Are depths defmed (O=no, l=yes) ED I TMODE I Beam cnlcu l atioo status flag ERRFLAG M Status of the file 1/0 routine FORECOLR I Color index for foreground IFLDFLAG I Field loaded? (O=no, l=ye s) LIMIT$() 0 Label for active comer LT! 0 Left nonn device coord. for viewports current window MFLAG$ I MLC fie ld exists (N=no, V=Varian, P=Philips) MLCOPTlMODE I Indicate type of fit (l=auto/2=-manual) MLCSEI'FLAG I MLC is set? (O=no, !=yes) MLCSTART I Indi cates MLC edit type ( l=autofit, 2=under, 3=over, 4=:manual) MXDIST! 0 NEXTSUB O Pointer to defaul t menu item OPTIERRFLAG M Status of the MLC editing ROW I Index for first row in menu box RT! 0 Right nonn. device coord. for viewports current window TOPOINT O Pointer t o ftrSt record on sc r een TP! 0 Top norm. device coo rd for viewports current window WDGANG O Wedge angle (degrees) FILES _US ED : None SUBROUTINES_CALLED : AUTOFIT Carry out geometric optimization for MLC field automa_tically AUTOOVER Carry out geometric overblocked optimization for MLC field automatically AUTOUNDER Carry out geo m etric underblocked optimizatio n for MLC field automatica U y CONVERT ANG Convert collimator angle in degree to radian and get sine, cosine values DISDA TA Display isodose/phantom heading s and data

PAGE 185

t t t DISPlPG Di sp l a y I pa ge o f c al c ul a ti o n po int s DRWFLD Dr aw field o utlin e IR 3 CLCPNT D igi ti ze c alcul a ti o n po in ts IR 3 PNTDPH Inp ut c al c ulati o n d e pth s KYB M e nuS e le c ti o n $ G e t m e nu se l ec ti o n KYB PAGEKe ysO FF Di s abl e PGUP and PGDN key s 176 KYB PAGEK e y s ON Enable th e pa gi n g k eys ( PGUP P G DN ). LBAFRETRIV Se t e xi s tin g ML C fi e ld MANUFJT Carry o ut geo metri c o pti1ni zatio n f o r M.L C fie l d manuall y MENU CL R C l e ar m e nu di s pla y sec t io n MFLDDA TA Get co ll i m a t o r o pen i n g an d fie ld o utlin e fo r ML C fi e l d MLCINI Se t ML C dimen s i o n and initial l eaf p os iti o n MLCGET ANG Ge r co llimat or an g l e in d egree MLCSETMEN U Di s pla ys ML C fi e l d e d i t or me n u MLC S HIFTX Ge t M.L C o f fse t i n X-dir MLCSHIFfY G e t ML C o ff s e t in Y -d ir SA VEMFLD Save MLC fi e ld d a ta SETVIEWPORT HALO fun c tion se t c urrent vi e w port t o ar ea s pecified b y the diagonally opp ose d n o rmali ze d d ev i ce coo rd i na te pai rs I A U THOR : S i yo n g Kim I REVI S ION HIST O RY ; I [-------------------=====------------------------------~------------I I LT != 4 5 TP = 1 5 RT != .95 BT I = .85 MXDI S TI = 0 1 LIMIT$ (0) = L o w e r LIMIT$ ( 1 ) = Upp er" C ALL S S ETVlEWP O RT (O!, O!, 1 1, 1 0, 0) IF EDITMODE = l THEN IF MFLAG $ = "V 11 OR MFLAG $ = P 11 THEN CALLML C INI C ALL L EAF RETRIV ML CS E fFL A G = l ML CO P T IM O D E = 1 ELSE C OLL ANG = 0 C O NT S HIFf X! = O! C ONTSHIFl' Y! = O! CALL C O NVE RT ANG END IF CALLDRWFLD C ALL DISDATA TOPOINT = I CALL DISPIPG NEXTSUB = 1 ENDIF 'I= T O P O F MENU L O OP =-== ML CS TART = 0 OPTIERRFLA G = 0 DO ERRFL A G =O IF IFLDFL AG = 1 THE N C H C$(0) = 11 ML C FIELD EDIT O R 11 END IF CALL MENUCLR [F OPTIERRFLA G <> 0 THEN NEXTSUB = 1 0 END IF IF IFLDFLA G = 1 THEN

PAGE 186

CALL MLCSETMENU END IF IF DPHFLAG = l THEN IRPAGE=O CAI,L KYB PAGEKeysON END IF IF OPTIERRFLAG = 77 THEN OS.Sound 261. 2 LOCATE ROW+ 3, 10 COLOR BA CKCOLR, FORECOLR PRINT "LEAF REACH LIMlT COLORFORECOLR.BACKCOLR ELSEIF OPTlERRFLAG = -88 THEN OS.Sound 261, 2 LOCATE ROW+ 3, 10 COLOR BACKCOLR, FORE COLR PRINT FIELD OUT OF MLC COLORFORECOLR.BACKCOLR ELSEIF OPTfERRFLAG = -99 THEN OS.Sound 261, 2 LOCATE ROW+ 3, 10 COLOR BA CKCO LR FORECOLR 177 PRINT "LEAF REACH LIMIT & FIELD OUT OF MLC" COLORFORECOLR.BACKCOLR ELSEJF OPTIERRFLAG = -100 THEN OS.Sound 261, 2 LOCATE ROW+ 3, 10 COLOR BA CKCO LR FORECOLR PRINT "FCELD IS OUTSIDE THE MLC" COLORFORECOLR BACKCOLR ELSEIF OPTIERRFLAG = -377 THEN OS.Sound 261, 2 LOCATE ROW + 3, 3 COLOR BACKCOLR. FORECOLR PRINT "LEAF REACH LlMJT & MAX. LEAF DrF EXCESS LIMIT" COLORFORECOLR,BACKCOLR ELSEIF OPTIERRFLAG = -388 THEN OS .So und 261, 2 LOCATE ROW + 3, 3 COLOR BACKCOLR, FORECOLR PRfNT "FIELD OUT OF MLC & MAX LEAF DCF. EXCESS LIMIT" COLORFORECOLR,BACKCOLR ELSECF OPTIERRFLAG = -399 THEN OS Sound 261, 2 LOCATE ROW + 3, 3 COLOR BACKCOLR. FORECOLR PRINT "LEAF REAC H LIMIT FIELD OUT OF MLC & MAX LEAF DJF. EXCESS LIMIT COLORFORECOLR,BACKCOLR ELSEIF OPTIERRFLAG = -33 THEN OS.Sound 261, 2 LOCATE ROW + 3, 3 COLOR BACKCOLR. FORECOLR PRINT "MAX. LEAF DIF EXCESS LIMIT" COLORFORECOLR,BACKCOLR END IF OPllERRFLAG = 0 'I=-USER INPUT ==I B$ = KYB .MenuSelection$ CALL KYB PAGEKeysOFF SELECT CASE B$ CASE "Fl" MLCSETFLAG = l CALL AUTOFIT

PAGE 187

MLCSTART= I NEXTSUB = l CASE "F2" MLCSE'I'FLAG = 1 CA I ,L AUTOUNDER MLCSTART=2 NEXTSUB=2 CASE "F3" MLCSETFLAG = I CALL AUTOOVER MLCSTART=3 NEXTSUB =3 CASE "F5" lF MLCSETFLAG = l THEN MLCSTART=4 END IF MLCSETFLAG = 1 CALL MANUFIT MLCSTART=4 NEXTSUB=5 CASE "F6" lF WDGANG > 0 THEN OS Sound 261, 2 GOTODOOVER END IF STARTOLD = MLCSTART CALL MLCGET ANG IF ERR.FLAG = -99 THEN ERRFLAG=O MLCSTART=STARTOLD GOTODOOVER END IF 178 lF MLCST ART= 1 OR MLCSTART = 0 THEN CALL AUTOFIT ELSEIF MLCST ART = 2 THEN CALL AUTOUNDER ELSEIF MLCST ART= 3 THEN CAI ,I, A UTOOVER ELSE CALL AUTOFIT MLCSTART= I NEXTSUB = l END IP CASE "F9" CALL MLCSHIFfX lF ERRFLAG = -99 THEN ERRFLAG=O GOTODOOVER ENDlF MLCOPTIMODE = l CALL MFLDDA TA CALLDRWFLD CALL DlSDATA CALL DISPIPG CASE "FIO" CALL MLCSHIFl'Y TF ERR.FLAG = -99 THEN ERRFLAG=O GOTODOOVER BNDIF MLCO,.,,.P'I...-'IMODE = l CALL MFLDDATA CALLDRWFLD CALL DISDATA CAI.L DISPIPG

PAGE 188

1R 7ESC : DOOVER : CASE "F7" IF MLCSBlFLAG = 1 THEN CALL 1R3CLCPNT ELSE OS Sound 261, 2 END IF CASE "Fl l IF CALPTNUM > 0 THEN CALL IR3PNTDPH ELSE OS Sound 261, 2 ENDIF CASE "PGUP" CALLPAGEUP CASE "PGDN" CALLPAGEDN CASE "ESC" lF MLCSElFLAG = 1 THEN MLCSElFLAG = 0 MLCOPTIMODE = 0 CALL SA VEMFLD 'REV ELSE MLCSElFLAG = 0 MLCOPTIMODE = 0 NEXTSUB = 1 ERRFLAG = -99 END IF EXIT SUB END SELECT LOOP END SUB 179 I [---== ----==--===---------------==-= ==========---------------------------------' SUBROUTINE: ISODRW O SYNOPSIS: INCLUDE comrocs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB I SODRW STATIC 4100 I DESCRIPTION : I This subroutine draws original isoce nt er before MLC offset I ASSUMPTIONS : This s ubr o utin e assu1nes valid input variables GLOBAL_ V ARlABLES : SAXIS! I Lower left Y world coo rdin ate CLROLD I Original color ind ex for graphics CONTSl-OFI'Y! I MLC offset in Y-dir. (cm) LAX.IS I I Lower left X world coo rdinat e LEAFCOLR I Color for MLC leaf OLDSHIFfX! I MLC offset in X-dir. (cm) F1LES_USED: None I SUBROU TINES CALLEO :

PAGE 189

180 l NQCLR HALO inqu ir e color index at (X, Y) LNABS HALO function, draws a line from the c urrent graphics cursor position to the specified (X,Y) coo rdinat es. The graphic c ursor position i s updated to ( X ,Y). MOV ABS HALO move graphics cursor to ( X .Y) SETCOLOR HALO set active color AUTHOR : Siyong Kim REVISION HISTORY: '[-----==--------------------------------------------------------------------------------------' I 'I---ORA W ORIGINAL ISOCENTER BEFORE OFFSET--=I CALLS INQCLR(LAXIS !. BAXIS !, CLROLD) CALLS SETCOLOR(LEAFCOLR) XI !=OLDSHIFI'X !-0.25 Yl!=CONTSHLFl'Y!-0 .25 XF!=OLDSHIFfX !+0.25 YF!=CONTSHIFfY !+0. 25 CALLS MOV ABS ( XI! ,CO NTSHlFI'Y!) CALLS LNABS(XF !,CON TSHIF"fY! ) CALLS MOY ABS ( OLDSHIFfX!,Yl !) CALLS LNABS ( OLDSHIFTX! YF!) CALLS SETCOLOR(CLROLD) END SUB I [ -------------------------------------------------------------------------------------------------------' I SUBROUTINE: LEAFINI () SYNOPSlS: INCLUDE co mr ocs.inc lNCLUDE comir.inc INCLUDE comir3.inc SUB LEAFINI STATIC 4200 DESCRIPTION : This s ubr outine set initial values for leaf position ASSUMPTIONS : This subroutine assumes valid input variables GLOBAL VAR IABL ES: AXDATA!O I Xcoo rdinatedataofleaf A A YDATA!O I Ycoor dinate data of leaf A BXDATAIO IX-co o rdinate data of l eaf B BYDATA !O I Y-co o rdinate data of leaf B HLEAFNUM I 1/2 of number of leaves LEAFCOLR I Color for MLC leaf LEAFLEN 0 Length of MLC leaf LEAFNUM O Number of l eaves in one side (26 for Varian, 40 for Philips) LEAFWID 0 Width of MLC leaf FILES USED None SU BROUTI NES_CALLED: AUTHOR : t Siyong Kim REVISION Hl STORY:

PAGE 190

18 1 '[ -----------------------------------------------------------------------__ ______ __ ___ ' I= : = INITIALlZR LEAF DATA =--1 J =LEAFNUM 1 FOR l = OTO J BXDATA !(0 ,1 )::0.0 BXDA TA !( 1,l )= LEAFLEN BXDA TA !(2 .1 )=LEAFLEN BX.DAT A !(3, 1 )=0.0 BXDATA !(4 ,1 )=0 0 AXDATA! (0, 1 )=0 0 AX.DATA !( l .l )=LE AFL EN AX.DAT A 1( 2 I )= L E AFLEN AXDATA !(3, 1) =0.0 AXDATA! ( 4 0 =0 0 NEXTI B YDAT A 1( 0,0 ) = -( HLEAFNUM LEAFWID !) BYDATA! ( l 0 ) = HLEAFNUM *LEAFW I D B YDA T A ( 2,0 )= B YDA TA ( O O ) +LEAFW I D BYDATA !( 3 0 )= BYDATA !( O O ) +LEAFWID! BYDATA! ( 4 0 )= -HLEAFNUM !* LEAFWfD A YDATA !(O,O)=( HLEAFNUM !* L EAFWlD !) A YDATA! ( l ,0)=HI.EAFNUM !* LEAFWID AYDATA !( 2 ,0)= BYDATA !( O ,O) +LEAFW I D A YDA TA (3, 0 )= B YO A TA ( 0 0 ) +LEAFWID A YDATA !( 4 0 )=HLEAFNUM !* LEAFWID J = LEAFNUM-1 FOR l = l TOJ BYDATA! ( O l )= BYDATA! ( O,I-J )+ LEAFWID BYDATA !( l f) = BYDATA! ( 1 1 l ) +LEAFWID BYDATA !( 2 l )= BYDATA! ( 2 ,l l )+ LEAFW10 BYDATA !(3, l) = BYDATA! (3 ,l l )+ LEAFWID BYDATA !( 4 l )= BYDATA !( 4 I l )+ LEAFWID A YDATAl (O, l )= AYDATA !{0, 1 1 )+ LEAFWTD A YDATA !( l,l )= AYDATA !( l .1 l )+ LEAFWID A YDATA !(2, l )= A YDATA !(2 ,J l ) +LEAFWID A YOATA !(3, l )= A Y DATA !(3, l l )+ L E AFWID A YDATA !( 4 l )=AY DATA !( 4 l l ) +L E APWID N E XT! END SU B [------------------------------------------------' SUBROUTINE : LEAFRETRIV () S YNO P SIS : INCLUDE c omro cs .in c I NCLUDE c omir.in c INCLUDE comir 3 in c SUB LEAFRETRIV STAT I C 4 300 DES C RIPTION : This s ubroutine s et e x i s tin g MLC fi e l d ASSUMPTIONS : Thi s s u br o uti n e ass um es v alid inpul vari a bl es. GLOBAL VAR I ABLES : AXDA TA 0 I X -coo rdinate data o f l ea f A A YDA T A Q I Y -coo rdinat e data o f l e af A BXDATA !Q I X -coor d i n a t e dar ao fl eaf B ------

PAGE 191

182 BYDATA! O I Y co o rdinar e data o f leaf B COLLANG I C o llimat o r angle in degree COLLANGO l Co llimat o r angle in degre e CONTStflFJ'X I MLC o ff se t in X dir (c m ) CONTStflFl'Y! I MLC o ffset in Y-dir ( cm ) FLDEDGEO I Irregular field outline coo rdinat es ( crn 100 ) FLDPTNUM l Number of verti c es in field outline s HI EAFNUM I 1 / 2 of number of leave s LEAFAO !O 1 Leaf po s ition f o r A s ide LEAFBO! O I Leaf po s ition for B s ide LEAFLEN 0 Length o f MLC leaf LEAFNUM O Number of leaves in one s ide ( 26 f o r Varian 40 f o r Philip s) LEAFWID 0 Width of MLC leaf MLCMAG 0 M ag. f o r proj ec tion of ML C fr o t n 1 00c m t o s urfa ce MLCOFFSETXO I MLC o ff s et in X dir (c m ) MLCOFFSETYO! I MLC off s et in Y-dir ( cm ) XMAG! O O X c o ord f o r field outline with off s et (c m ) XORG 0 Ori g inal X -coo rd for fi e ld o utl i ne (c m ) YMA G!O O Y -coo rd f o r field o utlin e with o ff se t (c m ) I FILES USED : N o ne I SUBROUTINES CALLED : CONVERT ANG C o nvert c ollimator angle in d eg ree ro radian and get s in e, c o s ine values t I AUTHOR : Siyong Kim I REVISION HJSTORY : [= = = --==---=== = ==== -= =--=-===-===--====== -= = --=-------t I --= GET THE OLD LEAF POSITION ---1 J=LEAFNUM 1 FOR l = OTOJ BXDAT A! ( O,I)=LEAFBO (I)*MLCMAG BXDATA !( l.I ) =BXDATA! ( 0 1 ) -LEAFLEN BXDATA l(2 .I )= BXDATA !(O, I) LEAFLEN BXDATA! (3, l )= LEAFBO (l )* MLCMAG BXDATA !( 4,I) = LEAFBO!(l ) *MLCMAG AXDATA! ( O.I ) =LEAFAO! ( I ) *MLCMAG AXDATA !( l I)=AXDATA !( O I ) +LEAFLEN AXDATA !( 2 1 )= AXDA TA! ( O D+LEAFLEN AXDAT A ( 3.I)=LEAF AO !(l ) *MLCMAG AXDATAl ( 4.l) = LEAFAO! ( l ) *MLCMAG NEXT! BYDATA!(0,0 )=-( HI .EAFNUM !*LEAFWID! ) BYDATA! ( l,0 )=HLEAFNUM! LEAFWID BYDATA !(2, 0 )= BYDATAl ( O O ) +LEAFWID BYDATA! ( 3 0 )= BYDATA !(O,O) +LEAFW1D 1 BYDATA !( 4 0 )=HLEAFNUM!*LEAFWID AYDATA!(0 0 )=-( HLEAFNUM *LEAFWJD !) A YDATA (l 0)= HLEAFNUM!*LEAFWID A YDA TA ( 2 0 )= BYDAT A ( O,O ) +LEAFWID AYDATA!(3 0 )= BYDATA !( O,O ) +LEAFWID! A YDATA (4 0 )=H1 EAFNUM *LEAFWID I J=LEAFNUM 1 FOR l=l TO J BYDATA !(O ,I) = BYDATA !( O I l ) +L E AFWID BYDATA !( l .I )= BYDATA !( 1,1 l )+ LEAFWID BYDATA !( 2 l )= BYDATA l( 2 I l ) +LEAFWID BYDATA !( 3 I )= BYDATA ( 3 ,J l ) +LEAFW L D! BYDATA! ( 4 l )= BYDATA ( 4 1-1 ) +LEAFWID!

PAGE 192

AYDATA!(O,l)=AYDATA!(0,1-l)+LEAFWID! A YDATA!{l,D=A YDATA!(l,1-l)+LEAFWID! A YDATA! (2, l )=AYDAT A !(2,1-l)+LEAFWID! AYDATA!(3 I )=AYDATA!(3,I-l)+ LEAFWID A YDATA!(4.l )=AY DATA! (4, I l )+ LEAFWID NEXTI COLLANG! = COLLANGO! CALL CONVERT ANG CONTSHIFl'X! = ML CO FFSETXO CONTSHIFrY! = ML COFFS ETYO OLDSHIFfX = CONTSHIFfX 'I--GET THE CONTOUR ---1 FOR 1= 0 TO FLDPTNUM 183 XORGI-FLDEDGE(l,0)*0.01 'XORG!; ORIGINAL CONTOUR DATA YORG !=FL DEDGE(I 1)*0 01 XMAG!(I )=XO RG !+CO NTSHIFfX YMAG! ( l )=YO RG !+CO NTSHIFI'Y 'YMAG!; SHIFIED NEXT! 'I== GET THE CAL POINT ==--=I 'IF CALPTNUM > 0 THEN CALL ML CCALPT 'END IF END SUB SUBROUTINE: GETIFLD20 SYNOPSIS: INCLUDE comrocs.inc INCLUDE comic. in c INCLUDE comir3.inc SUB GETIFLD2 STATIC 4400 DESCRIPTION: Thi s sub r out in e gets irr egular fi eld dala from Lhe file. ASSUMPTIONS : This subroutine assumes valid input variables. GLOBAL_ VARIABLES : CALPTNUM O Number of calculation points COLCENTER!O OXY coordinate of collimater center (c m ) COLLEN! 0 Collimator length (c m ) COLWID! 0 Collimator width (c m ) DAT ADIR$ I Direct ory pointer to a specific patient DATADRV$ I Driv e pointer to patient data storage DATAPATH.$ I Path pointer to patient data sto r age DEPTHI O O I soli n e depths ORV$ 0 Na.rne of th e drive where FILE $ can be f o und EDGECODE O O Edge code ERRFLAG I Status of th e file I/0 routine FILE$ 0 Temporary pointer to all library filenames FLDEDGEO O Irregular field outline coo rdinates (cm* 100 ) FLDPTNUM O Number of vertices in field outlines IFLDNUM I Cu rrent irregular field number lRCALPT O O X Y coo rd of co llimator point s (temp array) MAG! 0 Field magnification fact or PA TH$ 0 Name of the path where FILE$ can be found PORTDES$ 0 Port designation label SITE$() 0 Cale point label SPD!O O Source t o point di s tance for each calc point SSD!() 0 Source to s kin distance for each calc point SSDSAD! 0 SSDISAD distance (cm) SSDSADMODE O O = SSD beam, 1 = SAD beam TRA YFAC! 0 Tray factor

PAGE 193

184 TRTUNTNUM O Treatment unit file point e r WDGANG O Wedge angle (degrees) FILES _US ED : SUBROUTINES_CALLED: None AUTHOR : Siyong Kim REVISION_HISTORY : [ =====-=====------=-=----======;==---=================================-== ' ERRFLAG=O I$= MTD$(STR$ ( IFLDNUM ), 2, LEN (S TR$(IFLDNUM))) IF LEN(l$) < 2 THEN 1 $ = "O" + 1 $ END IF ORV$= DATADRV$ PATH$= DATAPATH$ FILE$= DAT ADIR $ + "\IFLD" + 1$ +" DAT" IF ( OpenFile( Orv$, Path$ File$ INPUTMODE$ 3 ) <> SUCCESS ) THEN CALL ERR.Warning( "File Access", lrreg: : GetIFld" ,_ "Canno t open + Orv$ + Path$ + File$ ) ERRFLAG=-99 EXIT SUB END IF INPUT #3, PORTDE S$ INPUT #3, SSDSADMODE, TRTUNTNUM COLWID! COLLEN!, WDGANG TRA YFAC! COLCENTERl(O), COLCENTER!(l) INPUT #3 MAG!, SSDSADI FLDPTNUM l=FLDPTNUM IFT > 0 THEN REDIM FLDEDGE (O TO I 0 TO I ), EDGECODE(O TO I ) IF FLDPTNUM > 0 THEN FOR I= 0 TO FLDPTNUM lNPUT #3 FLDEDGE(l, 0), FLDEDGE ( l l ), EDGECODE ( I ) NEXTI END IF END IF lNPUT #3, CALPTNUM I= CALPTNUM + l REDIM lRCALPT ( l TO I 0 TO I) DEPTH! ( l TO 0, SSD! (l TO 0 REDIM SPD!(l TO I ), S ITE $(1 TO I ) IF CALPTNUM > 0 THEN FOR I = 1 TO CALPTNUM INPUT #3 SITE$ ( ) INPUT #3 IRCALPT(l, 0), IRCALPT ( l 1 ), DEPTH! ( ), SSDl(l) SPD l( T) = SSD!(I) + DEPTH!(! ) NEXT! END IF CloseFile 3 END SUB I [--------------------------------------==== --- --------------------------------I SUBROUTINE: SAVEIFLD20 I SYNOPSIS : INCLUDE comrocs.inc INCLUDE co mir .inc lNCLUDE comir3.inc

PAGE 194

185 SUB SA VEIFLD2 STATIC 4500 DESCRIPTION : This subroutine prompts the user to save irregular field data lf the user chooses to save the data the lrreg data file and the lrreg library file is updated. ASSUMPTIONS : Thi s s ubroutine assumes valid input variables. I GLOBAL_ y ARIABLES: BEAMTYPE I O=-photon; 1 =Co-60; 2=electron CALPTNUM I Number of c al c ulation points COLCENTERIO IX Y coo rdinate of collimater ce nter (c m ) COLLEN! I Collimator length (cm) COLWID! I Collimator width (cm) DAT ADIR$ I D irectory pointer to a specific patient DA TAD RV$ I Drive p oi nter to patient data storage DAT APA TH$ I Path pointer to patient data storage DEPTH!O I I so line depths DRY$ 0 Name of th e drive where FILE$ can be f o und EDGECODE( ) I Edge code ENERGY I Nominal energy (Mev) ERRFLAG O Status of the file UO routine FIELDS M Number of irregular field s s tored FILE$ 0 Temporary pointer to all Library filenames FLDEDGEO I I rregular field outline coordinates (c m* 100) FLDPTNUM I Number of vertices in field outlines IFLDNUM O Current irregu l ar field number IRCALPT O I X Y coord. of collimator points (tem p array) MAG I Field magnification factor MFLAG I MLC field exists (O=no. I =yes) PA T H $ 0 Name of the path where FILE$ can be found PORTDES$ I Port designation label S I 1E$0 I Cale point label SSD!O I Source to skin di stance for each calc point SSDSAD! I SSD/SAD distance (cm) SSDSADMODE I O = SSD beam, 1 = SAD beam TRA YFAC! l Tra y factor TRTUNT$ I Treatment unit T RTUNTNUM I Treatment unit file pointer WDGANG l Wedge angle (degrees) WDGORN I Wedge orientation I FILES USED: CD: DATAPATH$\DATAD I R$ lFLD## DAT Irregular field shape coord. I SUBROUTINES CALLED: I AUTHOR : Siyong Kim I REVIS I ON_lilSTORY : I '[----------------------=-========----WWW __________ ____ --------------------------------------------. ERRFLAG=O IFLDNUM = FIELDS + 1 CALL DisplayBu syMessage( "Saving opposed field data .... ") 1 $ = MID$ (S TR$0FLDNUM ). 2, LEN (STR$(lFLDNU M ))) IF LEN ( I$ ) < 2 THEN 1 $ = "O" + 1 $ ENDIF DRY$= DATADRV $ PATH$= DATAPATH$ + DATAD1R$ 'I=-BLOCK FIELD DA TA FILE= =

PAGE 195

186 FU .E$ = "\IFLD" + 1$ + ".DAT" IF ( OpenFile( DRY$, PATH$, FILE$, OUTPUTMODE$ 3) <>SUCCESS) THEN CALL ERR.Warning( "File Access" "lrreg::SaveIFld",_ "Can n ot write + Orv$ + Path$ + File$ ) ERRFLAG = -99 EXIT SUB END IF PRINT #3, USING "\ \"; PORTDES$ PRINT #3, USING ''# ## ##.# ## # ## # ### +##.## +##.##"; SSDSADMODE; TRTUNTNUM; COL WTD !; COLLEN!; WDGANG; TRA YFAC!; -COLCENTER!(O); COLCENTER!( l ) PRINT #3, USING"#.#####.####"; MAG!; SSDSAD!; FLDPTNUM IF FLDPTNUM > 0 THEN FOR l = 0 TO FLDPTNUM PRINT #3, USING"+####+#### #";-FLDEDGE(l, 0); FLDEDGE(I, l); EDGECODE(I) NEXTI END IF PRINT #3, USING"###"; CALPTNUM FORI= 1 TOCALPTNUM PRINT #3, USING "\ \"; SITE$(!) PRINT #3, USING "+##II#+######.## ### #'' ; -JRCALPT( l O) ; IRCALPT(I, 1); DEPTH!(J); SSD!(J) NEXTI CloseFile 3 'I==--== UPDATE IRREGUL AR FIELD LIBRARY =---1 DRY$ = DAT ADRY$ PATH$= DATAPATH$ + DATADIR$ Fil .E$ = ''\IRREGFLD LIB ' IF ( OpenFile( DRY$, PATH$, FILE$, RANDOMMODE$, 4) <>SUCCESS) THEN CALL ERR.Warning( "File Access", lrre g: :SaveIFld" ,_ "Cannot open + Orv$ + Path$ + File$ ) ERRFLAG = -99 EXIT SUB END IF FIELD #4, 1 5 AS PD$ 4 AS TU$, 2 AS EY$, 2 AS BT$ 2 AS CW$,_ 2 AS CL$, 2 AS SS$, 2 AS SM$ 2 AS WA$. 2 AS WO$,_ 2 AS CP$,10 AS ED$, 2 AS NU$,_ I AS MF$ 2 AS MCW$, 2 AS MCL$, IO AS MED$ ,_ 2AS MCP$ LSET PD$ = PORTDES$ LSET TU$ = TRTUNT$ L SET BY$= MK.1$(ENERGY) LSET BT$ = MKI$(BEAMTYPE) L SET CW$= MKJ$(CINT(COLWID! 1 0!)) LSETCL$ = MKI$(CINT(COLLEN! 10!}) LSET SS$ = MK1$(CINT(SSDSAD! 1 0!)) LSET SM$ = MKl$(SSDSADMODE) LSET WO$ = MKl$(WDGORN) LSET WA$= MK.1$(WDGANG) LSET CP$ = MKI$(CALPTNUM) LSET NU$= MKl$(TRTUNTNUM) LSET ED$= DATE$ LSET MF$ = MFLAG$ 'REV LSET MCW$ = "" LSETMCL$ = "" LSET MED$= "" LSET MCP$ = "" PUT #4 IFLDNUM IF IFLDNUM = FCEIJDS + l THEN FIELDS = FIELDS + 1 LSET PD$ = "-99" PUT #4, FIELDS + I END IF CloseFile 4 END SUB I [=== ===--======-============-= ==-=-==------.-...---------==----=-=,-. -----------------

PAGE 196

I SUBROUTINE: GETMFLD2 () SYNOPSIS: rNCLUDE comrocs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB GETMFLD2STATJC 4600 I DESCRIPTION: This sub r outine gets MLC field data from the file I ASSUMPTIONS : This subroutine assumes valid input variables. GLOBAL V ARJABLES : CALPTNUM I Number of calculation points COLLANGO! I Collimato r angle in degree 187 COLCENIBR!O I X Y coordinate of collimater center (cm) COLLEN! I Collimator l englh (c m) COLWID! I Collimator width (cm) DAT ADIR$ I Directory pointer to a specific patient DATADRV$ I Drive pointer to patient data storage DAT AP ATH$ I Path pointer t o patient data storage DEPTH!Q I I soline depths ORV$ 0 Name of th e drive where FILE$ can be found EDGECODE() I Edge code ERRFLAG O Status of the file l/0 routine FLDEDGEO I Irregular field ou tlin e coordinates (cm* 100) FLDPTNUM I Number of vertices in fie ld outlines IFLDFLAG O Field loaded? (O=no, l=yes) IFLDNUM O Current i rr egular field number JRCALPTO 1 X-Y coo rd of collimator points ( temp array) LEAFNUM O Number of leaves in one side (26 for Varian. 40 for Philips) LEAPAO!O I Leaf position for A side LEAFBO!O I Leaf position for B side MLCMAGO! 0 Mag. for projection of MLC from 100cm to surface MLCOFFSEl'XO! I MLC offset in X-dir. (cm) MLCOFFSETYO! I MLC offset in Y-dir. (cm) PA TH$ 0 Nrune of th e path where FILE$ can be found PORTDES$ I Port designation label SJTE$Q I Cale point label SPD I() I Source to point distance for each calc point SSD 10 I Source to skin distance for each calc point I FILES USED: CD : DATAPATH$\DATADIR$ MFLD## DAT MLC field shape coord. I SUBROUTINES _C ALLED : I AUTIIOR : Siyong Kim I REVISION_HISTORY : '[-----====-=-------=============-=-=-===--====-------------------' I ERRFLAG=O I$= MID$(STR$ ( JFLDNUM ), 2, LEN(STR$ ( IFLDNUM))) IF LEN(l$) < 2 THEN 1 $ = "O" + 1$ END IF ORV$= DATADRV$ PATH$= DATAPATH$ MFILE$ = DAT ADJR$ + "\MFLD" + 1$ + ". DAT" IF ( OpenFile( Orv$ Path$ MFile$, INPUTMODE$, 3) <> SUCCESS ) THEN CAL L ERR Warning( "File Access ", "lrreg::GetMFld"._

PAGE 197

188 "Cannot open + Orv$ + Path$ + File$ ) ERRFLAG = -99 EXIT SUB END IF INPUT #3, PORTDES$ INPUT #3, COLWID! CO LLE N!, COLCENTER!(O), COLCENTER!(l), COLLANGO!, MLCOFFSETXO! MLCOFFSETYO! MLCMAGO! INPUT #3, LEAFNUM FOR I= 0 TO LEAFNUM 1 INPUT #3, LEAFAO!(l), LEAFBO!(I ) NEXTI lNPUT #3, FLDPTNUM l=FLDPTNUM lFI > OTHEN REDIM FLDEDGE (O TO I 0 TO I) EDGECODE(O TO I ) IF FLDPTNUM > 0 THEN FOR I = 0 TO FLDPTNUM INPUT #3, FLDEDGE ( l, 0), FLDEDGE ( l 1), EDGE CODE( l ) NEXT! IFLDFLAG= I END IF END IF INPUT #3, CALPTNUM I = CALPTNUM + l REDIM IRCALPT(l TO I 0 TO 1) DEPTH! ( TO I ), SSD!(l TO 1) REDIM SPD!( l TO I ), SITE$(! TO I ) IF CALPTNUM > 0 THEN FOR I = l TO CALPTNUM INPUT # 3, SITE$(!) INPUT #3, IRCALPT ( I O). IRCALPT ( l 1 ), DEPTH!(!), SSD!(I) SPD!(l) = SSD!(l) + DEPTH! ( I ) NEXT I END IF CloseFile 3 END SUB I [---------==-----------------------------. ----------------------------' SUBROUTINE: SA VEMFLD2 () I SYNOPS I S: [NCLUDE comrocs. in c INCLUDE co mir.in c INCLUDE co 1nir 3. in c SUBSAVEMFLD2STATI C 4700 DESCRIPTION : This subroutine prompts the user to save MLC field data. If the user c ho oses to save the data the MLC data file and the lrreg library file is updated I ASSUMPTIONS : This subroutine assumes valid input variables. GLOBAL VARIABLES : AXDATA! O I X -coordi natedataofleaf A BEAMTYPE I O=photon; l=Co-60 ; 2=e l ec tr o n BXDATA! () IX-coordinate data of l eaf B CALPTNUM I Number of calculation p oi nt s COLLANG! I Collimator angle in degree CO L CENTER!O I X Y coordinate of collim at er ce nter (c m ) COLLEN! I Collimator l e n gth (c m) COLWID! I Collimator width (cm) CONTSHIFTX! I MLC offset in X-dir (c1n)

PAGE 198

189 CONTSHlFJ'Y! I MLC offset in Y-dir. (cm) DAT ADIR$ I Directory pointer to a specific patient DA TAD RV$ I Drive pointer to patient data storage DAT AP ATH$ I Path pointer to patient data storage DEPTH!() l lsoline depths DRY$ 0 Name of the drive where FILE$ can be found EDGECODEO I Edge code ED ITMODE 1 Beam calculation status flag ENERGY I Nominal energy (Mev) ERRFLAG O Status of the file 1/0 routine FIELDS M Number of irregular fields stored FILE$ 0 Temporary pointer to all library filenames FLDEDGEO I Irregular field outline coo rdinat es ( c1n l 00) FLDPTNUM I Number of vertices in field outlines IFLDNUM O Current irreg ul ar field number I IRCALPTO I X-Y coo rd of colli m ator points (temp array) IMLCSA VE I Save MLC field or not (O=no l=yes), for 0, only collimator center is calculated LEAFNUM O Nu1nber of l eaves in one side (26 for Varian 40 for Philips) MAG! I Field magnjfication factor MFLAG$ I MLC field exists (N=no V=Varian P=Philips ) MLCFLAG I MLC field editor is o n ( O=no l=yes) MLCMAG 0 Mag for projection of MLC from 100cm to surface MLCTYPE O Type ofMLC (I = Varian, 2 = Philips) ROW I Index for first row in menu box PA TH$ 0 Name of the path where FILE$ can be found PORTDES$ I Port designatio n label ROW I Index for first row in menu box SITE$() I Cale point label SSD 10 I Source to skin distance for each calc point SSDSAD! I SSD/SAD distance (cm) SSDSADMODE I O = SSD beam 1 = SAD bemn TRA YFAC! I Tray fac t or TRTUNT$ I Treatment unjt TRTUNTNUM I Treatment unit fi l e pointer WDGANG I Wedge angle (degrees) WDGORN I Wedge orientation I FILES_USED: CD: DATAPATH$\DATADIR$ IFLD##.DAT Irregular field shape coord. CD: DATAPATH$\DATADrR$ MFLD## DAT MLC field shape coo rd I SUBROUTINES_CALLED: I KYB.GetStrlnclude$ Retrieves a string of MaxLen length. Enables specified keys with ASCll code 321 26. Also, could return RET or ESC string. MENUCLR C l ear menu/command area & display time/version & title MFLDDAT A Gets coUjmator opening, field outline and calculation point lo cation for MLC field GETIFLD2 I AUTHOR : Gets irregular field data from the file Siyong Kim I REVISION HISTORY : I [ -wwmw____________ ------------------------------=--==-------~---------------------------------------------------------I f ERRFLAG=O IFLDNUM = FIELDS + 1 CALL DisplayBusyMessage( "Saving MLC field data ... ") 1$ = MID$(STR$(1FLDNUM) 2, LEN (STR$(1FLDNUM))) IF LEN(1$) < 2 THEN 1 $ = "O" + 1$ END IF DRY$ =DATADRV$ PATH$= DATAPATH$ + DATADIR$

PAGE 199

190 MFILE$ = "\MFLD" + 1 $ +".DAT" IF ( OpenFile( DRY$ PATH$, MFILE$. OUTPUTMODES. 3) <>SUCCESS) THEN CALL ERR Warnin g( File Access", "lrreg::SaveMFld",_ "Canno t write + Orv$ + Path$ + File$ ) ERRFLAG =-99 EXIT SUB END IF PRINT #3, USlNG "\ \"; PORTDES$ PRINT #3. US1NG "##,# ##.# +##.## +##.## +##.# +## # +## # ##.##"; COLWID!, COLLEN!. -COLCEN TER !(O), COLCENTER!(l), -COLLANGO!, -MLCOFFSETXO!, MLCOFFSETYO !, MLCMAGO! PRINT # 3, USING "###" : LEAFNUM FOR I = 0 TO LEAFNUM-1 PRINT #3 US1NG "+##.## +## ##" ; -LEAFBO!(l); LEAFAO !( I ) NEXTI PRINT #3, USING"###" ; FLDPTNUM IF FLDPTNUM > 0 THEN FOR I = 0 TO FLDPTNUM EDGE CODE(I) = I PRINT #3. USING"+#### 111#1#11 #"; -FLDE DGE ( J, 0); FLDEDGE ( l l); EDGECODE(l) NEXTI END IF PRINT #3 US1NG "###"; CALPTNUM FOR I = 1 TO CALPfNUM PR1NT #3, USING "\ \"; SITE$(1) PRINT # 3, USING"+#### t ######.####It.#"; IRCALPT(I 0); IRCALPT ( l I) ; DEPTH!(!) ; SSD!(I) NEXTI CloseFile 3 '1UPDATE IRREGULAR FIELD LIBRARY WITH MLC DATA =-=I MCOLWID = COLWID! MCOLLEN = COLLEN! MCALPTNUM = CALPTNUM DRY$ = DATADRY $ PATH$=DATAPATH $+D ATADIR$ FILE$= "\ IRREGFLD LlB IF ( OpenFile( ORV$ PATH$, FILE$. RANDOMMODE$ 4) <>SUCCESS) THEN CALL ERR.Warning( "F il e Access", "lrreg::Save IFld ",_ ERRFLAG = -99 EXIT SUB END IF "Canno t ope n + Drv$ + Path$ + File$ ) FIELD #4, 15 AS PD$ 4 AS TU$, 2 AS EY$ 2 AS BT$ 2 AS CW$,_ 2 AS CL$, 2 AS SS$, 2 AS SM$ 2 AS WA$ 2 AS WO$,_ 2 AS CP$, IO AS ED$, 2 AS NU$,_ l AS MF$, 2 AS M C W $, 2 AS MCL$ IO AS MED$, 2 AS MCP$ GET #4, lFLDNUM COLWID = CSNG(CYI(CW$))*0 1 COLLEN!= CSNG(CVI(CL$))*0. l CALPTNUM = CV1(CP$) LSET PD$ = PORIDES$ LSET TU$ = TRTUNT $ LSET EY$ = MK.1 $(ENE RGY ) LSET BT$ = MK.1 $( BEAMTYPE ) LSET CW$= MKJ$(CINT(COLWID! 10! )) LSET CL$= MKJ $(C INT (CO LLEN! lO!) ) LSET SS$ = MK.1$ (CINT(SSDSAD! 101)) LSET SM$= MK.1 $(SSDSAD MODE ) LSET WO$ = MK.1$(WDGORN) LSET WA$ = MK.1 $(W DGANG ) LSET CP$ = MK.1$(CALPTNUM) LSET NU$ = MKI$ (TRTUN TNUM ) LSET ED$ = DA TE$

PAGE 200

LSET MF$ = MFLAG$ 'REV LSET MCW$ = MKI$(CINT(MCOLWID! 10! )) LSET MCL$ = MKI$ (C INT (MCOLLEN! 10!)) LSET MED$= DATE$ LSET MCP$ = MKI$(MCALPTNUM ) PUT #4, IFLDNUM IF IFLDNUM = FIELDS + 1 THEN Fl ELDS = FlELDS + 1 LSET PD$= "-99" PUT #4 FIELDS + I END IF CloseFile 4 END SUB 191 I [------------------------------------------------------=----------------------------------------------------' I SUBROUTINE : MLCOPPOSE () I SYNOPSIS: INCLUDE cornrocs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB MLCOPPOSE STATIC 4800 I DESCRIPTION : This subro ut ine creates opposed MLC field Opposed block field is generated at the same time. ASSUMPTIONS : This subroutine assumes valid input variab l es. I GLOBAL_ VARIABLES: B$ 0 Temporary string CHC$ 0 0 An array of character strings which make up 1nain menu ERRFLAG O Status of the file I/0 routine FIELDS M Number of irregular fields s t ored IFLDNUM O Current irregular field number ROW I Index for first row in menu box PORTDES$ I Port designation la bel FILES_USED: SUBROUTINES_CAL L ED: KYB .GetStrExclude$ Retrieves a string of MaxLen length. Enables keys with ASCil co d e 32-126 except those specified. Also cou ld return RET or ESC string. MENUCLR Clear menu/command area & display time/version & title GETIFLD2 Get s irregular fie ld data from the file GETMFLD2 Gets MLC field data from the ftle SA VEIFLD2 Saves irregular field data SA VEMFLD2 Saves MLC field data AUTHOR : Siyong Kirn REVISION Hl STORY : '(--------------------------------------------------------~--------------------------------------------.----------------------' I CHC$ ( 0) = MLC FIELD EDITOR CALL MENUCLR LOCATE ROW+ 2, 10 PRINT "Port l abe l for oppose field (15 Chr). "; TXT$ = "<" + OPPPORTDES$ + ">" LOCATE ROW, 3 PRINT "ENTER:" ; TXT$ ;

PAGE 201

'IUser input =--1 B$ = KYB.GetStrExclude$(CHR$(34) + CHR$(44), 15) SELECT CASE B$ CASE "ESC" EXIT SUB CASE "RET" CASE ELSE OPPPORTDES$ = 8$ END SELECT 'I=== GET BL OCK FIELD DAT A --=I IFLDNUMO = IFLDNUM FIELDSO = FIELDS CALL GETIFLD2 IF ERRFLAG = -99 THEN ERRFLAG=O EXIT SUB ENDJF 'I SA VE OPPOSED BLOCK F I ELD --1 PORTDES $ = OPPPORTDES$ CALL SA VEIFLD2 IFERRFLAG = -99 THEN ERRFLAG=O EXIT SUB END IF JFLDNUM = JFLDNUMO FIEIJDS = FIELDSO 'I-,= GET MLC FIELD DAT A --1 CALL GETMFLD2 IF ERRFLAG = -99 THEN ERRFLAG=O EXIT SUB END IF 'I== SA VE OPPOSED MLC FIELD== PORTDES$ = OPPPORTDES$ CAL L SA VEMFLD2 192 ENDSUB [ --------------~------------------= --------------------------------. -------ww-------------------------------1 I SUBROUTINE: MLCEXPORTV 0 SYNOPSIS : I lNCLUDE comrocs.inc INCLUDE co mir.in c lNCLUDE comi r 3.inc SUB ML CEXPORTV STATIC 4900 I DESCRIPTION : This subrouti n e creates expored MLC field data file for varian type. Exported fiJe can be directly u sed by varian MLC software "SHAPER". ASSUMPTIONS:

PAGE 202

193 This subroutine assumes valid input variables GLOBAL_ VARIABLES: B$ 0 Temporary string COLLANGO! I Collimator angle in degree ERRFLAG O Status of the file 1/0 r outine FIELDS M Number of irregular fields stored FLDEDGEO I Irregular field outline coordinates (cm 1 00) FLDPTNUM I Number of vertices in field outlines LEAFAO!O I Leaf pos iti o n for A side LEAFBO!O I Leaf position for B side LEAFNUM O Number of l eaves in one side (26 for Varian, 40 for Philips) MFLAG$ l MLC field exists (N=no, V=Yarian, P=Pbilips) MLCMAGO! 0 Mag for projection of MLC from lOOcrn to surface MLCOFFSETXO! I MLC offset in X-dir (cm) MLCOFFSETYO! 1 MLC offset in Y-dir (cm) PATNUMB$$ 0 Patient Number PORTDES$ l Port designation label ROW I In dex for first r ow in menu box FILES_USED: SUBROUTINES_CALLED: ERR.1nenu5c Display error message on line 5 of 1n enu area GETDRVPA TH Get export drive and path designations GE1'IFLD2 Gets irregular field data from the file GETMFLD2 Gets MLC field data from the file KYB Getlnt$ Get keyboard input in integer fonna t KYB.GetStrlnclude$ Retrieves a string of Max.Len length. Enables specified keys with ASCII code 32-126. Also, cou l d r eturn RET or ESC string KYB GetStrExclude$ Retrieves a string of MaxLen length. Enables keys with ASCI I code 32-126 except those specified Also, could return RET or ESC s trin g. KYB.PAGEKeysOFF Disable PGUP and PGDN keys KYB.PAGEKeysON Enable the paging keys (PGUP, PGDN). MENUCLR C lear menu/command area & display time/version & title PAGEDN Keeps track of page infonnation and file pointer infonnation and displays the next page if there is one PAGEUP Keeps track of page information and file pointer informati on and d i splays the p r evious page if there is one I AUTHOR: Siyong Kim REVISION_HISTORY : I [ ==----~:====-==-==-==-=-==--==-----------=----====;=======-:= -=== ==-----= --' DIM EXPNUM( I TO FIELDS), FIELDNAME$( I TO FIELDS) LEAFNUM =26 'I== Define a header structure for VARIAN MLC --1 FileRev$ = "File Rev = LastName$ = "Last Name=" FirstName$ = "First Nrune = Patientl0$ = "Patient ID= Number of.Fields$ = Number of Fields = Field$ = "Field = TreatmentCount$ = "Treatment Count= Operator$= "Operator=" Collitnator$ = "Collimator = Gantry$ = "Gantry = Leaf$= "Leaf" Note$= "Note="

PAGE 203

Shape$ = "Shape = Ma gnification$ = "Magnification = DFileRev$ = "C" 'I=== GET EXPORT DRIVE AND PA TH =--1 GETPATH: CALL GETDRVPATH IF ERRFLAG = -99 THEN ERRFLAG=O ERASE EXPNUM, F1El.DNAME$ EXIT SUB END IF I -GET EXPORT FILE NAME -----1 GETFILE: CALL MENUCLR LOCATEROW+2, 10 PRINT "Enter export file name (8 Cbr)."; EXPFILE$ = "" FILETXT$ = "<" + EXPFILE$ + ">" LOCATE ROW 3 PRINT "ENTER:": FILETXT$: 'I---User input ====I 194 B$ = KYB.GetStrExclude$(CHR$(34) + CHR$(44) + CHR$(46). 8) SELECT CASE B$ CASE "ESC" GOTO GETPA TH CASE II RET" OS.Sound 261, 2 GOTO GlflFILH CASE ELSE EXPFILE$ = B$ END SELECT '1---CREA TE EXPORT FILE NAME ---=I EXPFI1.E$ = "\" + EXPFILE$ + ".MLC" 1--OPEN EXPORT FILE ====I CHKRET: CALL DisplayBusyMessage( "Open export file ... ) IF ( OpenFile( EXPDRV$, EXPPATH$, EXPFILE$, OUTPUTMODE$, 2) <> SUCCESS ) THEN CALL ERR.Warning( "File Access", "Irreg::MLCexpo",_ "Cannot open"+ EXPDRV$ + EXPPATH$ +EXPFT l ,F,$) GOTO GETPATH END IF 'I==== GET PATIENT FIRST NAME =====I FNAME : CALL MENUCLR LOCATEROW+2 10 PRINT "Enter patient first name ( 15 Chr) "; DFirstName$ = "" FSTNAMETXT$ = "<" + DFirstName$ + ">" LOCATE ROW 3 PRINT "ENTER:"; FSTNAMETXT$ ; 'I==== User input = -1 B$ = KYB GetStrExclude$(CHR$(34) + CHR$ ( 44), 1 5) SELECT CASE B$ CASE "ESC" CloseFile 2 GOTO GETFILE CASE "RET"

PAGE 204

OS.Sound 261, 2 GOTOFNAME CASE ELSE DFirstName$ = B$ END SELECT 'I==== GET PATIENT LAST NAME ----=I LNAME: CALL MENUCLR LOCATE ROW+ 2, 10 PRINT "Enter patient last name ( 1 5 Chr) ."; DLastN rune$ = "" LNAMETXT $ = "<" + DLastName$ + ">" LOCATE ROW, 3 PRINT "ENTER:"; LNAMETXT$; 'I == User input ---1 B$ = KYB.GetStrExclude$(CHR$(34) + CHR$(44), 15) SELECT CASE B$ CASE "ESC" GOTOFNAME CASE "RET" OS.Sound 26 1 2 GOTOLNAME CASE ELSE DLastName$ = B$ END SELECT I==== GET PA'I'IENT ID =--1 PTID : CALL MENUCLR LOCATEROW+2, 10 PRINT "Enter patient ID." ; DPatientID$ = PA TNUMB$ IDTXT$ = "<" + DPatientID$ + ">" LOCATE ROW 3 PRINT "ENTER:"; IDTXT$; 'I---User input---=I B$ = KYB.GetStrExclude$(CHR$(34) + CHR$(44), 15) SELECT CASE B$ CASE "ESC" GOTOLNAME CASE "RET" OS.Sound 261. 2 GOTOPTID CASEELSE DPatientID$ = B$ END SELECT 195 I I=-== CHECK TOT AL NUMBER OF MLC FIELDS ---=I FIELD #4, 1 5 AS PD$ 4 AS TU$, 2 AS EY$, 2 AS BT$, 2 AS CW$,_ 2 AS CL$, 2 AS SS$, 2 AS SM$ 2 AS WA$ 2 AS WO$,_ 2 AS CP$, 10 AS ED$, 2 AS NU$,_ 1 AS MF$ 2 AS MCW$ 2 AS MCL$, 10 AS MED$,_ 2ASMCP$ VMLCFLDS=O PMLCFLDS=O FOR l = 1 TO FIELDS

PAGE 205

GET#4 I MFLAG$=MF$ IF MFLAG$ = "V" THEN VMLCFLDS = VMLCFLDS + l ENDIF NEXTI TOTMLCFLDS = VMLCFLDS 196 11== GET NUMBER OF FIELDS TO BE EXPORTED ==I NOFLDS: DO CALL MENUCLR LOCATE ROW+ 2, 1 0 PRINT How many fields to be exported ?"; LOCATE ROW+ 3, 10 PRINT "Enter# of field s."; IF FIELDS> 1 5 THEN LOCATE ROW + 3, 59 PRINT "PgUp PgDn"; CALL KYB PAGEKeysON END IF TOTFLDO: LOCATE ROW 3 PRINT USING "ENTER:<##>''; TOTMLCFLDS ; 8$ = KYB .Ge tlnt$ ( 1 0,2) CALL KYB PAGEK eysO FF SELECT CASE B$ CASE PGUP CALLPAGEUP CASE PGDN" CALLPAGEDN CASE "ESC" GOTOPTID CASE RET DNumberOfField s = TOTMLCFLDS GOTO TOTFLD I CASE ELSE DNumberOfField s = V AL (B$) TOTFLDl : lF DNumberOfFields < 1 OR DNumberOfField s > TOTMLCFLDS THEN CAL L ERR menu5 c(" I NV ALJD NUMBER OF FIELDS RE ENTER ". "". '"') GOTO TO IFLDO END IF EXIT DO END SELECT LOOP I= SELECT FIELDS TO BE EXPORTED -I OLDIFLDNUM = IFLDNUM EXFLDNUM=O FOR I = I TO DNumberOfFields DO EXFLDM : CALL MENUCLR LOCATE ROW+ 2, 10 IFI=ITHEN PRINT "E nter Field# for 1 s t Fi eld to be exported."; ELSEIF I = 2 THEN PRINT "Enter Field # for 2nd Field to be exported ."; ELSEIF I = 3 THEN PRINT "Enter Field# for 3rd Field to be exported.'';

PAGE 206

EXF L DO : EXFLD1: 197 ELSE PR I NT "Enter Field # for "; I ; "th Field to be exported."; END IF LOCATE ROW+ 3 10 PRINT "Last Field# s elected :"; EXFLDNUM ; IF FIELDS > 15 THEN LOCATE ROW + 3, 59 PRINT "PgUp PgDn" ; CALL KYB PAGEKeysON END IF EXFLDNUM = EXFLDNUM + I LOCATE ROW 3 PRINT USING "ENTER :< ##>" ; EXFLDNUM ; B $ = KYB .Ge tlnt$( 1 0 2) CALL KYB PAGEKeysOFF SELECT CASE B$ CASE "PGUP" CALLPAGEUP CASE PGDN" CALLPAGEDN CASE "ESC" I FI = I THEN GOTONOFLDS ELSE I= I 1 IM=l-1 IFIM=OTHEN EXFLDNUM=O ELSE EXFLDNUM = EXPNUM ( l 1 ) END IF GOTOEXFLDM END IF CASE II RET" GOTOEXFLD I CASE ELSE EXFLDNUM = V AL ( B$ ) IF EXFLDNUM < I OR EXFLDNUM > F I E l DS THEN CA I .L E R R.menu5c (" INV ALID FIELD NUMBER -RE-EN I ER ", "", "") GOTOEXFLDO END IF GET #4 EXFLDNUM MFLAG$=MF $ IF MFLAG$ = P THEN CALL ERR menu5c( MLC TYPE M I SMATCH RE-ENTER ","","") GOTOEXFLDO ELSEIFMFLAG$ = N THEN CALL ER R .menu5c("NO MLC FIELD -RE-ENTER" ,"","") GOTOEXFLDO ELSE ENDIF EXIT DO END SEl ECT LOOP EXPNUM ( J ) = EXFLDNUM

PAGE 207

198 NEXTI 'I== WRITING EXPORT DATA ON EXPORT FILE ==I I I -= PRINT HEADER ==I CALL DisplayBusyMes s age( "Writing fl.le header ... ") PRINT #2 FileRev$ L TRJM$(DFileRev$ ) PRINT #2 LastNrune $, LTRIM$ ( DLastName$ ) PRINT #2, Fir s tNam e$, L TRIM $(DFirstN rune$) PRINT #2, PatienlID $, LTRIM$ ( DPatientlD$ ) PRINT #2, Number .of. Fields$, DNumberOtFi elds BLK$ = 1111 PRINT #2, BLK$ 'I== FOR EACH FIELD ==I FOR K = l TO DNumberOtFieJds CALL DisplayBusyM essage( Writing field d a ta ... ") IFLDNUM = EXPNUM ( K ) CALL GETMFLD2 PORTDES$ = UCASE$(PO RTDES $) DEMAG!=l !/MLCMAGO! 'I--CHECK FIELD NAME =--1 IFK > l THEN CHKFLD: CHKFLDl : FOR I CK = l TO K 1 IF PORTDES $ = FIELDNAME $(IC K) THEN I I -= GET NEW FIELD NAME-== CALL MENUCLR LOCATE ROW+ 2, 10 PRINT Dupli ca t e d PORT Label. .. "; LOCATE ROW+ 3. 10 PRINT Enter N e w PORT Label for Field# "; IFLDNUM ; '' ( 1 5 Chr )."; LO C ATE ROW 3 PRINT "ENTER:"; "<>": 'I User input ---=I B$ = KYB GetStrEx c lud e$(C HR$ (34) + CHR$(44), 1 5) SELECT CASE 8$ CASE RET ", "ESE" OS.Sound 26 1 2 GOTO CHKFLD l CASE ELSE PORTDES$ = UCA S E$(B$ ) END SELECT GOTOCHKFLD END IF NEXTICK CALL D isplayBusyMessage( Writin g field data ... ) ENDlF FIELDNAME$(K) = PORTDES$ 'I== PRINT FIELD HEADER ---=I PRINT #2, Field$ L TRIM$ ( PORTDES $) PRINT #2, Tr ea tment Co unt$ DTr ea tmentC ou nt PRINT #2, Op e rat o r $, L TRIM$ ( D0perat o r $) PRINT #2, Collima t or$, COLLANGO! PRINT #2, Gantry$ DGantry! 'IPRINT LEAF POSITION --1 FOR !LEAF = I TO LEAFNUM 1$ = MID$ (S TR$ ( ILEAF ), 2, LEN (S TR$(ILEAF) )) IF LEN ( l $) < 2 THEN I$ = " + 1$ END IF LEAFA$ = LEAF$+ 1 $ + A=

PAGE 208

PRINT #2, LEAFA$, LEAFAO!(ILEAF-1) NEXTILEAF FOR IlJEAF = 1 TO LEAFNUM 199 I$= MID$(STR$(ILEAF), 2, LEN(STR$(ILEAF) )) IF LEN(l$) < 2 THEN 1 $ = " + 1 $ ENDIF LEAFB$ = LEAF$ + 1 $ + "B =" PRlNT #2 LEAFB$, -LEAFBO!(ILEAF-1 ) NEXTILEAF PRINT #2, Note$, 0 CALL GETIFLD2 PRINT #2, Shape$, FLDPTNUM+l FOR IPT = 0 TO FLDPTNUM 'XIPT! = (FLDEDGE(IPT, 0)*0.01 + MLCOFFSETXO!)*DEMAG! XIPT! = (FLDEDGE(lPT, 0)*0.0 1 + MLCOFFSETXO!) FLDEDGE(IPT. 0) = CINT(XIPT!*IOO!) 'YIPT! = (FLDEDGE(IPT. 1)*0.01 + MLCOFFSETYO!)*DEMAG! YTPT! = (FLDEDGE ( IPT, 1)*0 .0 1 + MLCOFFSETYO!) FLDEDGE ( IPT I )= ClNT(YJPT!*lOO!) PRINT #2, FLDEDGE(IPT, 0), FLDEDGE(IPT I ) NEXTIPT PRINT #2, Magnification$, MLCMAGO! PRINT #2, "" NEXTK CloseFile 2 IFLDNUM=OLDIFLDNUM 'CALL DisplayBusyMessage( "Export file successfully created ... ") CALL MENUCLR LOCATE ROW+ 1 10 PRINT "Export file ''; EXPFILE$; "\ successfully created."; LOCATE ROW + 3, 12 PRINT "Press any key to continue ... "; DO LOOP WHILE I NKEY$ = "" ERASEEXPNUM,FIELDNAME$ END SUB '[----------------------------------------------------------------' SUBROUTINE : MLCSELECT () SYNOPSIS: INCLUDE comrocs.inc INCLUDE comir.inc INCLUDE comir3 .in c SUB MLCSELECT ST A TIC 5000 DESCRIPTION : This s ubr outine prompts the user t o select MLC type I ASSUMPTIONS : This subroutine assumes valid input variab l es. GLOBAL_ VARIABLES : CHC$0 0 An array of c har acter strings which make up main menu ERRFLAG O Status of the file 1/0 routine MLCTYPE O Type of MLC (l = Varian, 2 = Philips) MLCVENDOR$ 0 String of MLC type ROW 1 Index for first r ow in menu box -------------~-

PAGE 209

200 I FLLES_USED: SUBROUTINES CALLED : KYB.GetStrlnclude$ Retrieves a string of MaxLen length Enables specified keys with ASCII code 32-126 Also I could return RET or ESC string. MENUCLR Clear menu/command area & display time/version I & title I AUTHOR: Siyong Kim REVISION_HISTORY : I '[---------------------------------==-------------------------------------------------------------------I f ERRFLAG=O '1---SETDEFAULTMLC== DEFAULTMLC = 1 VARIAN I I== MLC TYPE SELECTION== CHC$(0) = MLC FIELD EDITOR CALL MENUCLR LOCATE ROW+ 1, 1 0 PRINT "Select MLC type ... "; LOCATE ROW+ 2, 12 PRINT V ... Varian MLC" ; LOCATE ROW+ 3, 12 PRINT "P ... Philips MLC" ; LOCATE ROW 3 IF DEFAULTMLC = 1 THEN PRINT "ENTER:"; "<"; ''V" ;"> ; ELSEIF DEFAUL TMLC = 2 THEN PRINT ENTER :";"<";" ? ":">"; END IF 1---User input = I BB$= KYB GetStrln c lude$(' VvPp", I ) SELECT CASE BB$ CASE "ESC" ERRFLAG = -99 EXIT SU B CASE "RET" IF DEFAULTMLC = J THEN MLCTYPE=l MLCVENDOR$="V ARIAN ELSEIF DEFAULTMLC = 2 THEN MLCTYPE=2 MLCVENDOR$="PHILIPS END IF EXIT SUB CASE ELSE IF BB$= "V" OR BB$= "v" THEN MLCTYPE=l MLCVENDOR$="V ARIAN" EXIT SUB ELSEIF BB$= "P" OR BB$ = "p" THEN MLCTYPE=2 MLCVENDOR$="PHILIPS EXIT SUB END IF END SELECT END SUB [------==----======-----===--==:===-======---=====--=====

PAGE 210

' SUBROUTINE: MLCIPAGEO SYNOPSIS: INCLUDE co mro cs.inc INCLUDE comir.inc INCLUDE comir3.inc SUB MLCIPAGE STATIC 5100 DESCRIPTION : 201 This subro utin e displays one page of beam infonnation for MLC field ASSUMPTIONS: Thi s s ubroutin e ass um es the [RREGFLD LIB is open and contains valid values GLOBAL_ V ARlABLES : I O Temporary integer IFLDNUM I Current irregular field nunJber ROWCNT O Temp index to curre nt text row TOPOINT I Pointer to first re cord on screen FILES_USED : RP : DATAPATH$\DATADfR$ IRREGFLD.LIB Irregular field library SUBROUTINES_CALLED : None AUTHOR: Siyong Kirn REVISION_HISTORY : ' [-----------------------------~------------------------------------------------------------------------------' FIELD #4, 15 AS PO$ 4 AS TU$, 2 AS EY$, 2 AS BT$, 2 AS CW$,_ 2 AS CL$ 2 AS SS$, 2 AS SM$, 2 AS WA$, 2 AS WO$ ,_ 2 AS CP$, 10 AS ED$ 2 AS NU$ ,_ I AS MF$, 2 AS MCW$ 2 AS MCL $, IO AS MED$ ,_ 2AS MCP$ FOR I= 4 TO 18 LOCATE I l PRINT SPACE$(80) NEXT ROWCNT=4 POINTER = TOPOINT DO GET #4, POINTER IF CVI(W0$) = I THEN S$ = "-" ELSE S$ = "+" ENDlF IF CVI(SM$) = I THEN 1 $ = "I" ELSE 1$ = "S" END IF IF MF$ = "V" THEN MPS$=" V ELSEIF MF$= "P THEN MPS$=' P" ELSE MPS$=" No END IF LOCATE ROWCNT 1 IF MF$= "N" THEN

PAGE 211

202 PRINT USING ## !\ \ \ \ ##! ## #!## # ### #! !## ## \ \ \ \ \ \''; POINTER ; ">"; PD$; TU$ ; CVI(EY$) ; BEAMTYPE $(CVl( BT $)); CVl(CW$) I ; "x"; CVl(CL$) I ; CY1(SS$) I ; I $; S$; CVl(W A$ ); CVl(C P $); ED$ ; MFS$ ; ELSE PRINT USING"##!\ \ \ \ ##! ## .#!##. # #lllt .# !## ## \ \ \ \ \ \"; PO[NTER ; ">"; PD$ ; TU$ ; CVI(EY$) ; BEAMTYPE$(CY1(BT$)); CVI(MCW$) I: "x"; CVI(MCL$ ) l ; CVI(SS$) I; I$; S$; CVI(W A$ ); CVI( MCP$) ; MED$; MPS$ ; END IF ROWCNT = ROWCNT + 1 POINTER = POINTER + 1 LOOP UNTIL ROWCNT > 18 OR POINTER> IFLDNUM END SUB

PAGE 212

REFERENCES Ahnesjo A 1994 'Analytic modeling of photon scatter from flattening filters in photon therapy beams Med. Phys. 21, 1227-1235 Ahnesjo A., Knoos, T. and Montelius, A. 1992, '' Application of the convolution method for calculation of output factors for therapy photon beams '' Med. Phys 19 295301 Bj a mgard, B.E and Siddon R L 1982 '' A note on equivalent circles squares and rectangle s, Med. Phys 9, 258-260 Bortfield, T.R ., Kahler D L., Waldron T.J. and Bo y er A.L. 1994 '' X-ray field compensation with multileaf collimators Int J. Radiat Oncol Biol Phys. 28, 723-730 Boyer A.L 1996 '' Basic applications of a multileaf collimator," in 'Teletherapy: present and future ,'' Proceedings of the 1996 s ummer school of AAPM edited by Mackie T R. and Palta J R ., 402-444 Advanced Medical Publishing Madison WI Boyer A.L Ochran, T G. Nyerick, C.E ., and Waldron, T. J. 1992 '' Clinical do s imetry for implementation of a multileaf collimator ,'' Med. Phy s. 19 1 2 55-1261 Brahme, A. 1987 '' Design principles and clinical possibilities with a new generation of radiation therapy equipment ' Acta Oncol 26 401 Brahme A. 1988 '' Optimal s etting of multileaf collimators in stationary beam radiation therapy, Strahlentherapie und Onkologie 164 343-350 Chaney E.L., C ullip T.J. and Gabriel T A 1994 '' A Monte Carlo s tudy of a c celerator head s catter ," Med Ph y s. 21 1383-1390 Chu J.C.H and Bloch, P. 1987 ''Static multileaf collimator for fast neutron therapy Med Phy s. 14 289-290 Clarkson J.R. 1941 ' A note on depth dose in field s of irregular shape, Br. J. Radiol. 14, 265 203

PAGE 213

204 Convery, D.J. and Rosenbloom M.E. 1992 ''The generation of intensity-modulated fields for conformal radiotherapy by dynamic collimation," Phys Med. Biol. 37, 1359 1374 Day, M J. 1950 '' A note on the calculation of do s e in X-ray field s," Br J Radiol ., 23 368-369 Day M J and Aird E G A 1983 '' The equivalent field method for dose determinations in rectangular fields Br. J Radiol. Su p p l. 17, 105 114 Dunscombe, P B and Nieminen J.M. 1992 ' On the field-size dependence of relative output from a linear accelerator Med Phys. 19, 1441-1444 Duzenli C ., McClean B. and Fi e ld C 1993 '' Back s catter into the beam monitor chamber: Implication s for do s imetry o f a s ymmetric col l imators Med Phy s. 20 3 63-367 Eenmaa J., Kalet I., and Wootton P. 1985 ' Dosimetric characteristics of the University-of-Washington clinical neutron therapy system (CNST) multileaf variable collimator, Med Phys. 12 545 Galvin J.M Smith A ., and Lally B. 1993 ''Characterization of a multileafcollimator system ," Int J. Radiat. Oncol Biol. Phy s 25 181-192 Galvin J.M. Smith, A.R. Moeller R D ., Goodman R.L Powli s, W D. Rubenstein J., Solin L J. Michael B. Needham M Huntzinger C. and Kligerman M 1992 '' Evaluation of multileaf collimator de s ign for a photon beam Int. J. Radiat. Oncol. Biol Phys. 23 789-801. Green, D.T. and E rrington R.F. 1952 ' Design of a cobalt 60 beam therapy unit ," Br. J. Radiol. 25 309 Higgins P D ., Sohn W H. Sibata C. H ., and McCarthy W.A. 1989 '' Scatter factor correction s for elon g ated field s," Med Ph ys. 16 800-802 Huang, P H ., Chu J. and Bj a rngard B.E. 1987, 'The effect of collimator back-scatter radiation on photon output of linear accelerators ," Med. Phys 14 268-269 Huq, M S Yu Y ., Chen Z.P. and Suntharalingam N. 1995 '' Dosimetric characteristics of a commercial multileaf collimator Med. Phys. 22 241-247 Jaffray D.A. Batti s ta J.J., Fenster A ., and Munro P 1993 ' X-ray sources of medical linear accelerators : Focal and extra-focal radiation ," Med Phy s. 20 1417-14 2 7

PAGE 214

205 Johns, H.E., Bates L.M. and Watson, T.A. 1952 ''1000 curie cobalt units for radiation therapy 1 The Saskatchewan cobalt 60 unit ," Br. J. Radio!. 25, 296 Jones, D.E.A. 1949, ''A note on back-scatter and depth dose for elongated rectangular X ray fields ," Br J. Radial. 22 342-345 Jordan, T.F. and Williams, P .C. 1994 ''The design and performance characteristics of a multileaf collimator," Phys Med Biol. 39 231-251 Kahn, F.M. 1994 '' The Physics of Radiation Therapy ," 2nd edition, William & Wilkins, Baltimore MD Kase, K.R and Svensson, G.K. 1986 ''Head scatter data for several linear accelerators ( 418 MV) ," Med. Phys. 13, 530-532 Kallman, P., Lind B., Eklof, A ., and Brahme, A. 1988, ''Shaping of arbitrary dose distributions by dynamic multileaf collimation," Phys. Med. Biol. 33, 1291-1300 Klein E.E., Hanns, W.B. Low D.A., Willcut, V ., and Purdy J.A. 1995 ''Clinical implementation of a commercial multileaf collimator: dosimetry, networking, simulation, and quality assurance ," Int J Radiat Oncol. Biol Phys. 33 11951208 Kubo H 1989, ''Telescopic measurements of backscattered radiation from secondary collimator jaws to a beam monitor chamber using a pair of slits," Med Phys. 16, 295-298 Kubo, H. and Lo, K.K. 1989 ''Measurements of backscattered radiation from Therac-20 collimator and trimmer jaws into beam monitor chamber ," Med. Phys 16, 292294 Lam K.L. Muthuswamy, M S ., and Ten Haken R.K. 1996 ''Flattening-filter-based empirical methods to parametrize the head scatter factor ," Med Phys. 23 343-352 LoSasso, T ., Chui, C.S., Kutcher, G.J ., Leibel S.A., Fuks, Z., and Ling, C.C. 1993, ''The use of a multi-leaf collimator for conformal radiotherapy of carcinomas of the prostate and nasopharynx ," Int J. Radiat Oneal Biol. Phys 25 161-170 Luxton, G. and Astrahan, M A. 1988 '' Output factor constituents of a high energy photon beam," Med. Phys 15 88-91 McKenzie A.L and Steven s, P H 1993 '' How is photon head scatter in a linear accelerator related to the concept of a virtual s ource ?," Phy s Med Biol 38 1173 1180

PAGE 215

206 Mohan, R 1992, ''Secondary field shaping asymmetric collimators and multileaf collimator s," in ''Advances in radiation oncology physics, AAPM Monograph 19, edited by Purdy J.A., 307-345, AIP, Inc ., Woodbury NY Mohan, R. Chui, C., and Lidofsky, L. 1985, ''Energy and angular distribution of photons from medical linear accelerators," Med. Phys 12 592-597 Moyer R.F. 1978 ''Systematic patient-dose errors for 4and 10-MeV microwave linear accelerators associated with rectangular collimator settings," Radiology, 129 803806 Palta J.R., Yeun g, D.K., and Frouhar V 1996 '' Do s imetric considerations for a multileaf collimator system," Med. Phys. 23, 1219-1224 Patterson M.A. and Shragge, P.C. 1981, ''Characteristics of an 18-MV photon beam from a Therac 20 medical linear accelerator," Med. Phys. 8, 312-318 Powlis, W.D., Smith, A.R. Cheng, E., Galvin, J M., Villari F ., Bolch, P., and Kligerman M.M. 1993 ''Initiation of multileaf collimator conformal radiation therapy ," lnt J Radiat Oncol Biol Phys. 25 171-179 ROCS 1994, ''Treatment planning system user manual v .4.1.x ," Radiation Oncology Computer System Inc. Carlsbad, CA Sterling, T.D. Perry, H., and Katz, L. 1964, '' Automation of radiation treatment planning," Brit. J. Radio!. 37, 544-550 Tatcher M. and Bj a mgard, B. 1992, ''Head-scatter factors and effective x-ray source positions in a 25 -MV linear accelerator '', Med. Phys 19 685-686 (1992). Tatcher, M. and Bjarngard, B.E. 1993 ''Head sc atter factors in rectangular photon fields ," Med. Phy s. 20,205-206 Vadash, P. and Bjarngard, B. 1993, ''An equivalent square for1nula for head scatter factors," Med. Phys. 20, 733734 van Gasteren, J J.M., Heukelom S. van Kleffens, H.J. van der Laarse R., Venselaar J.L.M. and Westermann, C.F. 1991, ''The determination of phantom and collimator scatter components of the output of megavoltage photon beams: measurement of the collimator sca tter part with a beam-coaxial narrow cylindrical phantom ," Radiother Oncol. 20 2 50-257 Wambersie, A 1990, ''Present and future work at the radiotherapy and radiobiology departments of the UCL-St Luc University Hospital, Brussels, ICRU News 2 (90) 16-18

PAGE 216

207 Webb, S. 1993, ''The Physics of three-dimensional radiation therapy," IOP publishing Ltd., London England Worthley, B. 1966 ''Equivalent square of rectangular fields ," Br J Radial. 39 559 Yu, C.X., Symons J.M., Du, M.N. Martinez, A.A., and Wong J.W. 1995a, ''A method for implementing dynamic photon beam intensity modulation using independent jaws and multileaf collimators," Phys Med. Biol. 40, 769-787 Yu, M.K., Murray, B., and Slaboda, R. 1995b, '' Parametrization of head scatter factors for rectangular photon fields using an equivalent square forrr1alism," Med Phys 22, 1329-1332 Yu M.K and Slaboda R. 1993, ''An alytical representation of head scatter factors for s haped ph o ton beams using a two-component x-ray source model ," Med Phys. 23, 973-984 Zhu T .C and Bjarngard, B.E. 1995, '' The fraction of photons undergoing head scatter in x-ray beams ," Phys. Med Biol 40 1127-1134 Zhu, Y. Boyer A.L., and De so bry G.E 1992 ''Dose distributions of x-ray fields shaped with multileaf collimator s," Phys. Med. Biol. 37 163-173

PAGE 217

BIOGRAPHICAL SKETCH Siyong Kim was born 28 January 1962, in Seoul, the capital of Korea. As the second of two sons of Sungjin Kim and Jungsook Ahn Kim, he grew up in Seoul. In February, 1980, Siyong graduated from Young-deung-po High School, Seoul, Korea. He attended Seoul National University, Seoul, Korea, starting March, 1980. He graduated from Seoul National University in February, 1984, with a Bachelor of Science in nuclear engineering. After graduation, he started to work as temporary researcher at Korea Advanced Research Institute. He participated in the development of code package for nuclear design in nuclear power plant. At the same time, he attended graduate school at Seoul National University and obtained a Master of Science in nuclear engineering, specialized in neutronics, in February of 1986 He developed a 3-dimensional neutronics code for nuclear design during the study. He served military duty from June, 1986, to September, 1988. In June, 1989, he re-entered Korea Advanced Research Institute as a researcher. He took overseas training for 13 months from November of 1989 to December of 1990 in KWU of SIEMENS, West Gertnany, to be a responsible nuclear designer. He performed nuclear design for the reload core of 6 and 7 cycles of Kori Nuclear Power Plant Unit 3, Kori, Korea. Promoted to serlior researcher in September, 1991, he took the responsibility of quality assurance. 208

PAGE 218

209 On 3rd of March, 1990, Siyong married the former Gyejin Jang of Seoul, Korea, who he had met first in January of 1986 and had fallen in love with. They have two daughters, Minkyung, born in January of 1991 and Michelle Minna, born in November of 1996. Being tired of the fact that the business of a nuclear power plant was too much affected by political situations Siyong decided to study medical and health physics and entered the graduate program of medical health physics in the former Department of Nuclear Engineering Science, University of Florida, Gainesville Florida, in August of 1993. Since August of 1994 he has worked for Dr. Jatinder R Pal ta as a research assistant in the Department of Radiation Oncology University of Florida He wa s very pleased to have had the opportunity to work with the people in the physics group of the Department of Radiation Oncology. As a research assistant, he participated in the setup of physics data for both ROCS and ADAC pinnacle treatment planning systems. He also developed an MLC module for ROCS and a generalized algorithm for in-air output factor calculation. Siyong was awarded the Korean Honor Scholarship in September, 1996. He was also awarded tl1e OISP (Office of International Studie s & Programs) award for academic achievement three times, in 1995 1996 and 1997. He is a member of the Alpha Nu Sigma National Nuclear Science and Engineering Honor Society. Siyong will receive the degree of Doctor of Philosophy on 9 August 1997. After graduation he will join the phy s ics group of the Department of Radiation Oncology University of Florida as clinical physics resident for 1 year. Then, he will work in the

PAGE 219

210 Department of Radiation Oncology, Ajou University Suwon, Korea as assistant professor.

PAGE 220

I certify that I have read thi s s tttdy a nd that in m y op ini o n it co n fo rrr1 s t o acceptable s tandards of scholarly presentation a i fully adequate, in sco pe a nd quality, as a dissertation fo r the degree of Do c t o r of Ph l o phy Jatinder R. Palta, Chair Profe sso r o f Nucl ea r and Radiological En gi neering I certify th a t I have read thi s stu d y and that in my opinion it co nforrn s to acceptable standards of scholarly pre se ntation and i s fully adequate, in sco pe and quality, as a di ss ertation for the degree of Doctor of Philo sop hy Tim o th y C. Zhu A ss istant Pr ofessor of Nuclear and Radi o l og i cal En gi n eering I ce rti fy that I have read this s tudy and that in my opinion it co nforrn s to acceptable s tand a rd s of sc holarly pre se ntation and is fully adequate, in scope and quality a s a dissertation for the degree of Doctor of Philo so phy We s ley E. Bol e A ssoc iate Profe sso r of Nuclear and R adio l ogica l Engineering

PAGE 221

I certify that I have read thi s s tudy and that in my opinion it confor1ns to acceptable standards of scholarly presentation and is fully ade quate in scope and quality, as a dissertation for the de g r ee of Do ctor of Philosophy. ,. J ames K. Walker Pr ofesso r of Phy sic s I certify that I have read this study and that in my opinion it conforrns to acceptable s tandards of scholarly presentation and is fully a dequate in sco pe and quality, as a dissertation for the de g ree of Doctor of Philosophy. Willi am Mendenhall Pr ofessor of Radiati on Oncology Thi s dissertation was sub mitted to th e Gr ad uate Faculty of th e College of Engineering a nd to the Graduate School a nd was accepted as partial fulfillment of the requirements for the degree of D octor of Philosophy. Augu s t 1997 Winfred M. Phillips Dean College of Engineering Kar e n A. H o lbr oo k Dean, GradL1ate School

PAGE 222

D 1780 1997 k 4 '\ I UNIVERSITY OF FLORIDA II I 1111111 11 111 I 3 1262 08554 9144


xml version 1.0 encoding UTF-8
REPORT xmlns http:www.fcla.edudlsmddaitss xmlns:xsi http:www.w3.org2001XMLSchema-instance xsi:schemaLocation http:www.fcla.edudlsmddaitssdaitssReport.xsd
INGEST IEID EUR1I6IYN_4QJ4WX INGEST_TIME 2013-01-23T14:32:21Z PACKAGE AA00012939_00001
AGREEMENT_INFO ACCOUNT UF PROJECT UFDC
FILES