Last data update: 2014.03.03

R: Read DVH data from input file
read.DVHR Documentation

Read DVH data from input file

Description

Function to extract DVH data from input file(s). Supported file formats include Aria (v8-11), DICOM-RT, CadPlan, Monaco, RayStation, and TomoTherapy.

Usage

read.DVH(file, type=NA, verbose=TRUE, collapse=TRUE)

Arguments

file

Location of file containing relevant DVH information. One or more files may be specified. If multiple files are specified, all will be imported simultaneously.

type

Character vector specifying the DVH file format corresonding to each element in file. Value(s) must be one of "aria8", "aria10", "aria11", "dicom", "cadplan", "monaco", "raystation", or "tomo" (default is NA). Note that multiple different types can be processed so long as the length of type corresponds to the number of files specified.

verbose

Single logical value indicating whether or not to output verbose information and status in text

collapse

Single logical value indicating whether or not to collapse input from multiple files into a single DVH.list with all structures (default) or to output a nested list of individual DVH.list objects with each one corresponding to a single input file

Value

Returns a single DVH.list object containing all DVH information from a single input file. If multiple files are specified, a list of DVH.list objects will be returned.

Author(s)

Reid F. Thompson (reid.thompson@gmail.com)

See Also

DVH, DVH.list, new

Examples

# Read two DVH example files
file1 <- system.file("extdata/John_Doe.dvh", package="RadOnc")
johndoe <- read.DVH(file=file1, type="aria10", verbose=TRUE)
file2 <- system.file("extdata/Jane_Doe.dvh", package="RadOnc")
janedoe <- read.DVH(file=file2, type="aria10", verbose=TRUE)
combined <- read.DVH(file=c(file1, file2), type="aria10", collapse=TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RadOnc)
Loading required package: rgl
Loading required package: geometry
Loading required package: magic
Loading required package: abind
Loading required package: oro.dicom

oro.dicom: Rigorous - DICOM Input / Output (version = 0.5.0)

Loading required package: ptinpoly
Loading required package: misc3d
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RadOnc/read.DVH.Rd_%03d_medium.png", width=480, height=480)
> ### Name: read.DVH
> ### Title: Read DVH data from input file
> ### Aliases: read.DVH
> ### Keywords: file
> 
> ### ** Examples
> 
> # Read two DVH example files
> file1 <- system.file("extdata/John_Doe.dvh", package="RadOnc")
> johndoe <- read.DVH(file=file1, type="aria10", verbose=TRUE)
Reading DVH file ('/home/ddbj/local/lib64/R/library/RadOnc/extdata/John_Doe.dvh')... [exported on 05.24.2013  00:00:00]
  Patient: Doe, John (5555555555)
  Plan: PLAN_NAME
  Dose: 5500cGy (at 100% isodose line)
  ..Importing structure: LIVER  [volume: 1366.8cc, dose: 0 - 92.9cGy]
  ..Importing structure: SMALL_BOWEL  [volume: 206.2cc, dose: 0 - 99.8cGy]
  ..Importing structure: DUODENUM  [volume: 93.1cc, dose: 0 - 102.4cGy]
  ..Importing structure: STOMACH  [volume: 303.6cc, dose: 0 - 101.3cGy]
  ..Importing structure: CTV  [volume: 88.4cc, dose: 96.8 - 102.6cGy]
  ..Importing structure: PTV  [volume: 155.7cc, dose: 84.1 - 102.6cGy]
  ..Importing structure: BODY  [volume: 17666.2cc, dose: 0 - 102.6cGy]
  ..Importing structure: LEFT_KIDNEY  [volume: 154.2cc, dose: 0 - 44.4cGy]
  ..Importing structure: RIGHT_KIDNEY  [volume: 155.1cc, dose: 0 - 98.5cGy]
  ..Importing structure: CORD  [volume: 40.7cc, dose: 0 - 55.5cGy]
