UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Implementation of respiratory-correlated cone-beam CT on Varian linac systems Cropp, Robert James 2011

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.

Item Metadata


24-ubc_2011_fall_cropp_robert.pdf [ 5.85MB ]
JSON: 24-1.0072204.json
JSON-LD: 24-1.0072204-ld.json
RDF/XML (Pretty): 24-1.0072204-rdf.xml
RDF/JSON: 24-1.0072204-rdf.json
Turtle: 24-1.0072204-turtle.txt
N-Triples: 24-1.0072204-rdf-ntriples.txt
Original Record: 24-1.0072204-source.json
Full Text

Full Text

Implementation of respiratory-correlated cone-beam CT on Varian linac systems by Robert James Cropp B.Sc., University of British Columbia, 1996 Ph.D., University of Toronto, 2000 a thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in the faculty of graduate studies (Physics) The University Of British Columbia (Vancouver) September 2011 c© Robert James Cropp, 2011 Abstract Respiratory-correlated (4D) X-ray CT scans produce a set of images correspond- ing to different phases of a patient’s breathing cycle. In external beam radio- therapy, information about a tumor’s motion due to respiration can be used to optimize a treatment plan, provided the patient can be accurately aligned for treatment. Cone-beam CT (CBCT) systems are becoming widespread on treat- ment linac units and are used to aid in alignment. This thesis describes the implementation of respiratory-correlated cone-beam CT scans on two types of Varian units: iX and TrueBeam. Procedures for 4D CBCT scans on each type have been developed and used to image a moving phan- tom. The respiratory phase of the motion is recorded with the Varian Real-time Position Management (RPM) system, which uses optical tracking. To improve image quality, the gantry rotation speed is reduced below the default value of 6◦/s: this reduces streak artifacts. Each projection image from the scan is assigned to one of ten phase bins according to its respiratory phase value. A 3D image is reconstructed for each phase bin with software developed for this project, which uses conventional Feldkamp-Davis-Kress filtered backprojection. Four 4D scans of a periodically moving phantom have been taken, with differ- ent gantry speeds and mAs values. To evaluate the effect of these scan parameters on image quality, and demonstrate a potential application of 4D CBCT, a pro- cedure for automated tumor trajectory measurement has been developed. The measurement uses image registration between phase images, with either a rigid translation or a B-spline deformation algorithm. In the highest-quality images, the displacements of an insert in the phantom are measured within 1 mm of the correct values by both algorithms. In lower-quality images the translation algo- rithm is more robust. The two algorithms give similar results when applied to 4D CT images of actual lung cancer patients. ii Preface The research presented in this thesis includes the analysis of anonymized CT images of patients at BC Cancer Agency, as described in Chapter 5. Ethics approval for this use of patient images was obtained from the University of British Columbia - British Columbia Cancer Agency Research Ethics Board. The REB certificate number is H11-00161. iii Table of Contents Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . x 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Absorbed dose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 External beam treatment planning . . . . . . . . . . . . . . . . . 5 1.3 CT imaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4 Image-guided radiation therapy and cone-beam CT . . . . . . . . 11 1.5 Respiratory-correlated (4D) CT . . . . . . . . . . . . . . . . . . . 16 1.6 4D imaging on linac CBCT systems . . . . . . . . . . . . . . . . . 23 1.6.1 Potential applications . . . . . . . . . . . . . . . . . . . . . 25 1.7 Thesis overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2 4D cone-beam CT scan method . . . . . . . . . . . . . . . . . . 29 2.1 The Varian CBCT system . . . . . . . . . . . . . . . . . . . . . . 30 2.2 The Varian RPM system . . . . . . . . . . . . . . . . . . . . . . . 34 2.3 Slow gantry rotation . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.4 Scan procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.4.1 iX units . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.4.2 TrueBeam units . . . . . . . . . . . . . . . . . . . . . . . . 42 iv 2.5 Estimation of imaging dose . . . . . . . . . . . . . . . . . . . . . . 43 3 Image reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.1 Projection image data . . . . . . . . . . . . . . . . . . . . . . . . 47 3.2 Intensity normalization . . . . . . . . . . . . . . . . . . . . . . . . 49 3.3 Filtered backprojection . . . . . . . . . . . . . . . . . . . . . . . . 52 3.4 Hounsfield unit calibration . . . . . . . . . . . . . . . . . . . . . . 54 3.5 Summary: 3D image reconstruction . . . . . . . . . . . . . . . . . 57 3.6 4D image reconstruction . . . . . . . . . . . . . . . . . . . . . . . 58 3.7 Potential improvements . . . . . . . . . . . . . . . . . . . . . . . . 59 4 Scans and results . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.1 3D scans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.2 4D scans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5 Trajectory measurement . . . . . . . . . . . . . . . . . . . . . . . 77 5.1 Measurement algorithms . . . . . . . . . . . . . . . . . . . . . . . 78 5.2 Results on phantom 4D CBCT images . . . . . . . . . . . . . . . 83 5.3 Results on patient 4D CT images . . . . . . . . . . . . . . . . . . 88 6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.1 Issues for clinical implementation . . . . . . . . . . . . . . . . . . 93 6.2 Potential improvements and future work . . . . . . . . . . . . . . 95 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 A Procedure instructions . . . . . . . . . . . . . . . . . . . . . . . . 106 A.1 Air norm and Hounsfield unit calibrations . . . . . . . . . . . . . 107 A.2 4D CBCT scan of a moving phantom on an iX . . . . . . . . . . . 108 A.3 4D CBCT scan of a moving phantom on a TrueBeam . . . . . . . 110 A.4 Deformable image registration and trajectory measurement . . . . 111 B Code overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 B.1 MATLAB code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 B.2 ITK code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 B.3 HND to HNC converter . . . . . . . . . . . . . . . . . . . . . . . 114 v B.4 Beam XML files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 vi List of Tables Table 2.1 Standard CBCT scan modes . . . . . . . . . . . . . . . . . . . 35 Table 3.1 Calibration CT number values . . . . . . . . . . . . . . . . . . 55 Table 4.1 Example 3D image reconstructions . . . . . . . . . . . . . . . . 62 Table 4.2 Example 4D scans . . . . . . . . . . . . . . . . . . . . . . . . . 70 Table 5.1 Trajectory measurements on patient 4D CTs . . . . . . . . . . 90 vii List of Figures Figure 1.1 The waveguide and head of a Varian Clinac linear accelerator 3 Figure 1.2 An example TCP curve . . . . . . . . . . . . . . . . . . . . . 4 Figure 1.3 An example NTCP curve . . . . . . . . . . . . . . . . . . . . . 5 Figure 1.4 A dose-volume histogram example . . . . . . . . . . . . . . . . 8 Figure 1.5 A lung treatment plan example . . . . . . . . . . . . . . . . . 9 Figure 1.6 Fan-beam and cone-beam geometries . . . . . . . . . . . . . . 12 Figure 1.7 A Varian linear accelerator unit with on-board kV imager . . 15 Figure 1.8 Sample RPM data with phase binning . . . . . . . . . . . . . 19 Figure 1.9 A 4D CT image example . . . . . . . . . . . . . . . . . . . . . 20 Figure 1.10 Reduction in PTV size using 4D information . . . . . . . . . . 21 Figure 1.11 Planning methods using 4D CT information . . . . . . . . . . 22 Figure 2.1 Bowtie filter geometry . . . . . . . . . . . . . . . . . . . . . . 32 Figure 2.2 Full-fan and half-fan fields of view . . . . . . . . . . . . . . . . 33 Figure 2.3 Angular spacing between phase bins . . . . . . . . . . . . . . 38 Figure 2.4 Effect of angular spacing on image quality . . . . . . . . . . . 39 Figure 2.5 Longitudinal dose profile . . . . . . . . . . . . . . . . . . . . . 45 Figure 3.1 Half-fan detector expansion . . . . . . . . . . . . . . . . . . . 48 Figure 3.2 Detector rebinning . . . . . . . . . . . . . . . . . . . . . . . . 49 Figure 3.3 Air norm data . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Figure 3.4 CT norm chamber and sensor response . . . . . . . . . . . . . 51 Figure 3.5 Hounsfield unit calibration image . . . . . . . . . . . . . . . . 56 Figure 4.1 3D iX half-fan image . . . . . . . . . . . . . . . . . . . . . . . 63 Figure 4.2 3D iX full-fan image . . . . . . . . . . . . . . . . . . . . . . . 64 Figure 4.3 3D TrueBeam image . . . . . . . . . . . . . . . . . . . . . . . 65 Figure 4.4 Measured CT number values . . . . . . . . . . . . . . . . . . . 67 viii Figure 4.5 Motion platform setup . . . . . . . . . . . . . . . . . . . . . . 69 Figure 4.6 Low-pass filtering in a 4D image . . . . . . . . . . . . . . . . . 71 Figure 4.7 Axial slice in a 4D image . . . . . . . . . . . . . . . . . . . . . 73 Figure 4.8 Coronal slice in a 4D image . . . . . . . . . . . . . . . . . . . 74 Figure 4.9 4D scan images, sensitometry inserts . . . . . . . . . . . . . . 75 Figure 4.10 4D scan images, line pairs . . . . . . . . . . . . . . . . . . . . 76 Figure 5.1 Registering two phase images . . . . . . . . . . . . . . . . . . 81 Figure 5.2 Trajectory measurements, scan D . . . . . . . . . . . . . . . . 84 Figure 5.3 Mapped contour points, scan D . . . . . . . . . . . . . . . . . 85 Figure 5.4 Trajectory measurements on two patients . . . . . . . . . . . . 89 Figure 5.5 Contour point mapping in patient 4D CT . . . . . . . . . . . 91 ix Acknowledgements Many people have helped me along the way to this thesis and I am pleased to express my appreciation here. The first is undoubtedly my supervisor Alanah Bergman, who has always provided encouragement, guidance and good advice throughout my time here at BCCA, and especially on this thesis project. Next, I received invaluable assistance from all four physics assistants at BCCA Vancou- ver: Gina Badragan, Ron Horwood, Vince LaPointe and Vince Strgar. Between them they taught me how to operate the units, and were always there to help when the unexpected happened. Among the physicists, Kurt Luchka helped me set up a dummy patient in the treatment planning system, and gave me a very useful program (CTQA) for viewing CT images. Richard Lee helped me with the RPM system and in obtaining 4D CT images. Carrie-Lynne Swift helped me with investigating custom CBCT modes on the iX and with various ARIA issues that came up. Cheryl Duzenli helped to formulate this project in the first place and provided additional guidance along the way. At Varian Medical Systems, Peter Munro and Thanos Etmektzoglou helpfully answered my questions about the OBI system and the TrueBeam Developer mode. Thanks also to Alex MacKay at UBC, who told me all about the Medical Physics program in the first place. To my office-mates Cindy Tam and Nick Chng, who made sharing a very small space more than tolerable. And to the rest of Medical Physics department at BCCA Vancouver, who made it a very pleasant place to study and work during my stay there. I am grateful to have received funding from BC Cancer Agency for the dura- tion of my M.Sc. program. My final thanks, as always, go to my parents, whose love and support are so important to me. x Chapter 1 Introduction The topic of this thesis is a specific imaging technique for use in radiation therapy for cancer treatment. Its full name is respiratory-correlated cone-beam computed tomography, but fortunately there is a shorter name (4D cone-beam CT), which will be explained in the course of this chapter. It is a computed tomography technique: X-ray images of a patient are used to reconstruct a three-dimensional image of the patient’s anatomy. The term “cone-beam” refers to the type of X-ray system used: in this case the imaging system is mounted on the radia- tion therapy unit, so images can be taken during a radiation treatment session. The term “respiratory correlation” refers to imaging the motion due to the pa- tient’s breathing. Respiratory-correlated imaging on cone-beam CT systems is a relatively new combination, and this thesis describes work investigating how to implement it at the BC Cancer Agency Vancouver Cancer Center. This chapter presents an introduction and some relevant background. In the field of medical physics, two of the primary applications are radiation therapy and medical imaging. Radiation therapy is an important tool in com- bating cancer, with about half of all cancer patients receiving radiation therapy during their course of treatment [1]. Its purpose is to kill malignant cells by applying ionizing radiation, which damages cell DNA. The most common type of radiation therapy is external beam therapy, in which the radiation enters the patient’s body as a beam from an external source1. Beams of photons, electrons or positive ions may be used. For most patients, in 1In contrast to brachytherapy, in which a radioactive source is placed inside or adjacent to the volume being treated. 1 order to reach the tumor the beam must also pass through some amount of healthy normal tissue. Since the ionizing radiation will damage normal cells, it is essential to shape and aim the beam to minimize the volume of healthy tissue receiving radiation, while still hitting the targeted tumor. As technology has developed over the last century, the types of machines used to produce radiation therapy beams have changed. Electron linear accelerators (linacs) were first used in the 1950’s [2] and are now the most common type of treatment machine. An electron linac can produce either an electron beam or, using a dedicated target in the electron beam path, an X-ray beam. The majority of external beam treatments use X-ray beams, with energies typically in the range of 4 to 18 MV2. Figure 1.1 shows the waveguide and head of a commercial medical linac. These parts are mounted on a rotating gantry, which rotates about a point known as the isocenter. The movable gantry, combined with a movable couch on which the patient lies, allows beams to be precisely aimed at the target volume, and to enter the patient at a wide variety of angles. A treatment plan which specifies beam shapes, angles and energy must be designed for each patient. The following sections give an overview of how external beam treatments are planned, how imaging can be used to improve how they are delivered, and how the complicating issue of the patient’s breathing motion can be addressed. 1.1 Absorbed dose A high-energy charged particle deposits energy in matter by interacting with nearby atoms, exciting or ionizing them in large numbers (many thousands per cm travelled) and losing energy until it comes to rest. The situation is differ- ent for a high-energy photon, which interacts with atoms relatively infrequently. There are three photon interactions that lead to energy deposition. In a pho- toelectric interaction, the photon is “absorbed” by an atomic electron, which is ejected from the atom and inherits the photon’s energy (minus the binding en- ergy). In Compton scattering, the photon scatters off an atomic electron, which is ejected and receives part of the photon’s initial energy. In pair production, 2The notation kV or MV, as opposed to keV or MeV, indicates an X-ray beam. The X- ray beam spectrum is polychromatic, and the value quoted for an X-ray beam energy is its maximum energy. 2 Figure 1.1: The waveguide and head of a Varian Clinac linear accelerator. Elec- trons accelerate through the waveguide and pass through a 270◦ bend magnet. In X-ray mode, they then hit a target, producing a diverging beam of photons, illustrated here in orange. The final set of collimators is called a multileaf colli- mator and allows the beam to be given a wide variety of shapes. (Image courtesy of Varian Medical Systems, Inc. All rights reserved.) the photon interacts with either an atomic nucleus or electron and is converted into an electron-positron pair3. Pair production only occurs for photon energies above 2me = 1.02 MeV. In all three cases it is the resulting high-energy electron (and/or positron) that deposits energy4. Since the charged particle has a finite range, energy may be deposited some distance away from the photon interaction: up to several cm, depending on the photon energy. The quantity used to measure energy deposited in matter by ionizing radiation is called absorbed dose (usually abbreviated to dose). It is the amount of energy 3If the interaction is with an electron, the recoiling electron is ejected from the atom, re- sulting in a total of three charged tracks, so this case is often called triplet production. 4In Compton scattering, the scattered photon may subsequently interact again at another location. 3 Figure 1.2: An example tumor control probability (TCP) curve, for pulmonary tumors, from a clinical study [4]. BED stands for biological equivalent dose. Each data point is labeled with the fraction of tumors that were locally controlled with that BED. The curve is a fit to the points. deposited per unit mass; its SI unit is the Gray (Gy), where 1 Gy = 1 J/kg. As mentioned above, the energy goes into excitation and ionization of atoms, and it is the excitation and ionization that lead to biological effects. In radiation therapy, dose is the physical quantity referenced when prescrib- ing treatments, evaluating treatment plans, and comparing outcomes. (Another commonly used quantity is biological effective dose or BED. BED is based on dose, but also accounts for the dependence of biological effects on how fast the dose is delivered; i.e. how many treatment sessions there are.) In general, the probability of controlling a tumor increases with the dose delivered to it, although the actual probability values also depend on other factors such as tumor type. Similarly, lower doses to healthy (normal) tissue generally reduce the risk and severity of complications; again, specific probability values and possible kinds of complications vary depending on tissue type [3]. These two probabilities are called TCP (tumor control probability) and NTCP (normal tissue complication probability) respectively. Figures 1.2 and 1.3 show examples of TCP and NTCP curves, which are derived from clinical data. 4 Figure 1.3: An example normal tissue complication probability (NTCP) curve, for myelopathy of the cervical spinal cord, from an article [5] which compiles data from several published reports. The quantity of equivalent dose used in this plot is related to BED, and serves the same purpose: comparing treatments with different fractionation schedules. The curve is a fit to the points. 1.2 External beam treatment planning When designing a treatment plan, the goal is to apply a prescribed dose to a target (i.e. a tumor), while minimizing the dose received by surrounding healthy tissue. Designing a plan requires accurate anatomical information about the patient, therefore a standard step in planning is to acquire a 3D X-ray computed tomography (CT) scan of relevant parts of the patient’s body. This image is called the planning CT. For some types of tumors, complementary information from other imaging modalities such as MRI (magnetic resonance imaging) or PET (positron emission tomography) may be combined with the planning CT in order to improve the visibility of the tumor. The next steps in a standard planning process are done with a specialized software suite known as a treatment planning system (TPS). On the planning CT, the tumor and nearby radiosensitive organs are contoured: this defines the boundaries of each region, so that the TPS can recognize which voxels in the image are inside the tumor or relevant organs. Radiosensitive organs which may exhibit side effects after receiving dose from radiotherapy are called organs at risk (OAR). Based on several factors, a radiation oncologist will choose the prescription 5 dose and fractionation schedule. In most treatments the dose is delivered in multiple fractions spread over several days or weeks. For example, in a lung treatment a conventional schedule might deliver 60 Gy in 30 fractions over 6 weeks. A hypofractionated schedule might deliver 48 Gy in 4 fractions over 2 weeks. The International Commission on Radiation Units and Measurements (ICRU) has published a system of dose prescription [6, 7] which defines several volumes widely used in planning [8]. The volumes that will be referenced in this chapter are summarized here. The passages in quotes are taken from ICRU Report 62 [7]: • The gross tumor volume (GTV) is “the gross demonstrable extent and location of the malignant growth”. • The clinical target volume (CTV) is “a tissue volume that contains a demon- strable GTV and/or subclinical malignant disease that must be eliminated.” In curative therapy, the goal is to deliver therapeutic dose to the whole CTV. • The internal target volume (ITV) consists of the CTV plus a margin called the internal margin (IM). The IM compensates for “expected physiologic movements and variations in size, shape and position of the CTV dur- ing therapy”. Some examples of these physiological effects are respiration, bladder and bowel filling, and heart beat. • The planning target volume (PTV) is “a geometrical concept used for treat- ment planning, and it is defined to select appropriate beam sizes and beam arrangements, to ensure that the prescribed dose is actually delivered to the CTV.” The PTV consists of the CTV plus a combination of internal and setup margins. The setup margin accounts for uncertainties in aligning the patient to the beams before each fraction. The formula for adding internal and setup margins to the CTV to define the PTV will vary based on tumor type and location, and how accurate the clinic’s procedures are for setting up patients. Since it is only the CTV which must receive dose for therapeutic effectiveness, it is desirable to use precise treatment delivery techniques which ensure the CTV remains within the PTV, with only 6 small margins. In general, the more accurately the tumor can be localized and aligned to the beam, the smaller the setup margin can be. Not only will a smaller margin reduce dose to the normal issue immediately around the tumor, it will in general result in narrower beams which reduce dose to all tissue near the beam paths. Thus a smaller setup margin will allow a combination of higher dose to the CTV, which improves the probability of controlling the tumor, and lower dose to normal tissue, which reduces the risk of complications. There are a variety of methods for arranging the beams, and the choice of which to use depends on the tumor site and on what procedures the clinic has commissioned. It is beyond the scope of this work to describe them all in detail, so here are some general comparisons between methods: • Fixed field vs. arc: In a fixed field approach, a small number (typically less than 10) of beams are delivered sequentially. Between each one, the gantry, couch, or both are moved so each field enters the patient at a differ- ent angle. In arc therapy, the gantry rotates continuously while the beam is on, effectively delivering fields at many angles. • Conformal vs. IMRT: In 3D conformal therapy, a multileaf collimator (MLC) mounted on the linac is used to shape the beam’s cross-section to match the PTV shape, at each gantry angle. This minimizes the cross- sectional area of each beam and hence the dose adjacent to its path, while still fully “illuminating” the PTV at all times. In intensity-modulated radi- ation therapy (IMRT), the MLC leaves move continuously while the beam is on, allowing a more complex dose distribution to be delivered. IMRT planning is more complex than conformal planning and the process of op- timizing the leaf movements is automated within the TPS. Once the PTV and organs at risk have been contoured, and the general treat- ment type chosen (e.g. fixed field vs. arc, conformal vs. IMRT), the details of the plan are optimized5. To evaluate a particular beam arrangement, the TPS is used to calculate the dose distribution in the patient, using the planning CT. For the PTV and each organ at risk, a dose-volume histogram (DVH) can be constructed, which enumerates dose to each voxel within the contoured volume. 5How this is done depends on the type of treatment; a full description is beyond the scope of this introduction. 7 Figure 1.4: Example of a dose-volume histogram (DVH), from a lung cancer treatment plan, showing the PTV and three OARs (both lungs and trachea). The histograms are cumulative; for example about 80% of the PTV is receiving 93% or more of the prescribed dose of 5780 cGy. As desired, most of the PTV is receiving a high dose and most of the OARs’ volumes are receiving low doses. In this case, the right lung is receiving significantly higher dose than the left lung because the tumor is on the right. Figure 1.4 shows an example of a DVH. Ideally, the DVHs will show that most voxels in the PTV are receiving close to the prescribed dose, while most voxels in the OARs are receiving low doses. Accumulated clinical experience is used to determine whether a given DVH has an acceptable probability of controlling the tumor (if the DVH is for the PTV), or causing complications (if it is for an OAR). If a beam arrangement produces unacceptable dose-volume histograms, it is rejected, and then the planner modifies the beam arrangement and repeats the evaluation. Figure 1.5 shows a simplified view of an example treatment plan, including some of the beam angles and contoured OARs. Several other aspects of the plan are not shown, such as the MLC positions (which are set to conform the beam to the shape of the PTV), the amount of radiation delivered by each beam, and the resulting dose distribution. Figure 1.5 also illustrates the important issue of aligning the patient with the linac system for treatment. The basic approach for aligning the patient uses ink marks on the patient’s skin. These marks are applied on the day of the planning 8 Figure 1.5: Example of a lung cancer treatment plan, as viewed in a TPS. This shows one axial slice of the planning CT, with structures and beam paths super- imposed — for clarity only 3 of 8 beams, and not all OARs, are shown. Contoured structures shown are: ITV (blue), PTV (red), right and left lungs, some of the ribs (green), spinal cord (cyan), esophagus (purple) and aorta (green). The align- ment BBs are not in this slice. The green cross indicates the origin of the image’s coordinate system, and the intersection of the dotted lines indicates the isocenter (actually, the cross and lines show the projection of these two points onto this slice). The tumor is visible within the ITV. Note that this view is from the infe- rior end, so the patient’s right side is at the left of the image; this is a standard convention. (The tumor is in the left lung.) CT scan, and remain throughout the course of treatment. Immediately before the CT scan, several BBs are placed on the patient’s skin. After the scan, the ink marks are applied on the patient’s skin at the BB locations. The BBs will show up clearly in the CT image, so their locations with respect to the CT image’s coordinate system origin are known. At each treatment, when the patient is set up on the treatment couch, the ink marks are used to align the patient relative to the linac isocenter. The plan specifies the displacement between the image origin and the isocenter (see Figure 1.5), so the couch can then be moved by this displacement to put the patient at the correct position with respect to the linac. 9 1.3 CT imaging CT imaging is used both at the planning stage and, as discussed in the next section, at treatment time. This section summarizes some of the main properties of X-ray computed tomography — for a full introduction, see Chapter 6 of Ref. [9]. This imaging technique produces a set of two-dimensional slice images of an object, which together constitute a three-dimensional image. Physically, what CT measures is the attenuation of X-rays passing through the object. Most CT is done using conventional X-ray tubes, with peak photon energies in the range of about 40-140 keV. At these energies the relevant photon interactions are Compton scattering and the photoelectric effect. A beam of photons passing through an object loses photons to these interactions. In the case of a monochromatic beam passing through uniform material of thickness x, its intensity is reduced by a factor of e−µx, where µ is called the linear attenuation coefficient. This coefficient depends in a nontrivial way on the type of material and the energy of the photons, but it has two general characteristics to keep in mind: • µ tends to increases with material density, since it is proportional to the number density of scattering centers (nuclei for photoelectric effect, elec- trons for Compton scattering). • At keV imaging energies, µ increases with atomic number Z, since the photoelectric cross-section increases strongly with atomic number. X-ray CT produces an image that is a map of µ. It can be thought of as mapping a combination of density and average atomic number. For example, bones appear relatively bright in CT due to their high density and calcium (high-Z) content, while lungs appear relatively dark due to their low density. Note that in practice the beam is polychromatic, so the measured value of µ is actually an average over energies. Also, since µ varies with energy, a quantity called CT number is used instead when the image is displayed. This is designed to reduce the dependence of image values on beam energy, making image interpretation simpler. The CT number H is derived from µ by normalizing to the µ value of water; it 10 is dimensionless but is quoted in Hounsfield units (HU): H = 1000× µ− µwater µwater (1.1) CT measures attenuation by sending photons from a source (e.g. an X-ray tube) through the object to a detector (e.g. a scintillator array). To acquire sufficient information to reconstruct an image, the attenuation must be measured along rays spanning all angles around an object. In most CT systems, the source and detector revolve around the patient in the transverse plane. In effect, a series of projection images are taken, each one from a different angle. This gives a cylindrical field of view (FOV) whose axis is in the patient’s superior-inferior direction6. The size of the FOV depends on the source and detector positions and detector size7. There are two common geometries for CT scans that are relevant to this thesis. Conventional CT scanners use fan-beam geometry, named for the beam shape: it diverges from the source, and is quite thin in the superior-inferior direction compared to the transverse direction. In cone-beam geometry, the beam has similar widths in both directions. With fan-beam geometry, only a thin transverse slice is imaged at one time, and the patient is typically moved longitudinally through the scanner to cover all the anatomy that needs to be imaged. Figure 1.6 illustrates some typical sizes and shapes for each geometry. 1.4 Image-guided radiation therapy and cone-beam CT A key goal in modern radiation therapy is to reduce the positioning uncertainty between the beams and the tumor being treated: as mentioned above, smaller uncertainty allows beams to conform more tightly to the tumor, reducing dose to normal tissue. Image-guided radiation therapy (IGRT) is a general term referring to the use of imaging technology to optimize the accurate delivery of dose. Ref. [10] reviews IGRT and divides IGRT development into four categories: 6Actually, the field of view also includes a cone at each end of the cylinder, but this part of the FOV is not always used. 7If the X-ray beam is collimated such that it does not illuminate the entire detector, the FOV will be reduced accordingly. 11 Fan−beam Cone−beam Transverse Side view Transverse Side view Approximate detector dimensions 100 cm 2 cm 40 cm 30 cm Figure 1.6: Comparison of fan-beam and cone-beam geometries, representing a conventional multislice CT scanner, and the cone-beam CT system used in this thesis. The two are approximately to scale. Two views of each are shown: the transverse view (i.e. view along the longitudinal axis) and the side view. Detectors are in green, fields of view are in blue. The pairs of black lines represent the rays at the edge of the FOV. The black dot represents the isocenter, about which the source and detector revolve. The fundamental difference is the beam width in the longitudinal direction. A less important difference is that the conventional CT detector is curved while the cone-beam system’s is flat. 1. Improving the definition of the tumor volume using alternative imaging techniques such as MRI and PET. 2. Time-resolved imaging techniques to measure intra-fraction organ motion. 3. The use of imaging devices in the treatment room to improve the alignment of the patient to the linac before each treatment. 4. More advanced treatment planning and delivery techniques which make use of advances in the previous three areas. 12 The work presented in this thesis falls within the second and third areas in this list. (Other broader definitions of IGRT include detection of disease, design of dose distribution based on biological factors, and evaluation of response to treatment [11].) When setting up a patient for treatment, the skin-mark process described in the previous section can achieve only limited accuracy. The skin itself can move significantly relative to the underlying tissue and bony anatomy. Also, the patient may undergo physical changes over the course of treatment, for example gaining or losing weight, or the tumor itself may change size or move relative to the surrounding anatomy. When using modern therapy techniques such as IMRT that can produce steep dose gradients, proper alignment down to the level of millimeters is important. In addition, proper patient alignment is crucial in hypofractionated techniques such as SBRT (stereotactic body RT) [12] and SRS (stereotactic radiosurgery), where the treatment is delivered in a small number of high-dose fractions, and misalignment for even one fraction is detrimental. A variety of in-room imaging technologies are currently in widespread use. The majority of these use X-rays, either at kV energies (produced by a con- ventional X-ray tube), or at MV energies (several MV, produced by the linac). In-room X-ray imaging techniques include: • MV projections: Many linac units have an electronic portal imaging device (EPID), which is a flat-panel detector mounted opposite the linac head. In addition to being used in quality assurance procedures, this can be used to take projection images of the patient. • kV projections: Many units also have a kV X-ray tube and matching flat-panel imager, mounted on the gantry at 90◦ relative to the MV beam. In other systems, pairs of tubes and imagers are mounted in the floor and ceiling. • kV CBCT: On units with gantry-mounted kV imaging, a cone-beam com- puted tomography (CBCT) scan can be performed by rotating the gantry around the patient while taking a series of projection images. • TomoTherapy MV CT: One commercial radiotherapy system, Tomo- Therapy [13], uses a narrowly collimated MV beam and moving couch. It 13 can produce MV CT images in a manner analogous to conventional CT scanners. • MV CBCT: Analogous to kV CBCT, this is done using the MV beam and EPID. • CT on rails: In this system a conventional CT scanner is added to the treatment room, with a couch capable of moving the patient precisely and smoothly between the CT and linac, preserving the patient’s position. This should generally provide the best image quality, but has the added cost of a full CT scanner and may require a larger treatment room. kV and MV linac-mounted imaging systems using amorphous-silicon flat- panel detectors have become common over the last decade. All three major linac manufacturers offer EPIDs. Varian Medical Systems and Elekta also offer kV imaging systems (called OBI and XVI respectively) with CBCT capability. Siemens also offers MV CBCT. Figure 1.7 shows a linac unit with a kV imaging system. In general, CBCT does not provide quite as high quality images as con- ventional fan-beam CT, largely because the wider beam results in more scatter reaching the detector. However, the image quality is certainly good enough for (mostly kV) CBCT to have found widespread use. The drawbacks of MV CBCT are generally higher imaging dose than kV CBCT [14], and reduced contrast of objects with high atomic number such as bone8 , although one advantage is that it avoids streaking artifacts in patients with metal prostheses. The details of how each type of imaging technique vary depending on tumor site, and may also vary from one clinic to another, depending on available equip- ment and previous experience. A few general comments can be made. First, if a tumor can be relied upon to remain stationary over treatment with respect to nearby rigid bone, then imaging the bone should be sufficient to establish the tumor position (e.g. a brain tumor, referenced to the skull). This can usually be done adequately with an orthogonal pair of projection images, with kV providing the best bone visibility. Second, if metal fiducial markers are implanted within 8At kV energies, both photoelectric and Compton effects contribute significantly to X-ray attenuation, and the photoelectric effect has a strong Z dependence. At MV energies, the photoelectric cross-section is relatively smaller. 14 Figure 1.7: A Varian linear accelerator unit with on-board kV imager. The kV source (X-ray tube) is on the left, the kV flat-panel detector is on the right. Both are mounted on retractable arms. The EPID is visible at the bottom and is retracted. The couch is in the foreground. (Image courtesy of Varian Medical Systems, Inc. All rights reserved.) the tumor, and can be relied upon to remain stationary in the tumor, then the fiducials can be imaged using orthogonal projections in order to establish position. If the above conditions do not hold, then CBCT may be useful, since it pro- vides clearer images with better soft-tissue contrast than projection images. A projection image is effectively a superimposed set of shadows of all the material that the beam has passed through, while a CT image is a spatially accurate 3D representation of an object. The treatments for which CBCT is used may vary from clinic to clinic. At the BCCA Vancouver Cancer Center (VCC) for exam- ple, CBCT is currently used for patient alignment in lung SBRT, liver SBRT and gyne IMRT treatments. In these sites the relevant anatomy is not fixed with re- spect to nearby bones, and can move substantially from one fraction to the next. The CBCT image provides much better visibility of soft tissues and boundaries between organs than projections would. The CBCT image is compared to the planning CT, and if misalignment is found, the couch can be moved to correct 15 it. In the case of lung tumors, which are generally denser than the surrounding normal lung tissue, the tumor is clearly visible on the CBCT, and its position can be directly compared to the planning CT. Clinical studies of lung SBRT patients imaged before each treatment have found significant variations in the relative position of the GTV and bony anatomy [15, 16], indicating that tumor imaging is more accurate than bone imaging for setup. 1.5 Respiratory-correlated (4D) CT The lungs, liver, and other organs in the thorax and abdomen undergo respiratory motion, which is a significant issue in radiation therapy as it complicates the pro- cedure of targeting the tumor. Ref. [17] reviews the management of respiratory motion and includes compiled data on the magnitude of respiratory motion for lung tumors, liver, pancreas, kidney and diaphragm. Peak to peak distances vary between patients, and ranges vary between studies, but in general at least several mm can be expected, and several cm are possible. Abdominal compression — the use of a fixed plate pressing against the patient’s abdomen — is commonly used to reduce respiratory motion, but tumor motions of several mm can still occur [18]. Breath-holding is an option but many patients cannot tolerate it well, and the depth of each breath hold may not be reproducible. Of the organs affected by respiratory motion, the lungs have received the most research on motion management. The reasons for this include the relatively good visibility of lung tumors in CT and the prevalence of lung cancer, which is the leading cause of cancer death in both Canada [19] and the USA [20]. Lung tumor motion tends to be largest in the superior-inferior direction, but the trajectory can depend on position within the lung and display hysteresis (i.e. following different paths during inspiration and expiration) [21]. Given the large variation in respiratory motion between individuals and tu- mor sites, it is preferable to obtain motion information for each patient during treatment planning. Respiratory-correlated CT is a technique that has become widely used in recent years. It produces a time series of 3D CT images, with each one corresponding to a part of the patient’s breathing cycle [22, 23]. Because of this added time dimension, respiratory-correlated CT is also known as 4D CT. 4D CT makes use of the quasi-periodic nature of respiratory motion: while 16 each breath may differ in duration and amplitude, there is a repeated pattern of inspiration and expiration, with the anatomy moving in a similar way each cycle. During a CT scan, the scanner gantry (with X-ray tube and detector mounted) rotates rapidly around the patient taking projection images. These are used to reconstruct a 2D axial slice image, and the process is repeated as the couch moves the patient in the superior-inferior (SI) direction9. 4D scans involve dividing the respiratory cycle into segments, assigning either each projection image or each slice image to a segment, and reconstructing a 3D image for each segment. On a conventional scanner, the gantry rotates fast enough (acquiring a full 2D slice in less than one second) compared to the breathing period (several seconds) that sorting can be done at the level of the slice images. To assign slice images to breathing segments requires a continuous measure- ment of breathing motion during the scan. Various techniques are in use: • The Varian Real-time Position Management (RPM) system [24] measures the patient’s abdominal motion using an infrared camera system, which tracks a reflective marker block placed on the abdomen or chest. This is the system used in this thesis and so it is discussed in more detail below. • The Anzai Medical Co. AZ-733V [25] consists of a pressure sensor mounted on a flexible belt which is strapped around the patient’s abdomen. • In cone-beam CT, if every projection image has a large enough field of view in the SI direction to cover the diaphragm, then the position of the diaphragm can be analyzed to assign that projection to a breathing segment [26, 27]. This only applies to cone-beam CT scans, since most multislice CT scanners only cover a couple of cm longitudinally at a time. It has the advantage of not requiring any additional hardware, but requires the FOV to cover the diaphgram, and can only be used retrospectively. 4D scans can be categorized into prospective and retrospective acquisition. In prospective acquisition, the motion measurement system (e.g. the RPM) is used to provide a real-time trigger signal to the CT scanner, so that it only ac- quires images at certain points of the breathing cycle. For example, images could 9Helical scans are slightly more complex than this, as are multislice acquisitions, but as far as the 4D aspect is concerned the differences are not major. 17 be acquired only during the end-inspiration and end-expiration time segments, resulting in two 3D images representing the two extremes of respiratory motion. In retrospective acquisition, the scanner acquires images continuously, while the motion measurement system is recording. The scan duration must be ex- tended so that all parts of the breathing cycle are captured: the scanner stays at each couch position, acquiring images, for a full breathing period instead of just one gantry rotation. This increases the scan duration (and dose) several-fold (roughly the ratio of the breathing period to gantry rotation period). After the scan is finished, each 2D slice image is assigned to one of the breathing segments based on the motion measurement at the time it was taken. This gives a full 3D image for each breathing segment. If information is only needed on selected parts of the breathing cycle, the prospective acquisition has the advantage of lower scan dose and smaller datasets. However, it carries additional hardware requirements: the motion measurement must be output in real-time, and the CT image acquisition must be triggered. This thesis focuses on retrospective acquisition. There are two common methods for using motion information to sort slice images: phase binning and amplitude binning. In phase binning, each cycle is divided into an equal number of phase bins, using an algorithm along these lines: • Each inspiration peak in the motion signal is identified. This defines each breathing cycle as being between one peak and the next. • In each breathing cycle, a phase is assigned to each time point, increasing linearly with time from 0◦ at the inspiration peak at the start, to 360◦ at the inspiration peak at the end. • Each time point during the scan now has an associated phase value. Each slice image was taken at a known time, therefore each slice image also has a known phase value. A number of phase bins are defined, typically around ten, to cover the full cycle, and the images are sorted into those bins. For example, with ten bins the end-inspiration bin would cover 342-18◦, the next bin would cover 18-54◦, etc. The advantage of phase binning is its simplicity; the RPM system automatically performs the first two steps, recording phase values as well as the motion signal. 18 40 42 44 46 48 50 7.8 8 8.2 8.4 8.6 8.8 9 Time (s) M ar ke r s ig na l (c m) Figure 1.8: A ten-second segment of RPM data (blue) from a lung patient’s 4D CT scan. The breathing period is about 3 seconds, but varies slightly. The second inspiration peak is also noticeably higher than the others. Phase binning has been applied; dashed lines show the bin boundaries. The black dots on the time axis are not actual data, but represent that each 2D slice image is taken at a known time and so can be assigned to one of the bins. For clarity only 4 bins per cycle are illustrated in this figure (observe the peaks occur every 4 bins). In practice, such a small number of bins would lead to large residual motion in each bin and therefore some blurring in each phase image. However, if the breathing is significantly irregular — for example if the amplitude varies from one cycle to the next, or the shape of the motion differs — patient positions may get mismatched between cycles. In this case amplitude binning may produce more accurate images [28]. Binning by motion signal amplitude requires more care when choosing bin boundaries, since some amplitude values may only appear in a few cycles. Figure 1.8 shows an example of RPM data, with phase binning applied. Note that the RPM system tracks the marker block motion in two dimensions (or three, in some versions), but processes this information to output a one-dimensional marker motion signal. 19 Figure 1.9: Example of a coronal slice image from a 4D CT scan of a lung cancer patient. The scan contains 10 phases but this image shows just two, superim- posed: the 0◦ bin (end-inspiration) in green and the 180◦ bin (halfway between inspiration peaks, i.e. roughly end-expiration) in purple. “Grayer” structures are present in both phases, while strongly colored structures are present in only one. The tumor is clearly visible with green and purple bands indicating SI motion. Measurements (see Chaper 5 for details) show this tumor is moving primarily SI with peak to peak amplitude about 4 mm; note this is with abdominal compres- sion. Display window width 1000, level 0. Figure 1.9 shows an example of a 4D CT image, from a scan of a patient at the BCCA Vancouver clinic. At this clinic, lung SBRT patients receive a 4D CT scan as a standard part of the treatment planning process: it is used to establish the ITV. In addition to minimizing motion artifacts in the image10, 4D CT allows the tumor trajectory to be estimated and incorporated into planning and treatment. Several methods exist for doing this, varying in complexity: • The set of images can be used to establish the ITV directly. This eliminates the uncertainty of adding a generic internal margin: the margin is now patient-specific and hence more accurate. This can also result in a smaller PTV and less normal tissue being irradiated [29]. Figure 1.10 illustrates this 10Conventional CT scans of moving anatomy show artifacts due to adjacent axial slices being imaged at different times, as the couch moves. The artifacts appear as either blurring or groups of parallel lines. 20 CTV CTVI CTVE PTV ITV Figure 1.10: ITV measurement using 4D CT. The left side represents the case without 4D information: the CTV must be expanded to an ITV using generic margins since the tumor motion is not known. The right side represents the delineation of the ITV using a 4D image set covering all breathing phases. The extremes of motion are denoted end-inspiration (CTVI) and end-expiration (CTVE). This results in a smaller PTV. idea. A fast method for measuring the ITV is to use the maximum-intensity projection (MIP) image, in which each voxel’s CT number is the maximum over all phases [30]. For lung tumors, which have CT numbers higher than the surrounding lung tissue, the MIP image shows the full excursion of the tumor’s movement. Other methods for measuring the ITV using individual phase images have also been reported [25, 31]. • The set of images can be used to calculate a “time-averaged” mean tumor position, which will be located somewhere between the extremes of end- inspiration and end-expiration. The mean position is then used for planning [32, 33]. • In respiratory-gated delivery, the beam is only turned on during part of the respiratory cycle. Unlike the previous two methods, this requires motion measurement hardware in the linac room, which measures the breathing phase (or amplitude) in real-time and triggers the beam on and off. Since the tumor is localized to just one part of its motion, this results in a smaller 21 Figure 1.11: Comparison of different planning methods using 4D CT infor- mation, from Ref. [32]. Note the variation in PTV sizes (in this illustration the conventional method’s PTV size is comparable to the ITV measurement method’s because small generic margins have been used — as a result the beam misses the tumor around maximum exhale. For 4D delivery (not shown), the PTV would resemble the gated PTV, but would move with the tumor. PTV [34]. A common choice of gating window is around end-expiration, since this part of the cycle tends to be the most stable [35]. Since the beam is only on for part of the time, gating does increase the overall time the patient spends on the couch, which may increase the risk of the patient inadvertently shifting their position. • In 4D treatment delivery, which is still in the research stage, the beam con- tinuously tracks the tumor position [36, 37]. As with gating, this requires a real-time system for tracking the patient’s respiratory motion. It is po- tentially the most effective treatment for moving targets, but is the mostly technically demanding. Figure 1.11 illustrates the first three of these methods. There are two impor- tant things in keep in mind when using 4D information in planning and delivery. First, measuring respiratory cycle with a proxy such as an abdominal marker 22 block relies on the proxy motion being correlated with the motion of the relevant internal anatomy; this correlation may not be perfect [38]. Second, the treatment planning described above relies on the tumor motion pattern remaining constant from planning through the course of treatment. 1.6 4D imaging on linac CBCT systems With the increasing use of 4D planning CT scans in recent years, the acquisition of 4D scans with linac-mounted CBCT systems has also been the subject of research. Such systems would allow 4D scans to be taken immediately before or after treatment. This section reviews prior research in, and potential applications of, respiratory-correlated cone-beam CT. The basic approach in 4D CBCT is similar to 4D CT, with one important difference in the timing. A standard CBCT scan is done in one gantry rotation, with the gantry rotating much slower than a CT gantry: typically 6◦/s, compared to >360◦/s for the CT. Therefore many respiratory cycles occur in one rotation. As a result, it is the projection images from different gantry angles that need to be sorted into phase or amplitude bins. Large angular spacing between projections in a given bin causes streak artifacts, reducing the image quality: this issue will be discussed in depth in Section 2.3, and appears in much of the work cited below. The two most common methods for respiratory motion measurement are the Varian RPM system, and the analysis of diaphragm position in projection im- ages. Varian RPM systems are already installed on many linacs, being used for respiratory or breath-hold beam gating. The methods reported in the literature have mostly been retrospective acquisition with phase binning. Li et al. [39] demonstrated 4D CBCT scans on a moving phantom and one patient using the OBI system on a Varian Trilogy linac. The respiratory motion was measured using a small radiopaque marker placed in the scan FOV; its posi- tion in each projection image was analyzed. Multiple gantry rotations were used to reduce the angular spacing between projections in each phase bin. Li et al. [40] also investigated improving image quality by reducing the gantry speed (this reduces the angular spacing between projections, provided the imager frame rate stays constant), while also adjusting the imaging dose by reducing the X-ray tube current. Slow gantry rotation was found to produce generally superior images to 23 multiple rotations at normal speed, because multiple rotations duplicate some projection angles while missing others. Lu et al. [41] used the RPM system on a Varian linac to demonstrate 4D CBCT scans on a moving phantom and four patients, with slow gantry rotation. To use the RPM data to sort images, the delay between the start of the RPM system timer and the start of the scan needs to be measured: to do this the “x-ray beam-on signal was intercepted by a photo-isolator circuit” and sent to the RPM computer to be recorded along with the RPM data. Sonke et al. [26] demonstrated 4D CBCT scans of a phantom and patients on an Elekta Synergy system, extracting the respiratory signal from the projection images using an image processing algorithm which measured the diaphragm po- sition. In April 2010 Elekta announced the commercial availability of 4D CBCT on its XVI system based on this group’s research [42]. Park et al. [43] presented a method for extracting a respiratory motion signal from implanted fiducial mark- ers, intended for liver 4D CBCT. (Liver tumors are generally not as visible as lung tumors, so fiducial markers may be implanted to aid in setup.) In general, the image quality in each phase image tends to be lower than in an analogous 3D scan of a stationary object, due to streak artifacts — all of the references above include discussion on this. The basic image reconstruction method is conventional filtered backprojection, which will be described further in Section 3.3. Several methods for more sophisticated image reconstruction have been proposed to improve the quality of images that can be obtained with the same scan data. Li et al. [44] presented a method for “filling in” gaps between projection an- gles in each phase bin using projection data from other phases, suitably deformed to account for the position difference between phases. The deformation fields are derived from deformable image registration performed between each uncorrected phase image and the others, or the planning CT. Zhang et al. [45] also pre- sented a method for correcting phase images using a motion model derived from deformable image registration. Leng et al. [46] presented a method which attempts to remove those streak artifacts due to stationary structures (e.g. bones distant from the tumor which have little or no respiratory motion). This method is sometimes referred to as McKinnon-Bates (MKB) for the authors who originally proposed it for cardiac 24 imaging. First, all projections are used for a 3D image reconstruction in which stationary structures are shown clearly and moving structures are blurred. Then this prior image is re-projected, and those projections are subtracted from the original projections. The differential projections are used to reconstruct differ- ential phase images showing only moving structures. The differential images are then added to the prior image to produce phase images showing motion11. Streaks in test data were significantly reduced but not eliminated. The same group also presented a method [47] using prior image-constrained compressed sensing (PICCS), in which image reconstruction is expressed as a constrained minimization problem that is solved iteratively. The reconstruction process is relatively complex, but numerical simulations and phantom studies showed significant improvement in image quality over filtered backprojection. Bergner et al. [48] presented an autoadaptive phase-correlated (AAPC) re- construction method, which first attempts to divide each projection image into moving and stationary regions using an optical flow algorithm. Pixels are then given motion-dependent weights for each phase in the reconstruction, in order to improve accuracy and reduce artifacts for stationary structures. Bergner et al. [49] compared the performance of several of these methods: con- ventional backprojection, MKB, AAPC, PICCS, and ASD-POCS [50] (related to PICCS) on simulated phantom and real patient data. PICCS and ASD-POCS were much more computationally intensive than the other approaches. The re- sults depended on the data type, and parameters such as gantry rotation speed and breathing period. The authors concluded that none of the methods were fully convincing on the data used. 1.6.1 Potential applications Keeping image quality issues in mind, there are several potential applications for 4D CBCT. One is to improve the setup procedure for moving targets. In a regular (3D) CBCT, tumor motion causes blurring and loss of contrast in the image, which may make the tumor position harder to measure. Ref. [51] presents a case study in which a 4D scan was used to localize a lung tumor which was not adequately visible in the 3D scan. Ref. [52] describes a clinical study evaluating 11Note that projection and backprojection are linear operations. 25 the accuracy of a 4D CBCT localization procedure on 65 lung cancer patients. Ref. [53] compares two target localization methods, one using a regular CBCT and one using a 4D CBCT, and found equivalent performance. All three of these references used Elekta systems. A second application is monitoring the stability of tumor motion between fractions. If a treatment plan is based on a particular tumor trajectory as mea- sured in the planning 4D CT, it is important that the motion remains the same for each fraction. A 4D CBCT scan immediately before or after treatment could provide a means to verify the trajectory with the patient in treatment position, without moving to the conventional CT for a separate scan. If the motion is found to change enough to affect the quality of the plan, re-planning could be considered. Ref. [54] describes a clinical study in which patients received re- peated 4D scans on a conventional CT scanner over the course of treatment, to measure changes in tumor size and trajectory. The authors concluded that plan adaptation during treatment might be warranted for patients with large tumor motion. 4D CBCT has also been used on Elekta systems to study variations in trajectory over treatment [15, 27, 55, 56]. These studies found the trajectory was generally stable over the course of treatment, although Ref. [27] found significant changes in 2 out of 12 patients, and Ref. [56] noted that abdominal compression was associated with larger variability. A third potential application is dose verification. The dose to each structure in the patient is usually calculated using the planning CT image, but there has been interest in using a CBCT image instead, which has the advantage of being taken at the time of treatment with the patient in the actual treatment position [57, 58, 59]. Research has also been done on accounting for the effects of respiratory motion on dose distribution, using 4D CT information [60, 61, 62]. 4D CBCT would allow these two concepts to be combined, by providing respiratory-correlated images of the patient in treatment position. A final potential application is on-line plan adaption. If a 4D pre-treatment scan indicates a change in motion, an adjustment of treatment margins could be considered. Ref. [63] describes a clinical study of adaptive treatment which includes 4D CBCT data, although it uses fluoroscopy to measured daily changes in respiratory motion. 26 1.7 Thesis overview This thesis investigates the implementation of respiratory-correlated (4D) cone- beam CT scanning on Varian linacs. Unlike Elekta, Varian does not commercially offer 4D CBCT scans on its units at present; the research referenced above on Varian systems has required a combination of system modifications and in-house software development. BC Cancer Agency Vancouver uses Varian linacs, and currently has two models with CBCT capability: two Clinac iX units and one TrueBeam unit. This thesis covers what is required to perform 4D CBCT on both models, and what the current technical limitations are. Chapter 2 describes the relevant hardware (the CBCT and RPM systems) and the 4D scan protocols that have been developed. This includes the important issues of gantry rotation speed and RPM-imager timing synchronization. The doses delivered by 4D scans are also considered. A significant part of this project has been writing the software to reconstruct 3D and 4D images. Chapter 3 describes the process of image reconstruction, in- cluding calibrations, the filtered backprojection method used, and phase binning for sorting projection images. Chapter 4 presents the results of several 3D and 4D scans which have been performed on both the iX and TrueBeam units. The scan procedure is not at the clinical stage, so a phantom has been imaged. For the 4D scans, the phantom is placed on a moving platform which provides periodic motion. Scans with a variety of parameters are presented to illustrate the effects on image appearance. 4D CBCT scans will require careful compromises in image quality, so it is important to have a particular application in mind that can be used to evaluate image quality. Chapter 5 explores the potential application of automated lung tumor trajectory measurement, which could be used to evaluate whether tumor motion has changed enough to consider re-planning. Two image registration algorithms have been implemented for measuring the displacement of a tumor in each phase image. One is a simple rigid translation and the other is a more complex B-spline deformation. These algorithms are applied to both 4D CT images of patients, and 4D CBCT images of the moving phantom to evaluate the image quality. Chapter 6 concludes the thesis by describing what steps would be necessary 27 for clinical implementation, and ideas for future work. 28 Chapter 2 4D cone-beam CT scan method The general approach for performing 4D CBCT scans presented in this thesis is fairly conventional and is based on the literature referenced in Section 1.6. The goal has been to implement a working system and produce 4D images first, before exploring potential improvements to the performance. The Varian RPM system is used to provide the respiratory motion signal. At BCCA Vancouver Cancer Centre (VCC), RPM systems are already installed on the iX and TrueBeam units that have CBCT capability. The possible alterna- tives to the RPM involve analyzing the projection images to extract a respiratory signal, as mentioned in Section 1.6: either measuring diaphragm position, or at- taching a small radiopaque marker (such as a BB) to the patient’s abdomen and measuring its position. Both of these would require additional software develop- ment, whereas the RPM system outputs motion amplitude and phase automat- ically. The alternative methods have other drawbacks as well. The diaphragm method requires a large longitudinal FOV, to cover the diaphragm. The marker method may give poor position resolution for gantry angles where the kV source and imager are aligned with the abdominal motion (i.e. vertical). Slow gantry rotation has been chosen as the approach for improving image quality, as it is more efficient and logistically simpler than multiple gantry ro- tations. This chapter describes the CBCT and RPM systems, and the method for slow gantry rotation. In terms of hardware and scan method, there are many similarities between the iX and TrueBeam, but also some important differences, which will be emphasized. Finally, since the issue of dose is important in X-ray imaging systems, 4D scan dose estimation and reduction are discussed. 29 2.1 The Varian CBCT system The On-Board Imager system (OBI) includes the kV source, flat-panel imager, the retractable robotic arms on which they are mounted, the control electronics, and a computer system for CBCT image reconstruction. The OBI has a variety of 2D imaging and fluoroscopy modes, but this section will focus on the CBCT modes. The documentation for the TrueBeam system [64] contains more details than the OBI documentation for the iX [65], so some information below is only given for the TrueBeam, but they are generally similar. The iX units used in this work use OBI version 1.4. First, a note on position terminology. In the IEC1 standard coordinate system used to describe the linac’s position, the gantry rotation angle is zero when the linac head is at its highest point above the patient, and increases as the gantry rotates clockwise as viewed from the foot of the couch. For the kV source and imager: • The vertical position is the distance from the axis of rotation. • The lateral position is the distance along a tangent of the circle of rotation2. Varian notation calls this the x direction. • The longitudinal position is the distance along a parallel to the axis of rotation3. Varian notation calls this the y direction. The kV source and imager are mounted on robotic arms located respectively at -90◦ and 90◦ relative to the linac head (see Figure 1.7). Their standard positions are 100 cm vertical from isocenter for the source spot and 50 cm vertical from isocenter for the center of the detector. Thus the nominal source-axis distance (SAD) is 100 cm and source-detector distance (SDD) is 150 cm. The arms can be moved to other positions but in practice CBCT is almost always done at this one. The only common position change is to move the imager laterally for half-fan scans, which are described further on. 1International Electrotechnical Commission, a standards organization. 2Depending on the gantry angle, the lateral direction corresponds to the patient’s left-right, ant-post, or a combination of the two. It will not have a sup-inf component unless the couch has been rotated — for CBCT scans it usually has not. 3If the couch has not been rotated, then this is the patient’s sup-inf direction. 30 The detector in the kV imager consists of a layer of Tl-doped CsI scintillator on top of an array of amorphous silicon photodiodes. The pixel size is 194 µm square, although not all of that area is sensitive — some of it consists of a transistor for readout. There are 2048×1536 pixels, for a total size of 39.73 cm lateral and 29.80 cm longitudinal. The TrueBeam system also has an anti-scatter grid in front of the scintillator layer; the iX documentation does not specify whether it has one. The imager has several different readout modes for use in 2D imaging, fluoroscopy and CBCT. The mode used in CBCT is called Dynamic Gain and has a 16-bit dynamic range — it also groups pixels together in 2×2 squares so it acts as a 1024×768 array of 388 µm pixels. The maximum frame rate in this mode is 15 frames per second (fps). The kV source is an oil-cooled rotating anode X-ray tube with two focal spot sizes. CBCT uses the larger spot size (0.8 mm on the iX, 1.0 mm on the TrueBeam) since the large number of consecutive projections in a scan represents a significant heat load. The tube voltage (kVp), current (mA), and pulse length (ms) can be set from the unit console — a wide range of kVp values is available but for CBCT 100 to 125 kV is usual. The precise output of the tube for each pulse is measured by a diode called the norm chamber; this information is used in CT image reconstruction. In CBCT scans the tube is pulsed at a rate of 11 Hz, and the imager is read out at the same rate. There are several structures in front of the tube’s exit window for modifying the beam. First there is a fixed primary collimator. Next are the movable colli- mators (also known as blades), which are used to adjust the field size illuminated by the beam. These are two pairs of 3 mm thick lead blades, one in the lateral direction and one in the longitudinal direction. Next, only on the TrueBeam in CBCT mode, is a 0.89 mm thick titanium filter which reduces the low-energy component of the beam, in order to reduce patient dose. Next, in CBCT mode only, is the bowtie filter. The bowtie filter is a specially shaped piece of solid aluminum designed to roughly equalize the X-ray intensity laterally across the detector. Without a bowtie filter, a round object would attenuate the beam more at the center than at the edges, giving much higher intensities near the edges. See Figure 2.1 for an illustration. By reducing unnecessarily high intensities near the edge of the patient, bowtie filters reduce patient dose. This also improves image quality by 31 Figure 2.1: Geometry of a bowtie filter in the transverse plane, not to scale. It is intended for imaging “round” objects, such as the head or torso. Actual filter shapes vary but the purpose is to apply increasing attenuation to the path of rays that are further off-center. Rays through the center of the imaged object (red) pass through the thinnest part of the filter (purple), while rays near the edges pass through thicker parts of the filter. This compensation reduces the variation in intensity across the detector (green). reducing scatter [66]. The Varian system has two available bowtie filters. The full-fan bowtie is symmetric in the lateral direction. The half-fan is essentially one half of a full-fan, and is used for imaging larger objects with only one edge in the beam. The bowtie filters are related to CBCT scan geometry, which comes in three basic types. In all three the FOV is a cylinder with its axis in the longitudinal direction: • Full-fan: intended for imaging head-sized objects. In this mode the detec- tor is centered laterally and longitudinally with respect to the source, and the full-fan bowtie is used. This geometry uses a “short-scan” gantry rota- tion which only covers about 200◦ (see Section 3.3 for details on short-scan image reconstruction). The maximum FOV size is about 26 cm in diameter and 18 cm long. The scan takes 33 seconds, as the gantry rotates at 6◦/s. • Half-fan: intended for imaging torso-sized objects. In this mode the de- tector is shifted laterally: +14.8 cm on the iX, −16 cm on the TrueBeam, where + means towards the linac head. This gives a larger FOV diame- ter of about 46 cm (and 16 cm long) and is illustrated in Figure 2.2. Since 32 Figure 2.2: Transverse view of full-fan (top) and half-fan (bottom) fields of view, approximately to scale. Detectors are in green, fields of view are in blue. The pairs of solid black lines represent the rays at the edge of the FOV. The black dot represents the isocenter, and the dotted line passes through source and isocenter. In half-fan mode the detector is shifted laterally. each projection only covers part of the object, a full 360◦ scan is performed, and data from different projection images is subsequently combined when reconstructing the image. The half-fan bowtie is used, as only one side of the object is in the beam. The scan takes 60 seconds. • Spotlight: intended for imaging a limited FOV within the torso. This geometry is the same as full-fan except no bowtie is used, because the field does not reach the edges of the patient. Each projection is truncated lat- erally on both sides, which requires correction by the image reconstruction software. The collimators are set by default so the beam illuminates the whole detector, but they can be brought in if the volume to be imaged is smaller than the max- imum FOV. The collimator positions are specified by the field size at isocenter. The distance of each projected blade edge from the isocenter will be referred to as cx or cy, so there are two cx values and two cy values. In the y direction the 33 default position of each blade is about 10 cm (i.e. field length 20 cm at isocenter, 30 cm at the detector). In the x direction the default is about 13 cm for each blade in full-fan/spotlight scans. In half-fan scans, the two x blades are asym- metric; the larger cx value (default about 24 cm) determines the FOV radius. The cylindrical FOV radius RFOV and length LFOV are related to the collimator settings: γmax = arctan (cx/SAD) (2.1) RFOV = SAD · sin γmax (2.2) LFOV = 2 · cy · (1− sin γmax) (2.3) where γmax (a quantity we will see again!) is half the beam fan angle in the lateral direction. There are several standard CBCT scan modes based on these geometries, dif- fering slightly between the iX and TrueBeam. They are summarized in Table 2.1. At a given kV setting, the output of the X-ray tube for each pulse is proportional to the current and pulse length. These are measured in mA and ms, so the term “mAs” is often used to refer to their product, either for one pulse or summed over the whole scan. The system reconstructs CBCT images on a computer called the Reconstruc- tor computer, however the Reconstructor is not designed for 4D scans and is not used in this thesis. Image reconstruction is the subject of Chapter 3. There is an extensive set of procedures for calibrating the OBI and perform- ing regular quality assurance (QA) — these are described in the user documen- tation and are not included here. Each combination of kV, bowtie type and imager/detector position requires some separate calibration. Also not included here is a description of the electronics system; this is a commercial system with a carefully designed software interface, and the user does not interact directly with the back-end electronics. 2.2 The Varian RPM system The real-time position management (RPM) system is a camera-based system which tracks the position of a reflective marker block placed on a patient’s ab- 34 Table 2.1: Standard iX and TrueBeam (TB) CBCT scan modes, from Refs. [67] and [64]. The iX modes are for OBI version 1.4. CTDIW is weighted CT dose index (see Section 2.5 for more details on dose). Mode name Geometry kVp Current Pulse length CTDIW (kV) (mA) (ms) (mGy) iX Low-dose head Full-fan 100 10 20 2.0 iX Standard-dose head Full-fan 100 20 20 3.9 iX High-quality head Full-fan 100 80 25 19.4 iX Low-dose thorax Half-fan 110 20 20 4.7 iX Pelvis Half-fan 125 80 13 17.7 iX Pelvis spotlight Full-fan 125 80 25 14.4 TB Head Full-fan 100 20 20 2.8 TB Low-dose thorax Half-fan 125 20 20 3.4 TB Pelvis Half-fan 125 80 13 8.8 TB Pelvis spotlight Spotlight 125 80 25 23.7 domen. It produces real-time amplitude and phase values at a rate of 30 Hz. The real-time phase calculation method is proprietary, but produces results similar to the algorithm described in Section 1.5. The RPM system is intended for use in two environments: on CT scanners (for 4D imaging), and on treatment units. On iX units the RPM system is intended primarily for gating the MV beam. It is controlled from a PC which is separate from the unit’s control console. In contrast, on TrueBeam units control of the RPM is fully integrated into the rest of the system, so it can also be used in conjunction with the imaging system. For example, it can be used to trigger projection images during a gated treatment delivery. There are some other differences between the iX and TrueBeam RPM systems — the TrueBeam has stereo cameras and a different kind of marker block — but these do not significantly affect the work in this project. The RPM system and its operation are described in the RPM reference guide [24] (for CT and iX units), and Chapter 10 of the TrueBeam instruction manual [68] (for TrueBeam units). For the purposes of 4D CBCT scans, the RPM system needs to be run for the duration of the scan, recording its measurements of phase and amplitude vs. time. This data must then be matched to the set of projection images so that each image can be assigned to a phase (or amplitude) bin. 35 On the TrueBeam this is simple. If the RPM is running while the OBI is taking images, then the current RPM phase and amplitude values automatically get written to the header of each image. On the iX however, the situation is more complex because the RPM runs on a separate system from the imager. The RPM data can be exported to a text file (extension vxp) in which each line includes a timestamp and phase/amplitude values for that time. Meanwhile, the imaging system saves each projection image in a file, with a timestamp in the header. However, the timestamps in the RPM data do not match the timestamps in the image files: there is an offset between them since they come from different systems. The offset depends on when the RPM system started tracking and when the CBCT scan started. For every scan, this offset has to be measured to within one bin width4 , otherwise images will be assigned to incorrect bins. If the breathing is perfectly periodic this would not affect image quality — it would just cause a global phase shift. But the breathing period of real patients varies throughout the scan, and in this case bin misalignment will cause blurring in the phase images. There are various approaches to measuring this offset. One is to measure it electronically, by observing the signal in the OBI control system for turning on the X-ray beam. Ref. [41] uses this method. At minimum, it requires some hardware modifications: a wire needs to be connected to wherever the appropriate “X-ray on” signal is, and the RPM PC needs an input card to read this signal. RPM PCs installed on CT scanners have such an input card for this purpose, but the RPM PC’s on the iX units at VCC do not. Additionally, there may be a delay between the “X-ray on” signal and the actual beam-on — it is probably safe to assume this delay is the constant for each scan, so it could be measured once using a diode detector placed in the beam path [41]. This thesis uses a much simpler approach (a stopwatch) to measure the offset, which is less accurate and not practical for realistic applications. It was chosen for the following reasons: • Making hardware modifications to clinical units was not desirable. • The focus of the project was shifting to the TrueBeam unit, which avoids 4For example, using 10 bins on a patient with an average breathing period of 4 seconds, the average bin is only 0.4 seconds long. 36 this problem altogether. • Most of the scans in this thesis are of periodically moving phantoms, and accurate offset measurement is not necessary for truly periodic motion. On the iX, the process for recording RPM data involves pressing the “Track” button in the software application to begin tracking, then pressing the “Record” button once tracking is established. As far as can be determined, the zero time for the RPM timestamps is when “Track” is pressed. The simple method to measure the offset is to start a stopwatch when pressing “Track”, and stop it when the “X-ray on” LED on the console first lights up5. This does not account for the variability in operator reaction time, or a possible offset between the LED and actual beam-on. It is probably not accurate to better than a few hundred ms, and the inconvenience of simultaneously operating the RPM, CBCT and stopwatch (and looking at the LED) makes it impractical outside of demonstrations. 2.3 Slow gantry rotation The speed of gantry rotation during a 4D CBCT scan has a major effect on image quality. This is because the process of binning projection images will leave each bin with gaps in angle where there are no projections. This is illustrated in Figure 2.3. The result of these gaps will be streak artifacts in the reconstructed images. The streaks appear originating from boundaries between regions of significantly different CT numbers, for example between bone and soft tissue. The severity of the streaking increases with the size of the angular gaps — this is illustrated in Figure 2.4, which compares images of the same object reconstructed using different gap sizes. The size of the angular gaps in a bin is proportional to the gantry speed. Let A be the average angular spacing between the center successive groups of projections in a bin6 (e.g. in Figure 2.3, A is 90◦). If the patient’s breathing period is B and the gantry rotation speed is SG, then A = SG ·B (2.4) 5Instructions for doing this are included in Appendix A.2. 6Of course A is not actually constant since the patient’s breathing period varies during the scan. Also note that the gap size is slightly smaller than A due to the finite width of the bin. 37 0180 270 90 1 1 1 1 Figure 2.3: The origin of gaps in angle in a 4D CBCT scan. All values used in this diagram are for clear illustration only and do not represent realistic scan parameters. The black dots on the circle represent the kV source positions where projection images are taken as the gantry rotates around the patient. At the same time the patient is going through their breathing cycle, which is divided into phase bins represented by wedges. This diagram has 5 phase bins, with bin 1 highlighted. Only the projection images in the blue wedges will contribute to the image for phase 1, leaving gaps in the data of almost 90◦ with no projections. Patient breathing periods vary but a typical value might be 4 seconds. With the standard rotation speed in a Varian CBCT scan of 6◦/s, this would give A = 24◦, large enough to cause severe streak artifacts. As discussed in Section 1.6, reducing SG will reduce A proportionately and is the most straightforward way to improve image quality. Slowing down the gantry rotation does have the undesirable effect of increasing the scan duration, so a compromise between image quality and scan time has to be made. The standard scan times are 33 seconds for a full-fan/spotlight scan, which covers about 200◦, and 60 seconds for a half-fan scan, which covers 360◦. 4D scans will probably take a few times longer, in order to reduce A enough to give reasonable image quality. Just how good the quality needs to be will depend 38 A = 0.55° A = 3.2° A = 6.4° A = 13° Figure 2.4: The effect of different angle spacing (A) values on image quality. These images are from CBCT scans of a stationary Catphan 504 phantom taken on an iX unit and reconstructed using the procedure described in Chapter 3. The first image uses the standard spacing between projections of about 0.55◦ (i.e. 6◦/s gantry rotation divided by 11 fps). In the other images, projections have been removed at regular intervals to create gaps, mimicking what occurs in a 4D scan. Note that the tube current and pulse length were increased in these scans to compensate, so each image represents the same total mAs; the artifacts are not a signal:noise issue. Streaks spaced at intervals of A emanate from boundaries between high and low CT numbers. Window width 1500, level 250. The streaks extend into the air region outside the phantom but are not visible there at this window setting. 39 on the application. (Chapter 4 includes scans with different gantry speeds, and Chapter 5 examines their relative image quality.) The iX units at VCC currently do not have the capability to change gantry rotation speed for CBCT scans. With a console software upgrade to version 7.11, and a special software patch from Varian, it would be possible to change the speed to 1 or 3◦/s [69]. The change would be temporary and would be done through Service Mode. The TrueBeam is more flexible: the speed can be altered if the CBCT is done in Developer Mode, a dedicated research mode which is described further in the next section. A related but less critical issue is the frame rate (i.e. the rate at which the tube pulses and the imager reads out). As Figure 2.3 shows, if a bin lasts long enough there may more than one projection in it. Having a cluster of projection images, all at nearly the same gantry angle, in the same bin is redundant. It would be preferable to reduce the frame rate so that there is just one frame per phase per breathing cycle. This would result in fewer projection image files to process and faster reconstruction. (Note that the mAs per pulse would have to be increased correspondingly, and there are limits on what the tube can output.) If the patient’s average breathing period is B, and NP phase bins are desired, then to get one frame per phase per breathing cycle the frame rate F should be about F ' NP/B (2.5) F should actually be somewhat higher than this, for two reasons: • If the patient’s breathing is irregular, some cycles will go by faster. It is important not to miss a whole cycle in any bin. • If amplitude binning will be used, one may want to have finer time resolution for those parts of the cycle when the amplitude is changing rapidly, such as mid-inhale. For example, consider a breathing period of 4 seconds and 10 phase bins. This gives an optimal frame rate of something over 2.5 fps — perhaps 3 or 4 fps. The standard frame rate is 11 fps, so it is worth trying to reduce this. However, on the iX there is no established way for users to change the frame rate [69]. (In the iX OBI software, there is an interface for creating new scan modes which appears 40 to allow both image rate and gantry speed to be changed, but this actually has no effect!) On the TrueBeam, in Developer Mode there should be a lower frame rate (7 fps) available. However it is not currently available on the VCC unit due to technical difficulties (the unit reports a calibration error). 2.4 Scan procedure This section summarizes the 4D CBCT scan procedures that have been developed for the iX and TrueBeam. There are significant differences so they are described separately, but there are some features they have in common. First, the scan protocols are based on the clinical modes listed in Table 2.1: the same combinations of kVp, bowtie and imager positions are used. Given the OBI software interface on both iX and TrueBeam, this makes the procedure simpler to carry out, and is done for general consistency. The existing modes cover a sufficient range of geometry: full-fan for a smaller (head-sized) FOV, half-fan for a larger (torso-sized) FOV, spotlight for a smaller FOV within a larger object. Most of the work in this thesis has used a head-sized phantom and full-fan modes. The parameters that can easily be adjusted are the tube mA and ms, and the collimator settings. These will affect the imaging dose, which is discussed in Section 2.5. Also, since 4D scans involve large numbers of projections, the mAs should be chosen with the X-ray tube’s heat limits in mind. Safe values can be estimated by checking the rise in the tube’s heat units from a test scan at low settings (e.g. 10 mA, 20 ms). Second, the RPM data is used in the same way on both systems. The RPM system outputs a time series of amplitude and phase values for the marker block, which are then used for binning the projection images. Third, the actual image reconstruction algorithm is largely the same for the iX and TrueBeam. There are only minor differences in the reconstruction process, which are described in Chapter 3. 2.4.1 iX units On the iX, 4D CBCT scans are done in regular treatment mode, using a dummy patient plan that includes a CBCT field. The RPM is controlled from a separate PC. Step-by-step instructions are given in Appendix A.2. As mentioned previ- 41 ously, the method for synchronizing the RPM and imager is neither accurate nor practical enough to consider for real clinical use. The output files resulting from a 4D scan are: the RPM data file (extension vxp), the scan info file (ProjectionInfo.xml) and the projection images (exten- sion hnd, a Varian-specific compressed format). The XML and hnd files together contain all the precise geometric information needed for image reconstruction, such as gantry angles and exact source and detector positions. 2.4.2 TrueBeam units On the TrueBeam, 4D CBCT scans are done in a new mode designed specifically for research, called Developer mode (or sometimes Research mode). This mode allows detailed control over the movements of the unit, and is described in its own manual [70]. It is not allowed for use on humans. It has been used for this project because, as on the iX, regular treatment mode does not allow gantry speed to be adjusted. In Developer mode, the machine executes a sequence of operations defined in a user-written XML file. The format of this file is called Beam XML; it is defined by Varian and described in Ref. [70]. An XML file for performing a regular CBCT scan is straightforward — the various parameters for the scan can all be set: • Gantry start and stop angles, and gantry rotation speed • kV source voltage, current (mA) and pulse length (ms) • kV detector position, to switch between full-fan and half-fan modes • Bowtie filter and Ti foil presence (the Ti foil should always be used) For convenience, template XML files have been created for various modes; these are listed in Appendix B.4. In most cases the only parameters in these that need to be adjusted are current and pulse length. For a 4D scan, the XML file should have a reduced gantry speed, and also needs two sections added (GatingParameters and BeamHoldDevices) to run the RPM system during the scan. This will automatically write the amplitude and phase values to the projection image files. This feature is designed to gate the kV imaging, so to record all the images the gate should be set fully open (gating window 0-360◦). A template XML file for 4D scans has also been created. 42 One complication for 4D scans is that the console software will run out of memory and crash if a scan contains more than around 800 projection images. Regular scans contain about 370 (full-fan) or 660 (half-fan) images, but reducing the gantry speed will increase this number proportionately. To avoid this prob- lem, the scan can be broken up into two consecutive ranges of angles, each with its own XML file. The output files resulting from a 4D scan are one xim file and one hnd file for each projection7. Currently the hnd files do not contain valid header data, while the image compression scheme in the xim files has not yet been released by Varian. So to obtain all the information needed for reconstruction, the images must be read from the hnds and the headers must be read from the xims. 2.5 Estimation of imaging dose The dose received by patients in CT scans is a topic which receives widespread attention. CBCT scans are usually done several times over the course of treat- ment, and 4D scans generally deliver higher dose than regular ones, so it is worth estimating their dose. Calculating a dose distribution in an individual patient from a particular CT scan would entail a significant amount of work, involving Monte Carlo or a system similar to a TPS. A simpler alternative is commonly used for giving a rough dose estimate, and comparing different CT systems and scan types. The procedure is to scan a standardized phantom and measure the dose with ion chambers placed at various locations in the phantom. The phantoms are typically solid acrylic cylinders, with one slot at the center and four near the surface for chambers. The weighted CT dose index (CTDIW ) for a given scan is a weighted sum of the doses measured at these locations. In fan-beam systems CTDIW is measured with a 10-cm long pencil chamber, but on cone-beam systems, due to the wide beam, CTDIW is typically measured with a small Farmer-type chamber instead [71, 72]. Varian’s documentation quotes CTDIW values for the standard OBI scan modes. These are included in Table 2.1. Note the large variation between modes. 7Both xim and hnd are Varian-specific formats. The system allows the projections to be exported to hnd, xim or DICOM format. Exporting large numbers of DICOM files usually fails for an unknown reason, so DICOM is not used. 43 Also note that the TrueBeam doses are generally lower than the iX doses8. This may be largely due to the added titanium filter. The additional dose from a 4D scan can be simply estimated by scaling one of these quoted values by the number of projections and the mAs per projection. For example, if the gantry speed is reduced by a factor of five to keep A (the angular spacing, introduced in Section 2.3) reasonably low, there will be five times as many total projections taken. Recall that the total number of photons being delivered is now being split up among perhaps 10 phase bins, so the mA might be increased by factor of two to maintain the same SNR (signal to noise ratio) in the phase images as in a standard 3D image. In this example the CTDIW would then be ten times the standard dose. There are two main ways to minimize CBCT dose, and they apply to 3D and 4D scans alike. The first is to keep the total mAs as low as possible while maintaining sufficient signal:noise in the images for the application. In 4D scans the image quality is also affected by streak artifacts. If this is the dominant issue, then some further reduction in mAs may be possible without significantly affecting the quality. The second is to bring in the the collimators in as much as possible, only imaging the minimal FOV that is required for the application. This applies pri- marily to the y (longitudinal) collimators. Bringing in the x (lateral) collimators increases the truncation effect and should only be done if the software truncation correction is known to compensate for it sufficiently. In clinical operation, the user can adjust the scan FOV and the OBI system will move the collimators ap- propriately. Reducing the y field of view should also improve the image quality as it reduces scatter, although the degree of improvement is not simple to predict. Reducing the field of view will remove the primary dose at those edges of the field, and decrease the scatter dose at all locations. To illustrate this effect, a simple measurement was made of dose distribution in a cylindrical solid acrylic phantom with a Farmer-type ion chamber (model PTW N30001). The cham- ber was positioned at the lateral center, and near the longitudinal (y) center. The phantom was first positioned to put the chamber approximately at isocen- ter. Then, since moving the whole phantom in the y direction was simpler than 8Except for Pelvis spotlight, probably because it uses a bowtie filter on the iX but not on the TrueBeam. 44 0 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 Distance from isocenter (cm) R el at iv e do se   18 cm FOV 11 cm FOV Figure 2.5: Relative dose profiles along the superior-inferior axis, measured in a cylindrical phantom at two y FOV settings. Values are relative to the dose at isocenter with the larger FOV. Dashed vertical lines represent the approximate location of the collimator edge. moving the chamber within the phantom, this was done to imitate making dose measurements at different y positions. At each position two full-fan scans were taken with different y FOV settings: 18 cm (the maximum) and 11 cm. Figure 2.5 shows the resulting dose profiles. With the narrower 11 cm FOV, the dose at isocenter is reduced by 16% due to reduced scatter, and the dose profile falls off faster since the collimator edges are closer. 45 Chapter 3 Image reconstruction This chapter describes the 3D and 4D image reconstruction software that has been written for this project. The 3D reconstruction uses Feldkamp-Davis-Kress (FDK) filtered backprojection [73], the same fundamental approach widely used in commercial CT systems and in the Varian OBI system. This was chosen over iterative reconstruction techniques because it is well-established, fast, and relatively straightforward to implement. It is described in more detail in Section 3.3. After a CBCT scan is done in clinical mode, the Varian OBI system auto- matically runs its own image reconstruction software. It is a commercial system and does not expose a programming interface for parts of its own software to be used by external programs. (If it did, using the Varian image reconstruction software would have been a viable alternative to writing separate code for 4D reconstructions.) What is available is the full set of projection images, which are the starting point of the reconstruction process. The software for this project has been written in MATLAB [74], for fast development and convenience in displaying images. This comes at the expense of execution speed: image reconstruction can take on the order of an hour (rewriting it in optimized C++, and using parallel processing, would significantly reduce this). The following sections describe the components of the image reconstruction process. Appendix B gives a list of the main software scripts and functions. Section 3.7 provides an overview of some improvements that could potentially be added. 46 3.1 Projection image data In CBCT mode, each projection image from the detector consists of a 1024×768 array of unsigned 16-bit integers, representing the sensor pixel readout values for one X-ray beam pulse1. There is also associated header information such as X-ray tube settings and precise source and detector position values. The image data is stored in hnd files: this is a Varian-specific compressed format which is described in a document obtained informally from Varian. (See Appendix A for instructions on obtaining a scan’s hnd files.) Decompressing the hnd images in MATLAB is quite slow, so the decompression step has been implemented in C++, in a program called HNDtoHNC.exe. This decompresses the whole scan’s hnd files, converting them to hnc format. hnc files are similar to hnd but are not compressed, so they can be read in quickly in MATLAB. On iX units, the header data in the hnd files is carried through to the hnc files and subsequently used in reconstruction. On the TrueBeam, the hnd header data is actually invalid (for reasons unknown), so header data is read from xim files instead. xim is another Varian-specific compressed format; its documentation is not available yet, but its header data is partially in readable text form, so code for extracting the needed values has been developed using trial and error. An extra processing step is needed at this point for half-fan scans only. In half-fan geometry, the detector is shifted laterally and does not cover the whole FOV at once (see Figure 2.2). In this initial format, the projection images cannot be backprojected. Since the source and detector revolve a full 360◦, the “missing” projection rays at one gantry position can be taken from other gantry positions. The simplest way to handle this is to reorganize the projection data, creating expanded projection images. Each of these expanded images contains data from many original images, but reorganized to simulate a wider detector that is cen- tered on the midline (here the term midline means a line through the kV source spot and isocenter). Figure 3.1 illustrates the two angles β and γ that define a ray from source to detector in a transverse plane, and shows how pixel data for one ray from one projection image is used to expand another image. The ray at 1At high mAs values, in regions with little attenuation, it is possible to exceed sensor values of 216 − 1 = 65535; this causes the value to roll over to 0. This causes severe artifacts in the reconstructed image and should be avoided. 47 Figure 3.1: The left side shows the two angles that define a ray (solid black line) from source to detector in a transverse plane. The green line is the detector and the dashed line is the midline. The angle β gives the kV source position — note β increases going counterclockwise, so it is the negative of the gantry angle. γ is the angle off midline and also increases counterclockwise. The right side shows the detector shifted laterally for a half-fan scan. When the source and detector are at position 1, the ray misses the detector, but this data can be obtained from position 2, effectively extending the detector’s length by the dashed portion. This allows larger γ values and hence a larger FOV. See Figure 2.2 for a comparison of the half-fan and full-fan fields of view. (β1, γ1) is equivalent 2 to the ray at (β2, γ2) = (180 ◦ + β1 + 2γ1,−γ1). This reor- ganization is implemented in the MATLAB script expandProjectionImages.m. The projection image data is usually rebinned in order to reduce noise in the reconstructed image. The original pixel size is 388 µm square. The ratio of SAD:SDD is about 2:3, so this corresponds to around 260 µm near the isocenter, where the FOV is. Consider what would happen in the backprojection process below if the reconstruction grid spacing were much larger than this: For a given line of pixels, backprojecting to a given line of grid points, some pixels would “miss” grid points and not contribute to the image. Rather than lose this infor- mation, the image can be rebinned by grouping rectangles of pixels together and averaging their values: this reduces the noise in the reconstructed image. This is illustrated in Figure 3.2. For example, with a grid spacing of 0.5 mm transverse 2Actually, because the half-fan bowtie filter is asymmetric, these two rays will be attenuated differently by the bowtie, but the normalization method in the next section will correct for this. 48 Figure 3.2: Rebinning detector pixels to match reconstruction grid spacing (not to scale). The blue circles represent one row of grid points, with black lines representing backprojection rays. The green boxes represent the physical sensors: in this case most of them do not backproject to grid points. The red boxes represent the detector rebinned by a factor of four; now all pixels contribute. Note that the size matching does not have to be exact, and the rays do not have to hit the centers of pixels: the pixel values will be interpolated as necessary. and 1 mm longitudinal, the pixels could be rebinned by a factor of 2 laterally and 4 longitudinally, giving effective pixels of 0.776 mm by 1.55 mm. The projected size (multiply by 2/3) is now comparable to the grid spacing. Rebinning is basi- cally equivalent to applying an anti-aliasing filter and downsampling. The choice of grid spacing and rebinning factor represents an important tradeoff between image detail and signal:noise ratio. 3.2 Intensity normalization In CT, a map of the attenuation coefficient µ in an object is reconstructed by measuring the attenuation of X-rays along different rays through the object. To calculate attenuations, the intensity at the detector needs to be measured both with (I) and without (I0) the object present. Ignoring the polychromaticity of 49 Full−fan 100 kV   2000 4000 6000 8000 Half−fan 110 kV   0.5 1 1.5 2 x 104 pixel value pixel value Figure 3.3: Typical air norm data for full-fan and half-fan scans, taken on an iX unit. The horizontal axis is the lateral direction and the vertical axis is longitudinal. The full-fan data is 1024×768 pixels; the half-fan data has had the detector expansion applied so it is 1600×768 pixels. Pixel values are high in the lateral center since that is where the bowtie filter is thinnest. The half-fan values are higher than the full-fan ones because the scan happened to be taken at twice the current (and the voltage is also higher). the beam for now, recall that the attenuation factor along a given ray is: I/I0 = exp ( − ∫ µ(s) ds ) (3.1) where s parameterizes the distance along the ray. Therefore one of the first steps in image reconstruction is to divide each object projection image I by I0. Measuring I0, the intensity with no object present, is known as an air normal- ization, and is a common calibration procedure. It is one of Varian’s standard OBI calibrations, and is also done in this project. As Figure 3.3 shows, I0 is highly nonuniform across the detector due to the bowtie filter, and even without a bowtie some unevenness would remain due to other factors such as the heel ef- fect. Separate air norm data must be taken for each combination of tube voltage, bowtie and detector offset. Different mAs values do not need to be calibrated, since the CT norm chamber (abbreviated here as CTNC) value can be used to scale between the air norm and the object projection images. However, since the CTNC value scale has been observed to vary between units, a separate air norm must be done for each unit. The CT norm chamber value is used as the measurement of the X-ray tube output for each pulse. It is preferable to using the scan’s mA and ms settings for three reasons. First, it is a measured value rather than a nominal one. Second, 50 0 0.2 0.4 0.6 0.8 0 5 10 15 20 x 104 mAs per projection m e a n  C TN C va lu e CTNC vs mAs 0 2 4 6 8 10 x 104 0 1000 2000 3000 4000 5000 mean CTNC value pi xe l v al ue Pixel value vs CTNC value Figure 3.4: The response of the CT norm chamber (CTNC) and sensor pixels to different X-ray tube outputs. The left plot shows mean CTNC values (averaged over all projections) vs nominal mAs/projection values for five TrueBeam scans with different mAs values. The red line shows a linear fit: linearity is very good, with a small offset of about -2400. The right plot shows selected pixel data from four of these scans which were open- field. Two groups of pixels are plotted: those with values in the range 400-401 in the lowest-output scan (the lower line) and those in the range 1000-1001. These are both relatively low intensities, and correspond to different locations on the detector, with different attenuation from the bowtie filter. The red lines show linear fits. Linearity is very good and the offsets are very small (hardly visible at this scale). the tube output varies slightly between pulses, and a CTNC value is recorded for each pulse. Third, this is what the Varian software does. As Figure 3.4 shows, the CTNC and mAs values are highly consistent with a linear relationship. Since they are linearly related to each other with only a small offset, it is reasonable to assume that the CTNC has little or no offset relative to the true tube output. Thus CTNC values with no offset are used for normalization. The sensor pixel values are also assumed to be linearly proportional to the intensity at the detector, with no offset. This greatly simplifies the calculation of I/I0: the pixel value in the data can simply be divided by the pixel value in the air norm. When the OBI system writes a projection image to file, some processing has already been applied, for example dark-field and flood-field calibrations are 51 applied and bad pixels interpolated. The exact meaning of the pixel value scale is not documented, but as Figure 3.4 shows, the pixel values are quite linear with CTNC value (i.e. intensity), with negligible offset. The air normalization procedure is simply to take a regular CBCT scan with the collimators at default positions and nothing in the field of view. A relatively low mAs value is used (e.g. 10 mA, 20 ms) to avoid overflowing the 16-bit sensor values, and to avoid any possible sensor nonlinearity at high intensities. The pro- jection images are then averaged together to reduce noise (using the MATLAB script measureIntensityNorm.m), and the average I0 image is stored in a MAT- LAB data file. Step-by-step instructions for air norm calibrations are given in Appendix A.1. When an object image is reconstructed, the I0 image is read from this file, and each projection image is divided by it and scaled by the relative CT norm chamber values. (This is done in the top-level image reconstruction script cbct.m). The main difference between this air norm procedure and Varian’s is that the Varian procedure only takes an air norm image at one gantry angle. Recent publications have indicated that the single-angle air norm, combined with slight “wobbling” motion in the bowtie filter as the gantry rotates, is the cause of arc- shaped artifacts commonly seen in images reconstructed on the Varian system [75, 76]. Such artifacts are not seen in images reconstructed for this project. 3.3 Filtered backprojection CT uses a set of projection images to reconstruct the distribution of µ on a grid of point locations in the field of view. A set of 1D projections (e.g. a fan beam with only one row of sensors) yields a 2D image; a set of 2D projections (e.g. cone beam or multislice fan beam) yields a 3D image. Filtered backprojection is the most widely used method in CT for image reconstruction. “Backprojection” refers to the projection of sensor pixel values in each projection image along rays back towards the kV source. “Filtered” refers to a particularly shaped filter that is applied to the pixel values beforehand, which is necessary to reconstruct the image properly. Fully describing the mathematical underpinnings of filtered backprojection would take too long to do here; for a reference see Chapter 6.3 of Prince and Links [9]. 52 A truly accurate 3D reconstruction would actually require projections from a complete set of angles all around the object, covering a full 4pi steradians. On clinical CT systems, of course, this is not the case: the source is confined to revolving in one plane (called the midplane). As a result, artifacts (typically blurring in the longitudinal direction) will occur in the image, with increasing severity at points farther from the midplane. In practice, this drawback is ac- cepted, and the artifacts are generally not severe. The FDK algorithm [73] is a straightforward extension of 2D filtered-backprojection image reconstruction to 3D — it is used in this project and is also used in the Varian reconstruction software. The image reconstruction code is based on the outline given in Chapter 3 of Kak and Slaney’s text on CT imaging [77]. The FDK filtered backprojection is implemented in the MATLAB function ConeFBP.m. The backprojection is applied to the logarithm of the normalized projection images, i.e. − log (I/I0). It accounts for the diverging beam and flat-panel detector geometry. There are a few features to note: • To allow for uneven spacing between projection images, each projection image is weighted according to how close its two neighbors are. The weights are calculated in WeightSourceAngles.m. • Full-fan (and spotlight) scans are known as “short scans” because the gantry only needs to rotate by 180◦ + 2 γmax to acquire a complete set of projection rays through the FOV. Here γmax is the maximum lateral angle off midline (see Equation 2.2 and Figure 3.1). In this case the detector is 40 cm wide and centered laterally, and the SDD is 150 cm, so γmax = arctan ( 40/2 150 ) = 7.6◦ (3.2) This gives a minimum gantry angle range of 195.2◦; Varian standard modes round this up and cover 200◦. Short scans duplicate some rays so individ- ual pixels in each projection need to be weighted: the Parker weighting scheme [78] is used here and is implemented in WeightShortScanData.m and ShortScanWeight.m. • In each projection image, a simple truncation correction is applied if the 53 object extends to either lateral edge. The image is extended laterally on both sides and padded with artificial data, which matches the actual data at the boundary and then descends linearly to zero. This prevents the worst of the truncation artifact (a bright ring near the edge of the FOV), but is not perfect: the reconstructed µ values will be slightly biased throughout the image. This is implemented in PadTruncated.m. • The filter is a conventional Ram-Lak ramp filter, with a spatial frequency response proportional to the absolute value of the frequency. It is created in CreateRampFilter.m and applied to the data using the built-in MATLAB convolution function. The filter is applied in the lateral direction only. There is an option in the code to convolve it with a low-pass filter as well, which will reduce noise at the expense of image sharpness. • Images can in principle be reconstructed at an arbitrary set of points, but for simplicity the code reconstructs the image on a rectilinear grid, centered at the isocenter. The grid spacing and number of grid points can be chosen when the code is run. The x, y and z directions in the grid correspond to left, posterior and superior for a head-first supine patient. • During backprojection, sensor values are interpolated between pixels using bilinear interpolation. • The projection files contain precise information on the positions of the source and detector, for example detector lateral and longitudinal offsets, and SDD, with sub-millimeter precision. This is taken into account during backprojection, which is necessary for optimal image quality. 3.4 Hounsfield unit calibration Once the filtered backprojection procedure has produced a 3D image, the µ values need to be converted to CT numbers (see Section 1.3). This requires calibration, which is done using the same method as the Varian reconstruction process uses. The calibration is based on imaging a Catphan 504 phantom [79]. This phantom includes a section (called the CTP404 module) which contains inserts of several different materials for sensitometry measurements. Each material is assigned a 54 Table 3.1: Calibration CT number values for sensitometry inserts in the CTP404 module of the Catphan 504 phantom, from Refs. [65] and [79]. Material CT number (HU) Air -1000 PMP (polymethylpentene) -200 LDPE (low-density polyethylene) -100 Polystyrene -35 Acrylic 120 Delrin 340 Teflon 990 fixed CT number3, taken from the phantom documentation, which is listed in Table 3.1. The calibration is done for each kV value and filter combination (since the filters may change the spectrum of the beam). An axial slice containing the sensitometry inserts is taken from the reconstructed 3D image, and the average µ value within each insert is measured (averaging over pixels to reduce noise). Figure 3.5 shows a typical slice image from this process. Then, a linear fit of the fixed CT numbers vs. µ values gives two parameters, offset and slope, which are stored in a text file. This is done in the script measuremuHU.m, and step-by-step instructions are given in Appendix A.1. In subsequent scans, the two parameters are read from the file and used to convert µ values to CT numbers. 3Since each material’s attenuation varies slightly differently with energy, the true CT num- bers would actually be vary with voltage. But this effect is small enough to be ignored; with its characteristic levels of scatter, CBCT is not intended for high-precision µ measurements. 55 right−left pixel index a n t− po st  p ixe l in de x Attenuation coefficient image   100 200 300 400 500 50 100 150 200 250 300 350 400 450 500 −0.01 −0.005 0 0.005 0.01 0.015 0.02 0.025 0.03 Figure 3.5: An axial image of the CTP404 module of the Catphan 504 phantom, usable for HU calibration. This image was reconstructed from a full-fan scan done on the TrueBeam unit at 100 kV. The values shown are the attenuation coefficient µ in units of mm−1. The pixel size is 0.5×0.5 mm, the image size is 25×25 cm and the phantom diameter is 20 cm. (The dark blue ring which extends partially outside the image is a minor artifact at the edge of the FOV.) Seven circular material inserts are visible; the acrylic insert is difficult to see since it is very similar to the surrounding material. Clockwise from the top, the eight inserts are air, Teflon, Delrin, acrylic, air, polystyrene, LDPE (low-density polyethylene) and PMP (polymethylpentene). Note the two air inserts (cyan) have µ values significantly above zero; the reason for this is not understood and has not been investigated. For CT numbers this will be largely corrected by the calibration, but it illustrates the limited accuracy. 56 3.5 Summary: 3D image reconstruction 3D images are reconstructed using the MATLAB script cbct.m, which incorpo- rates the elements described above. Before running cbct.m, the projection images need to be decompressed with HNDtoHNC.exe and, for half-fan scans, expanded using expandProjectionImages.m. The steps taken in cbct.m are: 1. Collect relevant scan parameters and header information (e.g. source an- gles, CT norm chamber values) from each projection using the function GetProjectionFileInfo. This function is different for iX and TrueBeam, because the header data is read from different types of files. 2. Discard any projections which are outside the required range of source angles using RemoveExcessFiles.m 3. Calculate weights for each projection using WeightSourceAngles.m. 4. Load the air norm image, rebin it and take its logarithm. 5. Create the array of values for the ramp filter using CreateRampFilter.m. 6. Loop through the projection files. For each one: • Read the image from the hnc file, rebin it, take the logarithm and normalize it using the air norm image. • Calculate its backprojection onto the 3D grid of reconstruction points using ConeFBP.m. This function includes the short-scan weighting, truncation correction and filtering. • Weight the backprojection and add it to the reconstructed µ image. 7. Convert the µ image to a CT-number image using ConvertMuHU.m. 8. Export the CT-number image to DICOM files using WriteDICOMScan.m As far as processing time goes, the slowest part of the reconstruction process is generally the filtered backprojection step, followed by the rebinning. The time taken by cbct.m is proportional to the number of projection files in the scan, but depends on the number of reconstruction grid points and choice of 57 rebinning factors. On a 3 GHz Intel Core 2 Duo, cbct.m takes on the order of 4–8 seconds per projection, for total reconstruction times on the order of an hour. Some simple tests have suggested that rewriting the code in optimized C++ could speed this up by an order of magnitude. The filtered backprojection process is also very amenable to parallel processing, which could further reduce reconstruction times. The decompression step done with HNDtoHNC.exe takes about 0.15 seconds per file, which includes time for file I/O. The half-fan expansion done with expandProjectionImages.m takes about 2.5 seconds per file, which is proba- bly mostly file I/O. 3.6 4D image reconstruction Extending image reconstruction from 3D to 4D is straightforward. Phase or amplitude bins are defined, each projection image is sorted into one of the bins, and a 3D image is reconstructed for each bin. In this project only phase binning has been implemented. The motion plat- form used in testing moves periodically, and with periodic motion, amplitude and phase binning will give equivalent results. The phase bins are chosen to be equal in size, typically ten bins of 36◦ each. An even number of bins is generally used, so that there is one end-inspiration and one end-expiration bin. The phase bins are numbered such that phase 1 is always end-expiration (the opposite phase to end-inspiration, where the RPM phase is 0◦). With ten bins, phase 6 is then end-inspiration. The scripts sort4DProjectionsIX.m and sort4DProjectionsTB.m do the image sorting for iX and TrueBeam respectively. As described in Section 2.2, the TrueBeam RPM info is embedded in each projection file, but the iX has a complication: the RPM data is recorded separately, and the time offset between RPM data and images has to be known for this step. Altering the binning process to use nonuniform phase bins, or to use amplitude bins, would be straightforward. With amplitude binning however, the RPM data would have to be examined first in order to choose appropriate amplitude bins. Once the images are sorted, the script cbct4D.m is used to perform a 3D reconstruction for each bin. The reconstruction parameters (e.g. grid dimensions, 58 rebinning factor) should be identical for each bin, so the images can be directly compared. Step-by-step instructions for taking 4D scans and reconstructing the images are given in Appendix A. 3.7 Potential improvements There are several possible improvements to the image reconstruction process de- scribed above, which should in principle improve image quality. They have not been implemented for this project because doing so would significantly increase both development time and the complexity of the process. Meanwhile, the de- gree of image quality improvement is usually difficult to estimate beforehand. 4D-specific improvements were listed at the end of Section 1.6. There are also improvements which are relevant to general 3D CT imaging. The simplest improvement would be an improved truncation algorithm, which attempts to take the actual object dimensions into account. One possibility is to use the planning CT to model the object’s transverse cross-section as a simple shape, such as an ellipse. For each ray which passes through the object but misses the detector, its distance through the object could be estimated using this ellipse model. Assuming a uniform object density near the edge of the object, these distances could be used to generate artificial padding data, with the attenuation extrapolated smoothly to zero at the edge of the object. This would be similar to what is currently done (linear extrapolation over a fixed distance), but much more spatially accurate. It should reduce the bias in µ values within the FOV. Several other approaches to truncation correction have been published and could also be considered [80, 81, 82, 83]. Note that commercial CT systems (including the OBI) all include truncation correction, but the details are generally not made public. A major issue in CBCT image quality is Compton-scattered photons which hit the detector. Due to the large irradiated volume, scatter is much more sig- nificant in cone-beam than in fan-beam systems. Scatter correction algorithms attempt to estimate and subtract out the scatter present in the projection images. Several algorithms are described in References [84, 85, 86, 87]. The TrueBeam reconstruction software includes scatter correction — see Chapter 6 of Ref. [64] 59 for a description of the TrueBeam reconstruction software. The iX software is not documented in as much detail, and does not appear to include scatter correction. Beam-hardening correction algorithms attempt to correct for the differing degrees of attenuation experienced by photons of different energies in the beam. Without correction, this can cause artifacts including dark streaks between high- µ regions, or “cupping” (underestimated µ values in the middle of the imaged object). Beam hardening has not been examined in this project as these kinds of artifacts have not been evident in the images. References [88] and [89] present some correction algorithms, and the TrueBeam documentation [64] mentions that an “analytical spectrum correction” is used. Ring artifacts may appear in CT images if the sensors have slightly nonlinear response curves, which vary from one pixel to the next. For example, a pixel that gives an abnormally high output in the object scan, but not in the air norm, will create the impression of low attenuation. This will result in a dark ring in the reconstructed image. Ring artifact correction algorithms reduce such rings - some algorithms are described in References [90, 91, 92, 93]. Ring artifact correction is present in both the iX and TrueBeam software — for each scan it is an option whether to apply it. In images reconstructed using this project’s software, some minor ring artifacts are visible in the iX images, but not in the TrueBeam images. 60 Chapter 4 Scans and results The scan methods and image reconstruction software described in the previous chapters have been used to perform several 4D CBCT scans on both the iX and TrueBeam units at Vancouver Cancer Center. This chapter presents a represen- tative sample of the resulting images. In most cases the object being imaged has been a Catphan 504 phantom [79]. This was chosen because it is a standard CT quality assurance phantom, and contains a variety of structures that are useful for evaluating image quality. It is also small enough to fit in the full-fan field of view, and to sit on the motion platform used in the 4D scans (described in Section 4.2). Before reviewing 4D scan results, some 3D scans are used to check that the image reconstruction software provides adequate image quality. 4.1 3D scans A large number of 3D CBCT scans have been taken during the development of the image reconstruction software. Figures 4.1, 4.2 and 4.3 show three repre- sentative examples: half-fan and full-fan scans on an iX unit and a full-fan scan on the TrueBeam unit. These figures show axial slices from two sections of the phantom: the sensitometry module (CTP404) containing inserts of various ma- terials (see Table 3.1), and the line-pair module (CTP528). They also compare images reconstructed with the in-house software developed for this project with images reconstructed by the Varian CBCT reconstructor, to demonstrate that the quality is reasonable. 61 Table 4.1: Properties of 3D image reconstruction examples shown in this section. The ranges of noise values are measured from several regions within the phantom’s uniformity module (CTP486). The half-fan scan was done with a tube current of 32 mA rather than the default of 20 mA in order to reduce noise. The Varian filter and ring suppression settings are defaults for these modes. Scan iX iX TrueBeam half-fan full-fan full-fan CBCT mode Low-dose thorax High-quality Head (32 mA) head CTDIW (mGy) 7.5 19 2.8 Shown in Figure 4.1 Figure 4.2 Figure 4.3 Grid spacing in x and y 0.88 mm 0.49 mm 0.51 mm Grid spacing in z 1 mm 1 mm 2 mm Project reconstruction Lateral rebin factor 4 2 2 Longitudinal rebin factor 4 4 6 Low-pass filter No No Yes Noise (HU) 11-12 27-31 21-28 Varian reconstruction Filter Standard Sharp Auto Ring suppression Medium Medium Medium Noise (HU) 9-12 27-31 25-28 Table 4.1 summarizes the scan and reconstruction parameters. The rebinning factors and use of low-pass filter significantly affect the noise level in an image. For example, the iX high-quality head mode used here delivers low noise by using high mAs settings: 5 times higher than the TrueBeam head mode1. However, the iX and TrueBeam images reconstructed here have similar noise, due to the use of the low-pass filter and a larger rebinning factor for the TrueBeam scan. The parameters used here have been chosen to give similar noise levels to the Varian images. The reconstruction grid spacing is also the same. Note that the grid coordinate system is square to the unit and these scans are always done with the couch 1This is the main reason why its CTDIW is much higher than the TrueBeam head mode. The TrueBeam’s Ti filter also reduces dose; in addition differences in tube design may affect dose. 62 Inserts, in−house image Line pairs, in−house image Inserts, Varian image Line pairs, Varian image Figure 4.1: iX half-fan scan, reconstructed axial slices in insert and line-pair modules (top), and the same slices reconstructed by the Varian software (bot- tom). Each image is 26×26 cm, window width 1200, level 300. The horizontal line through the center of the image is an artifact which probably originates in the half-fan projection image expansion described in Section 3.1: in practice a discontinuity is seen at the boundary between original and re-sorted data, which propagates into the backprojections. Also note the Varian images are brighter: their CT numbers are significantly higher (by over 100 HU), but this appears to be a calibration problem in the Varian images. As described below, the CT number value scale in the upper images has been measured and verified to be accurate. 63 Inserts, in−house image Line pairs, in−house image Inserts, Varian image Line pairs, Varian image Figure 4.2: iX full-fan scan, reconstructed axial slices in insert and line-pair modules (top), and the same slices reconstructed by the Varian software (bottom). Each image is 25×25 cm, window width 1200, level 300. 64 Inserts, in−house image Line pairs, in−house image Inserts, Varian image Line pairs, Varian image Figure 4.3: TrueBeam full-fan scan, reconstructed axial slices in insert and line- pair modules (top), and the same slices reconstructed by the Varian software (bottom). Each image is 26×26 cm, window width 1200, level 300. Some dark smears are visible in both line-pair images but are less prevalent in the Varian image. 65 rotation at 0◦. For a headfirst supine patient, the grid x direction is right-left, y is anterior-posterior and z is inferior-superior. Overall, the image quality is comparable to the Varian reconstructions, and good enough to distinguish the features in the phantom clearly. (What flaws there are will generally be overshadowed by the streak artifacts and higher noise encountered when moving to 4D imaging.) The images cannot be expected to be exactly the same as the Varian images, since the reconstruction procedures have several differences. The details of the Varian reconstruction software are not all known, but the rebinning and filtering may well be somewhat different. The iX does not use a simple air normalization method. The TrueBeam applies scatter correction, and both iX and TrueBeam apply some sort of beam-hardening correction, neither of which are in this project’s software. The Varian software also applies ring suppression by default; this project’s software has none. In Figure 4.2, some rings are visible in the top images, but not in the Varian images (although those appear to contain circular ripples). The TrueBeam images do not show noticeable rings. The Varian full-fan scans show arc-shaped artifacts around the boundary between the inner and outer parts of the phantom. In Figure 4.2, there is a darker arc on the left and a lighter arc on the right; in Figure 4.3 the sides are reversed. This kind of artifact has also been called a “dinner-plate” artifact due to its appearance. It was mentioned at the end of Section 3.2 and does not appear in images from this project’s software. One other visible difference in the two full-fan scans is that the Varian images show less contrast between the inner part of the phantom (the inner cylinder, 15 cm in diameter) and the outer ring (2.5 cm thick). In the Varian images, the difference in CT number between inner and outer parts is estimated to be about 70 and 90 HU for the TrueBeam and iX scans respectively. In the in-house images the differences are about 190 and 240 HU. Nominal CT number values are not available for these bulk plastic regions, so it is not clear which images are more accurate. However, the values of the sensitometry inserts can be measured and compared to their nominal values (given in Table 3.1). In all three scans, all values are within 50 HU of nominal. The Varian OBI specification for CT number accuracy is ±40 HU [65] so this result seems reasonable (keep in mind 66 −1000 −500 0 500 1000 −1000 −500 0 500 1000 Nominal CT number (HU) M ea su re d CT  n um be r ( HU ) Figure 4.4: Measured CT number values for the eight sensitometry inserts in the TrueBeam scan shown in Figure 4.3, vs. nominal values. (The materials are listed in Table 3.1.) The red line represents measured = nominal. The furthest off is the Delrin insert (the second-highest), which is 28 HU above nominal. The calibration process does not provide uncertainties on the measured values, which in any case may be systematically affected by beam hardening and scatter, depending on the object being imaged. CBCT is not intended for high-precision CT number measurements). Figure 4.4 shows the comparison for the TrueBeam image. In half-fan scan images produced by the in-house software, there is an artifact consisting of lines going through the center of the image (see Figure 4.1). This is caused by a step-like discontinuity in the expanded projection images, where the original data columns border the “re-sorted” columns. The discontinuity seems to be caused by the detector response increasing a few per cent over the course of the scan. The projection images can be artificially altered to smooth the step but a fully satisfactory fix has not been found; it is not known how the Varian software deals with this problem. The change in response is steepest at the beginning of the scan, so this artifact could be reduced by extending the scan 67 range beyond 360◦ and dropping the first few projections. The spatial resolution in the images, evaluated using the line-pair module, is similar in the in-house and Varian images. To evaluate the resolution, a CT number profile is taken along a circular path through the line pairs, which show up as peaks in this profile. Here, a cluster of lines is considered to resolved if the valleys between peaks are less than half the peak height. For the iX full-fan scan, both in-house and Varian images resolve 7 line pairs per cm (lp/cm). For the iX half-fan scan, they both resolve 3 lp/cm (lower resolution is expected for this scan since the grid spacing is larger — see Table 4.1). For the TrueBeam full-fan scan, the in-house image resolves 4 lp/cm and the Varian image resolves 5 lp/cm. The similar performance by the two reconstruction methods is to be expected, since the same grid spacing is used, and the in-house reconstruction parameters were chosen to give comparable noise levels. 4.2 4D scans For 4D scans, the phantom is placed on a motion platform which moves it con- tinuously during the scan. The platform was built previously and is used in the department for various other tasks as well. It uses an electric motor to drive a flat platform back and forth along a linear (one-dimensional) path. The position along this line is sinusoidal in time. This is intended to be a simple approxi- mation of the superior-inferior diaphragm motion found in respiration. There is also a smaller second platform which moves up and down in synchronization with the main platform; this mimics abdominal motion and the RPM marker block is placed on it. Figure 4.5 shows the motion platform with the phantom and marker block positioned on it. Both the amplitude and period of the platform can be adjusted to some extent. The peak-to-peak amplitude can be set as high as 4 cm, but that is much larger than typical lung tumor motions. The amplitude is set to 2 cm instead, which is at the upper end of realistic values. A fairly large value is needed to make sure that trajectory measurement algorithms (see Chapter 5) can be thoroughly tested. The motor has two speed settings; the exact period depends on the amplitude and load weight. Based on experience with lung patients, choosing a period between about 3 and 4 seconds is fairly realistic. 68 Figure 4.5: The Catphan 504 phantom set up on the motion platform, on the TrueBeam unit. As shown, the platform is set up square to the couch, so the phantom will move only in the superior-inferior direction. The RPM marker block is sitting on a separate plate which moves anterior-posterior. The gantry is at 0◦; the linac head is visible above the phantom and the kV source is to the left (the full-fan bowtie filter is in position and visible). One of the alignment lasers can also be seen on the wall. In Figure 4.5 the platform is aligned square to the couch, but in the scans presented below the platform is rotated about the vertical axis by several degrees2, relative to the couch. This gives the phantom a small component of left-right motion3, which is useful as an additional quantity to analyze in the 4D images. The phantom itself remains square to the couch, to keep the slice images easy to interpret. Several 4D scans have been performed using this setup. Most have been 2Various values of this rotation angle can be chosen. The scans presented below use either 11◦ or 18◦. 3For 11◦ and 18◦ rotations, the left-right component is about 4 and 6 mm respectively. 69 Table 4.2: Properties of 4D scans presented in this section. The three TrueBeam scans were done during the same session: the platform and phantom setup was identical for each. (TrueBeam scans with a large number of projections must be broken up into several parts to avoid a memory error — see Section 2.4.2 — the scan duration for scans C and D does not include the extra time associated with this.) CTDIW values are estimated by scaling the respective clinical-mode values from the Varian documentation (see Table 2.1) by the relative number of projections and mAs per projection. Scan label A B C D Unit iX TrueBeam TrueBeam TrueBeam Current (mA) 80 60 10 30 Pulse length (ms) 25 20 20 20 mAs per projection (mAs) 2.0 1.2 0.2 0.6 Gantry rotation speed 6◦/s 3◦/s 1.5◦/s 1.5◦/s Scan duration (s) 33 67 133 133 Number of projections 368 734 1465 1466 CTDIW (mGy) 19 17 6 17 Platform period (s) 2.2 3.6 3.6 3.6 Angular spacing A 13◦ 11◦ 5.4◦ 5.4◦ Platform rotation angle 18◦ 11◦ 11◦ 11◦ done on the TrueBeam unit, since the gantry rotation speed cannot currently be adjusted on the iX units. Four scans with a representative range of parameters are presented here: they are listed in Table 4.2 and labeled A through D. All are full-fan scans done at 100 kVp; they are based on the iX high-quality head mode and TrueBeam head mode. In all cases the platform motion amplitude is 2 cm. For the one iX scan (A) the platform is set to a faster period, to compensate partially for the full-speed gantry rotation. Scan D should give the best image quality, as it has the slowest gantry rotation speed and high mAs. Scan C is the same as scan D but with one-third the dose; scan B has the same dose as scan D but with twice the gantry speed. (Note that scan A, done in a clinical 3D mode on the iX, actually has a higher dose than the three 4D-specific scans, due to its high mAs setting and the generally higher doses on the iX.) The costs of higher image quality should be kept in mind: slower gantry speeds give longer scan times, and lower noise requires higher dose. 70 Without low−pass filter With low−pass filter Figure 4.6: An axial slice from phase 1 of scan D, reconstructed with and without the low-pass filter. The flat object underneath the phantom is the plastic platform piece on which it sits. Many streak artifacts can be seen: the most noticeable ones are emanating from parts of the platform outside the FOV. The filter significantly reduces noise, but the streaks are not noise and are not reduced. Window width 1200, level 300. Ten phases are used for 4D image reconstruction. This number is somewhat arbitrary but is commonly used, and is large enough to characterize the shape of the motion’s time dependence. With a peak-to-peak amplitude of 2 cm, it gives residual motion4 within the mid-inhale bins of at most 6 mm. Using more phases would reduce the residual motion, but would also reduce the signal:noise ratio in each phase image. As mentioned in Section 3.6, with ten bins phase 1 is “end-expiration” (i.e. when the platform is at the superior end of its movement range) and phase 6 is “end-inspiration” (at the inferior end). Images are reconstructed on a grid with spacing 0.5 mm in x and y, and 1 mm in z, for high spatial resolution. The low-pass filter is not used: sharper images seem to make it easier to distinguish streak artifacts from genuine structures, although this is a subjective judgment. Figure 4.6 illustrates the effect of the low-pass filter. 4Since each bin lasts for a finite time, projections in that bin will see the a moving object at slightly different positions. So the object will appear somewhat blurred in the phase image. 71 Figures 4.7 and 4.8 show a 4D reconstruction of scan D. Streak artifacts are prominently visible in the axial slices. They also appear in the coronal slices as parallel streaks tilted at a few degrees relative to the phantom. This is because the strongest streaks are emanating from parts of the platform, which is tilted here at 11◦ relative to the phantom. Without the platform present the image quality would probably improve: compare these images (A = 5.4◦) with the 6.4◦ image in Figure 2.4. In a clinical scan on a patient the platform would not be present, and the couch has relatively low density so it should not cause nearly as much streaking. However any large transition in CT number will cause some amount of streaking, e.g. bone in real patient images. The effects of gantry speed and mAs settings on image quality are shown in Figures 4.9 and 4.10. In scans A5 and B, which have faster gantry rotation, the streak artifacts are more pronounced, as expected. Scans C and D have the same gantry speed of 1.5◦/s, but the mAs (and dose) is three times lower in scan C. This results in higher noise — the noise in scan C (as measured in the phantom’s uniformity module) is around 1.7 times higher than in scan D, although the streak artifacts may be affecting this measurement. 5Scan A has an additional complication due to the lack of RPM-imager timestamp synchro- nization on the iX, described in Section 2.2. The timestamp offset for scan A was misestimated by a fraction of a second (about 1.5 phase bins): as a result the superior end of the platform motion does not occur in phase 1 but in phases 9-10. 72 Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 8 Phase 9 Figure 4.7: An axial slice in nine of the phase images from scan D. Phase 10 is not shown to save space; it is very similar to phase 2. In phase 6 the phantom has moved far enough inferior that the inserts have moved out of this slice. In phases 5 and 7 this slice is right at the end of the inserts; they appear dim due to blurring from residual motion in the phase bins. (The inserts are 25 mm long and 13 mm in diameter.) There are a few mm of left-right motion as well but it is not large enough to be obvious here. Window width 1200, level 300. 73 Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase 6 Phase 7 Phase 8 Phase 9 Figure 4.8: A coronal slice in nine of the phase images from scan D. Phase 10 is not shown to save space; it is very similar to phase 2. This slice passes through the air and Teflon inserts: these are clearly visible and the PMP is also visible to a lesser extent (it has less contrast with the surrounding material). The red dot at the center of each image represents the projection of the isocenter into this slice. Comparing the dot to the air insert, the roughly 2 cm superior-inferior motion is evident through the phases and the left-right motion can also be discerned. The superior end of the phantom can also be seen. In several phases the ends of the inserts are slightly blurred: this is due to residual motion within each phase bin. Window width 1200, level 300. 74 Scan A: 6°/s Scan B: 3°/s Scan C: 1.5°/s Scan D: 1.5°/s Figure 4.9: An axial slice through the phantom’s sensitometry inserts in phase 1, for four 4D scans. In all cases the air and Teflon inserts are clearly visible, but the visibility of the other inserts varies. Scans C and D differ only in mAs; scans B and D differ in gantry speed but not total mAs. Window width 1200, level 300. 75 Scan A: 6°/s Scan B: 3°/s Scan C: 1.5°/s Scan D: 1.5°/s Figure 4.10: An axial slice through the phantom’s line-pair module in phase 1, for four 4D scans. Scans C and D differ only in mAs; scans B and D differ in gantry speed but not total mAs. Image quality is noticeably better in scans C and D. Window width 1200, level 300. 76 Chapter 5 Trajectory measurement The previous chapter presented the results of four 4D CBCT scans taken with different gantry rotation speeds and mAs values. The resulting images have different levels of streaking and noise. In general, the two main tradeoffs for 4D CBCT image quality are that reduced streaking requires slower gantry speed (hence longer scan duration), and reduced noise requires higher dose. The actual requirements for 4D CBCT image quality will depend on the application for which it is used. One application, mentioned in Section 1.6.1, is making daily measurements of a tumor’s trajectory over the respiratory cycle, to verify than the plan remains valid over the course of treatment. This chapter presents two image registration algorithms which are used to automate the measurement of a tumor trajectory. While it would be possible to measure the trajectory manually by contouring the tumor in each phase image, this would be excessively time consuming given the typical number of phases used (around ten). The algorithms presented here only require contouring on one phase. Automation can also reduce the effect of subjective judgements made when drawing contours. Applying these algorithms to the 4D images provides a way to evaluate the image quality quantitatively: the performance of the algorithms can be compared between images with different gantry speeds and mAs values. This process is applied below to the four 4D CBCT scans presented in Chapter 4, to measure the trajectory of the Teflon insert. To demonstrate their use on real patient data, the algorithms are also applied to some 4D CT images of lung cancer patients at BCCA Vancouver Cancer Centre. 77 5.1 Measurement algorithms Given two different images of an object, image registration is a procedure for determining a spatial transform which matches points in one image to the cor- responding physical points in the other. Image registration is widely used in medicine, for example to fuse images acquired with different modalities (e.g. PET-CT or MRI-CT). Another use is to align images acquired at different times, with the patient in different positions. For example, when aligning a patient before external beam radiation treatment, image registration can be applied be- tween the setup CBCT and the planning CT, to determine what couch moves are required to bring the patient into the correct position for treatment. In the case of tumor trajectory measurement, image registration is performed between phase images in a 4D image. One phase is chosen as the reference phase, and registration is done between the reference phase image and each other phase image. The displacement of the tumor in each phase, relative to the reference phase, can then be determined. Note that the tumor’s absolute position (relative to the isocenter) could also be measured in each phase. However, in an actual treatment the absolute position should be adjusted to match the plan, as part of the patient setup procedure. So, the measurements presented here are all dis- placements relative to the reference phase. The “end-expiration” phase (labelled phase number 1 here, as defined in Section 4.2) is chosen to be the reference phase. It is expected to be more stable and reproducible than the end-inspiration phase in real patients. Two registration algorithms have been implemented and used for this project. The simpler one is a rigid translation, and the more complex one is a deformation using B-splines. In the 4D CBCT scans performed in this project, the phantom is a rigid body, so the rigid translation algorithm should be sufficient to model the motion accurately. However, in the case of real tumors, the ability to model deformation may be valuable. The use of both rigid and deformable registra- tion on 4D CT lung images has been reported in the literature, for example in References [94, 95]. Both algorithms have been implemented using the ITK library [96], a widely used open-source library for image processing, registration and segmentation. A command-line application called defreg has been written in C++ to perform 78 the registration; instructions for use are given in Appendix A.4 and more details about the source code are listed in Appendix B.2. The ITK registration framework is described in detail in Chapter 8 of the software guide [96]. Implementing a particular registration algorithm involves using several components which are available as classes in the ITK library. The most relevant components for this project include: • A type of transformation. The two types used here are a rigid translation and a B-spline deformation. The rigid translation displaces every point in the image by the same 3D vector — it has only 3 parameters: the displacements in the left-right (LR), anterior-posterior (AP) and superior- inferior (SI) directions. The B-spline deformation is more complex, has more parameters and is described below. • A metric to evaluate how well the images match for a given set of transform parameters. In ITK terminology, the two images to be registered are called the fixed image and the moving image. Given two images and a particular set of transform parameters, the ITK framework applies the transform to the grid points from the fixed image. It then compares the (interpolated) moving image values at those mapped points to the fixed image values using the metric. Here, for the translation transform a mean-squares metric is used, which simply computes the mean square difference in voxel CT num- ber between the two. For the B-spline deformation, a mutual-information metric is used, which analyzes the joint distribution of CT numbers in the two images. The ITK implementation is based on Mattes et al. [97], who used this metric with B-spline deformation for PET-CT registration in the chest. • An optimization method. Registration is an optimization problem: the optimum set of transformation parameters is the one which minimizes the metric value (or maximizes it, depending on the metric definition). For the translation transform, a gradient-descent optimizer is used. For the B- spline deformation, a limited-memory Broyden-Fletcher-Goldfarb-Shanno (BFGS) optimization is used, which is suitable for the large number of parameters involved. Both of these choices are based on ITK example code. 79 Another important aspect of the registration algorithms here is that they are only applied to a limited region of interest (ROI) immediately surrounding the tumor. Compared to registering the entire image, this greatly reduces the computational effort required. With the rigid translation algorithm, this is also necessary when registering nonrigid objects such as patients, where different re- gions of the image may move differently. It may be reasonable to approximate a small object (e.g. the tumor) as being rigid, but other nearby objects with different movement patterns (e.g. chest wall) will interfere with the registration unless they are excluded. How large an ROI to choose is a question to be inves- tigated. It should probably be somewhat larger than the object to be tracked, so that it includes the boundary between the object and the surrounding material. The ROI has a rectangular box shape, and is defined with respect to the fixed (reference phase) image. In the B-spline deformation, a rectangular grid of control points is defined across the ROI. The number of points in the grid is an option to be selected. For example, choosing 3 control points across the ROI (call this number NCROI) gives a point on each edge of the ROI and a point exactly in the middle. The B-spline that will be generated is cubic, which requires 3 additional points outside the ROI: one on one side and two on the other. This is illustrated in Figure 5.1. The total number of control points is therefore ( NCROI + 3 )3 . Each control point has 3 parameters associated with it, which correspond to displacement magnitudes in three dimensions. The total number of parameters is therefore quite large1, e.g. 648 for NCROI = 3. The three-dimensional displacement of any point in the ROI is given by a cubic B-spline interpolation using these parameters. Being a cubic spline, the overall deformation field is smooth in the sense that it is continuous, and so are its first and second derivatives. Note that there are no physical constraints imposed (i.e. on point density or on points getting moved past each other) so if the registration fails and the parameters are bad, the deformation can have a totally unphysical appearance. In the case of rigid translation, the tumor displacement in a given phase (call it phase n) is straightforward to define: it is simply the 3D displacement from the reference phase to phase n. In the deformable case however, different points 1Increasing the number of control points will give a finer grid and allow for steeper variations in the deformation field, but will greatly increase the number of parameters. 80 R L S I Figure 5.1: Registering two phases of a 4D image. This is a coronal slice from scan D through the Teflon and PMP inserts. The images from phase 1 (purple) and phase 6 (green) are superimposed. From phase 1 to phase 6, the Teflon insert, along with the rest of the phantom, moves inferior (about 19 mm) and right (about 4 mm). The registration process should therefore output transformation parameters which move points inferior and right by these amounts. The blue rectangle is an example of an ROI which has been defined by adding a 5 mm margin around the Teflon insert in phase 1 (the reference phase). The red dots indicate the control points for the B-spline when NCROI = 3. Window width 1200, level 300. in the tumor volume can move by different amounts, so a method for quantifying the movement of the tumor as a whole is needed. This is done here by averaging the displacement of points on its surface. First, the tumor is contoured in the reference phase image using the Eclipse treatment planning system (with window level 300, width 1200). This produces a cloud of a few hundred points covering the surface of the tumor. The points are not strictly evenly spaced but this should not affect the measurement significantly. Using the results of the deformable registration, the displacement of each of these points in phase n is calculated2. 2This calculation is done in defreg. Note that in principle the individual point displacements could be used to analyze interphase changes in the tumor’s shape and size, but this is not 81 Then the average of all the point displacements is used as a representative measure of the tumor displacement in phase n. Note that the choice of contours does not affect the registration process. For the registration, the only subjective evaluation of the images is deciding where to place the edges of the ROI. For both algorithms, the general quality of the registration for phase n can be verified by superimposing the reference phase’s contour points mapped to phase n, onto the actual image from phase n. The mapped points should match the tumor’s new location. The execution time for each image registration depends strongly on the size of the ROI. For the results presented in the next two sections, the translation algo- rithm typically averages around 10-30 seconds on a 3 GHz Intel Core 2 Duo. The deformation algorithm has far more parameters to determine and takes longer, averaging around 60-200 seconds. There are several options to set when running the defreg program: • The size and location of the ROI, which has to be chosen based on the location of the tumor. For example, the maximum extent of the tumor in each direction could be measured, then expanded by some fixed margin (e.g. 5 or 10 mm), to define the ROI. • For rigid translation, the maximum step size for the optimizer. 5 mm is a reasonable value given the typical displacements used here. • For B-spline deformation: – NCROI , the number of control points across the ROI. Limiting this to 3 keeps the number of parameters reasonable. Note that reducing NCROI will make the deformation approach a rigid translation. – The number of histogram bins used in the mutual information calcu- lation. A default value of 50 is used based on ITK documentation. For the registration procedure to be practical, the options should have standard- ized default values, so they do not need to be adjusted for each 4D image. In the next section, the procedure is applied to the 4D CBCT images, and the results with some different values are considered. explored here. 82 5.2 Results on phantom 4D CBCT images The two measurement algorithms have been applied to the 4D scans presented in the previous chapter, both to test the algorithms and to investigate how the varying image qualities affect their performance. The Teflon insert is chosen as the object to be tracked because its size is comparable to typical tumors, and its contrast with the surrounding material makes it easily visible. The Teflon is nominally 990 HU, the surrounding material is about 100 HU. This contrast is probably somewhat higher than in a realistic lung tumor application, where the tumor may be around 0 HU and the surrounding lung tissue around -700 HU (these numbers are general estimates only). Note that the phantom used here is a rigid body, so it does not fully test the deformable registration’s capabilites. To compare the translation and deforma- tion algorithms thoroughly would require a phantom with an insert that deforms in a known manner. To quantify the accuracy of the registration algorithms, their output can be compared to the known trajectory of the motion platform. The peak-to-peak amplitude in all four scans was measured with a ruler to be 20 mm, with an esti- mated uncertainty of 0.5 mm. The rotation angle of the platform was estimated to be 18◦ in scan A, and 11◦ in the other three scans, with an uncertainty of 2◦. The MATLAB script idealDisplacements.m uses these values to calculate what the 3D displacement vector should be in each phase, and attempts to account for blurring in each bin due to residual motion. The AP component should always be zero. The uncertainties in the amplitude and angle limit how precisely the “true” trajectory is known. In phase 6, which has the largest displacement, the estimated uncertainty on the true displacement is about 0.5 mm SI and 0.7 mm RL. The uncertainty is proportionately smaller in the other phases. So in prac- tice, when comparing the displacement values from the registration algorithms, differences much less than about a millimeter are not significant. Scan D has the best image quality, so it has been used to determine the default option values for both algorithms. The following values give relatively good results for Scan D and are used as defaults: • Rigid translation: ROI defined with 5 mm margin around insert, maximum step size 5 mm. 83 1 2 3 4 5 6 7 8 9 10 −20 −18 −16 −14 −12 −10 −8 −6 −4 −2 0 Phase D is pl ac em en t (m m)   Trans RL Trans AP Trans SI Def RL Def AP Def SI Figure 5.2: 3D trajectory of Teflon insert in scan D, measured with translation and deformation algorithms using default option values. The gray bands represent the known trajectory, with estimated uncertainties. Negative displacement values correspond to right, anterior, inferior. • B-spline deformation: ROI defined with 10 mm margin around insert, NCROI = 3, 50 histogram bins. Figure 5.2 shows the trajectory measured using these options, and compares it to the known trajectory. Both algorithms recover the sinusoidal shape well, and the largest displacement is seen in phase 6 as expected. The translation algorithm results are slightly closer to the known trajectory — all thirty displacement values are within 0.7 mm of the known values, while the deformation algorithm measures them all within 1.1 mm. Given the uncertainty on the known values, most of these discrepancies are not significant, but some are of borderline significance, such as the phase 6 SI value from the deformation algorithm. (With measurements at this scale, it should also be kept in mind whether deviations below 1 mm would be considered clinically significant.) Figure 5.3 shows a slice from the phase 6 image (the same as in Figure 5.1), 84 Figure 5.3: A coronal slice through the Teflon and PMP inserts from phase 6 of scan D. Contour points originally contoured in the phase 1 image (blue) have been mapped to this phase using the results of the translation (green) and deformation (red) registrations. They now lie along the edge of the Teflon insert. Window width 1200, level 300. with mapped contour points superimposed. Both algorithms correctly map the phase 1 contour points to the new Teflon insert location, although the deformation algorithm seems to move them slightly closer together. Effects of registration algorithm option values Both algorithms have been re-run on Scan D with different option values to check how this affects the accuracy of the results. In some cases the accuracy deteriorates significantly. • For the translation algorithm, increasing the maximum step size to 20 mm step size gives very poor results in all phases, in some cases several cm off the known value. The large steps may be causing the optimization to “run away” in parameter space. • For the translation algorithm, increasing the margin used to define the ROI 85 from 5 to 10 mm caused a very poor result in one phase (about 2 cm off). • For the deformation algorithm, reducing the margin used to define the ROI from 10 to 5 mm gives slightly worse results, with two displacements being about 2 mm off. • For the deformation algorithm, increasing the number of control points (NCROI) is not recommended. With N C ROI = 5, the measured displacement is off by 2-3 mm in several phases, and the cylindrical shape of the contour becomes noticeably distorted in most phases. It also takes about twice as long to run. In this case the number of parameters increases to 1536 so it may not be surprising that the optimizer gets “lost” in parameter space. • For the deformation algorithm, increasing the number of histogram bins to 100 gives very similar results but takes twice as long to run. Reducing the number to 25 gives slightly worse results, with two displacements being over 1.5 mm off. Effect of reconstructing more phase bins Reconstructing a 4D image with more phase bins reduces the blurring due to residual motion in each phase image, at the expense of higher noise. Scan D has been reconstructed with 20 phases, and the trajectory measurements have been applied to the 20-phase 4D image. Using the default option values, the translation algorithm performs well and gives results not significantly different from in the 10-phase image. The deformation algorithm does not perform as well as with 10 phases: it fails in one phase (many cm off) and is about 1.5 mm off in several others. Effect of scanning with lower dose Scan C is the same as scan D but with one-third the dose and consequently higher noise. The translation algorithm gives similar results in the two scans: in terms of agreement with the known trajectory they are not significantly different. The deformation algorithm’s results are just slightly worse: four displacement values are off by more than 1 mm compared to one in scan D, but all are within 2 mm. 86 Scan C has also been reconstructed with the low-pass filter enabled to reduce noise. This reduces the measured noise by roughly a factor of two. For both algorithms, the performance with the filtered image is similar to the performance with the non-filtered image. Effects of faster gantry rotation speeds Scans A and B have faster gantry speeds (6◦/s and 3◦/s) than scan D, and consequently stronger streak artifacts. This degrades the performance of the translation algorithm but only slightly. In scan B, the LR displacement is over- estimated in most phases by about 1 mm (just at the level of significance). In scan A, three displacements are off by 1-1.5 mm. The performance of the deformation algorithm however deteriorates signifi- cantly. Both scans have several phases with significant distortion of the contour shape. In scan B two phases have displacements off by over 10 mm, and in scan A 5 phases have displacements off by more than 3 mm. Effect of lower object contrast After the Teflon insert, the next highest contrast in the phantom’s sensitom- etry module is the PMP insert, which is nominally -200 HU. If the surrounding material is 100 HU, the contrast is 300 HU, much smaller than the 800 HU con- trast for the Teflon. Both algorithms were applied to the PMP insert in the Scan D image, but gave very poor results in all phases. Discussion Both algorithms give good results in Scan D, the highest-quality image, pro- vided the options are set properly. Displacement values are correctly measured to within about 1 mm. The translation algorithm appears to be quite sensitive to the maximum step size, and the deformation algorithm is sensitive to the number of control points. Overall the rigid translation algorithm is more robust than the deformation algorithm when dealing with the lower-quality images. It is not significantly affected by the lower dose scan, so if patient dose is a concern, it seems that there is room to reduce the mAs settings. It also performs similarly if more phase bins are used. At faster gantry speeds, its performance deteriorates but only slightly, at the 1-2 mm level. Since the phantom is a rigid body, the superior 87 performance of this algorithm is not surprising, but it does lack the flexibility to model deforming anatomy. The B-spline deformation algorithm’s performance deteriorates slightly with higher noise or with more phase bins. It deteriorates significantly when the gantry speed increases from 1.5◦/s to 3◦/s. This suggests that gantry speed is the most important scan parameter affecting image quality for automated measurement. High contrast between the object to be tracked and its surroundings is also re- quired regardless of the relative image quality. 5.3 Results on patient 4D CT images Both trajectory measurement algorithms have also been applied to lung tumors in several 4D CT images of lung cancer patients at BCCA Vancouver Cancer Centre. These patients received the 4D CT scans as a standard part of the treatment planning process. The additional use of the images for the analysis described here was approved by the UBC-BCCA Research Ethics Board. The 4D CT images were acquired on a GE Lightspeed CT scanner equipped with a Varian RPM system. The 4D reconstruction was performed on a GE Advantage workstation [98]. Ten phase bins are used; the GE software labels them 0%, 10%, 20% . . . 90%, with 0% being end-inspiration. For consistency with the 4D CBCT results they will be referred to here as phases 1–10 with phase 1 being 50% and phase 6 being 0%. In addition to being images of actual patients, there are several differences between these images and the 4D CBCT phantom images from the previous sec- tion. First, the tumor motion amplitudes are small compared to the phantom motion: the largest is only about 6 mm peak-peak (the patients received abdom- inal compression during the scan to reduce motion). Second, the image quality is significantly better: there are no streak artifacts, as 4D CT image acquisition works differently than 4D CBCT (see 1.5). The grid spacing is however coarser: 0.7 mm in the transverse plane and 2.5 mm in z. Anonymized 4D images from six patients have been analyzed; two of them have very small tumor motion (less than 2 mm) and are not described here. The same procedures for image registration, tumor contouring and trajectory measurement are used as in the previous section. The options are set to the 88 2 4 6 8 10 −4 −2 0 2 4 Phase D is pl ac em en t (m m) Patient 1   RL AP SI 2 4 6 8 10 −4 −2 0 2 4 Phase Patient 5 Figure 5.4: 3D trajectory measurements on patients 1 and 5. Squares are results from the translation algorithm, circles are results from the B-spline deformation algorithm. Negative displacement values correspond to right, anterior, inferior. default values listed on page 84. Because of the different CT number levels involved, a different window is used for ROI selection and contouring: level 0, width 1000. As in the previous section, each measured trajectory consists of ten 3D dis- placement values, one for each phase. Figure 5.4 shows the trajectories for pa- tients 1 and 5, the cases with the largest tumor motions. It is interesting to note that the trajectory shapes can vary significantly between patients: in patients 1 and 6 the displacement is largest in the SI direction but in patients 3 and 5 it is largest in the AP direction. Also, the largest displacement does not always occur in phase 6. Physically this means that the point of maximum expiration is not exactly halfway in time between successive inspiration peaks, e.g. in patient 5 inspiration happens faster than expiration. Table 5.1 summarizes the measured trajectories. The translation and defor- mation algorithms give similar results. In patients 1 and 6 the two algorithms’ displacement values are within 0.2 mm of each other in all ten phases. In patients 3 and 5 they are within 0.5 mm and 0.8 mm respectively; note there is larger tumor motion in these two. 89 Table 5.1: Results of trajectory measurements on four lung tumors, using both algorithms. The peak-to-peak distances in each direction are the differences be- tween the maximum over ten phases and the minimum. The largest difference compares the two algorithms: it is the maximum over ten phases of the 3D dis- tance between the translation and deformation displacement. Patient number 1 3 5 6 Translation algorithm RL peak-peak distance (mm) 1.6 0.9 3.8 1.1 AP peak-peak distance (mm) 1.9 2.2 5.1 1.7 SI peak-peak distance (mm) 3.8 0.6 1.9 1.9 Deformation algorithm RL peak-peak distance (mm) 1.3 0.8 3.3 1.2 AP peak-peak distance (mm) 2.2 2.2 5.7 1.8 SI peak-peak distance (mm) 3.9 0.7 2.1 1.9 Largest difference (mm) 0.2 0.5 0.8 0.2 Figure 5.5 illustrates the mapping of contour points in each phase of the patient 5 image. Since the motion is smaller than in the phantom image in Figure 5.3, the effect is not as clear, but the process does visibly move the points to match the tumor. This has been verified in the other patient images as well. Considering this chapter’s results on patient 4D CT images and phantom 4D CBCT images, it can be expected that automated lung tumor trajectory measurement should be feasible with 4D CBCT, with accuracy on the order of 1 mm or better. If the deformation algorithm is used, it will require higher image quality than the rigid translation algorithm does: in particular the gantry rotation speed should be sufficiently slow. 90 Figure 5.5: Coronal slice images from all phases of the patient 5 4D image. Contour points drawn in the phase 1 image are shown in red. The points mapped using the results of the B-spline deformation registration are shown in green and follow the tumor’s movement. Window level 0, width 1000. 91 Chapter 6 Conclusion This thesis has presented the implementation of respiratory-correlated cone-beam CT imaging (4D CBCT) on Varian linacs, for use on phantoms. Chapter 1 introduced 4D CBCT and some of its potential clinical applications in the context of external beam radiotherapy. Chapter 2 described the methods that have been developed for this project for performing 4D CBCT scans on Varian iX and TrueBeam units. Chapter 3 described the image reconstruction process, and Chapter 4 presented the results of several 4D CBCT scans of a moving phantom. With any medical imaging modality, it is important to evaluate the image quality in the context of particular clinical applications. In Chapter 5, an automated method for measuring lung tumor trajectory was presented and applied to the 4D CBCT phantom images, in order to evaluate the effects of scan parameters on image quality. The scan procedures that have been developed for the iX and TrueBeam units result in 4D images which are generally clear enough to measure the motion of the phantom. As expected, the main issue with image quality is streak artifacts, which occur because of angular gaps between projections in each phase bin (de- scribed in Section 2.3). Decreasing the gantry rotation speed from its default value of 6◦/s reduces these artifacts considerably, but they are still visible at the slowest speed used (1.5◦/s). Slowing the gantry speed also increases the scan du- ration proportionately, which would have to be taken into consideration if done in a clinical setting. Streaks originate from boundaries between regions of different CT numbers, so the pattern of streaking will depend on the object being imaged: with patients the streaks may actually be less severe than with the phantom and 92 motion platform used here. The other major component of image quality is the signal:noise ratio. As in regular 3D CBCT scans, this can be improved by in- creasing the tube current and/or pulse length, at the cost of increased dose to the patient. On Varian CBCT systems there are two standard field of view sizes: roughly 26 cm diameter (head-sized) for full-fan and spotlight modes, and roughly 46 cm diameter (torso-sized) for half-fan modes. In this thesis, only the smaller FOV has been used for 4D scans. There are several reasons for this: the phantom being imaged is head-sized, the half-fan scan would take almost twice as long, and with 3D half-fan scans the images contain a noticeable discontinuity artifact (see Figure 4.1), which does not currently have a straightforward fix. The results in Chapter 5 show that using image registration to measure lung tumor trajectories in 4D CBCT images should be feasible. The two algorithms that have been developed, using rigid translation and B-spline deformation, are both able to “track” a Teflon insert in 4D CBCT images of the phantom, and a lung tumor in 4D CT images of real patients. In the 4D CBCT images, the image quality affects the accuracy of the trajectory measurements. In the highest- quality scan (gantry speed 1.5◦/s) the displacement in each phase is correctly measured within about 1 mm. In lower-quality scans with faster gantry speeds or higher noise, the performance deteriorates slightly for the translation algorithm, and significantly for the deformation algorithm. When applied to 4D CT patient images, the two algorithms give similar results. If the translation algorithm is sufficient for characterizing the motion of real tumors, then there should be a sizeable range of gantry speeds (up to perhaps 3◦/s) and dose values that give acceptable image quality for this application. Keep in mind that breathing period will also contribute to image quality, in the same way that gantry speed does (see Equation 2.4). The main results in this thesis are based on a period of 3.6 seconds, which is deemed to be a realistic typical value. 6.1 Issues for clinical implementation Based on the scans performed for this thesis, and the quality of the reconstructed images, 4D CBCT on Varian units could be considered for clinical use. There 93 are however several technical issues that would need to be addressed first, some of which would require collaboration with Varian. On the TrueBeam, Developer mode is not permitted for use on patients, while the clinical CBCT mode does not allow the gantry speed to be changed. Since reducing the gantry speed is almost essential for 4D CBCT, Varian’s assistance would be needed to enable this in clinical mode. It is also not certain whether the RPM system can be run continuously during a CBCT scan in clinical mode. On the iX, the technical challenges are greater, largely because the RPM system is separate from the imaging system. As described in Section 2.2, a means of recording the RPM and imager timestamps together would have to be developed. This would probably involve hardware modifications, such as running cables between the OBI system and RPM PC and/or adding an I/O card to the RPM PC. For that assistance from Varian would be needed. Also, as on the TrueBeam, the iX clinical CBCT mode does not allow the gantry speed to be changed. This may be possible through Service mode, but to be clinically practical, an interface in the clinical mode software would be required. On both the iX and TrueBeam, computer memory issues may arise if a 4D scan contains a large number of projections. This has been encountered already on the TrueBeam (see Section 2.4.2), where taking too many projections in one scan causes an out-of-memory error. It may be possible to correct the problem in software but again this would require Varian’s assistance. For imaging the lungs and other organs in the thorax and abdomen, the two possible CBCT geometries are spotlight and half-fan. The advantage of the spotlight geometry is faster scans: only a little over half the time of a half-fan scan. The disadvantage is a smaller diameter field of view. The tumor will probably still lie within this small FOV (unless it is very laterally located1), but a truncation correction is required in the image reconstruction software. Clinical use would require verifying that the truncation correction is working adequately. For half-fan scans on the other hand, a solution for the discontinuity artifact mentioned above would be needed. 1In most treatment plans the isocenter will be placed in or near the tumor. However, with lateral tumors this requires moving the couch laterally, and for the CBCT scan the couch cannot be shifted laterally more than a few cm, otherwise it will collide with the kV detector. So in this case the tumor may not be at the center of the FOV during the scan. 94 6.2 Potential improvements and future work The most obvious potential extension of this work is to implement it clinically as discussed above. There are other possible improvements that could be considered; some have been introduced in previous chapters but they will be summarized here. On the TrueBeam, reducing the imager frame rate from the present 11 fps should be possible according to the documentation, although it is not currently working. The benefit of this would be fewer projection images to handle, and hence faster image reconstruction. It would also mitigate the out-of-memory problem encountered in Developer mode, allowing a larger fraction of each scan to be done before reaching the memory limit. Of course, raising the memory limit would also be very useful, but that depends on Varian. Imaging with gantry speeds slower than 1.5◦/s would further reduce streaking artifacts, but the scan would take even longer (the 1.5◦/s scan takes 130 seconds, or 240 seconds for half-fan). For the trajectory measurement application pre- sented in this thesis, 1.5◦/s seems to be adequate, but if other applications of 4D CBCT are investigated, the higher image quality may be preferable. Further work could be done on imaging torso-sized objects. This project used a head-sized phantom, with full-fan scan geometry. Torso-sized objects will require either spotlight or half-fan geometry. For half-fan scans, a method for removing the discontinuity artifact is needed, while for spotlight scans the trun- cation correction algorithm needs to be tested and may need improvement. There are several other potential improvements to the image reconstruction process, de- scribed in Section 3.7, which include ring artifact removal and beam hardening and scatter corrections. The 4D-specific image reconstruction techniques men- tioned in Section 1.6 could also be investigated. If the breathing pattern is irregular (i.e. varies from one cycle to the next), then amplitude binning should be investigated as an alternative to phase binning. While more care is needed to define the amplitude bins, it may provide better image quality. Finally, the methods for tumor trajectory measurement could be developed further. If a phantom with a deformable insert was available, the performance of the deformable image registration algorithm could be more fully tested. With the Catphan 504 phantom, the rigid translation algorithm produced better results, 95 but if the object being imaged does deform, the deformation algorithm may turn out to be preferable. On the other hand, if patients are imaged, the performance of both algorithms could be evaluated by comparing their results to manual con- tours created by a physician on each phase image. (Such a comparison between a physician’s contours and the algorithms’ output could be performed on 4D CT images, 4D CBCT images or both.) Whether deformable phantoms or patients are imaged, further work could be done on optimizing the algorithm parameters, for example how large a margin to use to define the registration region of interest. Motion management, 4D imaging and cone-beam CT continue to receive sub- stantial attention in medical physics literature and conferences. The technical aspects of 4D cone-beam CT can be addressed; if applications emerge then it may become a regularly used tool in the clinic. 96 Bibliography [1] National Cancer Institute, Radiation therapy Fact Sheet, http://www. cancer.gov/cancertopics/factsheet/therapy/radiation (2010). → pages 1 [2] D.I. Thwaites and J.B. Tuohy, “Back to the future: the history and devel- opment of the clinical linear accelerator”, Phys Med Biol 51 R343 (2006). → pages 2 [3] L.B. Marks et al.(editors), “Quantitative Analyses of Normal Tissue Effects in the Clinic”, Int J Radiat Oncol Biol Phys 76 S1-S160 supplement (2010). → pages 4 [4] M. Guckenberger et al., “Dose-response relationship for image-guided stereotactic body radiotherapy of pulmonary tumors: relevance of 4D dose calculation”, Int J Radiat Oncol Biol Phys 74 47 (2009). → pages 4 [5] J.P. Kirkpatrick et al., “Radiation dose-volume effects in the spinal cord”, Int J Radiat Oncol Biol Phys 76 S42-S49 (2010). → pages 5 [6] International Commission on Radiation Units and Measurements, Prescrib- ing, Recording, and Reporting Photon Beam Therapy, ICRU Report 50 (1993). → pages 6 [7] International Commission on Radiation Units and Measurements, Prescrib- ing, Recording, and Reporting Photon Beam Therapy (supplement to ICRU Report 50), ICRU Report 62 (1999). → pages 6 [8] F.M. Khan, The Physics of Radiation Therapy, Fourth Edition, pp 194-9. Lippincott Williams and Wilkins (2010). → pages 6 97 [9] J.L. Prince and J.M. Links, Medical Imaging Signals and Systems, Pearson Prentice Hall (2006). → pages 10, 52 [10] L. Xing et al., “Overview of image-guided radiation therapy”, Med Dosim 31 91 (2006). → pages 11 [11] C. Greco and C. Ling, “Broadening the scope of Image-Guided Radiother- apy (IGRT)”, Acta Oncol 47 1193 (2008). → pages 13 [12] A. Martin and A. Gaya, “Stereotactic Body Radiotherapy: A Review”, Clin Oncol 22 157 (2010). → pages 13 [13] TomoTherapy system, Accuray, Sunnyvale CA. → pages 13 [14] O. Gayou et al., “Patient dose and image quality from mega-voltage cone beam computed tomography imaging”, Med Phys 34 499 (2007). → pages 14 [15] J. Sonke et al., “Variability of four-dimensional compuated tomography patient models”, Int J Radiat Oncol Biol Phys 70 590 (2008). → pages 16, 26 [16] H. Ikushima et al., “Daily alignment results of in-room computed tomography-guided stereotactic body radiation therapy for lung cancer”, Int J Radiat Oncol Biol Phys 79 473 (2011). → pages 16 [17] P. Keall et al., “The management of respiratory motion in radiation oncol- ogy report of AAPM Task Group 76”, Med Phys 33 3874 (2006). → pages 16 [18] , J.H. Heinzerling et al., “Four-Dimensional Computed Tomography Scan Analysis of Tumor and Organ Motion at Varying Levels of Abdominal Com- pression During Stereotactic Treatment of Lung and Liver”, Int J Radiat Oncol Biol Phys 70 1571 (2008). → pages 16 [19] Canadian Cancer Society, Canadian Cancer Statistics 2010 (2010).→ pages 16 [20] American Cancer Society, Cancer Facts & Figures 2010 (2010). → pages 16 98 [21] Y. Seppenwoolde et al., “Precise and real-time measurement of 3D tumor motion in lung due to breathing and heartbeat, measured during radiother- apy”, Int J Radiat Oncol Biol Phys 53 822 (2002). → pages 16 [22] P. Keall, “4-Dimensional Computed Tomography Imaging and Treatment Planning”, Semin Rad Oncol 81 (2004). → pages 16 [23] E. Rietzel et al., “Four-dimensional computed tomography: Image forma- tion and clinical protocol”, Med Phys 32 874 (2005). → pages 16 [24] Varian Medical Systems, RPM respiratory gating system reference guide, Version 1.7 (2010). → pages 17, 35 [25] H. Hof et al., “4D-CT-based target volume definition in stereotactic radio- therapy of lung tumours: Comparison with a conventional technique using individual margins”, Radiother Oncol 93 419 (2009). → pages 17, 21 [26] J. Sonke et al., “Respiratory correlated cone beam CT”, Med Phys 32 1176 (2005). → pages 17, 24 [27] T.G. Purdie et al., “Respiration correlated cone-beam computed tomogra- phy and 4DCT for evaluating target motion in Stereotactic Lung Radiation Therapy”, Acta Oncol 45 915 (2006). → pages 17, 26 [28] A.F. Abdelnour et al., “Phase and amplitude binning for 4D-CT imaging”, Phys Med Biol 52 3515 (2007). → pages 19 [29] F. Khan et al., “The use of 4DCT to reduce lung dose: a dosimetric analy- sis”, Med Dosim 34 273 (2009). → pages 20 [30] J.D. Bradley et al., “Comparison of helical, maximum intensity projection (MIP), and averaged intensity (AI) 4D CT imaging for stereotactic body radiation therapy (SBRT) planning in lung cancer”, Radiother Oncol 81 264 (2006). → pages 21 [31] E. Rietzel et al., “Design of 4D treatment planning target volumes”, Int J Radiat Oncol Biol Phys 66 287 (2006). → pages 21 99 [32] J.W.H. Wolthaus et al., “Comparison of different strategies to use four- dimensional computed tomography in treatment planning for lung cancer patients”, Int J Radiat Oncol Biol Phys 70 1229 (2008). → pages 21, 22 [33] R. Colgan et al., “Planning lung radiotherapy using 4D CT data and a motion model”, Phys Med Biol 53 5815 (2008). → pages 21 [34] M. Englesman et al., “How much margin reduction is possible through gat- ing or breath hold?”, Phys Med Biol 50 477 (2005). → pages 22 [35] B. Zhao et al., “Image-guided respiratory-gated lung stereotactic body ra- diotherapy: Which target definition is optimal?”, Med Phys 36 2248 (2009). → pages 22 [36] E. Chin and K. Otto, “Investigation of a novel algorithm for true 4D-VMAT planning with comparison to tracked, gated and static delivery”, Med Phys 38 2698 (2011). → pages 22 [37] B. Guo et al., “Real time 4D IMRT treatment planning based on a dynamic virtual patient model: Proof of concept”, Med Phys 38 2639 (2011). → pages 22 [38] A.S. Beddar et al., “Correlation between internal fiducial tumor motion and external marker motion for liver tumors imaged with 4D-CT”, Int J Radiat Oncol Biol Phys 67 630 (2007). → pages 23 [39] T. Li et al., “Four-dimensional cone-beam computed tomography using an on-board imager”, Med Phys 33 3825 (2006). → pages 23 [40] T. Li and L. Xing, “Optimizing 4D cone-beam CT acquisition protocol for external beam radiotherapy”, Int J Radiat Oncol Biol Phys 67 1211 (2007). → pages 23 [41] J. Lu et al., “Four-dimensional cone beam CT with adaptive gantry rotation and adaptive data sampling”, Med Phys 34 3520 (2007). → pages 24, 36 [42] Elekta press release, “Elekta Introduces Next Generation SBRT for Lung Cancer with Ground-Breaking 4D Image Guidance to Manage Tumor Mo- tion and Enhance Safety”, http://www.elekta.com/healthcare international press release 20070932.php (2010). → pages 24 100 [43] J.C. Park et al., “Four-dimensional cone-beam computed tomography and digital tomosynthesis reconstructions using respiratory signals extracted from transcutaneously inserted metal markers for liver SBRT”, Med Phys 38 1028 (2011). → pages 24 [44] T. Li et al., “Enhanced 4D cone-beam CT with inter-phase motion model”, Med Phys 34 3688 (2007). → pages 24 [45] Q. Zhang et al., “Correction of motion artifacts in cone-beam CT using a patient-specific respiratory motion model”, Med Phys 37 2901 (2010). → pages 24 [46] S. Leng et al., “Streaking artifacts reduction in four-dimensional cone-beam computed tomography”, Med Phys 35 4649 (2008). → pages 24 [47] S. Leng et al., “High temporal resolution and streak-free four-dimensional cone-beam computed tomography”, Phys Med Biol 53 5653 (2008). → pages 25 [48] F. Bergner et al., “Autoadaptive phase-correlated (AAPC) reconstruction for 4D CBCT”, Med Phys 36 5695 (2009). → pages 25 [49] F. Bergner et al., “An investigation of 4D cone-beam CT algorithms for slowly rotating scanners”, Med Phys 37 5044 (2010). → pages 25 [50] E.Y. Sidky and X. Pan, “Image reconstruction in circular cone-beam com- puted tomography by constrained, total-variation minimization, Phys Med Biol 53 4777 (2008). → pages 25 [51] J. Sykes et al., “Lung SBRT and the application of advanced 4D-XVI, Symmetry, image guidance”, Elekta case study (2010). → pages 25 [52] J. Sonke et al., “Frameless stereotactic body radiotherapy for lung cancer using four-dimensional cone beam CT guidance”, Int J Radiat Oncol Biol Phys 74 567 (2009). → pages 25 [53] G.D. Hugo et al., “On-line target position localizatiob in the presence of respiration: a comparison of two methods”, Int J Radiat Oncol Biol Phys 69 1634 (2007). → pages 26 101 [54] K.R. Britton et al., “Assessment of gross tumor volume regression and mo- tion changes during radiotherapy for non-small-cell lung cancer as measured by four-dimensional computed tomography”, Int J Radiat Oncol Biol Phys 68 1036 (2007). → pages 26 [55] K.L. Gottlieb et al., “Investigation of respiration induced intra- and inter- fractional tumour motion using a standard Cone Beam CT”, Acta Oncol 49 1192 (2010). → pages 26 [56] J. Bissonnette et al., “Quantifying interfraction and intrafraction tumor motion in lung stereotactic body radiotherapy using respiration-correlated cone beam computed tomography”, Int J Radiat Oncol Biol Phys 75 688 (2009). → pages 26 [57] L. Lee et al., “Retrospective IMRT dose reconstruction based on cone-beam CT and MLC log-file”, Int J Radiat Oncol Biol Phys 70 634 (2008). → pages 26 [58] A. Richter et al., “Investigation of the usability of conebeam CT data sets for dose calculation”, Radiat Oncol 3 42 (2008). → pages 26 [59] J.A. Hatton et al., “Does the planning dosevolume histogram represent treatment doses in image-guided prostate radiation therapy? Assessment with cone-beam computerised tomography scans”, Radiother Oncol 98 162 (2011). → pages 26 [60] E. Heath et al., “A comparison of dose warping methods for 4D Monte Carlo dose calculations in lung”, J Phys: Conf Ser 102 1 (2008). → pages 26 [61] M.A. Admiraal et al., “Dose calculations accounting for breathing motion in stereotactic lung radiotherapy based on 4D-CT and the internal target volume”, Radiother Oncol 86 55 (2008). → pages 26 [62] J.V. Siebers and H. Zhong, “An energy transfer method for 4D Monte Carlo dose calculation”, Med Phys 35 4096 (2008). → pages 26 102 [63] A. Harsolia et al., “Dosimetric advantages of four-dimensional adaptive image-guided radiotherapy for lung tumors using online cone-beam ocm- puted tomography”, Int J Radiat Oncol Biol Phys 70 582 (2008). → pages 26 [64] Varian Medical Systems, “TrueBeam Technical Reference Guide, Volume 2: Imaging” (2010). → pages 30, 35, 59, 60 [65] Varian Medical Systems, “On-Board Imager (OBI) Maintenance Manual, version 1.4” (2008). → pages 30, 55, 66 [66] N. Mail et al., “The influence of bowtie filtration on cone-beam CT image quality”, Med Phys 36 22 (2009). → pages 32 [67] Varian Medical Systems, “On-Board Imager (OBI) Reference Guide, ver- sion 1.4” (2008). → pages 35 [68] Varian Medical Systems, “TrueBeam Instructions for Use” (2010). → pages 35 [69] Peter Munro, Varian Medical Systems, private communication. → pages 40 [70] Varian Medical Systems, “TrueBeam Developer Mode User’s Manual” (2011). → pages 42, 110, 115 [71] W.Y. Song et al., “A dose comparison study between XVI and OBI CBCT systems”, Med Phys 35 480 (2008). → pages 43 [72] H.C.Y. Cheng et al., “Evaluation of radiation dose and image quality for the Varian cone beam computed tomography system”, Int J Radiat Oncol Biol Phys 80 291 (2011). → pages 43 [73] L.A. Feldkamp, L.C. Davis and J.W. Kress, “Practical cone-beam algo- rithm”, J. Opt. Soc. Am. A 1 612 (1984). → pages 46, 53 [74] MATLAB version R2009a, MathWorks Inc., Natick MA. → pages 46 [75] W. Giles et al., “Crescent artifacts in cone-beam CT”, Med Phys 38 2116 (2011). → pages 52 103 [76] D. Zheng et al., “Bow-tie wobble artifact: Effect of source assembly motion on cone-beam CT”, Med Phys 38 2508 (2011). → pages 52 [77] A.C. Kak and M. Slaney, Principles of Computerized Tomographic Imaging, Society of Industrial and Applied Mathematics (2001). → pages 53 [78] D.L. Parker, “Optimal short scan convolution reconstruction for fanbeam CT”, Med Phys 9 254 (1982). → pages 53 [79] The Phantom Laboratory, Inc., Catphan 504 manual, Salem NY (2009). → pages 54, 55, 61 [80] B. Ohnesorge et al., “Efficient correction for CT image artifacts caused by objects extending outside the scan field of view”, Med Phys 27 39 (2000). → pages 59 [81] J. Hsieh et al., “A novel reconstruction algorithm to extend the CT scan field-of-view”, Med Phys 31 2385 (2004). → pages 59 [82] K. Sourbelle et al., “Reconstruction from truncated projections in CT using adaptive detruncation”, Eur Radiol 15 1008 (2005). → pages 59 [83] D. Kolditz et al., “Comparison of extended field-of-view reconstructions in C-arm flat-detector CT using patient size, shape or attenuation informa- tion”, Phys Med Biol 56 39 (2011). → pages 59 [84] J.H. Siewerdsen et al., “A simple, direct method for x-ray scatter estimation and correction in digital radiography and cone-beam CT”, Med Phys 33 187 (2006). → pages 59 [85] L. Zhu et al., “Scatter correction for cone-beam CT in radiation therapy”, Med Phys 36 2258 (2009). → pages 59 [86] M. Sun and J.M. Star-Lack, “Improved scatter correction using adaptive scatter kernel superposition” Phys Med Biol 55 6695 (2010). → pages 59 [87] T. Niu et al., “Shading correction for on-board cone-beam CT in radiation therapy using planning MDCT images”, Med Phys 37 5395 (2010). → pages 59 104 [88] M. Kachelriess et al., “Empirical cupping correction: A first-order raw data precorrection for cone-beam computed tomography”, Med Phys 33 1269 (2006). → pages 60 [89] Y. Kyriakou et al., “Empirical beam hardening correction (EBHC) for CT”, Med Phys 37 5179 (2010). → pages 60 [90] J. Sijbers and A. Postnov, “Reduction of ring artifacts in high resolution micro-CT reconstructions”, Phys Med Biol 49 N247 (2004). → pages 60 [91] D. Prell et al., “Comparison of ring artifact correction methods for flat- detector CT”, Phys Med Biol 54 3881 (2009). → pages 60 [92] Y. Kyriakou et al., “Ring artifact correction for high-resolution micro CT”, Phys Med Biol 54 N385 (2009). → pages 60 [93] E.M.A. Anas et al., “Removal of ring artifacts in CT imaging through de- tection and correction of stripes in the sinogram”, Phys Med Biol 55 6911 (2010). → pages 60 [94] M. Ezhil et al., “Comparison of rigid and adaptive methods of propagating gross tumor volume through respiratory phases of four-dimensional com- puted tomography image data set”, Int J Radiat Oncol Biol Phys 71 290 (2008). → pages 78 [95] J. Orban de Xivry et al., “Tumour delineation and cumulative dose com- putation in radiotherapy based on deformable registration of respiratory correlated CT images of lung cancer patients”, Radiother Oncol 85 232 (2007). → pages 78 [96] L. Ibanez et al. and the Insight Software Consortium, “The ITK Software Guide, Second Edition”, http://www.itk.org (2005). → pages 78, 79, 114 [97] D. Mattes et al., “PET-CT image registration in the chest using free-form deformations”, IEEE Trans. on Medical Imaging 22 120 (2003). → pages 79 [98] GE Healthcare, Advantage 4D, http://www.gehealthcare.com/euen/ct/ products/dedicated systems/products/gating.html. → pages 88 105 Appendix A Procedure instructions This appendix gives step-by-step instructions for some of the procedures used in this thesis: 1. Air norm and Hounsfield unit calibrations 2. 4D CBCT scan of a moving phantom on an iX unit 3. 4D CBCT scan of a moving phantom on a TrueBeam unit 4. Deformable image registration and trajectory measurement Note that the projection image files for a scan are exported differently on iX and TrueBeam units: • On the iX, a scan is saved to the Reconstructor PC under D:/VMSOS/- AppData/CBCT/Rec/CBCTProjections. The scan directory contains a file ProjectionInfo.xml with various scan parameters, and a directory Scan0 with an hnd file for each projection. • On the TrueBeam in Developer mode, projection images appear in the Image Gallery and should be exported from there to both xim and hnd formats. (For compatibility with MATLAB code, put them in separate directories xim and hnd, and give the files a prefix of just p.) On the iX, if the mA and ms settings are changed from the defaults, those changes will not be reflected in the corresponding elements in ProjectionInfo.xml. 106 Although these values are not used in image reconstruction, it is a good idea to correct the element values manually for clarity. Preprocessing projection files: Before the projection files can be used to reconstruct images or do calibrations, there are a few steps that need to be taken to prepare them: 1. On the TrueBeam, if the scan has been broken up into multiple segments to avoid the out-of-memory error, the files from the different segments need to be renamed and collected together: this is done using the MATLAB script mergeScanSegments.m. 2. All hnd files must be decompressed to hnc format: this is done with a Win- dows command-line program written for this project called HNDtoHNC.exe (see Section B.3). The hnc files should be put in a new directory called hncfiles for compatibility with the MATLAB code. 3. For half-fan scans, the MATLAB script expandProjectionImages.m must be used to reorganize the projection data. This will create a new set of expanded hnc files, which should go into a directory called hncexpanded; these files are then used in subsequent steps. A.1 Air norm and Hounsfield unit calibrations It is convenient to do these together, and the procedure is essentially the same on the iX and TrueBeam. For the air norm: 1. Take a regular CBCT scan with nothing in the field of view (not even the couch). On the TrueBeam do this in Developer mode using an XML file based on one of the templates described in Section B.4. Use a fairly low mAs (e.g. 10 mA, 20 ms) to make sure the detector will not saturate. 2. Copy the scan directory to the analysis PC and preprocess the projection files. 3. In MATLAB, open measureIntensityNorm.m, edit the relevant variables at the beginning and run it — this averages the projections and saves the average to a mat file. 107 4. Give the mat file a descriptive name, e.g. airnorm iX fullfan 100kV.mat, and move it to a directory for calibration files. For the Hounsfield unit calibration: 1. Take a regular CBCT scan of the Catphan 504 phantom. The couch should not be in the FOV. Make sure the phantom is centered transversely within ∼1 mm, and the sensitometry (404) section should be near the isocenter. Higher mAs values are preferable, to minimize noise. 2. Copy the scan directory to the analysis PC and preprocess the projection files. 3. In MATLAB, open cbct.m, edit the relevant variables at the beginning, and temporarily comment out the two calls at the end to ConvertMuHU and WriteDicomScan. Then run cbct to produce the µ image (this is the variable muRecon). 4. Choose an axial slice containing the sensitometry (404) section and run MeasureMuHU. This will write a text file containing the two linear calibration constants (slope and intercept). 5. Give the text file a descriptive name, e.g. HUcal truebeam 125kV.mat, and move it to a directory for calibration files. A.2 4D CBCT scan of a moving phantom on an iX 1. Set up the phantom, with the RPM marker block placed so that it can be tracked by the camera. 2. Start the phantom moving and run the RPM software, checking that it tracks the block’s motion. Then stop the tracking. Restart the RPM soft- ware to make sure the timer resets. 3. Open the dummy patient in 4DITC, mode up the CBCT field, go through the regular CBCT steps (set mode, mA, ms, collimators), up to the point where the OBI application says to press the foot pedal and gantry motion- enable. 108 4. Simultaneously, click the Track button in the RPM application and start the stopwatch. Keep holding the stopwatch. 5. Click the Record button in the RPM application promptly after it becomes active. 6. Without waiting long, start the CBCT scan by pressing and holding the foot pedal and gantry motion-enable. 7. As soon as the red X-ray on LED on the OBI console lights up, stop the stopwatch. 8. After the scan is done, stop the RPM recording. 9. The time difference between the RPM zero-time and the time of the first projection can be estimated as Tdiff = Tstopwatch − Treaction, not accounting for any possible delay between LED and beam-on. 10. Export the RPM trace to a vxp file, copy that and the scan directory to the analysis PC, put the vxp file in the scan directory, and preprocess the projection files. 11. (Optional) Use cbct.m to do a 3D reconstruction, which will illustrate the motion artifacts. Edit the relevant variables at the beginning of cbct.m before running it. 12. Use sort4DprojectionsIX.m to sort the hnc files by phase, editing it at the beginning for variables such as vxp filename and Tdiff . This will create a subdirectory for each phase and copy only the relevant hnc files into each one. 13. For each phase, use cbct.m to reconstruct the phase image (or batch them with cbct4D.m). Watch the projections as they are displayed to check that they have been binned properly and are clustered together. 14. Use movie4dct.m to view a phase image animation. 109 A.3 4D CBCT scan of a moving phantom on a TrueBeam 1. Start with a Beam XML file, based on a template from Section B.4 and modified for the desired geometry, kV, mA, ms etc. 2. The bowtie, Ti filter and blades cannot be adjusted within Developer mode, so to get them into the correct position, use Imager Calibration or Treat- ment mode — the Developer mode manual [70] has a section describing this. 3. Set up the phantom, with the RPM marker block placed so that it can be tracked by the camera. Start the phantom moving. 4. Go into Developer mode, load the XML file and press Prepare. Check that the gantry is at the correct start position - press Goto to move it if not. 5. Open the tracking pane and wait for the tracking to settle down. Then press the kV beam-on button to start the scan. 6. When the scan is complete, check the projection images in the Imaging Gallery and export them to the shared drive (in both xim and hnd formats!). Also save a copy of the XML file (for reference only). 7. Copy the scan directory to the analysis PC and preprocess the projection files. 8. (Optional) Use cbct.m to do a 3D reconstruction, which will illustrate the motion artifacts. Edit the relevant variables at the beginning of cbct.m before running it. 9. Use sort4DprojectionsTB.m to sort the hnc and xim files by phase. This will create a subdirectory for each phase and copy only the relevant hnc and xim files into each. 10. For each phase, use cbct.m to reconstruct the phase image (or batch them with cbct4D.m). Watch the projections as they are displayed to check that they have been binned properly and are clustered together. 11. Use movie4dct.m to view a phase image animation. 110 A.4 Deformable image registration and trajectory measurement 1. Start with a 4D DICOM image, organized with each phase image in its own directory. Use movie4dct.m to view an animation of the phase images, and choose a reference phase. The 180◦ phase (end-exhale) is usually suitable as it should be relatively stable — this is phase number 1 according to the current sorting script sort4DProjectionsTB.m. 2. In Eclipse/SomaVision: Import the reference phase image into a dummy patient. Set the window to some standard value (e.g. width 1500, level 250). Contour the tumor(s)/structure(s) of interest. If there are more than one, each gets its own contour structure. Export the contour(s) to a DICOM file by exporting the image. 3. In MATLAB, read the contour DICOM file using ReadDICOMContour.m and export the contour points using WritePointTextFile. 4. Use a DICOM image viewer of choice to view the reference phase image, and note the six voxel index values that define the boundaries of the tu- mor/structure (sagittal min/max, coronal min/max, axial min/max). Ex- pand this region by a margin (e.g. 5 or 10 mm) and enter the resulting requested-regions parameters (start index and size in x,y,z1) in the defreg options text file. 5. For each phase, run defreg with the reference phase as the fixed image, the current phase as the moving image, and the contour points file as the input points file. This will generate the output contour points file and another file (defreg mdisp.txt) containing the mean displacement of all the contour points. The MATLAB script defregBatch.m is useful for repeating this for all phases, and plotting the displacements vs. phase. 6. The script movieContourPoints.m animates the movement of the contour points over all phases. 1In defreg, for a HFS patient, x is sagittal and increases to the left, y is coronal and increases posterior, and z is axial and increases superior. 111 7. The script movieImageContours.m animates the phase images with con- tours superimposed, so the contour accuracy can be evaluated. 8. If the defreg option to output the mapped image was used, the script compareMappedImage.m the mapped image with the actual phase image, so the registration accuracy can be evaluated. 112 Appendix B Code overview This appendix gives a listing of the main code directories and files written for this thesis project. The code is grouped into MATLAB code, the hnd to hnc converter, ITK code and Beam XML for TrueBeam. B.1 MATLAB code The MATLAB code is grouped into several directories. The main ones are: • calibration contains the files for performing air norm (measureIntensity- Norm.h) and Hounsfield unit (MeasureMuHU.m) calibration. • ct common contains the core functions for CT image reconstruction, such as ConeFBP.m. • file IO contains functions for reading and writing various file formats in- cluding DICOM images and contours, hnc and hnd files, the iX Projec- tionInfo.xml file, xim headers, RPM files and contour-point text files. • image utils contains utility functions for manipulating 2D images and extracting 2D slices from 3D images. • notes contains some descriptions of notation conventions used in the code, and of header information in hnd and xim files. • OBI contains code for image reconstruction that is specific to the Varian OBI system, including cbct.m and cbct4D.m. GetProjectionFileInfo 113 reads header information for the whole scan and comes in iX and TrueBeam versions. sort4DProjections does the phase bin sorting and also comes in iX and TrueBeam versions. • simulation contains code for simulating 2D and 3D CT. Simulated objects can be created, projection images taken, and the images reconstructed. This is useful for testing algorithms such as truncation correction. • tracking contains code for animating 4D images. It also contains the script defregBatch.m for batch-running defreg, and trackInsert.m, a simple threshold algorithm for measuring an object’s trajectory. B.2 ITK code There are two command-line applications that use ITK (defreg and getscan- info), and one library (mylibrary) that is used by both applications. They have only been compiled and used on Windows so far, but should be portable. The ITK documentation [96] has instructions for installing ITK and building applications with it. • defreg is the application for performing deformable image registration be- tween two 3D DICOM images. The main program is defreg.cxx. Regist- rators contains the classes for image registration (one for the deformable B-spline and another for simple rigid translation). RegOptions is a class which manages the adjustable options used when running defreg. • getscaninfo is a utility program which outputs assorted information about a 3D DICOM image. • mylibrary contains various wrapper functions for ITK’s DICOM image reading and writing, other assorted utility functions, and a class for observ- ing the progress of optimizations in ITK. B.3 HND to HNC converter HNDtoHNC.exe is a command-line application for decompressing Varian hnd files to hnc format. It is written in C++ and has just one source file: main.cpp. It has only been compiled and used on Windows so far, but should be portable. 114 B.4 Beam XML files There are several TrueBeam XML files. See the Developer Mode manual [70] for details on syntax. The Foil value should be 1 (Ti filter present) for all CBCT scans. The Shape value is 0 for no bowtie, 1 for full-fan and 2 for half-fan. Note the GantryRtn values are in Varian internal notation, not IEC. • MV beam on.xml is a very simple file, meant for testing that Developer mode is functioning properly. It just delivers a 6 MV beam for 100 MU with no motion. • CBCT fullfan.xml is a template for 3D full-fan scans. • 4DCBCT fullfan.xml is a template for 4D full-fan scans. It is similar to CBCT fullfan.xml but has slower gantry rotation and has an extra section to activate the RPM system. • CBCT halffan.xml is a template for 3D half-fan scans. • CBCT spotlight.xml is a template for 3D spotlight scans. 115


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items