Learn R Programming

espadon (version 1.11.3)

rt.gamma.index: Gamma index 2D - 3D

Description

The rt.gamma.index function computes the local or global Gamma index from a measurement and a reference. These latter are "volume" class objects containing one (2D) or several planes (3D).

Usage

rt.gamma.index(
  vol,
  vol.ref,
  over.sampling.factor = 1,
  vol.max = vol.ref$max.pixel,
  dose.th = 0.02,
  delta.r = 3,
  analysis.th = 0.05,
  local = FALSE,
  local.th = 0.3,
  project.to.isocenter = TRUE,
  alias = "",
  description = NULL
)

Value

Returns a "volume" class object (see espadon.class

for class definitions). The $vol3D.data field represents the Gamma index. Two fields are added: the $setup field recalls the calculation setup, and the $gamma.info field details the number of dose points, the number of evaluated dose points,the rate of evaluated dose points, the rate of Gamma indices below 1, above 1.2 and 1.5, the max and the mean Gamma index.

Arguments

vol

"volume" class object, which represents the measured volume.

vol.ref

"volume" class object, which represents the reference volume.

over.sampling.factor

Strictly positive integer, or a vector of 3 strictly positive integers, default to 1. Defined to oversample grids of vol and vol.ref. Oversampling can be very time consuming.

vol.max

Positive number, by default equal to the maximum value of the reference volume. See Details.

dose.th

Number between 0 and 1, used to determine the dose difference criterion. See Details.

delta.r

Positive number, in mm. Distance difference criterion.

analysis.th

Number between 0 and 1. Only the voxels whose value is greater than or equal analyse.th*vol.max are processed.

local

Boolean. If local = FALSE (default), a global Gamma index is computed, and a local Gamma index otherwise.

local.th

Number between 0 and 1. Local threshold, only used if local = TRUE. See Details.

project.to.isocenter

Boolean. If TRUE, and if vol and vol.ref are of modality "rtimage", the size of the pixels is corrected to correspond to that found if the sensor was at the isocenter.

alias

Character string, $object.alias of the created object.

description

Character string, describing the created object. If description = NULL (default value), it will be set to Gamma index setup.

Details

The Gamma index of a voxel nascii was defined by Low and al [1]. It is computed from the formulae: _n = min ( (D_i-Dref_n)^2 D^2 + r_i^2 r^2)ascii whith D_iascii the measured dose at voxel iascii, Dref_nascii the reference dose at voxel nascii, r_iascii the distance between voxels iascii and nascii, rascii the distance difference criterion equal to delta.r, Dascii the distance difference criterion at voxel nascii defined as follows:

  • If local = FALSE a global Gamma index is computed and D~=~dose.th~~vol.maxascii.

  • If local = TRUE, then D~=~dose.th~~Dref_nascii when Dref_n~~local.th~~vol.maxascii, and D~=~dose.th~~local.th~~vol.maxascii otherwise.

References

[1] low1998espadon

See Also

rt.chi.index

Examples

Run this code
# Creation of a reference volume  and measured volume
# loading of toy-patient objects (decrease dxyz for  better result)
patient <- toy.load.patient (modality = c ("rtdose", "rtstruct"), 
                             roi.name = "ptv", dxyz = c (5, 5, 5))
D.ref <- patient$rtdose[[1]]  
# We will assume that the measured dose is equal to the reference dose shifted
# by 3 pixels on the x axis
D.meas <- vol.copy (D.ref, alias = "measured_dose")
D.meas$vol3D.data[1:(D.meas$n.ijk[1] - 3) ,,] <- D.ref$vol3D.data[4:D.ref$n.ijk[1],,] 
D.max <- as.numeric(quantile(as.numeric(D.ref$vol3D.data), 
                             probs = 99.99/100, na.rm = TRUE))
gamma <- rt.gamma.index (D.meas, D.ref, delta.r = 6, vol.max = D.max)  
gamma$gamma.info  

# Display gamma index at isocenter
G.iso <- patient$rtstruct[[1]]$roi.info$Gz[
  patient$rtstruct[[1]]$roi.info$name == "ptv"]
display.plane(gamma, view.coord = G.iso, 
              bottom.col = c ("#00FF00", "#007F00", "#FF8000", "#FF0000", 
                              "#AF0000"),
              bottom.breaks = c (0, 0.8, 1, 1.2, 1.5, gamma$max.pixel), 
              bg = "blue", interpolate = FALSE)

Run the code above in your browser using DataLab