showConstraint {DVHmetrics} | R Documentation |
Display constraints for cumulative dose-volume histograms
Description
Displays quality assurance constraints for cumulative dose-volume histograms: Either one diagram per patient - including multiple structures. Or one diagram per structure - including multiple patients.
Usage
showConstraint(x, constr, byPat=TRUE, rel=TRUE, guessX=TRUE, guessY=TRUE,
thresh=1, show=TRUE, visible=FALSE)
## S3 method for class 'DVHs'
showConstraint(x, constr, byPat=TRUE, rel=TRUE, guessX=TRUE, guessY=TRUE,
thresh=1, show=TRUE, visible=FALSE)
## S3 method for class 'DVHLst'
showConstraint(x, constr, byPat=TRUE, rel=TRUE, guessX=TRUE, guessY=TRUE,
thresh=1, show=TRUE, visible=FALSE)
## S3 method for class 'DVHLstLst'
showConstraint(x, constr, byPat=TRUE, rel=TRUE, guessX=TRUE, guessY=TRUE,
thresh=1, show=TRUE, visible=FALSE)
Arguments
x |
A single DVH (object of class |
constr |
One or more constraints - given as a |
byPat |
|
rel |
|
guessX |
|
guessY |
|
thresh |
|
show |
|
visible |
|
Details
Constraints are shown as points in the cumulative DVH with an additional arrow indicating where the cumulative DVH curve should lie relative to the constraint. On each DVH curve, the point with the minimal Euclidean distance to the constraint is indicated. Note that, visually, this point only has the minimal apparent distance if the aspect ratio of the diagram is 1.
If multiple diagrams are produced, they are shown in the same graphics device. If interactive inspection is required, make sure you use an R development environment that saves previous diagrams and allows navigating between them - e.g., RStudio or OpenAnalytics Architect.
Value
Silently returns a ggplot
diagram object, or - when multiple diagrams are constructed - a list of ggplot
diagram objects.
See Also
Examples
data(dataMZ)
# define constraints
constr <- data.frame(
patID=c("P123", "P234"),
structure=c("HEART", "*"),
constraint=c("D1CC < 20Gy", "V10% > 8CC"),
stringsAsFactors=FALSE) # this is important
showConstraint(dataMZ, constr=constr, byPat=FALSE)