Returns the point-wise mean and median DVH with the point-wise standard deviation for a given list of input DVHs. Other point-wise measures may be calculated as well.
getMeanDVH(x, fun=list(mean=mean, median=median, sd=sd),
cumul=TRUE, thin=1, byPat=TRUE, patID=NULL, structure=NULL,
fixed=TRUE, returnDVHObj=FALSE)# S3 method for DVHs
getMeanDVH(x, fun=list(mean=mean, median=median, sd=sd),
cumul=TRUE, thin=1, byPat=TRUE, patID=NULL, structure=NULL,
fixed=TRUE, returnDVHObj=FALSE)
# S3 method for DVHLst
getMeanDVH(x, fun=list(mean=mean, median=median, sd=sd),
cumul=TRUE, thin=1, byPat=TRUE, patID=NULL, structure=NULL,
fixed=TRUE, returnDVHObj=FALSE)
# S3 method for DVHLstLst
getMeanDVH(x, fun=list(mean=mean, median=median, sd=sd),
cumul=TRUE, thin=1, byPat=TRUE, patID=NULL, structure=NULL,
fixed=TRUE, returnDVHObj=FALSE)
By default (returnDVHObj=FALSE) returns a data frame with point-wise mean DVH averaged over structures (byPat=TRUE) or over patients (byPat=FALSE) including the point-wise standard deviation or other measures as controlled by fun. With returnDVHObj=TRUE, a DVH object is returned that is equivalent to a DVH as imported from a file. In particular, functions like showDVH or getMetric can be used on such an object.
A single DVH (object of class DVHs), multiple DVHs from one patient/structure (object of class DVHLst), or multiple DVHs from many patients/structures (object of class DVHLstLst). See readDVH.
Named list of functions that should be applied to yield 1 point-wise DVH measure. Functions must have exactly 1 return value.
logical. Get point-wise mean and SD for cumulative or differential (per unit dose) DVH?
numeric. The number of DVH nodes (dose values) is reduced by 1/thin of the maximum number of nodes in x before interpolating and averaging.
logical. Relevant if multiple DVHs are given. byPat=TRUE means that for each patient, DVHs for multiple structures are averaged point wise. byPat=FALSE means that for each structure, DVHs for multiple patients averaged point wise.
character vector. Include DVHs for these patients only when calculating mean/SD. If missing, all patients are used. Can be a regular expression with fixed=FALSE, see regex.
character vector. Include DVHs for these structures only when calculating mean/SD. If missing, all structures are used. Can be a regular expression with fixed=FALSE, see regex.
logical. Use fixed=FALSE for regular expression matching of patID and structure.
logical. With returnDVHObj=TRUE, a regular DVH object is returned. In that case, only the first component of fun is used which should be mean or median (not checked).
Before calculating the point-wise mean and SD, DVHs in x are first linearly interpolated with convertDVH using the same set of nodes.
showDVH,
convertDVH
res1 <- getMeanDVH(dataMZ, byPat=TRUE, structure=c("HEART", "AMYOCL"))
head(res1)
# average differential DVHs
# matches patients P123 and P234
res2 <- getMeanDVH(dataMZ, fun=list(min=min, max=max),
cumul=FALSE, byPat=FALSE,
patID="23", fixed=FALSE)
head(res2)
Run the code above in your browser using DataLab