> file2 <- system.file("extdata/Jane_Doe.dvh", package="RadOnc")
> janedoe <- read.DVH(file=file2, type="aria10", verbose=TRUE)
Reading DVH file ('/home/ddbj/local/lib64/R/library/RadOnc/extdata/Jane_Doe.dvh')... [exported on 05.24.2013  00:00:00]
  Patient: Doe, Jane (1111111111)
  Plan: PLAN_NAME
  Dose: 5500cGy (at 100% isodose line)
  ..Importing structure: LIVER  [volume: 1635.9cc, dose: 42.7 - 5634.2cGy]
  ..Importing structure: LEFT_KIDNEY  [volume: 195.7cc, dose: 75.8 - 3846.8cGy]
  ..Importing structure: STOMACH  [volume: 695.2cc, dose: 59 - 5353.2cGy]
  ..Importing structure: DUODENUM  [volume: 34.2cc, dose: 2707.8 - 5620.1cGy]
  ..Importing structure: RIGHT_KIDNEY  [volume: 223.9cc, dose: 102.4 - 4201.9cGy]
  ..Importing structure: CTV  [volume: 146.7cc, dose: 5168.6 - 5646.9cGy]
  ..Importing structure: PTV  [volume: 239.4cc, dose: 4749.8 - 5664.7cGy]
  ..Importing structure: SMALL_BOWEL  [volume: 232.2cc, dose: 59.6 - 4934.1cGy]
  ..Importing structure: CORD  [volume: 64.9cc, dose: 0 - 3442.8cGy]
  ..Importing structure: BODY  [volume: 25507.5cc, dose: 0 - 5664.7cGy]
> combined <- read.DVH(file=c(file1, file2), type="aria10", collapse=TRUE)
Reading DVH file ('/home/ddbj/local/lib64/R/library/RadOnc/extdata/John_Doe.dvh')... [exported on 05.24.2013  00:00:00]
  Patient: Doe, John (5555555555)
  Plan: PLAN_NAME
  Dose: 5500cGy (at 100% isodose line)
  ..Importing structure: LIVER  [volume: 1366.8cc, dose: 0 - 92.9cGy]
  ..Importing structure: SMALL_BOWEL  [volume: 206.2cc, dose: 0 - 99.8cGy]
  ..Importing structure: DUODENUM  [volume: 93.1cc, dose: 0 - 102.4cGy]
  ..Importing structure: STOMACH  [volume: 303.6cc, dose: 0 - 101.3cGy]
  ..Importing structure: CTV  [volume: 88.4cc, dose: 96.8 - 102.6cGy]
  ..Importing structure: PTV  [volume: 155.7cc, dose: 84.1 - 102.6cGy]
  ..Importing structure: BODY  [volume: 17666.2cc, dose: 0 - 102.6cGy]
  ..Importing structure: LEFT_KIDNEY  [volume: 154.2cc, dose: 0 - 44.4cGy]
  ..Importing structure: RIGHT_KIDNEY  [volume: 155.1cc, dose: 0 - 98.5cGy]
  ..Importing structure: CORD  [volume: 40.7cc, dose: 0 - 55.5cGy]
Reading DVH file ('/home/ddbj/local/lib64/R/library/RadOnc/extdata/Jane_Doe.dvh')... [exported on 05.24.2013  00:00:00]
  Patient: Doe, Jane (1111111111)
  Plan: PLAN_NAME
  Dose: 5500cGy (at 100% isodose line)
  ..Importing structure: LIVER  [volume: 1635.9cc, dose: 42.7 - 5634.2cGy]
  ..Importing structure: LEFT_KIDNEY  [volume: 195.7cc, dose: 75.8 - 3846.8cGy]
  ..Importing structure: STOMACH  [volume: 695.2cc, dose: 59 - 5353.2cGy]
  ..Importing structure: DUODENUM  [volume: 34.2cc, dose: 2707.8 - 5620.1cGy]
  ..Importing structure: RIGHT_KIDNEY  [volume: 223.9cc, dose: 102.4 - 4201.9cGy]
  ..Importing structure: CTV  [volume: 146.7cc, dose: 5168.6 - 5646.9cGy]
  ..Importing structure: PTV  [volume: 239.4cc, dose: 4749.8 - 5664.7cGy]
  ..Importing structure: SMALL_BOWEL  [volume: 232.2cc, dose: 59.6 - 4934.1cGy]
  ..Importing structure: CORD  [volume: 64.9cc, dose: 0 - 3442.8cGy]
  ..Importing structure: BODY  [volume: 25507.5cc, dose: 0 - 5664.7cGy]
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>