UFDC Home  myUFDC Home  Help 



Full Text  
METHODS FOR PRODUCING OFFAXIS RATIO TABLES FROM MINIMULTILEAF COLLIMATOR SHAPED CIRCULAR FIELDS FOR INPUT INTO A STEREOTACTIC RADIOSURGERY TREATMENT PLANNING SYSTEM By BRANDON RICE A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORIDA 2005 Copyright 2005 by Brandon Rice To my loving family and friends, who have believed in and supported me throughout my academic career and life. ACKNOWLEDGMENTS I would like to acknowledge my research advisor, Dr. Frank Bova, for his support and insight on this project. I am also much indebted to Drs. David Hintenlang, David Gilland, James Dempsey, and Wesley Bolch for the many hours of insightful lecture and guidance pertaining to medical physics. I would also like to thank the rest of the faculty and staff in the Nuclear and Radiological Engineering Department at the University of Florida, for giving me the opportunity to learn and expand in a collegial environment. TABLE OF CONTENTS A C K N O W L ED G M EN T S ..................................................................... ...................... iv LIST OF TABLES ................................................... vii LIST OF FIGURES ................................................ viii A B S T R A C T ........................................................................................................ ........ .. x CHAPTER 1 BACKGROUND .............................. ............ .............................. 1 Overview of Stereotactic Radiosurgery.................. ................................................ Delivery Techniques .......... ............. .. ........... ...................................... ...5 D o sim etry ............................................................................................................... .. 12 2 OFFAXIS RATIO MEASUREMENT OF MINIMLC APPROXIMATED C IR C L E S ................................................................................................................. .. 1 8 In tro d u ctio n ............................................................................................................... .. 1 8 M materials and M ethods .. ..................................................................... ............... 18 R e su lts....................................................................................................... ....... .. 2 6 D isc u ssio n ................................................................................................................ .. 2 6 3 A ROBUST ALGORITHM TO MODEL OFFAXIS RATIOS OF MINIMLC APPROXIMATED CIRCULAR FIELDS .............. ................33 In tro d u ctio n ................................................................................................................ 3 3 M ethods and M materials ................ .............. ............................................ 33 R e su lts....................................................................................................... ....... .. 3 9 D isc u ssio n ................................................................................................................ .. 4 0 4 C O N C L U S IO N ...........................................................................................................5 7 APPENDIX A MATLAB PROGRAM DEVELOPED TO MODEL THE FIELDS .........................59 B MATLAB PROGRAM DEVELOPED TO PERFORM ERROR ANALYSIS O N M O D E L E D F IE L D S ...........................................................................................64 C MATLAB PROGRAM DEVELOPED TO ANALYZE A CALIBRATION FILM .67 D MATLAB PROGRAM DEVELOPED TO SEPARATE AND ALIGN EXPO SURES .............. .................................................................................. 71 E MATLAB PROGRAM DEVELOPED TO AVERAGE FIELD QUADRANTS AND PRODUCE FINAL MAP OF OFF AXIS RATIOS .................................... 76 L IST O F R E FE R E N C E S ................................................. ............................................ 81 BIO GR APH ICAL SK ETCH .................................................................... ................ 83 LIST OF TABLES Table page 11 Hypothetical treatment plan with three isocenters............................................11 21 Physical characteristics of the Wellhofer miniMLC .......................................18 31 L eaf alignm ent check ..................................................................... ................ 42 LIST OF FIGURES Figure page 11 L inac SR S ............. .....................................................................3.......... 12 Linac isocenter ............................................................................................ . 4 13 BRW head ring and CT localizer mounted on a Styrofoam head............................5 14 A typical single isocenter plan begins with nine equally spaced arcs of radiation .............. ............................................................................. ...... ...... . 6 15 The University of Florida SRS treatment planning algorithm.............................. 8 16 M inim ultileaf collim ator used in our study. ...................................... ...............9... 17 Using a micromultileaf collimator to approximate circles................................ 10 18 Relationship between absorbed dose and collision kerma for a megavoltage p h o to n b e am ........................................................................................................... 13 19 Crossplane offaxis ratio profile for a 12 mm field .........................................14 21 B asic setup for film m easurem ents .................................................. ................ 19 22 Epson flatbed scanner and processed radiographic film...................................20 23 Offaxis profile film measurements of a 6 cm by 7 cm rectangular field ...........21 24 Results of the consistency check performed on the Epson flatbed scanner...........22 25 Output of rectangular fields shaped by a miniMLC .........................................23 2 6 F ilm calib ratio n to o l ............................................................................................... 2 4 27 Tool used to separate and align exposures ................ .................................... 25 28 Twelve millimeter mMLC circular approximation with even leaves.................28 29 Twenty two millimeter mMLC circular approximation with even leaves ..........29 210 Thirty millimeter mMLC circular approximation with even leaves...................30 211 Twenty millimeter mMLC circular approximation with odd leaves ..................31 212 Twenty four millimeter mMLC circular approximation with odd leaves ...........32 31 Cunningham model fit to crossplane data from a rectangular field formed by th e m M L C .............................................................................................................. 3 5 32 Plots of the fitting parameters as a function of field width................................36 33 The mMLC leaf positions for a 22 mm circular approximation with even leave e s.................................................................................................... ........ .. 4 2 34 A crossplane profile through the rectangular open field is determined .............43 35 The crossplane profile is shifted to match the position of the mMLC leaf. .........44 36 N negative fi eld profi le .......................................................................... ................ 45 37 Spatial m ap of negative field. ........................................................ 46 38 A 10 mm mMLC circular field formed by an even number of leaves................47 39 A 16 mm mMLC circular field formed by an even number of leaves................49 310 A 20 mm mMLC circular field formed by an even number of leaves................51 311 A 26 mm mMLC circular field formed by an even number of leaves................53 312 A 30 mm mMLC circular field formed by an even number of leaves................ 55 Abstract of Thesis Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Master of Science METHODS FOR PRODUCING OFFAXIS RATIO TABLES FROM MINIMULTILEAF COLLIMATOR SHAPED CIRCULAR FIELDS FOR INPUT INTO A STEREOTACTIC RADIOSURGERY TREATMENT PLANNING SYSTEM By Brandon Rice August, 2005 Chair: Frank Bova Major Department: Nuclear and Radiological Engineering Radiosurgery beam profiles must be determined accurately to avoid complications in critical structures adjacent to the tumor. A micromultileaf collimator (mMLC) may be used in place of conventional circular collimators to approximate the circular fields typically used in stereotactic radiosurgery. We investigated two methods for producing offaxis ratio tables from the mMLC shaped circular beams for input into the inhouse treatmentplanning system at the University of Florida. The first method involves direct measurement of the fields with radiographic film. The second method uses an empiricallybased algorithm to model the offaxis ratios. This was accomplished by measuring and characterizing several rectangular fields produced by the mMLC. Socalled negative fields) were calculated and added to a model of a rectangular field to arrive at the final beam model. We were able to accurately model the offaxis ratios for mMLC shaped circular beams to within (0.5 mm) distanceto agreement error in high gradient regions and (3%) dosedose error elsewhere in the beam profile for at least 90% of the points in each field. Given its simplicity and accuracy, we believe this method for modeling offaxis ratios of radiosurgical beam profiles is ideal. CHAPTER 1 BACKGROUND Overview of Stereotactic Radiosurgery Stereotactic radiosurgery (SRS) is a single dose fraction form of radiotherapy that relies on the ability to accurately deliver a high dose of radiation to a stereotactically identified target.1 It is an accepted modality for treating a variety of neurologic conditions such as benign, primary, and metastatic tumors and arteriovenous malformations.2 Although distinctly different from fractionated radiotherapy or routine neurosurgery, SRS can be considered a hybrid of both. Conventional radiotherapy seeks to eliminate diseased tissue by delivering small doses of radiation in many fractions (normally 1 or 2 fractions per day), through several static radiation fields.23 Fractionated treatments increase damage to the tumor because of reoxygenation and reassortment of cells into more sensitive phases of the cell cycle. Inaccurate beam and patient positioning is inherent in common radiotherapy planning and must be considered when developing a treatment plan. Subclinical, or microscopic disease processes that do not show up on diagnostic images must also be accounted for. Consequently, a large amount of healthy tissue is typically encompassed in the treatment plan to account for positioning errors and microscopic disease.2 This can lead to a large amount of healthy tissue being irradiated at the target dose and possibly destroyed, leading to patient complications years down the road. For example, if a 2 cm diameter brain lesion is planned with a 5 mm margin of error to account for positioning errors, an additional 7 cm3 of healthy tissue is encompassed in the treatment plan; this additional healthy tissue represents approximately 70% of the total target volume. Stereotactic radiosurgery works to avoid these pitfalls of conventional radiation therapy by administering a large dose of radiation in one fraction so that the dose distribution has a steep gradient (decreases rapidly spatially) and is conformal to the disease being treated, typically with submillimeter precision (less than 0.5 mm). Radiosurgery relies on accurate, stereotactically targeted delivery and steep dose gradients; it does not rely on taking advantage of radiobiological differences between normal and diseased tissue.2 Stereotactic radiosurgery also differs from common neurosurgery. Neurosurgery is an invasive, inpatient process that seeks to physically remove the pathological process. The neurosurgeon almost immediately knows whether or not a complication will occur. Radiosurgery, on the other hand, is a noninvasive, outpatient process. The radiosurgeon does not instantaneously know if there will be delayed complications.2 The idea of SRS was conceived in the late 1940s by a Swedish neurosurgeon named Lars Leksell.1 His concept was to have many small, focused beams of radiation impinge on a single target localized in space. He first achieved this with orthovoltage x rays and particle beams. He then invented a machine that uses many small sources of radioactive cobalt60 focused on a single point in space, to provide a large dose of radiation to diseased tissue, while causing little or no harm to healthy tissue only millimeters away. This method of SRS is still performed today using a commercially available system called the Gamma Knife. Our study focused on another technique that uses xrays from a common linear accelerator linacc) to deliver the dose of radiation. The steep dose gradient of linac radiosurgery is typically achieved by using a basic concept of geometric optimization: many small beams are applied semiisotropically about a target and are directed to converge on the target. A large dose will be delivered where the beams overlap and will fall off rapidly outside of this area. Figure 11. Linac SRS. The linac delivers a high dose of radiation with a series of precisely placed arcs to control the lesion while sparing healthy tissue. A rigid frame of reference is needed to relate the center of the imaged target to the linac isocenter. The isocenter is the point of intersection of rotation of the gantry, patient couch, and collimator. Threedimensional computed tomography (CT) image reconstructions are used to stereotactically identify the target within the patient anatomy. This is often used in conjunction with other imaging modalities, such as angiography (a 2D imaging modality) and magnetic resonance imaging, to allow for better interpretation of the patient anatomy. YF Machine isocenter XF Ceiling view Tabletogantry view Figure 12. Linac isocenter. The isocenter is the point of intersection of the patient couch, gantry, and collimator. The stereotactic frame is the rigid frame of reference that can be attached to the patient couch or pedestal of the linear accelerator and to the patient's skull.1 The Brown RobertWells (BRW) frame is a commonly used stereotactic head frame2 that is used by the radiosurgery team at the University of Florida. The frame has three orthogonal axes that intersect at the center of the circular frame.2 The BRW CT frame is equipped with a localizer that has nine fiducial rods which appear as dots in each axial slice of the CT image.1 The location of these fiducial rods is precisely known; therefore it is possible to relate any point in the CT reconstruction to the reference frame coordinates. Knowing precisely where the target is located with respect to a frame of reference is critical to accomplishing the goals of radiosurgery. Figure 13. BRW head ring and CT localizer mounted on a Styrofoam head. Delivery Techniques Several methods are commonly used to shape the small radiation fields and to produce the treatment plans needed to deliver the conformal, high dose of radiation to the target. They include the multiple isocenter technique, micromultileaf collimator (mMLC) conformal beams, and intensity modulated radiation therapy (IMRT). This section provides a brief background on the multiple isocenter technique; this technique is the most preferred and commonly used delivery method and is the method currently used by the University of Florida SRS team. The single or multiple isocenter technique for treatment delivery uses one or more sets of noncoplanar arcs of radiation shaped by small, circular collimators, usually less than 3 cm in diameter. This method is ideal for producing nearly spherical or elliptical dose distributions in highisodose regions (7080%).2,45 The next discussion expands on delivery techniques used by the University of Florida radiosurgery team. The width of the dose distribution (size of the radiation field) is approximately the diameter of the circular collimator projected to isocenter. A typical singleisocenter (290 \) (270i) 4 A B Figure 14. A typical single isocenter plan begins with nine equally spaced arcs of radiation. (AB) Coronal and lateral views of a nine arc set. Angles in (A) refer to patient table angles. plan consists of 59 equally spaced arcs of radiation; each arc span is 1000 and the arcs are spaced 200 apart.2'5 These arcs of radiation are directed to overlap in the target region (at isocenter), taking advantage of the basic concept of geometric optimization discussed earlier. An isocenter in this context refers to a spherically shaped region used to approximate target dimensions and should not be confused with the mechanical isocenter of a linac. The typical characteristic beam starting angle begins 300 vertical off the superior, and extends 1000 to end at 500 vertical off inferior.2 In most clinical circumstances, the target or lesion will have an elongated, ellipsoidal, or irregular geometrical shape rather than be perfectly spherical. Sometimes the target will lie adjacent to a critical structure in the brain such as the optic chiasm. To account for these irregularities in target shape and to avoid critical structures in the brain, several parameters can be adjusted to adjust the shape and/or orientation of the dose distribution. Individual beam start and stop angles and arc weights can be adjusted to elongate or shift the orientation of the dose distribution.2'5 Adjusting these parameters does not drastically alter the shape of the dose distribution. For large or irregular target shapes, more than one isocenter is used to approximate the target. If multiple isocenters are used on a single target, the number of arcs is reduced from 9 to 5 for each isocenter. This is done to save time and produces nearly the same gradient as a nine arc set.2'5 Using multiple isocenters results in substantial dose inhomogeneity in the high isodose regions.4,6 An efficient radiosurgery team such as the one at the University of Florida will spend approximately fifteen minutes treating a single isocenter using this technique, even though the actual beam on time for this treatment lasts a few minutes. A collision test must be performed after each table rotation to ensure the linac does not collide with the patient upon gantry rotation. A major drawback to this technique is the large amount of time it takes to treat multiple isocenters. Many cases involve more than one isocenter; on average the treatment time is one hour, but treatment time can take up to several hours for the most complicated cases with many isocenters. Is target adjacent to very radiosensitive neural structure? Yes No Maximize dose gradient: Maximize conformalt) 1. Critical structure Inferior, superior, medial or Lesion shape is: lateral to target use arc elimination tool / 2. Critical structure anterior or posterior to target  use arc start and stop angle Maximize conformality * without degrading optimized dose gradient 9 equally spaced arcs Nonellpooidal tirregu!ar) Use multiple isocenters w/principal axis in the: 1. Coronal plane use arc weighing (elimination tool or differential collimator sizes) 2. Sagittal plane use arc start and stop angle tool 3. Axial plane use multiple isocenters . Dose selection Figure 15. The University of Florida SRS treatment planning algorithm. Multileaf collimators (MLCs) may be used to approximate the circular fields produced by circular collimators.7 Multileaf collimators have been used to shape radiation fields for many years. They consist of two arrays of tungsten leaves; each leaf is driven individually by its own motor. Recently, multileaf collimators have been developed with SRS in mind. The main factor separating conventional MLCs and MLCs specifically designed for radiosurgery is leaf width. Multileaf collimators designed for radiosurgery have leaf widths typically on the order of a few millimeters, whereas the leaf width on conventional MLCs is over a centimeter. Hence, MLCs designed for radiosurgery are usually referred to as mini or micromultileaf collimators (mMLC). St. John investigated how the finite leaf width of the mMLC affects the conformality and gradient of dose distributions. He showed that mMLC leaf width can have a considerable effect on the ability to use a mMLC to approximate circular beams.7 For example, a 5 mm circle cannot be approximated accurately using an MLC with 1 cm wide leaves. The leaves on the mMLC used in our study are approximately 5 mm wide projected to isocenter. It has been shown that dose distributions produced by mMLCs with 5 mm wide leaves are virtually indistinguishable from those produced by mMLCs with 1 mm leaf widths.7 Figure 16. Minimultileaf collimator used in our study. The collimator consists of twenty pairs of tungsten leaves, each driven by an individual motor and controlled by a computer. Circular fields shaped by a mMLC can be approximated using either an odd or an even set of leaves. The alternative that provides the optimal approximation is governed by the size of the circle being approximated and mMLC leaf width. In the ideal situation, the mMLC would be allowed to rotate in between arcs to allow for better approximation of the circle. Since this is not the case, the center of the circle being approximated is forced onto a leaf edge or leaf center, whichever is closer. If the center of the circle is on a leaf edge, an even number of leaves will approximate the circle best. If the center of the circle is on a leaf center, an odd set of leaves will work best to approximate the circle (when no collimator rotation is used).   L A B Figure 17. Using a micromultileaf collimator to approximate circles. A) The circle is centered on a leaf edge so an even set of leaves are used. B) The circle is centered on a leaf center so an odd number of leaves are used. If a mMLC is used to shape the radiation beam, in place of conventional circular collimators, it is possible to drastically reduce the amount of time it takes to treat multiple isocenter targets. This in turn leads to a more optimal and efficient treatment delivery and increased patient satisfaction. For example, consider a treatment plan containing three isocenters (Table 11). Using the standard technique with circular collimators, it takes approximately 50 min for the University of Florida radiosurgery team to complete the treatment. Before each separate isocenter is treated, the center of the isocenter (target) is placed at the isocenter of the linac, and the appropriate circular collimator is mounted onto the linac. Also, a collision test must be performed for each table angle. If a mMLC is used to deliver the treatment, the geometric center of the target is placed at the linac isocenter. This eliminates the need to place the center of each individual isocenter at the isocenter of the linac. It also eliminates the need to switch out collimators for different isocenters. The mMLC will approximate the shape of the necessary circle for the isocenter being treated. Also, using a mMLC allows all three isocenters to be treated from each table angle, so the collision test needs to be performed a total of five times, as opposed to fifteen times when using the conventional circular collimators. Table 11. Hypothetical treatment plan with three isocenters Center Coordinatesa Isocenter AP Lat Ax Arc Collim. Table Start End Num (mm) (mm) (mm) num size (mm) angle angle angle 1 12 20 30 130 2 12 55 30 120 1 19.0 15.0 40.0 3 12 340 230 330 4 12 305 240 330 5 12 270 240 330 6 18 20 30 130 7 18 55 30 120 2 21.3 12.0 36.0 8 18 340 230 330 9 18 305 240 330 10 18 270 240 330 11 10 20 30 130 12 10 55 30 120 3 16.0 17.5 43.7 13 10 340 230 330 14 10 305 240 330 15 10 270 240 330 aFor the conventional technique that uses circular collimators, the center coordinates of each isocenter are placed at the linac isocenter. Assuming 5 min of initial patient set up, an average of 300 monitor units (MUs) per arc of radiation, and a dose rate of 400 MUs per min, it would take approximately 16 min to complete the treatment with the mMLC; this corresponds to a 70% reduction in the amount of time necessary to complete the treatment. The reduced treatment time becomes more drastic as more isocenters are introduced. A complicated eight isocenter plan could take over 2 h to treat using standard circular collimators; the plan would take about 40 min to treat using a mMLC. It has been suggested conformal and IMRT techniques are superior to the multiple isocenter technique for treating complex targets.6'811 The fact is multiple isocenter treatment planning can be difficult and the resulting dose distributions highly user dependent. Inhomogeneous dose distributions and poor target conformality are the result of improperly optimized multiple isocenter plans. Wagner investigated the three methods of radiosurgery treatment delivery by implementing optimization algorithms for each; this way each technique could be compared fairly.5 The multiple isocenter technique was optimized with a sphere packing algorithm that determined the placement of variably sized spheres within the target volume.5 The result of his work showed the multiple isocenter technique was able to produce a highly conformal dose distribution while maintaining a steep dose gradient outside the target volume.5 For general and complex cases, it was determined that the optimized multiple isocenter technique outperformed the other methods. Dosimetry The absorbed dose to a small mass of material is defined as the amount of energy absorbed from charged particles liberated by ionizing radiation per unit mass of material. The kinetic energy released in the medium (KERMA) is defined as the sum of the initial kinetic energies of all the charged ionizing particles liberated by uncharged particles in a material per unit mass.1 Since charged particles travel a certain distance before depositing their energy, the absorbed dose will increase with depth in the material up to a point where the number of charged particles entering a small volume equals the number of charged particles leaving that volume. This condition is known as charged particle equilibrium. The absorbed dose then begins to decrease with depth at the same rate of the collision KERMA. S  0 0 /KERMA 0 Depth in Material > Figure 18. Relationship between absorbed dose and collision kerma for a megavoltage photon beam. For many of the small fields used in radiosurgery, electronic equilibrium does not exist in the lateral direction. This is due to the fact that the size of many of these small fields is smaller than the range of electrons being produced. The resulting loss of electronic equilibrium will occur at every point in the field, even in the center.12 There are several consequences that must be taken into consideration when dealing with these small fields: the crossbeam profile is flat over only a small fraction of the full width at half maximum, the output factor decreases dramatically with a decrease in field size, and the inverse square law may not hold for large source to point distances.12 In general, a large percentage of the beam is made up of penumbra. The SRS treatment planning system at the University of Florida requires the input of several beam parameters. These include output factors, dose rate at isocenter, tissue phantom ratios (TPR) at several depths, and offaxis ratios (OARs) for various sized fields. These parameters are derived from empirical measurements and data. An accurate assessment of these parameters is essential for minimizing the dose to normal tissues and reducing the risk of complications due to nonconformal dose distributions. / \ 0.8  0 0O.6  0.4  ,* 0.2  16 10 5 0 5 10 15 Crossplane Distance (mm) Figure 19. Crossplane offaxis ratio profile for a 12 mm field. Approximately 30% of the field is composed of penumbra. For any beam centered on the linac's primary axis at the machine isocenter, the absorbed dose to any point is calculated by Equation 11. ScD 2 Dose(p) = RD MU TPR OAR ROF (11) _STD_ where the reference dose (RD) is the dose per monitor unit, MU is the number of moniter units delivered, TPR is the tissuephantom ratio, OAR is the offaxis ratio, ROF is the relative output factor, ScD is the source to calibration point distance, and STD is the source to target distance. Our study focused on measuring and modeling offaxis ratios of mMLC shaped circular fields. The empirically driven radiosurgery treatment planning system at the University of Florida requires the input of a two dimensional matrix for each odd or even mMLC shaped field; these matrices have normalized values (between zero and one) and contain the necessary offaxis information for each beam. The previous scheme that used circular collimators required the input of onedimensional arrays of offaxis ratios. There was no need for a 2D matrix because the circular fields were perfectly symmetric. The penumbra of a radiation field refers to the region at the edge (of the field) over which the dose changes rapidly.1 The penumbra consists of two components: transmission penumbra and geometric penumbra. The transmission penumbra is the region in space exposed to photons that have traveled through part of the collimator. The geometric penumbra is the region that is irradiated by a spatially finite source.13 The variation in dose at the edge of the field also depends on the amount of scattered radiation within the material of interest. The physical penumbra is thus defined as the spatial distance between two specified points of relative dose, namely 80% and 20% of the dose to the central axis. 13 The type of detector used to measure the small the fields in radiosurgery should be considered carefully. Lack of electronic equilibrium in the field will cause large detectors to yield erroneous results.13 The model detector for radiosurgery dosimetry should have several unique qualities. The ideal dosimeter should have submillimeter spatial resolution.12, 1416 It should have a dose response that is energy, field size, and dose rate independent.14 It should provide a spatial map of the dose distribution rather than the dose at a single point, particularly for cases where it is necessary to verify conformal distributions.15 Also, the detector should be linear, reproducible, and stable. 14 There is no ideal dosimeter for radiosurgery, but there are several that approach the ideal. Radiographic film has been used extensively in radiosurgery dosimetry. It is a high resolution dosimeter that records information in two dimensions. Some possible problems that are encountered with film are variations in sensitivity and dose response which results from variable processing conditions.14 This problem may arise when trying to compare the doses from two separate films; the problem can be overcome by developing films from the same film batch under identical processing conditions. Radiographic film also suffers from spatial nonuniformity.14 Spatial variations on the order of 2% are typically seen with radiographic film. A flat area of the measured field may be averaged to reduce the error due to these variations. This correction is not possible when taking penumbra measurements, because the field is changing rapidly over this distance. A final problem encountered with radiographic film is its overresponse to low energy photons due to the high atomic number components that make up the film.12,14 The problem becomes worse as the field size and depth of measurement are increased, resulting in systematic error of the measured dose in the tail of the penumbra.12 This should not be a significant problem for the small fields typically used in radiosurgery. Radiochromic film is another type of film that can be used for radiation therapy dosimetry; this type of film does not require chemical developing so it avoids variations in sensitivity and dose response that result from variations in processing conditions.14 Radiochromic film suffers from disadvantages such as poor reproducibility14 and long developing time. It takes approximately 24 h for the typical radiochromic film to develop, so it is not as convenient as conventional radiographic film. Another disadvantage of using radiochromic film is the fact that it does not respond well to low doses of radiation. Radiochromic film also needs to be handled carefully and protected from exposure to sunlight and fluorescent lighting. Radiographic film does not perfectly fit all the criteria for an ideal dosimeter for SRS, but it comes close. It outperforms common dosimeters such as diodes, ionization chambers, and thermoluminescent dosimeters (TLDs) because film has high spatial resolution and the ability to make a simultaneous measurement of a spatial map of dose. To accurately measure the penumbra of small fields, the detector needs to be small compared to spatial variations in dose. Volume averaging can become a significant problem in even the smallest available ionization chambers.16 The low cost and general performance characteristics of radiographic film make it a suitable detector for performing relative dosimetric measurements on the small fields used in radiosurgery. CHAPTER 2 OFFAXIS RATIO MEASUREMENT OF MINIMLC APPROXIMATED CIRCLES Introduction One possible method of producing the offaxis ratio lookup tables to be used in the radiosurgery dosimetry system is to directly measure them. Although this method can be time consuming, the results are valuable in that they can be used to provide a means for comparison with model calculations. This chapter will go through the methodology used to measure the circular fields formed by minimultileaf collimators and convert the measurement to a useful offaxis ratio table. Materials and Methods A Varian CLINAC 600C 6MV Radiotherapy Accelerator was used to produce the radiations fields that were measured. A miniature multileaf collimator (Wellhofer Dosimetrie, Schwarzenbruck, Germany) was used to shape the radiation fields. The mMLC has 20 pairs of tungsten leaves that project 4.95 mm wide at the isocenter of the linac. Each leaf is steppingmotor driven along a curved path so that ends of the leaves match the beam divergence.17 Table 21. Physical characteristics of the Wellhofer miniMLC Number of leaves 20 Leaf width at isocenter 4.95 mm Leaf height 8.0 cm Maximum field size at isocenter 9 X 10 cm2 Sourcetocollimator distance (mounted on the Varian 600C) 65.0 cm Leaf travel over central axis 2.0 cm Leaf velocity 1 cm/s Mass 35 kg Kodak XOMAT V radiographic film was used to measure the radiation fields. Each piece of film was placed at the isocenter of the linac on top of a four centimeter slab of solid water which was used to provide sufficient backscatter. A one and a half centimeter slab of solid water was placed on top of the film to provide buildup. The film was located at the depth of maximum absorbed dose. The film was developed in a Kodak M35AM XOMAT processor; the temperature of the processing chemicals during film development was always 32.8+0.50C. Films from measurements performed on the same day were taken from the same film batch and were developed under identical processor conditions to avoid film variations in dose response and sensitivity. Figure 21. Basic setup for film measurements. Kodak radiographic film is sandwiched between two slabs of solid water. A calibration exposure was produced before a set of film measurements was made to provide a means to convert optical density to dose. The calibration exposure was developed along with the other films; a new calibration exposure was made each day new measurements were taken. The calibration exposures typically contained five or six exposures in the range often to eighty monitor units (MUs). The mMLC was set to produce six centimeter square fields for the calibration exposures. After the calibration film was exposed, the mMLC was set to create circular field approximations using an even number of open leaves; the circular fields produced had diameters ranging from 10 cm to 30 cm in 2 cm increments. Six exposures of each circular approximation were made on the same sheet of film. The calibration film and measurement films were developed in the Kodak processor and scanned with an Epson Expression 1600 flatbed scanner at 0.1 mm/pixel resolution. The films were scanned at a high resolution to preserve the inherent high spatial resolution of the detector. Figure 22. Epson flatbed scanner and processed radiographic film. Several films were scanned on a Lumisys L575 densitometer at 0.124 mm/pixel resolution; this was done to determine if the flatbed scanner would produce the same results as the laser densitometer. It was determined that the flatbed scanner produced similar results to the laser densitometer. Densitomneter 08 I I Flatbed Scanner 0.8 S Flatbed Scanner I Densitometer 0.4 0 4 02 012 40 30 20 10 0 10 20 30 40 50 40 30 20 10 0 10 20 30 40 50 A Crossplane Distance (rnmm) B Inplane Distance (mm) Figure 23. Offaxis profile film measurements of a 6 cm by 7 cm rectangular field. The profiles are used to compare the flatbed scanner with the densitometer. A) is a crossplane (direction of leaf travel) profile and B) is an inplane (direction of leaf width) profile. Consistency and uniformity checks were also performed on films scanned by the Epson scanner. A consistency test was performed to determine if the scanning resolution was consistent throughout the length of the scanner. A ruler was scanned at 0.1 mm/pixel resolution and the results were analyzed with a tool developed in Matlab. The tool prompts the user to click on each centimeter marker on the image of the ruler; the program then determines the distance between each marker. The results of the consistency check showed the scanner was performing acceptably, with an average error less than 0.1 mm, which is the size of each pixel. A uniformity check was performed on unexposed radiographic film; the standard deviation of absolute dose was determined to be less than 2%. 0.5  0.4  0.3  0.2  0.1  02 0.3  0.4  0.5  0 5 10 15 20 25 Position Along Scanner (cm) Figure 24. Results of the consistency check performed on the Epson flatbed scanner. The average absolute value of position error along the scanned ruler is 0.06 mm. Once all the films were scanned and saved on the computer, a calibration curve was created to convert optical density to dose. Output factors for rectangular fields produced by the mMLC were measured beforehand with an Exradin 14P ion chamber (parallel plate, 0.002 cm3 active volume, mm window thickness and 1 mm windowcollector gap); the output factor for a 6 cm square field was needed to convert monitor units to dose. The linac is calibrated to have a 10 cm square field deliver 1 cGy of radiation dose to water at dmax (1.5 cm) per monitor unit. The product of output factor and monitor units yields the amount of dose delivered to the film. The output factor for a 6 cm square field produced by the mMLC was determined to be 0.96; this value is in good agreement with the output of a 6 cm square field (0.957) when the mMLC is not attached. 0.9  0.85  0.8  S0.7 0.7  0.65 / 0.6  0.55 0.5  0 1 2 3 4 5 6 Equivalent Square (cm) Figure 25. Output of rectangular fields shaped by a miniMLC. The output of the field produced by the mMLC is relative to the output of a 10 cm square field produced by the primary collimator jaws alone. A film calibration tool developed in Matlab by St. John was modified to read in exposures saved in tagged image format (tiff) and to convert pixel value to optical density. Equation 21 was used to relate pixel value to optical density for an 8bit image. OD= loglo( ), (21) 255 where OD is optical density and P is the pixel value (between 0 and 255 for an 8bit grayscale image). The program prompts the user to input the output factor, number of calibration exposures and corresponding monitor units delivered for each exposure. The user is prompted to select each exposure file and click on the background and exposure peaks in an optical density histogram. The average background is determined and subtracted from each exposure. A second degree polynomial is fit to a plot of dose versus optical density. Raw Image Calibration Curve (BKGcorrected) 80 40  8   03 0)  !L 20  200 400 600 800 0 0.5 1 1.5 Optical density (OD) The calibration curve is Dose = 2.218e+001"OD^2 + 3.698e+001"OD + 0.374 15     B ckground Exposure Peak S10   I I . . I  . 10   0 0.2 0.4 0.6 0.8 1 1.2 Optical Density Figure 26. Film calibration tool. The user is prompted to click on the background and exposure peaks for each separate exposure. Another program was developed in Matlab to allow the user to separate, center, and align multiple exposures on a single film. The user inputs the resolution the film was scanned at and number of exposures on the film. After clicking on the (Get Image) button, the user is prompted to select the image file. The program displays the scanned image of the film and prompts the user to box in each exposure with the mouse. After an exposure has been selected, the program displays only the selected image. The user then zooms in on the top, right, bottom, and left sides of the image, respectively. Once a side is zoomed in on, the user is prompted to click on the center of the edge of the field. Having these four points, the program calculates the equations for the lines of the central axis and the point where the two lines intersect (the center of the beam). The image is then rotated slightly so the central axis of the beam is perpendicular to the sides of the image. Since the center of the beam is known, the program is able to crop the image so the center of the beam is exactly in the center of the image. S Enter nurnbe oft exposures * Figure 27. Tool used to separate and align exposures. The scanned image contains six 26 mm mMLC circular approximations. A program was developed to convert optical density to dose and to normalize the dose on a scale between zero and one. Since each quadrant of the mMLC circular field is symmetric about the central axis, the program is able to split up each intensity matrix into four separate but equal quadrants. Since six exposures were made for each field, a total of 24 field quadrants were produced for each circular field. These quadrants were averaged together by the Matlab program to produce the final result, a two dimensional map of offaxis ratios. Since multiple exposures were averaged together to produce the 2D maps, it was possible to calculate a 2D map of statistical uncertainty for each field. The actual error between the measured fields and the real dose distribution is probably less than predicted by statistical uncertainties. This is due to the fact that a spatial error in one quadrant will be somewhat compensated by the resulting opposite spatial error in the adjacent quadrant. Results Some typical two dimensional maps of measured offaxis ratios are shown along with their statistical uncertainties in Figures 812. The statistical uncertainty has no units (offaxis ratios are unitless) and is generally less than 10% in high gradient (penumbra) regions and less than 2% in low gradient regions. A large uncertainty in the penumbra region is expected due to the rapid falloff of dose. The plots display one quarter of the field with the origin located at the central axis of the field. Discussion Circular approximations of radiation fields form by a mMLC were measured with radiographic film; the processed films were input into several Matlab programs designed to separate and center the exposures, convert optical density to dose, and to average field quadrants to arrive at the final result. It was determined the process of separating and aligning exposures introduces the most error to the final result. Some measured offaxis ratio tables had much lower uncertainty than others. This is because the offaxis ratio tables with the lower uncertainty came from exposures that were better aligned. 27 Exposures may be over or underrotated by as much as a few degrees. Proper alignment and centering of the exposures is crucial to arriving at an accurate result. A new, less userdependent, method of aligning the exposures is currently being developed. The new method uses an edgedetection algorithm to find the top, bottom, left, and right edges of the field. Once these edges are determined, the exposures can be rotated accurately, with errors less than 10. W 90% isodose line 50% isodose line W 10% isodose line 5 10 15 20 26 Crossplane Distance (mm) 10 15 20 Crossplane Distance (mm) 25 Uncertainty Figure 28. Twelve millimeter mMLC circular approximation with even leaves. A) is a contour plot of the average measurements and B) is a map of the statistical uncertainty for each pixel in the measurement. 0.07 0.06 0.05 0.04 0.03 0.02 20 15 10 10 Crossplane 15 20 Distance (mm) 25  20 E  15 O1 = 10 0 5 10 Crossplane 15 20 Distance (mm) 25 Uncertainty Figure 29. Twenty two millimeter mMLC circular approximation with even leaves. A) is a contour plot of the average measurements and B) is a map of the statistical uncertainty for each pixel in the measurement. W 90% isodose line 50% isodose line W 10% isodose line   (5 e^ '^ \ ' \ .4 ___ i __ i 1 i __ i __ i 0.09 0.08 0.07 0.06 0.05 0.04 5 10 15 20 25 Crossplane Distance (mm) 5 10 15 20 Crossplane Distance (mm) 0.12 0.1 0.08 0.06 0.04 0.02 25 Uncertainty Figure 210. Thirty millimeter mMLC circular approximation with even leaves. A) is a contour plot of the average measurements and B) is a map of the statistical uncertainty for each pixel in the measurement. W 90% isodose line 50% isodose line W 10% isodose line 9 as I I I I 25 WI 90% isodose line 560% isodose line WI 10% isodose line 20 215 16 5 0.1 10 0.02 0 0 0 5 10 15 20 25 Uncertainty B Crossplane Distance (mm) Figure 211. Twenty millimeter mMLC circular approximation with odd leaves. A) is a contour plot of the average measurements and B) is a map of the statistical uncertainty for each pixel in the measurement. 5 10 15 20 25 Crossplane Distance (mm) 0 5 10 15 20 Crossplane Distance (mm) 0.12 0.1 0.08 1I1 IVl6 0.04 0.02 0 25 Uncertainty Figure 212. Twenty four millimeter mMLC circular approximation with odd leaves. A) is a contour plot of the average measurements and B) is a map of the statistical uncertainty for each pixel in the measurement. W 90% isodose line 50% isodose line W 10% isodose line Th 1 U~ CHAPTER 3 A ROBUST ALGORITHM TO MODEL OFFAXIS RATIOS OF MINIMLC APPROXIMATED CIRCULAR FIELDS Introduction Our goal was to develop a tool to model the offaxis ratios of mMLC shaped circular fields since the direct measurement of these fields is time consuming. The model is then used to produce twodimensional lookup tables for input into the radiosurgery treatment planning system. One alternative method that could be used to produce the offaxis ratio tables is Monte Carlo simulation, but it would take more time to run Monte Carlo simulations than to perform direct measurements. Also, the validation of Monte Carlo requires the determination of the parameters and then validation of results. Since Monte Carlo does not provide results in a timely manner, another method was considered. This chapter discusses a simple technique that employs model constructions to produce the offaxis ratio tables. Methods and Materials The model construction is based on the negative field technique using the basic Cunningham model.18 This technique involves the application of negative fluences to a rectangular open field to produce the desired dose distribution. The algorithm that was developed to help us achieve our final result is as follows: * Measure the offaxis ratios of rectangular fields with widths varying over the range of interest (1030 mm). * Fit the Cunningham model to the measured offaxis ratios and acquire the necessary fitting parameters. * Create a model of a rectangular field using the fitting parameters acquired in Step 2. * Calculate the negative field and subtract the negative field from the rectangular model. * Repeat Step 4 if there is more than one negative field. Rectangular fields formed by the mMLC were measured with Kodak XOMAT V film; the width of the measured rectangular fields varied from 10 mm to 30 mm. Optical density was converted to dose and normalized using the results from a film calibration curve obtained by the film calibration tool. One dimensional crossplane (in the direction of leaf motion) and inplane (in the direction of leaf width) profiles through the central axis were determined from the data set. The Cunningham model was fit to crossplane and inplane profiles using the curve fit tool in Matlab. The fitting algorithm employs a nonlinear leastsquares technique. The Cunningham model for offaxis ratio (OAR) at a point r mm from the central axis is OAR=10.5*expJ ( r for r d Sp 2 2 A( W (31) OAR= t+(0.5t)exp 2 r ) for r >2 S2 2 where aL and a2 are the fit parameters, wd is the field width defined as the distance between the fifty percent isodose points, r is the radial distance from the center of the field, p is the width of the penumbra, and t is the transmission through the mMLC when all leaves are closed. Transmission was measured by St. John and Wagner and was determined to be 0.7%.5 Meeks also measured transmission; he determined the maximum transmission between leaf sides to be 0.5% and between leaf ends to be 1.2%. 17 The two transmission measurements averaged together agree with St. John's and Wagner's measurements. The width of the penumbra, defined as the distance between the 80% and 20% isodose points, was measured and determined to be 0.33 mm. A typical example of the Cunningham model, fit to crossplane data, is shown (Figure 31). There are several other functions alternative to the Cunningham model that have been used to fit penumbra profiles. 12, 19 These functions are continuous and have only one fitting parameter, but they don't seem to fit the data as well as the discontinuous Cunningham model. In reality, a continuous function offers no advantage over a discontinuous one because our data points are sampled discretely. 0.8  Alphal = 1.96 2 Alpha2 = 2.10 0 0.4 0.2  02 0 5 10 15 20 25 Crossplane Distance (mm) Figure 31. Cunningham model fit to crossplane data from a rectangular field formed by the mMLC. The rectangular field is 18 mm wide. 28 2as Alphal = 2.18 : f.w.<18mm Alphal = 1.65 : f.w.>=18mm 24  1 2 < 14 12 10 12 14 16 18 20 22 24 26 28 30 Field Width (mm) A 28  2G  Alpha2 = 0.014 x (field width) + 2.3 24  24 12 1 I I I I 10 12 14 16 18 20 22 24 26 28 30 Field width (mm) B Figure 32. Plots of the fitting parameters as a function of field width. A) A step function is fit to the al parameters. B) A straight line is fit to the a2 parameters. These fits are input into a Matlab program and are used to create models of rectangular fields. The fitting parameters for each rectangular field were plotted against field width (Figure 32). A discontinuity is noted when ai is plotted against field width; this discontinuity was also seen by St. John. The discontinuity is the result of adding more open leaves to the field and the field approaching lateral equilibrium. A step function was fit to the calculated at parameters. The plot of the a2 parameters versus field width is linear, so a straight line was fit to the data. The fits of the alpha parameters were input into a Matlab program that was developed to produce the final models of the mMLC circular fields. Once the alpha parameter fits are input into the program, the program is able to produce a 2D model of a rectangular field. When the user enters mMLC leaf positions into the program, the program creates a model of a rectangular field with width equal to the widest open leaf. The length of the field is equal to the product of the number of open leaves in the field and the leaf width. Leaf width is a variable within the program, so the program can be applied to mMLCs of varying leaf widths. Whether or not an odd or even number of leaves is used to approximate the circle is also variable within the program. After the rectangular field is created, any negative fields that are to be subtracted from the rectangular field are calculated. The size, position, and weight of the negative field had to be considered carefully. If any of these negative field variables were not accurate, the final model would not agree well with measurement. We also had to account for the possibility of overlapping negative fields for cases that required the subtraction of more than one negative field. The first step in calculating the negative field is to determine the crossplane profile through the center of the leaf where the first negative field will be placed (Figure 34). The crossplane profile is derived directly from the rectangular model in the case where only one negative field is applied to the rectangular open field. The total number of negative fields to be applied is equal to the number of open leaves in the quarter field minus one. If more than one negative field is to be applied, the negative field that is calculated first is the largest and is located on the open leaf furthest from the center of the field. After the crossplane profile through the rectangular field has been determined, the profile is shifted to match the actual mMLC leaf position for the circular field. For example, in the case of a 22 mm mMLC shaped circle formed with an even number of leaves, the actual positions of the two open leaves in the quarter field are 10.8 mm and 8.7 mm, respectively (Figure 33). After the crossplane profile through the modeled rectangular field (10.8 mm by 10 mm in the quarter field) has been determined (Figure 34), the crossplane data is shifted back, from 10.8 mm to 8.7 mm to match the position of the second leaf (Figure 35). After the crossplane profile has been shifted, the difference between the rectangular crossplane profile and shifted crossplane profile is determined. The result is a profile of the negative field in the crossplane direction (Figure 36). The previous steps are repeated for the inplane profile; the product of the 1D negative field crossplane and in plane profiles yields a spatial map of the negative field. In cases where more than one negative field is applied, the negative crossplane profiles are a weighted combination of crossplane profiles derived from the rectangular field and the resultant field after the previous negative field was subtracted. This is done so regions of the rectangular field are not subtracted twice by overlapping negative fields. There is no need to weight the inplane profiles as such because of the order the negative fields are subtracted. The inplane profiles are derived directly from the most current version of the model. For example, if one negative field had been subtracted from the rectangular field, the next inplane profile would be derived from the field that resulted after the subtraction of the first negative field. Results The negative field technique was applied to models of rectangular fields to create models of the mMLC shaped circular fields that were measured. Several metrics were used to compare the final, modeled fields, with the measured fields. The first metric is qualitative; it consists of overlapping contour plots of the measured and modeled fields. By visually inspecting this plot, one can quickly determine if the model agrees well with measurement. The next two metrics provide a means to quantitatively compare the measured and modeled dose distributions. In low gradient regions of the field (regions where the offaxis ratio is not changing rapidly), the error between the modeled and measured fields is best represented by the absolute dose difference between the two fields. In high gradient regions (the penumbra), the dose difference does not provide a good means of quantifying the error. Instead, the error in high gradient regions is represented by the distance between points of equal relative dose. We chose 5% and 1 mm to be the error criteria for our dosedifference and distancetoagreement tests, respectively. A program was developed in Matlab to perform error analysis on the modeled fields using the measured fields as the reference. The program determines the dose difference and distancetoagreement error for nearly all points in the modeled field. The program then places each error point into either a dosedifference or distanceto agreement histogram depending on how well if fit the respective error criteria. The results are twodimensional histograms of dosedifference and distancetoagreement error. The level of agreement between the modeled fields and reference fields is observed by these histograms. If all points had less than 1 mm distancetoagreement error or less than 5% dosedifference error, then the modeled field has met the error criteria. The error analysis program also determines the percentage of error points that have either a dosedifference error less than 3% or distancetoagreement error less than 0.5 mm. A third histogram is created to display the dosedifference error and distanceto agreement error together for all points. It is obvious from inspecting the 3d histograms that high gradient regions can have a large dosedifference error, but small distanceto agreement error. And vice versa, low gradient regions can have a large distanceto agreement error, but small dosedifference error. One can also see from these histograms whether or not the error criteria are met. The contour plots and histograms show that the modeled even fields agree well with what was measured. All of the even models meet or exceed the error criteria. In fact, at least 96% of the error points lay within 3% dose error or 0.5 mm distance error for the even fields presented in our study. Discussion A tool was developed, to model in 2D, the offaxis ratios of mMLC shaped circular fields, based on a small number of measurements. The tool proved to be fast; it can produce a 2D offaxis ratio table in less than 1 s. The amount of time necessary to perform measurement and analysis to determine the parameters for input into the tool takes less than half a day. The tool proved to be accurate. All of the modeled fields shaped with an even number of leaves met the error criteria (5% dosedose error in low gradient regions and 1 mm distancetoagreement error in high gradient regions). Many of the models had the majority of its errors be much less than the error criteria. The tool is also flexible. Variables such a leaf width and output size can be readily changed within the program. Some of the modeled odd fields did not agree well with what was measured. The error is not inherent in the model. It was determined that some of the leaves on the mMLC were not properly aligned when the odd field measurements were made. This effect caused the actual leaf positions to be different from the specified leaf positions by about 0.7 mm on average. To check leaf alignment, some leaf pairs of interest were opened individually and made to project 2 cm wide at isocenter. The physical distance between the leaves were measured with a micrometer and projected to isocenter. The results of these measurements (Table 31) show the leaves were not properly aligned. Leaf alignment was performed about a week before the even field measurements were made. Odd field measurements were performed over six months later; it is quite possible that leaf position accuracy was affected over this time period. SastrePadro et al. performed stability and reproducibility measurements on an MLC and reported a maximum leaf shift of 0.27 mm over three months.20 Table 31. Leaf alignment check Leaf Paira Physical Separation Length Projected Absolute Error (mm) to Isocenterb (mm) (mm) 8 12.68 + 0.05 19.51 + 0.08 0.49 9 12.39 + 0.05 19.06 + 0.08 0.94 10 12.05 + 0.05 18.54 + 0.08 1.46 11 12.18 0.05 18.74 0.08 1.26 12 12.60 + 0.05 19.38 + 0.08 0.62 13 12.71 + 0.05 19.55 + 0.08 0.45 aEach leaf pair was opened individually and the distance between them was measured with a micrometer. bThe length projected to isocenter should be 20 mm. ft ' A Crossplane Position (mm) B Crossplane Position (rm) Figure 33. The mMLC leaf positions for a 22 mm circular approximation with even leaves. A) All leaves in the open field are shown. B) The leaves in the quarter field are shown. Because of symmetry, it is necessary to model only a quarter of the field. II 0% isodose line 50% isodose line I 20% isodose line 02 / Crossplane Profile 10 .       5     oi 5 87 10 15 20 Crossplane Distance (mm) 1 0.8 o o 0.4 5 10 15 20 25 Crossplane Distance (mm) Figure 34. A crossplane profile through the rectangular open field is determined. A) A contour plot of the rectangular field. The black dashed lines are the hypothetical mMLC leaf positions for the rectangular model. B) The derived crossplane profile. 44 25i W 80% isodose line 60% isodose line W 20% isodose line I_15      5 8 7 10 15 20 25 Cr s llane Dstance (m) profile A 0.6 ' 00 S5 8.7 10 15 20 25 Crossplane Distance (mm) Figure 35. The crossplane profile is shifted to match the position of the mMLC leaf A) Contour plot of the rectangular field and actual mMLC leaf positions for a 22 mm circular field. B) The crossplane profile before and after the shift. 1  0.8 aL I 02 0 6 O4 04 0 0 5 10 15 20 25 Crossplane Distance (mm) A 08 Negative Field Profile 06  02 \ 0 5 10 15 20 25 Crossplane Distance (mm) B Figure 36. Negative field profile. A) The difference between the crossplane profiles is determined. B) The resulting crossplane profile of the negative field is shown. 10 15 Crossplane Distance (mm) 5 10 15 20 Crossplane Distance (mrm) L 0.25 OAR Figure 37. Spatial map of negative field. A) A contour plot of the negative field. B) A colorwash plot. The negative field is applied to a rectangular field to produce the final model of a 22 mm mMLC circular approximation. W 40% isodose line 20% isodose line W 10% isodose line I ^ 20 E E 101 5 0 0 47 II I I 90% isodose line 25 60% isodose line I 10% isodose line 20  E (, 2 15 5 0 0 6 10 15 20 26 A Crossplane Distance (mm) 600 1200 00  1000  400   800    200   400   100    200   100 I' I200 06 0  0 0.01 0.02 0.03 0.04 0 0.2 0.4 0.6 0.8 Dose Error Distance Error (mm) B Figure 38. A 10 mm mMLC circular field formed by an even number of leaves. A) Contour plots of measured (solid line) and modeled (dashed line) fields. B) Histograms of dosedifference error and distancetoagreement error comparing the modeled field to the reference measured field. C) Threedimensional histogram of distance error and percent error. All points have either dose error less than 3.25% or distance error less than 0.6 mm. 48 ..... 4 10 C Figure 38. Continued 25 20  16 0 U   ___ _ 200 0 0* Dose Error (%) B 1000 800  i      0uu  Distance Error (mm) Figure 39. A 16 mm mMLC circular field formed by an even number of leaves. A) Contour plots of measured (solid line) and modeled (dashed line) fields. B) Histograms of dosedifference error and distancetoagreement error comparing the modeled field to the reference measured field. C) Threedimensional histogram of distance error and percent error. All points have either dose error less than 4.7% or distance error less than 0.9 mm. 5 10 15 20 25 Crossplane Distance (mm)    Figure 39. Continued 51 W 90% isodose line 25 50% isodose line m 10% isodose line 20  E 10 E , il 15  0 5 10 16 20 25 Crossplane Distance (mm) A 600 2000 ,, ,,   :  1 0 0     9LL_ LLI 00   1500  0 0 0 200  r 2000 i   0 1 2 3 4 0 0.2 0.4 0.6 0.8 Dose Error (%) Distance Error (mrn) B Figure 310. A 20 mm mMLC circular field formed by an even number of leaves. A) Contour plots of measured (solid line) and modeled (dashed line) fields. B) Histograms of dosedifference error and distancetoagreement error comparing the modeled field to the reference measured field. C) Threedimensional histogram of distance error and percent error. All points have either dose error less than 3.5% or distance error less than 0.75 mm. 52 0 Figure 310. Continued .' U . . U ' "w6 53 I 90% isodose line 25 560% isodose line 10% isodose line 20  E 1 01 161, 0, I 1I I 0 5 10 15 20 25 Crossplane Distance (mm) A 1200 1400 1200 1000l 100 I 100 800  1000  CD 800    0 1000 400 ___ 200  200   0 1 2 3 0 0.2 0.4 0.6 0.8 Dose Error (%) Distance Error (mm) B Figure 311. A 26 mm mMLC circular field formed by an even number of leaves. A) Contour plots of measured (solid line) and modeled (dashed line) fields. B) Histograms of dosedifference error and distancetoagreement error comparing the modeled field to the reference measured field. C) Threedimensional histogram of distance error and percent error. All points have either dose error less than 2.8% or distance error less than 0.7 mm. 54 3. '6  O f 4 10 C Figure 311. Continued I I 90% isodose line 25 50% isodose line W 10% isodose line 20  E 2 15    0 . 3000 1500 2500   ..,2000      .., 1000  I  11 0   500 t  O c O \ 0 0j 0 10 15 20 26 DoseCrosslane Error (%Distance (mm) A 3000  1500 2500 ' S2000 I 1000 I eld formed by an even number of leaves. A) Contour plots of measured (solid line) and modeled (dashed line) ields. =; 1500..I I I I I I SThreedimensional histogram of distance error and percent error. All points000 have either dose error less than 4% or distance error less than 0.8 mm. 6 100   0 1 2 3 4 0 0.2 0.4 0.6 0.8 56 S .. i .: '. 0 3 \ " 2* :.. . 4 10 C Figure 312. Continued CHAPTER 4 CONCLUSION The work presented in this report tackled the problem of how to produce two dimensional offaxis ratio tables for circular fields approximated by a minimultileaf collimator. The use of a mMLC in conjunction with the multiple isocenter delivery technique will allow for more efficient treatment delivery and increased patient satisfaction while maintaining conformal dose distributions with steep dose gradients. Two methods for producing the tables of OARs were investigated. The first method was direct measurement of the fields with radiographic film. This method proved to be rather tedious and time consuming because many films needed to be exposed, processed, and analyzed. The second method investigated was an empirical one based on the negative field technique. A tool was developed in the Matlab programming environment to create models of the mMLC circular fields based on the negative field technique where negative fluences are applied to an open field to achieve the desired dose distribution. The program requires the user to input several OAR fitting parameters that can be quickly obtained from a small number of measurements. Once the fitting parameters are input into the program, the program will output a spatial map of offaxis ratios for any specified mMLC shaped circular field. The modeled fields produced by the program were compared to the fields measured with radiographic film. A tool was developed to perform error analysis on the modeled fields with respect to a reference (measured) field. This was accomplished by determining the dosedifference error in low gradient regions of the field and distanceto agreement error in high gradient regions of the field. More than 90% of points in the modeled even fields had dosedifference error less than 3% or distancetoagreement error less than 0.5 mm. The modeled odd fields did not agree as well with measurement because the mMLC leaves were not moving to the specified location when the measurements were made. It should be noted from this experience that the leaves on the mMLC must be properly aligned and their positions accurately known for this method to work properly. Overall, the tool proved to be fast, flexible, easy to use, and accurate. Future work will include showing that the model can be applied to fields located offaxis and at different depths. It is expected that the model will work fine in these situations because it has been shown that the penumbra of small fields does not change much with depth or offaxis position. Future work on the tool used to create the modeled fields will include having the tool be able to model any field shaped by the mMLC, as opposed to just being able to model circular fields. APPENDIX A MATLAB PROGRAM DEVELOPED TO MODEL THE FIELDS msgbox('Select command window and enter inputs'); numleaf=input('Enter the number of leaves in the quarter field (default=1):'); if isempty(numleaf) numleaf=1; end for i=1:numleaf prompt = sprintf('Enter the position of leaf %d in mm: ',i); leafpos(i)=input(prompt); end %THESE VARIABLES MAY BE CHANGED TO ACCOMMODATE DIFFERENT MLC, ODD OR EVEN %FIELDS, ETC %EVEN OR ODD NUMBER OF LEAVES (1 FOR EVEN, 0 FOR ODD) even = 1; %LEAF WIDTH (mm) Ifwidth = 4.95 %5.0; scale = 0.1; %(mm/pixel) %SIZE OF RESULTING MATRIX (mm) sizematrix = 27.5; pixels = sizematrix/scale; w1 = leafpos(1)*2; %FIELD LENGTH %FIELD WIDTH if even==1 %EVEN CASE w2 = Ifwidth numleaf 2; else %ODD CASE w2 = Ifwidth (numleaf *2 1); end %These are the fit parameters for the rectangular fields. %THESE PARAMETERS CAN BE MODIFIED FOR A PARTICULAR MLC/LINAC COMBINATION if wl<18 alphal cross = 2.18; else alphal cross = 1.65; end if w2<18 alphalin = 2.18; else alphal in = 1.65; end alpha2cross = .0135*w1+2.29; alpha2in = .0135*w2+2.29; t=.0075; %TRANSMISSION CONSTANT p=2.4; %PENUMBRA CONSTANT %Produce Square Field IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII matrx=zeros(pixels,pixels); for i=1:pixels m=scale*i; if m<(wl/2) crossratio(i)=(1.5*exp(alphalcross*(w 1/2m)/p)); else crossratio(i)= (t+(.5t)*exp(alpha2cross*(m(w1 /2))/p)); end end for i=1:pixels m=scale*i; if m<(w2/2) inratio(i)=(1.5*exp(alphal in*(w2/2m)/p)); else in ratio(i)= (t+(.5t)*exp(alpha2in*(m(w2/2))/p)); end end matrx=zeros(pixels,pixels); 1=1; for i=1:pixels k=1; for j=1:pixels matrx(i,j)=crossratio(k)*in ratio(l); k=k+1; end 1=1+1; end newmatrx=matrx; %BEGIN CALCULATING AND SUBTRACTING NEGATIVE FIELDS for q=(numleaf1):1:1 %NUMLEAF1 IS THE NUMBER OF NEGATIVE FIELDS center = round((leafpos(q+1) + (leafpos(1)leafpos(q+1))/2)*10); if even==1 center = (q+.5)*Ifwidth*10; %EVEN CASE else center = q*lfwidth*10; %ODD CASE end centery=round(centery); wl= leafpos(q+1); if even==1 %EVEN CASE w2new = Ifwidth*(q) 2; else %ODD CASE w2new = 2* Ifwidth (q.5); end centery=round(centery); square=newmatrx(centery,:); norm=max(square); for i=1:pixels m=scale*i; if m<(leafpos(q+1)) newcross(i)=norm*(1 .5*exp(alphal cross*(wl m)/p)); else newcross(i)=norm*(t+(.5t)*exp(alpha2cross*(mwl)/p)); end end square2=newmatrx(:,centerx); norm2=max(square2); for i=1:pixels m=scale*i; if m<(w2new/2) newin(i)=norm2*(1.5*exp(alphal in*(w2new/2m)/p)); else newin(i)=norm2*(t+(.5t)*exp(alpha2in*(m(w2new/2))/p)); end end if q==(numleaf1) DON'TT WEIGHT FIRST NEGATIVE FIELD endl=pixels; for i=1:end1 ptl = newmatrx(centery,i); pt2= newcross(i); if (ptlpt2)>0 negcross(i)=ptlpt2; else negcross(i)=0; end end else %WEIGHT OTHER NEGATIVE FIELDS endl=pixels; for i=1:end1 wtl =(2*centerxi+1)/(2*centerx); wt2= i/(2*centerx); pta=newmatrx(centery,i); ptb=matrx(centery,i); ptl = wt2*pta+wtl*ptb; pt2= newcross(i); if (ptlpt2)>O negcross(i)=ptlpt2; else negcross(i)=O; end end end negin=zeros(1 ,pixels); for i=1 :pixels ptl =newmatrx(i,centerx); pt2= newin(i); if (ptlpt2)>O negin(i)=ptlpt2; else negin(i)=O; end end maxl=max(negin); max2=max(negcross); if max1 >max2 avemax=max1; else avemax=max2; end [z,end2]=size(negin); negmatrx=zeros(end2,end1); 1=1; for i=1:end2 k=1; for j=1:end1 negmatrx(i,j)=(negcross(k)*negin(l))/avemax; k=k+1; end 1=1+1; end if q==2 negl=negmatrx; else neg2=negmatrx; end for i=1:end2 for j=1:end1 newmatrx(i,j)=newmatrx(i,j)negmatrx(i,j); end end 63 end X=(0:(pixels1)).*scale; figure [C,h] = contour(X,X,newmatrx,[.9 .5 .1],':');hold on; %[C,h] = contour(X,X,odd28mm,[.9 .5 .1]); clabel(C,h); Xlabel('Crossplane Distance (mm)'); Ylabel('lInplane Distance (mm)'); legend(h,'90% isodose line','50% isodose line','10% isodose line'); APPENDIX B MATLAB PROGRAM DEVELOPED TO PERFORM ERROR ANALYSIS ON MODELED FIELDS clear X X1 finaldist finaldose gammadose gammadist histomatrix; %TYPE THE NAME OF THE REFERENCE DOSE PROFILE IN THE WORKSPACE refdose = even30; fieldwidth=23; %max 23 Ingthofr=(fieldwidth/2)+1 0; numpix=275; k=1; t=1; z=1; %CHECK EACH PIXEL VALUE FOR DOSEDOSE ERROR for theta = 0:0.017 : pi/2 for r = 0: 0.1 : Ingthofr r2=r*1 0; y = round(r2 *sin(theta)) +1; x = round(r2 *cos(theta)) +1; dose_err(k)=abs(newmatrx(y,x)refdose(y,x)); match=refdose(y,x); %REFERENCE VALUE FOR DOSE WE WANT TO FIND DISTANCE TO if r<4 start=0; else start=r240; end for r3=start:0.5:(r2+45) y2 = round(r3 *sin(theta)) +1; x2 = round(r3 *cos(theta)) +1; temp=newmatrx(y2,x2); if temp<=match dist(k)=sqrt((y2y)A2+(x2x)A2)*.1; break else dist(k)=4.5; end end gammadist=dist(k)/1; gammadose=dose_err(k)/0.05; if gammadose t=t+1; else finaldist(z)=dist(k); z=z+1; end k=k+1; end end dose err=dose err.*100; %CREATE 2D PLOT OF BINNED ERRORS prcntbin=0.25; distbin=0.1; rndprcnt=prcntbin/2; rnddist=distbin/2; [m,n]=size(dist); histomatrix=zeros(50,40); Ighistomatrix=zeros(50,40); for i=1:n temple =dist(i); temp2=dose_err(i); temple =temp1 +rnddist; temp2=temp2+rndprcnt; temple =round(templ/distbin); temp2=round(temp2/prcntbin); if temp2<40 histomatrix(templ ,temp2)=histomatrix(templ ,temp2)+1; end end [m,n]=size(histomatrix); for i=1:m forj=1:n if histomatrix(i,j)~=0 temp = histomatrix(i,j); Ighistomatrix(i,j)=log(temp); end end end %DETERMINE THE RATIO OF PTS THAT HAVE LESS THAN .5mm DISTANCE ERROR %OR 3% DOSE ERROR. cnt=0; su mhisto=sum(sum(histomatrix)); for i=1:m forj=1:n if (i<6)(j<13) cnt=cnt+histomatrix(i,j); end end end ratio=(cnt/sumhisto)*100 distaxes=(0:distbin:(distbin*(m1))); prcntaxes=(0:prcntbin:(prcntbin*(n1))); meshz(prcntaxes(1,1:35),distaxes(1,1:35),lghistomatrix(1:35,1:35)); xlabel('Percent Error','Rotation',15,'Fontsize',14); ylabel('Distance Error (mm)','Rotation',45,'Fontsize', 14); zlabel('Log(Frequency)','Fontsize', 12); set(gca,'zscale','linear');view(153,54); figure N=zeros(100,1); [N,X]=hist(finaldose,100); P=zeros(20,1); [P,X1]=hist(finaldist,20); subplot(1,2,1) bar(X*100,N); grid on; Xlabel('Dose Error (%)'); Ylabel('Frequency'); pbaspect([1 1 1]);%Title('Histogram'); subplot(1,2,2) bar(X1 ,P); grid on; Xlabel(' Distance Error (mm)'); Ylabel('Frequency'); pbaspect([1 1 1]);%Title('Histogram'); APPENDIX C MATLAB PROGRAM DEVELOPED TO ANALYZE A CALIBRATION FILM function calib_separate %CALIB_SEPARATE % This function opens calibration tiff files, selected by operator, one at a time % and plots a histogram of optical density. By clicking on the background peak % and exposure peak for each file, a dose calibration curve is calculated. % Coefficients a, b, & c are returned for the equation dose = a*OD^2 + b*OD + c. msgbox('Select command window and enter inputs'); num=input('Enter the number of calibration exposures (default=8):'); if isempty(num) num=8; end output=input('Enter the output factor (default=1.0):'); if isempty(output) output=1; end MU(1,1)=0; for i=1:num prompt=sprintf('Enter MUs for exposure # %d: ',i); MU(i+1,1)=input(prompt); end OD=zeros(num+1,1); dose=MU.*output %film_type=input('Enter the film type(XV or EDR),(default{XV}):'); %if isempty(film_type) % film_type='XV'; %end %film_type forj=1:num prompt=sprintf('Select file number %d',j) [scanfile,direc]=uigetfile('*.tif, prompt); if scanfile==0 return; end cd(direc); fidl=fopen(scanfile); if fid1 ~=1 raw=imread(scanfile,'tif); else msgbox('File not found\n'); return; end if j==1 fl=figure; set(f1 ,'position',[120 40 600 480]); end [A,B]=size(raw); raw2=double(raw); for i=1:A for z=1:B if raw2(i,z)==0 raw2(i,z)=1; raw2=log10(raw2/255); %Convert to OD N=zeros(500,1); % HIST(raw) creates a matrix with histograms of each column in the matrix(raw) [N1,X]=hist(raw2,500); % Combine all histograms into a single histogram (X contains bin centers) for i=1:B N(:,1)=N(:,1) + N1(:,i); end M = max(max(raw2)); %Use M to set axis limits Mn=max(max(N)); % Draw the plots pl = subplot(2,2,1);imagesc(raw),colormap gray, axis square;Title('Raw Image'); p2 = subplot(2,2,2); plot(0,0) p3 = subplot(2,1,2); %[N,X]=hist(raw1,50);hist(raw1 (25,:),50);hold on bar(X,N); grid on; Xlabel('Optical Density'); Ylabel('Frequency'); hl=uicontrol('style','text','position',[100 230 400 20 ],'BackgroundColor','w'); set(h1,'string','****Click on BACKGROUND peak****'); [X,Y]=ginput(1); BKGpts(j)=X; set(p3,'xlim',[0 M],'ylim',[0 Mn]);pbaspect([2 1 1]); set(h1,'string','****Click on Exposure peak****'); [X,Y]=ginput(1); ODpoint(j)=X; % Leave row 1 col 1 for zero dose OD(j+1)=ODpoint(j); delete(hl); end BKGpts BKG=mean(BKGpts); %std(BKGpts(:,1))/BKG; OD(1)=BKG; OD; dose; % = standard deviation for t=l:num+l OD(t)=OD(t)BKG; end OD dose OD_size=size(OD) dose_size=size(dose); dose=output.*MU; Mdose=max(dose); MaxOD=max(OD); facts=polyfit(OD,dose,2); a=facts(1); b=facts(2); c=facts(3); for i=1:(MaxOD)*50 dose_fit(i,1)=a*(i/50)A2 + b*(i/50) + c; Xaxis(i)=i/50; end dose_fit; %*****linear fit %facts=polyfit(OD(2:6),dose(2:6),1); %a=0; %b=facts(1); %c=facts(2); %for i=1:num % dose_fit(i,1)=b*OD(i,1) + c; %end axes(p2); cla plot(Xaxis,dose_fit,'color','r','LineWidth',2); %plot(dose_fit,OD/1000,'color','r','LineWidth',2); hold on; plot(OD(1 :num+l),dose(1 :num+1),'*');grid on; YLabel('Dose (cGy)');XLabel('Optical density (OD)');Title('Calibration Curve (BKGcorrected)'); % Write the fitting parameters at the bottom of the plot hl=uicontrol('style','text','position',[60 225 500 20 ],'BackgroundColor','w'); result=sprintf('The calibration curve is Dose = %7.3e*ODA2 + %7.3e*OD + %4.3f ',a,b,c); set(hl,'ForeGroundColor','r','FontWeight','Bold','string',result); % Write calibration factors fid=fopen('calib.info','w'); fprintf(fid,'Calibration film: %s\n',pwd); fprintf(fid,'%7.3e \t %7.4f \t %7.4f\n',a,b,c); fprintf(fid,'%7.4f',BKG); set(findobj('tag','cal_a'),'string',a); set(findobj('tag','cal_b'),'string',b); set(findobj('tag','cal_c'),'string',c); fclose(fid); 70 % write dose and OD to file for Excel fid=fopen('plot3.txt','w'); for i=0:num1 j=numi; fprintf(fid,'%f\t%f\n',OD(j),dose(j)); end fclose(fid); APPENDIX D MATLAB PROGRAM DEVELOPED TO SEPARATE AND ALIGN EXPOSURES function varargout = separate_exp(varargin) % SEPARATE_EXP Mfile for separate_exp.fig % SEPARATE_EXP, by itself, creates a new SEPARATE_EXP or raises the existing % singleton*. % % H = SEPARATE_EXP returns the handle to a new SEPARATE_EXP or the handle % the existing singleton*. % % SEPARATE_EXP('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in SEPARATE EXP.M with the given input arguments to % SEPARATE_EXP('Property','Value',...) creates a new SEPARATE_EXP or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before separate_exp_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to separate_exp_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help separate_exp % Last Modified by GUIDE v2.5 22Feb2005 05:11:31 % Begin initialization code DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, .. 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @separate_exp_OpeningFcn, .. 'gui_OutputFcn', @separate_exp_OutputFcn, .. 'gui_LayoutFcn', [] ... 'gui_Callback', []); if nargin & isstr(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code DO NOT EDIT %  Executes just before separate_exp is made visible. function separate_exp_OpeningFcn(hObject, eventdata, handles, varargin) ). % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to separate_exp (see VARARGIN) % Choose default command line output for separate_exp handles.output = hObject; % Update handles structure guidata(hObject, handles); set(hObject,'MenuBar','figure'); % UIWAIT makes separate_exp wait for user response (see UIRESUME) % uiwait(handles.figurel); %  Outputs from this function are returned to the command line. function varargout = separate_exp_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; %  Executes during object creation, after setting all properties. function numexp_CreateFcn(hObject, eventdata, handles) % hObject handle to numexp (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles empty handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'Backgrou ndColor',get(0,'defaultUicontrolBackgroundColor')); end %  Executes on selection change in numexp. function numexp_Callback(hObject, eventdata, handles) % hObject handle to numexp (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns numexp contents as cell array %  Executes on button press in getfile. function getfile_Callback(hObject, eventdata, handles) % hObject handle to getfile (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) num=get(handles.numexp,'Value'); %returns selected item from numexp scale=str2double(get(handles.scale,'String')); %returns contents of scale as a double numpixel=floor(85/scale); %was 55 check=rem(numpixel,2); %force number of pixels to be even for ease of calculations if check==0 else numpixel=numpixel+1; end [scanfile,direc]=uigetfile('*.tif','Select image'); cd(direc); fidl=fopen(scanfile); if fid1 ~=1 l=imread(scanfile,'tif); else fprintf('File not found\n'); return; end cla; uiwait(msgbox('Box in each exposure. Hold shift key for square.','modal')); for i=1:num cla; axes(handles.image) %Allows the user to separate different exposures newimage=imcrop(l); %Check to see if user wants to center and align exposures num2=get(handles.align,'Value'); if num2==1 cla; contimage=double(newimage); imagesc(contimage),colormap gray, axis equal, axis tight; uiwait(msgbox('Zoom in and click on each fiducial starting at the top and working clockwise.','modal')); for z=1:4 k=20; zoom on; k=waitforbuttonpress; if k==0 [x(z),y(z)]=(ginput(1)); end zoom out; end %Determine the equations for the lines for the central axis ml = (y(2)y(4))/(x(2)x(4)); bl =y(2)ml *x(2); if x(3)==x(1) %so don't divide by zero xint=round(x(3)) m2=inf; else m2=(y(3)y(1))/(x(3)x(1)); b2=(y(3)m2*x(3)); %Determine intersection (center of beam) xint=round((b2bl)/(mlm2)); end yint=round(ml*xint+bl); % %if odd % yint=yint25; % %end % %Crop the image so the center of beam is center of image [A,B]=size(newimage); if ((xint<(B/2))&(yint>(A/2))) % first quadrant if xint>(Ayint) 12=imcrop(newimage,[xint(Ayint),2*yintA,2*(Ayint),2*(Ayint)]); % closer to upper half else 12=imcrop(newimage,[1,yintxint,2*xint,2*xint]); % closer to left edge...xmin set to 1 instead of 0 b/c dimensions work out that way. end elseif ((xint<(B/2))&(yint<(A/2))) % third quadrant if xint>yint 12=imcrop(newimage,[xintyint,1,2*yint,2*yint]); else 12=imcrop(newimage,[1,yintxint,2*xint,2*xint]); end elseif ((xint>(B/2))&(yint>(A/2))) % second quadrant if ((Bxint)<(Ayint)) 12=imcrop(newimage,[2*xintB,yint(Bxint),2*(Bxint),2*(Bxint)]); else 12=imcrop(newimage,[xint(Ayint),2*yintA,2*(Ayint),2*(Ayint)]); end else % fourth quadrant if yint<(Bxint) 12=imcrop(newimage,[xintyint,1,2*yint,2*yint]); else 12=imcrop(newimage,[2*xintB,yint(Bxint),2*(Bxint),2*(Bxint)]); end end %Next, determine how much the image needs to be rotated [A,B]=size(12); X=A/(2*m2)+A/2; angle=rad2deg(atan(2*X/A1)); angle %Now rotate the image 13=imrotate(12,angle,'bicubic','crop'); cla; [A,B]=size(13); A=A/2n umpixel/2; B=B/2numpixel/2; 14=imcrop(13,[B,A,numpixel1,numpixel1]); newd irec=strcat(direc,'exposure'); num2=num2str(i); newdirec=strcat(newdirec,n um2); newdirec=strcat(newdirec,'.tif); %Write each separate exposure to a file imwrite(14,newdirec,'tif); else newdirec=strcat(direc,'exposure'); num2=num2str(i); newdirec=strcat(newdirec,num2); newdirec=strcat(newdirec,'.tif); %Write each separate exposure to a file imwrite(newimage,newdirec,'tif); end % end cla; %  Executes during object creation, after setting all properties. function scale_CreateFcn(hObject, eventdata, handles) % hObject handle to scale (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles empty handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'Backgrou ndColor',get(0,'defaultUicontrolBackgroundColor')); end function scale_Callback(hObject, eventdata, handles) % hObject handle to scale (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of scale as text % str2double(get(hObject,'String')) returns contents of scale as a double %  Executes on button press in align. function align_Callback(hObject, eventdata, handles) % hObject handle to align (see GCBO) % eventdata reserved to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of align APPENDIX E MATLAB PROGRAM DEVELOPED TO AVERAGE FIELD QUADRANTS AND PRODUCE FINAL MAP OF OFF AXIS RATIOS %This program is called by separate_exp when the Combine button is pressed. % The user is prompted to select six exposures. User needs to click on the background % for each exposure. Average background is subtracted from these exposures % and exposures are stored in an array. Program then splits each image % matrix into four equal quadrants and stores them in a separate array. %num=get(handles.numexp,'Value'); %returns selected item from numexp %Enter scale and number of exposures here (mm/pixel) scale=0.1; numexp=2; %ENTER FIT PARAMETERS TO CONVERT OD TO DOSE a=14.82; b=224.21; c=2.861; for t=1:numexp [scanfile,direc]=uigetfile('*.tif,'Select image'); cd(direc); fidl =fopen(scanfile); if fid1 ~=1 l=imread(scanfile,'tif); else fprintf('File not found\n'); return; end 13=double(l); [numpixel,B]=size(13); %CONVERT TO OPTICAL DENSITY 13=log 10((13+1)/256); 12(t,:,:)= 13; A=B; N=zeros(500,1); [N1,X]=hist(13,500); % Combine all row histograms into a single histogram (X contains bin centers) for i=1:A N(:,1)=N(:,1) + N1(:,i); end bar(X,N); grid on; Xlabel('Optical Density'); Ylabel('Frequency'); pbaspect([1 1 1]);Title('Histogram'); %Select background [bkg(t),y]=ginput(1); end %Determine and subtract average background avebkg=sum(bkg(:))/numexp; 12(:,:,:)=12(:,:,:)avebkg; pix=numpixel/2; %Convert optical density to dose for t=1:numexp for i=1:numpixel for j=1 :B 12(t,i,j) = a*(12(t,i,j))^2 + b*12(t,i,j) + c; if 12(t,i,j)<0 %12(t,i,j)=0; end end end end %Declare array for the sections Combine=zeros((numexp*4),pix,pix); q=1; %Split up the four images into four quadrants and store in array for m=1 :numexp P=zeros(pix,pix); Q=zeros(pix,pix); R=zeros(pix,pix); S=zeros(pix,pix); %Upper left hand corner for i=1:pix for j=1:pix P(i,j)=12(m,i,j); end end P=fliplr(P); Combine(q,:,:)=P; q=q+1; %Upper right hand corner for i=1:pix for j=(pix+1):(numpixel) k=j(pix); Q(i,k)=12(m,i,j); end end Combine(q,:,:)=Q; q=q+1; %Lower left hand corner for i=(pix+1):(numpixel) for j=1:pix k=i(pix); R(k,j)=12(m,i,j); end end R=fliplr(R); R=flipud(R); Combine(q,:,:)=R; q=q+1; %Lower right hand corner for i=(pix+1):(numpixel) for j=(pix+1):(numpixel) k=i(pix); l=j(pix); S(k,I)=12(m,i,j); end end S=flipud(S); Combine(q,:,:)=S; q=q+1; end %Determine the average sum=zeros(pix,pix); Temp=zeros(pix,pix); for i=1:(4*numexp) for j=1:pix for k=1:pix Temp(j,k)=Combine(i,j,k); end end sum=sum+Temp; end Average=zeros(pix,pix); Average=sum(:,:)/(numexp*4); UncAverage = Average; max(max(Average)); Average=flipud(Average); %SUBTRACT THE AVERAGE MINIMUM [A,B]=size(Average); k=1; for i=A25:A 1=1; for j=B25:B sample(k,l)=Average(i,j); 1=1+1; end k=k+1; end minim=mean(mean(sample)); Average = Average(:,:) minim; %Normalize the data to the maximum value maxim=max(max(Average)); Average=Average(:,:)/maxim; temp=Average; sumdev=zeros(pix,pix); %DETERMINE THE STATISTICAL ERROR OF THE AVERAGE Temp2=zeros(pix,pix); for i=1:(numexp*4) for j=1:pix for k=1:pix Temp(j,k)=Combine(i,j,k); end end for j=1:pix for k=1:pix Temp2(j,k)=(Temp(j,k)UncAverage(j,k))^2; end end sumdev=sumdev+Temp2; end Unc=zeros(pix,pix); Unc=sqrt(sumdev(:,:)/(numexp*41)); Unc=Unc./maxim; %PLOT HISTOGRAM OF UNCERTAINTY N=zeros(500,1); [N1,X]=hist(Unc,500); % Combine all row histograms into a single histogram (X contains bin centers) for i=1:275 N(:,1)=N(:,1) + N1(:,i); end N=N(:,1)/75625; bar(X,N); grid on; Xlabel('Relative Uncertainty'); Ylabel('Relative Frequency'); pbaspect([1 1 1]);Title('Histogram'); xlim([0 .15]); Xax=(0:274)./1 0; Xtr=(274:1:0)./10; figure imagesc(Xax,Xtr,Unc);colorbar; Xlabel('Crossplane Distance (mm)'); Ylabel('lnplane Distance (mm)'); set(gca,'Ydir','normal'); figure [C,h] = contour(Xax,Xax,Average,[.9 .5 .1]); clabel(C,h); Xlabel('Crossplane Distance (mm)'); Ylabel('lnplane Distance (mm)'); legend(h,'90% isodose line','50% isodose line','10% isodose line');figure % flip=flipud(temp); % C=cat(1,temp,flip); % % flip=fliplr(temp); % flip2=flipud(flip); % D=cat(1 ,flip,flip2); % % final=cat(2,D,C); % % % imagesc(final); % colorbar figure line=Average(1,:); plot(line,':b'); LIST OF REFERENCES 1. F. M. Khan, "Stereotactic Radiosurgery," in The Physics of Radiation Therapy, edited by J. Pine, M. Standen, L. R. Kairis, and T. Boyce (Williams & Wilkins, Baltimore, 2003). 2. F. J. Bova, W. A. Friedman, J. M. Buatti, and W. M. Mendenhall, Linac Radiosurgery: A Practical Guide, (Springer, New York, 1998). 3. E. J. Hall, Radiobiology for the Radiobiologist, (Williams & Wilkins, Baltimore, 2000). 4. R. M. Cardinal, S. H. Benedict, Q. Wu, R. D. Zwicker, H. E. Gaballa, and R. Mohan, "A comparison of three stereotactic radiotherapy techniques; arcs vs. noncoplanar fixed fields vs. intensity modulation," Int. J. Radiat. Oncol., Biol., Phys. 42, 431436 (1998). 5. T. H. Wagner, Optimal Delivery Techniques for Intracranial Stereotactic Radiosurgery Using Circular and Multileaf Collimators: PhD dissertation, Nuclear Engineering Sciences, University of Florida, Gainesville, FL (2000). 6. T. D. Solberg, K. L. Boedeker, R. Fogg, M. T. Selch, and A. A. F. DeSalles, "Dynamic arc radiosurgery field shaping: a comparison with static field conformal and noncoplanar circular arcs," Int. J. Radiat. Oncol., Biol., Phys. 49, 14811491 (2001). 7. T. J. St. John, IntensityModulated Radiosurgery Treatment Planning By Fluence Mapping OptimizedMultiisocenter Plans: PhD dissertation, Nuclear Engineering Sciences, University of Florida, Gainesville, FL (2002). 8. P. G. Archer, J. M. Balter, D. A. Ross, J. A. Hayman, and H. M. Sandler, "The treatment planning of segmental, conformal stereotactic radiosurgery utilizing a standard multileaf collimator," Med. Dosim. 24, 1319 (1999). 9. J. L. Nakamura, A.Pirzkall, M. P. Caro., P. Xia, V. Smith, w. M. Wara, P. L. Petti, L. J. Verhey, and P. K. Sneed, "Comparison of intensitymodulated radiosurgery with gamma knife radiosurgery for challenging skull base lesions," Int. J. Radiat. Oncol., Biol., Phys. 55, 99109 (2003). 10. S. H. Benedict, R. M. Cardinale, Q. Wu, R. D. Zwicker, W. C. Broaddus, and R. Mohan, "Intensitymodulated stereotactic radiosurgery using dynamic micro multileaf collimation," Int. J. Radiat. Oncol., Biol., Phys. 50, 751758 (2001). 11. A. S. Shiu, H. M. Kooy, J. R. Ewton, S. S. Tung, J. Wong, K. Antes, and M. H. Maor, "Comparison of miniature multileaf collimation (mMLC) with circular collimation for stereotactic treatment," Int. J. Radiat. Oncol., Biol., Phys. 37, 679 688 (1997). 12. J. Sun and Y. Zhu, "Study of dosimetric penumbra due to multileaf collimation on a medical linear accelerator," Int. J. Radiat. Oncol., Biol., Phys. 32, 14091417 (1995). 13. K. R. Rice, J. L. Hansen, and G. K. Svensson, "Measurement of dose distribution in small beams of 6MV xrays," Phys. Med. Biol. 32, 10871099 (1987). 14. D. M. Duggan and C. W. Coffey II, "Small photon field dosimetry for stereotactic radiosurgery," Med. Dosim. 23, 153159 (1998). 15. J. L. Robar and B. G. Clark, "The use of radiographic film for linear accelerator stereotactic radiosurgical dosimetry," Med. Phys. 26, 21442150 (1999). 16. J. W. Sohn, J. F. Dempsey, T. S. Suh, and D. A. Low, "Analysis of various beamlet sizes for IMRT with 6 MV photons," Med. Phys. 30, 24322439 (2003). 17. S. L. Meeks, F. J. Bova, S. Kim, W. A. Tome, and J. Buatti, "Dosimetric characterization of a doublefocused miniature multileaf collimator," Med. Phys. 26, 729733 (1999). 18. H. E. Johns and J. R. Cunningham, The Physics of Radiology. New York: John Wiley & Sons (1983). 19. T. Kron, A. Elliot, and P. Metcalfe, "The penumbra of 6 MV xray beams as measured by thermoluminescent dosimetry and evaluated using an inverse square root function," Med. Phys. 20, 14291438 (1993). 20. M. SastrePadro, U. A. van der Heide, and H. Welleweerd, "An accurate calibration method of the multileaf collimator valid for conformal and intensity modulated radiation treatments," Phys. Med. Biol. 49, 26312643 (2004). BIOGRAPHICAL SKETCH Brandon K. Rice was born in October 1981, in Duluth, MN. He attended the University of WisconsinRiver Falls from 19992003, earning a Bachelor of Science degree in physics (with honors) in May 2003. During his undergraduate work, he served as a research assistant in the Department of Physics; he served as president of Phi Sigma Kappa national fraternity; he was a member of Sigma Pi Sigma physics honor society, and Phi Kappa Phi national honor society; and was an active member in the local chapter of the Society of Physics Students. He entered graduate school at the University of Florida in August 2003. There he completed a Master of Science degree in medical physics. During his work, he served as a graduate research assistant in the Radiosurgery and Radiobiology Laboratory at the University of Florida Brain Institute and served as vice president of the Society of Health and Medical Physics Students. He is also a member of the American Association of Physicists in Medicine and the American Nuclear Society. 