Learn R Programming

DVHmetrics (version 0.3.1)

readDVH: Read DVH text files

Description

Reads single or multiple DVH text files as exported from Varian Eclipse(TM), CadPlan(TM), OnCentra MasterPlan(TM), Philipps Pinnacle3 (TM), Elekta Monaco, or Tomo HiArt. Supports cumulative and differential DVHs.

Usage

readDVH(x,
        type=c("Eclipse", "Cadplan", "Masterplan",
               "Pinnacle", "Monaco", "HiArt"),
        planInfo=FALSE, courseAsID=FALSE, add)

Arguments

x
character vector giving paths to DVH text files. May contain globbing symbols understood by Sys.glob. If missing and in interactive mode, readDVH opens a file selector widget.
type
character string. Indicates which program the DVH text files were exported from. Supported: "Cadplan" (tested with version 6.4.7), "Eclipse" (tested with Varian Eclipse version 8), "Masterplan" (tested w
planInfo
Experimental: Either FALSE or character string. In the latter case, readDVH tries to extract additional information from the Plan field in the DVH file, e.g., the prescription dose for a sum plan or the
courseAsID
If TRUE, the Course entry in the header section of a DVH file is appended to the regular patient ID. Currently supported only for type="Eclipse".
add
DVHLstLst object. Existing object that should be merged with the new data from the files.

Value

  • Returns an object of class DVHLstLst. This is a list (one component with class DVHLst for each original file from one patient) of lists (each component is an object of class DVHs). A DVHs object is a list with the following components: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

item

Directory: Data:
  • Info.csv(variables"Filename","RegionOfInterestName","DoseMin cGy","DoseMax cGy","DoseMean cGy","Volume ccm")
DVH1.csv, DVH2.csv, ... - the actual DVH data files with names defined in Info.csv variable "Filename". They should look like NumberOfDimensions = 2; NumberOfPoints = 431; Points[] ={ 0,0 10,0 ... 4000,100 };

Details

Absolute dose values need to be given in Gy or cGy, absolute volume values in cm^3. Differential DVHs are automatically converted to cumulative DVHs, but the differential DVH information is kept. Sum plans are supported. To export data from Tomo HiArt, copy to clipboard and then save to file from a text editor. Support for Tomo HiArt files is currently limited to those with absolute dose and relative volume. Please send an anonymized sample file if you need this functionality. Since HiArt files do not contain info on patient ID, the current workaround is to generate a random ID. Pinnacle3 files have to be exported using its own scripting facility such that information from one patient is contained in one directory. A suitable export script is available on request from the package authors. The directory layout for one patient has to be as follows (experimental, likely to change in future versions):
  • Files (CSV format with column headers):
    • DoseInfo.csv(variables"PrescriptionDose cGy","NumberOfFractions","Dosis cGy")
  • PatInfo.csv(variables"LastName","FirstName","MedicalRecordNumber")
PlanInfo.csv (variable "PlanName")

See Also

Sys.glob, print.DVHs, showDVH, getMetric, checkConstraint, convertDVH

Examples

Run this code
# pick DVH files interactively
res <- readDVH()
res

# read all txt files in subdirectory DVH
res <- readDVH("DVH/*.txt", type="Eclipse")
res

Run the code above in your browser using DataLab