Abstract
The current clinical interface for Varian's intrafraction motion review (IMR) is limited, providing only qualitative data for review at the treatment console. This study provides a method of extracting and interpreting data from combined log files for quantitative evaluation. Combined log files acquired during patient treatment and a parsing code was developed to scan the combined log file looking for unique identifiers pertaining to the data of interest. We were able to extract clinically relevant parameters from the log files including date and time, gantry angle, expected marker position, found marker position, pixel size, and detection result. This study details how to compare IMR data to Calypso investigating dual‐surrogates for intrafraction monitoring during treatment for other researchers to build on these methods. Understanding data recorded during treatment within the combined log files can be helpful in quality improvement of patient care by retrospectively reviewing intrafraction motion.
Keywords: dual surrogate, Motion management (intrafraction), x‐ray projection
1. INTRODUCTION
One of the most challenging aspects of radiation therapy treatment is localizing the target. Orthogonal or cone‐beam computed tomography (CBCT) imaging is common for modern linear accelerator‐based (linac) treatment, though soft tissue evaluation can be difficult to evaluate using these methods. To help with these challenges, it is common to insert fiducial markers such as gold seeds into or adjacent to the target to be used as surrogates for localization. These fiducials can also be used to monitor the target during treatment, though more sophisticated tools are required.
For departments using Varian TrueBeam® linacs with Advanced Imaging, Intrafraction Motion Review (IMR) is a tool for monitoring fiducial positions throughout treatment. Fixed points in space with reference to isocenter, known as markers, are placed in reference to the fiducial location during treatment planning. IMR uses the position of the markers to calculate where the fiducials would be expected when taking kilovoltage (kV) images at associated gantry angles during treatment and an algorithm compares these expected locations to the detected fiducial location in the image. The images are taken orthogonal to the treatment axis, and the frequency of the imaging is determined by the user based on gantry angle, time, or number of delivered monitor units.
While IMR has been shown to be useful by investigators, 1 , 2 , 3 , 4 , 5 , 6 the current version of IMR (TrueBeam® v2.7 MR3) is not without its limitations. The tolerance information received by the clinical user during treatment is displayed qualitatively as green, red, or orange corresponding to whether the location for each fiducial is detected within the set tolerance, outside of the tolerance, or not found, respectively, as shown in Figure 1. Unfortunately, this information is not currently available for evaluation offline. It can be reviewed real‐time or immediately after treatment at the console but is no longer able to be accessed by the user after closing out the patient's treatment session. The images are available to review offline but do not retain the red/green/orange distinction used for clinical guidance during treatment.
Although it is currently not a user‐friendly method for extraction and analysis, the expected and detected marker location data is recorded in the combined log files. The goal of this work is to share our method for IMR data extraction so that others can improve patient care in their own clinic. We also present our method for comparing IMR data with Calypso data positions for further research.
2. METHODS
2.1. Data extraction from combined log files
All IMR data is stored in combined log files on the linac console computer, which is compiled daily, archived to last several months, and then periodically deleted. These files are intended for service engineers to access and use, so the data is not exported automatically for clinical operations via PeerSync™ requiring manual extraction from the console computer. Access to the drive where the files are located is limited, so if the user lacks the appropriate rights, it may be necessary to contact the vendor to transfer the files.
Combined log files track nearly all of the linac's operations throughout the day, making them difficult to extract only the IMR‐relevant data using manual export method as shown in Figure 2. We developed a parsing code that extracts the data of interest and saves it as a comma‐separated text file. Parameters deemed important to acquire from the log files for our study were date/time, gantry angle, expected marker position, found marker position, pixel size, and detection result. An example of relevant log file data compiled into a.csv file is shown in Figure 3. There are many lines pertaining to the IMR imaging sections within the log files, so this work is not meant to be an exhaustive guide for interpretation. If there is other information desired for specific analysis, it is recommended to consult the manufacturer rather than make assumptions about label definitions.
It is recommended that care is taken to ensure the correct location data is being extracted from the log file. For IMR, there are three sets of positions for each fiducial's X and Y coordinates. Labels for maker positions include the expected position noted as “ExpectedMarkerPosition” and found position as “MarkerSingleResult” for data analysis. While “MarkerGeometryCheck” also records fiducial positional data, it is not directly related to found or expected fiducial position and is not needed to determine planned versus treatment absolute fiducial positional differences. If one or more markers are not detected, they are recorded as such (NaN) in the combined log file.
Fiducial position data is stored in terms of pixel location, making it is necessary to obtain pixel size information to convert to the International System of Units. The log file subdivides all positional and pixel information by fiducial and X and Y coordinates. The information collected using this method yields X and Y marker positions relative to the imaging panel. If pixel size is used to convert to units of millimeters, it should be noted that this distance is for the projection at isocenter, not at the imaging panel distance.
Detection result is the classification of the color‐coded results displayed on the console during treatment (within the set tolerance, outside of the tolerance, or not found). The stored data does not record found versus expected fiducial position difference, but the absolute X and Y positions and the detection result (i.e., within or outside tolerance). However, such numerical detection positional differences can be calculated externally.
Combined log files do not store any patient information, so if it is desired to correlate the data to a particular patient, a system for patient identification will need to be developed. To accomplish this, we used a time‐based system such that the time of each beam or arc was recorded during treatment in reference to that particular patient and fraction. Time information is also stored on each line of the log file with millisecond precision. If this is extracted for each segment of image data, it is then straightforward to match time information to patient data.
A step‐by‐step guide of the complete process if performed manually is as follows. Steps 2–7 were automated by the authors for this study to increase the efficiency and accuracy of the data processing. Please note that the unique identifiers may have changed since publication and will vary depending on what data is required for your analysis.
Log into the console computer as an admin and copy the combined log files to a drive accessible on your network.
Within the log file, locate the first instance of the unique identifier “ImageAcquisition” and copy the date and time from that row.
Continuing down the file, the next unique identifier of interest is InvokeIP|ImageSource|AcqId” which represents gantry angle information in this row.
Next is "|_InvokeIP|ExpectedMarkerPosition|AcqId|" which contains expected marker positions.
The next row with "|_InvokeIP|InputSearchRegion|AcqId|" contains the pixel size information.
The "|_InvokeIP|MarkerSingleResult|AcqId|" row will yield the expected marker position and seed state in relation to tolerance diameter set before treatment.
Finally, convert from pixels to millimeters and calculate true geometric differences.
2.2. IMR‐calypso position comparison
While most users will only use a single method for intrafraction monitoring during treatment, Cetnar et al. performed a dual‐surrogate study to evaluate the accuracy of the IMR system. 1 Electromagnetic monitoring technology such as Calypso® (Varian Medical Systems) can be used for real‐time motion monitoring during treatment. 7 , 8 , 9 , 10 This section is written for those interested in performing a similar comparison involving the transformation of coordinate systems for future work.
The Calypso system reports the fiducial positions in 3D in the linac vault coordinate system. The IMR system uses a kV x‐ray source and detector to image the patient and detects the Calypso beacon fiducials as markers on the 2D kV imager coordinate system. In order to be able to compare the positions reported by the two separate monitoring systems, we translated the positions of the fiducials from the 3D Calypso coordinate system to the 2D IMR coordinate system.
Three fiducials were analyzed for each patient during treatment. IMR 2D marker positions in the kV imager coordinate system, timestamp, and planar acquisition angle were recorded during treatment. Calypso System Data Converter Version 1.9 was used for 3D data extraction which reports 3D marker coordinates (X, Y, Z) of each fiducial. The synchronization of the two datasets was performed using the timestamps. If exact timestamp match was not found, the data set pairing was matched to the one with the shortest temporal difference. The average sampling time for our Calypso data reported coordinates was approximately 30 ms.
The gantry angle reported at the matched timestamp was used to project the 3D coordinates of the fiducials into the 2D planar kV imager coordinate system using a cone‐beam geometry shown in Figure 4.
The 90‐degree angle offset between the x‐ray source and the gantry angle was also taken into account when comparing data between the two systems. The projected 2D coordinates on the x‐ray detector (u,v) from Calypso are given by
where d SDD and d SAD are the x‐ray source‐to‐detector distance and the x‐ray source to rotation axis distance, respectively (x, y, z) are the 3D coordinates of the fiducials, and θ is the IMR planar image acquisition angle.
The labeling convention of the IMR system's markers and the Calypso system's fiducials are not necessarily the same. Therefore, an optimization routine to match the IMR markers to the Calypso beacon fiducials based on the calculation of the minimum distances was developed (in 2D detector coordinate system) for all pair combinations between the systems. The pair combinations with the minimum distance were interpreted as the matched IMR and Calypso marker and fiducial pairs.
The developed 3D to 2D projection code comparing IMR and Calypso data was validated with the data acquired using phantoms with embedded with Calypso fiducials shown in Figure 5.
3. RESULTS
Validation of the 3D to 2D projection code for IMR and Calypso data compared calculated coordinates (u,v) of the fiducials with the Calypso data projected on the kV detector reference frame. The IMR detected coordinates and plotted in Figure 6 for the anthropomorphic phantom with embedded beacons. The top row shows the differences of the u‐coordinate between the Calypso and IMR coordinates with Δu as function of kV source angle θ, the variation of this difference for each fiducial, and finally the variation of all fiducials in a single histogram. The bottom row is plotted for the v‐coordinate. The mean and standard deviation of the differences between the Calypso and IMR calculated u‐ and v‐coordinates are 0.0 (0.07) cm and 0.04 (0.05) cm, respectively. Validation testing was repeated using the Calypso Daily QA phantom yielding similar results calculated u‐ and v‐coordinates are 0.0 (0.04) cm and 0.04 (0.02) cm, respectively.
Similarly, Figure 7 shows the differences of Δu and Δv as a function of kV source angle (θ), variation of the differences of each fiducial, and finally the variation of all fiducials in a single histogram in a patient cohort. The IMR algorithm was sometimes able to detect all three fiducials and marked them undetected or outside of the expected limit thresholds. In this analysis, we excluded the data when all three markers were not detected. For the patient data, the means of Δu and Δv are calculated as 0.01 cm and 0.00 cm, with standard deviations of 0.11 cm and 0.07 cm, respectively.
4. DISCUSSION
We faced several logistical challenges in the process of data extraction. The first involved the verification of timestamps between the two systems and establishing a method for synchronization for our analysis. The second is the awareness that updates to software can affect the output in the combined log files. It is recommended that a quality assurance program be developed for in‐house software after changes have been made.
Our final recommendation is to perform end‐to‐end tests using phantoms before using clinically to better understand how the data in the log files can be interpreted. We used vendor‐provided QA devices and anthropomorphic phantoms for our initial validation testing of our workflow which was helpful for making final improvements to our in‐house analysis. As an example, initial comparison data was not expected to have a large sinusoidal pattern between the two data sets. Upon investigation, we found differences in the offline review data for the imager position which we were able to correct and modify to better represent the data.
5. CONCLUSION
Through this process, we were able to develop ways to extract quantitative data helpful for us in understanding the accuracy of the IMR system and use it for process improvement within our clinical workflow. The current data available for clinical decision‐making is limited when using IMR. However, data is recorded in the combined log files, which can be utilized to better understand motion during patient treatment. Understanding data recorded during treatment within the combined log files can be helpful for retrospectively reviewing motion during treatment to continue to improve patient care.
CONFLICT OF INTEREST
There are no conflicts of interest to disclose.
AUTHOR CONTRIBUTION
Gavin Graeper – Made substantial contributions to the concept and design of the work, including acquisition, analysis, and interpretation of the data. Helped draft and revise the document through to its final submitted form. Agrees to be accountable for all aspects of the work. Ashley Cetnar – Made substantial contributions to the concept and design of the work, including acquisition, analysis, and interpretation of the data. Helped draft and revise the document through to its final submitted form. Agrees to be accountable for all aspects of the work. Ahmet Ayan – Made substantial contributions to the concept and design of the work, including acquisition, analysis, and interpretation of the data. Helped draft and revise the document through to its final submitted form. Agrees to be accountable for all aspects of the work. Michael Weldon – Made substantial contributions to the concept and design of the work, including acquisition, analysis, and interpretation of the data. Helped draft and revise the document through to its final submitted form. Agrees to be accountable for all aspects of the work.
ACKNOWLEDGMENTS
Thank you to the fantastic department at OSU who made this project possible
Graeper G, Cetnar A, Ayan AS, Weldon M. Interpretation of intrafraction motion review data and method for verification. J Appl Clin Med Phys. 2021;22(11):196–202. 10.1002/acm2.13379
Gavin Graeper M.S. and Ashley Cetnar Ph.D. should be considered joint first authors
REFERENCES
- 1. Cetnar A, Ayan AS, Graeper G, et al. Prospective dual‐surrogate validation study of periodic imaging during treatment for accurately monitoring intrafraction motion of prostate cancer patients. Radiother Oncol. 2021;157:40‐46. [DOI] [PubMed] [Google Scholar]
- 2. Rosario T, van der Weide L, Admiraal M, Piet M, Slotman B, Cuijpers J. Toward planning target volume margin reduction for the prostate using intrafraction motion correction with online kV imaging and automatic detection of implanted gold seeds. Pract Radiat Oncol. 2018;8(6):422‐428. [DOI] [PubMed] [Google Scholar]
- 3. Kaur G, Lehmann J, Greer P, Simpson J. Assessment of the accuracy of truebeam intrafraction motion review (IMR) system for prostate treatment guidance. Australas Phys Eng Sci Med. 2019;42(2):585‐598. [DOI] [PubMed] [Google Scholar]
- 4. Korpics MC, Rokni M, Degnan M, Aydogan B, Liauw SL, Redler G. Utilizing the TrueBeam Advanced Imaging Package to monitor intrafraction motion with periodic kV imaging and automatic marker detection during VMAT prostate treatments. J Appl Clin Med Phys. 2020;21(3):184‐191. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5. Atkinson P, Chen Q. SU‐F‐P‐30: clinical assessment of auto beam‐hold triggered by fiducial localization during prostate RapidArc delivery. Med Phys. 2016;43(6Part5):3364‐3365. [Google Scholar]
- 6. Fenoglietto P, Llacer C, Riou O, Bedos L, Azria D. Online verification of intrafraction motion in VMAT stereotactic prostate treatment. Rep Pract Oncol Radiother. 2013;18(1):s346. [Google Scholar]
- 7. Kupelian P, Willoughby T, Mahadevan A, et al. Multi‐institutional clinical experience with the Calypso System in localization and continuous, real‐time monitoring of the prostate gland during external radiotherapy. Int J Radiat Oncol Biol Phys. 2007;67(4):1088‐1098. [DOI] [PubMed] [Google Scholar]
- 8. James J, Cetnar A, Dunlap NE, et al. Validation and implementation of a wireless transponder tracking system for gated stereotactic ablative radiotherapy of the liver. Med Phys. 2016;43(6Part1):2794‐2801. [DOI] [PubMed] [Google Scholar]
- 9. Poulsen PR, Worm ES, Hansen R, Larsen LP, Grau C, Hoyer M. Respiratory gating based on internal electromagnetic motion monitoring during stereotactic liver radiation therapy: first results. Acta Oncol. 2015;54(9):1445‐1452. [DOI] [PubMed] [Google Scholar]
- 10. Schmitt D, Nill S, Roeder F, Gompelmann D, Herth F, Oelfke U. Motion monitoring during a course of lung radiotherapy with anchored electromagnetic transponders. Strahlenther Onkol. 2017;193(10):840‐847. [DOI] [PMC free article] [PubMed] [Google Scholar]