Computational Methods - mwgeurts/viewray_fielduniformity GitHub Wiki

The following sections demonstrate the algorithms used for computing field comparison metrics of the ViewRay Field Uniformity-Timing Check application.

Contents

Full Width at Half Maximum

When analyzing 1-D profiles, a common approach is the Full Width at Half Maximum (FWHM) definition of field width or field edge. This application computes FWHM in the following manner. First, the index I of the maximum value C along the profile Y-dimension is identified, as follows:

[C, I] = max(y);

Next, the find() function is used to find the highest lower index just below half the maximum value and the lowest upper index just below half maximum. These indices are referred to as lI and uI. Checks are included to verify that these indices are valid.

lI = find(y(1:I) < C/2, 1, 'last');
uI = find(y(I:end) < C/2, 1, 'first');

Finally, spline-based interpolation is applied to find the exact position of the lower and upper half maximum values along the X-dimension, designated here as l and u, respectively:

l = interp1(y(lI-1:lI+2), x(lI-1:lI+2), C/2, 'spline');
u = interp1(y(I+uI-3:I+uI), x(I+uI-3:I+uI), C/2, 'spline');

Flatness and Areal Symmetry

The Flatness and symmetry statistics describe the 1-D profiles extracted along the primary axes of measured data. Although many definitions of these values exist in the literature, this application computes flatness and areal symmetry according to the Varian protocol. In this formalism, flatness F is computed as follows, where dmax and dmin are the maximum and minimum values in the central 80% of the profile (defined by the FWHM):

F = (dmax - dmin) / (dmax + dmin)

The areal symmetry S is computed as follows, where Aupper and Alower are the integrated areas from the profile central axis to the 80% of the larger and smaller FWHM-defined field edges, respectively:

S = (Aupper - Alower) / (Aupper + Alower) x 2

The integrated areas Aupper and Alower are computed by linearly interpolating the profile into 10,000 samples and summing them. Both the central percentage (80%) of the profile and the interpolation factor (10,000) can be adjusted by editing the variables t and a in AnalyzeProfilerFields(), respectively.

Gamma Computation

Gamma analysis is performed based on the formalism presented by D. A. Low et. al., A technique for the quantitative evaluation of dose distributions., Med Phys. 1998 May; 25(5): 656-61. In this formalism, the Gamma quality index γ is defined as follows for each point along the measured profile Rm given the reference profile Rc:

γ = min{Γ(Rm,Rc}∀{Rc}

where:

Γ = √ (r^2(Rm,Rc)/ΔdM^2 + δ^2(Rm,Rc)/ΔDM^2),

r(Rm,Rc) = | Rc - Rm |,

δ(Rm,Rc) = Dc(Rc) - Dm(Rm),

Dc(Rc) and Dm(Rm) represent the reference and measured signal at each Rc and Rm, respectively, and

ΔdM and ΔDM represent the absolute and Distance To Agreement Gamma criterion (by default 2%/1mm), respectively.

The absolute criterion is typically given in percent and can refer to a percent of the maximum dose (commonly called the global method) or a percentage of the voxel Rm being evaluated (commonly called the local method). The application is capable of computing gamma using either approach, and can be set when calling CalcGamma by passing a boolean value of 1 (for local) or 0 (for global). By default, the global method (0) is used.

The computation applied in this application is the 1D algorithm, in that the distance to agreement criterion is evaluated only along the dimension of the reference profile when determining min{Γ(Rm,Rc}∀{Rc}. To accomplish this, the reference profile is shifted relative to the measured profile using linear 1D GPU (when available) interpolation. For each shift, Γ(Rm,Rc} is computed, and the minimum value γ is determined.

To improve computation efficiency, the computation space ∀{Rc} is limited to twice the distance to agreement parameter. Thus, the maximum "real" Gamma index returned by the application is 2.

⚠️ **GitHub.com Fallback** ⚠️