3.3 Calculating WEPL Changes in the CTV from TomoTherapy Shift & MVCT
3.3.1 Coding
I carried out all coding (described below) using MatLab which is a high level computing language that has pre-built functions which allows for fast programming (Matlab UK, 2011). It also has capabilities for reading and writing DICOM data and reading information from DICOM headers, which makes it a good language to use for this project. DICOM stands for Digital Imaging and Communications in Medicine and is a network protocol for medical data exchange. DICOM data includes a variety of image sources such as CT, MRI and PET. DICOM data can also be in the form of radiotherapy objects such as treatment plans, dose cubes and delineated structures. DICOM defines how all this data is stored and shared.
The list of the key functions, the description of their roles and the assumptions used as well as the code can be found documented in Appendix B. Here a short description of the process used to generate the probability distributions of inter-fraction range changes from patient MVCT data.
Daily Shifts
Beyond having an effective depth algorithm and a calibration to be used within it, the daily rigid couch shifts used on set for each fraction are required. For each treatment fraction on TomoTherapy the radiographer will set the patient up for treatment and perform an MVCT scan. The radiographer will perform image registration of the MVCT image to the planning kVCT making any of their own adjustments online and determine the final shift required in each axis (x, y, z) and for the roll. These shifts are translated to changes in the couch position
and are applied. The patient will then be treated in this position, further details of the treatment approach are given in Burnet et al. (2010). By applying these shifts to the MVCT image the patient position at the time of treatment can be simulated. The correction for roll has not been included in the calculation. As part of the VoxTox (voxtox, 2014) study shift data was extracted directly from TomoTherapy for all patients. This data was embedded into the DICOM header of each MVCT scan eliminating the human error involved in using numbers quoted on set.
To apply a shift to the 3D MVCT for a given fraction two coordinate systems of the same size of the MVCT matrix are created. The first is the coordinate system as retrieved from the DICOM header; the second is this coordinate system with the shifts added to it in each direction. For example if say pixel (1,1,1) existed at the coordinates (0,0,-12) and rigid couch shifts (0.5,1.5,-1) were applied, the new coordinate system for pixel (1,1,1) would be (0.5,1.5,-13). This is done to all pixels, in pixel dimension rather than in mm, and a 3D cubic interpolation is carried out to determine the new values of pixel data. In the x and y directions missing patient information is masked to correct for truncation artefacts. The pixels representing air are then all assigned to the same value.
Truncation Artefacts
If a patient is large compared to the field of view (FOV) or positioned with part of their body outside the FOV of the CT then truncation artefacts in the transmission data can occur (McGowan et al., 2012). In radiotherapy truncation of either the region of interest, or of the patient outline is a problem for dose calculation. On TomoTherapy the scanning circle has a diameter of 38.6cm and truncation due to the scanning circle size is common, especially of the shoulders in head and neck plans and of the body in prostate plans. An example of scanning circle truncation of shown in Figure 3.7. Primarily the MVCT is used for daily registration, but in the case of dose re-computation for adaptive planning truncation needs to be corrected for. Solutions to correct for truncation artefacts include solutions such as using the kVCT data to fill in the missing data may be used. Alternatively, the body outline can be used to mask this missing data with a uniform pixel value. In both cases the daily shift will need to be applied to either the skin outline or the kVCT, so it will align correctly with the shifted MVCT. In this work a mixture of both methods was used. The kVCT was read in with the MVCT data and the shifts were applied to both. Knowing the scanning circle size, a mask was created for both CTs. The kVCT contributed the data that existed outside of the scanning circle and the MVCT provided the data within the scanning circle.
Fig. 3.7 Image of truncated patient on TomoTherapy showing the the scanning circle (white circle).
WEPL
To calculate the change in WEPL between fractions, each fraction is compared to a refer- ence image. Due to the daily images and planning images having been obtained via different imaging modalities the reference image used was the MVCT of the first fraction in the treat- ment. The structure sets created at planning were used to determine the region of interest (ROI). The structure set of the ROI was read into the program and the coordinates of the structure were aligned to the corresponding shifted MVCT image slices. The resolution of the MVCT and the structure set differ in slice thickness so to determine which structure set slices were required the in-built MatLab function ismember was used to pinpoint the elements of the two matrix sets where the z coordinates were in correspondence.
The WEPL was calculated for a given beam direction, and beam parameters, using the shifted MVCT data and the effective depth algorithm previously described. To ensure the quality of the effective depth algorithm several verification tests have been carried out; these included testing the WEPL is accurate by setting the source to the surface of the CT image and the beam angle perpendicular to the pixels. This way the value of the pixel can be checked to determine if it was as expected and that the next pixel had a value equal to its own plus that of the previous pixel. An easy way to check the summation process is to look at water and see that the pixel value increases by a distance of one pixel each time.
Following the calculation of the WEPL, masks were used to retrieve the WEPL data from only pixels that exist inside the structure set for each fraction. Each subsequent fraction is then compared to the reference. All dimensions are converted into distances and volumes as required. Statistical parameters, such as the mean and standard deviation (in mm) of each data set were calculated; these represent the systematic and range errors associated with the treatment, both as a whole and at each fraction for that given beam angle.
Assumptions
Several assumptions have been made; these include
■ The target has been delineated correctly.
■ The target is in the correct location.
■ The target has not rotated.
■ Image matching and the shifts applied at treatment were correct.
■ The target has not been deformed.
■ Air outside the patient can be represented as a vacuum.
■ The Source to Isocentre Distance (SID) has been set to seven metres in this study. This
corresponds with the distance in the proton centre at CNAO, Pavia as proveided to us by the physicists there, this is used simply as an example. At PSI, at dose calculation the SID is assumed infinite.