Daily QA Calculations

Calculations

The Daily QA CBCT procedure yields the $X,Y,Z$ for $CBCT - RTPLAN$. After the table is moved, two EPID images are captured at orthogonal angles. The EPID images produce two sets of values in XY coordinates , which are converted to RTPLAN (a.k.a. world) coordinates using the following:

  • $CBCT_X,CBCT_Y,CBCT_Z$: The bb position in from the CBCT analysis in RTPLAN coordinates minus the RTPLAN isocenter. Calculated using Daily QA CBCT.

  • 3002,000D XRayImageReceptorTranslation $vertT_X, vertT_Y, horzT_X, horzT_Y, $ : Position in (x,y,z) coordinates of origin of IEC X-RAY IMAGE RECEPTOR System in the IEC GANTRY coordinate system mm (from RTIMAGE). The X and Y are used from both the vertical and horizontal EPID images.

  • 300A,011E GantryAngle $(vert_G, horz_G)$ : Treatment machine gantry angle, i.e., orientation of IEC GANTRY coordinate system with respect to IEC FIXED REFERENCE coordinate system in degrees (from RTIMAGE). Angles from the vertical and horizontal EPID images are used.

  • $vert_X$: The bb X position from the EPID image with a vertical gantry angle in isoplane coordinates in mm. Calculated using Isoplane Projection.

  • $horz_X$: The bb X position from the EPID image with a horizontal gantry angle in isoplane coordinates in mm. This will be translated to the Y position in the RTPLAN coordinate system. Calculated using Isoplane Projection.

The following produces the EPID position by converting from gantry coordinates to RTPLAN coordinates.

MV G vertical (BB - DIGITAL_CAX) @ ISOCENTER PLANE = $ epid_X = cos(vert_G) \times (epidIsoVert_X - vertT_X) $

MV G horizontal (BB - DIGITAL_CAX) @ ISOCENTER PLANE = $ epid_Y = sin(horz_G) \times (epidIsoHorz_X - horzT_X) $

AVERAGE MV(BB - DIGITAL_CAX) @ ISOCENTER PLANE = $ epid_Z = { { (-epidIsoVert_Y) - vertT_Y - (-epidIsoHorz_Y) - horzT_Y } \over 2 } $

Note: The $epid_Z$ is the average of the vertical and horizontal angles. Normally there is exactly one horizontal and one vertical image. If more than two EPID images are available, then $epid_Z$ is the average of the values such that there are the same number of vertical and horizontal images. For example, if there were two horizontal images and three vertical images, then it would be the average of the two horizontal images and two randomly chosen of the three vertical images.

The CBCT results are subtracted from the EPID results to get the final answer:



MV G vertical (BB - DIGITAL_CAX) @ ISOCENTER PLANE - CBCT(BB - DIGITAL_PLANNED_ISOCENTER) = $ epid_X - CBCT_X $

MV G horizontal (BB - DIGITAL_CAX) @ ISOCENTER PLANE - CBCT(BB - DIGITAL_PLANNED_ISOCENTER) = $ epid_Y - CBCT_Y $

AVERAGE MV(BB - DIGITAL_CAX) @ ISOCENTER PLANE - CBCT(BB - DIGITAL_PLANNED_ISOCENTER) = $ epid_Z - CBCT_Z $





Coordinate Systems

Part of the task of calculating EPID results is to convert between coordinate systems. Each is given in mm unless specified otherwise. The following are descriptions of those used:
Gantry Coordinate System

Formally, the IEC X-RAY IMAGE RECEPTOR coordinate system, this rotates with the gantry and is in the isoplane. The origin is in the center of the image.

Isoplane Coordinate System

Isoplane coordinates are the same as gantry coordinates except that the Y axis is in the opposite direction. This coordinate system is not standard. It was created by the AQA to present images in a way that was familiar to those working in radiation oncology. It this by showing an orientation similar to RTPLAN coordinates.

RTPLAN (aka World) Coordinate System

The coordinate system used in RT planning that, for purposes of this software, is fixed in space, and describes points in the patient or phantom. Formally specified as Image Position and Image Orientation.



Example Daily QA Calculations

Assume the following values:

$ CBCT_X,CBCT_Y,CBCT_Z = 0.04008997107600276,-0.09893278322198285, 0.09431361361086488 $ (See Daily QA CBCT for details) $$ vertT_X,vertT_Y = -0.3009313503531, 0.23710557272485 $$ $$ horzT_X,horzT_Y = -0.9009703236419, 0.54420276482274 $$ $$ vert_G = 0.0 $$ $$ horz_G = 270.0 $$ $$ epidIsoVert_X, epidIsoVert_Y = -2.184359029, -0.261167348 $$ $$ epidIsoHorz_X, epidIsoHorz_Y = -2.061482198, 0.675118754 $$
$$ epid_X = cos(0.0) \times (-2.184359029 - -0.3009313503531) = -1.8834276786469 $$ $$ epid_Y = sin(270.0) \times (-2.061482198) - -0.9009703236419) = 1.1605116763580998 $$ $$ epidVert_Z = 0.261167348 - 0.23710557272485 = 0.02406177527515002 $$ $$ epidHorz_Z = -0.675118754 - 0.54420276482274 = -1.21932151882274 $$ $$ epid_Z = { 0.02406177527515002 + -1.21932151882274 \ over 2.0 } = -0.597629871773795 $$ $$ epid_X - CBCT_X = -1.8834276786469 - 0.04008997107600276 = -1.9235176497229027 $$ $$ epid_Y - CBCT_Y = 1.1605116763580998 - -0.09893278322198285 = 1.2594444595800827 $$ $$ epid_Z - CBCT_Z = -0.597629871773795 - 0.09431361361086488 = -0.6919434853846599 $$

CBCT Matlab Code

EPID Matlab Code