Convert between differential and cumulative DVH as well as between dose units, using smoothng of the differential DVH.
convertDVHsmooth(x,
toType=c("asis", "cumulative", "differential"),
toDoseUnit=c("asis", "GY", "CGY"),
interp=c("asis", "linear", "spline", "ksmooth", "smoothSpl"),
nodes=NULL, rangeD=NULL, perDose=TRUE)# S3 method for matrix
convertDVHsmooth(x,
toType=c("asis", "cumulative", "differential"),
toDoseUnit=c("asis", "GY", "CGY"),
interp=c("asis", "linear", "spline", "ksmooth", "smoothSpl"),
nodes=NULL, rangeD=NULL, perDose=TRUE)
# S3 method for DVHs
convertDVHsmooth(x,
toType=c("asis", "cumulative", "differential"),
toDoseUnit=c("asis", "GY", "CGY"),
interp=c("asis", "linear", "spline", "ksmooth", "smoothSpl"),
nodes=NULL, rangeD=NULL, perDose=TRUE)
# S3 method for DVHLst
convertDVHsmooth(x,
toType=c("asis", "cumulative", "differential"),
toDoseUnit=c("asis", "GY", "CGY"),
interp=c("asis", "linear", "spline", "ksmooth", "smoothSpl"),
nodes=NULL, rangeD=NULL, perDose=TRUE)
# S3 method for DVHLstLst
convertDVHsmooth(x,
toType=c("asis", "cumulative", "differential"),
toDoseUnit=c("asis", "GY", "CGY"),
interp=c("asis", "linear", "spline", "ksmooth", "smoothSpl"),
nodes=NULL, rangeD=NULL, perDose=TRUE)
One DVH (object of class matrix
or DVHs
, multiple cumulative DVHs from one patient with multiple structures (object of class DVHLst
), or multiple cumulative DVHs from many patients, each with multiple structures (object of class DVHLstLst
). See readDVH
.
character
. Convert the DVH to this type. "asis"
keeps the current DVH type.
character
. Convert the DVH to this dose unit. "asis"
keeps the current dose unit.
character
. Interpolation method for the differential DVH. "asis"
and "linear"
for no interpolation. "spline"
for spline interpolation using splinefun
("fmm"
for differential, "monoH.FC"
for cumulative DVHs), "ksmooth"
for local polynomial regression using locpoly
with kernel bandwidth chosen by the direct plug-in method using dpill
, "smoothSpl"
for a smoothing spline using smooth.spline
, with the smoothing parameter chosen by generalized crossvalidation.
numeric
. Minimum number of nodes to use in interpolation for method "ksmooth"
. Number of available nodes is kept as is for NULL
or if larger than nodes
.
numeric
. Dose range for interpolation methods "linear"
, "spline"
, "smoothSpl"
. If NULL
it is determined individally for each DVH.
logical
. Are the differential DVH volume values per unit dose?
Depending on the input, an object of class matrix
, DVHs
, DVHLst
, or DVHLstLst
.
# NOT RUN {
res <- convertDVHsmooth(dataMZ[[c(1, 1)]],
toType="cumulative",
toDoseUnit="CGY")
# }
Run the code above in your browser using DataLab