getMeanDVH {DVHmetrics} | R Documentation |
Point-wise mean DVH with point-wise SDs
Description
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.
Usage
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 class '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 class '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 class '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)
Arguments
x |
A single DVH (object of class |
fun |
Named |
cumul |
|
thin |
|
byPat |
|
patID |
|
structure |
|
fixed |
|
returnDVHObj |
|
Details
Before calculating the point-wise mean and SD, DVHs in x
are first linearly interpolated with convertDVH
using the same set of nodes.
Value
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.
See Also
Examples
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)